🦋 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:02 Garbanzo joined
elcaro summerisle: are you trying to iterate over the class directly? you may actually need a Seq 00:15
this article is old, but it helped me when I was writing iterators: perl6.party/post/Perl-6-Seqs-Drugs...ll--Part-2
00:27 aindilis joined 00:47 wamba left, lichtkind left
summerisle seems as if it was a decontainerization/context thing, %$var made it behave, though I'll give that article a read since I don't know that it's the *best* way to do it 00:49
00:49 pecastro left
tobs summerisle: regarding your previous question, you can look up a token in the grammar (as a package) if you declare it `our` 00:54
m: grammar G { our token a { "a" } }; q[abcasd].subst(&G::a, "X", :g).say # replaces all "a" with "X" using the token a in G 00:55
evalable6 XbcXsd
summerisle thanks
00:59 rindolf joined 01:05 marcusr left 01:06 marcusr joined 01:09 samcv left 01:14 samcv joined 01:39 MasterDuke left
summerisle hmm tobs, I'm still getting a no such method 'token-name' on invocant error - e.x. gist.github.com/RomanHargrave/637f...daddee25de 02:00
02:08 kvw_5_ joined 02:11 kvw_5 left 03:11 benchable6 left, nativecallable6 left, sourceable6 left, releasable6 left, quotable6 left, evalable6 left, coverable6 left, committable6 left, committable6 joined 03:12 evalable6 joined, quotable6 joined, nativecallable6 joined 03:13 sourceable6 joined, benchable6 joined, coverable6 joined 03:14 releasable6 joined 03:28 brtastic joined 04:03 kini left 04:13 neshpion left 04:57 brtastic left 05:35 gnufr33dom left 05:43 gnufr33dom joined 05:44 kaiwulf left 05:47 kini joined
moritz summerisle: you can always reference a token through YourGrammar.parse($str, :rule<your_token>) 05:54
mst: glad it's of use to you :-) 05:58
06:09 wamba joined 06:21 jmerelo joined 06:31 wamba left 06:33 wamba joined 06:35 _jrjsmrtn joined 06:36 __jrjsmrtn__ left 06:43 vike left 06:55 stoned75_ left 07:01 kini left, ufobat joined, vike joined, parabolize left 07:02 kini joined
jmerelo Reminder we're still looking for Google Summer of Code ideas. Add yours here github.com/perl-foundation-outreac...2021-ideas 07:03
07:03 Arenngor joined 07:06 guifa2 left 07:14 brtastic joined 07:23 guifa2 joined 07:40 domidumont joined 07:42 Garbanzo left
jmerelo .tell notagoodidea it will be uploaded by Fosdem eventually. I can share the slides with you if you want. 07:54
tellable6 jmerelo, I'll pass your message to notagoodidea
07:55 guifa2 left 08:07 ufobat left, ufobat joined 08:10 gnufr33dom left 08:14 Sgeo left 08:17 MasterDuke joined 08:18 tejr left 08:24 tejr joined
Arenngor What would be the best way to go about categorizing a string into a list of tokens? For example if a string contained "my $x = 3;" I would want to categorize it to be "KEYWORD:my", "VAR:x", "ASSIGNOP:=", "INTEGER: #", "EOS:;" 08:26
08:26 tejr left
Arenngor "INTEGER: 3" **** 08:26
08:31 tejr joined 08:38 dakkar joined
MasterDuke Arenngor: tokenization is a large topic, but the various grammar tutorials should help you get started. have you read moritz's raku grammar/regex book? "a recursive descent into parsing" 08:50
08:51 domidumont left 08:53 domidumont joined
Arenngor I have not, I will take a look 08:58
08:59 Arenngor left
MasterDuke i'm no expert, but i probably try creating a Grammar with the tokens/rules i want, then create an Actions that "made" them into "NAME:" ~ <value from grammar> 09:01
09:11 domidumont left 09:13 domidumont joined
CIAvash hmm, colabti irclogger is logging everything twice! 09:26
moritz twice the #raku goodness 09:30
re book, www.apress.com/us/book/9781484232279 has DRM-free PDF versions
CIAvash moritz: I can't buy your books(or anyone else's), I have to either pirate it or receive it as a gift from you :) [living in a sanctioned country!] 10:01
moritz wow, that sucks 10:04
tadzik :( What country is that, if you don't mind me asking? 10:14
CIAvash Iran 10:15
tadzik ah 10:16
CIAvash: I can buy it for you if you want it :) 10:17
the files themselves should be sendable regardless of silly laws 10:18
CIAvash tadzik: No it's fine. Thanks for the offer :)
10:18 aluaces left
MasterDuke will all the fosdem videos be make available eventually? 10:20
Sir_Ragna I'm looking out for the video's as well 10:21
10:33 brtastic left 10:38 MasterDuke left 10:40 MasterDuke joined 10:44 pecastro joined
krako[m] moritz: I might buy the book but do you plan any updates during the year ? 11:03
11:08 kini left 11:10 kini joined
moritz krako[m]: currently there isn't a second revision in progress or planned 11:11
krako[m] ok thanks
moritz and TBH it's those of my books that sells the least (because it's so niche), which makes a second revision less likely :-(
but it's the book I'm most proud of, it feels... much more coherent and covers a topic pretty solidly 11:12
the scope of my other books is too wide to make me feel that way
11:32 ab5tract joined 11:35 dfzvb joined 11:36 dfzvb left 11:57 dfzvbfghyjn joined, dfzvbfghyjn left 12:39 aindilis left 12:41 vike left 12:48 asymptotically left, asy joined 12:54 asy left, asymptotically joined 13:00 kini left 13:01 vike joined, kini joined 13:08 aluaces joined 13:13 xinming_ left 13:15 vike left 13:19 guifa2 joined 13:26 pnu__ left, ChoppedBacon left, zostay left 13:27 tbrowder left, peteretep_ left, mithaldu_ left, BuildTheRobots left, Grinnz left, kawaii left, spycrab0 left, jhill left 13:28 asymptotically left, pnu__ joined, tbrowder joined, peteretep_ joined, spycrab0 joined 13:29 jmerelo left 13:30 jhill joined, zostay joined 13:31 mithaldu_ joined, ChoppedBacon joined 13:32 BuildTheRobots joined 13:33 Grinnz joined 13:35 asymptotically joined 13:49 kawaii joined 13:58 guifa2 left
tbrowder can someone with privs please add issues and request review options to gitgugraku/planet.raku.irt 14:02
erg github.com/Raku/planet.raku.org 14:03
14:07 vike joined 14:09 [Sno] left 14:11 sno joined 14:17 kini left 14:18 kini joined 14:20 ab5tract left 14:26 [Sno] joined 14:29 sno left 14:35 Sgeo joined 14:39 xelxebar left 14:40 xelxebar joined 14:48 l-as joined
l-as question: is it expected that running `raku -e 'put "test"'` takes 0.3 seconds to complete? 14:49
14:53 kaiwulf joined
krako[m] I don't think that's normal ! I explain : I have an old laptop and I tried with `time` and `hyperfine`, both return nearly `0.138s`. 14:58
Do you have a program that is taking most of your CPU/RAM ?
(`perl -e 'print "test\n"'` take `0.002s`) 15:02
15:13 aluaces left
l-as No, but I am not using a fast machine. I get similar results for perl5. Thanks for confirming my suspicions. 15:13
I wanted to use raku as a replacement for awk and such, but it's a bit too slow... 15:14
MasterDuke l-as: raku's startup is not 100% optimized. however, compared to perl, it's more like doing `perl -MMoose -E 'say "test"'`, i.e., it give you more "stuff" by default
l-as is there anyway to not do that extra stuff?
MasterDuke sorry, nope 15:15
l-as ah lol, thanks anyway
tadzik not really. If you're looking at something thin, Raku is probably not the right choice (right now)
l-as hopefully one day it will be faster
for reason, python start-up is almost instantaneous, so it certainly is doable 15:16
for reference*
MasterDuke it does get faster every year, just hasn't had the total number of years to be optimized yet
python is faster than perl5 for you? that's surprising, i've always seen perl5 faster 15:17
l-as no I mean faster than raku, not faster than perl5
python just also has a lot of stuff loaded by default
MasterDuke ah, right
15:21 gnufr33dom joined 15:23 MasterDuke left 15:27 MasterDuke joined 15:28 aluaces joined
tbrowder do you think python has more loaded than Raku? 15:31
i don't
tadzik that's hardly a disadvantage though if you want it to load less ;) 15:32
MasterDuke i'd say it has more than perl5, less than raku. which end it's closer to exactly i couldn't say 15:33
15:33 parabolize joined 15:37 dakkar left 15:38 dakkar joined
tonyo arenngor: if you're trying to parse raku then you can use the already defined grammar with a custom set of actions 15:49
tellable6 tonyo, I'll pass your message to Arenngor
16:18 kaiwulf left 16:31 xelxebar left 16:36 xinming joined 16:37 xelxebar joined, jmerelo joined
jmerelo releasable6: status 16:37
releasable6 jmerelo, Next release in ≈12 days and ≈2 hours. 1 blocker. 22 out of 122 commits logged
jmerelo, Details: gist.github.com/51e842a85de0d3089b...cb9f7d325c
16:40 kini left 16:42 kini joined 16:53 gnufr33dom left 17:00 berber44 joined
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2021/02/08/2021-...-remaster/ 17:10
perry That's a weird looking dog 17:13
lizmat, the Raku Collect link 404s
sena_kun lizmat, typo in github.com/perl-foundation-outreac...support.md <- should be "star" 17:26
17:35 dakkar left
lizmat thanks perry sena_kun: links fixed 17:40
sena_kun lizmat++ # great work on the weekly 17:41
17:41 domidumont left
lizmat perry: in Dutch it's apparently called a "zwartstaartprairiehondje" or black tail prairie dog 17:47
perry Oh that's funny—so it is a "dog"
lizmat well, in name apparently
17:48 neshpion joined
lizmat en.wikipedia.org/wiki/Black-tailed_prairie_dog 17:48
perry What a cutie
commons.wikimedia.org/wiki/File:Bl...&a=fqv 17:49
Whoops: commons.wikimedia.org/wiki/File:Bl...ie_Dog.jpg
lizmat anyways, I made that picture many years ago while visiting a local zoo 17:51
(well, about 30 miles from here :-)
perry !!
18:01 MasterDuke left 18:04 ufobat left, ufobat joined 18:11 natrys joined 18:19 aborazmeh joined
krako[m] <l-as "no I mean faster than raku, not "> on my laptop Python is just `0.03s` faster than Raku. I don't mind if I can develop more dev more quickly with Raku. 18:25
18:25 peteretep_ left, zostay left
krako[m] * If I can dev more quickly 18:25
18:25 mithaldu_ left 18:26 peteretep_ joined, zostay joined, mithaldu_ joined 18:37 Xliff joined 19:03 wamba left 19:14 aborazmeh left 19:44 jmerelo left 19:47 MasterDuke joined 19:48 db48x joined 19:54 ufobat_ joined 19:57 stoned75 joined 19:58 ufobat left
l-as I can see that Raku lists are immutable, but no way to cons. How do I cons? 20:03
20:07 wamba joined 20:10 natrys left
MasterDuke m: my $l = (1, 2, 3); say $l; $l = (|$l, 4); say $l 20:12
evalable6 (1 2 3)
(1 2 3 4)
MasterDuke m: my $l = (1, 2, 3); say $l; $l = ($l.Slip, 4); say $l
evalable6 (1 2 3)
(1 2 3 4)
20:33 linkable6 joined 20:39 tejr left, tejr joined 20:42 berber44 left 20:58 guifa2 joined 21:00 ufobat_ left, stoned75 left 21:05 patrickb joined
krako[m] Hi ! I'm reading the doc from here course.raku.org/essentials/associatives/pairs/ and wondering when could the `Pairs` are more useful than the `Hashes` ? 21:10
21:12 MasterDuke left
krako[m] (what are their use ?) 21:16
21:17 MasterDuke joined
tyil krako[m]: I think I've used Pairs once, and that was as elements to a List 21:22
the only reason that I did not use a Hash there was that I wanted to keep the order the Pairs appeared in
other than that, in my experience, a Hash is basically just a collection of Pairs, that you can look up by their key 21:23
21:26 wamba left 21:32 guifa2 left 21:45 kaiwulf joined 22:29 cxreg joined 22:31 patrickb left 22:42 maggotbrain joined
summerisle are FETCH/STORE specials called on any object or just Proxy (ref: BOOTSTRAP.nqp:1755, Rakudo) ? 22:53
MasterDuke pretty sure FETCH is only a Proxy method, but a bunch of other types have a STORE method 22:59
23:04 pnu__ left, pnu__ joined
summerisle That's what I was thinking. I was just curious if anyone knew without doing a deep dive on how the implementation works. 23:07
23:11 aindilis joined 23:28 aindilis left 23:29 aindilis joined 23:35 sjn joined 23:36 notagoodidea joined
notagoodidea Hey, i am trying to write a blog-ish post on Raku and it's really still a draft but as it's one of the first time I try that, I am looking for some feedback, different eyes looking at it. If someone has a bit of time to lose : notagoodidea.github.io/yagnif/23cdd900.html 23:38
tellable6 2021-02-08T07:54:36Z #raku <jmerelo> notagoodidea it will be uploaded by Fosdem eventually. I can share the slides with you if you want.
23:39 Xliff left
MasterDuke "The more I dive into Raku", i assume that' 23:49
s a typo and you want "dive"?
"essential components building blocks" extra 's' on 'component' 23:50
"on an type" should be 'a', not 'an' 23:51
23:54 sortiz joined
MasterDuke "composite types split in enum, class and roles", something's off here, but not exactly sure what to suggest. 'split on', 'split between'? 23:54
sortiz \o #raku
tellable6 2021-01-29T11:00:54Z #raku <tbrowder> sortiz: but i don't know why zef isn't finding it. it is supposed to be in the non-cpan ecosystem.
MasterDuke "those Object do you interacte all the time with." -> "those Objects you interact with all the time." 23:55
"you parameters list", typo there, should be "your" 23:56
same with "you Int and Str types"
notagoodidea MasterDuke: 'split into' seems better? 23:57
MasterDuke "ramifications where going and honestly loosing" -> "ramifications were going and honestly losing"
right, that's good 23:58
"A Object and a role" -> "An Object and a Role" 23:59
"Object are", missing an 's' on 'Object'