KlongPy author here: AMA
On Linux rlwrap is used to get the REPL working. Is possible to get the REPL working under PowerShell in a Windows box too?
KlongPy: High-Performance Array Programming in Python
71–80 of 90 posts
Re: KlongPy: High-Performance Array Programming in Python
#72Re: KlongPy: High-Performance Array Programming in Python
#73Re: KlongPy: High-Performance Array Programming in Python
#74I gather where it says `:monad` it is referring to an operation that had an effect on the interpreter state?
No. In APL deriverd array programming languages, verbs (or functions) are monadic or dyadic : they accept only one or two arguments : In '1 + 1', + is a dyadic operator, while in 'exp 5', exp is monadic. In J, and in APL I guess, left arg is usually understood as 'control data', while right arg is the data upon which calculation is done. Left argument is usually left unchanged after calculations. In this way, is it p…
Re: KlongPy: High-Performance Array Programming in Python
#75Earlier quoted context omitted.
> including taking a lot of terminology (rank, etc.). AFAIK that's a linear algebra term for matrices, not something array programming or Pytorch or TF invented.
it's an unfortunate terminology collision. - array languages: rank is the dimensionality of an array, i.e. a vector is rank-1, a matrix is rank-2, a N-D array is rank-N - linear algebra: rank is the number of linearly-independent columns (and also rows) So for example, if you have a 5x5 matrix where 4 of the columns are linearly independent, it would be rank-4 in the linear algebra sense, and rank-2 in the array lang…
Re: KlongPy: High-Performance Array Programming in Python
#76I’ve tried several times to give J/k/Q/kdb a chance but I haven’t really found a convincing example why this approach is better than say SQL or say numpy/jax etc. The syntax has the same problem as perl in that you have to learn too many symbols that are hard to look up. And this combined with the tacit style makes it difficult to parse what the code is doing. I think ruby went in the radically opposite direction in…
There was a step-change improvement for me when I tried expressing some JS patterns via `underscore.js` instead of procedurally: eg: http://underscorejs.org/#each Thinking of something as `each | map | filter | sum` is waaay less buggy than writing bespoke procedural code to do the same thing. No doubt there is a "cost" to it as well, but the _abstraction_ is valuable. Now, if there were a "compiler" which could opti…
Re: KlongPy: High-Performance Array Programming in Python
#77Re: KlongPy: High-Performance Array Programming in Python
#78Earlier quoted context omitted.
Sorry if this is a dumb question, why is this weird in Python? I use R as my main language and this is exactly how I would expect it to work. Does Python not do this naturally?
> sum::{+/x} > count::{#x} These two expressions are not valid in R or Python. They are implicitly declaring a function without declaring the arguments, it is implicitly iterating over the array and returning the result (all features of array languages to make it more concise). Python’s + and / are a function of two objects (dyadic) and are syntactic sugar (they can’t be treated as function values, thats what the ope…
Re: KlongPy: High-Performance Array Programming in Python
#79Related. Others? KlongPy: Vectorized port of Klong array language - https://news.ycombinator.com/item?id=35400742 - April 2023 (8 comments) Klong: a Simple Array Language - https://news.ycombinator.com/item?id=21854793 - Dec 2019 (73 comments) Statistics with the array language Klong - https://news.ycombinator.com/item?id=15579024 - Oct 2017 (12 comments) Klong – a simple array language - https://news.ycombinator.com…
If you've already seen this, and aren't interested in another look then just move on.
Re: KlongPy: High-Performance Array Programming in Python
#80Related. Others? KlongPy: Vectorized port of Klong array language - https://news.ycombinator.com/item?id=35400742 - April 2023 (8 comments) Klong: a Simple Array Language - https://news.ycombinator.com/item?id=21854793 - Dec 2019 (73 comments) Statistics with the array language Klong - https://news.ycombinator.com/item?id=15579024 - Oct 2017 (12 comments) Klong – a simple array language - https://news.ycombinator.com…
Not everyone has read everything that's ever been posted to HN. There's some utility in reposting, which I think is evident based on how many upvotes this has gotten. I'd never seen this and I'm here almost every day. If you've already seen this, and aren't interested in another look then just move on.