kinda OT: latest fun with Arduino, UI with a single knob/button and screen.
levipearson at gmail.com
Mon Feb 4 17:10:56 MST 2013
On Mon, Feb 4, 2013 at 1:01 AM, Tod Hansmann <plug.org at todandlorna.com>wrote:
> On 2/3/2013 10:51 PM, Levi Pearson wrote:
> > Aside from Forth, which has fallen pretty far out of common use these
> days (as far as I have seen, anyway) there's a cool embedded version of Lua
> that can run on pretty low-powered hardware. It's not quite as powerful of
> a language as Forth, but probably easier to pick up and very easy to
> integrate with C.
> My friend RodgerTheGreat (John Earnest) would take issue with this. Two
> 1) Concatenative languages are quite the thing in several fields
> lately. In fact, Factor is a nice such a language with a pretty
> extensive standard lib and some great performance. Forth itself is used
> quite a bit in several embedded environments (there are some nice chips
> that just run Forth in fact, like the 40-core monster from Forth, Inc).
I've been following Factor for a while, and even gave a presentation on it
to a programming languages class a few years ago. It's a really cool
language, but also rather different in some fundamental ways from a Forth
you'd run on an embedded system. A fun language, and probably easier to
work with than Forth, but not really 'quite the thing' anywhere I'm aware
of. Forth is, for better or worse, a niche language at the moment, and
Factor even more so. I would jump at an opportunity to use either if one
arose, but I wouldn't advocate them at this point.
> 2) The thing about Forth (and I say this being a hobbyist at best at the
> thing, but seeing a lot of code in it discussed in my community IRC
> channel) is that you don't really program any of it the same way you
> would C. File I/O for instance tends to be nonexistent as a concept,
> and your debug tools are equally different conceptually. Saying you
> prefer a "full set of debugging tools" is really just saying you prefer
> the way you work already, and that's fine, I'm not disputing that.
> However, it can be read to imply that Forth does not have the level of
> debug tools or information as your current workflow, which is
> incorrect. Forth is quite ancient and has developed quite differently,
> and its debug tools are not very typical any more than the language is.
I'm not necessarily saying that Forth doesn't provide debug tools; I'm
saying that embedded platforms don't typically provide a certain class of
debug tools. Instead, you'd have to hook a rather expensive 'in-circuit
emulator' onto your board, interface it with a gigantic IDE, and use that
to monitor how your program behaves. That's great, if you can afford the
tools and the time to learn them. Providing a slim 'mock hardware' layer
lets you take advantage of the power of your development machine, its
memory management unit, and the fact that you can script your fake hardware
to provide whatever response you'd like to your code. You could probably
take this approach with Forth, too, but I don't know if your typical Forth
> I'm not saying anyone should use Forth, mind you. I'm just saying there
> is a lot of use out there in several fields, not just Academic in
> nature, and there are a great deal of methodologies and tools available
> for such. There's even a Minecraft mod called RedPower2 that is an M68k
> computer that runs Forth. And it's fairly popular and everything. My
> mind. She is blown.
One of the advantages of Forth is that it's dead simple to implement. So,
this doesn't surprise me too much. Yeah, Forth would be cool to use on an
embedded system, but I didn't think it was likely that Michael would want
to move from Arduino to Forth. :)
More information about the PLUG