5 ms·
Voted up in hope that someone can adequately explain that piece of code frighteningly close to line-noise.
by trezor 17y ago
Voted up in hope that someone can adequately explain that piece of code frighteningly close to line-noise.
- jacquesm 17y agoBe happy it is not APL, where if you need two lines to express your problem you'll be scolded because you programmed it before you properly understood it ;)
- gruseom 17y agofrighteningly close to line-noise That's everyone's initial reaction (it was mine too). But my experience has been that if you suspend initial disbelief and approach the language on its own terms, the result is jaw-dropping awe. http://news.ycombinator.com/item?id=266167 http://news.ycombinator.com/item?id=266167
- gaius 17y agoIt's more readable than Perl :-P
- sp332 17y agoIt's better once you realize that % is the division operator, and math always has right-to-left precedence (3*2+5 yields 21). edit: there's also \:/: which is a cross-product, and ' (single-quote) is like mapcar. More explanations here: http://news.ycombinator.com/item?id=266101 http://news.ycombinator.com/item?id=266101
- silentbicycle 17y agoThe same source, slightly expanded - http://www.nsl.com/k/ray/ray.k http://www.nsl.com/k/ray/ray.k