?

Log in

No account? Create an account
Ouatic-7
ouatic_7
.:..::::.:. .:...:: ..:.:.....: .... ..:: .:::: ..: .::: .: ::: .:::.:.:.:.
Ouatic-7 [userpic]
My Husband is the Quippiest

Husband:

Looks like an emoticon for a Gilbert and Sullivan opera.


Original email:


Excerpted from a Sun forum:


Not that this has anything to do with Java, but my dad,
a retired electrical engineer, has been trying for some years to get me
to learn J, just as I have been trying to get him to learn Java. (J is
the successor to APL - www.jsoftware.com ) Neither one of us has
succeeded in convincing the other yet.

None the less, out of the blue he sends me the following
mail that included quicksort written in J. I thought I'd pass it on so
you could see the beauty of some of the alternatively languages that you
could be learning.

-------
qsort =:
]`(($:@:((}.<:{.)#}.)),{.,($:@:((}.>{.)#}.)))@.(*@#)


While J is terse, it is so logical that the meaning of
any expression is clear at a glance.

Carpe papillam, OM
--------

Well there you have it. I don't see the conditional
where he selects the median of 3 so I will have to rag him about that.

I think while I'm at it, I'll also tell him that he
should have written it in brainfuck, which is an even simpler if less
succinct language. (Google it and check it out!)

Enjoy!

Tags:
Comments

There is a mistake in the programm. It should be

qsort =:
]`(($:@:((}.<{.)#}.)),{.,($:@:((}.>{.)#}.)))@.(*@#)

(without a colon after < )

Good to know.

So what brought you here? Were you just searching for incorrect implementations of qsort?

:) I tried to find posts about J in livejournal.