Preferences

I just fail to see the point. I could see the use for some convenient functions for array manipulation, but why not just implement these as a library in any existing language?

>This allows one to think faster and further than they could encumbered but a heavier syntax.

How does the programming language limit your ability or speed of thinking, lest when the fundamental data types and operations are the same? The hard work is always knowing what to implement. Saving some keystrokes for reversing an array or whatever other array manipulation is hardly a game changer.


why218
I think there is literally nothing I could say that would change your mind. You've already decided what you think. There are a number of benefits but none that I could write out and have you someone who is uninterested immediately take my word for it and go home a fan. But I'll try to answer your (probably rhetorical) direct question. "How does the programming language limit your ability or speed of thinking". Again tell me how it is you do difficult math? Do you write out english or do you work with notation that makes it easier to feel and calculate your way through a problem. if you wanted to write a program in a new domain do you honestly think you would come to the same level of understanding of the topic at the same speed if you use assembly vs python. Yes the hard work is knowing what to implement; arrays languages help its users know what to implement. Ultimately, these are all just claims I can't prove to you what experiences you will or wont have if you learn the languages. You wont just believe and you shouldn't just believe me. If you are interested, learn more and try it out! (theres the apl and k wikis, a discord called the aplfarm a podcast called the arraycast etc.) If not just write array languages off and move on.
andoando OP
Most programmers don't do any math at all, so maybe this is just a niche thats not relevant to most of us, but to answer your question:

If I am thinking about any problem, its outside the scope of any programming language in the first place. My point is, modern functions already make array manipulations simple enough. Even if you're doing something like coding LLMs from scratch, numpy, list concatenations, list comprehension, lambdas, stream/map/reduce all exist and its not nearly an issue to implement them, as is the case for writing assembly vs python.

The prime example in python for example looks like this: all(x % i != 0 for i in range(2, x)) This pretty much does the same operations in the same order on the same fundamental data structure, so I just don't see what's fundmenetally different about the Klong way of thinking.

Anyway, I don't mean to argue, if it works for you great, I wish I had something new

why218
My point with math is not that this only applies to fundamentally math like things but that these languages do for programming what the math notation does for math problems for me. "if i am thinking about any problem, its outside the scope of any programming language in the first place" yes I felt this way too before I learned an array language. Sorry that was a rude way to put that but I do genuinely mean that. Array languages help me solve problems I wouldn't know how to solve otherwise. that python code looks suspiciously full of symbols and one character variable names :). Maybe it would be easier like this: all(exes modulo index not equal zero for index in range(two, ex)).
why218
one of the biggest differences between the k way and the python way too is actually limitation. in practice python has a bunch of stuff that doesnt fit too well together necessarily but that you can put together to make whatever you want often without much knowledge underlying what youre using (like how one can make a neural network with no linear algebra knoweldge) in the array languages you have a set vocablary and only a few ways of putting them together such that you become fluent with the whole languages and you brain starts to just put whole correct functions or programs together in the way one might do with a natural language you know well. Its a great exprience and it changes how you think. HOWEVER, I wont pretend for a second this does not come at a cost. The real power comes from fluent use of a small vocabulary meaning you dont get the immediacy of libraries, IO has to be dealt with by the programmer more so than in languages where you have alot of help form libarires and frankly non algorithmic code in these languages can be really funky and rarely as good. Unless you are writing very algorithmically intense stuff imo array langagues are best suited to embedded use in another language or not at all. For you and for most people I think things like the python you've shown there works plenty well enough.
It's not about saving keystrokes, it's saving brainpower and effort when reading, writing, and modifying code. Instead of thinking about control flow and nested loops when doing multiple complex operations on an array, you're thinking only about the array operations. Abstracting away the loops and control flow frees the programmer from the most tedious and error-prone parts of programming.
sundarurfriend
> library in any existing language

An example of this is APL.jl [1][2]

It seems more of a proof-of-concept than a real implementation though - at least, the APL wiki calls it a "toy dialect of APL" and says that it "works on a minor subset of APL". [3]

[1] demo: https://nbviewer.org/gist/shashi/9ad9de91d1aa12f006c4 [2] repo: https://github.com/shashi/APL.jl [3] https://aplwiki.com/wiki/APL.jl

andoando OP
This looks more like an interpreter. What I mean is just take the symbols in Klong and write them as methods on arrays. Sure the syntax won't be the same, but does that really warrant a whole new language?
Why not a whole language when so many problems can be easily reduced to these few methods?

It's worth noting that almost all array languages are interpreted, and iteratively constructing a program in the interpreter is common. This style would be painful in a more verbose and lower-level language but works great for ultra-high-level array languages.

nine_k
> why not just implement these as a library in any existing language?

I bet you heard about NumPy :) (Also Pandas, Polars, etc.)

This item has no comments currently.