🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:26 dotdotdot left 00:29 dotdotdot joined 00:36 Kaeipi left, Kaeipi joined 00:54 mowcat left
ggoebel elcaro: wow! your day 15 script took 54s on my laptop... vs 16m16s for Doc_Holliwood's solution and 25m for mine. 00:55
Doc_Holliwood that i want to see 00:56
tellable6 2020-12-16T01:07:24Z #raku <ggoebel> Doc_Holliwood: if I change the hard coded 30000000 to $N it takes 18m 00:57
ggoebel www.reddit.com/r/adventofcode/comm...;context=3 01:00
01:03 Black_Ribbon joined, dogbert17 joined 01:06 dogbert11 left 01:09 sxmx left 01:22 Merfont joined, Kaeipi left 01:24 DarthGandalf left, sftp left, Geth left, jmou left, roguelazer left, wbn left, spycrab0 left, MilkmanDan left, BuildTheRobots left, zostay left, tbrowder left, BinGOs left, ssm__ left, riatre left 01:30 DarthGandalf joined, sftp joined, Geth joined, jmou joined, tbrowder joined, roguelazer joined, wbn joined, spycrab0 joined, MilkmanDan joined, BuildTheRobots joined, zostay joined, BinGOs joined, ssm__ joined, riatre joined 01:33 BuildTheRobots left 01:34 BuildTheRobots joined 01:51 ensamvarg3 joined 02:03 stux|RC-only left 02:04 gabiruh left, demiurge left, gabiruh joined 02:05 stux|RC-only joined 02:24 edk_ joined, xelxebar joined 02:26 ggoebel left 02:43 rir left 02:53 tejr left 02:54 tejr joined 03:03 jmchael_ left
coldpress I would have expected Hash to be faster than Array 03:10
tellable6 hey coldpress, you have a message: gist.github.com/42ea1d42f4f338778d...bcd6c1e619
hey coldpress, you have a message: gist.github.com/057057d07f5e0a1501...0a40549b43
03:12 asymptotically left, asymptotically joined 03:26 xinming left, xinming joined 03:57 leont left 04:02 xinming left, xinming joined 04:11 ex_nihilo joined
coldpress ggoebel: native types are really so much faster! 04:13
tellable6 coldpress, I'll pass your message to ggoebel
04:16 asymptotically left 04:17 asymptotically joined
coldpress today's Raku advent is well-written too 04:31
05:17 evalable6 left, linkable6 left, linkable6 joined 05:18 evalable6 joined 05:28 gordonfish left, gordonfish joined 05:39 ensamvarg3 left 06:05 aindilis left 06:07 jmerelo joined 06:09 cgfbee left 06:12 Doc_Holliwood left 06:30 frost-lab joined 06:41 skids left 06:45 ex_nihilo left 06:53 aluaces joined 07:00 xinming left 07:02 xinming joined 07:12 sjm_uk joined 07:16 tejr left, tejr joined 07:19 abraxxa joined 07:24 abraxxa left 07:25 abraxxa joined 07:32 tejr left, ensamvarg3 joined 07:34 asymptotically left 07:36 rindolf joined 07:37 asymptotically joined 07:38 tejr joined 08:04 aborazmeh joined, aborazmeh left, aborazmeh joined 08:07 parabolize left
rindolf i really think larry wall did a lot to promote foss ( en.wikipedia.org/wiki/Larry_Wall ) but he'd've been better known if he kept a chronological canon of his human writing under rcs (git now) or similar. I have www.shlomifish.org/humour/ and www.shlomifish.org/philosophy/ and some fluff. en.wikipedia.org/wiki/My_Little_Po...p_Is_Magic has the series , which ppl see various starts of and a lot of 08:10
official and fanmade fluff. xkcd.com has the numbered strips. I think one reason Saladin is obscure (see shlomifishswiki.branchable.com/Saladin_Style/ ) is that he was a man of action rather than just preached.
08:16 xinming left
rindolf I thought that Pedro's monologue here parodied Objectivist/Randian Ethics, but now i think it could be effective. maybe it will work on neo-nazis/"alt right" ppl too (or ISIL/etc.): www.shlomifish.org/humour/TOneW-th...xican-town 08:16
08:17 xinming joined
rindolf many muslims believe that 'jihad' is about abolishing nonislamic behaviour within the believer, and setting an example for others 08:19
08:28 aborazmeh left 08:31 cpan-raku left 08:33 cpan-raku joined, cpan-raku left, cpan-raku joined 08:34 domidumont joined 08:37 Sgeo left 08:39 dakkar joined 09:00 Ekho left 09:06 Ekho joined 09:07 domidumont left 09:08 sena_kun joined
no-n MLP 🐴 09:11
tyil I'd personally prefer #raku stay on the topic of raku, not religion and politics 09:13
especially since On The Internet™, anyone with a different opinion from popular news media is a "neo-nazi"
09:20 Doc_Holliwood joined
tadzik thankfully that's mostly a few bubbles, but I recognize your sentiment all too well: a lot of people tend to confuse "I disagree with your methods" with "I disagree with your principles" and tend to reach to wrong conclusions very easily 09:21
in any case, it's probably not the place to discuss this, as you mentioned :) 09:22
tyil yeah, my 2nd sentence should've been left out
09:35 ufobat joined 09:43 xinming left 09:44 xinming joined 09:51 edk_ is now known as demiurge 10:05 domidumont joined
rindolf tadzik: we [= me & everyone else interested] can use #reddit 10:06
10:22 xinming left, xinming joined 10:25 ggoebel joined
lizmat rindolf: please do :-) 10:25
rindolf lizmat: i set up #rindolfism now too 10:26
El_Che rindolf: is lizmat cancelling you? :) 10:27
rindolf El_Che: heh :P 10:28
El_Che: i prefer being aborted, retried or failed
lizmat what I recall from rindolf's own instruction manual: you have to be very clear in your communication with him
rindolf lizmat: heh. lizmat++ 10:29
El_Che that sounds like good communication practice in general :)
rindolf El_Che: unfortunately modern inet users (incl 1977-born-me) are lazy and impatient 10:31
www.robcottingham.ca/cartoon/archive/tldr/ - i'd rather watch en.wikipedia.org/wiki/The_Lion_King again than read hamlet for the 1st time :S 10:34
at least i can fastforward the video 10:35
El_Che: my twitter was locked cuz i entered 5.5.2020 as my birthday. i must be a very smart toddler: www.youtube.com/watch?v=eeDlO0Vy9JQ 10:38
or i built a time machine 10:39
El_Che :) 10:43
11:03 wamba joined 11:19 Doc_Holliwood left 11:21 timlegge left 11:34 atroxaper joined
atroxaper Hi, #raku! 11:34
timotimo ohai
atroxaper I have a question. A class has an access to private attributes of its parent role but not parent class. Am I right that a role has no access to private attributes of its parent role? Why? 11:36
timotimo role composition flattens a role into a class, that's why the class has access to the private attributes of the role, because it's actually the class's private attributes now 11:39
atroxaper Ok. What about role does role case? 11:40
lizmat timotimo: so this should work? 11:41
m: role A { has $!foo is built }; class B { method bar { $!foo } }; dd B.new(foo => 42).bar
camelia 5===SORRY!5=== Error while compiling <tmp>
Attribute $!foo not declared in class B
at <tmp>:1
------> 3uilt }; class B { method bar { $!foo } }7⏏5; dd B.new(foo => 42).bar
expecting any of:
horizontal whitespace
lizmat m: role A { has $!foo is built }; class B does A { method bar { $!foo } }; dd B.new(foo => 42).bar
camelia 42
lizmat indeed it does :-)
atroxaper lizmat: jnthn write about that stackoverflow.com/a/50031896 11:43
lizmat yeah, I was confusing with it not working at some stage in the setting 11:44
but that's just part of torturing the core devs
11:45 brtastic1 joined
atroxaper I what to make several level of inheritance but also want to hide attributes and method from to be public. I realized that several level inheritance of roles will help. 11:45
11:46 brtastic1 is now known as brtastic
atroxaper m: role A { has $!foo is built }; role B does A { method bar { $!foo } }; dd B.new(foo => 42).bar 11:47
camelia 5===SORRY!5=== Error while compiling <tmp>
Attribute $!foo not declared in role B
at <tmp>:1
------> 3; role B does A { method bar { $!foo } }7⏏5; dd B.new(foo => 42).bar
expecting any of:
horizontal whitespace
timotimo i believe you can also flatten a role into another role
lizmat m: role A { has int $!foo is built }; role B does A { }; class C does B { method bar { $!foo } }; dd C.new(foo => 42).bar
camelia 42
lizmat indeed 11:48
atroxaper timotimo: my example tells 'no' :) 11:51
11:54 ufobat_ joined 11:57 cgfbee joined 11:58 ufobat left
atroxaper In case role does role I can call parent private methods without trusts at least. 11:59
m: role A { has $!foo is built; method !get-foo { $!foo } }; class B does A { method bar { self!get-foo } }; dd B.new(foo => 42).bar
camelia 42
atroxaper m: role A { has $!foo is built; method !get-foo { $!foo } }; role B does A { method bar { self!get-foo } }; dd B.new(foo => 42).bar
camelia 42
atroxaper It is not so comfort as direct access to private attributes but at least can achieve the goal. 12:03
12:05 morayj joined, Black_Ribbon left 12:12 lizmat_ joined 12:14 lizmat left 12:15 lizmat_ is now known as lizmat 12:17 wamba left
tbrowder m: my $d = Date.now 12:28
camelia No such method 'now' for invocant of type 'Date'. Did you mean any of
these: 'HOW', 'new', 'not'?
in block <unit> at <tmp> line 1
lizmat m: dd Date.today 12:29
camelia Date.new(2020,12,17)
tbrowder m: my $d = Date.new
camelia ( no output )
lizmat tbrowder: see also modules.raku.org/dist/Today:cpan:ELIZABETH
tbrowder thnx
i'm seeking the best way to iterate by days from a starting day 12:30
12:31 jmchael_ joined, timlegge joined
lizmat m: dd Date.today + 7 12:32
camelia Date.new(2020,12,24)
tbrowder my first effort is to get the DateTime object and iterate by using .later(:1day) for x days
lizmat m: dd Date.today.later(:7days) 12:33
camelia Date.new(2020,12,24)
tbrowder i need to operate on each day so i need the time object at each day 12:34
lizmat m: dd Date.today.DateTime 12:36
camelia DateTime.new(2020,12,17,0,0,0)
lizmat I seem to recall that DateTime.new also takes a Date object 12:37
tbrowder m: my $d=DateTime.new(:2021); 12:42
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed radix number
at <tmp>:1
------> 3my $d=DateTime.new(:20217⏏5);
expecting any of:
number in radix notation
tbrowder m: my $d=DateTime.new(:2021year)
camelia ( no output )
tbrowder m: my $d=DateTime.new(:2021year); dd $d 12:44
camelia DateTime $d = DateTime.new(2021,1,1,0,0,0)
tbrowder cool
m: my $d=Date.new(:2021year); dd $d 12:45
camelia Date $d = Date.new(2021,1,1)
tbrowder ok 12:46
it looks like for calendar generation i can just use Date for iterating over days and then, when need be, create a DateTime object. 12:48
thnx, lizmat 12:49
12:51 leont joined 13:08 Altai-man joined 13:09 ufobat_ left 13:11 sena_kun left 13:17 morayj left 13:21 frost-lab left 13:29 abraxxa left 13:30 abraxxa joined 13:31 timlegge left 13:32 ex_nihilo joined 13:36 atroxaper left 13:39 timlegge joined 13:43 morayj joined 13:44 xinming left 13:45 xinming joined 13:48 jmerelo left 14:05 atroxaper joined 14:11 xelxebar left, xelxebar joined 14:46 thundergnat joined 14:47 Sgeo joined
thundergnat m: my $t = Date.today; say ^7 .map: * + $t; 14:47
camelia (2020-12-17 2020-12-18 2020-12-19 2020-12-20 2020-12-21 2020-12-22 2020-12-23)
15:00 orinthe left 15:01 orinthe joined 15:05 orinthe4 joined 15:07 orinthe left, orinthe4 is now known as orinthe 15:11 wamba joined 15:19 parabolize joined 15:20 wamba left 15:22 ex_nihilo left 15:31 b2gills left 15:38 xinming left, xinming joined 15:58 ensamvarg3 left 16:43 squashable6 left, squashable6 joined 17:00 natrys joined 17:02 schlaftier left 17:09 sena_kun joined, schlaftier joined 17:11 Altai-man left 17:19 b2gills joined
tony-o .tell jmerelo working on fixing the public indexes to make integration with zef easier .. 17:28
tellable6 tony-o, I'll pass your message to jmerelo
17:37 dakkar left 17:39 finsternis left 17:40 finsternis joined 17:42 Doc_Holliwood joined 17:44 lucasb joined 18:07 morayj left 18:21 domidumont left 18:22 aindilis joined 18:27 MasterDuke left
cog Hi, What is the standard way to get the correct IO::Spec class for the current architecture? 18:39
leont It's in $*SPEC 18:50
r: dd $*SPEC 18:51
camelia Unix element = IO::Spec::Unix
( no output )
cog I am probably asking the wrong question : docs.raku.org/language/io-guide#Le...SPEC_alone 18:52
18:56 wamba joined
cog "Beginning raku"has no qualm proposing $*SPEC Use the $*SPEC.tmpdir or $*TMPDIR dynamic variables to locate the system temporary directory. They 19:01
19:02 Merfont left, Merfont joined 19:13 skids joined 19:19 vrurg left 19:25 ex_nihilo joined 19:36 eseyman left 19:38 abraxxa left 19:39 eseyman joined 19:53 pecastro joined 19:56 shlomif joined 19:58 vrurg joined
[Coke] it's the answer to your question, though. We could ask: what problem are you trying to solve? 20:02
Your last send ended on "directory. They" btw. 20:09
20:13 wamba left
cog [Coke]. : I wanted to do portable code handling files. I use $*TMPDIR. I am surprised there is no &tmpfile in the core. Maybe in raked star ? 20:16
20:19 sjm_uk left
tyil cog: Rakudo Star comes with File::Temp 20:20
cog tyil, Good to know 20:21
20:31 wamba joined 20:39 atroxaper left 20:42 mowcat joined 20:44 codesections joined
codesections can anyone tell me why passing a random/ignored named parameter to &Slip makes this line work? 20:47
m: my @a = <a b c>; @a ==> Slip(:odd) ==> dd()
camelia slip("a", "b", "c")
codesections I was expecting 20:48
m: my @a = <a b c>; @a ==> Slip() ==> dd()
camelia 5===SORRY!5=== Error while compiling <tmp>
Only routine calls or variables that can '.push' may appear on either side of feed operators.
at <tmp>:1
------> 3my @a = <a b c>; @a ==> 7⏏5Slip() ==> dd()
lizmat no idea 20:49
codesections interesting 20:50
20:51 xinming left, xinming joined 20:52 vrurg left 21:08 Altai-man joined 21:10 sena_kun left 21:25 pecastro left 21:28 RaycatWhoDat joined
RaycatWhoDat Hey, y' 21:28
y'all.*
Had a question about grammars and regexes on Windows machines. It seems like the program just hangs whenever using one. Has anyone else encounted this problem? 21:29
[Coke] nope. 21:34
Have you tried the same input/code on another platform? 21:35
and/or do you have sample code?
RaycatWhoDat It works on Mac and give me a moment 21:36
gist.github.com/RayMPerry/520fc976...ba34766b1a 21:38
There ya go
21:38 MasterDuke joined 21:39 Altai-man left
[Coke] oops, forgot to run 'nmake install' on my build earlier today... 21:42
21:43 xinming left
[Coke] You are using Debugger and Tracer, which require you to interact with it, no? 21:43
21:44 xinming joined
RaycatWhoDat Yeah, I'm running it with --doc -c flags 21:44
[Coke] Variable '$pattern' is not declared - I assume I should uncomment first line of MAIN? 21:45
RaycatWhoDat yeah, probably 21:46
[Coke] Hangs for me on mac, too
(even if I comment out the use statements)
RaycatWhoDat Ah, so I've done something wrong
21:46 pecastro joined
[Coke] <ws>* is sus 21:47
21:47 natrys left
[Coke] oh, you are working on AOC. I just finished day 9. :) 21:47
removing the * from the <ws>'s let it complete. 21:49
RaycatWhoDat wow really?
I thought that was a legal quantifier
[Coke] docs.raku.org/language/grammars#index-entry-ws "The default ws matches zero or more whitespace characters"
it is, but <ws> is not a "normal" rule.
RaycatWhoDat Ah
Understood
[Coke] hope that helps unstick you; good luck with AOC. 21:50
21:51 aborazmeh joined, aborazmeh left, aborazmeh joined, rindolf left 21:52 shlomif is now known as rindolf 21:54 vrurg joined
RaycatWhoDat It did. Thanks again! 21:56
22:00 natrys joined 22:06 xinming left 22:07 xinming joined 22:10 brtastic left
tony-o codesections: adding :odd changes the return type of Slip() 22:11
codesections tony-o: why's that? 22:12
tony-o my guess is the dispatcher picks a different path 22:15
github.com/rakudo/rakudo/blob/aba9...ip.pm6#L36 22:16
codesections interesting, thanks 22:17
tony-o this is where i'd start if i was tracking that down: github.com/rakudo/rakudo/blob/1c43...t.pm6#L861
22:20 melezhik joined
melezhik weekly: sparrowdo.wordpress.com/2020/12/18...h-sparrow/ 22:21
notable6 melezhik, Noted! (weekly)
tellable6 2020-12-16T07:20:47Z #raku <jmerelo> melezhik thanks!
melezhik I've just created a post on alternative method to test Rakudo bugs with Sparrow . sparrowdo.wordpress.com/2020/12/18...h-sparrow/ a feedback is welcome 22:25
22:39 xinming left 22:40 xinming joined 22:42 melezhik left 22:47 xinming left 22:48 xinming joined 23:00 ensamvarg3 joined 23:01 natrys left 23:09 rindolf left 23:17 mowcat left 23:28 dotdotdot left
raku-bridge <theangryepicbanana> is there a chance that we will ever be able to pattern match/destructure objects in raku? 23:28
23:29 aborazmeh left
lizmat if you're talking about smart-matching, then your class should have its own ACCEPTS method ? 23:29
raku-bridge <theangryepicbanana> lizmat: no, I mean like being able to extract and match members of a class value in a method signature or something 23:30
lizmat m: class Foo { method foo { "foo" }; method bar { "bar" } }; for Foo -> (:$foo, :$bar) { dd $foo, $bar } 23:31
camelia Mu
Mu
lizmat hmmm
something like that you mean ? 23:32
raku-bridge <theangryepicbanana> class Point { my $.x; my $.y } multi thing(Point $p {:$x, :y(1)}) { ... }
lizmat ah... ok... hmmm
subsets ?
raku-bridge <theangryepicbanana> what about them?
<theangryepicbanana> I would rather not use hashes in place of a class 23:33
<theangryepicbanana> even if subsets can now be nominal, it's not always a good substitute 23:34
<theangryepicbanana> *in place of classes
23:35 dotdotdot joined
lizmat yeah, objects are faster (which feels counter-intuitive for folks coming from Perl, but yeah) 23:36
so if I get this right, you want to dispatch on a Point object with an y == 1 ?
raku-bridge <theangryepicbanana> yes, and capture its x value
<theangryepicbanana> and if possible, try to make these kinds of captures work the same way as any other capture, to keep it all consistent 23:37
lizmat ok, to answer your question: I definitely see a chance of that happening 23:39
but not before the newdisp work had landed
23:40 dotdotdot left 23:43 schlaftier left, schlaftier joined