!cxPCiPlsXnajakSrqd:matrix.org

Array languages

887 Members
General discussion about APL-like array languages. See #array:matrix.org for other rooms23 Servers

Load older messages


SenderMessageTime
15 Jan 2025
@dzaima:matrix.orgdzaima build CBQN with make o3n, search for si_scan_pluswrap in build/obj2/; gtg sleep 01:04:28
@ngn:matrix.orgngnthanks01:05:57
@dzaima:matrix.orgdzaimait's not that much faster for u32 iirc, and there isn't even a u64 case01:06:36
@ngn:matrix.orgngnoh :(01:06:45
@_discord_870115701279584326:t2bot.iodiscodoug I was planning to try this: https://en.algorithmica.org/hpc/algorithms/prefix/ 01:22:49
@_discord_1024062732254843032:t2bot.ioen.de.lis changed their profile picture.03:48:39
@mlochbaum:matrix.orgMarshall ngn Radix sort moves the elements, counting sort reconstructs them. For small sizes, radix doesn't do as many passes over the counts so it's faster. 04:42:29
@ngn:matrix.orgngngot it04:43:21
@_discord_870115701279584326:t2bot.iodiscodoug @Marshall - For clarity the “elements” here are indices right? I tend to think of “sort” as including the indexing. 05:37:48
@_discord_870115701279584326:t2bot.iodiscodoug Maybe it was taken for granted that we’re after a grade here but I was a little thrown by elements not moving with a sort. 05:41:14
@ngn:matrix.orgngn i believe this is about "sort" as the full {x@<x} not just "grade" 05:49:44
@ngn:matrix.orgngnif you're sorting bytes, you can count how many have values 0,1,2..255 and instead of moving them around, just construct the result from the counts05:50:57
@ngn:matrix.orgngn it would be the equivalent of c:&256; c[x]+:1; &c in k 05:51:37
@ngn:matrix.orgngn note how &c generates the correct result without any swapping or indexing or amending 05:52:34
@ngn:matrix.orgngn shorter: &@[&256;;+;1] 05:53:58
@_discord_328851809357791232:t2bot.io.casenc No 08:17:01
@_discord_328851809357791232:t2bot.io.casenc Not at all 08:19:11
@_discord_604614910030118912:t2bot.iorubenverg especially in... you know... a language that uses glyphs that aren't ascii? 08:24:11
@_discord_356107472269869058:t2bot.ioKamila if you store code in strings and want to check for it being palindromic, i guess 08:31:05
@_discord_604614910030118912:t2bot.iorubenverg though i guess at worst you're gonna be using a codepage anyways 08:31:30
@_discord_604614910030118912:t2bot.iorubenverg which for the purposes of the problem is equivalent to just ascii 08:31:39
@_discord_328851809357791232:t2bot.io.casenc Or essentially any human language 08:35:17
@_discord_356107472269869058:t2bot.ioKamila dyalog has optimised codepaths that dispatch on 4 different element types for a character-type pocket 08:36:45
@_discord_356107472269869058:t2bot.ioKamila horrible to look at on some occasions 08:36:59
@_discord_356107472269869058:t2bot.ioKamila i haven't ran any statistics, but i wish that i did, because my suspicion is that 8-bit wide and 16-bit wide pockets would've been the most popular. 08:37:55
@_discord_356107472269869058:t2bot.ioKamila * i haven't ran any statistics, but i wish that i did, because my suspicion is that 8-bit wide and maybe 16-bit wide pockets would've been the most popular. 08:38:00
@_discord_328851809357791232:t2bot.io.casenc Whar 08:38:07
@_discord_328851809357791232:t2bot.io.casenc I'm only saying that "strings can be presumed ascii" is plain incorrect 08:41:07
@_discord_356107472269869058:t2bot.ioKamila ok :). if you assume strings to be unicode and want to write a proper is_anagram function, then you need to keep in mind that... Soeren has 5 alphanumeric characters, on the other hand there are only 6 letters in Aalborg, the word Æterna has either six or seven letters depending on the current locale and α is either a letter or number, where in the latter case it can stand in for an one. to my knowledge no array runtime handles these correctly (just tried Dyalog) and neither of the methods work. 08:51:13
@_discord_356107472269869058:t2bot.ioKamila * ok :). if you assume strings to be unicode and want to write a proper is_anagram function, then you need to keep in mind that... Soeren has 5 alphanumeric characters, on the other hand there are only 6 letters in Aalborg, the word Æterna has either six or seven letters depending on the current locale and α is either a letter or number (ancient greek locale), where in the latter case it can stand in for an one. to my knowledge no array runtime handles these correctly (just tried Dyalog) and neither of the methods work. 08:51:58

Show newer messages


Back to Room ListRoom Version: 6