!EjsgbQQNuTfHXQoiax:matrix.org

BQN

886 Members
The BQN array programming language, an APL descendant32 Servers

Load older messages


SenderMessageTime
13 Apr 2024
@vylsaz:matrix.orgvylsazWell I think one shouldn't run cmd.exe with user input to begin with06:31:05
@loke:dhsdevelopments.comloke
In reply to @ecy00:matrix.org
it has two. often but not always IBM-CP-437 and UTF-16.
There is also the locale that is involved. And don't forget about Japanese windows and how it uses a path separator
06:32:12
@ecy00:matrix.orgLoneTechsort of. the path separator is just an illegal character as far as the fs structures are concerned. lots of those, not to mention special device names. 06:33:10
@loke:dhsdevelopments.comloke* There is also the locale that is involved. And don't forget about Japanese windows and how it uses a diffrrent path separator, which leaks into the unicode representation of files06:33:20
@ecy00:matrix.orgLoneTechmacos also has multiple path separators (classically : or unixly /)06:35:11
@ecy00:matrix.orgLoneTechit just happens to leak less because many systems use : for other special uses, but / leaked all the same in classic macos, archival tool ports had to translate06:37:27
@ecy00:matrix.orgLoneTechfound via a cygwin mailing list discussion highlighting how cygwin and msvcrt disagree on quoting: https://learn.microsoft.com/en-us/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way06:40:50
@loke:dhsdevelopments.comlokeBut when they moved to OSX the API's were all Unix and the UI handled all the conversion. That's the right thing to do, and something Microsoft always takes to do. Like the Program Files directory being localised in the filesystem instead of in the UI. Or early versions of VBA having different reoresentations of translated commands so files were incompatible between different languages.06:42:12
@loke:dhsdevelopments.comloke* But when they moved to OSX the API's were all Unix and the UI handled all the conversion. That's the right thing to do, and something Microsoft always fails to do. Like the Program Files directory being localised in the filesystem instead of in the UI. Or early versions of VBA having different reoresentations of translated commands so files were incompatible between different languages.06:42:45
@ecy00:matrix.orgLoneTechExcel did that mess before VBA, I think. And it did it worse; it remapped hotkeys too.06:44:15
@ecy00:matrix.orgLoneTechhuh. I guess Rust people got the idea that cmd was the special case from that article. meanwhile, batch files were originally executed by command, not cmd, and it had different rules still.06:50:28
@ecy00:matrix.orgLoneTechand the command interpreter is another configurable choice06:50:50
@ecy00:matrix.orgLoneTechI wonder how many people have it set to powershell?06:59:47
@dzaima:matrix.orgdzaima LoneTech (well, not just rust, but a bunch of languages, i.e. all that want to be sanely usable; but unfortunately windows sucks at allowing for sane things to exist) 13:01:52
@dzaima:matrix.orgdzaima (and we all know that if multiple language runtimes mess up the conversion (if this case even qualifies as "messing it up"), individual language users will sure as hell mess it up a ton more, you just won't get to assign a single nice CVE for it) 13:06:03
@vylsaz:matrix.orgvylsazAnother bug on windows... weird newlines with redirected output18:50:07
@vylsaz:matrix.orgvylsaz I think it's caused by •Out mixes replxx_print and standard putchar() 18:51:50
14 Apr 2024
@_discord_130979493027250176:t2bot.iosimpalaxy joined the room.08:07:05
@_discord_671689100331319316:t2bot.iobrian_e i want to apply 4 functions where each function is applied to one group, but the primitive doesn't always return 4 groups, so i can't just use ¨. I do have a solution but i don't like it that much
i←0‿0‿1‿1‿2
funcs←{∾⟜𝕏}¨↕4

funcs{𝕎𝕩}¨i⊔"abcde" # expected equal prefix

(funcs⊏˜⍷i){𝕎𝕩}¨i⊔"abcde" # works but not great

Is there some other way to group with a specific amount of output lists, or maybe not needing the ⍷i?
22:24:49
@dzaima:matrix.orgdzaima you can just 4↑𝕨⊔𝕩 22:25:29
@dzaima:matrix.orgdzaima that'll always pad with empty arrays 22:25:37
@dzaima:matrix.orgdzaima ⍷i probably doesn't even do what you want on i←0‿2‿1, and errors on i←2‿1 22:27:38
@_discord_671689100331319316:t2bot.iobrian_e oh nice, for some reason i thought 4‿4‿4‿4‿4⊔"abcde" would return ⟨"abcde"⟩ instead of padding the first 4 spots with ⟨⟩ 22:28:02
@dzaima:matrix.orgdzaima that's what APLs is more like 22:28:23
@_discord_671689100331319316:t2bot.iobrian_e and yeah now my solution is very broken 22:28:25
@dzaima:matrix.orgdzaima but BQNs always puts things at the exact indices in 𝕨 22:28:39
@_discord_671689100331319316:t2bot.iobrian_e that's nice 22:28:48
@_discord_671689100331319316:t2bot.iobrian_e thanks 22:29:00
@dzaima:matrix.orgdzaima (also, instead of 4↑𝕨⊔𝕩 there's (𝕨∾4)⊔𝕩 depending on how you're feeling) 22:29:05
@_discord_671689100331319316:t2bot.iobrian_e uhhh𝕨∾4 does look disgusting i must say but that's neat i guess? 22:30:15

Show newer messages


Back to Room ListRoom Version: 6