News for hackers. Stuff that matters.
Re:Forth: The Hacker’s Language (2017) by wry_discontent on Tuesday September 03, 2019 @11:50AM (#20867776)
I don't get it. Who's using this, and for what?
Re:Forth: The Hacker’s Language (2017) by aidenn0 on Tuesday September 03, 2019 @12:52PM (#20868498)
I don't use forth personally, but it is at a very interesting corner of the envelope.

I find it both easier to implement than C and easier to develop in than C, while being nearly as fast as C, and often lower footprint than C. It's a really good language for "I really don't want to write in assembly, but there are no decent HLLs already implemented for my target"

Re:Forth: The Hacker’s Language (2017) by 6thaccount2 on Tuesday September 03, 2019 @01:26PM (#20868849)
Forth in general is mainly used in situations where one is in close contact with the hardware (Assembly and C are the usual competitors).

It basically lets you string together a bunch of primitives and user defined functions using a stack. It is probably the only system that is useful where a single person can understand the entire language and implementation. You have to build everything yourself though.

Re:Forth: The Hacker’s Language (2017) by kjs3 on Tuesday September 03, 2019 @01:54PM (#20869170)
It's a good option for embedded, especially low resource embedded, applications. Provides a nicer set of abstractions than assembler and let's you create basically a tuned DSL for your problem. That said, development doesn't scale particularly well, multi-member dev teams are hard, and maintenance of someone else's code can be, shall we say, challenging.

I always wondered how Sun and Apple addressed this, as they used forth in the form of OpenBootPROM as a boot environment on various platforms. Very, very nice.

Re:Forth: The Hacker’s Language (2017) by AdieuToLogic on Tuesday September 03, 2019 @02:04PM (#20869307)
I always wondered how they scaled their firmware teams myself. Really impressive stuff though:

https://www.openfirmware.org/Open_Firmware

https://www.openfirmware.org/Forth/FCode

Re:Forth: The Hacker’s Language (2017) by kjs3 on Tuesday September 03, 2019 @02:46PM (#20869779)
Another interesting example for those looking for a Forth rabbit hole is the Cannon Cat (http://www.canoncat.org/) from Jef Raskin's (of Mac fame) team.

On the (much) lower end was the Jupiter Ace (https://jupiter-ace.com/jupiterace/). The Ace is a fun what-might-have-been where Forth beat BASIC for the '80s PC soul. There were commercial Forths for other PCs of the time (Apple II, Atari 800, TI99), but I guess because they were extra cost, they didn't become that popular.

Re:Forth: The Hacker’s Language (2017) by fortran77 on Tuesday September 03, 2019 @12:44PM (#20868401)
PostScript, which was once widely used, had a lot of Forth-like concepts in it and was stack based.
Re:Forth: The Hacker’s Language (2017) by WalterGR on Tuesday September 03, 2019 @02:01PM (#20869267)
PostScript, which was once widely used

in academia. Not outside.

In fact, I don’t think I’ve ever seen a .ps file that wasn’t hosted on a .edu domain (or other countries’ equivalents.)

Re:Forth: The Hacker’s Language (2017) by emptybits on Tuesday September 03, 2019 @06:25PM (#20871880)
Hosting public PS files may be an academic thing. But commercial use wasn't rare. I did PostScript programming for Xerox Research briefly in the late 1980s.

I needed to do batches of mathematical and optical analysis of novel materials synthesized in their labs. This demanded conditional logic, statistical analysis, layout, rasterizing, and archival of results. A single PostScript file did all of the above, with handwritten and template-generated code that ran on the output device, typically a printer. Weird choice of language, maybe; I was a lone computing nerd in a lab of mad chemists. But for rapid prototyping and always having presentable results as the analysis evolved, PostScript ended up being really easy to use.

Looking back 30 years now, I think it was also impressive that it was device independent, readable and commented code, with numeric data embedded like a heredoc. I haven't seen those docs or PostScript code for decades but it wouldn't surprise me if they ran on a PostScript device or viewer today.

Anyways, commercial use of PostScript happened, if mostly internally. At that workplace it was a known and reasonable document format to distribute.

Re:Forth: The Hacker’s Language (2017) by AdieuToLogic on Tuesday September 03, 2019 @03:57PM (#20870529)
>> PostScript, which was once widely used

> in academia. Not outside.

NeXTSTEP utilized "Display PostScript"[0] for both printing and display. Apple's Cocoa can trace direct ancestry to frameworks originating in NeXTSTEP[1]. I am pretty sure this included use of PostScript in the display/printing frameworks as well, but do not have references to support that memory.

So, while '.ps' files are not often seen in the wild, as you say, a strong case can be made that PostScript was once (if not currently) widely used.

0 - https://www.oreilly.com/library/view/learning-cocoa-with/059...

1 - https://arstechnica.com/gadgets/2012/12/the-legacy-of-next-l...

Re:Forth: The Hacker’s Language (2017) by WalterGR on Wednesday September 04, 2019 @11:53AM (#20878396)
NeXTSTEP

I would argue that’s not widely used.

Apple's Cocoa can trace direct ancestry to frameworks originating in NeXTSTEP

Not sure ancestry counts.

printing

Ah, fair point, thanks. I had forgotten about that.

My original claim is incorrect.

Re:Forth: The Hacker’s Language (2017) by bitwize on Tuesday September 03, 2019 @02:14PM (#20869419)
That's kind of like saying MIDI was never widely used because you only ever saw MIDI files used to play tinny soundcard music on someone's GeoShitties site back in the day. MIDI is much more a control protocol than a file format, and it was and is used as such throughout professional music production.

Similarly, PostScript was the control language for high-end printers back in the day, so it was used extensively as the final output format for print, even if it was rarely saved off as a .ps file.

Re:Forth: The Hacker’s Language (2017) by yellowapple on Tuesday September 03, 2019 @04:00PM (#20870563)
A substantial minority (if not majority) of standard (i.e. not special-purpose) printers speak PostScript, and PDFs are a subset of it. Not sure how much more "widely used" you expect it to be :)
Re:Forth: The Hacker’s Language (2017) by lordgrenville on Tuesday September 03, 2019 @12:03PM (#20867922)
Just one example from the post is microcontrollers. There's an implementation for Arduino.