3 ms·
djb once wrote a FORTH-like interpreter. Anyone get that old code to run today? I have always thought think LISP/Scheme's "best" use is to write code generato
by gwu78 13y ago
djb once wrote a FORTH-like interpreter.
Anyone get that old code to run today?
I have always thought think LISP/Scheme's "best" use is to write code generators (e.g., that output C or asm). I know there's at least one LISP/Scheme project that outputs C, so I know I'm not alone in thinking this can be useful.
FORTH has always seemed better suited to driving hardware than any LISP/Scheme.
This is some sort of bias perhaps. These are both very flexible languages.
What if historically programmers tried to use FORTH for "AI" and LISP as a "portable assembler"?
- protomyth 13y ago> What if historically programmers tried to use FORTH for "AI" and LISP as a "portable assembler"? Then I guess the Burroughs B5000 and its ilk might have become a popular machine for AI research. We would have had Stack Machines instead of LISP Machines.
- lispm 13y agoLisp Machines were mostly stack machines.
- agumonkey 13y agoI'll just throw that in here, as I always do, in case people want a nice historical overview (yet detailed) of stack machines : http://www.eecg.toronto.edu/~laforest/Second-Generation_Stack_Computer_Architecture.pdf http://www.eecg.toronto.edu/~laforest/Second-Generation_Stac...
- abecedarius 13y agoI have in fact written a Forth dialect, but I'm guessing you mean some other djb. :)
- gwu78 13y agoWell done. What language did you use to write it?
- abecedarius 13y agoC. I know, booorring; I just hate dealing with the x86 and haven't had occasion to work with ARM, etc. https://github.com/darius/tusl https://github.com/darius/tusl P.S. If Dan Bernstein did write a Forth, I'd like to see it.
- gwu78 13y agoThere is no such thing as an "exciting" computer language. But there's also no shortage of big, slow, verbose languages designed for dummies. Worse, these actually form the majority of the world's most popular computer languages. When juxtaposed against that state of affairs, the small, terse, fast, flexible languages which do not insult one's intelligence could seem "exciting". FORTH has that effect on me. Check IOCC. And let me know if you do get it to compile.
- metaobject 13y agoBigloo Scheme (among others) generates C code. I've used it on a few projects to process, reformat, and visualize some meteorology data and was pleased with the result. I know some other people that used it for other scientific application development (including 3D graphics) and it performed beautifully. One of my friends used Chicken Scheme to write some interesting web scraping tools. It also has the ability to compile to C.