A raytracer in 7 lines of 'K'
1–10 of 41 posts
Re: A raytracer in 7 lines of 'K'
#2Re: A raytracer in 7 lines of 'K'
#3Re: A raytracer in 7 lines of 'K'
#4Voted up in hope that someone can adequately explain that piece of code frighteningly close to line-noise.
Re: A raytracer in 7 lines of 'K'
#5Voted up in hope that someone can adequately explain that piece of code frighteningly 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.
Re: A raytracer in 7 lines of 'K'
#6As far as readability goes, this might have as well been written in machine language.
Readability is relative. Java is unreadable to my grandmother. Turkish is unreadable to me. In other words, the opinion of someone who hasn't learned a language regarding its readability is irrelevant.
It is true that the way you read a language like this is different from the way you read Java. You don't expect to grok a line of code atomically, then move to the next line. It's more like reading math: you work with each line, understanding what makes it tick. No doubt that doesn't appeal to everyone. But the APL/K/J people do amazing things.
The ultimate answer as to whether or not this is just line noise? http://kx.com/Customers/end-user-customers.php
Re: A raytracer in 7 lines of 'K'
#7As far as readability goes, this might have as well been written in machine language.
Re: A raytracer in 7 lines of 'K'
#8As far as readability goes, this might have as well been written in machine language.
Except that a machine language program would be thousands if not millions of times as long. Readability is relative. Java is unreadable to my grandmother. Turkish is unreadable to me. In other words, the opinion of someone who hasn't learned a language regarding its readability is irrelevant. It is true that the way you read a language like this is different from the way you read Java. You don't expect to grok a line…
What a gem!
I should start a collection of those, every now and then you get these things you can just frame and look at three times a day here.
Re: A raytracer in 7 lines of 'K'
#9Voted up in hope that someone can adequately explain that piece of code frighteningly close to line-noise.
Re: A raytracer in 7 lines of 'K'
#10A. Number of lines of assembler it compiles to
B. Time it took you to write it (no cheating)
C. Number of symbols used (with names being one symbol)