Lambda the Ultimate

inactiveTopic APL Crosswords
started 11/30/2002; 11:56:55 AM - last post 12/4/2002; 9:45:56 PM
Ehud Lamm - APL Crosswords  blueArrow
11/30/2002; 11:56:55 AM (reads: 1766, responses: 5)
APL Crosswords
Darius wants to know if similar things were done in other languages.

I really don't know. APL sure does separate the men from the boys...


Posted to fun by Ehud Lamm on 11/30/02; 11:57:13 AM

Noel Welsh - Re: APL Crosswords  blueArrow
12/4/2002; 8:36:34 AM (reads: 817, responses: 1)
*shakes head* I really don't know either. I suppose Perl is the only language in common usage that might have crosswords. I certainly don't want to use any programming language that is suitable for making crosswords!

Actually if one replaced the black squares with brackets one could make Scheme crosswords...

Ehud Lamm - Re: APL Crosswords  blueArrow
12/4/2002; 9:19:15 AM (reads: 876, responses: 0)
Actually if one replaced the black squares with brackets one could make Scheme crosswords...

Hey, that's a cool idea. It can even work, since lambda is a single letter...

Noel Welsh - Re: APL Crosswords  blueArrow
12/4/2002; 9:30:43 AM (reads: 814, responses: 1)
Arf. As a lurker on ll1 I'm sure you know lambda *is* a single character. http://lemonodor.com/archives/000194.html

Ehud Lamm - Re: APL Crosswords  blueArrow
12/4/2002; 11:18:59 AM (reads: 861, responses: 0)
Of course. That was my point.

Luke Gorrie - Re: APL Crosswords  blueArrow
12/4/2002; 9:45:56 PM (reads: 803, responses: 0)
NB: that lambda-in-Emacs screenshot shows my ugly reader-macro-hack version, which munges the actual source files. Later in the usenet thread, other people improved the code so that Emacs font-lock does it all without affecting source files - added bonus that all the existing Lisp programs you read have pretty lambdas automatically. It's especially great for reading Scheme code, I find.

In principle the final version is not totally clean with respect to indentation, but I haven't seen the trouble cases actually occur in a real file. This is the basic problem case:

(lambda (x) (+ x
               y))

(\ (x) (+ x y))

i.e. if you need to indent to the level of something following a 'lambda' (on the same line), then you can't do it consistently.

But as I say, I've yet to come across that problem in a real source file. Note also that if you indent-region it within Emacs, it will actually consider the 'lambda' as a single character, so indentation will always do the Right Thing for the current Emacs configuration.