Live data from Hacker News

K: We need to talk about group

gist.github.com

71–80 of 102 posts

Re: K: We need to talk about group

#71
post #16
post #12

It’s awe-inspiring to see a K program where the comments are in another APL variant (I can’t pretend to know which): {d:~1=':s:^x / s‿e←1⊸»⊸(>⋈ This program implements a Pigdog Latin translator, bien sûr .

I... just can't. I work a lot with data, so it sounds like it should be a good fit for what I do, but I find that writing the damn code in a normal language is much more productive. Maybe it's my brain that's wired wrong, but I fail to see how the entire construction is supposed to help.

How long did you try? And what languages do you use?

Re: K: We need to talk about group

#72

Earlier quoted context omitted.

ngn k : https://codeberg.org/ngn/k kona : https://github.com/kevinlawler/kona alto a javascript implementation even with a graphics library : https://github.com/JohnEarnest/ok edit : assuming you were talking about k and not freq

Ah, look at that ngn k link. They even golf the file names of the source code of the interpreter itself :D

Not golf; that’s the norm. Makes things easier to fit a page without scrolling and looks/feels more like programming in k.

https://code.jsoftware.com/wiki/Essays/Incunabulum

Re: K: We need to talk about group

#73

What is group?

Good point - added a simple explanation in the article: Group tells you the places each element occurs in a list. It generates lists of indices.

Nice! Sounds useful for scatter and gather algorithms

https://en.wikipedia.org/wiki/Gather/scatter_(vector_address...

Re: K: We need to talk about group

#74

Earlier quoted context omitted.

A friend worked on a project in 2005 that had lots of K code in production. They had a contract with Kx Systems and Arthur Whitney in particular because, in my friend's opinion, only Whitney could really understand K code well enough to debug it. Friend's description was it took my friend two days just to comment the code into something grokkable by a normal developer, whereas AW didn't need to do that. Of course, it…

In my experience this practice isn’t obfuscation or for performance. The whole point of array processing languages is to amortize any fixed operation cost over the span of the array. The notation-as-a-tool-of-thought camp prefers short identifiers on the principle that the more concise the expression, the easier it is to comprehend in total. This is not at all dissimilar from the general practices of mathematics.

Once you get used to it, it's just faster and stop noticing the 'oh line noise' thing. But like learning a natural language, you need to get to the point where you stop translating in your head and you think in the operators. Once you reach that, it is very hard to go back.

Re: K: We need to talk about group

#75
post #16

Earlier quoted context omitted.

I... just can't. I work a lot with data, so it sounds like it should be a good fit for what I do, but I find that writing the damn code in a normal language is much more productive. Maybe it's my brain that's wired wrong, but I fail to see how the entire construction is supposed to help.

A friend worked on a project in 2005 that had lots of K code in production. They had a contract with Kx Systems and Arthur Whitney in particular because, in my friend's opinion, only Whitney could really understand K code well enough to debug it. Friend's description was it took my friend two days just to comment the code into something grokkable by a normal developer, whereas AW didn't need to do that. Of course, it…

And Whitney is into being able to see the whole code at a single glance as far as I know.

Re: K: We need to talk about group

#77

Earlier quoted context omitted.

What is a trade engine?

The actual thing that lines up a series of sell-at-this-price bids and the series of buy-at-this-price bids (or even more complicated types of orders, this the easy case) and crosses them over, figuring out who gets what bids filled by whom at what price, at supremely fast speeds and large volumes.

I think I’ve only heard of such a component referred to as a matching engine.

Re: K: We need to talk about group

#78
post #25

Earlier quoted context omitted.

I am happily programming in a for 6 years now, and will not give it up

Happily programming in a what?

Arthur Whitney (creator of many APL dialects) created A, then Morgan Stanley extended it into A+.

So maybe simply „a“ was the name.

Re: K: We need to talk about group

#79
post #63
post #29

Earlier quoted context omitted.

Amazingly, APL is more readable. Actually, it's even pretty intuitive. Which proves again, that restricting code to ASCII when every competent programmer (and PC-user in general) can enter almost any unicode symbols just fine is simply stupid.

You can enter any symbol but not quickly unless you set up some hotkeys or something. There is a key on the keyboard for e. Whatever you have to do for a unicode set symbol, it's going to be harder than hitting the e key. And with regards to hotkeys, let's say you do Ctrl+alt+shift+esc+e to insert a unicode symbol, is that really better than just having a programming language where the common hotkeys are spelled out…

> There is a key on the keyboard for e. Whatever you have to do for a unicode set symbol, it's going to be harder than hitting the e key.

Seems https://fluxkeyboard.com/ might be a great fit for programming in APL and similar.

Re: K: We need to talk about group

#80
post #63
post #29

Earlier quoted context omitted.

Amazingly, APL is more readable. Actually, it's even pretty intuitive. Which proves again, that restricting code to ASCII when every competent programmer (and PC-user in general) can enter almost any unicode symbols just fine is simply stupid.

You can enter any symbol but not quickly unless you set up some hotkeys or something. There is a key on the keyboard for e. Whatever you have to do for a unicode set symbol, it's going to be harder than hitting the e key. And with regards to hotkeys, let's say you do Ctrl+alt+shift+esc+e to insert a unicode symbol, is that really better than just having a programming language where the common hotkeys are spelled out…

I have the apl keyboard set to super so ∊ is exactly as hard as E.
Post reply on HN