6 ms·
I'm a forth programmer, I've implemented an editor in forth, a more(1) clone in forth, a grep(1) in forth and I did a bunch of stuff I've forgotten in forth for
by luckydude 9y ago
I'm a forth programmer, I've implemented an editor in forth, a more(1) clone in forth, a grep(1) in forth and I did a bunch of stuff I've forgotten in forth for the geophysics department at UW Madison.
I HATE forth. It's a miserable language, I just hate it.
And then I went to Sun and the boot prom language was forth, still hated it.
Then I got to PCs. The BIOS had no language and then Intel did whatever garbage they did and I was like please, just give me Forth. It's not what I'd do for debugging a panic but I could make it work. The Intel stuff was way worse.
I suspect that Mitch priced himself out, otherwise we'd all be using Forth as the boot language, I dunno what happened. But if you had asked me 20 years ago would I be saying anything positive about forth I would have kicked you in the XXXs. Yet here I am wishing that forth was how we dealt with a panic. We'd all be happier.
- deleted 9y ago[deleted]
- luckydude 9y ago[I'm sticking this here because there was a dude who said this was a good reply and I tried to reply to him and HN say s his post was deleted. I don't know why, his post seemed pretty reasonable to me, he was asking if forth was a good boot loader. Shrug.] I don't for a minute think that forth is the best answer, it's an awful answer. Even lisp, which I hate with a passion, would be a better answer because more people have experience in lisp than forth. Forth is just less shitty than what Intel came up with, I think it was part of EFI, it's amazingly bad. I've designed a few programming languages and I'm not good at it, but holy crap, I could be drunk and come up with a better answer than Intel did. Forth is just a crappy language but it's less crappy than what Intel did. The idea that Forth is somehow special for boot loaders is nuts. There is nothing, that I know of, that makes forth somehow magical for that. What you want for the bootloader, and for the debugger that you drop into when there is a panic, is something like C but interpreted. You want to be able to walk a linked list of page table structures. And to its credit, Sun's forth could do that. It's sort of twisted to think it could but it did, there were forth words that did all sorts of kernel magic. I think that the magic of forth was that it was tiny, back 30 years ago you didn't want to have a lot of storage for your debugger. That's not the case today, if someone made the case that they could make things better, here you go, here's a gig of storage. That's a little crazy but still. Forth was cool when a meg of storage was a crazy amount. We can do better. Intel pushed us backwards, Forth would be a step forwards, but man, I'd take python or Tcl (because then I'd get my pet language L, http://little-lang.org http://little-lang.org) or even perl as a better boot language. Froth has no special boot sauce in my opinion. It was just small.
- luckydude 9y agoI do wonder why someone at HN decided that to stomp on the guy who was asking about forth as bootloader. Didn't seem weird at all to me. HN? Care to explain? Did I miss something?
- deleted 9y ago[deleted]
- dang 9y agoAs I explained at https://news.ycombinator.com/item?id=16719808 https://news.ycombinator.com/item?id=16719808, no one at HN touched the comment. It's deleted because the person who wrote it chose to delete it. Why? No idea. You'd have to ask them.
- exikyut 9y agoThat raises a tricky (perhaps philosophical-meta) question: whether deleted questions should keep the username visible. I can't ask the person who deleted the question, because I don't know who they were.
- jacobush 9y agoThe special sauce was that it was tiny, that was not only important, it was imperative back when EPROMs ruled the motherboards and the backplanes. It was only until the serial flash memory arrived that bloaty alternatives became possible at all.
- zeveb 9y agoThe real special sauce for Forth is that it's small and it's knowable. Anyone who wants to learn about how elegant a computer system can be should take a look at jonesforth[0], a Forth implemented in x86 assembly language. It really is possible for a programmer to easily understand everything a Forth does, which is wonderful when writing a bootloader or low-level OS. In a lot of ways, it's a more-structured assembly language. TCL could be cool for a low-level system too, as could be a Lisp (also: how can anyone hate Lisp with a passion‽‽‽), as of course could be Forth. Perl & Python are too big and not minimal enough. 0: https://github.com/nornagon/jonesforth/blob/master/jonesforth.S https://github.com/nornagon/jonesforth/blob/master/jonesfort...
- alxlaz 9y agoThis is, I guess, the uncomfortable secret about Forth :-). There's the community of Forth enthusiasts, who admire its simple, word-oriented concept, and the ease of implementation, and are super happy that you can put a working interpreter in 8K of flash and use it interactively (ok, I'm happy about that, too). And then there's everyone who has to write Forth code but is not a Forth enthusiast, and truth is we kindda hate it. I pained myself through writing something non-trivial in Forth and it was pretty awful. I kept hoping the enlightenment would finally hit me and whatnot but it didn't, and I haven't touched it ever since.
- defined 9y agoI got interested in Forth because of an article I read in either Byte magazine or Dr Dobb’s Journal. It was not because of the Forth language that I was curious , it was because Forth was the first TIL (threaded interpreted language) that I had encountered. At the time, there were no Forth interpreters available locally for the only computer I had (a TRS-80 Model II running CP/M. Actually, it was my Dad’s.) I found someone from the Forth Interest Group (FIG) who gave me a 90-page Z-80 assembly language listing for figForth, which I proceeded to type in overnight and assemble with masm, IIRC. It worked, and sadly, I never really did much with Forth after that. But it was an interesting experience and I still think TILs are a cool idea.