Skip to content

Commit

Permalink
v0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Champii committed Jun 4, 2022
1 parent 618b112 commit d837fb4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 65 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rock"
version = "0.2.3-develop"
version = "0.2.3"
authors = ["champii <contact@champii>"]
edition = "2018"

Expand Down
88 changes: 25 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<<<<<<< HEAD
# Rock v0.2.2
=======
# Rock v0.2.3-develop
>>>>>>> 18e4cf37e8bbce6723f212962ac1dbfc0c355a2f
# Rock v0.2.3

[![Rust](https://github.com/Champii/Rock/actions/workflows/rust.yml/badge.svg?branch=-)](https://github.com/Champii/Rock/actions/workflows/rust.yml)

Expand All @@ -13,12 +9,9 @@ Rock is highly inspired from Livescript and Rust, and will also borrow (pun inte

No to be taken seriously (yet)

<<<<<<< HEAD
---

## Index

- [Rock v0.2.2](#rock-v022)
- [Rock v0.2.3](#rock-v0.2.3)
- [Index](#index)
- [Features](#features)
- [Install](#install)
Expand All @@ -32,30 +25,13 @@ No to be taken seriously (yet)
- [Polymorphic function](#polymorphic-function)
- [Custom infix operator](#custom-infix-operator)
- [Trait Definition](#trait-definition)
- [Struct instance and Show implementation](#struct-instance-and-show-implementation)
- [Struct instance and methods]( #struct-instance-and-methods )
- [Show implementation]( #show-implementation )
- [Modules and Code Separation](#modules-and-code-separation)
- [REPL](#repl)
- [Development notes](#development-notes)

---
=======
# Index
- [Features]( #features )
- [Install]( #install )
- [Using released binary]( #using-released-binary )
- [With cargo from Git]( #with-cargo-from-git )
- [From sources]( #from-sources )
- [Quickstart]( #quickstart )
- [Showcases]( #showcases )
- [Polymorphic function]( #polymorphic-function )
- [Custom infix operator]( #custom-infix-operator )
- [Trait definition]( #trait-definition )
- [Struct instance and methods]( #struct-instance-and-methods )
- [Show implementation]( #show-implementation )
- [Modules and code separation]( #modules-and-code-separation )
- [REPL]( #repl )
- [Development notes]( #development-notes )
>>>>>>> 18e4cf37e8bbce6723f212962ac1dbfc0c355a2f

## Features

Expand All @@ -75,23 +51,16 @@ Warning: This project has only been tested on Linux x86_64.

How to install and run the compiler:

### Using Released Binary
### Using Released Binary

You will need `clang` somewhere in your $PATH

Linux x86_64 only

<<<<<<< HEAD
[Rock v0.2.2](https://github.com/Champii/Rock/releases/download/v0.2.2/rock) (Tested on arch, btw)
[Rock v0.2.3](https://github.com/Champii/Rock/releases/download/v0.2.3/rock) (Tested on arch, btw)

``` sh
wget https://github.com/Champii/Rock/releases/download/v0.2.2/rock
=======
[Rock v0.2.3-develop](https://github.com/Champii/Rock/releases/download/v0.2.3-develop/rock) (Tested on arch, btw)

``` sh
wget https://github.com/Champii/Rock/releases/download/v0.2.3-develop/rock
>>>>>>> 18e4cf37e8bbce6723f212962ac1dbfc0c355a2f
wget https://github.com/Champii/Rock/releases/download/v0.2.3/rock
chmod +x rock
./rock -V
```
Expand Down Expand Up @@ -218,6 +187,8 @@ main =
print id "Test"
```

Prints

``` sh
$ rock run
1
Expand Down Expand Up @@ -261,9 +232,9 @@ $ rock run
You can create any operator that is made of any combination of one or more of `'+', '-', '/', '*', '|', '<', '>', '=', '!', '$', '@', '&'`

Most of the commonly defined operators like `+`, `<=`, etc are already implemented by the [stdlib](https://github.com/Champii/Rock/tree/master/std) that is automaticaly compiled with every package.
There is a `--nostd` option to allow you to use your own custom implementation.
There is a `--nostd` option to allow you to use your own custom implementation.

### Trait Definition
### Trait definition

This `trait ToString` is redondant with the `trait Show` implemented in the stdlib, and serves as a demonstration only

Expand All @@ -284,12 +255,7 @@ main =
```

``` sh
rock run
```
Prints:
```sh
$ rock run
33
42.42
```
Expand All @@ -314,15 +280,13 @@ main =
```

``` sh
rock run
$ rock run
1
```

Prints `1`
### Show implementation

```haskell
``` haskell
struct Player
level :: Int64
name :: String
Expand All @@ -340,12 +304,11 @@ main =
```

``` sh
rock run
$ rock run
MyName
```

Prints `MyName`
### Modules and Code Separation
### Modules and code separation

- `./myproj/src/foo.rk`

Expand All @@ -363,12 +326,15 @@ use foo::bar
main = print bar 1
```

Prints `2`
```sh
$ rock run
2
```

Note that we could have skiped the
`use foo::bar`
if we wrote
`main = print foo::bar 1`
`main = print foo::bar 1`

## REPL

Expand All @@ -381,7 +347,7 @@ This includes I/O of all sorts (Looking at you, open/read/write in loops)
Note that the REPL expects to be run from the project root, and expects some version of the stdlib
to be available in the `./src` folder

You can start a REPL session with
You can start a REPL session with

``` sh
rock -r
Expand All @@ -390,11 +356,7 @@ rock --repl
```

``` sh
<<<<<<< HEAD
Rock: v0.2.2
=======
Rock: v0.2.3-develop
>>>>>>> 18e4cf37e8bbce6723f212962ac1dbfc0c355a2f
Rock: v0.2.3
----

Type ':?' for help
Expand Down

0 comments on commit d837fb4

Please sign in to comment.