Mine is Matlab's squeeze. Every time I use it I can imagine my hyperdimensional manifestation pushing the matrix until all those useless dimensions become shiny drops of acid that are slowly absorbed into the surrounding space.
Name:
Anonymous2007-05-04 11:57 ID:cnyX7O40
My favourite function is haskell's Control.Arrow.loop. Every time I use it I can just imagine some fucking java expert programmer looking at my code and squirting in incomprehension at the higher-order magnificence.
Name:
Anonymous2007-05-04 11:59 ID:SCJtKwu6
SciPy's lena().
It generates a cropped Playboy image of dimensions 512x512.
Name:
Anonymous2007-05-04 12:15 ID:P0tpDvAt
>>2
What does the loop function do? I don't get it :'(
Mine is Python's reduce. Every time I abuse it to perform iteration in a single expression, I can imagine the guy who'll have to maintain my code weeping at the horrible monstrosity I've created.
Name:
Anonymous2007-05-06 5:30 ID:1zNC+uAL
Data.Tree.unfoldTreeM :: forall b (m :: * -> *) a. (Monad m) => (b -> m (a, [b])) -> b -> m (Tree a)
Name:
Anonymous2007-05-06 5:33 ID:1zNC+uAL
also, I've recently come to like Data.Generics.Schemes.everywhere :: (forall a . Data a => a -> a) -> forall a . Data a => a -> a
which is like map, but works with any data structure whatsoever.
Name:
Anonymous2007-05-06 14:08 ID:NmUF1r52
JOptionPane. It's like cout and MsgBox but customizable. I always build a wrapper around it, name it "say()" and pass stuff to it that the user should know. You can even make a password input field if you inject a pane into one. Take that, DOS!
In java, it does annoy me that console I/O is convoluted. Fuckers couldn't put a cout and cin at the top of the namespace, and you have to cringe and dig deep into IO structure APIs and object passing when teaching the language to a prospective disciple who knows his easier C / C++ I/O. wtf
>>24
Guess this'll give you an ulcer, but that sort of thing is common in Haskell-land. It's even in the standard prelude, no modules need be imported or anything. "foldl" is the name.
My favourite would be C's ungetc(). I mean, when's the last time you wanted to _un_-get precisely _ONE_ character? It's like a throwback to ancient times, when people wrote parsers that read data character by character using the C standard library, and failure recovery would be via un-getting characters already read...
Name:
Anonymous2007-05-06 19:59 ID:X9KUWwMp
SQL's COALESCE() function
Name:
Anonymous2007-05-06 20:02 ID:T67KtyMO
split() is universally useful when parsing anything text.