
Starting Forth - After yesterday's Prolog post, another awesome language - iuguy
http://home.iae.nl/users/mhx/sf.html
======
spc476
For a real mind blowing experience, you should also read _Thinking Forth_
(<http://thinking-forth.sourceforge.net/>) also by the same author. It was one
of two books that radically changed how I write programs (the other one being
_Writing Solid Code_).

------
hvs
Forth is among the languages that every developer should learn, even if they
never use it in a production environment. It will definitely make you think a
little differently. It's as if lisp and assembly language had a child.

On another note, it is REALLY easy to write completely incomprehensible
spaghetti code in Forth. You really have to be disciplined or you'll end up
with a lot of "write-once" code.

------
iuguy
I thought after yesterday's Prolog post went down quite well I'd try
introducing those of HN who haven't experienced it to Forth, a stack-based
language that I loved as a child for it's extensibility (given at the time my
alternative was BASIC or Z80 ASM I hope you'd understand). Older Mac users
might not know this but your Open Boot firmware contains a fairly reasonable
Forth interpreter built in.

Anyway, I hope you enjoy Forth as much as I did.

 __EDIT __: Brain fart, wrote stackless when I meant to write stack based,
sorry.

~~~
kenjackson
I always wanted to learn Forth, as there was a Forth compiler available on the
Commodore Vic-20. Thanks for the reminder and the link. :-)

~~~
iuguy
It wasn't this by any chance?
[http://www.zimmers.net/anonftp/pub/cbm/vic20/roms/tools/8k/V...](http://www.zimmers.net/anonftp/pub/cbm/vic20/roms/tools/8k/Vic%20Forth%201.10.prg)

You should be able to load this into VICE (<http://www.viceteam.org/>) and
start hacking away. Hope this helps.

~~~
kenjackson
Honestly, I don't remember. I never used it. I just used to see it in Compute!
magazine. But this looks cool. Never had seen VICE before either.

------
jallmann
[http://chargen.matasano.com/chargen/2009/1/10/applicable-
les...](http://chargen.matasano.com/chargen/2009/1/10/applicable-lessons-from-
the-embedded-world-aka-forth-rules.html)

Some crazy stuff that you could do with Forth. The author shows how you can
inject a forth VM in shellcode and build exploits on top of that.

------
primodemus
Minimal FORTH compiler and tutorial : <http://www.annexia.org/forth> Lambda
the Ultimate thread: <http://lambda-the-ultimate.org/node/2452>

~~~
maximilianburke
Jones Forth is awesome because it isn't just a great way to learn Forth but
also a great way to learn assembly programming. A couple years ago I did a
rather crude, hurried, and unoptimized port of Jones Forth to the Cell
processor's vector units. Initially I intended it to be an April Fool's gag
for my group at work but I came away with a much better knowledge of the
underlying architecture.

------
dugmartin
If Forth intrigues you check out Factor:

<http://factorcode.org/>

~~~
wwortiz
The only thing factor is missing is a book/tutorial/better example docs.

The current documentation is top notch though and you can learn a lot if you
look through the factor blogs (or read a forth book)

Link to factor blogs: <http://planet.factorcode.org/>

------
fogus
Here is a simple Forth implementation in Ruby.

<https://github.com/fogus/rforth>

~~~
pdelgallego
Just for those that are interested in lear how to implement a forth compiler
or even just a compiler, this [1] is a step by step tutorial on how forth is
implemented. The tutorial is a extremely well commented code file that you can
run.

[1] <http://www.annexia.org/_file/jonesforth.s.txt>

------
ctdonath
"yesterday's Prolog post"

Link for those of us not following HN 24/7?

~~~
spicyj
<http://news.ycombinator.com/item?id=1976127>

------
andybak
I learnt Forth as a kid.
(<http://www.worldofspectrum.org/infoseekid.cgi?id=0008967> plus Acorn Forth)

What blew my mind was that - apart from a tiny kernel - Forth was written in
Forth. It bootstrapped itself from basic principles. It's kind of the
Principia Mathematica of programming languages...

------
coliveira
For people using windows, an excellent free Forth is
win32forth.sourceforge.net. One can even write graphical apps with it.

------
misterm
Is anyone still using this in a production environment? I don't think I've
ever seen a language like this one before.

~~~
silentbicycle
FreeBSD's boot loader uses a dialect of forth.

Forth makes MUCH more sense in an embedded context, IMHO.

~~~
VladRussian
>Forth makes MUCH more sense in an embedded context, IMHO.

Forth is just unbeatable in an embedded context. Minimal porting of a few
basic words and you're up and running with fully functional environment you
can adjust on-the-fly.

