🦋 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.
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
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
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
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
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
jmerelo Reminder we're still looking for Google Summer of Code ideas. Add yours here github.com/perl-foundation-outreac...2021-ideas 07:03
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
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
Arenngor "INTEGER: 3" **** 08:26
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
Arenngor I have not, I will take a look 08:58
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
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 :)
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
krako[m] moritz: I might buy the book but do you plan any updates during the year ? 11:03
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
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
l-as question: is it expected that running `raku -e 'put "test"'` takes 0.3 seconds to complete? 14:49
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
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
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
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
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
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
lizmat thanks perry sena_kun: links fixed 17:40
sena_kun lizmat++ # great work on the weekly 17:41
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
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 !!
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
krako[m] * If I can dev more quickly 18:25
l-as I can see that Raku lists are immutable, but no way to cons. How do I cons? 20:03
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)
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
krako[m] (what are their use ?) 21:16
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
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
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
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.
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
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'