🦋 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.
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
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
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
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
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
uzl[m] Not sure. Wouldn't that be delegated to the parent class's attribute? 01:22
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
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
Altreus Aren't all iterative solutions writable as recursive solutions? 09:33
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
Altreus Where are the challenges? I wanna see what #2 is 10:03
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
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
cpan-raku New module released to CPAN! Path::Router (0.5.1) by 03HANENKAMP 13:46
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
Kaiepi ah, wrapping compose and compose_repr seems to work 14:17
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
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
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)
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
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
El_Che lizmat: the complot theory nut in may yells that all the changes are just the ios'ation of macos ;) 16:59
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
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
lichtkind ah good 18:05
i checked too if there is POD syntax i didnt know but found nothing with ≈
lichtkind its safe to say there are now abstract types in raku? 18:31
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
guifa2 lichtkind: I mean, you can make things that function like abstract types in other languages 19:15
lichtkind guifa2: yes but there are not there in classical sense (which i consider a feature) 19:17
thank you 19:18
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
lichtkind i mean stefan sorry 19:28
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
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
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
thundergnat m: my @wat = flat [2,3,4], 10,11 .. *; say @wat[^5]; 22:17
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»
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
AlexDani` lizmat: ↑ 22:48
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
AlexDaniel OK in this case committable is of course much slower :) 22:52
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
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
lizmat enough hacking for today& 23:04
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
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
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]: ^
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
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.
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
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
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
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
Geth doc: Kaiepi++ created pull request #3285:
Add more documentation on proto bodies and proto/multi signatures
23:58