๐Ÿฆ‹ 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.
00:01 reportable6 left 00:02 reportable6 joined 00:07 sena_kun left 00:09 sena_kun joined 00:16 jgaz left
[Coke] wtf? 00:42
do you come from the land of assholes? 00:43
drakonis it actually looks crossed out on discord if i remember correctly
[Coke] happy new year to everyone except Nemokosch, hope we all aspire to do better and do good in the new year. 00:44
00:48 CodeTortoise joined
El_Che let's dial it down 00:49
guifa In fun news, I think I finally got a grammar working for basically single passing parsing CLDR number patterns 00:50
and I've got about 50% of the RakuAST written to use that data to actually format numbers 00:51
OTOH I feel dirty looping in so much action-like stuff into the grammar, OTOH, the grammar should still be fully usable by another actions class, since it just sets some dynamic variables that shouldnt' get in the way 00:52
Anton Antonov @guifa Sounds interesting! Where that code can be found? (Or you are just keeping it for yourself, like some other projects?) 00:53
guifa I can post it in a gist for now, I'll actually post to github probably tomorrow when I finish the formatter code 00:54
00:56 jaguart joined, jpn joined
Anton Antonov @guifa Ok. I wrote a random sentence generator that used grammar classes a few weeks before you and Liz published documents about RakuAST. Now I am curious can I / should I re-write that generator to use RakuAST. 00:58
01:00 sena_kun left 01:03 jpn left 01:04 xinming left 01:05 xinming joined
guifa Anton: gist.github.com/alabamenhu/b8e7ecf...dc2681582f 01:06
Hopefully my code comments are enough to follow: I honestly wrote them detailed because I knew I'd forget why I did some stuff and maybe do a bad optimization down the road 01:09
Anton Antonov @guifa Thank you! 01:10
@guifa Well, it seems nicely structured / texted. 01:11
guifa Anton: I obssess (probably too much) over teh pretty in my code 01:14
Anton Antonov It is a good quality to have. ๐Ÿ™‚ 01:15
Let me see can I generate random sentences with that grammar. 01:16
Agh, no, I cannot ๐Ÿ™‚ -- it is too complicated. 01:26
guifa haha it is a complicated one 01:47
02:05 linkable6 left, evalable6 left 02:06 evalable6 joined 02:08 linkable6 joined
rf Happy New Year Rakoons ~ :D 02:18
jaguart Happy New Year - from a sweltering 34C Melbourne afternoon :) 02:23
rf Wow! It's -33C here we're polar opposites! 02:24
jaguart lol - you have to be in the Azores to be an antipode of Melbourne 02:37
-33C is stunningly cold - literally blue :o - but at least the prawns will stay fresh for the barby 02:39
guifa was actually in the Azores for new years a few years back 02:42
02:44 razetime joined
guifa Very few people celebrate NYE with them ... basically cabo verde and tiny little bits of Greenland and Norway 02:44
jaguart It's nice to watch Big Ben bong at 11:00 over a VPN rather than waiting beside the freezing Thames til midnight :) 02:50
rjbs jaguart: I am reminded of my melburnian colleagues complaining about the heat last week when it was -12ยฐC here. But I will be down there in February to soak in [not too much of] the sun! ๐Ÿ˜ 02:59
03:10 CodeTortoise left
jaguart rjbs: remember to bring your budgie smugglers 03:14
rjbs Everyone will be happier if I stick to my board shorts. 03:15
jaguart lol
03:58 jpn joined 04:03 jpn left 05:03 statisfiable6 left, coverable6 left, quotable6 left, benchable6 left, nativecallable6 left, squashable6 left, evalable6 left, unicodable6 left, tellable6 left, committable6 left, notable6 left, shareable6 left, linkable6 left, reportable6 left, greppable6 left, bisectable6 left, bloatable6 left, sourceable6 left, releasable6 left, shareable6 joined, rf left, nativecallable6 joined, sourceable6 joined, tellable6 joined, statisfiable6 joined 05:04 reportable6 joined, notable6 joined, bisectable6 joined, evalable6 joined 05:05 bloatable6 joined, linkable6 joined, greppable6 joined, benchable6 joined, releasable6 joined, committable6 joined, unicodable6 joined, quotable6 joined 05:06 squashable6 joined, coverable6 joined 05:40 Kaipii left 06:00 reportable6 left 06:03 reportable6 joined
[Coke] rjbs: Happy New Year! 06:26
06:44 melezhik joined 06:47 melezhik left
Homer_Simpson I still want to be able to increment characters in raku 07:06
tellable6 2022-12-31T12:17:12Z #raku <guifa> Homer_Simpson: sub circumfix:<` `> (Str() $foo) {ย $foo.comb }; my @a = `'abc'`; say @a
Homer_Simpson sub circumfix:<``> (Str() $foo) {comb($foo);}; my @a = `'abc'`; say(@a); 07:12
Not enough symbols provided for categorical of type circumfix; needs 2 07:13
oh wait 07:15
my client removed the fucking grave accent again
oh wat, no, it did not this time
07:16 bigdata joined
Homer_Simpson this looks promising though @guifa 07:17
wait is that user a bot, or is tellable a bot 07:18
or am I really a bot
Voldenet we're all bots โ€“ we use certain algorithms to consume input impulses and produce output ones 07:21
jokes aside, tellable6 is a bot 07:22
Homer_Simpson: .comb is not suitable for incrementing, because arithmetics are probably not supposed to work on characters 07:23
you want to increment numerical representation
m: my $input = Buf.new: "abcde".encode("ascii"); $input[$input.first(* < 0x7e, :end, :k)]++; say $input.decode("ascii") 07:24
camelia abcdf
Voldenet (that incrementing would need to be more sophisticated, but I'm not sure if it'd fit in one line 07:25
but you'd have to walk through every element in the buffer and handle carryover flag for all of them
Homer_Simpson care to put that in a function thats easy to call/
Voldenet in the worst case, it'd need to allocate something)
but the above is something like cstring 07:26
Homer_Simpson I do know that raku can use ++ on string literals and string literal constants 07:27
but thats hardly useful
how do I email larry wall asking him to give us what im asking for 07:28
jaguart His alias is Morph - so you loudly say 'Allomorph' and then read this? docs.raku.org/type/Allomorph 07:41
It doesn't all .succ
Homer_Simpson I basically wanted a language that can read an LDRAW script file and then figure out where group of parts can be replaced with fewer parts that do the same thing 07:44
like three stacked 1x1 plates == one 1x1 brick, two stacked 1x1 plates = one 1x1 slab, two colums of three stacked 1x1 plates = 1x2 brick etc 07:48
of course it would have paramaters that I can specify which changes how it matches different part groups 07:51
if I can get that working im fairly sure I can extend the language so that it can also build stuff from scratch rather than optimize an existing LDRAW model 07:52
jaguart maybe you could write a generator that generates a reasonably exhausitive list of contractions, and then search your scripts for places where these can be applied? not familiar with LDRAW scripts - assuming you mean something other than lua.
Homer_Simpson I could if I only kept the 'pool' of parts to basic part types 07:54
because theres probably as many ways to combine every type of lego brick as there are stars in the universe!
ldraw is basically a CAD program for LEGO 07:56
08:16 linkable6 left, evalable6 left 08:17 evalable6 joined 08:19 linkable6 joined
CIAvash m: say {$_ โ€ฆ *}('a')[2] 08:40
camelia c
09:19 linkable6 left, evalable6 left 09:21 linkable6 joined 09:22 evalable6 joined 09:26 razetime left 09:41 sena_kun joined 10:10 Sgeo left 10:19 Kaipii joined 10:21 derpydoo left 10:34 derpydoo joined
tbrowder happy new year, rakuuns! 10:59
11:00 epony left
Anton Antonov <@755062053282119803> Thanks! Happy New Year to you too! 11:00
Well, and everyone else here. ๐Ÿ™‚
tbrowder did we ever select a non-core raku person of the year? 11:01
Anton Antonov Hmmm -- I remember seeing that kind of discussion once... 11:02
11:03 jpn joined
Nemokosch Coke, this was a ridiculous overreaction 11:04
tbrowder yes, nominations were sought in early december. i nominated a very worthy person and was hoping to see an announcement 11:05
Nemokosch Some people could really use a little self-reflection at times ๐Ÿ‘Ž 11:07
Anton Antonov <@755062053282119803> Well, I think this is what I saw -- invitation to make nominations. (Once...)
11:24 jpn left
lizmat tbrowder: I guess all of us at the RSC got too caught up in other stuff :-( 11:53
tbrowder well itโ€™s not too late is it? a timely new yearโ€™s resolution? 11:56
11:58 jpn joined 12:00 reportable6 left
Nemokosch was the idea to select a non-core person in particular, or is the question if there were non-core people in consideration? 12:00
12:00 derpydoo left 12:01 reportable6 joined, razetime joined 12:12 jpn left 12:20 jpn joined 12:22 Homer_Simpson left 12:32 jpn left
tbrowder as i recall, one criterion was the nominee could *not* be a core dev 13:01
Nemokosch ohh 13:11
that sounds kind of interesting in a volunteer-driven project, to be honest ๐Ÿ˜„ 13:12
13:18 Neo4469 joined
Neo4469 what language is faster? Perl 5 or Raku? 13:19
Voldenet faster to write, execute or what 13:24
Neo4469 execute 13:26
Voldenet perl5 most likely, depends on the code
tbh. from both languages the fastest you can get is just executing C code 13:28
so there's always escape hatch if you need additional performance
but raku's perf keeps improving rapidly 13:35
Nemokosch there are improvements definitely 13:37
Voldenet there's a lot more room for improvements, because the interpreter itself is younger 13:38
13:40 xinming left 13:42 xinming joined 13:47 jpn joined 13:52 jpn left 13:54 derpydoo joined
guifa Homer_Simpson: guifa is a human, tellable is a bot. When you log off I can send a message prefixed to you, and tellable will tell you about it when you get back on 13:57
tellable6 guifa, I'll pass your message to Homer_Simpson
13:57 bigdata left 14:06 razetime left
Anton Antonov @Voldemet "but raku's perf keeps improving rapidly" -- I hope so! A major obstacle (for me) to use Raku in more industrial settings is Raku's speed. 14:23
14:42 jpn joined 14:49 jpn left 15:20 razetime joined 15:28 jpn joined 15:32 abraxxa-home joined 15:33 jpn left
SmokeMachine m: say โ€œaโ€.next 15:56
camelia No such method 'next' for invocant of type 'Str'. Did you mean any of
these: 'Set', 'exp', 'new', 'not'?
in block <unit> at <tmp> line 1
SmokeMachine m: say โ€œaโ€.succ 15:59
camelia b
15:59 Neo4469 left
smol-hors m: say 'z'.succ 16:02
camelia aa
Voldenet m: say 'Z'.succ 16:05
camelia AA
Voldenet m: say 'Zz'.succ
camelia AAa
Voldenet โ€ฆthat looks somewhat odd
m: (200+1).base(36).lc 16:07
camelia ( no output )
Voldenet m: (200+1).base(36).lc.say
camelia 5l
Voldenet not that any behavior of incrementing strings makes sense 16:09
tbrowder maybe dealing with Excel columns 16:20
16:28 abraxxa-home left, melezhik joined 16:32 melezhik left
rjbs [Coke]: Thanks! You too. 16:36
Nemokosch yes, probably the original idea was to generate Excel columns 16:47
16:58 razetime left 17:03 eseyman left 17:06 Kaipii left 17:08 epony joined 17:09 Kaipii joined 17:17 eseyman joined 18:00 jpn joined, reportable6 left 18:01 reportable6 joined 18:13 Kaipii left 18:20 djerius left 18:22 djerius joined
gordonfish Happy New Year 18:27
18:34 jpn left 18:35 [Coke] left 18:42 jpn joined 18:44 discord-raku-bot left, discord-raku-bot joined 18:47 melezhik joined
melezhik .tell tonyo I've created an enhancement ticket for fez - github.com/tony-o/raku-fez/issues/75 18:48
tellable6 melezhik, I'll pass your message to tonyo
18:53 melezhik left 18:56 jpn left 19:15 Kaiepi joined 20:06 jpn_ joined 20:12 jpn_ left, rf joined 20:33 Sgeo joined 20:44 derpydoo left
Anton Antonov @gordonfish Happy New Year to you too! 21:06
21:44 linkable6 left, evalable6 left, linkable6 joined 21:46 evalable6 joined 21:49 jpn_ joined
leont I'm not entirely sure I got the behavior right here, could I have a second opinion? github.com/Leont/app-prove6/pull/12/files 21:58
lizmat: I suspect you're the person who would know
Nemokosch www.nntp.perl.org/group/perl.perl6...10889.html *clickbaits* ๐Ÿ˜› 22:00
22:13 pippo joined
pippo m: class B { multi method hello() is default {say 'No arg'}; multi method hello (:$value) {say $value}};my $a = B.new;$a.hello(); 22:13
camelia (Any)
pippo Anybody can explain to me why this does not work? method hello with no args shall say "No arg". But it does not. 22:14
m: class B { multi method hello()ย  {say 'No arg'}; multi method hello (:$value) {say $value}};my $a = B.new;$a.hello(); 22:18
camelia (Any)
Nemokosch pippo: by default, all named parameters are optional 22:30
and `is default` has some very weak way of taking precedence 22:31
frankly, I find it hard to take fine-grained control over multi candidates, one sec and I'll link what the docs have...
pippo Ha named parameter are optional. This is the reason why. Thank you Nemokosch. 22:33
m: class B { multi method hello()ย  {say 'No arg'}; multi method hello (:$value is required) {say $value}};my $a = B.new;$a.hello(); 22:36
camelia No arg
pippo ^^ <Nemokosch>++
Nemokosch iirc you can also add an exclamation mark for requiredness, after the name 22:39
pippo Thank you. By the way what does a colon after the name mean ? 22:41
22:44 jpn_ left
Nemokosch moment. I got is default docs.raku.org/type/Routine#trait_is_default and multi-dispatch for now ๐Ÿ˜› docs.raku.org/language/functions#Multi-dispatch 22:44
pippo Nemokosch Thank you very very much!!!
Nemokosch pippo: the colon after the name? not before/in front of the name? 22:45
pippo m: class B { multi method hello()ย  {say 'No arg'}; multi method hello ($value:) {say $value}};my $a = B.new;$a.hello(); 22:46
camelia No arg
pippo ^^>that
m: class B { multi method hello()ย  {say 'No arg'}; multi method hello ($value:) {say $value}};my $a = B.new;$a.hello(3); 22:47
camelia Cannot resolve caller hello(B:D: Int:D); none of these signatures matches:
(B: *%_)
($value: *%_)
in block <unit> at <tmp> line 1
22:49 sena_kun left
Nemokosch oh okay 22:51
have you done other programming languages? to help with terminology 22:52
pippo well I am a beginner. 22:53
Nemokosch you know, the essential difference between a method and a subroutine is that a method is invoked on a certain object. How this is done kinda differs from language to language 22:56
in Raku, the object is passed as the "zeroeth argument"; if you don't do anything in particular, you can access it as `self` 22:57
I'm not 100% but maybe decontainerized `self`
however, you can specify this "zeroeth argument" in front of the colon 22:58
so in your example, $value refers to your object itself
pippo Ha OK. Thank you very much again <Nemokosch>! Happy new year!! 23:00
o/
23:00 pippo left
Nemokosch happy new yearz ๐Ÿ˜› 23:00
23:08 jpn joined 23:09 NemokoschKiwi joined 23:26 kjp left 23:29 kjp joined
lizmat leont: looks ok to me? 23:32
23:34 jpn left 23:43 jpn_ joined 23:53 jpn_ left