On Feb 24, 11:18 am, Dimitre Liotev email.com> wrote:
> William James yahoo.com> writes:
>> This does so little that it should be no more than 2 lines.
>> In Ruby:
>
>> S =
>> [ /father|mother|brother|sister/i, "Tell me about your 0."],
>> [ /\b(am|i'm) (.*)/i, ["Why are you 2?","Have you always been 2?"]],
>> [ /\bI was (.*)/i, ["Why were you 1?","I can't believe you were
>
> [...]
>
> He, Ruby is so verbose, both K an Q beat it to death when it comes to
> brevity. Witness the power, a sudoku solver in K:
>
> f:{$[&/x;,x;,/f'@[x;i;:;]'&27=x[,/p i:x?0]?!10]}
>
> Not that I understand what this eyesore means, but according to this
> blog it is supposed to be a sudoku solver:
Boy, I have mixed emotions when reading that. On the one hand, I see
what at first glance appears to be a collection of random characters.
On the other hand, I recognize I have zero knowledge of K, so I'm
slightly curious about a language that seems to take conciseness to an
obscene level.
Here's a question. Would it be easier to add some verbosity and
formatting to make the above K program more readable to those who
don't know K, or to take a readable program in another language and
make it that short? :)