Live data from Hacker News

Stages of denial in encountering K

nsl.com

81–90 of 432 posts

Re: Stages of denial in encountering K

#81
Disingenious and unconvincing, like a sales pitch for a product that is actually bad for you.

Yes, that kind of syntax can be wonderfully terse when doing simple arithmetic operations on lists of integers.

Most programming work does not consist of doing simple arithmetic operations on lists of integers.

If you want to convince me that this languagy useable for anything but toy problems specially chosen to demonstrate the language's strengths, show me how it can be used to handle an HTTP request with some special cases for certain headers, or to parse a custom date format with variants, or to implement a game with realtime user input.

Re: Stages of denial in encountering K

#82

> When the entire system fits in a page of code you can understand everything about it from the top down. I'm sorry, but that sounds like the juvenile fantasy of someone who is still in their programming puberty. Good luck fitting an operating system, web browser or air traffic control system into a page of code.

> I'm sorry, but that sounds like the juvenile fantasy of someone who is still in their programming puberty.

For larger applications what PeCaN was saying still mostly holds true.

I work on large (1-10 million loc systems) enterprise java code bases and write some side projects in k as a hobby.

I can get the equivalent of around 30-40 java class files on screen at once with k.

Even on poorly written enterprise code bases code is clustered and your “working set” of code files is quite small and is not strewn all over the codebase.

Of course you still need to understand the core system abstractions + base platform + common library code.

Re: Stages of denial in encountering K

#83

> When the entire system fits in a page of code you can understand everything about it from the top down. I'm sorry, but that sounds like the juvenile fantasy of someone who is still in their programming puberty. Good luck fitting an operating system, web browser or air traffic control system into a page of code.

there almost certainly is an encoding such that every program any human will ever write fits in 128 bytes, though I doubt we'll ever design one. to convince yourself of this, notice that you don't expect to ever produce two programs with the same blake2 hash. there's a lot of room for improvement in conciseness of code. I would still be surprised if it was meaningfully possible to write a full-featured modern OS with…

I think you'd have to write the "Do what I mean." interpreter before you have any chance of making programs that compact.

Re: Stages of denial in encountering K

#84

From Arthur: design goal: speed write fast, run fast, modify fast. minimize product of vocabulary and program size. https://a.kx.com/a/k/readme.txt comprehensive programming environments (programming, files, comms, procs, ...) are depressingly complex. commonlisp, c/lib/syscalls, java, winapi are all in the 1000's of entry points. many with multiple complex parameters. with k we try to do more with less in order to w…

