|
![](/i/fill.gif) |
clipka wrote:
> BASIC: Yes, first language I learned. On a home computer, of course.
> Locomotive Basic, to be precise. Amstrad CPC 6128.
At one point my dad had an Amstrad machine - I couldn't tell you which
exact one though...
> PostScript: Yes, been there. Weiredest (and therefore most interesting)
> language there is out there, if I'm asked (except for /deliberately/
> obfuscated languages, which aren't half as interesting due to the
> frustration potential involved).
It's not *that* weird, just unconventional. (And definitely designed to
be machine-readable and machine-writable rather than coded by hand!)
> Eiffel, Haskell, Lisp, Prolog: No, never seen (well, seen a /bit/ of
> Haskell here of course :-))
Eiffel: Object-oriented programming with multiple-inheritance and
design-by-contract, done right. You know how Pascal is the theoretically
"perfect" example of a structured language? Eiffel is the same but for
OOP. (And, like Pascal, it's not very popular and has some gapeing flaws.)
Haskell: Everything [almost] is immutable. Imagine an OO language where
all your objects lack set-methods. That's Haskell. Now imagine if you
could have objects which represent functions. (Smalltalk actually does
this, by the way, with it's [ :foo | ... ] blocks. I think JavaScript
can do it too.) That's basically Haskell, modulo some weirdness to do
with lazy evaluation. And friggin' weird syntax, and obscure terminology.
Lisp: Everything is a list [almost]. Prefix syntax, sort of like how
PostScript is postfix syntax. Other than that (and the "minor detail"
that you can modify the source code at runtime) it's a plain ordinary
imperative language. But for some reason, Lispers think it's some
transcendental wonder-language.
Prolog: You give it facts, and rules for deducing new facts from
existing facts. It can solve logical equations. (E.g., tell it who's the
parent of who, and how to trace ancestry, and it can tell you how is
related to who, and who isn't, and by how many generations, and so on.)
Has the interesting effect that rules can be applied seemingly
"backwards" and "sideways" as well as just "forwards" like in normal
languages.
> Machine code: Yes, I think I did "poke" a few bytes into my Amstrad CPC
> 6128; 0xCD was CALL and 0xC9 was RET, if I remember correctly, but it
> has been a while; I preferred assembler anyway (Zilog Z80, 16- and
> 32-bit Intel 80x86, Intel 8051).
You know you've been using the 6501 too long when you know, off the top
of your head, that RTS is 96 decimal.
>> Lisp isn't too hard to interpret either. (But arguably too hard for
>> 8-year-olds to program with.) Smalltalk is pretty easy to interpret,
>> and easy on the brain too. Prolog would also not be hard to interpret,
>> but probably not especially useful for home users.
>
> I guess all these languages wouldn't really fit the limited capacities
> of a home computer. Can you, for instance, imagine an object-oriented
> runtime system on something like 32kB RAM and 16kB ROM? Running at 1
> MHz? With automatic garbage collection and all?
The GC is probably the killer. I rather suspect you could confortably
fit a Lisp interpretter into a few hundred *bytes*. (But not the
libraries...)
> Plus, I guess these languages would have lacked syntax for peeks &
> pokes. Can you imagine the home computer boom without peeks & pokes? :-)
It would be trivial to add this to Smalltalk or Lisp. (In fact, I'm
fairly sure it's already there.)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |