🦋 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:04 xelxebar left 00:09 xelxebar joined 00:29 aborazmeh joined, aborazmeh left, aborazmeh joined 00:42 cpan-raku left 00:43 cpan-raku joined, cpan-raku left, cpan-raku joined 00:48 regreg_ joined
uzl[m] m: class A { has $.value = 5; method tell { say $!value; say $.value } }; A.new.tell 00:50
evalable6 5
5
tellable6 2020-03-24T10:33:20Z #raku <tbrowder> uzl[m] take a look at the Draw2D::Furniture now
00:51 sena_kun joined
AlexDaniel does anybody want to organize a squashathon for the next month? 00:51
it probably makes sense given that everybody is staying at home? :) 00:52
00:53 Altai-man_ left
uzl[m] .tell tbrowder That does the job :-)! 00:53
tellable6 uzl[m], I'll pass your message to tbrowder
tbrowder got it, good to know 00:54
00:56 AlexDaniel left, AlexDani` joined
uzl[m] Yeah, it really helps when modules that do graphical stuff show samples of what the result will possibly look like ;-). 01:00
BTW, I'm wondering how everybody decide when to access a `$.` attribute through its `$!` twigil vs its method (and vice versa). I'm always inclined to use its `$!` twigil form but few modules I've come across use the accessor form instead. I figured I haven't weighted my decision that much. 01:01
01:08 NODE left 01:10 NODE joined
AlexDaniel` uzl: yeah, I probably meant `$!` any time I wrote `$.` 01:12
uzl[m] AlexDaniel: 😂 Any compelling reason why one would use `$.` instead `$!` when accessing the attribute? 01:16
AlexDaniel` uzl: I'm not sure, but what happens when a subclass decides to override the attribute somehow? 01:18
01:20 squashable6 left 01:21 squashable6 joined
uzl[m] Not sure. Wouldn't that be delegated to the parent class's attribute? 01:22
01:25 aborazmeh left 01:48 paul64 joined 01:52 paul64 left 01:53 Redfoxmoon left 01:54 Redfoxmoon joined 01:58 yht left 02:11 ufobat_ joined 02:15 ufobat__ left
vrurg uzl[m]: unless I'm too late... :) If child overrides an attribute with $.attr you get child's attribute. 02:32
cpan-raku New module released to CPAN! AttrX::Mooish (0.7.3) by 03VRURG 02:36
02:41 regreg_ left 02:50 Altai-man_ joined 02:53 ZzZombo joined, ZzZombo left, sena_kun left 03:09 caterfxo joined 03:15 caterfxo left 03:34 devmikey left 03:35 ukine joined, ukine left 04:00 pilne left 04:14 upupbb-user1 joined 04:40 caterfxo joined 04:51 sena_kun joined 04:53 wamba joined, Altai-man_ left 04:54 casa_ joined 04:55 upupbb-user1 left 05:08 caterfxo left 05:17 _jrjsmrtn left 05:20 __jrjsmrtn__ joined 05:22 caterfxo joined 05:23 casa_ left, casa_ joined, caterfxo left 05:24 caterfxo joined 05:35 sauvin joined 05:42 andrzejku joined 05:54 wamba left
Doc_Holliwould strange. this weeks challenge #2 basically shouts RECURSION in your face, but except for me and someone else I only see iterative solutions. 05:55
06:00 wamba joined 06:05 wamba left 06:22 wamba joined 06:26 Redfoxmoon left, Redfoxmoon joined 06:42 Doc_Holliwould left 06:50 Altai-man_ joined 06:52 sena_kun left 07:09 no-n joined 07:42 sjm_uk joined 07:57 wamba left 08:05 rindolf joined 08:06 NODE left 08:07 ilogger2 joined, timeless joined, Voldenet joined, sarna joined 08:08 perlbot joined, DarthGandalf joined, NODE joined 08:13 Doc_Holliwould joined 08:15 wamba joined 08:16 Celelibi joined 08:23 upupbb-user1 joined 08:31 natrys joined 08:36 ufobat_ joined 08:41 chloekek joined 08:44 leont joined 08:47 dakkar joined, ufobat_ left 08:50 ufobat joined 08:52 ufobat left 08:55 ufobat joined 09:01 pecastro joined 09:02 Actualeyes joined 09:04 [Sno] joined 09:14 [Sno] left 09:15 erdic joined 09:29 Doc_Holliwould left
Altreus Aren't all iterative solutions writable as recursive solutions? 09:33
09:46 [Sno] joined
chloekek All iteration can be implemented with recursion, but without tail call optimization doing such is inefficient. 09:52
dakkar I mean, any computable function can be rewritten as a `while` with a `switch` inside, but it's not often a good idea to do so 😜 09:59
tellable6 2020-03-24T17:52:21Z #raku <tbrowder> dakkar: ?, i'll check it...no, not configurable that i can see, but useful anyway, thnx 10:00
10:01 girafe joined
Altreus Where are the challenges? I wanna see what #2 is 10:03
10:12 daxim joined 10:14 bdju left 10:15 bdju joined 10:31 daxim left 10:36 daxim joined 10:50 dotdotdot joined 10:56 NODE left 10:59 NODE joined
tbrowder trying to port perl regex to raku: can anyone translate perl's "\G" to raku? 11:05
jnthn I think you'd just use m:g in Raku? 11:07
Though I may be forgetting exactly what it does
11:07 xelxebar joined 11:08 ptrcmd joined
tbrowder perlre says "match only at pos()" 11:11
where "pos() is the end of last end-of-match position of prior m//g" 11:13
so m:g sounds like it. in the actual code i'm looking at it may be trying to match internal start/end of lines because they are using the 'm' modifier 11:17
back to the task, thnx 11:18
11:24 dakkar left, dakkar joined 11:37 orinthe joined 11:41 roguelazer joined 12:11 mowcat joined, daxim left 12:12 aborazmeh joined, aborazmeh left, aborazmeh joined 12:16 daxim joined 12:23 NODE left 12:25 NODE joined 12:26 NODE left 12:28 NODE joined 12:29 NODE left 12:31 sena_kun joined, NODE joined 12:32 daxim left 12:39 daxim joined 12:52 sena_kun left 13:02 chloekek left, aborazmeh left 13:08 daxim left 13:11 rbt joined 13:13 daxim joined 13:19 wamba left 13:32 upupbb-user1 left 13:42 lucasb joined 13:44 andrzejku joined 13:45 chloekek joined
cpan-raku New module released to CPAN! Path::Router (0.5.1) by 03HANENKAMP 13:46
13:57 mowcat left
Kaiepi i have a problem with tracing for assignments to any attribute of a type that i'm not sure how to solve 14:02
the way i deal with tracing of all methods of a type is mix in a role to the type's HOW with a compose method that wraps its methods either before or after composition depending on the type of method 14:03
but for attributes, i can't deal with it after composition, somehow the tracing gets lost
but if i do it before composition, then any roles' attributes that get mixed in won't get traced
what can i do?
atm i make the role mix in a compose_attributes method instead, but that doesn't work with punned roles 14:04
14:09 wamba joined 14:11 silug joined
Kaiepi ah, wrapping compose and compose_repr seems to work 14:17
14:29 El_Che left, El_Che joined, ambs joined 14:30 AlexDani` joined, polettixx joined, tejr joined 14:31 upupbb-user2 joined, tejr left, tejr joined, xinming joined, sivoais joined, cpan-raku joined, cpan-raku left, cpan-raku joined, Mithaldu joined 14:42 sena_kun joined 14:43 sena_kun left, sena_kun joined 14:48 ribasushi joined 14:50 Altai-man_ joined 14:51 natrys left 14:53 sena_kun left 14:55 andrzejku left 14:56 NODE left 14:58 NODE joined 15:01 guifa2 joined
guifa2 uggggh. Setting up new machine and Catalina doesnt like rakudo star 15:05
lizmat doesn't like Catalina to begin with: it broke several of my workflows 15:11
and if that's the way Apple continues, then I'll be looking for other hardware / software to work with
15:12 silug left
jnthn The new notarization stuff for Catalina is causing us a lot of trouble with shipping Comma on MacOS too. Especially 'cus we had it all working, and then they ratcheted the requirements up even further. :( 15:14
15:15 guifa2 left 15:19 silug joined 15:23 casa_ joined 15:27 mowcat joined 15:33 devmikey joined 15:36 aluaces joined, Doc_Holliwould joined 15:40 Kaiepi joined
El_Che I have a mac laying around (my train laptop :) ), I don't even know what release it runs :) 15:42
I had to spend a lot of work to make the shortcuts human on an azerty keyboard 15:43
macos just takes the qwerty shortcuts and use them as is on other layouts
so ctrl ` (alt tabbing withing same apps): the ctrl you use is on the left, the ` en the extreme right 15:44
useless
and the ` is also too close to the right ctl, so you need 2 hands
I ment apple key
synthmeat i don't know. i have same mac machine for 7 years now, regularly updated. incoparably better experience than linux or windows before that. 15:46
incomparably, even.
helps that i live in cli tho :D 15:47
El_Che is certainly easier to code than on windows
but I pain compared to linux
(in my experience)
windows is by far the better machine for games thoughs :) 15:48
synthmeat definitely. consoles are even better. :)
El_Che I have a nice workflow on linux for testing my code: I run containers with podman (non root) and run tests against them 15:49
tried it on mac
pure pain
the podman in brew is just a proxy to send to a linux docker host :)
and every time I install something with brew I feel uneasy, securitywise 15:50
synthmeat i just ssh into server for development
El_Che I commute
synthmeat all dev tools on desktop are just for "play"
El_Che and some parts are spotty
therefor I worked on getting I good setup on the mac
synthmeat mosh works fine for me during commute
El_Che (I work on linux at home and work)
synthmeat (not that i commute a lot tho)
15:50 mowcat left
El_Che well, I have code that talks to the keycloak api, Vault and uses a db 15:51
so the tests to be usefull, need to talk or mock that
synthmeat yeh, different types of devs all around the world
El_Che really having the services available to my tests makes me very efficient
event if we have whole the CI infra 15:52
synthmeat i don't write tests or have CI :)
El_Che :) 15:56
jdv79 m: [|]<a b c> 16:17
evalable6
jdv79 why does that parse like that?
m: say [|]<a b c>
evalable6 any()
jdv79 m: say [|] <a b c>
evalable6 any(a, b, c)
jdv79 that's what i mean
oh, nm 16:19
16:21 roguelazer left 16:22 roguelazer joined 16:28 wildtrees joined 16:33 wildtrees left 16:34 wildtrees joined
cpan-raku New module released to CPAN! Crypt::CAST5 (0.1.1) by 03KAIEPI 16:34
Kaiepi ^ adds the security warning from twitter.com/Mrofnet/status/1243209830753538048 to the readme 16:35
16:40 wildtrees left, wildtrees joined 16:46 chloekek left, wildtrees left 16:51 sena_kun joined 16:53 Altai-man_ left 16:54 xinming_ joined 16:55 benlittle joined 16:57 xinming left
El_Che lizmat: the complot theory nut in may yells that all the changes are just the ios'ation of macos ;) 16:59
17:04 chloekek joined 17:11 caterfxo joined 17:15 wamba left 17:18 lichtkind joined
lichtkind is here someone from the rakudoc team? 17:19
i just want to know it last paragraph first line github.com/Raku/doc/blob/master/do...-core.pod6 is typo or intended
17:22 upupbb-user2 left 17:34 dakkar left 17:36 guifa2 joined 17:38 epony joined
moritz you mean the weird character in the first column? 17:42
looks like a typo to me
Geth doc: f582347987 | Coke++ | doc/Language/modules-core.pod6
fix pod

spotted by lichtkind++
17:44
linkable6 Link: docs.raku.org/language/modules-core
18:01 chloekek left
lichtkind ah good 18:05
i checked too if there is POD syntax i didnt know but found nothing with ≈
18:10 netrino joined 18:11 netrino left 18:25 dogbert11 joined
lichtkind its safe to say there are now abstract types in raku? 18:31
18:43 chloekek joined 18:47 wildtrees joined 18:50 aborazmeh joined, aborazmeh left, aborazmeh joined 18:51 Altai-man_ joined 18:54 sena_kun left, wamba joined, wildtrees left
Geth doc: 4e3b87f407 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Type/List.pod6
Fix typo
19:04
linkable6 Link: docs.raku.org/type/List
19:06 casa_ left 19:10 MasterDuke joined
guifa2 lichtkind: I mean, you can make things that function like abstract types in other languages 19:15
19:17 aborazmeh left
lichtkind guifa2: yes but there are not there in classical sense (which i consider a feature) 19:17
thank you 19:18
19:23 chloekek left
nine Sure we have abstract types: 19:24
m: role ImAbstract { method foo() { ... } }; ImAbstract.new
evalable6 (exit code 1) Method 'foo' must be implemented by ImAbstract because it is required by roles: ImAbstract.
in block <unit> at /tmp/Tsm1KksfDA line 1
guifa2 I guess I was thinking in a traditional sense an abstract type all of the methods would be abstract, but maybe I'm misremembering other languages' approaches 19:27
lichtkind yeah you can instanciate roles and use that to mimick the dehaviour - good point thant steffen
19:28 wildtrees joined
lichtkind i mean stefan sorry 19:28
19:33 wildtrees left 19:36 MasterDuke left 19:39 Kaiepi left, Kaiepi joined 19:50 Tirifto joined 19:58 aborazmeh joined, aborazmeh left, aborazmeh joined 20:12 Scimon joined, guifa2 left 20:13 rbt left, rbt joined 20:15 MasterDuke joined 20:20 aborazmeh left 20:22 caterfxo left 20:33 caterfxo joined 20:37 kybr joined 20:44 aborazmeh joined, aborazmeh left, aborazmeh joined 20:45 upupbb-user2 joined 20:52 sena_kun joined 20:53 Altai-man_ left 20:54 pilne joined 21:02 caterfxo left 21:03 caterfxo joined 21:04 aborazmeh left 21:20 aborazmeh joined, aborazmeh left, aborazmeh joined 21:22 someuser joined
Geth doc: 04055410c6 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/iterating.pod6
prefer raku
21:24
linkable6 Link: docs.raku.org/language/iterating
21:44 aborazmeh left 21:46 aborazmeh joined, aborazmeh left, aborazmeh joined
tbrowder m: my $a = 'a'; my @a; @a.append($a); sub f(@b) {for @b { $_ = 'c'}}; .say for @a; f(@a); .say for @a 21:47
evalable6 a
c
21:51 aborazmeh left, aborazmeh_ joined, aborazmeh_ left, aborazmeh_ joined 21:52 aborazmeh_ is now known as aborazmeh 22:06 sena_kun1 joined, sena_kun left, sena_kun1 left, aborazmeh left 22:07 thundergnat joined 22:08 aborazmeh joined, aborazmeh left, aborazmeh joined
thundergnat m: my @wat = flat [2,3,4], 10,11 ... *; say @wat[^5]; 22:08
evalable6 ([2 3 4] 10 11 12 13)
thundergnat hmm
bisectable6: 2020.01 my @wat = flat [2,3,4], 10,11 ... *; say @wat[^5];
bisectable6 thundergnat, Using old=2020.01 new=HEAD in an attempt to do what you mean
thundergnat, Bisecting by output (old=2020.01 new=d8366ff) because on both starting points the exit code is 0
thundergnat, bisect log: gist.github.com/35b46a929accbeca8b...0dcf70a891 22:09
thundergnat, (2020-03-22) github.com/rakudo/rakudo/commit/92...b13b3062b1
22:13 caterfxo left 22:15 lichtkind left
thundergnat m: my @wat = flat [2,3,4], 10,11 .. *; say @wat[^5]; 22:17
22:17 caterfxo joined
evalable6 (signal SIGHUP) «timed out after 10 seconds» 22:17
thundergnat m: my @wat := flat [2,3,4], 10,11 .. *; say @wat[^5];
evalable6 (signal SIGHUP) «timed out after 10 seconds»
22:17 lichtkind joined
thundergnat meh 22:17
m: my @wat = lazy flat [2,3,4], 10,11 ... *; say @wat[^5];
evalable6 ([2 3 4] 10 11 12 13) 22:18
thundergnat m: my @wat = lazy flat [2,3,4], 10,11 .. *; say @wat[^5];
evalable6 (2 3 4 10 11)
thundergnat hmm again
22:19 aborazmeh left 22:20 aborazmeh joined, aborazmeh left, aborazmeh joined 22:25 _jrjsmrtn joined 22:26 wamba left 22:30 aborazmeh left, aborazmeh_ joined, aborazmeh_ left, aborazmeh_ joined, lichtkind left 22:31 lichtkind joined, aborazmeh_ is now known as aborazmeh 22:38 lichtkind left 22:43 sarna left, sarna joined
AlexDani` lizmat: ↑ 22:48
22:48 AlexDani` is now known as AlexDaniel, AlexDaniel left, AlexDaniel joined
AlexDaniel ah, there's a ticket! 22:49
I'm too slow :)
lizmat AlexDaniel: I just committed the fix
AlexDaniel … even slower than I think…
lizmat++ thank you
lizmat you're welcome!
AlexDaniel 6c: sub s () { my @A = 1, { @A[1] } ... * }; s()[1] 22:50
lizmat: re “which clearly shows this is a long standing issue.” (github.com/rakudo/rakudo/issues/35...604582493)
lizmat: it's better to use committable, bisectable tests just two points 22:51
lizmat: 2015.12 and HEAD, both of which are far from being representative
22:51 aborazmeh left
AlexDaniel OK in this case committable is of course much slower :) 22:52
22:52 aborazmeh joined, aborazmeh left, aborazmeh joined
committable6 AlexDaniel, gist.github.com/18d7f84267f506990d...2711d51e88 22:52
AlexDaniel lizmat: but look ↑, this is a much clearer picture of what happened 22:53
lizmat indeed 22:54
TIL
22:55 Scimon left, guifa2 joined
AlexDaniel lizmat: also, now that 2015 is way too much in the past, some bugs had changed their behavior multiple times in that period, so bisectable will point you to the change in behavior but likely a random one in that period, possibly not the one you're looking for 22:58
lizmat yeah, got that :-)
AlexDaniel eventually we'll need to change the default for old= but I'm not sure what's the right time
6d: say $*PERL.compiler.version
committable6: 6d say $*PERL.compiler.version 22:59
committable6 AlexDaniel, ¦6d: «Cannot find this revision (did you mean “v6.c”?)»
AlexDaniel dumb bot :D 23:00
6c: say $*PERL
committable6 AlexDaniel, gist.github.com/4748e3f4238676f7e0...0c8b3942cd
AlexDaniel yeah, I guess old=2018.11 should become the default relatively soon 23:01
23:02 lucasb left
lizmat enough hacking for today& 23:04
23:06 sena_kun joined
uzl[m] .tell vrurg Never too late; I usually backlog, especially if I've asked a question. Thanks for the clarification; sometimes I get confused with the inheritance chain. 23:13
tellable6 uzl[m], I'll pass your message to vrurg 23:14
23:14 Tirifto left
vrurg uzl[m]: then you probably don't know that you can $.method too? :) 23:15
AlexDaniel uzl[m]: backlog? You don't get immediate notifications on your phone? :) 23:18
Grinnz <3 irccloud mobile app 23:20
AlexDaniel` Grinnz: it's a little bit different here because we're not even on IRC :)
Grinnz well, irccloud is that little bit different already, since it's the IRC client and you just have irccloud clients 23:21
23:23 Doc_Holliwould left 23:24 finsternis joined
uzl[m] AlexDaniel: I've been cutting out the number of apps I've on my phone; I could install Riot but more often than not, I find myself asking questions whenever I'm at the computer anyway ;-). 23:24
synthmeat what kind of perlmeister doesn't run their irc client on the server, pffft
uzl[m] vrurg: regular methods? Without self.method? 23:25
AlexDaniel` uzl: I see
synthmeat: well… I run my own matrix server, does it count? :P
probably not because the bridge is not connected to my server directly…
synthmeat get of my lawn
vrurg m: class Foo { method foo($s) { say "YES! -- ", $s }; method bar { $.foo: q<it's $.foo> } }; Foo.new.bar 23:26
evalable6 YES! -- it's $.foo
synthmeat just finished Learning Perl 6
pretty good book!
vrurg uzl[m]: ^
23:27 sena_kun left, aborazmeh left 23:29 aborazmeh joined, aborazmeh left, aborazmeh joined
uzl[m] vrurg: Yeah, you're right! I didn't know you could do that. By the way, what's the Raku equivalent of super from other languages (e.g. Python)? 23:29
vrurg uzl[m]: $. works since last Nov. There is no super, only dispatching. In specific cases one might use class-qualified call format. 23:30
23:30 guifa2 left
uzl[m] synthmeat: You might want to give a try to Think Raku (github.com/LaurentRosenfeld/think_raku). Also you might find useful info on Andrew Shitov's books. 23:31
synthmeat uzl[m]: my impression was that Think Raku is mostly for beginner programmers. that's not true? 23:33
uzl[m] vrurg: Oh, I see. I figured one could use redispatching (next(same|with) and call(with|same)), however I haven't seen it used that much myself. Any ecosystem module out there using them? 23:34
synthmeat i was thinking about moritz's Parsing… book, grammars look like lotsa fun to go in-depth
uzl[m] synthmeat: Mostly true. You could skip straight to the second part about grammars, OO and functional programming. However, there's always the documentation. 23:35
vrurg uzl[m]: Basically, they're everywhere. That's how you pass control in Raku. 23:36
Dispatching is not only about inheritance, but it's also about multi-routines and wrapping.
uzl[m] I should look more closely then. I've only seen on the docs and related blogs. 23:37
Oh, sure. I meant specifically the redispatching routines.
23:38 sacomo joined
uzl[m] synthmeat: I haven't read Moritz's book but looking at the TOC it seems to go deep into grammars; I'd daresay it's de-facto book about Raku grammars at the moment, Shitov is working on a Raku grammar-related book. 23:40
23:40 guifa2 joined
Grinnz keeps reading re-dispatching as redis-patching 23:40
synthmeat uzl[m]: surprisingly a lot of good resources for something so little used, tbh :D 23:41
love it. it's paradise.
uzl[m] link: andrewshitov.com/creating-a-compiler-with-raku/ 23:42
synthmeat: Do you mean Raku? Or its grammars?
synthmeat raku
i love it though. horizontally, it has every feature i'd possibly want. vertically, it has the extreme depth on most generic feature of them all, interpreting tokens (grammars). 23:46
uzl[m] Well, I think the fact so many people have put a lot effort into it means it has some potential. In any case, I guess Raku is a love project for the many people involved in it. Furthermore, the language is quite new and nobody knows what the future may hold. 23:47
23:47 leont left
synthmeat yeah, i'm quite enamored with it now 23:47
uzl[m] synthmeat: I feel the same way. I don't know if it's an illusion but Raku makes you feel things are at arm reach. 23:48
guifa2 I've switched to using Raku for almost everything I've been doing
synthmeat v8 performance spoiled me though. it's insane how fast that thing is.
guifa2 jnthn++ is getting us in that direction
23:49 pecastro left
uzl[m] (jnthn and all the people involved)++ 23:51
synthmeat here's hoping language consistency and not being chained to running in browser makes it much easier job (moar vs v8) 23:52
23:57 guifa2 left
Geth doc: Kaiepi++ created pull request #3285:
Add more documentation on proto bodies and proto/multi signatures
23:58