20

What are some real-world projects done in concatenative languages like Forth, Factor, Joy, etc.?

jub0bs
  • 60,866
  • 25
  • 183
  • 186
Vijay Mathew
  • 26,737
  • 4
  • 62
  • 93
  • 1
    Factor is a pretty great language, but don't even bother if you want to write GUI apps. There are no bindings for any popular GUI toolkits, and the one shipped with Factor is crap. – Rayne Nov 27 '09 at 01:18

8 Answers8

14

factorcode.org, concatenative.org and tinyvid.tv are powered by Furnace, a Factor web server and framework.

jfs
  • 16,758
  • 13
  • 62
  • 88
12

PostScript is concatenative, and there's obviously a huge number of applications of PostScript. It's just not a general purpose programming language.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
5

There is the somewhat-obsolete but very cool Quartus Forth for Palm which allowed full compiled application development on the Palm device (Forth as a minimalist language works rather well in those circumstances). Their home page lists several Palm apps.

This FIG page has a list of mostly-embedded projects including a reference to the very cool use of Forth by NASA.

I met a guy at an Apple conference in Queensland back in about 1991 who had retailed a road planning application written in MacForth.

Christopher Diggins was talking about his Cat language being used inside Microsoft to help optimise compilers but I don't know if that went anywhere.

I suspect PowerMOPS (the successor to Neon) may elude the definition of concatenative because its big deal is adding object-orientation, which implies instances.

Andy Dent
  • 17,578
  • 6
  • 88
  • 115
  • 1
    Sorry if I gave the wrong impression but Cat was never used at Microsoft. It could be used to help optimize compilers in theory, but I never saw anyone try to do that. – cdiggins May 02 '12 at 13:22
5

As Greg wrote, postscript is the mammoth example.

Concatenative languages pop up everywhere, quite naturally, because of the trivial nature of the language runtime. It's a favourite for many firmwares: I first encountered Forth "in the flesh" in the bootloader for a Sun Sparcstation. It powers the firmware for the OLPC.

Ocaml's parent, Caml was based on realising the semantics of functional programming as the Categorical Abstract Machine (the CAM in Caml).

Bibtex uses a concatenative language to compile style files.

Charles Stewart
  • 11,661
  • 4
  • 46
  • 85
  • How is CAM connected with concatenative languages? – ygrek Dec 29 '09 at 08:26
  • 1
    Take a look at http://ropas.snu.ac.kr/~pronto/seminar/20061027.pdf It's not quite trivial to realise the combinators of the CAM as a Forth dictionary, but I think it is doable, and certainly the spirit of the operational semantics is concatenative. – Charles Stewart Dec 29 '09 at 16:30
  • link is 404 now – ygrek Jan 31 '19 at 11:31
4

Take a look at FORTH Inc, They list several projects that they and their customers did, using their FORTH.

John R. Strohm
  • 7,547
  • 2
  • 28
  • 33
3

Part of the firmware on Macs (at least in the older PowerPC models) was written in Forth.

See: Link

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Dana
  • 32,083
  • 17
  • 62
  • 73
3

Eserv and nncron are written in SP-Forth.

ygrek
  • 6,656
  • 22
  • 29
3

Bitcoin protocol, and most of the other cryptocoins, uses pubkey scripts and signature scripts for validation of transactions:

Pubkey scripts and signature scripts combine secp256k1 pubkeys and signatures with conditional logic, creating a programable authorization mechanism.

These scripts are written in a concatenative language:

The script language is a Forth-like stack-based language deliberately designed to be stateless and not Turing complete. Statelessness ensures that once a transaction is added to the block chain, there is no condition which renders it permanently unspendable. Turing-incompleteness (specifically, a lack of loops or gotos) makes the script language less flexible and more predictable, greatly simplifying the security model.

enrique
  • 492
  • 3
  • 11