[FoRK] Kdb+ now available free for non-commercial use (or
something)
Dave Long
<dave.long at bluewin.ch> on
Thu Apr 10 07:09:11 PDT 2008
> If you're into esoteric languages, data wrangling, or doing things
> "different" you might want to check out the license, download if
> appropriate, and give it a whirl. If nothing else it's an interesting
> source of ideas.
Given the sigil discussion here, beware that the Iverson-inspired
languages can be extremely terse; if not written in an explicitly
verbose style, the source code becomes very close -- modulo
parentheses -- to a right-to-left byte-code.
David Given:
> APL, in which you can write a program to simulate shuffling a deck
> of cards and then dealing them out to several players in four
> characters, none of which appear on a standard keyboard.
for example, an APL counting sort might be defined as:
+/(ω°.=α)/α
and here are two complete J programs along with most of a third:
echo +/(}.<}:)(32 9 10{a.)e.~' ',stdin ''
(#~[:(0=>./)[:,/[:([:}.([:i.#)=[:|(]-"1{.))\.|:)(i.A.~[:i.!) 8
,@(((2&(-~/\))@(I.,#)@],.#~)(1,-.@(2&(=/\))))
(although to be fair, these are like using IOCCC entries as examples
of C)
I haven't looked closely enough at the Kdb+ material to see what they
have for introductory material; when first looking at J I found it
useful going through Iverson's publications, eg. his Turing award
lecture, just to retrain my eye. (a friend who was studying russian
once remarked that at the start it felt like "being in kindergarten
on mars") It was also interesting to notice that, in retrospect, the
relative paucity of control structures in APL may have been partly
due to Iverson's fondness of recursive definitions to generate
fixpoints.
Bonus points for whoever can figure out how to smoothly extend the
nice monoidal properties of these languages to arbitrary monads,
while simultaneously taking advantage of the expanded character set
available with modern support for Unicode to produce strictly self-
tokenized agglutinative expressions.
-Dave
:: :: ::
Anyone know of a language (pace Squiggol) that requires use of
blackboard bold?
cf
http://en.literateprograms.org/Word_count_%28J%29
http://en.literateprograms.org/Eight_queens_puzzle_%28J%29
http://en.literateprograms.org/Look_and_say_sequence_%28J%29
fortune(1):
> 'Tis the dream of each programmer
> Before his life is done,
> To write three lines of APL
> And make the damn thing run.
More information about the FoRK
mailing list