@xpqz Yeah, but there isn't much of a difference between the length of APL's code (which says what happens with uneven lengths) and using Python's built-ins. And furthermore, APL's code can be customised to do specify other behaviours than cutting short. Try erroring or filling on unevenlengths in Python!
@dzaima (been sitting looking at the language bar trying to think of more primitives that error "helpfully" for a while, but that's only resulted in a 12-byter)
<phantomics> Also had a question about your APL, is it usable within Java the way April is usable within Common Lisp? Can you evaluate an APL string on an array or scalar value within a Java program?
phantomics: there'd have to be an interface for doing that well, as I have custom types around all types as native Java arrays can't hold shape/rank information. But with some intermediate conversion, it's definitely feasible
@dzaima (luckily, i (can't remember if publicly) already hated the idiom i've used there that makes it do that)
@dzaima (and yes, the 6-byter in BQN also gives a wrong result for ⟨1‿2‿3‿4‿5,⥊¨"abc"⟩)
(if i haven't criticized the idiom, i definitely have the thing that makes it do the funky disclosing)
@ngn unless you're forcefully filling up every line to the width of your screen, spaces will only "bloat" source code size (who cares about that?), and, at worst, probably [citation needed] won't affect "readability", and, at best, improve it significantly
We've decided to revive the Language of the Month event. We've also decided to start a new post for nominations. (You can see the old nominations post here.) So let's get to nominating!
Procedure
A language can be nominated for Language of the Month by posting an answer to this thread. We all vot...
By the way, Partition representations is the guide to always knowing how to split up data. BQN's group (⊔) uses target indices like Dyalog's ⊆, but it actually uses the numbers as indices instead of just looking at where they change, and you can rearrange them to group distant cells together.
@Razetime Yeah, seems to be kind of a contest of which language's partition method happens to do what the spec wants out of a large number of reasonable options.
Given a list of integers L, and an integer N, output L splitted in N sublists of equal lenghts.
Non-divisible lengths
If N does not divide the length of L, then it is not possible that all sublists have equal length.
In any case, the last sublist of the output is the one that adapts its length...
Also reasonable at 20. Get division endpoints from beginnings by shifting in the total length at the end, lengths by subtracting beginning from end, and indices with Indices/Where (/).
Just for completeness the third way through the diagram is 22.
I went looking for how to outer-product in J ( aplwiki.com/wiki/Outer_Product ) but instead found how to run J Server via COM; turns out it's also easy to use from PowerShell after running the jreg.cmd to register it, $j = New-Object -ComObject "jexeserver"
Then you can $j.Do("q=.i.9"); $x=$null; $j.Get("q", [ref]$x)
@ngn that's the more understandable answer. (one could also say the space can be a disambiguator)
@dzaima but in most cases it's not disambiguating, like in APL, but just as it's pretty helpful for the sentences to be very visibly separated (when not looking directly at the separator), it can be beneficial in code
@RGS I've lately begun to put the locals on a separate line, especially if there are a few of them. And on multiple lines by name class or by usage if there are a lot of them.
I have wondered if there are any English words with a space in them. It doesn't seem like it, but then English has so many broken "rules" that it would be surprising if "space separates words" is an unbroken rule.
@TessellatingHeckler Well, kind-of. There are compound nouns that in related languages would be written without space. E.g. full moon which in Danish is fuldmåne.
@dzaima sure, generally, but where does that definition come from? There are current or ancient writing systems with no spaces between words. English has no "Académie Française" to officially make rules about the language. English words have "foreign" letters and accents sometimes, hyphens, apostrophes, compounding, many loan words ... it wouldn't surprise me if there was some argument of a single word with a space in it.
@TessellatingHeckler i mean, sure, you could define "single word" to be a single word, but that wouldn't be very helpful. hyphens, apostrophes, etc are a more confusing topic, but i'm pretty sure a space can't be a part of a word
@dzaima that page includes a mention of German "Similarly, some have separable affixes; in the German sentence "Ich komme gut zu Hause an", the verb ankommen is separated."
@TessellatingHeckler i'm mainly talking about english here, but even there space isn't part of the "word" (wouldn't " gut zu Hause " then count as "part of the word"?)
but, as with most of linguistics, agreement is definitely unattainable :)
@dzaima I was also talking of English originally, just noticed that. I'm not trying to argue it one way or another; it occurred to me that I would be surprised if there is a word with a space in it, and surprised if there was an unbroken rule in English, and presumably both cannot be true, so I wondered which way it resolved. It probably is not attainable agreement. :)
@TessellatingHeckler i mean, the nature of the question is very dependent on the exact definition of what a "word" is, and that's an extremely complicated question no linguist knows the answer to
@Adám assuming that's a response of the parenthesized part, that was an intentionally stupid question
@TessellatingHeckler the word "workspaces" has a space in it :P
"no one", by analogy with "nobody", etc, should have been (or is?) a single word, but it's written with a space to prevent the two "o"-s from merging into a single vowel
The five "Hebrew" final forms are actually Aramaic and of newer origin. Original Hebrew has no final forms, and was apparently always written with spaces or inter-puncts.