News for hackers. Stuff that matters.
Re:What the hell is Forth? (2019) by tehologist on Friday January 13, 2023 @08:08PM (#34376138)
I didn't really understand forth till I tried implementing eforth in c.

https://github.com/tehologist/forthkit

Managed to write a compiler/interpreter that could understand enough forth to implement the entire system. Less than 500 lines and only uses stdio.h and compiles using TCC

https://bellard.org/tcc/

That was so much fun I built a second one in under 300 lines of javascript for experimenting with canvas api in web browser. Single file doesn't require a server, you can drag and drop code onto text window.

https://github.com/tehologist/ecma6-forth

Runs standalone, I want to get back to it again.

Re:What the hell is Forth? (2019) by thejvexperience on Friday January 13, 2023 @08:26PM (#34376275)
Along similar lines, i once watched this guy on YouTube implement a Python-based Forth _compiler_ (not interpreter) and optimize the crap out of it. It was a great video, if anyone’s interested it was called “Porth” and i think his GitHub page has a link to the video.
Re:What the hell is Forth? (2019) by tehologist on Friday January 13, 2023 @08:32PM (#34376307)
Found the video you referenced.

https://www.youtube.com/watch?v=8QP2fDBIxjM&list=PLpM-Dvs8t0...

I met the creator Charles Moore a few times. When I lived in the bay area and used to go to the svfig (silicon valley forth interest group) meeting. He would often talk about forth was like solving a puzzle, likened it to sudoku. It is a good exercise for the brain and I highly recommend it.

https://www.forth.com/starting-forth/

Re:What the hell is Forth? (2019) by no-s on Saturday January 14, 2023 @12:06PM (#34381807)
Back in the eighties I went to a presentation by Moore on VLSI design featuring a GUI design tool he wrote in Forth. The physical user interface was via contacts taped to his fingers and thumb, he would touch them together to navigate the UI. We were very impressed.

I still have a tshirt that reads “Be Moore Like Chuck”…

Re:What the hell is Forth? (2019) by Karrot_Kream on Friday January 13, 2023 @08:47PM (#34376451)
I know it's a lot of fun writing Forths and that's how most people tend to experience Forth, but I like to urge people to actually build applications on Forth. Understanding Forth by writing applications is probably the best way to get a feel for Forth.
Re:What the hell is Forth? (2019) by anta40 on Saturday January 14, 2023 @01:49PM (#34382818)
Is there any "battery-included" ANS Forth (more or less like Python/Go) which provides access to concurrency, networking, database, GUI, etc?

Not an embedded device programmer, but mostly deals with frontend apps, and occasionally backend, so those are very relevant to me.

Or perhaps use "non-traditional" Forths like 8th (https://8th-dev.com) or Factor (https://factorcode.org)?

Re:What the hell is Forth? (2019) by Karrot_Kream on Sunday January 15, 2023 @05:28PM (#34394293)
gForth is probably the closest you'll get to a batteries-included ANS Forth. It has a lot of libraries and does have some GUI libraries. It definitely has networking and some amount of db words, I'm not sure what it's concurrency situation is like.

8th is a great not-Forth. Highly recommended because of how practical is.