Friday, February 4, 2022
Many of our users use the Factor environment through the UI developer
tools or on
the command-line with the
Another important use case is being able to
eval and run scripts –
and this is where much of Tomasz’ criticism was focused.
We now do command-line eval and run scripts with auto-use? enabled. This will be available in the nightly builds and as part of an upcoming 0.99 release.
So this works now:
$ ./factor -e="1 2 + ." 3 $ cat foo.factor USE: io "Hello World" print 12 $ ./factor foo.factor Hello World --- Data stack: 12
Previously, the first example would error with a “No word named “+”
found in current vocabulary search path” and the second example would
complain that the “Quotation’s stack effect does not match call site”
because the script did not have a
( -- ) stack effect.
We may adjust this slightly as it just landed last night, and if anyone has further suggestions, please keep them coming!