News for hackers. Stuff that matters.
Re:My Life as a Forth Interpreter (1986) [pdf] by etfb on Sunday March 16, 2014 @07:02PM (#7411797)
For context: the Computer Language magazine in the 1980s had a tradition of April Fools editions. This is from one of them, before they got too serious, changed their name to Software Development magazine, and blazed the way for Dr Dobbs into oblivion.
Re:My Life as a Forth Interpreter (1986) [pdf] by bit-player on Monday March 17, 2014 @12:20PM (#7416008)
Apologies to the HN community.

I'm the author of the story linked to here. I'm also the jerk who pulled it off the web when I thought my site was getting the DDoS treatment. Mea culpa.

Re:My Life as a Forth Interpreter (1986) [pdf] by TazeTSchnitzel on Sunday March 16, 2014 @07:45PM (#7411963)
That was brilliant. Now, how about "My Life as a Haskell Interpreter"?
Re:My Life as a Forth Interpreter (1986) [pdf] by eru on Monday March 17, 2014 @03:47AM (#7413685)
That would be interesting. And the cliff from Outer Interpreter to Compiler (instead of Inner Interpreter) would be even steeper.
Re:My Life as a Forth Interpreter (1986) [pdf] by brianobush on Sunday March 16, 2014 @07:59PM (#7412020)
anyone have a copy? link is dead.
Re:My Life as a Forth Interpreter (1986) [pdf] by kevinchen on Sunday March 16, 2014 @10:04PM (#7412463)
Scribd seems to have it cached. Link reproduced here for convenience: http://www.scribd.com/doc/212732047/Untitled?secret_password...
Re:My Life as a Forth Interpreter (1986) [pdf] by dimitar on Sunday March 16, 2014 @04:36PM (#7411145)
Wow, can someone explain this story? Its hard to follow if you are not a forth hacker.
Re:My Life as a Forth Interpreter (1986) [pdf] by Someone on Sunday March 16, 2014 @05:36PM (#7411434)
The tokens coming in are the tokens from the user's ("Him") input. The outer interpreter is what translates those tokens into actions to perform. The inner interpreter performs those actions.

In a Forth, both the inner and the outer interpreter are extremely simple. The story describes them in detail.

Outer interpreter: look up token in dictionary/dictionaries. If found, instruct inner interpreter to execute it by giving it the address of the function that the token describes. If not found, try interpreting the word as a number in the current base. If that succeeds, push the number on the stack. If it fails, signal an error and clear some state.

Inner interpreter: start reading at the address supplied. Recursively interpret every word read as address of another function until encountering a 'end of function' marker.

Leo Brodie's variant of this story doesn't use the terms inner and outer interpreter because it was written before the names were invented, but it may be instructive, anyways: http://www.forth.com/starting-forth/sf1/sf1.html

Re:My Life as a Forth Interpreter (1986) [pdf] by raverbashing on Sunday March 16, 2014 @05:49PM (#7411526)
So the inner interpreter is a VM of some sort?

Outer interpreter looks like exactly that, an interpreter (as opposed to a compiler)

Re:My Life as a Forth Interpreter (1986) [pdf] by Someone on Sunday March 16, 2014 @06:19PM (#7411648)
Yes, it has been described as such. A main difference/interesting property of this VM is that end users write programs in Forth by extending the VM's instruction set (= the set of dictionary definitions). While in interpreted mode or at compile time (i.e. when the user types words in the terminal), the instruction lookup is slow, through one or more linked lists. At run time, definitions simply consist of lists of pointers to other functions.
Re:My Life as a Forth Interpreter (1986) [pdf] by nocoment on Sunday March 16, 2014 @05:23PM (#7411362)
It looks like an introduction to FORTH via Kafka..

There is a nice browser interpreter here: http://forthfreak.net/jsforth80x25.html

you can start with: 1 1 + . (+ adds, . prints and this is clearly reverse polish notation)

FORTH is in essence an accumulator CPU like the 68000, except it has an easier abstraction to define new instructions (aka "Words") to act like the + or . above.

Re:My Life as a Forth Interpreter (1986) [pdf] by emeraldd on Sunday March 16, 2014 @07:05PM (#7411813)
Is that another term for a stack machine? I haven't heard of an accumulator cpu before ...
Re:My Life as a Forth Interpreter (1986) [pdf] by nocoment on Sunday March 16, 2014 @08:09PM (#7412057)
A CPU with an accumulator register (default locations that accepts the result for each instruction and is usually one of the operands in each new instruction.)

I guess that is a bit less capable than an actual stack machine like FORTH but sort of the starting point of this programming mentality (at least as I think of it.)

Re:My Life as a Forth Interpreter (1986) [pdf] by davidw on Sunday March 16, 2014 @05:19PM (#7411337)
Re:My Life as a Forth Interpreter (1986) [pdf] by shellehs on Sunday March 16, 2014 @09:32PM (#7412362)
I'm too late. It's 403 now.

> You don't have permission to access /wp-content/extras/bph-publications/CompLang-1986-04-Hayes-Forth.pdf on this server.

The site shows.

Re:My Life as a Forth Interpreter (1986) [pdf] by mthq on Sunday March 16, 2014 @09:45PM (#7412399)
The site owner thinks he is being DDOS'ed: http://bit-player.org/2014/net-pests/
Re:My Life as a Forth Interpreter (1986) [pdf] by bit-player on Sunday March 16, 2014 @10:13PM (#7412492)
I'm the site owner. It's open again, temporarily. Somebody's script has multiple machines (many are EC2 instances) downloading the same file many times per second. That's not something I want to encourage.
Re:My Life as a Forth Interpreter (1986) [pdf] by NoodleIncident on Monday March 17, 2014 @02:45AM (#7413511)
Interesting. I suppose an automated DDoS of everything on the hackernews front page isn't impossible.

Are there other explanations? Scribd definitely got it automatically at least once, maybe they do it too many times? How many HN users use EC2-based proxies?

Re:My Life as a Forth Interpreter (1986) [pdf] by zem on Sunday March 16, 2014 @10:43PM (#7412586)
very nicely done indeed.