Settings

Theme

Ask HN: Who are using Forth language on a daily basis and for which tasks?

19 points by yugene 5 years ago · 3 comments


gupe 5 years ago

I've been spending the past several months writing the server-side code of a web-app, which aims to improve the way in which certain difficult-to-price goods are valued. We're on the verge of launching the tool, and before that happens, I shouldn't be too much more specific about it. In any case, the server functionality is almost exclusively written in FORTH, a language for which I have a great affinity, stemming from the days when I first programmed my (stack-based) HP 48GX calculator as an undergraduate electronic engineering student. My experience in doing this has been almost exclusively pleasurable and satisfying (and nostalgic). Having tried various options, I opted to use a rather minimal forth, pForth, and so I needed to write a number of my own libraries, including ones for hash-tables, ones for handling the data files I required, ones for ways to communicate over WebSockets, and many others. The code-base is remarkably small, and it's been a stimulating experience.

(I'm responsible for the browser-side code too, and this is written in a Scheme, biwascheme, which is so much nicer than having to use Javascript, in my opinion.)

Along the way, I've created various other shell-script utilities in pForth for other purposes, which always rival the speed I'm used to getting from using AWK—mwak, specifically—which has always been impressively fast when handling large amounts of data.

Me being the only coder on this project is why I've been able to get away with indulging in this peculiar, but vastly under-appreciated, language!

  • tdeck 5 years ago

    In the future it would be great to see a retrospective on your experiences with the language and tooling. I would be particularly interested in how it goes if/when you begin to add more teammates and what strategies help make a FORTH program more maintainable. For instance, do you write tests? What's a good strategy for testing FORTH? I've written some toy programs but never a unit test :)

  • yugeneOP 5 years ago

    Thank you for sharing your story. I agree it would be interesting to look into the more details in the future. Using Scheme instead of Javascript sounds fascinating too. Did you have a chance to compare Forth to other stack-based languages, with some opinion as a result?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection