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 th…
Stages of denial in encountering K
71–80 of 432 posts
Re: Stages of denial in encountering K
#72> 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.
>Good luck fitting an operating system, web browser or air traffic control system into a page of code.
Aaron Hsu's co-dfns compiler (optimizing compiler for a subset of APL to the GPU) is 3 screens https://github.com/Co-dfns/Co-dfns/tree/master/cmp (I can fit the entire codebase on my three monitors).
This K text editor is way less than one screen https://kparc.com/edit.k (Funny you should mention OS. I'm eager to see how many pages kOS is. AW notoriously hates scrolling.)
Web browsers are a lost cause, I'll give you that one.
Re: Stages of denial in encountering K
#73Re: Stages of denial in encountering K
#74Earlier quoted context omitted.
> The post mocks the mindset featured within your comment. Actually, the post pretends you know nothing about functional programming and then presents K as the solution–but, as the grandparent points out, it’s not the only one. The post actually has no comment on this. (I should also note that smugly mocking a mindset by reducing it to a caricature might help explain why people are exasperated by the post’s patronizi…
The post sort of comments on that by claiming that K's somewhat cryptic-looking operator-style functions are more legible than named counterparts. > Does giving a K idiom a name make it clearer, or does it obscure what is actually happening? sum: +/ raze: ,/ ordinal: > The word “ordinal” can mean anything, but the composition (Didn’t click for me but I also didn’t spend a while on it, whatever.) However, one should n…
Re: Stages of denial in encountering K
#75Earlier quoted context omitted.
Really? That’s quite surprising; I would expect all of them to have some sort of “programming languages” course or similar…what classes do they have then?
My CS program (class of 2007) was mostly c++. There was one semester of Java, but it was optional. We learned fundamentals, discrete math, symbolic logic, and also "databases" (read: MS Access), object-oriented design, and I forget what else. With the benefit of hindsight, I feel like I overpaid for that education :)
I’m really surprised your CS degree didn’t cover operating systems, compilers, or algorithms. CS students at my school are required to take all of that stuff (and a lot more, including everything you’ve mentioned) before they even finish 3rd year. In 4th year they’ll be studying things like networking, real-time programming, computer graphics (physically-based rendering), machine learning, and computational math (for simulations, numerical solvers, linear and nonlinear optimization, etc).
Re: Stages of denial in encountering K
#76Knuth tried to move us to that state with Literate Programming. How many K programmers use Literate Programming? One? Two? Any?
Re: Stages of denial in encountering K
#77> Leaning back in your chair, you think to yourself:
> |/
what does this translate into?
Re: Stages of denial in encountering K
#78author ended article with > Leaning back in your chair, you think to yourself: > |/ what does this translate into?
Re: Stages of denial in encountering K
#79Earlier quoted context omitted.
k is perfectly readable. That's like, one of the biggest points of the post. The post mocks the mindset featured within your comment. None of the languages you listed are quite as readable as k to someone who knows it. All of the languages you listed are significantly slower and feature none of the benefits of a concise notation, even with fast.ai's Python style guide made to imitate Arthur Whitney. http://www.eecg.t…
> 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.
That's not true. Languages vary tremendously in how readable they are to people that know them. Especially if you set the bar for "knowing" at a consistent number of hours invested.
A language that's total noise at hour zero could also be the easiest to read at hour 20, and 40, and 100, and 1000...
When a language is something you're supposed to be doing real work in, as a core part of your job, it's perfectly reasonable to require some amount of training before you're set loose.