rpl.rb/README.md

75 lines
2.4 KiB
Markdown
Raw Normal View History

2022-01-26 16:15:20 +01:00
# rpl.rb
2021-10-30 17:44:38 +02:00
2022-10-04 14:39:53 +02:00
Reverse-Polish-Lisp inspired language in ruby
2022-01-18 17:06:13 +01:00
2022-10-04 17:10:23 +02:00
# Install
`gem install rpl`
# Usage
* `rpl --help`
* run RPL: `rpl`
2022-11-10 10:53:55 +01:00
* by default rpl persists its state in $XDG_DATA_HOME/rpl.rb/env.rpl which is created if needed (if $XDG_DATA_HOME isn't set ~/.local/share/ is used)
2022-10-04 17:10:23 +02:00
# Development
2022-03-09 11:22:20 +01:00
To run REPL locally: `rake run`
2022-02-15 17:06:19 +01:00
2022-03-09 11:22:20 +01:00
To run the test suite: `rake test`
2022-02-15 17:06:19 +01:00
2022-10-04 14:39:53 +02:00
To build gem: `rake gem`
# known bugs
-
2022-01-18 17:06:13 +01:00
# TODO-list
2022-10-04 14:39:53 +02:00
* Language:
* pseudo filesystem: subdir/namespace for variables
. 'a dir' crdir 'a dir' cd vars
2022-05-11 15:18:16 +02:00
* SDL-based graphic environment/API
2022-02-10 14:33:09 +01:00
2022-10-04 14:39:53 +02:00
# Not yet implemented
```sh
$ grep "# @dictionary.add_word" ./lib/rpl/words/*.rb
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['ln'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['lnp1'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['exp'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['expm'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['log10'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['alog10'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['log2'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['alog2'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['sinh'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['asinh'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['cosh'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['acosh'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['tanh'],
./lib/rpl/words/logarithm.rb: # @dictionary.add_word!( ['atanh'],
./lib/rpl/words/mode.rb: # @dictionary.add_word!( ['std'],
./lib/rpl/words/mode.rb: # @dictionary.add_word!( ['fix'],
./lib/rpl/words/mode.rb: # @dictionary.add_word!( ['sci'],
./lib/rpl/words/mode.rb: # @dictionary.add_word!( ['round'],
./lib/rpl/words/operations-complexes.rb: # @dictionary.add_word!( ['p→r', 'p->r'],
./lib/rpl/words/operations-complexes.rb: # @dictionary.add_word!( ['r→p', 'r->p'],
2022-10-04 14:39:53 +02:00
```
# No implementation planned
* use IFT, IFTE instead of
. if
. then
. else
. end
2022-10-04 14:39:53 +02:00
* use LOOP, TIMES instead of
. start
. for
. next
. step
. do
. until
. while
. repeat
2022-10-04 14:39:53 +02:00
* use LSTO instead of
. ->, →
2022-10-04 14:39:53 +02:00
# inspirations and references
* https://en.wikipedia.org/wiki/RPL_(programming_language)
* https://github.com/louisrubet/rpn/