Is anyone using Forth in their Lilypad?

If someone has already changed their Lilypad from being an Arduino to being a Forth processor, perhaps using Amforth, could you please point me to a simple step-by-step sequence of instructions, one after the other, which will tell me how to do such a thing? I want to do such a thing, you see, but I don't know how because I lack the knowledge involved for precisely this task, and possibly other related subknowledges too.

I want to do such a thing, you see

No, I don't see. Why do you want to do this?

Because he prefers Forth to C?
Looks fun - I may give it a shot.

I just downloaded amforth, I'll try using it on my Mega and tell you all how I go!

I've been using Forth (and PostScript) since the '70's!

It's a great language, some of my favourite programs were written in Forth.
The most conspicuous example is the desktop planetarium program, "Voyager"

Thanks. I'll wait with interest. Bear in mind I'm using OS X, but I also have access to the other operating system, Linux (but haven't hooked that machine up to an Arduino as yet).

Incidentally, in about 1990 I hooked up a Psion Organiser XP and its Serial adaptor (both on loan from Psion for review purposes - had to give back unfortunately) directly into an Apple Laserwriter and using the PostScript interactive mode got it to output a page with some type and a shape on, much to the amazement of other people watching. That's about as far as I ever got though. From that point onwards, PostScript became like plumbing: if it worked, no need to roll up the sleeves and get the hands dirty, and generally by then, with QuarkXpress and Illustrator it increasingly always worked, so I remained on the front of the page design and illustration process and further away from the code, until I encountered SVG and somehow recognised a lot of its philosophy.

Always liked forth conceptually, but never quite as a "real" programming language. Postscript did a good job at fixing things...
I actually had cause to write some postscript code rather recently, to get EAGLE to output drillaid-stile holes in its postscript output...
[ps-drillaid]
(hmmph. 2006. Time flies...)

I'm getting nowhere with any of this arduino stuff. It's proving immensely too difficult to actually make Forth actually be on the Lilypad itself.

Is there anything else that is conceptually like a Lilypad (small, low-power, easy to sew together electrically, washable) that is actually easy to use (ie, uses a programming language that isn't downright hostile and repellent) when the brick wall of making customised software functionality is encountered?

There's a board on ebay — the Byvac BV511 — that looks ideal except that it's got sharp corners, costs about three times as much as I want to pay for it, and seems to have nobody else actually using it (which means no help from a community).

I just want Lilypads with Forth on.

You can program in Forth, but find the Arduino C++-subset "hostile and repellent" ?! Wow.

I don't think that there is anything else like Lilypad...

There is BitLash, which has a Basic-like syntax.

Based on http://objectmix.com/forth/385440-forth-arduino.html , getting amforth running on an Arduino as Arduino would indeed be rather complicated. If you have an ISP programmer (possibly including another arduino), you should be able to completely reprogram the lilypad with AMForth (overwriting the bootloader as well as any sketches.)
It looks like there are already templates for building amforth compatible with the arduino hardware, but the amforth build documentation is pretty ... sucky.

If you run forth on your lilypad, I don't know how much help you'd be able to get from the normal Arduino Community either...

What do you mean “wow”?

The Bitlash looks very interesting at first sight. I'll try it. Thanks.

I think he meant "wow" as in "Wow! Here's someone who finds Reverse Polish user-friendly and intuitive"
:smiley:

It's not that friendly, it is after all a computer language, so it has that metallic monotone robot voice in your mind when you read it out from the page.

I've just put Bitlash on a Lilypad.

a) it was easy! OS X instructions are given, unambiguously, and I followed them blindly and everything just worked. This is what it's all about.
b) it actually is relatively akin to Forth, although the numbers don't “seem to” go onto a stack, the words are defined in a manner not too far away from a colon definition — in fact, in a way that actually feels more comfortable to me than Forth was.
c) I not only wrote the demo blinking led program and had it working straight away, but after about ten minutes of errors, eventually made a simple modification to the demo program and got it to work again! This is tremendous. People can do their own customisations easily without discouragement. Instead of several weeks of never ending errors and non-working code, only a few minutes or so, until gratification is gained. This is very important.
d) it's a bit fussy with the input from Screen in OS X terminal. It's easy to overflow the line, and instinctively one would cursor back up to correct an incorrectly entered line, but you can't. Nevertheless, each line on its own, small though it might be, is quite easy to retype over and over and over until it thinks you've done it enough times to be considered right.
e) still too much incorrect use of punctuation all over the place, but this is a flaw all programming languages seem to have.

This morning, in my estimation, the usability of the whole Arduino Lilypad system has gone right up, almost approaching zero. I'm quite pleased thus far.

Are you trolling or what?
Basic seems always stupid for me, but I'm a C guy, so maybe that explains it.
It is very, very,very easy to program the arduino using C and its high-level functions, the IDE as a ton of examples and usually you get away stitching 2 or 3 examples together, how the hell do you take weeks to open the blinky demo?
If our language didnt have punctuation you would understand a bit of it, but you want that your compiler read what you write without punctuation?

If our language didnt have punctuation

Oh! The irony! :wink:

I don't know why people are mentioning Basic. Basic has nothing to do with this conversation. Stop mentioning Basic.

If you understand C that's good, but I don't see how you can extrapolate that just because you can understand it, so must everyone else automatically — unless you, for some reason, are a believer in Rupert Sheldrake's theories of formative causation and morphic resonance. If that's the case, can you please get even better at C so that we can all get a bit better at it?

As for punctuation, why are there prime and double prime marks all over the place? Why are there semicolons at the end of a line? Surely that's where a full-stop goes? Why is the code peppered with brackets, curly brackets, square brackets, in and out and in and out again? Why so much cryptic use of random letters and numbers that make no sense when spoken out loud? It's a flaw of programming languages that they need to look like a cat typed it in by walking across the keyboard.

Like Yoda, Forth using, you would like your sketch to form?

I think COBOL puts full-stops at the end of sentences, and uses vaguely English-like syntax, but it has the disadvantage that it looks a bit SHOUTY.

What happened to “Tiny Open Firmware”? Seems interesting, but any links one can find lead nowhere. What's the point of dead links? When is someone going to tidy the Internet up. In a few years, it'll be full of rubbish and nonsense at this rate.

There's a board on ebay — the Byvac BV511 — that looks ideal except that it's got sharp corners, costs about three times as much as I want to pay for it, and seems to have nobody else actually using it (which means no help from a community).

Well, I have a BV511 and it's very good (as well as being Forth-based, it's physically smaller than a standard Arduino, yet a faster CPU with more memory) but , yes, in no sense is it a Lilypad replacement.

I keep meaning to see if the Arduino bootloader can be extended with enough to have a 'three instruction Forth' setup (you work on a host, and the Arduino would do one of three things: accept a byte, send a byte, or execute some code. You still get the 'highly interactive developing on the hardware' benefits of Forth, but in a tiny space.

I've spent a large portion of the day simply reloading amforth again and again. Every time I make a mistake (which seems to be approx 100% of the time), it corrupts and gives me

?? -13 6

in response to pretty much everything I type. I'm tempted to solder in some turned-pin sockets into the ICSP pads on the lilypad board, it'd make life a lot easier every time I have to re-burn it.

Also, so far I've yet to see “amforth-upload.py” actually work properly at all. The only means I've encountered for putting forth definitions into the lilypad is to cut and paste them carefully, line by line, minus the stack comments. This is obviously too tedious to continue with.