🦋 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:28
sena_kun joined
00:30
Altai-man_ left,
rir left
00:51
KindOne left
00:53
KindOne joined
00:54
kst left
00:57
KindTwo joined,
squashable6 left
00:58
KindOne left
01:01
squashable6 joined
01:02
KindTwo left
01:04
KindOne joined
01:13
ensamvarg3 joined
01:28
molaf left,
klapperl_ joined
01:30
klapperl left
01:40
molaf joined
01:57
roguelazer left
02:01
aborazmeh left
02:02
roguelazer joined
02:03
roguelazer left
02:07
roguelazer joined
02:10
xinming_ left
02:11
xinming_ joined
02:17
aborazmeh joined,
aborazmeh left,
aborazmeh joined
02:25
melezhik left
02:27
Altai-man_ joined
02:30
sena_kun left
02:31
xinming_ left
02:33
xinming_ joined
02:35
guifa2 joined
02:38
brtastic joined
02:40
helit joined
03:02
xinming_ left,
xinming_ joined
03:04
squashable6 left
03:06
squashable6 joined
03:08
warriors joined
03:10
warriors left
03:14
molaf left
03:44
Itaipu joined
03:51
guifa2 left
04:23
aborazmeh left
04:28
sena_kun joined
04:29
Altai-man_ left
04:30
zacts joined,
zacts left
04:31
zacts joined
04:32
zacts left
04:40
Erik43 joined
|
|||
Erik43 | download unavailable? rakudo.org/latest/star/macos 404's | 04:43 | |
04:49
Erik43 left,
Itaipu left
05:00
brtastic left
|
|||
rba | Please download the latest available star release from rakudo.org/downloads/star | 05:10 | |
tellable6 | 2020-05-21T21:15:43Z #raku <melezhik> rba I successfully tested ssh/http tunneling, it's funny stuff to learn ))) | ||
2020-05-25T15:10:39Z #raku <melezhik> rba , please ping me when you are here, thanks | |||
05:17
brtastic joined
05:56
skids left
06:00
dmc00 left
06:10
wamba joined
06:11
sjm_uk joined
06:13
JJMerelo joined
|
|||
Geth | doc: 40a753a9b7 | (Luis F. Uceta)++ | doc/Language/control.pod6 Minor rewording with few examples |
06:19 | |
doc: a2a3ec78fe | (Luis F. Uceta)++ | doc/Language/control.pod6 Make changes as requested |
|||
doc: 73d7182c56 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/control.pod6 Merge pull request #3429 from uzluisf/master Minor rewording with few examples Thanks a lot! |
|||
linkable6 | Link: docs.raku.org/language/control | ||
06:23
Kaiepi left
06:26
Kaiepi joined
06:27
Altai-man_ joined
06:29
sena_kun left
06:52
domidumont joined
06:57
NODE left
06:58
NODE joined
06:59
rindolf joined
07:16
Kaiepi left
07:21
Kaiepi joined
07:28
pecastro joined
07:38
dakkar joined
07:40
aborazmeh joined,
aborazmeh left,
aborazmeh joined
07:42
Dock_Holliwood left
07:46
MasterDuke joined
07:50
patrickb joined
07:52
Sgeo left
08:04
Black_Ribbon left
08:28
sena_kun joined
08:29
Altai-man_ left
|
|||
Geth | doc: a07587818a | (JJ Merelo)++ | doc/Language/regexes.pod6 Clarify what can be used as an argument to nth, refs #2632 |
08:30 | |
linkable6 | Link: docs.raku.org/language/regexes | ||
DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d | |||
JJMerelo | Flappers in the doc tests are back... travis-ci.com/github/Raku/doc/builds/168169665 (they never really went away) | 08:42 | |
MasterDuke | `Use of uninitialized value $repo-id` what is that `$repo-id` supposed to have? if it's talking about the git repo, github has had a lot of connectivity problems recently | 08:44 | |
08:48
kensanata joined
08:52
JJMerelo left
09:14
mowcat joined
09:40
JJMerelo joined
09:45
Prince213 joined,
andrzejku joined
|
|||
gfldex | lolibloggedalittle: gfldex.wordpress.com/2020/05/26/wa...-arrivals/ | 09:45 | |
Prince213 | Hello. Can I read formatted input in Raku? | ||
Also, how to use vararg functions from NativeCall? | 09:46 | ||
09:46
NODE left
09:47
stoned75 left
|
|||
Prince213 | (If it's possible to do that) | 09:47 | |
09:47
Prince213 left
09:48
Prince213 joined,
NODE joined
09:49
Prince213 left,
stoned75 joined,
Prince213 joined
09:50
Prince213 left,
Prince213 joined,
Prince213 left
09:53
NODE left
09:56
NODE joined
10:09
MasterDuke left
10:11
mowcat left
10:12
_jrjsmrtn left
|
|||
tbrowder | Prince123: hi, i'm not sure what you are asking for. do you mean accessing pod internally? if so, yes. | 10:16 | |
tellable6 | tbrowder, I'll pass your message to Prince213 | ||
10:17
Prince213 joined
10:18
__jrjsmrtn__ joined
|
|||
Prince213 | For the first one, I'm asking if we have a function (like scanf in C) to read formatted input? | 10:19 | |
tellable6 | 2020-05-26T10:16:02Z #raku <tbrowder> Prince123: hi, i'm not sure what you are asking for. do you mean accessing pod internally? if so, yes. | ||
Prince213 | For the second one, I'm asking if we have a way to use functions like scanf. | 10:20 | |
10:21
NODE left
10:22
NODE joined
|
|||
tbrowder | oh, good question, i'm not sure, but i don't think so. does Perl? | 10:22 | |
use case? you may have to roll your own. | 10:24 | ||
jnthn | Prince213: For varargs there's not a really good way, but you can write out the cases you need (e.g. write signatures with the args) | 10:25 | |
*with the args you want to pass | |||
Prince213 | I'm writing a binding for PDCurses, and some functions (printw for example) are vararg function | 10:26 | |
This is the prototype: `int printw(const char* fmt, ...);` | 10:27 | ||
10:27
Altai-man_ joined,
Prince213 left
|
|||
tbrowder | i vaguely remember using scanf in c progs long ago, but i can't remember why i needed them, sorry. lot's of c experts here, though. | 10:27 | |
10:29
sena_kun left
10:33
Prince213 joined
10:34
mowcat joined
|
|||
Prince213 | tbrowder: FYI, scanf is used to read something from stdin($*IN). Anyway thanks. | 10:35 | |
jnthn | Prince213: Typically in Raku one would either use coercions on what is read, or regex matching for more advanced things. | 10:38 | |
tbrowder | is yr code publicly avail? | ||
tadzik | Prince213: regexes are probably closest to what you need | 10:40 | |
(and probably won't cause buffer overflows that scanf() traditionally does :P) | |||
Prince213 | Hmm... I'm just making a binding. | 10:41 | |
Will publish my code when I prepared the ecosystem-related things(README etc.). | 10:42 | ||
10:47
Prince213 left
10:48
NODE left
10:50
mowcat left,
Guest2081 joined
10:57
JJMerelo left
11:07
Guest2081 is now known as NODE
11:12
wamba left
11:13
wamba joined
|
|||
Geth | ¦ problem-solving: Prince213 assigned to jnthn Issue Calling vararg functions from NativeCall github.com/Raku/problem-solving/issues/201 | 11:21 | |
cpan-raku | New module released to CPAN! Console::Blackjack (1.0.5) by 03GDONALD | 11:23 | |
11:25
NODE left
11:26
NODE joined
11:31
aborazmeh left
11:32
Kaiepi left
11:33
Kaiepi joined,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
11:35
JJMerelo joined
11:36
NODE left
11:37
NODE joined
11:39
andrzejku left
11:51
sarna joined,
aborazmeh left
12:02
dakkar left,
dakkar joined
12:04
wamba left
12:08
andrzejku joined
12:15
oneeggeach left
12:18
wamba joined
12:25
wamba left
12:27
sena_kun joined
12:29
Altai-man_ left
12:33
NODE left
12:36
tejr left
12:37
molaf joined,
tejr joined
12:44
melezhik joined
12:48
JJMerelo left
13:08
aborazmeh joined,
aborazmeh left,
aborazmeh joined
13:13
MasterDuke joined
|
|||
robertle | does anyone know how to get the current location within a grammar/action? to do error erporting? | 13:16 | |
jnthn | self.pos | 13:18 | |
vrurg | robertle: there is no way to get the line number.You'd have to do it on your own, unfortunately. | ||
jnthn | Or $/.from or $/.to in the action | ||
ShimmerFairy | A long while back I wrote a Grammar::Parsefail module (not sure if it's in the ecosystem, but should be under my same-named account on github). | ||
jnthn | And yeah, those are char offsets | ||
ShimmerFairy | Fair warning, last I used it myself, the positioning of the eject symbol in the error messages was frequently off (probably because I last touched the code when Cursor still existed). | 13:19 | |
And if experimental features are OK, I happened to spot that Grammar in the prospective v6.e has nicer error messages for parse failures. | 13:20 | ||
MasterDuke | robertle: lineposof maybe? | 13:27 | |
hm, maybe it's linefileof | 13:28 | ||
13:28
APic joined
13:35
squashable6 left
13:36
APic left,
Dock_Holliwood joined
|
|||
robertle | I tried $/.from and .to, but that didn't give me meaningful results. will try again, perhaps I was just stupid | 13:36 | |
ShimmerFairy | robertle: you can call .from and .to on specific parts of the match, like $<identifier>.from, if that helps. | 13:37 | |
13:37
brtastic left,
squashable6 joined
|
|||
robertle | I was a bit stupid, ok. so that way I get a character offset of the failure which I need to translate into a line number, that should be ok | 13:38 | |
great! | |||
13:40
cnnbs joined
13:41
cnnbs left
13:48
APic joined
14:07
sarna left
14:23
Doc_Holliwould joined,
aborazmeh left
14:25
wamba joined
14:26
Dock_Holliwood left
14:27
Altai-man_ joined
14:28
JJMerelo joined
14:29
sena_kun left
14:33
skids joined
14:48
patrickb left
14:54
molaf left
15:02
brtastic joined
15:07
ensamvarg3 left
|
|||
uzl[m] | Hello, #raku! When documenting some newly introduced routine, is there some guideline about where it's placed in the documentation alongside the type's other routines? Alphabetically? Right at the end of the type's Methods section? | 15:17 | |
expon | i personally just whack some comments above it with #| but i don't know if that's recommended | 15:19 | |
tadzik | that's the way to do it, yes | ||
see design.raku.org/S26.html | 15:20 | ||
[Coke] | uzl[m]: unless it's already divided into sections, alphabetica | ||
l | |||
tadzik | design.raku.org/S26.html#Declarator_blocks has some examples | 15:21 | |
[Coke] | if it's in sections, someone can help you figure out which section. Thanks! | ||
uzl[m] | tadzik: Thanks. Although I'm more concerned with the placement. | 15:23 | |
[Coke] | uzl[m]: ... oh, you mean in code, not in, say, submitting a PR to the doc site. :) | 15:24 | |
apologies, I misread. | |||
uzl[m] | [Coke]: Is it some historical blunder that some routines aren't in alphabetical order? For instance, in docs.raku.org/type/Date#Methods | ||
[Coke] | tadzik++ | ||
uzl[m]: There isn't any guidance on it, I don't think. (and having the "new" method first makes a lot of sense) | 15:25 | ||
uzl[m] | Oh, no. I do really mean submitting a PR to the doc repo. Sorry for the confusion. | ||
tadzik | uzl[m]: well, typically you document every routine right next to that routine | ||
uzl[m] | [Coke]: Ok. | ||
[Coke] | also, many of these pages are dynamically generated from other segments, so re-ordering can be hard. | ||
tadzik | ooh, the doc repo | ||
[Coke] | tadzik--, then! | ||
tadzik | sorry, I misunderstood | ||
uzl[m] | No problem, tadzik! | 15:26 | |
Thanks, Coke and tadzik! | |||
[Coke] | uzl[m]: better it gets documented, we can worry about ordering things as a universal concern separately. | ||
uzl[m] | Haha! | ||
That makes sense! | |||
[Coke] | uzl[m]: but that page looks like a good example to start with. | ||
[Coke] wonders why Dateish has an .IO method. :P | 15:28 | ||
timotimo | why wouldn't you have a folder with files or folders that are named exactly like dates? | 15:30 | |
also, i imagine that also uses the formatter method? | 15:31 | ||
m: Date.now.IO.raku.say | |||
camelia | No such method 'now' for invocant of type 'Date'. Did you mean any of these? new not in block <unit> at <tmp> line 1 |
||
timotimo | m: DateTime.now.IO.raku.say | ||
camelia | IO::Path.new("2020-05-26T17:31:20.283554+02:00", :SPEC(IO::Spec::Unix), :CWD("/home/camelia")) | ||
dakkar | m: now.IO.raku.say | ||
camelia | IO::Path.new("Instant:1590507127.572433", :SPEC(IO::Spec::Unix), :CWD("/home/camelia")) | ||
dakkar | `now` is a term, not a metho | ||
timotimo | m: DateTime.now(:formatter(*.raku)}.IO.raku.say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1) at <tmp>:1 ------> 3DateTime.now(:formatter(*.raku)7⏏...raku.say » | ||
timotimo | m: DateTime.now(:formatter(*.raku)).IO.raku.say | ||
camelia | IO::Path.new("DateTime.new(2020,5,26,17,31,45.37471604347229,:timezone(7200))", :SPEC(IO::Spec::Unix), :CWD("/home/camelia")) | ||
timotimo | a fine filename choice | ||
m: say (1+4i).IO.raku | 15:32 | ||
camelia | IO::Path.new("1+4i", :SPEC(IO::Spec::Unix), :CWD("/home/camelia")) | ||
timotimo | [Coke]: how do you feel about this one? :) :) | ||
Altai-man_ | m: (1+4i).^mro.say; | ||
camelia | ((Complex) (Cool) (Any) (Mu)) | ||
15:32
_jrjsmrtn joined
|
|||
Altai-man_ | m: Cool.IO.say; | 15:32 | |
camelia | (Path) | ||
dakkar | I once started building a document-management system that used templated filenames. Meaning that I had files called `[% title %]-[% date %].txt` | 15:33 | |
Altai-man_ | timotimo, that's probably ^ | ||
timotimo | yeah | ||
m: say { :1a, :2b, :3c }.IO.raku | |||
camelia | IO::Path.new("a\t1\nb\t2\nc\t3", :SPEC(IO::Spec::Unix), :CWD("/home/camelia")) | ||
timotimo | now here's one that doesn't make very much sense | ||
tabs in filenames *shudder* | 15:34 | ||
dakkar | sometimes I think that too many classes are Cool… | ||
15:34
__jrjsmrtn__ left,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
ShimmerFairy | I personally like to start my filenames with a little RIGHT-TO-LEFT OVERRIDE | 15:37 | |
15:39
molaf joined
15:41
Doc_Holliwould left
|
|||
melezhik | Raku modules authors! rakudist.raku.org/ allows to test Raku module distribution against multiple Raku versions (2015.12 ... 2020.05.01) in one click | 15:41 | |
I'd appreciate feedback, as the service is in beta testing stage | |||
so far debian/ubuntu OS are available to test against, but I could add more OS if required | 15:42 | ||
15:47
Doc_Holliwould joined
|
|||
[Coke] | huh. Why am I installing a script with such a short name and with a .p6 suffix? I should clean that up | 15:47 | |
melezhik | one can select multiple version of Rakudo and run in one bunch ... it could be useful for authors who cares about their modules running on older versions of Rakudo | ||
15:50
abraxxa left
|
|||
[Coke] | melezhik: thought I ran one for multiple versions, but it seems to have only run a single version | 15:50 | |
melezhik | @Coke it's multiselect html form | 15:51 | |
[Coke] | melezhik: guess it was user error. | ||
melezhik | @Coke, what do you mean? | ||
[Coke] | I think the issue is that the form doesn't remember the multiselect when you submit, so I did it, submitted, had a mistake, lost the multiselect, then re-submitted. | ||
15:51
abraxxa joined
|
|||
[Coke] | (which is not what I meant by user error, I think I figured out how I lost the multi-select) | 15:51 | |
melezhik | yeah, you're right, it does not memorized previous input for versions | 15:52 | |
yeah, anyway, now you know you still can run multiple versions, correct? ))) | |||
[Coke] | otherwise, seems fine, my dumb module working on last few versions. | ||
melezhik | yeah, I see the queue has got some your requests - rakudist.raku.org/sparky/queue | 15:53 | |
feel free to post an issues and suggestion to RakuDist GitHub ))) | |||
15:53
mowcat joined
|
|||
melezhik | there is also API, so one can trigger builds from GitHub/Gitlab/Whatever CI | 15:55 | |
need to go | |||
[Coke] | melezhik++ | ||
15:56
abraxxa left
16:11
abraxxa joined
|
|||
jdv79 | m: class A { has $.a ="abc" }; class B is A { has $.a = 123 }; B.new.raku.say; | 16:23 | |
camelia | B.new(a => 123, a => "abc") | ||
jdv79 | why are both there? | ||
16:23
abraxxa left
16:24
abraxxa joined
16:28
sena_kun joined
|
|||
jnthn | Because there are two separate attributes. Alas, this is not going to roundtrip. | 16:29 | |
16:29
Altai-man_ left
|
|||
dakkar | what's the correct way to change an attribute default in a subclass? | 16:30 | |
(or an attribute's type, to a narrower one) | 16:31 | ||
JJMerelo | dakkar you can either change it in BUILD, or in TWEAK, or in the declaration of an attribute | 16:32 | |
dakkar | but see above, jdv79's example | 16:33 | |
ShimmerFairy | For an attribute's default value, BUILD or TWEAK like JJMerelo (but only if it's publicly rewritable). | ||
[Coke] | m: class A { has $.a ="abc" }; class B is A { has $.a = 123 }; B.new.a.say | ||
camelia | 123 | ||
[Coke] | ^^ it's still defaulting to the right value. | ||
dakkar | sure, until something in A uses $!a | ||
ShimmerFairy | For narrowing a type, you should maybe consider doing a parameterized role instead of ising a parent class. | 16:34 | |
That's why class code should generally use $.a unless it REALLY needs to use its own attribute :) | |||
dakkar | ok, so the answer is "the Rakku MOP does not implement this" | ||
(too many 'k'…) | 16:35 | ||
ShimmerFairy | again, if class A's attribute is public and "is rw" then you can set it in B's BUILD() or TWEAK(). | 16:36 | |
dakkar | sure, but that's not what I asked | ||
it is a work-around that may be used in some cases | |||
ShimmerFairy | I mean, through BUILD/TWEAK you are effectively changing the default when it comes to that subclass. | 16:38 | |
dakkar | but only for rw attributes | ||
and the new default is not introspectible via the MOP | |||
oh joy, the default value of an attribute is not in the MOP at all, is it? | 16:40 | ||
ShimmerFairy | I did a quick check, and it looks like in Raku, default values only exist within the bowels of QAST. | 16:41 | |
So maaaaaybe it'll be accessible when RakuAST is a thing? | |||
dakkar | that's the wrong place for it | ||
the Attribute class has a $!build_closure attribute, which I think is the thing that gets called to provide the default value | 16:42 | ||
jnthn | Yes, that's called to produce the default, and passed self and the attribute to initalize | 16:43 | |
(Which is how `has Type $.foo .= new` works) | |||
dakkar | it's very private | ||
jnthn | It's exposed as just .build iirc | ||
dakkar | oh, so it is | 16:44 | |
jnthn | _closure is a bit of an internal detail | ||
dakkar | I couldn't see it in Attribute.^methods | ||
ShimmerFairy | I find .^methods.map(*.name) is the most reliable way of seeing every method's name | ||
dakkar | I agree, that's what I do | 16:45 | |
m: Attribute.^methods.map: *.name | |||
camelia | ( no output ) | ||
dakkar | m: say for Attribute.^methods.map: *.name | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of bare "say"; in Raku please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun at <tmp>:1 -… |
||
dakkar | m: .say for Attribute.^methods.map: *.name | ||
camelia | <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> compose apply_handles get_value… |
||
dakkar | m: .say for Attribute.^methods.map(*.name).grep(/build/) | 16:46 | |
camelia | ( no output ) | ||
dakkar | (I know that lots of the bootstrapped bits need lots of love and care…) | ||
anyway… I don't actually need that functionality, I was curious to see what the MOP does and what it doesn't | 16:47 | ||
16:52
dakkar left
16:55
caasih left,
timeless left
17:01
caasih joined
17:03
wildtrees joined,
wildtrees left
17:04
wildtrees joined
17:06
caasih left
17:09
caasih joined
|
|||
jdv79 | i was surprised by it | 17:14 | |
but ok | |||
thanks | |||
17:17
andrzejku left
17:20
sour joined,
antoniogamiz joined,
soursBot joined
17:21
sour left
17:25
timeless joined
17:26
antoniogamiz left
17:29
chloekek joined
17:30
aborazmeh left
|
|||
[Coke] | m: Attribute.^method[0] | 17:31 | |
camelia | No such method 'method' for invocant of type 'Perl6::Metamodel::ClassHOW'. Did you mean 'methods'? in block <unit> at <tmp> line 1 |
||
[Coke] | m: Attribute.^methods[0] | ||
camelia | ( no output ) | ||
[Coke] | m: Attribute.^method[0].gist | ||
camelia | No such method 'method' for invocant of type 'Perl6::Metamodel::ClassHOW'. Did you mean 'methods'? in block <unit> at <tmp> line 1 |
||
[Coke] | m: Attribute.^methods[0].gist | ||
camelia | ( no output ) | ||
[Coke] | m: Attribute.^methods[0].gist.say | ||
camelia | The 'ForeignCode' class is a Rakudo-specific implementation detail and has no serviceable parts inside |
||
17:33
kensanata left
17:34
antoniogamiz joined
|
|||
[Coke] | nʞɐᴚ | 17:34 | |
17:45
Chi1thangoo joined
|
|||
antoniogamiz | how can I overload a function to detect that no arguments have been used to call the function? | 17:56 | |
JJMerelo | uzl[m] good one | 17:58 | |
antoniogamiz use slurpy, for instance *@args | |||
[Coke] | make it a multi and have one variant that takes no args? | 18:00 | |
18:01
Chi1thangoo left
|
|||
antoniogamiz | none of the solutions work | 18:01 | |
the function is already a multi, inside a package definition | |||
jnthn | m: multi f() { say "no args" }; multi f($a) { say "one arg" }; multi f(*@a) { say "many args" }; f(); f(1); f(1, 2, 3); | 18:03 | |
camelia | no args one arg many args |
||
antoniogamiz | mm | 18:04 | |
then there must be something else not working | 18:05 | ||
jdv79 | m: my %h; %h{$_}="" for reverse 1..5; %h.raku.say | 18:06 | |
camelia | {"1" => "", "2" => "", "3" => "", "4" => "", "5" => ""} | ||
jdv79 | are hash keys ordered? | ||
dd, .raku, .gist - all show them ordered from what i can tell | 18:07 | ||
at least .keys isn't | 18:08 | ||
Grinnz | cry.nu/perl6/secure-hashing-for-moarvm/ | ||
jdv79 | wonder why the typical "look at it" methods imply ordering | ||
antoniogamiz | I have recreated my problem here => gist.github.com/antoniogamiz/e6e6d...145dcbdd9f | 18:09 | |
MasterDuke | jdv79: TimToady made that decision a while ago | ||
jdv79 | i imagine for dev ergonomics. odd that would be the case and there still isn't a core "pretty print" dumping method | 18:11 | |
MasterDuke | dd is pretty core, even if not officially so | ||
18:11
sauvin left
|
|||
jdv79 | looks like no newlines or indentation to me | 18:12 | |
anyway, ok. thanks. | |||
18:17
molaf left,
soursBot left
18:18
soursBot joined
18:27
Altai-man_ joined
18:29
sena_kun left
18:32
JJMerelo left
|
|||
Geth | doc: uzluisf++ created pull request #3434: Document few additions introduced with 2020.05 |
18:35 | |
18:38
guifa2 joined
18:40
antoniogamiz left
18:47
guifa2 left
18:50
sjm_uk left,
guifa2 joined
18:51
Xliff joined
|
|||
Xliff | \o | 18:52 | |
If I do "role B {}; class C {}; my $c = C.new; $c = $c but B"; is there a way I can get a piece of code to automatically fire on that last line? | 18:53 | ||
18:53
soursBot_ joined
|
|||
Xliff | So I guess the question is: Is there a way to automatically run code when punning a role on an object? | 18:54 | |
moritz | "but B" is mixin more than punning a role | ||
Xliff | Good point. | ||
18:55
soursBot left
|
|||
MasterDuke | Xliff: i think there's a COMPOSE phaser or something like that | 18:55 | |
ISTR SmokeMachine having a similar question at one point | |||
Xliff | MasterDuke: Hmmm...that might work! | ||
moritz | so, one way is to cheat and define your own infix:<but> | ||
Xliff | moritz: Heh! | 18:56 | |
moritz | the other is: infix:<but> calls obj.clone.^mixin($role).BUILD_LEAST_DERIVED({}); | ||
MasterDuke | maybe it's just code in the mainline of the role? | ||
Xliff | m: role B { }; class C { COMPOSE { say "HI!" } }; my $c = C.new; $c = $c but B; | ||
camelia | ( no output ) | ||
MasterDuke | (that gets executed at each mixin) | ||
Xliff | m: role B { }; class C { COMPOSE { say "HI!" } }; my $c = C.new; $c = $c but B; | ||
camelia | ( no output ) | ||
moritz | so you could hook into the MOP and override ^.mixin | ||
Xliff | Eesh. | 18:57 | |
MasterDuke | m: role B { say "HI!" }; class C { }; my $c = C.new; $c = $c but B; | ||
camelia | HI! | ||
Xliff | Was hoping there would be something like TWEAK but only for role mixin. | ||
MasterDuke: Yeah, but the role needs access to self. | 18:58 | ||
m: role B { self.hi }; class C { method hi { say "HI!" }; }; my $c = C.new; $c = $c but B; | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> 'self' used where no object is available at <tmp>:1 ------> 3role B {7⏏5 self.hi }; class C { method hi { say "H expecting any of: term |
||
19:00
cpan-raku left,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
|
|||
MasterDuke | m: role B { ::?CLASS.hi }; class C { method hi { say "hi" } }; my $c = C.new; $c = $c but B; | 19:02 | |
camelia | hi | ||
Xliff | m: role B { ::?CLASS.hi }; class C { method hi { say "hi" } }; my $c = C.new; | 19:03 | |
camelia | ( no output ) | ||
Xliff | Ooh! That might work. | ||
19:06
eseyman left
19:08
zacts joined
19:09
zacts left
19:10
soursBot_ left,
soursBot joined
|
|||
Xliff | MasterDuke++ # Thanks! | 19:10 | |
MasterDuke | np | 19:11 | |
19:13
eseyman joined
19:18
domidumont left
19:20
soursBot left
19:23
Xliff left,
soursBot joined
19:27
lucasb joined
19:32
rindolf left
20:21
chloekek left
20:28
sena_kun joined
20:29
Altai-man_ left
20:30
hyperak joined,
hyperak left
20:32
hyperak joined,
hyperak left
20:33
hyperak joined
20:35
cognomin_ left
20:42
hyperak left,
hyperak joined,
hyperak left
20:43
hyperak joined
20:45
nebuchadnezzar left
20:50
soursBot left,
Sgeo joined
|
|||
lucs | Any idea approximately how many tests in roast? | 20:54 | |
20:57
brtastic left
20:58
Black_Ribbon joined
21:01
hyperak left
|
|||
sena_kun | lucs, Files=1306, Tests=111304 | 21:13 | |
So about 111_000 tests, I guess. | |||
21:17
vike1 left
|
|||
lucs | Heh. I just told someone it had over 100,000 tests (pulled the number from you know where). | 21:17 | |
21:17
guifa2 left
|
|||
lucs | I thought I was exagerating a bit. | 21:17 | |
sena_kun | You was close, though. :) | ||
It's not really that far, I'd say. | |||
jnthn | sena_kun: Is that spectest or stresstest? | 21:18 | |
sena_kun | jnthn, spectest, I think? I took the numbers from lizmat posts to raku-dev. Stresstest has more, I think? | 21:19 | |
lucs | sena_kun: Yeah, I was lucky :) I'm glad I didn't happen to inflate the number. | ||
jnthn | Yes, so that's an underestimate :) | ||
21:21
KindTwo joined
21:23
KindOne left
21:24
vike1 joined
21:25
KindTwo is now known as KindOne
21:44
aborazmeh joined,
aborazmeh left,
aborazmeh joined
21:48
leah2 left
21:56
nebuchadnezzar joined
21:59
wamba left
|
|||
jdv79 | what would !* mean? | 22:02 | |
m: (1,2,3).grep(!*).say | 22:03 | ||
camelia | () | ||
jdv79 | m: (1,2,3).grep(*).say | ||
camelia | (1 2 3) | ||
jdv79 | is that what it looks like? | ||
oh, nm. | 22:04 | ||
22:04
leah2 joined
|
|||
timotimo | m: (0, 1, 2, 3).grep(*).say; (0, 1, 2, 3).grep(!*).say; (0, 1, 2, 3).grep(?*).say | 22:06 | |
camelia | (0 1 2 3) (0) (1 2 3) |
||
22:17
hyperak joined
22:27
Altai-man_ joined
22:30
sena_kun left
22:31
hyperak left
22:41
maggotbrain joined
22:48
wildtrees_ joined
22:51
wildtrees left
22:54
wildtrees__ joined
22:58
wildtrees joined,
wildtrees_ left,
wildtrees_ joined
23:00
wildtrees__ left
23:01
stoned75 left,
Doc_Holliwould left
23:03
wildtrees left,
stoned75 joined
23:04
Altai-man_ left
23:19
pecastro left
23:27
wildtrees joined
23:30
wildtrees_ left
23:34
wildtrees_ joined
23:37
wildtrees left
23:38
wildtrees__ joined
23:42
wildtrees_ left
23:59
wildtrees__ left
|