🦋 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.
AlexDaniel squashable6: status 00:06
squashable6 AlexDaniel, The date for the next SQUASHathon is not set
tbrowder ok, jjmerelos Raku Advent post for Day 9 is now published! 00:11
AlexDaniel weekly: Another squashathon ended! And the winner is MasterDuke17++! 00:12
notable6 AlexDaniel, Noted! (weekly)
tbrowder .tell jmerelo muchas gracias for saving my "Christmas Ham!" 00:14
tellable6 tbrowder, I'll pass your message to jmerelo
00:25 cognomin_ joined 00:28 cognominal left
dominix_ I have a strange problem with zef. it looks that I cannot uninstall some modules 00:56
zef list --installed 00:57
... Test::META:ver<0.0.13>:auth<github:jonathanstowe> ...
zef uninstall --verbose "Test::META:ver<0.0.13>"
!!!> Found no matching candidates to uninstall
zef list --installed 00:58
Test::META:ver<0.0.13>:auth<github:jonathanstowe>
Test::META:ver<0.0.16>:auth<github:jonathanstowe>:api<1.0>
I have to uninstall Test::META then install Test::META to have only 01:22
Test::META:ver<0.0.16>:auth<github:jonathanstowe>:api<1.0> in the zef list --installed
is that a bug ? 01:23
vrurg dominix_: looks like it is. I think it'd be good to file an issue in zef repo. 01:26
01:28 evalable6 left 01:30 evalable6 joined 02:00 xinming left 02:01 xinming joined
dominix_ vrurg: OK 02:02
is it safe to "rm -rf ~/.zef ~/.perl6" ? it seeme it fix some issue in zef ... 02:09
seems
ZzZombo SmokeMachine: I kinda got how to declare, but how to use a custom metaclass? 02:18
02:22 lucasb left 02:36 Doc_Holliwould left 02:44 dominix_ left 03:22 wamba joined 03:40 stoned75 left
ZzZombo m: role R[Str:D $n]{has $.n = $n};role R2[$n]{also does R[$n]};class A does R2['asd'] {};say A.new 04:12
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/_Gyuy6UAd2
No appropriate parametric role variant available for 'R'
at /tmp/_Gyuy6UAd2:1
ZzZombo m: role R[Str:D $n]{has Str:D $.n = $n};role R2[$n]{also does R[$n]};class A does R2['asd'] {};say A.new
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/ouAq069lhy
No appropriate parametric role variant available for 'R'
at /tmp/ouAq069lhy:1
ZzZombo Please work.
m: role R[Str:D $n]{has Str:D $.n = $n};role R2[Str:D $n]{also does R[$n]};class A does R2['asd'] {};say A.new 04:14
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/LPRG1K32SH
No appropriate parametric role variant available for 'R'
at /tmp/LPRG1K32SH:1
04:18 cpan-raku left 04:27 cpan-raku joined, cpan-raku left, cpan-raku joined 05:01 wamba left 05:18 AlexDani` joined 05:20 AlexDaniel left 05:22 xinming left, xinming joined 05:26 sauvin joined 05:28 AlexDani` is now known as AlexDaniel, AlexDaniel left, AlexDaniel joined, benjif left 05:35 rindolf joined
ZzZombo m: role R[Str:D $n]{has Str:D $.n = $n};role R2 {also does R['R2']};class A does R['asd'] does R2 {};say A.new 05:44
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/WRqsRmQpXb
Attribute '$!n' conflicts in role composition
at /tmp/WRqsRmQpXb:1
ZzZombo m: role R[Str:D $n]{has Str:D $.n = $n};role R2 {also does R['R2']};class A does R['asd'] {};say A.new 05:45
evalable6 A.new(n => "asd")
ZzZombo m: role R[Str:D $n]{has Str:D $.n = $n};role R2 {also does R['R2']};class A does R2 {};say A.new
evalable6 A.new(n => "R2")
ZzZombo m: role R[Str:D $n]{has Str:D $.n = $n};role R2[Str:D $n]{also does R[$n]};class A does R2['asd'] {};say A.new
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/4n5ZU3J7TC
No appropriate parametric role variant available for 'R'
at /tmp/4n5ZU3J7TC:1
ZzZombo WHYYYYYYYYY
06:09 wamba joined 06:15 stoned75 joined 06:23 Xliff joined 06:43 RobRaku joined 06:47 RobRaku left 06:51 wamba left 06:52 dominix joined 07:03 xinming left 07:04 xinming joined 07:31 wamba joined
dominix hi everyone, I have a question regarding module. How do I make the link with the name of a module I have installed and it real install location ? 07:34
for exemple I have installed PSGI
if I tpe p6doc PSGI i have "No Pod found in /opt/rakudo-pkg/share/perl6/site/sources/C3577325076AA02263D770AD0F22D36E14F81568" 07:35
the fact is : I have in /opt/rakudo-pkg/share/perl6/site/sources/ much more stuff than I have modules installed 07:37
how does raku knows where to search ? is there a database ? a computation of the name ? how does this works ? 07:49
08:01 wamba left 08:06 wamba joined 08:09 abraxxa joined 08:12 cpan-raku left 08:13 cpan-raku joined, cpan-raku left, cpan-raku joined
Xliff dominix: Sorry to text and go, but the short answer is that the name is computed by the compiler. I know not the details. 08:15
Good night!
08:15 Xliff left 08:18 xinming left 08:21 xinming joined 08:22 xinming left, xinming joined 08:24 stoned75 left 08:42 dominix left
ZzZombo m: role R[Str:D $n]{our Str:D $n = $n};role R2[Str:D $n]{also does R[$n]};class A does R2['asd'] {};say A.n 08:58
evalable6 (exit code 1) 04===SORRY!04===
Ca…
ZzZombo, Full output: gist.github.com/f884c3312718c8801f...cae5ffbc62
ZzZombo m: role R[Str:D $_n]{our Str:D $n = $_n};role R2[Str:D $n]{also does R[$n]};class A does R2['asd'] {};say A.n 09:08
evalable6 (exit code 1) 04===SORRY!04=== Er…
ZzZombo, Full output: gist.github.com/e0f1d421005933f671...508398a9be
ZzZombo m: role R[Str:D $_n]{our $n = $_n};role R2[Str:D $n]{also does R[$n]};class A does R2['asd'] {};say A.n 09:09
evalable6 (exit code 1) 04===SORRY!04=== Er…
ZzZombo, Full output: gist.github.com/7eaf82b2b211b3db7d...3322b74225
ZzZombo perlbot: eval: role R[Str:D $_n]{OUR::$n = $_n};role R2[Str:D $n]{also does R[$n]};class A does R2['asd'] {};say A.n 09:10
perlbot ZzZombo: 5===SORRY!5=== Error while compiling /tmp/LvNP_TLNfb␤Malformed lookup of ::$n; please use ::('$n'), ::{'$n'}, or ::<$n>␤at /tmp/LvNP_TLNfb:1␤------> 3role R[Str:D $_n]{OUR7⏏5::$n = $_n};role R2[Str:D $n]{also does ␤[Exited 1]
ZzZombo perlbot: eval: role R[Str:D $_n]{OUR::<$n> = $_n};role R2[Str:D $n]{also does R[$n]};class A does R2['asd'] {};say A.n
perlbot ZzZombo: 5===SORRY!5=== Error while compiling /tmp/6yrk6BHfRZ␤No appropriate parametric role variant available for 'R'␤at /tmp/6yrk6BHfRZ:1␤[Exited 1]
ZzZombo perlbot: eval: role R[Str:D $_n]{OUR::<$n> = $_n};role R2[Str:D $n]{also does R['asd']};class A does R2['asd'] {};say A.n 09:11
perlbot ZzZombo: No such method 'n' for invocant of type 'A'␤ in block <unit> at /tmp/hA2EAiiOQ0 line 1␤␤[Exited 1]
ZzZombo perlbot: eval: role R[Str:D $_n]{OUR::<$n> = $_n};role R2[Str:D $n]{also does R['asd']};class A does R2['asd'] {};say A::n
perlbot ZzZombo: Could not find symbol '&n'␤ in block <unit> at /tmp/w4otO5uk8U line 1␤␤[Exited 1]
ZzZombo perlbot: eval: role R[Str:D $_n]{OUR::<$n> = $_n};role R2[Str:D $n]{also does R['asd']};class A does R2['asd'] {};say $A::n
perlbot ZzZombo: (Any)␤
ZzZombo Damn it.
m: Int.^name.say 09:12
evalable6 Int
ZzZombo m: Int.^shortname.say 09:18
evalable6 Int
ZzZombo m: Int.^setname('asd');Int.^name.say 09:19
evalable6 (exit code 1) No such method 'setname' for invocant of type 'Perl6::Metamodel::ClassHOW'. Did you mean 'set_name'?
in block <unit> at /tmp/H5e2jFFLwZ line 1
ZzZombo m: Int.^set_name('asd');Int.^name.say
evalable6 asd
ZzZombo m: Int.^set_name('asd 123 !!!');Int.^name.say 09:20
evalable6 asd 123 !!!
ZzZombo m: Int.^set_name('asd 123 !!!');dd Int
evalable6 asd 123 !!!
ZzZombo m: Int.^set_name('asd 123 !!!');dd Int, 1
evalable6 asd 123 !!!
1
09:36 Doc_Holliwould joined
ZzZombo perlbot: eval: role R[Str:D $n]{method ^name --> $n};role R2[Str:D $n]{also does R['asd']};class A does R2['asd'] {};say A.^name 09:39
perlbot ZzZombo: 5===SORRY!5=== Error while compiling /tmp/Tdr7YuFta8␤Missing block␤at /tmp/Tdr7YuFta8:1␤------> 3role R[Str:D $n]{method ^name7⏏5 --> $n};role R2[Str:D $n]{also does R['␤[Exited 1]
ZzZombo perlbot: eval: role R[Str:D $n]{method ^name {$n}};role R2[Str:D $n]{also does R['asd']};class A does R2['asd'] {};say A.^name
perlbot ZzZombo: Potential difficulties:␤ Useless declaration of a has-scoped method in role (did you mean 'my method name'?)␤ at /tmp/45HHPhffES:1␤ ------> 3role R[Str:D $n]{method7⏏5 ^name {$n}};role R2[Str:D $n]{also does␤A␤
09:41 sena_kun joined 09:43 wamba left
ZzZombo perlbot: eval: role R[Str:D $n]{method name {$n}};class A {};A.HOW does R['asd'];say A 09:49
perlbot ZzZombo: (A)␤
ZzZombo perlbot: eval: role R[Str:D $n]{method name {$n}};class A {};A.HOW does R['asd'];say A.^name
perlbot ZzZombo: Too many positionals passed; expected 1 argument but got 2␤ in method name at /tmp/XmtbKB5IMa line 1␤ in block <unit> at /tmp/XmtbKB5IMa line 1␤␤[Exited 1]
ZzZombo perlbot: eval: role R[Str:D $n]{method name(\SELF) {$n}};class A {};A.HOW does R['asd'];say A.^name
perlbot ZzZombo: asd␤ 09:50
ZzZombo perlbot: eval: role R[Str:D $n]{method name(\SELF) {$n}};class A {};A.HOW does R['asd'];class B is A {};B.HOW does R['foo'];say B.^name 09:51
perlbot ZzZombo: foo␤
ZzZombo So how can I condense class declaration and `<class>.HOW does <role>` into one thing? Or otherwise achieve the same result in a neat way? 09:52
09:53 wamba joined
ZzZombo perlbot: eval: role R[Str:D $n]{COMPOSE { $?PACKAGE.HOW does role :: {method name(\SELF) {$n}}};class A does R['asd'];say A.^name 09:57
perlbot ZzZombo: 5===SORRY!5=== Error while compiling /tmp/THvhXL5i4d␤Cannot declare our-scoped class inside of a role␤(the scope inside of a role is generic, so there is no unambiguous␤package to install the symbol in)␤at /tmp/THvhXL5i4d:1␤------> 3name(\SELF) {$n}}};class A does R['asd']7⏏5;say A.^name␤[Exited 1]
ZzZombo perlbot: eval: sub trait_mod<is>(Any:U $cls, Str:D :$anno){ $cls.HOW does role :: {method name(\SELF) {$n}}};class A is anno('asd');say A.^name 10:02
perlbot ZzZombo: 5===SORRY!5=== Error while compiling /tmp/DjjphmYACs␤Missing block␤at /tmp/DjjphmYACs:1␤------> 3sub trait_mod7⏏5<is>(Any:U $cls, Str:D :$anno){ $cls.HOW␤ expecting any of:␤ new name to be defined␤[Exited 1]
10:02 wamba left
ZzZombo perlbot: eval: multi trait_mod<is>(Mu:U $cls, Str:D :$anno) { $cls.HOW does role :: {method name(\SELF) {$n}}};class A is anno('asd');say A.^name 10:05
perlbot ZzZombo: 5===SORRY!5=== Error while compiling /tmp/GGez3YT97F␤Missing block␤at /tmp/GGez3YT97F:1␤------> 3multi trait_mod7⏏5<is>(Mu:U $cls, Str:D :$anno) { $cls.HOW␤ expecting any of:␤ new name to be defined␤[Exited 1]
10:05 wamba joined 10:08 wamba left
ZzZombo perlbot: eval: multi trait_mod<is>(Mu:U $cls, :$anno) { $cls.HOW does role :: {method name(\SELF) {$anno}}};class A is anno('asd');say A.^name 10:09
perlbot ZzZombo: 5===SORRY!5=== Error while compiling /tmp/QkSkVSDfqv␤Missing block␤at /tmp/QkSkVSDfqv:1␤------> 3multi trait_mod7⏏5<is>(Mu:U $cls, :$anno) { $cls.HOW does ␤ expecting any of:␤ new name to be defined␤[Exited 1]
ZzZombo perlbot: eval: multi trait_mod:<is>(Mu:U $cls, :$anno!) { $cls.HOW does role :: {method name(\SELF) {$anno}}};class A is anno('asd');say A.^name 10:10
perlbot ZzZombo: 5===SORRY!5=== Error while compiling /tmp/3PCTQ26CWB␤Too late for unit-scoped class definition;␤Please use the block form.␤at /tmp/3PCTQ26CWB:1␤------> 3\SELF) {$anno}}};class A is anno('asd');7⏏5say A.^name␤[Exited 1]
ZzZombo perlbot: eval: multi trait_mod:<is>(Mu:U $cls, :$anno!) { $cls.HOW does role :: {method name(\SELF) {$anno}}};class A is anno('asd') {};say A.^name 10:11
perlbot ZzZombo: No exception handler located for catch␤ at SETTING::src/core/Exception.pm6:427 (/langs/perl6/share/perl6/runtime/CORE.setting.moarvm:print_exception)␤ from SETTING::src/core/Exception.pm6:484 (/langs/perl6/share/perl6/runtime/CORE.setting.moarvm:<anon>)␤ from gen/moar/stage2/NQPHLL.nqp:1854 (/langs/perl6/share/nqp/lib/NQPHLL.moarvm:command_eva... [Output truncated. perl.bot/p/wp7xmx ]
ZzZombo SHIIT
10:16 AlexDaniel` left, uzl[m] left, Nasrudin left, BlackChaosNL[m] left, Demos[m] left, MitarashiDango[m left, tyil[m] left, unclechu left, rba[m] left, CIAvash left, matiaslina left 10:25 Guest38485 joined 10:46 rba[m] joined 10:48 abraxxa left 10:49 abraxxa joined 10:52 sena_kun left 11:06 Doc_Holliwould left 11:09 sena_kun joined 11:23 Demos[m] joined, BlackChaosNL[m] joined, AlexDaniel` joined, tyil[m] joined, MitarashiDango[m joined, unclechu joined, Nasrudin joined, uzl[m] joined, CIAvash joined, matiaslina joined
ZzZombo perlbot: eval: multi trait_mod:<is>(Mu:U $cls, :$anno!) { $cls.HOW does role :: {method name(\SELF) {$anno}}};class A is anno('asd') {};say A.^name 11:46
perlbot ZzZombo: No exception handler located for catch␤ at SETTING::src/core/Exception.pm6:427 (/langs/perl6/share/perl6/runtime/CORE.setting.moarvm:print_exception)␤ from SETTING::src/core/Exception.pm6:484 (/langs/perl6/share/perl6/runtime/CORE.setting.moarvm:<anon>)␤ from gen/moar/stage2/NQPHLL.nqp:1854 (/langs/perl6/share/nqp/lib/NQPHLL.moarvm:command_eva... [Output truncated. perl.bot/p/3v2x72 ]
ZzZombo perlbot: eval: multi trait_mod:<is>(Mu:U $cls, :$anno!) { $cls.HOW does role :: {method name(\SELF) {$anno}}};class A is anno('asd') {};
perlbot ZzZombo: No exception handler located for catch␤ at SETTING::src/core/Exception.pm6:427 (/langs/perl6/share/perl6/runtime/CORE.setting.moarvm:print_exception)␤ from SETTING::src/core/Exception.pm6:484 (/langs/perl6/share/perl6/runtime/CORE.setting.moarvm:<anon>)␤ from gen/moar/stage2/NQPHLL.nqp:1854 (/langs/perl6/share/nqp/lib/NQPHLL.moarvm:command_eva... [Output truncated. perl.bot/p/p4op2e ]
ZzZombo perlbot: eval: multi trait_mod:<is>(Mu:U $cls, :$anno!) { $cls.HOW does role :: {method name(\SELF) {$anno}}};
perlbot ZzZombo: No output.
ZzZombo perlbot: eval: multi trait_mod:<is>(Mu:U $cls, :$anno!) { $cls.HOW does my role R {method name(\SELF) {$anno}}};class A is anno('asd') {}; 11:47
perlbot ZzZombo: No exception handler located for catch␤ at SETTING::src/core/Exception.pm6:427 (/langs/perl6/share/perl6/runtime/CORE.setting.moarvm:print_exception)␤ from SETTING::src/core/Exception.pm6:484 (/langs/perl6/share/perl6/runtime/CORE.setting.moarvm:<anon>)␤ from gen/moar/stage2/NQPHLL.nqp:1854 (/langs/perl6/share/nqp/lib/NQPHLL.moarvm:command_eva... [Output truncated. perl.bot/p/hp5on1 ]
ZzZombo perlbot: eval: multi trait_mod:<is>(Mu:U $cls, :$anno!) { $cls.HOW does my role R {method name(\SELF) {$anno}}};class A is anno {};
perlbot ZzZombo: No exception handler located for catch␤ at SETTING::src/core/Exception.pm6:427 (/langs/perl6/share/perl6/runtime/CORE.setting.moarvm:print_exception)␤ from SETTING::src/core/Exception.pm6:484 (/langs/perl6/share/perl6/runtime/CORE.setting.moarvm:<anon>)␤ from gen/moar/stage2/NQPHLL.nqp:1854 (/langs/perl6/share/nqp/lib/NQPHLL.moarvm:command_eva... [Output truncated. perl.bot/p/wjs7jj ]
ZzZombo perlbot: eval: multi trait_mod:<is>(Mu:U $cls, :$anno!) { $cls.HOW does my role R {method name(\SELF) {$anno}}};class A is foo {};
perlbot ZzZombo: 5===SORRY!5=== Error while compiling /tmp/DpWSc0ji5L␤'A' cannot inherit from 'foo' because it is unknown.␤at /tmp/DpWSc0ji5L:1␤[Exited 1]
ZzZombo perlbot: eval: role R[Str:D $n]{COMPOSE { $?PACKAGE.HOW does role :: {method name(\SELF) {$n}}};class A does R['asd'];say A.^name 11:49
perlbot ZzZombo: 5===SORRY!5=== Error while compiling /tmp/abeGosks2_␤Cannot declare our-scoped class inside of a role␤(the scope inside of a role is generic, so there is no unambiguous␤package to install the symbol in)␤at /tmp/abeGosks2_:1␤------> 3name(\SELF) {$n}}};class A does R['asd']7⏏5;say A.^name␤[Exited 1]
11:55 wamba joined
ZzZombo perlbot: eval: role R[Str:D $n]{COMPOSE { $?PACKAGE.HOW does role :: {method name(\SELF) {$n}}};class A does R['asd'] {};say A.^name 11:55
perlbot ZzZombo: 5===SORRY!5=== Error while compiling /tmp/Xn9Sg7AeHY␤Cannot declare our-scoped class inside of a role␤(the scope inside of a role is generic, so there is no unambiguous␤package to install the symbol in)␤at /tmp/Xn9Sg7AeHY:1␤------> 3name(\SELF) {$n}}};class A does R['asd']7⏏5 {};say A.^name␤[Exited 1]
ZzZombo perlbot: eval: role R[Str:D $n]{COMPOSE { $?PACKAGE.HOW does role :: {method name(\SELF) {$n}}}};class A does R['asd'] {};say A.^name 11:56
perlbot ZzZombo: A␤
ZzZombo perlbot: eval: role R[Str:D $n]{COMPOSE { $?PACKAGE.HOW does role :: {method name(\SELF) {$n}}}};class A does R['asd'] {};say A.^name, R.^name
perlbot ZzZombo: AR␤
11:59 leah2 left 12:03 leah2 joined
ZzZombo perlbot: eval: role R[Str:D $n]{COMPOSE { say $?PACKAGE;$?PACKAGE.HOW does role :: {method name(\SELF) {$n}}}};class A does R['asd'] {};say A.^name, R.^name 12:14
perlbot ZzZombo: AR␤
12:32 wamba left
SmokeMachine is COMPOSE working?! 12:36
12:41 ab6tract joined
ab6tract good *, #raku! 12:41
tellable6 2019-11-19T03:35:00Z #raku <japhb> ab6tract Oh, you know, the usual -- super busy and not enough time for fun hacking. :-P
12:42 xinming left
ab6tract I'd like some pointers on fixing an LTA error message, if possible 12:42
m: class F { has $.f is required where *.IO.e }; F.new: f => "/tmp/f"
evalable6 (exit code 1) Type check failed in assignment to $!f; expected <anon> but got Str ("/tmp/f")
in block <unit> at /tmp/3O9LpC2gNT line 1
ab6tract it would be awesome to make the above spit out an IO related error there 12:43
12:43 xinming joined
ab6tract just not sure where to even start looking 12:44
or if it's even possible :) 12:47
SmokeMachine: is COMPOSE *not* working? :O 12:48
SmokeMachine ab6tract: The last time I saw, it was NIY... 12:49
(but that was long time ago...) 12:50
ab6tract ahhh... it's been working since it was implemented, which is why i got shocked :)
i didn't know it was actually part of the spec, though it makes sense.. it was a very natural addition to the object creation story
12:53 sena_kun left 12:54 wamba joined
ab6tract i thought lizmat just got tired of running everything through new/BUILD ;) 12:54
13:08 sena_kun joined 13:09 pmurias joined
tbrowder hi, all 13:12
tellable6 2019-12-09T08:25:42Z #raku-dev <jmerelo> tbrowder my pleasure. Thanks for the chance to do so.
tbrowder in my progs i typically open files for writing with :w,m 13:13
*:w
then i test for an existing file and abort unless the user enter a --force option. 13:14
veesh the mailing list is getting frustrating 13:16
just had to vent a little bit
tbrowder i think i could do this, but haven't yet tried it: "open $f, :create, :exclusive($force)" where the value of $force can be 1 or 0 13:18
on the other hand, the docs are careful to point out the hazards of using other combinations than those showm. 13:20
*shown
so, does anyone have a clever idiom to do that, or shall i create a sub to handle it? 13:21
s/shall/must/ 13:22
ab6tract hmmmm.... sounds like a good opportunity to enumerate the docs with what combinations work now relative to then 13:23
if you have a safe space to test it, could be interesting to note if the the effect was as expected and consistently so 13:24
tbrowder i'll experiment, but i was hoping someone had a good solution. btw, i just searched the modules for general error handling but only found one. it looks good, but it's for more complex use cases than i need. 13:25
ab6tract but for safety purposes a sub seems like an easy and quick way through
tbrowder: would it be enough to check whether the directory where the file will be written to is writeable? 13:26
or are you also trying to protect against fs size errors or something like that? 13:27
jnthn ab6tract: Declare a named subset type like ExistingFile and then do `has ExistingFile $.f is required` and then the error should mention that subset type name. 13:28
ab6tract jnthn: of course! 13:30
tbrowder ab6tract: no, it's to keep a user from accidentally overwriting an existing file.
ab6tract tbrowder: ah! then i would use exactly the idiom that jnthn just mentioned of a subset 13:31
tbrowder warn him and remind him of the force option if he needs it
ab6tract ah 13:33
tbrowder i saw that, but is that any better than a sub whose msg can be tailored a bit? 13:34
ab6tract Is the force option part of an interactive prompt or is it a run time flag? 13:35
tbrowder i usually have it as a run time flag
but the ease of prompting in raku probably makes that a better choice, although not so good with scripting..l 13:36
ab6tract then i would probably just use a conditional, using the constrained subset where force was not specified and otherwise clobbering. then use a CATCH to throw a custom error when the constraint isn't met
`if ($force) { my NonExistingFile $file-path = $user-input; open $file-path, :w; } else { open $user-choice, :w }; CATCH { die "File exists but --force was not specified" }` 13:39
tbrowder that's essentially what i do now, but thanks.
ab6tract gotcha :)
sorry i couldn't provide a better golf
s/golf/idiom/ 13:40
tbrowder ok,
ab6tract but you are right that subs can make it read nicer. i bet you could use multis 13:41
that usually cleans up your call site pretty nicely 13:42
tbrowder where would you use the multis? 13:43
um, i meant how would you use the multis but i think i see what you mean...thx! 13:46
ab6tract tbrowder: no worries! i'm baking an example right now :D
ZzZombo SmokeMachine: I kinda got how to declare, but how to use a custom metaclass? 13:47
13:49 lucasb joined
ab6tract tbrowder: honestly, the dispatching isn't working the way i want it to on this. let me keep poking away but i don't want to send you down a rabbit hole 13:52
the idea would be to make a set of multi candidates that would take $path and $force and then use those to define the subset. not making it magically appear in my repl though. 13:56
tbrowder: if the idea is call-site cleanliness, you could also consider abstracting the check into a barebones class
14:00 wamba left
tbrowder some good ideas, maybe you could put it all in a module along with other error-handling code :-D 14:01
i would be glad to 'zef install Super::Error::Handler', by ab6tract! 14:03
14:04 wamba joined
ab6tract tbrowder: that would be cool ;) .. but i'm happy even just to be dipping my toes back into the irc chat. it's been a bumpy couple of years for me! 14:09
anyway, in terms of an idiomatic raku approach, i imagine something like this: gist.github.com/ab5tract/e71a6d43c...2c9f8a31c4 14:10
run-time flags are awesome with run time subsets :D 14:11
. o O ( the best thing about raku idioms is.. where there may be one, there may be many ) 14:13
14:25 Doc_Holliwould joined 14:35 veesh left
ab6tract tbrowder: sorry, you may have already noticed, the previous gist was broken. it's been updated. probably still looks something like a conditional and a catch at the callsite though '=D 14:42
actually, it should mean that only the catch is necessary.. 14:43
14:46 xinming left 14:47 xinming joined 14:52 sena_kun left
tbrowder ab6tract: maybe we could convince the raku admins to add an appropriate community module repo, with an agreed-upon name, of course! 14:55
ab6tract well, to me this is one of those grey areas where it is so easy to wire up that i get lazy and never modularize it ;)
"damn you Perl!!!"" 14:56
14:56 hungrydonkey joined
ab6tract but it did occur to me already while working on this that `Guards` or `Checks` might be a good namespace for this kind of thing. namespacing is still more or less a free for all, as our community tends to prefer 14:57
ugh, minus the pluralization.. `Guard::File` or `Check::File` ... then that leads me back to my "why modularize?" when i start struggling with the transcendental fact that _no name_ could ever _truly_ describe the functionality. 14:59
but i'm pretty sure that's a personal issue ;) 15:00
15:01 hungrydonkey left
vrurg ab6tract: to the choice is simple. 'Check' if it only reports back. 'Guard' if it also takes an action. 15:07
*to me
ab6tract vrurg: nice, i like it! 15:08
15:08 hungrydonkey joined
ab6tract and `Guard` can then be easily built on and considered downstream of `Check` 15:08
15:08 sena_kun joined
vrurg ab6tract: If those are classes – inherit, perhaps. 15:09
pmurias vrurg: if I need to add stuff to nqp-configure for the truffle branch what a sane way to do it?
vrurg pmurias: like what?
me sprinkles ashes on his head. Forgot about the dependency issue. :( 15:10
[Coke] . 15:11
pmurias vrurg: github.com/perl6/nqp-configure/blo...ig.pm#L433
vrurg: I want to add truffle jars in the truffle branch
might make sense to get that list of jars out of NQP::Configure
ab6tract vrurg: `Check` modules in this system would probably be best implemented with primary consideration given to convenience of export/composability, so maybe exported subsets based on roles in a `Rule` namespace that are easy to pull in dynamically based on the importers needs 15:12
tbrowder for the file module i vote fo
pmurias vrurg: would make sense
tbrowder arrrgh, ff
vrurg pmurias: moving to -dev 15:13
tbrowder for my uses cases i like the 'Check::*' name for file checking
pmurias [Coke]: on the reddit post I got two pieces of feedback www.reddit.com/r/rakulang/comments..._feedback/
ab6tract tbrowder++ ok that settles it 15:16
i'll have a `Check::File` "out by Christmas" 15:17
;)
tbrowder well, thanks, Santa! i also would like some kind of "Error::Handler" module to give me more ad hoc actions than more formal error handling, but i admit i'm not real used to using 'try' yet. 15:19
ab6tract tbrowder: "do not use 'try', for you have the force... of the phaser CATCH!" 15:20
tbrowder yes, i know, but i need to study its use in my world a bit more. so far i've just used something like this and all worked as i neede: 15:23
15:24 hungrydonkey left 15:26 wamba left
tbrowder "try { do-something: foolish } if $! { if $! ~~ / 'some text' \h* (\S+) / { do-more-with: ~$0 } else { die "Unexpected error: {$!}" }}" 15:31
[Coke] pmurias++ 15:37
15:41 zeylos left, zeylos joined 15:45 chloekek joined 15:48 wamba joined 15:50 wamba left 16:02 wamba joined 16:03 pmurias left
Geth ¦ problem-solving: coke assigned to AlexDaniel Issue perl6-users mailing list github.com/perl6/problem-solving/issues/139 16:09
16:09 wamba left 16:10 wamba joined 16:28 scimon joined 16:46 cognominal joined 16:47 Doc_Holliwould left, chloekek left 16:50 wamba left, wamba1 joined, cognomin_ left 16:52 sena_kun left 16:55 Doc_Holliwould joined 17:07 sena_kun joined 17:08 jmerelo joined 17:12 wamba1 left 17:14 rindolf left 17:20 rindolf joined 17:22 scimon left
tony-o .tell tbrowder have you texted with Jan on whatsapp or just regular text? my phone is giving me issues with texting him 17:46
tellable6 tony-o, I'll pass your message to tbrowder
17:48 clarjon1 left 17:51 cognomin_ joined 17:54 cognominal left
tbrowder tony-o: I've only conversed with him via e-mail. 17:56
tellable6 2019-12-09T17:46:09Z #raku <tony-o> tbrowder have you texted with Jan on whatsapp or just regular text? my phone is giving me issues with texting him
18:05 chloekek joined
tony-o ah, i'll do that then, thanks tbrowder 18:06
ghc -h
oops
18:26 stoned75 joined 18:27 wamba joined
tony-o tbrowder: travis-ci.org/rakudo/rakudo/jobs/6...6489#L1069 <- check it out 18:38
18:39 hkdtam left
cpan-raku New module released to CPAN! Gnome::Gdk3 (0.15.0) by 03MARTIMM 18:42
New module released to CPAN! Gnome::N (0.15.0) by 03MARTIMM
18:43 ZzZombo left, ab6tract left, ZzZombo joined, wildtrees joined 18:54 sena_kun left
tbrowder tony-o: is it doing what you expect now? 19:03
did you make contact with jan? 19:04
19:04 veesh joined 19:08 sena_kun joined 19:15 Manifest0 joined 19:20 patrickb joined 19:43 stoned75 left 19:47 rindolf left 19:50 stoned75 joined 19:52 wamba left 19:53 wamba joined 19:56 jmerelo left
lizmat And another Rakudo Weekly News hits the Net: rakudoweekly.blog/2019/12/09/2019-...-starring/ 20:10
guifa lizmat: hooray! 20:22
tellable6 2019-12-05T15:56:12Z #raku <jmerelo> guifa please send me in some effective way your email address or ID in wordpress.com for the Advent calendar article.
sena_kun releasable6: status
releasable6 sena_kun, Next release in ≈11 days and ≈22 hours. There are no known blockers. 0 out of 102 commits logged
sena_kun, Details: gist.github.com/e184ebeac1632a6887...6fffe6c396
cpan-raku New module released to CPAN! Gnome::N (0.15.1) by 03MARTIMM 20:45
20:53 sena_kun left 21:08 sena_kun joined 21:24 MasterDuke left 21:49 pmurias joined 21:57 Xliff joined 22:03 pmurias left, pmurias joined 22:27 chloekek left 22:49 wamba left 22:52 sena_kun left 23:41 Voldenet left 23:47 Voldenet joined, Voldenet left, Voldenet joined 23:58 rjt_pl joined