A Forthic interpreter that runs within Ruby.
Install the gem and add to the application's Gemfile by executing:
bundle add forthic
If bundler is not being used to manage dependencies, install the gem by executing:
gem install forthic
Here's a basic example of how to use the Forthic interpreter:
require 'forthic'
interp = Forthic::Interpreter.new
interp.run("[1 2 3] '8 *' MAP")
puts interp.stack_pop
# Output:
#
# [ 8, 16, 24 ]
Bug reports and pull requests are welcome on GitHub at https://github.com/linkedin/forthic.