Skip to content

Commit b0b2561

Browse files
authored
Merge pull request #138 from tsoding/examples-order
Use the size of the examples as the complexity indicator
2 parents 698133a + e7c6cb0 commit b0b2561

File tree

20 files changed

+22
-3
lines changed

20 files changed

+22
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ jobs:
7575
- name: Run Tests
7676
run: |
7777
make
78-
./build/b -run -t 6502 ./examples/10_hello_world.b ./std/6502.b
78+
./build/b -run -t 6502 ./examples/hello_world.b ./std/6502.b

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Compiler for the B Programming Language implemented in [Crust](https://github.co
2222

2323
```console
2424
$ make
25-
$ ./build/b -run ./examples/10_hello_world.b
25+
$ ./build/b -run ./examples/hello_world.b
2626
```
2727

2828
### Uxn
@@ -32,7 +32,7 @@ $ ./build/b -run ./examples/10_hello_world.b
3232
The compiler supports [Uxn](https://100r.co/site/uxn.html) target. Make sure you have `uxnemu` in your `$PATH` if you want to use `-run` flag.
3333

3434
```console
35-
$ ./build/b -t uxn -run ./examples/10_hello_world.b ./std/uxn.b
35+
$ ./build/b -t uxn -run ./examples/hello_world.b ./std/uxn.b
3636
```
3737

3838
Also check out more examples at [./examples/](./examples/).

examples/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
!*/
33
!**/*.b
44
!.gitignore
5+
!**/README.md

examples/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Examples
2+
3+
This folder contains examples that are meant to be read by the users of the language to learn and explore the capabilities of the language.
4+
5+
It is recommended to study them in the order of their complexity: from simplest to the most complex. Generally, the size of the file roughly corresponds to its complexity so we recommend to sort the examples by their size and follow that order.
6+
7+
In a Linux console this could be achived by the running command:
8+
9+
```
10+
$ ls -lS
11+
```
12+
13+
Where the `-S` flag of the [ls](https://man7.org/linux/man-pages/man1/ls.1.html) utility sorts the files by size, largest first.
14+
15+
In other operating systems and applications please use similar functionality.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)