Pages: 1 [2]   Go Down
Author Topic: FORTH environment for Arduino  (Read 7649 times)
0 Members and 1 Guest are viewing this topic.
The Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

field road, jupiter creek
Offline Offline
Sr. Member
****
Karma: 3
Posts: 348
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

UK
Offline Offline
God Member
*****
Karma: 10
Posts: 903
Twitter: @simonmonk2
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

--
My New Arduino Book: http://www.arduinobook.com

Rural Arizona
Offline Offline
Edison Member
*
Karma: 7
Posts: 1711
Incorrigible tinkerer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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"  :smiley) 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.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16548
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Lefty
Logged

Rural Arizona
Offline Offline
Edison Member
*
Karma: 7
Posts: 1711
Incorrigible tinkerer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Faraday Member
**
Karma: 13
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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
Logged

New Zealand
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
arduino: far too much like electrical engineering.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

SubZer0, you forgot Ruby on Rails.
Logged


-- Alec

0
Offline Offline
Newbie
*
Karma: 1
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

London, GB
Offline Offline
Sr. Member
****
Karma: 7
Posts: 332
Nothing works.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 4
Posts: 42
Arduino rocks - Yeah Baby!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley-wink

Cheers

Andy
Logged

Pages: 1 [2]   Go Up
Jump to: