Live data from Hacker News

Stages of denial in encountering K

nsl.com

51–60 of 432 posts

Re: Stages of denial in encountering K

#51
post #41
post #36

This looks cool, seems like it's proprietary and expensive though. Is there anything similar that's free?

https://www.gnu.org/software/apl/ Most likely available through your package manager.

Better:

Free software K interpreter:

https://bitbucket.org/ngn/k/

Arthur's K interpreter isn't actually that expensive for casual use anymore (it's free for most non-commercial use and you can download it off the Shakti website pretty easily), though. Not that I'd recommend it: Arthur's a genius, but nothing's worth using proprietary software for.

What I usually recommend for learning the paradigm is J, largely because it has far better resources than anything else in the space. J's labs are wonderful, and the books Ken Iverson wrote before he died (all available for free) are great both for learning the language and also for learning many other things.

GNU APL is nice, and by no means am I trying to diss it: it's just not the best for learning, in my opinion. Its info pages are really nice though, like most GNU info pages.

Re: Stages of denial in encountering K

#52
Not mentioned in the article is that the K programming language is used for kdb+, which is a fast in-memory time-series database that's heavily used in the finance industry for securities trading systems. I've worked with it a tiny bit, but the pros are all Dark Wizards.

Re: Stages of denial in encountering K

#53
post #23
post #21

Earlier quoted context omitted.

> k is perfectly readable [...] to someone who knows it A great example of a tautology. Every language in existence passes this test... The real test is a language that is readable by those who don’t know it.

If you don't know the language, you won't be writing, editing or improving code in it anyway. Your test is therefore irrelevant for programming languages.

If people don't know a language, yet find it readable, they are more likely to end up getting involved in doing those things.

Poor readability is not a good way to keep people out; you're not selecting for talent.

Re: Stages of denial in encountering K

#56

    K       +/!100
    Python  sum(range(100))
    Haskell sum [0..99]
    Rust    (0..100).sum()
    Ruby    (0..99).sum
There are plenty of ultra-concise languages for toy problems like these; they are called ‘golfing languages’. Ultimately it's a bit pointless since most of the time people aren't playing code golf.

(The issue with setting everything to obscure ultra-compressed keywords isn't that it's not possible to learn those keywords, but that most of the time programming is done over specific and customized domains with larger and problem-specific vocabularies.)

Re: Stages of denial in encountering K

#57
post #47

Are reduce and lambdas really that cryptic/complex to people? I think I need an adult. -.-

It's definitely more cognitive load to x people where x = 'some' or 'most'. It does not matter what x is, your change will be rejected.

Sounds like a recruiting problem, or possibly a training one.

Re: Stages of denial in encountering K

#58
Only because earlier today I so definitely thought about the whole "code is a liability (debt)" reality we all live in... that is to say, I'm spit-balling here:

but for once K makes me go "oh shit!" and not because of the craziness of its syntax... rather, if that syntax is so precise/terse, and even if to the outsider it looks fucking insane, does it have a wicked lower TCO because you literally have insanely less lines of liability in your code, libraries, dependencies, etc?

Is that the reason finance uses it, they maybe empirically know what the rest of us don't seem to grasp? Or just because it's so domain specific? Or... something else entirely?

Re: Stages of denial in encountering K

#59
post #43

Earlier quoted context omitted.

For you, not for anyone actually working with the language. Which again points to the test being entirely irrelevant for the stated purpose. Some random high school student probably can't read your Swift. Sure, it might help them out somehow with the Excel functions they're needing, but it doesn't change whether or not Swift is a good or bad language, or whether the test actually means anything significant.

I think a random high school student who has just finished AP Computer Science should be able to read my Swift, at least when the task itself is not complicated. Maybe not all of it, but I think it's a failure if they can't get the gist of it. (Interesting anecdote: I have gotten emails from people who have translated some of my Swift code which talked to an API endpoint I reverse-engineered to their platform of choi…

You added more criteria to this high school student. Almost every one of them will have to use and program spreadsheets, few learn to program using an ALGOL-like language.

The idea you put forth disqualifies any programming language that isn't derivative of ALGOL: it's exactly the sort of thing used against Lisp dialects, and many other languages that have shown themselves to be quite wonderful ("What's cdr? That's stupid!" "You're telling me you use color instead of operators? Malarkey!" "What in Hell is Reverse Polish Notation?! This is America!").

APL (and derivatives, but using APL as it's the chief example of the paradigm and because if you know APL, k is readable) doesn't require a semester in a classroom, it requires a week or two and a book.

(Question: when did they start teaching AP Computer Science?)

Re: Stages of denial in encountering K

#60

> 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 one page of APL

Post reply on HN