🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
tbrowder anyone have any experience with nixos running on debian? 14:41
ugexe hmm, not sure im a fan of the docs site changing cntrl+f behavior to focus on the search bar instead of letting me use the browser search 15:36
librasteve github.com/Raku/doc-website/issues/358 15:46
github.com/Raku/doc-website/issues/344
ugexe: join the queue
ab5tract librasteve, lucs, and to whomever else it may concern: R#5550 is now addressed :) 16:37
linkable6 R#5550 [open]: github.com/rakudo/rakudo/issues/5550 [Fixed in RakuAST] Simple literal-only regex fails
librasteve ab5tract: awesome job ... very tricky and your explanation is clear and illustrates how these corner cases were not caught in over 6 years 16:58
have you checked if there are other, similar conditions that could arise eg. is memcmp sometimes given 64-bit byte strings (this is just a guess ... but I think that we would like to be confident that similar, but different regex patterns are not going to trip over a closely related mechanism 17:01
coleman ugexe: I agree. I kind of wish I'd pushed back against it more when it went in. Some people really like the shortcuts, but I think we can give them what they want, just not by default. My comments here: github.com/Raku/doc-website/issues...2068134677 17:02
librasteve amen to this ... To be honest, I don't think we should take over any key combos at all. 17:03
coleman GitHub does it in SOME UI views, like interactive code editors. They do it well. They also have billions of dollars and thousands of JavaScript devs lol 17:05
librasteve [don't mean to dump on innovation ... but in general you need to cover a LOT of corner cases for overrides like this to avoid user frustration ... eg iPads, touch in general, etc and on every browser / OS combo .... its doable for github with their deep pockets and resources ... btw they capture the '/' key for search and not the ctrl-f] 17:07
coleman they use '/' in most views, yea. And while i never use it, it doesn't get in my way. They take over Ctrl+F here...Another feature I rarely use github.com/Raku/doc-website/edit/m...ANGELOG.md 17:10
(interactive editing)
But anyway, your point stands.
librasteve getting brainfade ... what s the right way to test for true/false in a when statement? 17:29
lizmat when 42.so { } 17:30
when 42.not { }
librasteve ^^ ??
librasteve aha! thanks!
lizmat m: when ?42 { } 17:31
camelia ( no output )
lizmat m: when !42 { }
camelia ( no output )
lizmat shorter versions
librasteve .oO
lizmat inspired by the error message 17:32
m: when True { }
camelia Potential difficulties:
Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead
at <tmp>:1
------> when ⏏True { }
librasteve m: given 1,1 {when ?,? {say 'yo'} } 17:33
evalable6 (exit code 1) 4===SORRY!4=== Er…
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Prefix ? requires an argument, but no valid term found. Did you mean ? to be an opening bracket for a declarator block? at /home/glot/main.raku:1 ------> given 1,1 {when ?⏏,? {say 'yo'} } expecting any of: prefix
evalable6 librasteve, Full output: gist.github.com/8592cd0ab86ace2943...1354134378
lizmat m: dd (1,1) 17:34
camelia (1, 1)
lizmat m: dd (1,1).^name
camelia "List"
lizmat m: given 1,1 { say .^name } 17:35
camelia List
librasteve m: given 1,1 {when ?$,?$ {say 'yo'} }
evalable6 (exit code 1) 4===SORRY!4=== Er…
Raku eval yo
evalable6 librasteve, Full output: gist.github.com/68f96db36d0ddf8178...a464d9b1fd 17:35
librasteve discord bot swallows _ 17:36
ab5tract librasteve: thanks for that feedback, it's much appreciated. I strived to match the expectations you mentioned (irclogs.raku.org/raku/2024-04-15.html#11:09), since I've felt the same about previous bugs (and this one too) 18:29
ab5tract re: your question, thankfully this codepath is well-protected from non-32-bit sized characters 18:31