4 ms·
Of course. You can build whatever functional abstractions you like in Forth. Some time ago I did a number of experiments with lazy generators: https://github.co
by RodgerTheGreat 7y ago
Of course. You can build whatever functional abstractions you like in Forth. Some time ago I did a number of experiments with lazy generators: https://github.com/JohnEarnest/Mako/blob/master/lib/Algorithms/Lazy.fs#L95-L104 https://github.com/JohnEarnest/Mako/blob/master/lib/Algorith...
The above dialect uses { } to delimit anonymous inline word definitions. RetroForth has a similar feature, and Factor uses the same syntax for "quotations", which have slightly different semantics but roughly the same meaning.
- ngcc_hk 7y agoThanks. If I start today to learn as I have searched a bit ... it seems to have a dialect retroForth whilst I see a 10 years old recommend swiftforth ... Actually the tutorial that host a forth on js (like clojurescript just self implement). Which path to go? Do not want to learn lisp ended up in scheme.
- RodgerTheGreat 7y agoOn desktops I've used gforth[0]. It's rather large and heavyweight, but easy to install and has decent documentation; not a bad starting point. Alternatively, JonesForth[1] is an excellent extensively-commented implementation suitable for reading start-to-finish. [0] https://www.gnu.org/software/gforth/ https://www.gnu.org/software/gforth/ [1] https://github.com/nornagon/jonesforth/blob/master/jonesforth.S https://github.com/nornagon/jonesforth/blob/master/jonesfort...
- lebuffon 7y agoForth can be a little troublesome in that area. There is a standard language but it is primitive. Extensions for real world problems tend to diverge in syntax. This has lead to a saying: "If you've seen one Forth, you've seen one Forth" :) It's better than in the past with an ISO standard (IMHO) but know that if you change language providers there will be differences for things like external library linking (if available), GUI interaces etc. There are demo versions of commericial systems at: https://www.mpeforth.com/resource-links/downloads/ https://www.mpeforth.com/resource-links/downloads/ https://www.forth.com/download/ https://www.forth.com/download/ And of course a major pass-time in the Forth community is writing your own Forth. There is even a few Forths written in Python. (for instructional purposes only I assume) http://openbookproject.net/py4fun/forth/forth.html http://openbookproject.net/py4fun/forth/forth.html