On Sat, 8 Dec 2012, Josh Grams wrote:

> On 2012-12-08 07:16AM, Tomasz Rola wrote:
> 
> >I guess it is hard to go below some size with Scheme. Or some other well 
> >developed Lisp. Especially that it is hard to go below some size with 
> >compiler, too.
> 
> The commercial Forth systems work on a tethered scheme.

I haven't mentioned but I am a big fan of standalone machines. Tethered 
are ok but I would rather not invest my time in this. I understand that if 
they have to be tethered, then they have not enough RAM and storage to 
host soft I would like to run on them.

So I peek at various ATmegas and other CPUs but only for education, not 
so much for inspiration. One can make those tiny parts into full time 
computers with some soldering but I am not a big solderer unfortunately. 

http://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http%3A%2F%2Fleon-instruments.blogspot.com%2F2011%2F03%2Favr-spectrum.html

http://geoffg.net/maximite.html

http://belogic.com/uzebox/howitsmade.htm

http://www.lucidscience.com/pro-lazarus-64%20prototype-1.aspx

So, in spite of cool factor, I'd rather not go that way - after some 
thinking I decided it was wiser to wait and see if there would be some 
cheap ARM-based boards. And indeed they are now here, for example:

http://www.keil.com/boards/cortexm.asp

They cost more than ATmega-based Arduinos, however, they can do a lot more 
- I mean, they can _compute_ more. On one of those, or even better, on 
Beagle, one could fit small Scheme environment or even fully blown CL.

I find it peculiar that after all those years, low end boards finally 
could go on par with IBM 700/7000 series computers or even exceed them. I 
mean, really, one cannot do the same stuff on 8bit with 1024 bytes of RAM 
as one could on 36bit cpu and 32KWords of RAM (equivalent to 144kB). And I 
don't think making more builtin RAM for 8-bitters would increase the costs 
that much - but of course I may be wrong.

My other interests go towards FPGAs, because idea of morphing hardware 
appeals strongly to me. It seems like more future-proof alternative to 
acquiring soldering skills.

It should be noted here, however, that for a while I have limited myself 
to gathering info in a very loose manner, i.e. at leisure. I am very easy 
going chap and right now the easiest way is to have PC and tinker with 
software on it. Especially that there is so much to learn. And BTW, 
probably the easiest way to have a glimpse of tethered is to run dosbox 
and try some low-level stuff there (assembly, hexediting etc). Or some 
8051 simulator - well, maybe later. Church numerals first.

[...]
> I have always wondered how far in that direction you could go with
> Scheme or another high-level dynamic language.  In my (again, fairly
> uninformed) opinion it seems mainly a question of how much of the
> dynamic stuff can be analysed and compiled down to static code to reduce
> the runtime size/speed costs, and whether you can give the programmer
> the fine-grained control over memory usage that they might need for such
> limited systems.

It is doable to enrich one's typical Scheme (let's assume it is going to 
be Scheme) with few words for hinting compiler about memory usage (in a 
way similar to how it's done in CL to help compiler with optimization). To 
run the same code on standard (PC) Scheme, one could load empty 
definitions, so that interpreter would ignore them and stick to garbage 
collection. I don't know ATM how I would make equivalent to PEEK/POKE 
instructions in a portable way - because I'd rather stay as compatible 
with Scheme proper as possible. And I think continuations would not fit 
nicely into limited memory space, so it would have to be something similar 
to R4RS, AFAIK. OTOH, perhaps it would be possible to find a way and if 
so, it would have been very very nice. Unfortunately, numeric tower 
requires some memory and I need it to be interested. I am compulsive Big 
Integer (ab)user.

A bit later, one could also try oneself with development of whole-program 
optimization, or perhaps adapting existing compiler like Stalin.

At least this is how I would have started. I expect that with some 
compromises it is possible and not very hard to get similar code sizes to 
C.

[...]
> Well, me neither, but I've read comp.lang.forth for as long as he has
> been posting there and haven't found that he has much to say that's
> worth digging through the attitude to get to.  His Forth code is mostly
> pretty clunky and could be better designed, IMO.  He tends to be overly
> concerned with micro-optimizations without looking at the big picture.
> And if anyone points out flaws in his work he generally jumps to
> personal attacks rather than discussing the technical issues.
> 
> This is not to say that he never comes up with interesting stuff.  It
> just tends to get lost in the noise.  And you have to check it out
> yourself as he tends to make very strong claims, even when he clearly
> doesn't know what he's talking about.

Oh. I see.

> >> If anyone here is actually serious about the history of computing, they
> >> might consider writing a book about the culture of Forth. Seems to me
> >> there's some valuable material there which is gradually passing out of
> >> living memory.
> >
> >I would like to read such book.
> 
> There are bits and pieces out there; Chuck Moore has written a couple of
> things and Jeff Fox has a bunch of essays.  And the old Forth Dimensions
> newsletters are fun reading.

I have found FD some time ago and downloaded them onto my ebook reader. 
First volumes look extremely ugly :-) but are interesting.

>  Mostly it's a culture of YAGNI taken to extremes, on the assumption 
> that it's cheap to extend the functionality when you find you actually 
> need it.  And a culture of distrusting academic work and complex 
> compilers and having the programmer make as many decisions as possible.

Cool. Making decisions, this I like.

> I've been interested in Forth for about 10 years; I came to computing
> via Basic and then x86 assembly language, and when I was 16 (1996) I
> started asking myself what was the simplest compiler I could build that
> would get me significantly more power than assembly language and came up
> with something remarkably similar to Forth (it was a pleasant surprise
> discovering the actual Forth language 5 years later).  So I tend to
> think that most of the stuff is obvious if you're coming from that
> direction, and I haven't come up against any code or prose from the
> Forth folks that makes me feel differently.  There *is* several decades
> of people working on it, so there are a bunch of interesting tricks.
> And of course YMMV.

Actually, my mileage is similar. I've loaded Forth for the first time 
somewhere around '88 on a borrowed computer. Played for *teen days, had to 
return the machine after that. Never had enough time to try again, but I 
guess it is possible to get some Forth by means of osmosis, in a sleep, by 
reading some related material and source code etc etc. Anyway, my very 
short exposure was long enough to turn my mind around and leave a lasting 
memory.

I don't think I have a reason to make statements against "folks". For this 
I would have to know more than they do.

> I could come up with a bunch of links if anyone is interested...

Yes, please.

Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.      **
** As the answer, master did "rm -rif" on the programmer's home    **
** directory. And then the C programmer became enlightened...      **
**                                                                 **
** Tomasz Rola          mailto:[email protected]             **
_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc

Reply via email to