4 ms·
I learned Snobol and then wrote a toy Forth
- cafard 1y agoI learned Snobol in school. It came in handy when I later encountered awk and then Perl.
- sargstuff 1y ago?? 2 or 4 horse open sleigh project ??
- JSR_FDED 1y agoI love this! SNOBOL is weird but the article does a great job showing the power of a small but very uniform and consistent language.
- throwaway71271 1y agoR. G. Loeliger Threaded Interpretive Languages Their Design And Implementation[1] is an amazing book, since it was out of print, I printed it on a good 160gsm a4 paper, and I randomly open it every few weeks just to read through it. I strongly recommend it, even if you are not interested in Forth. I have been programming in all kinds of languages, from assembly to clojure, but in 25 years I never programmed stack languages, I was kind of scared of them, it wasn't until I read the book and made my own Forth I understood what I was missing. Since then I made few interpreters, with jit, or with types, etc, it was super fun, but most of all it allowed me to see a completely new paradigm of programming, kind of the first time you understand eval/apply from 13th page of the LISP 1.5 Programmer's Manual. A language that writes itself and it is written in itself. If you are making your own Forth, this Brad Rodriguez's article is also really good [2]. [1]: https://archive.org/details/R.G.LoeligerThreadedInterpretiveLanguagesTheirDesignAndImplementationByteBooks1981 https://archive.org/details/R.G.LoeligerThreadedInterpretive... [2]: https://www.bradrodriguez.com/papers/moving1.htm https://www.bradrodriguez.com/papers/moving1.htm
- bwfan123 1y agoBack in the day, iirc sun workstations booted into forth as a rommed boot-monitor for hw diagnostics. Is forth around anymore in practical use ?
- throwaway71271 1y agowell there is https://collapseos.org/ https://collapseos.org/ :)
- packetlost 1y agoI recall a RedoxOS developer mentioning they were using a FORTH in the bootloader or some other very low level piece of that project. FORTH is the type of thing that probably exists all over the place but it's so deep and arcane that you would never know it.
- yjftsjthsd-h 1y agoLast I looked FreeBSD was using FORTH in their bootloader
- deleted 1y ago[deleted]
- Jtsummers 1y agoOpen Firmware: https://en.wikipedia.org/wiki/Open_Firmware https://en.wikipedia.org/wiki/Open_Firmware OpenBOOT: https://openfirmware.info/OpenBOOT https://openfirmware.info/OpenBOOT That second link has a link to a git repository and you can see the forth code there.
- mananaysiempre 1y agoThe original author of (that first implementation of) Open Firmware, Mitch Bradley[1], is still active on GitHub and in particular in Forth-specific discussions, by the way. [1] https://github.com/mitchbradley https://github.com/mitchbradley
- dang 1y agoRelated to that first link: Threaded Interpretive Languages (1981) [pdf] - https://news.ycombinator.com/item?id=17227466 https://news.ycombinator.com/item?id=17227466 - June 2018 (1 comment) and to the second link: Moving Forth (1993) - https://news.ycombinator.com/item?id=26900401 https://news.ycombinator.com/item?id=26900401 - April 2021 (7 comments) Moving Forth, Part 1: Design Decisions in the Forth Kernel (1993) - https://news.ycombinator.com/item?id=10949339 https://news.ycombinator.com/item?id=10949339 - Jan 2016 (5 comments)
- deleted 1y ago[deleted]
- oytis 1y agoAre there any non-toy implementations of Forth?
- quasidasimagasi 1y agoI guess this is supposed to be some kind of trolling, nonetheless: mecrisp is great and definitively no toy.
- larsbrinkhoff 1y agoIn fairness, there's an over abundance of toy Forths. And I say that as a fan and professional Forth programmer.
- deleted 1y ago[deleted]
- haolez 1y agoThere are probably several, but I had contact in the beginning of my career with a company that made industrial printers. They said that, in the first years of the company (80s), adopting FORTH gave them an edge over the competitors and it was the main (tech) factor of their success. They implemented their firmware in FORTH with some PostScript wizardry as well.
- rwmj 1y agogforth (https://www.gnu.org/software/gforth/ https://www.gnu.org/software/gforth/) is non-toy, although at the same time I'm not aware of commercial products that might use it.
- deleted 1y ago[deleted]
- MaxBarraclough 1y agoGforth and pForth [0] are the usual Free and Open Source go-to Forths. Gforth is quite good at pointing out silly mistakes in your code. Unfortunately Gforth doesn't have great Windows support, and neither of them have very strong FFI. There are a number of proprietary payware Forths for desktop/server: vfxForth, [1] SwiftForth, [2] and iForth. [3] There are also various Forths for all sorts of embedded platforms, many of them FOSS. [0] https://github.com/philburk/pforth https://github.com/philburk/pforth [1] https://vfxforth.com/ https://vfxforth.com/ [2] https://www.forth.com/swiftforth/ https://www.forth.com/swiftforth/ [3] https://iforth.nl/ https://iforth.nl/
- jollyllama 1y agoUpvote for Ratfactor who made the most useful HTMX reference around (even though it wasn't completed) https://ratfactor.com/htmx/ https://ratfactor.com/htmx/
- geophile 1y agoSnobol was a major part of my formative years in computer science. I don’t recall how I came across the language, but it spoke to me in all sorts of ways. - Elegant and weird syntax and structure. - Powerful pattern matching. - It was the first GCed language I used. - The Griswold, Poage and Polonsky book on Snobol4. A classic in the K&R mold, to my mind. - Took 2 compiler courses from RBK Dewar who worked on the Spitbol implementation. Great teacher, fantastic courses, with lots of insight into the Spitbol project and his research on the SETL language. - Wrote software for my MSc thesis in Snobol4. It used so much memory that I had to book the school’s IBM 370 at 4AM to run the software. I think I got something like 1-2 MB of memory.
- nlte 1y agoDoes anyone know what is that cool little computer on the picture?
- Jtsummers 1y agoMNT Pocket Reform https://ratfactor.com/mnt-pocket-reform/ https://ratfactor.com/mnt-pocket-reform/
- blizdiddy 1y agoPaying over $1000 for an rk3588 that lasts 4 hours, with glitchy wifi, bluetooth, and charging?! $500 for the SoC module alone, despite the fact that Chinese companies can put that same chip in a $200 handheld. It’s a shame that China is so singularly capable at making things
- ktallett 1y agoIt is fully open source and can be rebuilt entirely yourself using the given design files. You are comparing two vastly different items.
- kaycebasques 1y ago(Tangential) On a recent roadtrip up to Portland from SF I stopped in a small historic mining town near Shasta called Dunsmuir. They had a Little Free Library so of course I had to check out what was in it. I was delighted to find an old book on Forth from the 80s, called Starting Forth. Inside of the book there were some business cards for FIG: Silicon Valley Forth Interest Group.
- macintux 1y agoI was pleasantly surprised to discover that my favorite technical writer, W. Richard Stevens (RIP), long ago wrote a Forth manual for Kitt Peak Observatory. It can be found here: https://www.forth.org/tutorials.html https://www.forth.org/tutorials.html
- Animats 1y agoSNOBOL is a high level string processing language. Forth is an odd thing to implement in it. Forth is so low level you can implement it in an FPGA. SNOBOL has patterns more powerful than regular expressions. The pattern matching can take exponential time, because it's a depth first search in a recursive space. Regular expressions, which have very limited backup, were adopted to put an upper bound on pattern match time.
- ebiester 1y agoIf you like Snobol, I'd take a look at Icon, Griswold's research language after Snobol. It took a lot of the ideas but smoothed it out. I remember writing the Icon string manipulation in java in college, and I've hated regular expressions for a long time because Icon had it right, albeit verbose.
- twoodfin 1y agoIcon also provided GvR with the inspiration for Python’s generators: https://www.linuxjournal.com/article/5948 https://www.linuxjournal.com/article/5948 I had a period where I studied a new, obscure programming language almost daily; Icon stood out as one of the most interesting & relevant from a modern perspective.
- mananaysiempre 1y agoIcon frequently gets mentioned that way, yes, but I feel that’s something of a disservice to it: it’s much weirder and more fun than you’d think looking at Python’s yield. One wouldn’t think a reasonable imperative language would have new things to say about basic control-flow constructs; one would be wrong.
- anthk 1y agoCheck Starting Forth, Thinking Forth plus Eforth+Subleq.
- dang 1y agoSNOBOL-related. Others? Eliza in SNOBOL4 - https://news.ycombinator.com/item?id=41889284 https://news.ycombinator.com/item?id=41889284 - Oct 2024 (24 comments) Spitbol 360: an implementation of SNOBOL4 for IBM 360 compatible computers - https://news.ycombinator.com/item?id=38234319 https://news.ycombinator.com/item?id=38234319 - Nov 2023 (6 comments) SNOBOL (“StriNg Oriented and SymBOlic Language”) - https://news.ycombinator.com/item?id=35800936 https://news.ycombinator.com/item?id=35800936 - May 2023 (56 comments) The SNOBOL4 Programming Language [pdf] - https://news.ycombinator.com/item?id=23345560 https://news.ycombinator.com/item?id=23345560 - May 2020 (6 comments) SNOBOL4 - https://news.ycombinator.com/item?id=22233111 https://news.ycombinator.com/item?id=22233111 - Feb 2020 (1 comment) Parsing with Snobol - https://news.ycombinator.com/item?id=20401576 https://news.ycombinator.com/item?id=20401576 - July 2019 (1 comment) Dave Shields, the programmer maintaining SPITBOL - https://news.ycombinator.com/item?id=10211724 https://news.ycombinator.com/item?id=10211724 - Sept 2015 (23 comments) SnoPy – Snobol Pattern Matching Extension for Python - https://news.ycombinator.com/item?id=10106008 https://news.ycombinator.com/item?id=10106008 - Aug 2015 (10 comments) On being the maintainer and sole developer of SPITBOL (2012) - https://news.ycombinator.com/item?id=10103276 https://news.ycombinator.com/item?id=10103276 - Aug 2015 (95 comments)
- OhMeadhbh 1y agosnobol and spitbol are awesome. as is forth. +1.
- gitroom 1y agopretty cool seeing someone deep dive into the super niche stuff tbh, got me thinking - you reckon picking up oddball languages like that changes the way you even approach writing code later on?