A Reverse Polish Lisp language implemented in Ruby
Find a file
Gwenhael Le Moine a21cf92e25
add sample rpl rpograms
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2022-11-15 14:27:56 +01:00
bin refine decision to launch repl; option to set verbosity 2022-11-15 14:24:38 +01:00
lib 0.15.0 2022-11-15 13:54:30 +01:00
samples add sample rpl rpograms 2022-11-15 14:27:56 +01:00
spec add a Ruby-esque ! suffix to some methods 2022-10-12 17:04:50 +02:00
.gitignore Initial commit 2021-10-30 17:44:38 +02:00
LICENSE Initial commit 2021-10-30 17:44:38 +02:00
Rakefile replace Makefile with equivalent Rakefile 2022-02-22 16:53:28 +01:00
README.md update README about $XDG_DATA_HOME 2022-11-10 10:53:55 +01:00
rpl.gemspec update description, add README.md to rdoc 2022-10-11 13:56:46 +02:00

rpl.rb

Reverse-Polish-Lisp inspired language in ruby

Install

gem install rpl

Usage

  • rpl --help
  • run RPL: rpl
  • 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)

Development

To run REPL locally: rake run

To run the test suite: rake test

To build gem: rake gem

known bugs

TODO-list

  • Language:
    • pseudo filesystem: subdir/namespace for variables . 'a dir' crdir 'a dir' cd vars
  • SDL-based graphic environment/API

Not yet implemented

$ 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'],

No implementation planned

  • use IFT, IFTE instead of . if . then . else . end
  • use LOOP, TIMES instead of . start . for . next . step . do . until . while . repeat
  • use LSTO instead of . ->, →

inspirations and references