colorForth, the language of traffic lights
Some of you may remember (and some wish we could forget) a ramble I posted about six months back about traffic lights and language design and all the weird ways we get meaning out of such a small # of symbols. One of the things I'd pondered was using color for syntax. Well, somebody else did. I just stumbled on colorForth! In Forth, a new word is defined by a preceeding colon, words inside a definition are compiled, outside are executed. In colorForth a new word is red, green words are compiled, yellow executed. This use of color further reduces the syntax, or punctuation, needed. http://www.colorforth.com/cf.html Red, green and yellow! It's the language of traffic lights! This is, of course, programmed on a 27-key keyboard. That being all the symbols you possibly need in Color Forth. And you thought Perl was compact! -- Michael G. Schwern <[EMAIL PROTECTED]>http://www.pobox.com/~schwern/ Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One Commence simultaneous panic on my mark.
Re: the handiness of undef becoming NaN (when you want that)
On Tue, Oct 23, 2001 at 08:08:27AM +1000, Damian Conway wrote: > >> > To check for numericity of input, you'll write: >> > >> > $number = +<$fh> >> > until defined $number; >> > >> > If you ignore the definedness, the C will just promote to zero >> > in numeric contexts. >> >> I'm confused. By the time $number sees the line from the filehandle, >> it's already been nummified to 0. > > No. I'm saying that if you give unary C<+> a string that can't be interpreted > as a number, unary C<+> gives you back C. > > So on "bad" input, $number gets C and the loop repeats. I guess I still wonder how this will work. I suppose pp_numerify will have this logic, and then call SvNV or whatever. It just feels to me like you're creating a conceptual infinite loop. I need to stop thinking of +$x and $x+0 as the same thing... but it's hard (hmmm... math is hard... I've heard that somewhere ;-). -- Aaron Sherman [EMAIL PROTECTED] finger [EMAIL PROTECTED] for GPG info. Fingerprint: www.ajs.com/~ajs6DC1 F67A B9FB 2FBA D04C 619E FC35 5713 2676 CEAF "Write your letters in the sand for the day I'll take your hand In the land that our grandchildren knew." -Queen/_'39_