Skip to content

Commit 2b42d44

Browse files
committed
Updated README
1 parent a21957e commit 2b42d44

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ instructions for your device below:
1919
- Download the binary:
2020

2121
```
22-
curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.1.5/nuru_linux_amd64_v0.1.5.tar.gz
22+
curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.2.0/nuru_linux_amd64_v0.2.0.tar.gz
2323
```
2424

2525
- Extract the file to make global available:
2626

2727
```
28-
sudo tar -C /usr/local/bin -xzvf nuru_linux_amd64_v0.1.5.tar.gz
28+
sudo tar -C /usr/local/bin -xzvf nuru_linux_amd64_v0.2.0.tar.gz
2929
```
3030

3131
- Confirm installation with:
@@ -40,12 +40,12 @@ nuru -v
4040
- Download the binary with this command:
4141

4242
```
43-
curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.1.5/nuru_android_arm64_v0.1.5.tar.gz
43+
curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.2.0/nuru_android_arm64_v0.2.0.tar.gz
4444
```
4545
- Extract the file:
4646

4747
```
48-
tar -xzvf nuru_android_arm64_v0.1.5.tar.gz
48+
tar -xzvf nuru_android_arm64_v0.2.0.tar.gz
4949
```
5050
- Add it to path:
5151

@@ -65,8 +65,8 @@ nuru -v
6565
```
6666
mkdir C:\bin
6767
```
68-
- Download the Nuru Program [Here](https://github.com/AvicennaJr/Nuru/releases/download/v0.1.5/nuru_windows_amd64_v0.1.5.exe)
69-
- Rename the downloaded program from `nuru_windows_amd64_v0.1.5.exe` to `nuru.exe`
68+
- Download the Nuru Program [Here](https://github.com/AvicennaJr/Nuru/releases/download/v0.2.0/nuru_windows_amd64_v0.2.0.exe)
69+
- Rename the downloaded program from `nuru_windows_amd64_v0.2.0.exe` to `nuru.exe`
7070
- Move the file `nuru.exe` to the folder `C:\bin`
7171
- Add the bin folder to Path with this command:
7272

@@ -96,6 +96,9 @@ nuru -v
9696

9797
## Syntax
9898

99+
**NOTE**
100+
> There is a more detailed documentation of the language [here](https://github.com/AvicennaJr/NuruDocs).
101+
99102
Nuru, although still in its early stage, intends to be a fully functional programming language, and thus it has been baked with many features.
100103

101104
### Defining A Variable
@@ -152,9 +155,11 @@ Type | Syntax | Comments
152155
--------- | ----------------------------------------- | -----------------------
153156
BOOL | `kweli sikweli` | kweli == true, sikweli == false
154157
INT | `1, 100, 342, -4` | These are signed 64 bit integers
155-
STRING | `"" "mambo" "habari yako"` | They MUST be in DOUBLE QUOTES `"`
156-
ARRAY | `[] [1, 2, 3] [1, "moja", kweli]` | Arrays can hold any types
158+
FLOAT | `2.3, 4.5. 100.8094` | Signed 64 bit floats
159+
STRING | `"" "mambo" "habari yako"` | They can be in double `"` or single `'` quotes
160+
ARRAY | `[] [1, 2, 3] [1, "moja", kweli]` | Arrays can hold any types
157161
DICT | `{} {"a": 3, 1: "moja", kweli: 2}` | Keys can be int, string or bool. Values can be anything
162+
NULL | `tupu` | These are nil objects
158163

159164
### Functions
160165

@@ -205,7 +210,7 @@ fanya i = 10
205210
206211
wakati (i > 0) {
207212
andika(i)
208-
i = i - 1
213+
i--
209214
}
210215
```
211216

@@ -270,6 +275,15 @@ mtu = mtu + kazi
270275
andika(mtu) // output = {"jina": "Avicenna", "kabila": "Mnyakusa", "anapoishi": "Dar Es Salaam", "kazi": "jambazi"}
271276
```
272277

278+
### For Loops
279+
280+
These can iterate over strings, arrays and dictionaries:
281+
```
282+
kwa i ktk "habari" {
283+
andika(i)
284+
}
285+
```
286+
273287
### Getting Input From User
274288

275289
In Nuru you can get input from users using the `jaza()` keyword as follows:
@@ -297,7 +311,7 @@ Kindly Note that everything should be placed in a single line. Here's an example
297311
```
298312
### Running From File
299313

300-
To run a Nuru script, write the `nuru` command followed by the name of the file with a `.nr` extension:
314+
To run a Nuru script, write the `nuru` command followed by the name of the file with a `.nr` or `.sw` extension:
301315

302316
```
303317
nuru myFile.nr

0 commit comments

Comments
 (0)