Go Down

Topic: FORTH environment for Arduino (Read 10716 times) previous topic - next topic

SubZer0

Hmm.. why not compile an Apache webserver with PHP module (and of course a firewall)  :-/
I think it would need some extra RAM memory ;D

cyberteque

Freak me Lefty!
I have this Mars/Lunar lander obsession, my first attempt, age 12, was all relay logic and bulbs!
Then I went to DTL, after the start of the 70's I built a 6800 system, with front panel LED's and switches, you might know the one, from that issue of "Practical Electronics".
Still at it, always will, till I plant that Australian flag on the Moon/Mars, arduino or not.

Si

Is it me or does Yoda talk Forth?

'theForce withYou strong is'

Its great to see Forth on an Arduino. Well done! I spent a happy time in the 1980's writing a Forth for a TRS-80.

So many good ideas just fade away.
--
My New Arduino Book: http://www.arduinobook.com

Ran Talbott

Quote
The contempt that C programmers show Forth (and just about any other language) is amazing!


No, it isn't.

FORTH was an interesting and clever hack that proved a useful solution to a problem that doesn't really exist any more:   writing code for von Neumann-architecture machines with limited storage and no/expensive cross-development tools.

But it's definitely a "hack", not a tool for doing serious engineering:  it lacks the features (most notably,  function prototyping) that make it possible for compilers to catch common programmer errors before they turn into crashes,  and make it easy for programmers to write re-usable code.

These days,  when many targets have Harvard architectures,  and you can use a cheap PC with a free version of GCC/SDCC/whatever to cross-develop for almost anything from a PIC to a supercomputer,  FORTH only makes sense for a really tiny set of problems.

The reason for much of the "contempt" is the near-cult (and some would omit the "near"  ::)) following it attracted,  which succeeded in alienating many people who would've been quite happy to have it as one of several tools in their kit.

retrolefty

Ah, so one could say FORTH is really a good candidate to add to the dustbin of history?  ;D

Lefty

Ran Talbott

I dunno if I'd go that far.  Although I would in the case of, say, COBOL.  And maybe LISP, if I were in the mood to start a flamewar  8-)

But I definitely wouldn't include it in any CS or engineering curriculum,  except as a novelty or thought-provoker.  The 17 people on the planet who might actually need to know it someday can pick it up quickly enough on their own.

It's like RPG,  or briefcase-sized cellphones:  a stop-gap that filled a temporary need,  but whose 15 nanoseconds of fame has come and gone.

RuggedCircuits

It is a useful language because it is thought-provoking to students and engineers. Stack-based languages (like PostScript and FORTH) are sometimes a good fit for certain problems. A FORTH interpreter takes up much less space on a deeply-embedded system than a procedural language of equal expressive power (don't ask for proof, it's my opinion :)

And it still has some (relatively) modern uses:

http://en.wikipedia.org/wiki/Open_Firmware

Consider the original post: this fellow implemented an INTERACTIVE programming language on a microcontroller with 2K of RAM. Just not possible with C/C++/Java etc. I don't see that need going away.

Plus, FORTH is just plain fun. It's like puzzle-solving, and much more productive than solving Sudokus.

--
The Quick Shield: breakout all 28 pins to quick-connect terminals

halabut

SubZer0, you forgot Ruby on Rails.

-- Alec

Glass

A nice piece of work !
Before the PC or Mac as we know them existed, I was writing data acquisition programs in figForth for the RCA 1802 processor and I was impressed with the compact power of the language.
Also a user of HP RPN calculators, and there are similarities.
I look forward to trying this out.

u0421793

Is it supposed to just stop working once you unplug the Lilypad and plug it back in?

AndyL

Nice one, I've previously had Amforth on an arduino but that needed to overwrite the bootloader etc.

I spent a couple of years using forth to write code for instrumentation used in the water industry for monitoring all the chemicals/compounds in the water as it was being treated. These were 6502 based embedded systems. Also used it for some PID control systems based on PCs too.

Still have a soft spot for it so will have to give this a try.  ;)

Cheers

Andy

Go Up