The readme examples remind me of Perl code. Example:

    print!~($/=$")+2*map 1..$s{$_%$'}++,

Re: Stages of denial in encountering K

#85
post #81

Disingenious and unconvincing, like a sales pitch for a product that is actually bad for you. Yes, that kind of syntax can be wonderfully terse when doing simple arithmetic operations on lists of integers. Most programming work does not consist of doing simple arithmetic operations on lists of integers. If you want to convince me that this languagy useable for anything but toy problems specially chosen to demonstrate…

How about an OS?

https://gist.github.com/chrispsn/da00835bb122c42f429a084df83...

Re: Stages of denial in encountering K

#86

From Arthur: design goal: speed write fast, run fast, modify fast. minimize product of vocabulary and program size. https://a.kx.com/a/k/readme.txt comprehensive programming environments (programming, files, comms, procs, ...) are depressingly complex. commonlisp, c/lib/syscalls, java, winapi are all in the 1000's of entry points. many with multiple complex parameters. with k we try to do more with less in order to w…

The readme examples remind me of Perl code. Example: print !~($/=$")+2*map 1..$s{$_%$'}++,

[deleted]

Re: Stages of denial in encountering K

#87
post #30
post #26

Earlier quoted context omitted.

Perhaps, but passing this test implies a lower learning curve, which is extremely relevant for programming languages.

It really doesn't. k's ancestors were taught to high school students and admin in incredibly short spans of time. Here's an anecdote from Kenneth Iverson about a man who learned APL in two weeks, completely alone, and the results after he taught his students it: My daughter Janet attended Swarthmore High School, and recommended Rudy Amann (head of the math department) as an excellent teacher. I therefore approached h…

So then, why is K less popular than pretty much any other language? Because people are stupid? Uninformed? There's a lack of PR-minded people working with K? What exactly is your theory? It's funny that a language this flawless is slightly less popular than S or D or pretty much any other one-letter language. There must be something that makes it unappealing for the masses of programmers - what is it?

Re: Stages of denial in encountering K

#88
post #81

Disingenious and unconvincing, like a sales pitch for a product that is actually bad for you. Yes, that kind of syntax can be wonderfully terse when doing simple arithmetic operations on lists of integers. Most programming work does not consist of doing simple arithmetic operations on lists of integers. If you want to convince me that this languagy useable for anything but toy problems specially chosen to demonstrate…

How about an OS? https://gist.github.com/chrispsn/da00835bb122c42f429a084df83...

This is what - I presume - is their implementation of sending an e-mail

E:[u:();e:{a::?[a;x;y];J(x)+#y};cz:{$[#u;e/_`u;]};kx:{u,:,(j,j+#x;k_a);e[k]x};kb:{$[=/k;J j-1 0;];kx""};cx:{kx cc`};cv:{kx@9'`}] A:[w::_W%F;j::k;k:0 0;J:{k::2#0|x&#a};lx:{J j+x};y::V+F0,j;z::1'(V;w[1]$a)],E

U:{(`Z,'!Z).'+x};V:0;i:0;I::`Z,(!Z)(#Z)!i;y:{I .`y};zf:{$[`kt=x;i+:1;^`W`F?x;I . x;. x]};u::F[0]!#Z;W:{U`V,,u,'0;U`W,,(-':1_u,x),'x 1};z:{U`z;1'(V;U[`a]{$[#x;"";y]}'$!Z;3)} Z:`to`cc`subj`!A$/:4#()

This looks like an exercise in obtuseness.

Re: Stages of denial in encountering K

#89
post #81

Disingenious and unconvincing, like a sales pitch for a product that is actually bad for you. Yes, that kind of syntax can be wonderfully terse when doing simple arithmetic operations on lists of integers. Most programming work does not consist of doing simple arithmetic operations on lists of integers. If you want to convince me that this languagy useable for anything but toy problems specially chosen to demonstrate…

> Most programming work does not consist of doing simple arithmetic operations on lists of integers.

This^^^.

And even when doing simple arithmetic operations on lists of integers it's hard to read unless you've become very familiar with it.

This is no good.

We actually have an in-house DSL with a symbolic representation that looks very similar to K for our reporting system. It's one of my many missions to gradually phase it out in favour of something with either Python or SQL syntax. This will ease onboarding and drive adoption.

The advantage of a language like Python, for example, is that although I wouldn't say I know it, I can read it and understand what's going on most of the time. Same with SQL or Ruby or various other languages.

This makes it easy for people to understand what something is doing just by reading it, and opens up the possibility of learning along the lines of "How did Susan do that?", look at Susan's code, and see something that's fairly easy to read, understand, and remember, as opposed to a screed of arcane looking symbols.

Re: Stages of denial in encountering K

#90

Earlier quoted context omitted.

How about an OS? https://gist.github.com/chrispsn/da00835bb122c42f429a084df83...

This is what - I presume - is their implementation of sending an e-mail E:[u:();e:{a::?[a;x;y];J( x)+#y};cz:{$[#u;e/_`u;]};kx:{u,:,(j,j+#x; k_a);e[k]x};kb:{$[=/k;J j-1 0;];kx""};cx:{kx cc`};cv:{kx@9'`}] A:[w::_W%F;j:: k;k:0 0;J:{k::2#0|x&#a};lx:{J j+x};y::V+F 0,j;z::1'(V;w[1]$a)],E U:{(`Z,'!Z).'+x};V:0;i:0;I::`Z,(!Z)(#Z)!i;y:{I .`y};zf:{$[`kt= x;i+:1;^`W`F? x;I . x;. x]};u::F[0] !#Z;W:{U`V,,u,'0;U`W,,(-':1_u, x),'x 1…

I tend to agree: falls into the category of "just because you can, doesn't mean you should."

Actually, that's perhaps a bit harsh.

I have some pretty obscure hobbies, and there's certainly nothing wrong with doing this sort of thing if you want to. Still, having done so it's a bit rich to then look askance at the rest of us like we're all idiots for not choosing to go down a similar route with our own systems.

Post reply on HN