mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-05 20:26:53 +08:00
created an AUTHORS file.
This commit is contained in:
parent
484aa5d88f
commit
4d2fc474f9
11
AUTHORS
Normal file
11
AUTHORS
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# This is a list of pocketlang's contributors who
|
||||||
|
# contribute code, documentation, significant
|
||||||
|
# amount of bug reports, etc.
|
||||||
|
#
|
||||||
|
# Names should be added to the list like so:
|
||||||
|
# Name (github handle) <email address>
|
||||||
|
#
|
||||||
|
# (the order of the names are arbitrary)
|
||||||
|
|
||||||
|
Thakee Nathees (@ThakeeNathees) <thakeenathees@gmail.com>
|
||||||
|
Derick Alangi (@xSavitar) <alangiderick@gmail.com>
|
24
README.md
24
README.md
@ -39,30 +39,6 @@ It's a [WebAssembly](https://webassembly.org/) build of the VM compiled using [e
|
|||||||
Note that in the webassembly version of the language, some features (input, relative import, etc.) have disabled, has
|
Note that in the webassembly version of the language, some features (input, relative import, etc.) have disabled, has
|
||||||
limited memory allocations, and the IO calls might be slower.
|
limited memory allocations, and the IO calls might be slower.
|
||||||
|
|
||||||
### On Your System
|
|
||||||
|
|
||||||
NOTE: Make sure you've compiled the `pocketlang` source code and you have the `pocket` binary in `build/debug/`.
|
|
||||||
|
|
||||||
Copy/paste or type in the following factorial code in any editor of your choice:
|
|
||||||
|
|
||||||
```ruby
|
|
||||||
# A recursive factorial function
|
|
||||||
def fac(n)
|
|
||||||
if n == 0 then return 1 end
|
|
||||||
return n * fac(n - 1)
|
|
||||||
end
|
|
||||||
|
|
||||||
# Prints all factorials from 0 to 10 exclusive.
|
|
||||||
print('Factorial of 0 - 9')
|
|
||||||
for i in 0..10
|
|
||||||
print(fac(i))
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
Save the file as `factorial.pk` and execute it from the pocketlang binary directory with: `./pocket <path-to-factorial.pk>`.
|
|
||||||
|
|
||||||
This should print out the output of the factorial program in your STDOUT (terminal).
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
The pocketlang documentation is hosted at https://thakeenathees.github.io/pocketlang/ which
|
The pocketlang documentation is hosted at https://thakeenathees.github.io/pocketlang/ which
|
||||||
|
Loading…
Reference in New Issue
Block a user