It's really cool to see all of this interest in Forth. I think when I learned Forth, it made me a significantly better developer over all; it's also an awesome base for DSLs and really a fascinating paradigm.
Honest question, wouldn't you just write a lexer with yacc/bison for a DSL? How does a full programming language act as a base for a DSL, which is usually more limited than a programming language?
Starting Forth
21–30 of 71 posts
Re: Starting Forth
#22It's really cool to see all of this interest in Forth. I think when I learned Forth, it made me a significantly better developer over all; it's also an awesome base for DSLs and really a fascinating paradigm.
Honest question, wouldn't you just write a lexer with yacc/bison for a DSL? How does a full programming language act as a base for a DSL, which is usually more limited than a programming language?
Perhaps this article[1] can help answer the question (BTW, the title of the page belies its applicability). Check out Figure-1 specifically.
> How does a full programming language act as a base for a DSL, which is usually more limited than a programming language?
IMHO, this is what makes Forth both beautiful and mind bending, as Forth is a "full programming language" in which programs/systems written in it are expressed as a DSL defining the system itself. If that sounded recursive, then you're well on your way to grokking Forth :-).
Re: Starting Forth
#23It's really cool to see all of this interest in Forth. I think when I learned Forth, it made me a significantly better developer over all; it's also an awesome base for DSLs and really a fascinating paradigm.
Honest question, wouldn't you just write a lexer with yacc/bison for a DSL? How does a full programming language act as a base for a DSL, which is usually more limited than a programming language?
A good place to learn more (if you have some familiarity with Lisp) is: http://stackoverflow.com/questions/24282153/comparison-of-co...
I guess the other huge nice thing abort Forth for DSLs is that it is (unlike assembler or C), an interactive language, even on the most stripped down platforms (like bare bones $0.50 8-bit MCU stripped down), and still encourages the sort of REPL experimentation typically only seen in much much higher level languages. All of this comes at a big price though, in that the caliber of developer required to wield Forth in a sane manner tends to be very high.
Re: Starting Forth
#24Is Forth still being used in industry other than for legacy systems? (genuine question)
Re: Starting Forth
#25Earlier quoted context omitted.
Not much. Forth is from an era when it was hard to program small microcontrollers and the tools for doing so were expensive. Today, everybody cross-compiles to microcontrollers. I've done robotics programming in Forth. I do not expect to use it again.
What has the industry moved onto now?
But these days, embedded full Linux systems are just too cheap to not be the default option when you want to develop on the device itself.
Re: Starting Forth
#26Is Forth still being used in industry other than for legacy systems? (genuine question)
postscript is a dialect of forth http://hyperpolyglot.org/stack
Re: Starting Forth
#27I suspect this is something to do with different ways of conceptualising programs.
Re: Starting Forth
#28Forth seems to have one thing in common with Lisp: a small dedicated following that believe it's the way forward and considerably easier to learn, despite never really having taken off. I suspect this is something to do with different ways of conceptualising programs.
Re: Starting Forth
#29Forth seems to have one thing in common with Lisp: a small dedicated following that believe it's the way forward and considerably easier to learn, despite never really having taken off. I suspect this is something to do with different ways of conceptualising programs.