News for hackers. Stuff that matters.
Re:Klong: A Simple Array Language by andoando on Friday June 20, 2025 @03:29PM (#44331140)
I mean its not that bad.

You just go right to left. 1/2 applied to x^ so x^(0.5), _ is floor so floor of x^0.5. ! creates an array of numbers up until floor of x^0.5. 2+ just adds 2 to every number, and then I lost interest in learning the rest lol.

Yeah I like the python equivalent def is_prime(x): return x > 1 and all(x % i != 0 for i in range(2, x))

Re:Klong: A Simple Array Language by fuzztester on Saturday June 21, 2025 @06:15AM (#44336264)
I wonder what the relative performance of the two snippets (Klong and Python) is.

Not at a computer now, can't check.

Re:Klong: A Simple Array Language by why218 on Saturday June 21, 2025 @04:03PM (#44340355)
im not sure about about klong as it is a hobby project but official veriants of k and q(the wordified k that is somewhat popular in finance) are supposedly quite fast. In the world of industry that is actually these languages main claim to the niche fame they do have.
Re:Klong: A Simple Array Language by fuzztester on Monday June 23, 2025 @04:44PM (#44359887)
thanks. i had tried out q for a few days, some years ago. yes, I had read that they are supposed to be fast.