As I was walking by the Great Bear in the northern sky
I found the seashell missing from the shore below
--- Colleen, Ursa Major Find
uf is a toy implementation of Forth programming language. It's goal is to understand Forth.
Install uf with roswell:
$ ros install t-sin/uf
In REPL, you can use one-shot VM:
;; calculating Fibonacci number of 10 CL-USER> (with-input-from-string (in " : <= over over < rot swap = or ; : fib dup 0 swap <= if drop 0 else dup 1 = if drop 1 else dup 1 swap - fib swap 2 swap - fib + then then ; 10 fib") (let ((vm (uf:init-vm (uf:parse in)))) (uf:execute vm) vm)) #<VM: (55)>
If you want to run uf with REPL, roswell script satisfies you:
If you want to see data stack each input, specify
- TANAKA Shinichi (firstname.lastname@example.org)
Copyright (c) 2018 Shinichi TANAKA (email@example.com)
Rosa is licensed under the Lisp GNU Lesser General Public License.