🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku)
Set by lizmat on 23 May 2021.
codesections Wow, that was an unpleasant bug to track down in my code! 02:44
m: my $a = 'foo'; my $b = 'foo' but role {}; say $a eq $b; say $a ~~ $b; say $a (elem) ($b, 2)
camelia True
True
False
codesections I had no idea that a type with a role mixed in no longer counted as an (elem) of a list 02:45
moon-child I guess ∊ is using eqv? 02:50
m: my $a = 'foo'; my $b = 'foo' but role {}; my $c = 'foo'; say $a eqv $b; say $a eqv $c;
camelia False
True
codesections yeah, must be 02:57
moon-child probably should be documented 03:02
github.com/rakudo/rakudo/blob/mast...em.pm6#L85 this is ... a bit strange 03:05
codesections How so? It's comparing the two .WHICH values, which is the same thing &[===] does (at least according to github.com/rakudo/rakudo/blob/mast...em.pm6#L85 ) 03:08
doing it with Str comparison is a bit odd, but I'd assume that's something nqp-related 03:09
moon-child yeah, using string comparison to implement structural equality seems weird to me 03:10
codesections ha, if you're bothered by using Str comparison even when it's on .WHICH, then you _definitely_ shouldn't look at github.com/rakudo/rakudo/blob/mast....pm6#L1210 03:13
moon-child my 03:14
Geth doc: stuart-little++ created pull request #3901:
fix typo in Callable.pod6
04:46
stoned75 releases my $n = <2e0>; say $n.^find_method("Num").candidates>>.package 06:35
commit: releases my $n = <2e0>; say $n.^find_method("Num").candidates>>.package 06:36
committable6 stoned75, gist.github.com/c6f5e3d725a29d5817...ed858a7264
stoned75 I'm wondering if inheriting .Num from Num class instead of Str class would not make more sense ? 06:37
hum... no. I guess it would not work 06:38
or would it ? :-} 06:40
guifa Nice. I got DateTime.fmt working and using basically entirely nqp ops. Even parsing the formatting string on every run, it's only about 3x slower than the raw .Str,which is not bad. bodes well for later use with RakuAST 07:25
lizmat guifa++ 07:42
weekly: vrurg.github.io/2021/06/16/article-on-roles 07:57
notable6 lizmat, Noted! (weekly)
lizmat someone with running Raku on a windows machine: could you tell me the output of: 09:25
use nqp; dd nqp::atkey(nqp::backendconfig,"os")
evalable6 "linux"
MasterDuke lizmat: "win32" 09:26
lizmat ok 09:27
thanks!
Altreus how did evalable6 know to run that
MasterDuke roughly, if a message starts with certain keywords and/or contains a lot of punctuation compared to test (i.e., looks like it might be code), it tried to run it 09:29
AlexDaniel 😁
Altreus aha!
AlexDaniel Actually it attempts to run almost any message
Unless its clearly just text, plus some other heuristics 09:30
But most heuristics look at he output of running the message, not the message itself
MasterDuke m: say $*KERNEL.arch # lizmat this is empty on windows, which causes failing spectest
camelia x86_64
Altreus I guess the question between "this should have run but failed" and "this isn't intended to run" is an unsolvable problem
lizmat MasterDuke: I need something to run from NQP :-) 09:31
MasterDuke no worries, just thought you might be working on code near there
guifa lizmat: I'll also be around later today and doing some Windows testing for UserLanguage if you want me to run anything 13:30
lizmat guifa: thanks, but I think the issue is solved now: I realized I don't need to be able to check for WIndows in NQP after all 13:44
Altreus the best solution is to not have a problem! 13:46
El_Che that sounds like a fallacy
Altreus More like a paradox 13:47
stoned75 :q 13:48
Altreus heh, I tried to sarcastically put :p in response 13:51
But I accidentally typed it into my vim window :D
that seems karmic
El_Che lol 13:53
it looks like my cat
Altreus karma is a great name for a cat 13:56
Geth doc: ada40bc638 | chirvasitua++ (committed by Juan Julián Merelo Guervós) | doc/Type/Callable.pod6
fix typo in Callable.pod6
14:00
linkable6 Link: docs.raku.org/type/Callable 14:01
melezhik I started an experimental tool - R3 (Rakudo Release Readiness Toolkit) aimed to help with rakudo releases and bug tracking - github.com/melezhik/r3tool if someone is interested. No promise for a long support, just a prototype for idea 16:48
[Coke] m: say $*PROGRAM.parent(1).child('eek'); 18:22
camelia "/tmp/eek".IO
[Coke] docs.raku.org/routine/child says that .child is deprecated in 6.d, but I'm not seeing any warnings locally 18:23
[Coke] Looks like it was upgraded from "eventualy deprecated" to "deprecated in 6.d", but there's nothing in core.d aout IO::Path. 18:48
will open doc ticket
Geth doc: coke self-assigned incorrect deprecation notice on .child github.com/Raku/doc/issues/3902
c7392ee08a | Coke++ | doc/Type/IO/Path.pod6

