News for hackers. Stuff that matters.
Re:Lisp in Forth by bifrost on Tuesday April 20, 2021 @05:56PM (#26882371)
This is pretty cool especially since Forth is gaining interest in some circles.
Re:Lisp in Forth by guenthert on Wednesday April 21, 2021 @05:05PM (#26895448)
Yeah, some circles. It's guys getting to middle-ages or retirement age, having more time on their hands, feeling a bit nostalgic and are tinkering. That's fine, I do have a weak spot for Lisp and FORTH myself, but don't confuse that with applicability in the industry.
Re:Lisp in Forth by bifrost on Friday April 23, 2021 @06:59PM (#26920242)
They said that about Javascript too and well... look at what we have now.
Re:Lisp in Forth by threatofrain on Tuesday April 20, 2021 @06:14PM (#26882564)
How so?
Re:Lisp in Forth by tartoran on Tuesday April 20, 2021 @07:55PM (#26883582)
Small is the new big. Not being serious but frameworks took the joy out of programming in a dogmatic way but lost a lot of the beauty and creativity in coding in exchange of too many features that a lot of the time we don’t need. People started looking at the past and what has been overlooked by many and started to bring it back. I am glad I starated learning Lisps and Scheme in particular. I don’t know why I like it so much but I am thankful people bring old things in fashion, even if for personal growth. My ignorance built upon the general consensus (what I thought of at the time) was that Lisp was a forget about proposition, that parantheses make it a horrible coding experience which couldn’t be further from the truth. I think i prefer this syntax now.

Keep up exploring and sharing folks, you are making a dent.

Re:Lisp in Forth by bifrost on Tuesday April 20, 2021 @09:23PM (#26884328)
People are just poking around with it because its a mature language thats been used for a lot of embedded things. Its been in several bootloaders as well. The FreeBSD bootloader uses it so I technically use it any time I boot my machine heh.

Imagine being able to run LISP in the bootrom of a random machine :)

Re:Lisp in Forth by sigjuice on Tuesday April 20, 2021 @11:05PM (#26884983)
The FreeBSD bootloader made the switch to Lua.
Re:Lisp in Forth by bifrost on Friday April 23, 2021 @06:58PM (#26920234)
Just checked, its still Forth on my 12.X & 14.X box.

It looks like there's an option to use Lua but it doesn't appear to be the default, I'm taking a look to see how to enable it now.

Re:Lisp in Forth by ollran on Tuesday April 20, 2021 @11:53PM (#26885250)
I believe Illumos bootloader still includes a Forth interpreter.
Re:Lisp in Forth by codezero on Tuesday April 20, 2021 @06:44PM (#26882909)
For me I got interested in it while getting into some retro computing stuff during the pandemic, curious where others are getting that itch from!

[1] Playing with open boot on my old iBook power PC - realizing it's a forth

[2] Playing with durexForth on c64 emulators

[3] collapse-os recently switching to forth.

Re:Lisp in Forth by anthk on Wednesday April 21, 2021 @09:54AM (#26889714)
BTw, is there a way to have numbers bigger than 2^15-1 in collapseOS'Forth, or under 8/16 bit Forths?
Re:Lisp in Forth by codezero on Wednesday April 21, 2021 @05:24PM (#26895621)
Didn't get deep enough to need to test those limits, but I assume they would need to be hand rolled.
Re:Lisp in Forth by anthk on Tuesday April 20, 2021 @07:38PM (#26883442)
Qemu PPC uses Forth too.
Re:Lisp in Forth by monocasa on Tuesday April 20, 2021 @09:44PM (#26884455)
Because OpenFirmware, the more or less standard bootloader of PowerPC and Sparc specified forth as it's command language. Even let you write PCI option ROMs in forth to have ISA independent boot drivers.
Re:Lisp in Forth by lebuffon on Wednesday April 21, 2021 @08:50AM (#26888959)
Open Firmware written by Mitch Bradley is actually just a byte-code Forth custom extended to be the system firmware. :)

So it's not that the language was specified but rather the language is the Firmware. By using byte-codes for the Forth keywords and allowing new wordlists to be created and extended you get a nice virtual machine that has the low-level chops to let you write device drivers and such, as you mentioned, while keeping the object code very small.

It quite clever. Unfortunately Forth itself is so "other" that it can never win the popularity contest. However like Lisp it is one of those mind expanding paradigms that should be sampled for the insights into minimalist computing that it provides.

Re:Lisp in Forth by codezero on Wednesday April 21, 2021 @01:36AM (#26885775)
I thought I bricked my 21 year old iBook and a forth command saved me. They don’t teach you that in algebra school.
Re:Lisp in Forth by frompdx on Tuesday April 20, 2021 @06:54PM (#26883023)
Personally I came across FlashForth last year and have had a lot of fun hacking on my Arduino boards with Forth.
Re:Lisp in Forth by bradrn on Tuesday April 20, 2021 @08:59PM (#26884139)
Thanks for the recommendation! I have an Arduino and just started playing with Forth yesterday, so I’ll have to try this.
Re:Lisp in Forth by frompdx on Tuesday April 20, 2021 @10:01PM (#26884578)
Don't forget to grab a programmer. I use a HiLetgo USBTiny programmer. They go for about $8. Also, do some googling about how to work with Forth on the Arduino. Not too much out there but it should help round out the FlashForth docs. arduino-forth.com is a good resource as well.
Re:Lisp in Forth by bradrn on Wednesday April 21, 2021 @08:46AM (#26888917)
> Don't forget to grab a programmer. I use a HiLetgo USBTiny programmer.

Hmm… I’m pretty inexperienced with Arduino (or indeed any microcontroller), so I have no idea what you’re talking about here. What’s a ‘programmer’?

> arduino-forth.com

Thanks for the link! Added to my reading list.

Re:Lisp in Forth by frompdx on Wednesday April 21, 2021 @12:04PM (#26891442)
One of these: https://www.amazon.com/HiLetgo-USBTiny-USBtinyISP-Programmer...

It allows you to burn the FlashForth bootloader on an Arduino, or to re-burn the Arduino bootloader if you'd like to program your Arduino with C/C++ instead of Forth.

This blog has a good walkthrough of burning the FlashForth bootloader:

https://rickcarlino.com/2017/05/26/up-and-running-with-flash...

Re:Lisp in Forth by frompdx on Wednesday April 21, 2021 @01:08PM (#26892421)
In addition to arduino-forth.com, definitely check out Starting Forth by Leo Brodie. It's a great book. Probably one of the best technical books out there. You can read it for free online. Sadly, it is out of print. You can find used copies though.
Re:Lisp in Forth by bradrn on Thursday April 22, 2021 @07:09AM (#26901370)
> https://www.amazon.com/HiLetgo-USBTiny-USBtinyISP-Programmer...

> https://rickcarlino.com/2017/05/26/up-and-running-with-flash...

Once again, thanks for the links! I don’t have too much time right now, but I’ll definitely have to explore this when I get an opportunity.

> Starting Forth by Leo Brodie

Funny you mention this… I found it myself, and am most of the way through it already! I’m probably not going through it as thoroughly as it deserves, but it is indeed an excellent introduction.

Re:Lisp in Forth by ajdude on Tuesday April 20, 2021 @11:43PM (#26885203)
One of the circles that I am in, people have been realistically considering Forth for a bootstrapper; it's very easy to build up the rest of Forth using Forth once you have a minimal set of keywords implemented in assembly for your hardware of choice.
Re:Lisp in Forth by Klwohu on Tuesday April 20, 2021 @06:57PM (#26883067)
In my city it's becoming more popular than Rust in the hacker spaces.
Re:Lisp in Forth by wsgeek on Tuesday April 20, 2021 @07:50PM (#26883540)
What general area if I may ask?