I've heard this about JavaScript from others in the theoretical computer science world, as well. I've seen direct translations of combinators into JavaScript, so it implements full closures correctly. I can't opine on its efficiency, and I suspect that it sucks, since most implementations assume a relatively small amount of processing to produce a visual page. I don't know whether JavaScript implements infinite precision integers and full rational numbers. These would seem to be essential for a bright 13-year old, so that (s)he could play with number theory. Ditto with complex numbers & trigonometry, so they can play with stuff they learn in high school. This is why Maxima (free Gnu license) is a pretty good way to start. At 12:51 AM 1/4/2005, Phil Carmody wrote:
While I'm replying I'll deviate back to the original question and suggest JavaScript. It's got pretty much all the theoretical purity of languages like LISP or even ML; it's a close syntactic relative of the more mainstream C/C++/Java, so a useful familiariser for those; and to top it off, it typically sits inside a framework (a browser) where all input/output/display issues already neatly handled. To the mathematician in me, JavaScript, when programmed well, is a very satisfying language.
(But 99% of all real-world use of it would get this message negatively moderated ;-) )
From: "R. William Gosper" <rwg@osots.com>
I said
For a certain concrete thinker, I'm planning the following first program: Combine Macsyma's string manipulation functions, especially CARDINAL_STRING (12 -> "twelve") and ORDINAL_STRING (12 -> "twelfth") to make a FRACTION_STRING function (11/12 -> "eleven twelfths"). There are nice opportunities for bugs ("one twelfths", 1/2 -> "one second", 3 -> "three firsts")
This went great!! After he got those fixed and was sure it all worked, 3/2 -> "three halfs" and after the obvious fix, "three halvess". He *really* enjoyed that session.
Richard Fateman added
You might be surprised to learn that speaking fractions is ambiguous.
30/400 and 34/100 are quite different numbers, but each can be pronounced
thirty four hundredths
Luckily, we dodged that one. It probably can't happen with reduced fractions anyway,
twenty three hundred and oneths?
but just for kicks: block([gcd:false,fancy_display:false], for x in [34/100,30/400] do print(x=number_string(x)))$
34 --- = thirty-four one hundredths 100
30 --- = thirty four hundredths 400
One thing that used to drive both my (US) girlfriend and (UK) me absolutely mad was hearing sports commentators say things like "X has beaten Y by three one thousandths of a second". "Three thousandths!" we'd both shout at the idiot box simultaneously. I don't know how widespread such ire is though. I believe the additional (to me) "one" is certainly more US, but the commentator in question (Murray Walker) was as British as the day is long.
The disambiguation can typically happen in the phrasing, but that's a lower-bandwidth part of the signal, alas, and more susceptible to noise.
Phil
===== When inserting a CD, hold down shift to stop the AutoRun feature In the Device Manager, disable the SbcpHid device. http://www.cs.princeton.edu/~jhalderm/cd3/