Closes #3902
18:56
ugexe meh i prefer .child/.parent vs .add/.parent 18:58
linkable6 Link: docs.raku.org/type/IO::Path 19:00
Geth doc: 96ece3fe64 | Coke++ | 2 files
fix typo/learn word
19:03
[Coke] ugexe: me too - and now that it's not incorrectly deprecated, use with impunity
[Coke] now off to use .child() in some work code. 19:04
guifa I get that the .add was probably to make more sense adding in multiple sub directories at once, where child just implies a single level 19:04
But apparently now macOS allows slashes in file names (!) 19:05
ugexe it was that the functionality was going to be different
something something child-secure
guifa tries .add("foo/bar") where 'foo/bar' is the literal file name 19:05
huh. How in the world did I create that file name 19:07
WTF. Okay Apple, that makes no sense. So apparently Apple decided that blocking both colons and slashes in file names was stupid. The result? You can type a slash in a file name. But it's stored as a colon. Create a file at the command line with a colon and .... it shows up as a slash in the Finder 19:09
tonyo why protect users from themselves? 19:35
the finder prevents a colon 19:36
japhb [Coke]: I thought the .child deprecation was due to a security-gotcha-by-design problem? (Meaning that it wasn't inherently a security hole itself, but the API encouraged people to make them, sorta like strcat in C.) 19:45
[Coke] japhb: whatever the reason: there's no deprecation 20:02
if it's a trap or a stylistic thing, we can doc that, but if you run in 6.d, there's no deprecation warning.
japhb Oh sure, I just meant, the answer may not be to un-deprecate, but to fix the warning so it *is* deprecated. 20:32
jnthn may remember more about it, ISTR him and Zoffix discussing the problem way back when, though I don't know where in the logs I'd look for that. 20:33
Related to this maybe? github.com/raku-community-modules/...Secure.pm6 20:34
japhb Oh this is odd: github.com/raku-community-modules/...cial-notes 20:35
MasterDuke i think Zoffix's IO grant reports have some info
[Coke] japhb: if a deprecation is added, we'll add it back. no worries. 20:49
[Coke] (or we can add a link to that module) 20:50
japhb has done his occasional duty as "index into institutional knowledge" :-) 21:03
[Coke] BTDT! Thank you. :) 21:09
thundergnat bisectable6: say "{+$_} found:\n{.batch(10)».fmt('%3d').join: "\n"}" given (1..^100).hyper.grep: { .is-prime and $_ + .comb.sum.is-prime }; 22:54
bisectable6 thundergnat, Will bisect the whole range automagically because no endpoints were provided, hang tight
thundergnat did I kill bisectable? :-( 22:57
thundergnat Sigh. Yep, I killed bisectable. :-( 22:58
thundergnat New issue R#4413 22:59
um, github.com/rakudo/rakudo/issues/4413 23:00
thundergnat ah crap. I'm killin' the bots left and right. 23:01
I'll stop now.
moon-child m: say 42.base("beer") 23:23
camelia 🍻🍺🍻🍺🍻🍺
gfldex camelia: source 23:26
codesect` core.c/Int.pm6 line 115 23:27
ugexe github.com/ugexe/Raku-sanity :P 23:28
codesect` m: #`(I'm partial to) note "Life, the Universe and Everything".WHY 23:29
camelia Don't know setting RESTRICTED
at gen/moar/ModuleLoader.nqp:249 (/home/camelia/rakudo-m-inst-2/share/perl6/lib/Perl6/ModuleLoader.moarvm:previous_setting_name)
from gen/moar/ModuleLoader.nqp:254 (/home/camelia/rakudo-m-inst-2/share/perl6/lib/…
codesect` m: note "Life, the Universe and Everything".WHY
camelia 42
moon-child m: my int $x = 5; $x := $x - 2 23:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot bind to natively typed variable '$x'; use assignment instead
at <tmp>:1
------> 3my int $x = 5; $x := $x - 27⏏5<EOL>
moon-child m: my int $x = 5; $x = $x - 2
camelia ( no output )
moon-child eh?
oh, the repl is just being dumb again. Nevermind