Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've made a Forth dialect and uses it for somewhat specific stuff. I have a program that works for me 24/7 and that I have tweaked and adapted to the evolution of my needs for a decade.

It would be a PITA to strip it from its business-related stuff in order to publish it, so you will probably never see it online. I guess it's the same for other "serious" users.

> Unrelatedly (perhaps) I tried writing some basic software in forth and it was pretty horrific. Even something as simple as representing a variable length array feels like fighting the language

Yeah, don't fight the language, that's the key. And don't do stuff because that's what every other language is doing. "Solve the problem you've got!" Moore said. It could seem dead obvious, but it's actually difficult to prevent yourself from trying to solve problems you think you will have tomorrow, or from solving problems others have.

More specifically don't try to avoid using Forth variables because they are global and you've been taught that globals are absolute evil madness that eat kitties for breakfast. Instead, pick perhaps a couple of values that travel everywhere, causing "stack juggling" in your program, and make them global variables. Maybe hide those global variables behind regular words if you really really really intend to reuse parts of that program.

But really, solve the problem you have now. This also means you should make programs that will actually be useful for you. It can be difficult because this generally involves complicated stuff like connecting to a web server or GUI. Just be pragmatic and use native libraries (or whatever you can find that looks decent, gets the job done, and can be used by the Forth system you're using) to deal with the complicated crap others have been doing for decades. Forth hates complexity, any cheat is fair game.



I don’t believe you. I think it’s more likely that forth simply isn’t a general purpose language.


Feel free. I somehow got the mistaken idea that you were asking questions, but it turns out that your were stating opinions that should not be questioned.


You got it!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: