What is group?
Group tells you the places each element occurs in a list. It generates lists of indices.
31–40 of 102 posts
What is group?
Group tells you the places each element occurs in a list. It generates lists of indices.
is there any way i can try this out?
https://ngn.codeberg.page/k/#eJxdjssKwjAQRffzFddVFyLFoiiFQD8...
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 .
Isn't the original APL the only lang that uses actual Unicode symbols for operators?
What is group?
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 .
Isn't the original APL the only lang that uses actual Unicode symbols for operators?
APL programmers want to say their language is mathematical notation, well, make it mathematical notation.
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 .
Isn't the original APL the only lang that uses actual Unicode symbols for operators?
https://en.wikipedia.org/wiki/K_(programming_language)
That has to be the tersest language I have ever seen in my life. Code golf but it's actually a real language used heavily in finance.
I think the right intuition for APL-family languages is that they mostly do numpy-like operations except their set of operations tend to compose very nicely. So the idea is that one can quickly and interactively figure out a composition of the operations which will do the calculation you want, but you don’t have a complicated compiler and spend most of your time in the operators rather than the interpreted language, and the operators tend to make the cpu happy – they work on contiguous memory, tend to be vectorized, don’t branch unpredictably, etc – so even if you have to compose many steps, you win on the time to write and the time to execute can be hard to beat because the constant factors of each individual operation are good.
For obvious reasons, things like numpy, pandas, dplyr, etc are more popular as their syntax is a bit more readable and it is easier to get data in/out. I think they do lose a bit by not having lots of the useful compostable APL-style operators because those things don’t have comprehensible names.