Live data from Hacker News

Forth: The Hacker’s Language

hackaday.com

31–40 of 111 posts

Re: Forth: The Hacker’s Language

#31
post #9

This is a how-to-write-a-FORTH tutorial that I wrote a few years ago. It's particularly nice that you get to see how various control structures are implemented, like IF, CASE and even comments! Part 1: http://git.annexia.org/?p=jonesforth.git;a=blob;f=jonesforth... Part 2: http://git.annexia.org/?p=jonesforth.git;a=blob;f=jonesforth... (github mirror: https://github.com/AlexandreAbreu/jonesforth/blob/master/jon... ht…

This is one of my favorite pieces of code, and absolutely the coolest having to do with Forth.

Thanks!

Re: Forth: The Hacker’s Language

#32
post #24

Earlier quoted context omitted.

As multiple people have pointed out, GreenArray chips are basically TIS-100 IRL, but in Forth. Right down to the quirky design.

Never heard of TIS-100 (you mean http://www.zachtronics.com/tis-100/ ?)

Yes.

Re: Forth: The Hacker’s Language

#33

Earlier quoted context omitted.

That sounds about right. I've already linked it, but yosefk's take on the subject ( http://yosefk.com/blog/my-history-with-forth-stack-machines.... ) is worth reading, assuming that you've been living under a rock, and thus haven't already.

As a matter of fact, I have been living under a rock, and thus greatly appreciate your share!

Well, good to know I've been of use to at least one person today...

Re: Forth: The Hacker’s Language

#34

Earlier quoted context omitted.

The more likely culprit is this: > But Forth is also like a high-wire act; if C gives you enough rope to hang yourself, Forth is a flamethrower crawling with cobras. There is no type checking, no scope, and no separation of data and code. You can do horrible things like redefine 2 as a function that will return seven, and forever after your math won’t work. (But why would you?) You can easily jump off into bad sectio…

I kinda guessed that forth was an amplifier for one mind rather than a team building exercise. But I'm still curious about which company is using Forth, who are the devs, etc etc

I've wanted to use Forth IRL for ages, but have no good use case for the problems I solve

Re: Forth: The Hacker’s Language

#35
post #26

I'm a embedded software dev and write code all day in C. Sure enough forth comes up in conversations once in a while as does other ideas like Python, JS, Lua etc.. Of all the alternatives to C, Forth is the only one which groks hardware. This is particularly important for embedded development. Any realistic alternative to C must understand interrupts, memory mapped registers etc.. Forth is the only one in which this…

> Forth is the only one in which this is possible. Every other example I've seen always uses C for "low-level" access or a libraries. If you need to do that, then you won't win over embedded devs like me. Not really. https://www.mikroe.com/mikrobasic/ https://www.mikroe.com/mikropascal/ http://www.astrobe.com/default.htm http://www.adacore.com/gnatpro/embedded http://www.ptc.com/developer-tools/apexada http://www.ghs…

Is there any reason he would have heard of those? They're all pretty fringe, arguably moreso than Forth, for some of them.

Some of these do look neat: I've had an interest in both Ada and Oberon, although I haven't been able to get over the verbosity and unpleasant syntax of either (it's not COBOL, or anything, but it's not nice).

OTOH, I am immediately suspicious of any product that claims it's professional and also has BASIC in the name...

Re: Forth: The Hacker’s Language

#36

There is a decent amount of Forth publications out there, but nothing that really takes you from A->Z in building your own Forth based off of Assembly or C. JonesForth helped me conceptually understand parts of Forth, but there is a lot missing there for me to be able to start from scratch. I would pay $ for a real book in the vein of "Land of Lisp" that shows you how to build a Forth compiler/editor and how to exten…

tLoL doesn't really do that. I think you might be thinking of Build Your Own Lisp (And Learn C), another excellent book.

Re: Forth: The Hacker’s Language

#37

Earlier quoted context omitted.

I kinda guessed that forth was an amplifier for one mind rather than a team building exercise. But I'm still curious about which company is using Forth, who are the devs, etc etc

I've wanted to use Forth IRL for ages, but have no good use case for the problems I solve

If you want to build an SBC, than Forth is the language to write that code in.

Re: Forth: The Hacker’s Language

#38
post #27

Why do you think some of the so-called hacker languages were pretty popular at a time (perl, lisp), and not the others (forth, apl?)

There was no Internet and knowledge was shared via magazines and computer clubs. Forth was quite popular in Europe thanks to Jupiter Ace and ZX Spectrum extensions. https://en.wikipedia.org/wiki/Jupiter_Ace http://www.worldofspectrum.org/infoseekid.cgi?id=0008717

That's true. And APL and its children is still quite popular in finance.

By the way, I found a rather neat page about building a Jupiter ACE: http://searle.hostei.com/grant/JupiterAce/JupiterAce.html

Re: Forth: The Hacker’s Language

#39

Why do you think some of the so-called hacker languages were pretty popular at a time (perl, lisp), and not the others (forth, apl?)

For Forth, that's an easy answer: when you think "hacker" you're thinking of people working on the Big Iron. Forth's niche was small machines, so while it had a good bit of popularity on the micros, its influence on the mainframe hackers, with their "we hate micros" ethos, was minimal.

Re: Forth: The Hacker’s Language

#40
post #26

Earlier quoted context omitted.

> Forth is the only one in which this is possible. Every other example I've seen always uses C for "low-level" access or a libraries. If you need to do that, then you won't win over embedded devs like me. Not really. https://www.mikroe.com/mikrobasic/ https://www.mikroe.com/mikropascal/ http://www.astrobe.com/default.htm http://www.adacore.com/gnatpro/embedded http://www.ptc.com/developer-tools/apexada http://www.ghs…

Is there any reason he would have heard of those? They're all pretty fringe, arguably moreso than Forth, for some of them. Some of these do look neat: I've had an interest in both Ada and Oberon, although I haven't been able to get over the verbosity and unpleasant syntax of either (it's not COBOL, or anything, but it's not nice). OTOH, I am immediately suspicious of any product that claims it's professional and also…

Ada is not fringe. It's used by many large companies, although less and less these for new projects these days. There are some huge Ada codebases being maintained in industry, particularly in the aviation industry.
Post reply on HN