»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:03 enheh joined, p6bannerbot sets mode: +v enheh 00:26 protium left 00:27 protium joined, p6bannerbot sets mode: +v protium 00:46 sotona joined 00:47 p6bannerbot sets mode: +v sotona 00:50 squashable6 joined, cognominal-p6 joined, p6bannerbot sets mode: +v squashable6 00:51 p6bannerbot sets mode: +v cognominal-p6 01:00 lizmat joined 01:01 p6bannerbot sets mode: +v lizmat 01:03 Ven` joined 01:04 p6bannerbot sets mode: +v Ven`, sftp left 01:06 aindilis left 01:07 aindilis joined, p6bannerbot sets mode: +v aindilis 01:08 Ven` left 01:10 lizmat left 01:14 enheh left, cognominal-p6 left 01:16 sotona left
jdv79 wow, my bench for perf got worse 01:37
timotimo that's the one with the matchers? even worse? :( :(
jdv79 the one with the a lot of regex "eval" 01:38
timotimo ok, i'm thinking of the right one
do you have a rough number for how much worse, and since what previous measurement?
hm, i think we actually had a gist that had the complete code in it for benchmarking 01:39
jdv79 hmm. interesting. i had a rakudo from a few days ago and it was running about 4.5s. then i just installed head and it was 6.5s for a few runs a little bit ago. but i just tried it now and its back down to 4.5s 01:40
idk. yay not worse...
nevermind then 01:41
timotimo phew!
Garland_g[m] Maybe it had to recompile the code with the new version?
timotimo still, thanks for checking in regularly
01:41 lunaaa joined
jdv79 where's the precomp files these days? 01:42
timotimo Garland_g[m]: "for a few runs" suggests that's not it; perhaps the computer was thermal-throttled, or there was more I/O than usual, or too much pressure on RAM or anything really
Garland_g[m] Ah. I missed the "for a few runs"
jdv79 yeah. i didn't check into system state at the time.
timotimo i've been trying to improve performance for things ever since i joined the perl6 project and let me tell you, measurements can frustrate the heck out of you :) 01:44
jdv79 what's holding back eval? everything? 01:45
01:46 lunaaa left 01:52 molaf_ left
timotimo it's hard for me to say 01:53
i know that spesh has a whole lot of work to do because with so many evals, large parts of the compiler that are normally only called three or four times are now hot enough to be considered for speshing
and if the code that gets generated also gets hot enough while running the matchers against the data, those will also get specialization 01:54
now i lost my train of thought
02:02 saki joined, saki left 02:05 molaf_ joined 02:06 p6bannerbot sets mode: +v molaf_, spycrab0 left 02:10 saki joined, saki left 02:22 john_parr_ joined 02:23 caa51h joined, p6bannerbot sets mode: +v john_parr_ 02:24 p6bannerbot sets mode: +v caa51h, ufobat___ joined 02:25 cxreg2 joined, p6bannerbot sets mode: +v ufobat___ 02:26 p6bannerbot sets mode: +v cxreg2 02:27 hobbified joined 02:28 charsbar_ joined, ufobat_ left, p6bannerbot sets mode: +v hobbified 02:29 p6bannerbot sets mode: +v charsbar_, saki joined, mirlur[m] left, Garland_g[m] left, MitarashiDango[m left, wictory[m] left, cxreg left, AlexDaniel-old[m left, AlexDaniel` left, charsbar left, timotimo left, reu left, mempko left, john_parr left, spacedbat left, hobbs left, charsbar_ is now known as charsbar, john_parr_ is now known as john_parr 02:30 p6bannerbot sets mode: +v saki 02:33 atweiden-air left 02:34 sotona joined 02:35 p6bannerbot sets mode: +v sotona, wictory[m] joined, p6bannerbot sets mode: +v wictory[m] 02:36 AlexDaniel-old[m joined, spacedbat joined, p6bannerbot sets mode: +v AlexDaniel-old[m, reu joined, p6bannerbot sets mode: +v reu, p6bannerbot sets mode: +v spacedbat, mirlur[m] joined 02:37 p6bannerbot sets mode: +v mirlur[m], timotimo joined, p6bannerbot sets mode: +v timotimo, mempko joined, Garland_g[m] joined, p6bannerbot sets mode: +v Garland_g[m], MitarashiDango[m joined, p6bannerbot sets mode: +v MitarashiDango[m, p6bannerbot sets mode: +v mempko 02:38 AlexDaniel` joined, p6bannerbot sets mode: +v AlexDaniel` 02:39 kent\n joined, p6bannerbot sets mode: +v kent\n 02:40 aindilis left 02:41 aindilis joined 02:42 p6bannerbot sets mode: +v aindilis
buggable New CPAN upload: AttrX-Mooish-v0.3.0.tar.gz by VRURG modules.perl6.org/dist/AttrX::Mooish:cpan:VRURG 02:42
03:03 Ven` joined 03:04 p6bannerbot sets mode: +v Ven` 03:05 inbioz joined 03:06 p6bannerbot sets mode: +v inbioz 03:08 sotona left, Ven` left 03:40 itaipu left 04:01 Moyst26 joined, Moyst26 left 04:03 Ven` joined, p6bannerbot sets mode: +v Ven` 04:07 Ven` left 04:10 cognominal-p6 joined 04:11 p6bannerbot sets mode: +v cognominal-p6 04:14 dmaestro left 04:16 cpup joined, p6bannerbot sets mode: +v cpup 04:20 cognominal-p6 left, cognominal-p6 joined 04:21 p6bannerbot sets mode: +v cognominal-p6 04:25 sotona joined 04:26 p6bannerbot sets mode: +v sotona 04:34 cognominal-p6 left 04:35 inbioz left 04:41 kerframil left 04:53 curan joined, p6bannerbot sets mode: +v curan 04:57 troys left 04:58 sotona left 05:01 cpup left 05:04 [particle]1 joined 05:05 p6bannerbot sets mode: +v [particle]1, [particle] left 05:07 infernix14 joined, infernix14 left 05:12 vrurg left 05:20 sauvin joined, p6bannerbot sets mode: +v sauvin 05:21 hihi joined, p6bannerbot sets mode: +v hihi 05:25 hihi left 05:27 DarthGandalf left, DarthGandalf joined, p6bannerbot sets mode: +v DarthGandalf 05:30 cpup joined
rindolf hi all 05:31
05:31 p6bannerbot sets mode: +v cpup
masak \o 05:45
05:46 [particle] joined 05:47 p6bannerbot sets mode: +v [particle] 05:48 [particle]1 left 05:51 [particle]1 joined, [particle] left, p6bannerbot sets mode: +v [particle]1
lookatme_q o/ rindolf 05:53
rindolf masak: sup? 05:55
lookatme_q: hi
06:02 [particle]1 left 06:05 inbioz joined, saki left, p6bannerbot sets mode: +v inbioz 06:06 saki joined 06:07 p6bannerbot sets mode: +v saki
lookatme_q :) 06:09
06:14 Summertime left 06:16 Summertime joined, p6bannerbot sets mode: +v Summertime
xinming_ m: sub t (*, $var) { $var.say; }; t('a', "Hello"); 06:17
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3sub t (*7⏏5, $var) { $var.say; }; t('a', "Hello")
xinming_ m: sub t ($, $var) { $var.say; }; t('a', "Hello"); 06:18
camelia Hello
xinming_ m: sub t ($, $var) { $var.say; }; t(*, "Hello");
camelia Hello
xinming_ for the sub part, is the use of $ right here?
I mean use it as a placeholder
m: sub t ($, $var) { $var.say; }; t(*, *, "Hello");
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling t(Whatever, Whatever, Str) will never work with declared signature ($, $var)
at <tmp>:1
------> 3sub t ($, $var) { $var.say; }; 7⏏5t(*, *, "Hello");
xinming_ m: sub t ($, $, $var) { $var.say; }; t(*, *, "Hello"); 06:19
camelia Hello
06:20 ufobat___ left 06:21 [particle] joined 06:22 p6bannerbot sets mode: +v [particle] 06:32 [particle]1 joined 06:33 p6bannerbot sets mode: +v [particle]1 06:34 [particle] left 06:36 TreyHarris left 06:39 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 06:50 imcsk8 left 06:52 jcarty joined 06:53 p6bannerbot sets mode: +v jcarty 06:55 MasterDuke left 06:58 imcsk8 joined, p6bannerbot sets mode: +v imcsk8 07:06 TreyHarris left 07:07 fake_space_whale left, ufobat joined 07:08 p6bannerbot sets mode: +v ufobat 07:11 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
xinming_ m: sub t(:good) { "Good".say; }; t(:good); 07:17
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3sub t(:7⏏5good) { "Good".say; }; t(:good);
07:18
xinming_ m: multi sub t(:good) { "Good".say; }; t(:good);
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3multi sub t(:7⏏5good) { "Good".say; }; t(:good);
Geth doc: aaa34a8788 | (JJ Merelo)++ | 2 files
Clarifies time for constants, closes #2279
xinming_ m: sub t(:$good) { "Good".say; }; t(:good);
camelia Good
xinming_ m: multi sub t(:$good) { "Good".say; }; t(:good);
camelia Good
xinming_ m: multi sub t(:$good) { "Good".say; }; multi sub t(:!$good) { "Not good".say }; t(:good); 07:19
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3t(:$good) { "Good".say; }; multi sub t(:7⏏5!$good) { "Not good".say }; t(:good);
xinming_ m: multi sub t(:$good) { "Good".say; }; multi sub t(:!good) { "Not good".say }; t(:!good);
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3t(:$good) { "Good".say; }; multi sub t(:7⏏5!good) { "Not good".say }; t(:!good);
xinming_ m: multi sub t(:$good) { "Good".say; }; multi sub t(:!$good) { "Not good".say }; t(:!good);
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3t(:$good) { "Good".say; }; multi sub t(:7⏏5!$good) { "Not good".say }; t(:!good);
xinming_ m: multi sub t(:$good) { "Good".say; }; multi sub t(!:$good) { "Not good".say }; t(:!good);
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3 t(:$good) { "Good".say; }; multi sub t(7⏏5!:$good) { "Not good".say }; t(:!good)
xinming_ hmm, any idea how I can make this work? :-)
m: multi sub t(:$good) { "Good".say; }; multi sub t(:$good where { False }) { "Not good".say }; t(:!good); 07:20
camelia Good
xinming_ m: multi sub t(:$good) { "Good".say; }; multi sub t(:$good where { $_ ~~ False }) { "Not good".say }; t(:!good);
camelia Potential difficulties:
Smartmatch against False always fails; if you mean to test the topic for truthiness, use :!so or *.not or !* instead
at <tmp>:1
------> 3ay; }; multi sub t(:$good where { $_ ~~ 7⏏5False }) { "Not good".sa…
xinming_ m: multi sub t(:$good) { "Good".say; }; multi sub t(:$good where { not so $_ }) { "Not good".say }; t(:!good);
camelia Good
xinming_ m: multi sub t(:$good where { so $_ }) { "Good".say; }; multi sub t(:$good where { not so $_ }) { "Not good".say }; t(:!good); 07:21
camelia Not good
xinming_ m: multi sub t(:$good) { "Good".say; }; multi sub t(:$good where { not so $_ }) { "Not good".say }; t(:good);
camelia Good
xinming_ For my example, Is there a easier way to write signatures?
07:30 cognominal-p6 joined, p6bannerbot sets mode: +v cognominal-p6 07:36 cognominal-p6 left, cognominal-p6 joined 07:37 p6bannerbot sets mode: +v cognominal-p6
lookatme_q m: multi sub t(:$good!) { "Good".say; }; multi sub t(:$good) { "Not good".say }; t(:good); 07:40
camelia Good
lookatme_q m: multi sub t(:$good!) { "Good".say; }; multi sub t(:$good) { "Not good".say }; t();
camelia Not good
lookatme_q xinming_, how about this way ? ^^
m: multi sub t(:$good!) { "Good".say; }; multi sub t() { "Not good".say }; t(); 07:41
camelia Not good
lookatme_q m: multi sub t(:$good!) { "Good".say; }; multi sub t() { "Not good".say }; t(good => False);
camelia Good
lookatme_q hmm, seems like not what you want
m: multi sub t(:$good where :so) { "Good".say; }; multi sub t($good where :!so) { "Not good".say }; t(good => False); 07:44
camelia Cannot resolve caller t(:!good); none of these signatures match:
(:$good where { ... })
($good where { ... })
in block <unit> at <tmp> line 1
lookatme_q m: multi sub t(:$good where :so) { "Good".say; }; multi sub t(:$good where :!so) { "Not good".say }; t(good => False);
camelia Not good
lookatme_q xinming_, Find it, I am using this way ^^
m: multi sub t(:$good where :so) { "Good".say; }; multi sub t(:$good where :!so) { "Not good".say }; t(:good);
camelia Good
lookatme_q m: multi sub t(:$good where :so) { "Good".say; }; multi sub t(:$good where :!so) { "Not good".say }; t();
camelia Not good
xinming_ what is the whole idea behind the where :so? 07:46
!$good where { so => $_ }?
$good where { so => $_ }? 07:47
lookatme_q xinming_, I forget it now :)
xinming_ I mean, Why :so worked like this. :-)
07:47 scimon joined
lookatme_q xinming_, wait me try to find it in documents 07:48
xinming_ Ok, THanks. :-)
07:48 p6bannerbot sets mode: +v scimon
lookatme_q m: multi sub t(:$good where .so) { "Good".say; }; multi sub t(:$good where !.so) { "Not good".say }; t(); 07:49
camelia Not good
07:49 domidumont joined
lookatme_q And xinming_, this way it's easy to understand 07:50
07:50 p6bannerbot sets mode: +v domidumont
xinming_ lookatme_q: I can undersstand this 07:51
something like where .so = *.so
But why :so worked?
CIAvash[m] xinming_: docs.perl6.org/routine/ACCEPTS#(Pa...od_ACCEPTS 07:52
xinming_ Thanks
lookatme_q m: multi sub t(:$good where so) { "Good".say; }; multi sub t(:$good where !so) { "Not good".say }; t(); 07:53
camelia 5===SORRY!5=== Error while compiling <tmp>
Prefix so requires an argument, but no valid term found
at <tmp>:1
------> 3multi sub t(:$good where so7⏏5) { "Good".say; }; multi sub t(:$good wh
expecting any of:
prefix
lookatme_q m: multi sub t(:$good where so) { "Good".say; }; t();
camelia 5===SORRY!5=== Error while compiling <tmp>
Prefix so requires an argument, but no valid term found
at <tmp>:1
------> 3multi sub t(:$good where so7⏏5) { "Good".say; }; t();
expecting any of:
prefix
lookatme_q xinming_, I using it in my module, I am not remember where I found it :) 07:54
xinming_ m: multi sub t(:$good where .so) { "Good".say; }; multi sub t(:$good where !.so) { "Not good".say }; t();
camelia Not good
xinming_ m: multi sub t(:$good where .so) { "Good".say; }; multi sub t(:$good where !.so) { "Not good".say }; t(:good);
camelia Good
xinming_ m: multi sub t(:$good where .so) { "Good".say; }; multi sub t(:$good where !.so) { "Not good".say }; t(:!good);
camelia Not good
07:54 cognominal-p6 left
lookatme_q this way is easy to understand and writing 07:54
07:55 molaf_ left
xinming_ .so is easier to understand, But :so is also understandable 07:55
after read the doc
I think perl6 will spend my lifetime to learn it.
08:01 zakharyas joined 08:02 p6bannerbot sets mode: +v zakharyas 08:07 araujo joined, araujo left, araujo joined, p6bannerbot sets mode: +v araujo 08:08 p6bannerbot sets mode: +v araujo 08:10 saki left
lookatme_q xinming_, haha yeah, Perl 6 is so many things like Perl does 08:10
08:11 saki joined 08:12 domidumont left, p6bannerbot sets mode: +v saki 08:18 molaf_ joined, p6bannerbot sets mode: +v molaf_ 08:23 saki left 08:34 Guest34655 joined, Guest34655 left 08:36 molaf_ left, molaf joined 08:37 p6bannerbot sets mode: +v molaf 08:44 lizmat joined 08:45 p6bannerbot sets mode: +v lizmat 08:47 molaf left 09:01 lizmat left 09:08 lizmat joined 09:09 p6bannerbot sets mode: +v lizmat 09:17 DarthGandalf left 09:20 DarthGandalf joined, p6bannerbot sets mode: +v DarthGandalf
lizmat .tell AlexDaniel fixed the QuantHash tests in 6.c-errata 09:21
yoleaux lizmat: I'll pass your message to AlexDaniel.
AlexDaniel . 09:22
yoleaux 09:21Z <lizmat> AlexDaniel: fixed the QuantHash tests in 6.c-errata
AlexDaniel just in time, woke up 10 mins ago :)
lizmat :-)
09:23 angelds joined 09:24 p6bannerbot sets mode: +v angelds 09:26 angelds left 09:27 angelds joined 09:28 p6bannerbot sets mode: +v angelds 09:36 lizmat_ joined 09:37 p6bannerbot sets mode: +v lizmat_ 09:39 lizmat left 09:47 stmuk joined 09:48 p6bannerbot sets mode: +v stmuk 09:50 stmuk_ left 09:53 r0bby4 joined 09:54 Ven` joined 09:55 p6bannerbot sets mode: +v Ven` 09:56 r0bby4 left 10:01 sarna joined 10:03 sarna left, sarna joined 10:04 p6bannerbot sets mode: +v sarna
sarna hey, bannerbot broke 10:04
it didn't tell me not to send messages :^( 10:05
nine timotimo: not...yet, no. I've never written a Python extension module. Also I feel like I'm already neglecting Inline::Python 10:08
10:10 spycrab0 joined, p6bannerbot sets mode: +v spycrab0, domidumont joined 10:11 p6bannerbot sets mode: +v domidumont 10:17 lizmat_ is now known as lizmat
xinming_ for samewith, Do we need to also pass the self as the first arg to it? 10:26
lizmat no. The whole point is that it will call the same method with the same invocant, but with different parameters 10:31
xinming_ Thanks, got it 10:36
so, we need self when we call with nextcallee 10:37
10:37 sarna left 10:50 cognominal-p6 joined, cognominal-p6 left, cognominal-p6 joined, p6bannerbot sets mode: +v cognominal-p6 10:51 p6bannerbot sets mode: +v cognominal-p6, sotona joined 10:52 p6bannerbot sets mode: +v sotona 10:56 sotona left
lizmat xinming_: don't think so, according to docs.perl6.org/routine/nextcallee 10:58
jnthn I suspect you would have to pass it explicitly to nextcallee, since that gives you the code object of the next thing that would be called
lizmat hmmm... or maybe so
jnthn well, not to nextcallee, but to the thing that nextcallee returns to you 10:59
lizmat perhaps a doc issue would be in order here
xinming_ yea, I do mean, with the sub returned by nextcallee, We need to pass self to it. 11:00
thanks
I'm still testing something
trying something
11:07 undersightable6 joined, p6bannerbot sets mode: +v undersightable6
xinming_ termbin.com/7ukx 11:08
m: termbin.com/7ukx 11:09
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3http:7⏏5//termbin.com/7ukx
expecting any of:
colon pair
xinming_ I think bot should be able to eval the content via url. :>
BTW, focus to the question, Is this a bug?
it should match the "third", But actually, it match the first one.
I think, the third arg :!good hides the $good anyway. 11:10
lizmat xinming_: also try changing the order of the candidates
11:14 cognominal-p6 left 11:18 sena_kun joined, p6bannerbot sets mode: +v sena_kun 11:19 inbioz left 11:23 zakharyas left
xinming_ Ok~~~ change the order worked, 11:25
seems we'll have to make the "default" last.
lizmat: Do you think wether there is a better version for my example instead of chaning the order of multi methods? 11:26
11:26 enheh joined, p6bannerbot sets mode: +v enheh
lizmat the way I understand MMD is that all "where" clauses are tie-breaking, so the first one that matches, will fire 11:28
11:29 cognominal-p6 joined 11:30 p6bannerbot sets mode: +v cognominal-p6 11:31 Ven` left
lizmat sightseeing& 11:35
11:38 abraxxa1 left, lizmat left, abraxxa joined 11:39 p6bannerbot sets mode: +v abraxxa 11:43 pmurias joined 11:44 p6bannerbot sets mode: +v pmurias 11:45 cognominal-p6 left 11:46 cognominal-p6 joined, p6bannerbot sets mode: +v cognominal-p6 11:56 abraxxa left 11:57 abraxxa joined 11:58 p6bannerbot sets mode: +v abraxxa
scimon So if an attribute has a type like Positional[Int] is there an easy way to get the Int 12:00
12:01 vike left, cognominal-p6 left
jnthn m: say Positional[Int].^role_arguments[0] 12:02
camelia (Int)
scimon Cheers :) 12:03
12:05 markong joined, markong left, markong joined 12:06 wbn left
scimon (I'm extending Trait::Env so you can have Array attributes because the more I look at it the more I think it's going to be useful with Docker) 12:06
12:06 p6bannerbot sets mode: +v markong, Luneburg joined, p6bannerbot sets mode: +v Luneburg
Luneburg p6: return True if "0291" ~~ /a*/; 12:07
camelia Attempt to return outside of any Routine
in block <unit> at <tmp> line 1
12:07 markong is now known as markoong
jnthn Ah, it'll split the env var on some delimiter? 12:07
Luneburg return "Match" if "0291" ~~ /a*/; 12:08
p6: say "Match" if "0291" ~~ /a*/;
camelia Match
Luneburg Why does that match?
AlexDaniel because it matched zero a's 12:09
p6: say "Match" if "0291" ~~ /a+/;
camelia ( no output )
AlexDaniel or
p6: say "Match" if "0291" ~~ /^a*$/;
camelia ( no output )
scimon So if I say has @.name is env it will look for all %*ENV keys that match ^NAME.*$ order them lexically and put the values in the array. 12:10
Luneburg Ah, that makes sense. Thanks
jnthn scimon: Oh...that's an interesting convention :)
scimon Well. I figure I can allow for others. But it'll do for me.
jnthn :)
scimon Plus I have other plans for a hash version. 12:11
Trying to work around the limitations of ENV to make setting up Docker config super easy. Plus I'm just enjoy noddling around with Traits.
12:16 Ven` joined 12:17 p6bannerbot sets mode: +v Ven` 12:19 vike joined 12:20 p6bannerbot sets mode: +v vike 12:34 angelds left 12:45 zakharyas joined, p6bannerbot sets mode: +v zakharyas 12:47 aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh 12:48 p6bannerbot sets mode: +v aborazmeh 13:05 inbioz joined 13:06 p6bannerbot sets mode: +v inbioz 13:18 vrurg joined 13:19 p6bannerbot sets mode: +v vrurg, aborazmeh left 13:28 benjikun joined 13:29 p6bannerbot sets mode: +v benjikun 13:31 scimon left, scimon joined 13:32 p6bannerbot sets mode: +v scimon
scimon Right. Best I get back to work. Trait::Env doing more stuff. 13:32
13:35 Ven` left
buggable New CPAN upload: Trait-Env-0.2.0.tar.gz by SCIMON modules.perl6.org/dist/Trait::Env:cpan:SCIMON 13:42
13:46 itaipu joined 13:47 p6bannerbot sets mode: +v itaipu 13:59 uzl joined 14:00 p6bannerbot sets mode: +v uzl
uzl Good morning, #perl6. I'm failing to conceptualize the following line: 14:02
yoleaux 22 Aug 2018 20:02Z <b2gills> uzl: tio.run/##Tc5PC4JAEAXw@36KhyisIBIe...tZmFsWl6Aw
uzl "Within methods, $.origin works the same as self.origin, however the colon-syntax for method arguments is only supported for method calls using self, not the shortcut."
doc: docs.perl6.org/language/objects#self
m: 14:03
class A { method origin(:$number) { $number }; method get-originA { self.origin(number => 5) }; method get-originB { $.origin(:number(5)) } }; my $x = A.new(); say $x.get-originA(), " ", $x.get-originB();
evalable6 5 5
14:05 Ven` joined
uzl I wonder why I am able to $.origin with colon-syntax inside the get-originB method. That sentence in the doc says it isn't supported with the shortcut to self.method() 14:05
14:05 p6bannerbot sets mode: +v Ven`
jnthn I think it means you can't do `$.foo: $arg` 14:06
uzl jnthn: I haven't seen that form before. I'd appreciate if you could provide me with a short example. ;) 14:10
jnthn m: $*OUT.say: 'hello' 14:12
camelia hello
jnthn It's especially useful with cases like
$lock.protect: { ...code... }
Because then you don't have to worry about putting a closing ) after the } 14:13
uzl Yeah, I've seen it been used with map, sort, etc. I just didn't realize it was the same thing. Thanks! 14:14
14:16 curan left
uzl .tell b2gills Thanks! I just noticed there was an example in the doc all this time. I'll have to pay more attention when reading the doc :). 14:17
yoleaux uzl: I'll pass your message to b2gills.
uzl class A { method origin($number) { $number }; method get-originA { self.origin: 5 }; method get-originB { $.origin: 5 }; my $x = A.new(); say $x.get-originA(), " ", $x.get-originB(); 14:25
14:26 kerframil joined, p6bannerbot sets mode: +v kerframil 14:30 Hor|zon left 14:31 kerframil left
uzl m: class A { method origin($number) { $number }; method get-originA { self.origin: 5 } }; A.new.get-originA(); 14:33
camelia ( no output )
uzl m: class A { method origin($number) { $number }; method get-originA { self.origin: 5 } }; say A.new.get-originA();
camelia 5
uzl m: class A { method origin(:$number) { $number }; method get-originA { self.origin: number => 5 } }; say A.new.get-originA();
camelia 5
uzl m: class A { method origin(:$number) { $number }; method get-originA { self.origin: :number(5) } }; say A.new.get-originA();
camelia 5
14:41 Luneburg left, uzl left 14:43 saki joined, saki left 14:48 HaraldJoerg joined, skids joined 14:49 p6bannerbot sets mode: +v HaraldJoerg, p6bannerbot sets mode: +v skids 14:50 saki joined, saki left
SmokeMachine m: class A { method origin(:$number) { $number }; method get-originA { self.origin: :5number } }; say A.new.get-originA(); 14:52
camelia 5
14:57 saki joined, saki left, cognominal-p6 joined 14:58 p6bannerbot sets mode: +v cognominal-p6, cognominal-p6 left 14:59 cognominal-p6 joined, inbioz left 15:00 p6bannerbot sets mode: +v cognominal-p6, saki joined 15:01 p6bannerbot sets mode: +v saki 15:03 fake_space_whale joined 15:04 tonyO_O joined, p6bannerbot sets mode: +v tonyO_O, p6bannerbot sets mode: +v fake_space_whale, jcarty left 15:05 inbioz joined 15:06 p6bannerbot sets mode: +v inbioz 15:12 Ven` left 15:13 troys joined, pmurias left 15:14 p6bannerbot sets mode: +v troys, pmurias joined 15:15 p6bannerbot sets mode: +v pmurias 15:16 inbioz left 15:22 cognominal-p6 left 15:27 saki left 15:29 skyton joined, p6bannerbot sets mode: +v skyton 15:31 saki joined 15:32 saki left 15:34 saki joined, p6bannerbot sets mode: +v saki 15:38 Ven` joined 15:39 inbioz joined, p6bannerbot sets mode: +v Ven`, spycrab0 left, p6bannerbot sets mode: +v inbioz 15:40 inbioz left 15:41 inbioz joined, p6bannerbot sets mode: +v inbioz 15:43 araraloren joined, p6bannerbot sets mode: +v araraloren 15:44 tonyO_O left 15:47 inbioz_ joined 15:48 p6bannerbot sets mode: +v inbioz_ 15:49 araraloren left 15:50 inbioz left 15:56 cgfbee left
scimon Waiting on code review. Added :sep to Trait::Env now you can say `has @.path is env(:sep<:>)` and it's work :) 15:59
it'll even
16:00 saki left
buggable New CPAN upload: Trait-Env-0.2.1.tar.gz by SCIMON modules.perl6.org/dist/Trait::Env:cpan:SCIMON 16:02
TimToady "env" is one of those overloaded words comp sci is full of...
scimon Yeah... well I can change it. is from-env could work? 16:08
jnthn is env-var might be clearer :) 16:09
benjikun I don't mind `env` in itself, but ^ this seems nicer
jnthn otoh, we call it %*ENV in Perl 6, `env` is somewhat guessible
Nice module idea, btw. :)
scimon Right now I just like the idea of being able to easily specify a bunch of things come from the Environment for my docker files. Plus I'm having fun getting my head around Traits and how they tie into stuff.
jnthn could imagine using that now and then 16:10
scimon Well it *was* your's :)
jnthn oh!
I forgot...hah :)
benjikun lol
scimon Plus I nicked some stuff from lizmat for make exportable traits.
making even.
16:11 skyton left
scimon I think I want for env *because* it's called %*ENV 16:11
benjikun understandable
scimon Of course the nice thing with versioned modules if I *do* decide to change the name people can just pin the old one.
16:12 cgfbee joined
TimToady I guess the thing that bugged me was more that it was unclear on shallow inspection how :sep<:> relates to actual environment variables 16:12
16:12 p6bannerbot sets mode: +v cgfbee
TimToady so I wasn't sure env related to ENV 16:12
but I guess if you actually learn the language, it becomes more understandable :) 16:13
scimon I think I picked it because the PATH variable tends to be ':' seperated. I'm thinking I may allow :seperator<:> as well.
I am trying :)
TimToady I meant, me learning the language of 'is env' :) 16:14
scimon Ah :D
TimToady I have no qualm about using "env" if it really does relate to ENV
scimon Again. I'm basing it partly off what I'm using.
TimToady the non-ENV-looking :sep just made me think it wasn't 16:15
scimon Well there's other bits `has $.path is env` would just put the PATH variable into the string.
I'm trying to give it some good docs too. I really hate coming to a module and the docs don't exist. 16:16
skids FWIW I was talking to a fellow old-school coder about Perl6; one of the things he balked at was hyphens in identifiers. I've never liked them, and personally I think they should be used sparingly. 16:17
benjikun skids: I've heard other perl6-ers love them for some reason
jnthn
.oO( Did you mean old_school coder? )
scimon I love them :) but I like mixing things up.
oldSchool maybe? 16:18
skids jnthn: haha.
benjikun We had some discussion about hyphens vs _ vs likeThis at some other point previously
TimToady hyphens are really easy to get used to, if you don't have an ax to grind already :)
jnthn skids: Was it a gut reaction, or more an "won't there be confusion with infix:<->" reaction? 16:19
TimToady yes, there was quite a lengthy discussion in the backlog
scimon The one thing I'm doing is converting them to _ when mapping attribute name to ENV var (as well as going upper case) to match the general standards for this.
skids jnthn: paraphrasing "yeah I know parsing technology has caught up... but, please no."
benjikun Another language, Nim actually makes `someFunction` do the same thing as `some_function` regardless of what it was defined as 16:20
scimon Anyway I have a dumb love of * * * being a valid language construct. I'm hardly going to complain about -
TimToady probably from someone who was raised in the age where you had to leave all spaces out to fit into memory :)
as was I, but I got over it 16:21
skids (Underscores can be overused as well... both can lead to shirking the process of pondering whether there's an appropriately huffmanized alternative.)
16:21 sftp joined, p6bannerbot sets mode: +v sftp
scimon I spend too much time dealing with Python devs. My Perl 5|6 code tends to be interspersed with spaces where they would wince. 16:22
TimToady anyway, Perl 6 very intentionally encourages people to put spaces around most binary operators
16:23 st_elmo joined
benjikun if it works, it works heh 16:23
scimon Side note. Is there any plans for making it easier to export traits? The trick I nicked of lizmat works but it's a bit of a cludge.
TimToady so we grudgingly allow $i-1 to be an expression, not a COBOL-style variable 16:24
16:24 p6bannerbot sets mode: +v st_elmo
skids Meh, extra spaces never bothered me. Heck, I tend to put superstitious parens whenever the precedence gets too far above newbie level just for clarity 16:25
TimToady exporting all sorts of stuff will probably get easier when we get more macro stuff going
scimon :)
16:25 sarna joined
jnthn scimon: Hm, you can't just mark the trait_mod with `is export`? 16:26
16:26 p6bannerbot sets mode: +v sarna
sarna what's the p6y version of this regex: /\b\w/ ? 16:26
TimToady /«/ 16:27
sarna oh my.
TimToady or /<</
scimon jnthn: I'm afraid not.
TimToady it's like \< in other re
but \< is against Perl policy
sarna thanks :^) 16:28
TimToady scimon: I'd consider that a bug, really
failure to export a syntax category, more or less 16:29
jnthn scimon: Odd, I'm sure I've got code doing so...
16:29 imcsk8 left 16:31 cgfbee left
scimon I think it's to do with it not correctly handling exported traits and others so you can chain is exported-trait is rw 16:31
I'll try it again. I have to head off now. 16:32
16:33 fake_space_whale left 16:37 imcsk8 joined, cgfbee joined 16:38 p6bannerbot sets mode: +v imcsk8, scimon left, p6bannerbot sets mode: +v cgfbee 16:47 sarna left 16:54 inbioz_ left 16:56 japhb left 17:00 spycrab0 joined, p6bannerbot sets mode: +v spycrab0 17:02 zakharyas left 17:05 zakharyas joined, p6bannerbot sets mode: +v zakharyas 17:08 japhb joined 17:09 p6bannerbot sets mode: +v japhb 17:17 cognominal-p6 joined, p6bannerbot sets mode: +v cognominal-p6 17:19 Luneburg joined, p6bannerbot sets mode: +v Luneburg 17:28 Luneburg left 17:31 cognominal-p6 left, cognominal-p6 joined 17:32 p6bannerbot sets mode: +v cognominal-p6 17:34 wbn joined, p6bannerbot sets mode: +v wbn 17:42 lex_ joined 17:43 p6bannerbot sets mode: +v lex_, cognominal-p6 left, sotona joined
lex_ Why does this >>> say "27.36.1.255 FAIL > 77 999.569.22.40".match(/ \d ** 1..3 <?{ $/ < 256}> /, :global); splits the numbers larger than 256 into two numbers? 17:44
17:44 p6bannerbot sets mode: +v sotona
lex_ Output : (「27」 「36」 「1」 「255」 「77」 「99」 「9」 「56」 「9」 「22」 「40」) 17:45
17:45 Ven` left
TimToady because of backtracking 17:47
either use :r or put « » around the "word"
17:48 sotona left
TimToady well, :r might not work given .match is "backtracking forward" the start position 17:48
if you're looking for well-formed IP addresses though, you probably want to fail the whole thing if any of the components are > 255 17:49
lex_ Yes 17:50
Greater than 22
255
I was going to do a range. I have run out of time. brb
TimToady m: say "27.36.1.255 FAIL > 77 999.569.22.40".match(/ ( « \d+ » ) ** 4 % '.' <?{ $0.all < 256}> /, :global); 17:52
camelia (「27.36.1.255」
0 => 「27」
0 => 「36」
0 => 「1」
0 => 「255」)
17:55 lex_ left 17:58 imcsk8_ joined 17:59 p6bannerbot sets mode: +v imcsk8_ 18:00 imcsk8 left 18:10 xinming_ is now known as xinming 18:13 leah2 left 18:29 sauvin left, leah2 joined 18:30 p6bannerbot sets mode: +v leah2 18:35 simcop2387 is now known as perldoc, perldoc is now known as simcop2387 18:41 Ven` joined, p6bannerbot sets mode: +v Ven`
rindolf hi all 18:44
18:46 Ven` left 18:49 lizmat joined, p6bannerbot sets mode: +v lizmat 18:53 rfold joined, p6bannerbot sets mode: +v rfold
benjikun rindolf: howdy 18:54
18:54 zakharyas left 18:55 cjkinni left 18:56 cjkinni joined 18:57 p6bannerbot sets mode: +v cjkinni, jast left 18:58 jast joined, p6bannerbot sets mode: +v jast 19:00 enheh left 19:02 cjkinni left 19:03 cjkinni joined 19:04 p6bannerbot sets mode: +v cjkinni 19:06 cjkinni left, maettu_ left, cjkinni joined 19:07 p6bannerbot sets mode: +v cjkinni 19:14 lizmat left 19:15 aindilis left
masak rindolf: greetings, earthling 19:15
rindolf masak: sup? 19:16
benjikun lol
19:18 kerframil joined, p6bannerbot sets mode: +v kerframil 19:22 troys left 19:25 domidumont left
tyil heh 19:37
does anyone know why Niecza on wikipedia redirects to Perl 6?
en.wikipedia.org/w/index.php?title...edirect=no
benjikun github.com/sorear/niecza 19:38
Guess someone set it to a long time ago 19:39
masak rindolf: busy. looking forward to being less so. 19:40
rindolf: et tu?
rindolf masak: refactoring some gnumake code 19:41
tyil benjikun: heh, interesting
19:41 Ven` joined 19:42 p6bannerbot sets mode: +v Ven`
masak today I realized Slip() is a wee bit more powerful than JS's array spread 19:43
because the latter is syntactic, and can only occur inside array literals
whereas the former is first-class and can be passed around
m: say [1, 2, 3].map(-> $e { Slip(["$e$e", "$e $e"]) }).perl 19:45
camelia ("11", "1 1", "22", "2 2", "33", "3 3").Seq
masak AFAIU, the Slip "deploys" when it gets placed in the resulting Seq 19:46
19:46 Ven` left 19:49 spycrab0 left 20:10 st_elmo left 20:15 cjkinni left, cjkinni joined 20:16 p6bannerbot sets mode: +v cjkinni 20:28 lizmat joined 20:29 p6bannerbot sets mode: +v lizmat 20:36 scimon joined, p6bannerbot sets mode: +v scimon 20:39 cognominal-p6 joined, p6bannerbot sets mode: +v cognominal-p6 20:42 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke, Ven` joined 20:43 p6bannerbot sets mode: +v Ven` 20:44 ufobat left 20:47 rfold left, Ven` left, cognominal-p6 left, cognominal-p6 joined
scimon So yeah... is export on the traits seems to work fine . Hmmmm 20:47
20:48 p6bannerbot sets mode: +v cognominal-p6 20:57 scimon left 21:02 cognominal-p6 left 21:05 DarthGandalf left 21:07 koto joined, ms78210 joined 21:08 p6bannerbot sets mode: +v koto 21:09 ms78210 left 21:10 sena_kun left 21:13 skids left 21:21 DarthGandalf joined, p6bannerbot sets mode: +v DarthGandalf 21:34 pk_ joined, p6bannerbot sets mode: +v pk_
pk_ HELP perl6 21:35
Is there a support for TK in Perl6?
El_Che I only see gtk modules 21:36
pk_ thank you ... 21:37
21:38 Some-body_ joined, p6bannerbot sets mode: +v Some-body_ 21:39 DarthGandalf left, Some-body_ is now known as DarthGandalf 21:40 pk_ left 21:43 Ven` joined 21:44 p6bannerbot sets mode: +v Ven` 21:48 Ven` left 22:02 lizmat left 22:04 lizmat joined 22:05 p6bannerbot sets mode: +v lizmat 22:08 lizmat left 22:29 lizmat joined 22:30 p6bannerbot sets mode: +v lizmat 22:36 epony left 22:40 koto left, sena_kun joined 22:41 p6bannerbot sets mode: +v sena_kun, sena_kun left 22:43 pmurias left 22:44 Ven` joined 22:45 p6bannerbot sets mode: +v Ven` 22:49 Ven` left
vrurg "Missing serialize REPR function for REPR VMIter (BOOTIter)" - what could it be?? 22:56
timotimo some object that landed in precompilation kept an iterator around but we don't support precompiling them (yet?) 22:57
vrurg Heh, it doesn't make my life easier. Ok, thanks! 22:58
timotimo something you started iterating over, but have not finished? 23:00
23:01 Ven` joined 23:02 p6bannerbot sets mode: +v Ven`
vrurg There is no my modules in the stack trace. Though it gives me some idea... 23:02
timotimo: Thanks!
23:03 pk_ joined, p6bannerbot sets mode: +v pk_
pk_ I am trying to include inline:perl5 module like below 23:03
perl6 -I Inline-Perl5-master/lib
timotimo Inline::Perl5 relies on a compilation step during installation, so if you're not installing it with zef, it will probably not work 23:04
pk_ and then at prompt use Inline::Perl5;
===SORRY!=== Error while compiling /u/kprabha/Inline-Perl5-master/lib/Inline/Perl5/Interpreter.pm6 (Inline::Perl5::Interpreter) An exception occurred while evaluating a constant at /u/kprabha/Inline-Perl5-master/lib/Inline/Perl5/Interpreter.pm6 (Inline::Perl5::Interpreter):12 Exception details: ===SORRY!=== Error while compiling Cannot locate native library '/u/kprabha/Inline-Perl5-master/resources/libraries/libp5helper.so': /u/kprab 23:05
timotimo that's the result of compiling what it compiles during installation
23:05 Ven` left
timotimo the p5helper library 23:05
pk_ could you let me know how to install it properly?
23:08 lizmat left
timotimo "zef install Inline::Perl5"; can you tell us your perl6 --version, too? 23:08
pk_ Rakudo Star version 2018.06 built on MoarVM version 2018.06 23:10
I do not have zef ... I use centos 23:11
timotimo did you install rakudo star from centos' provided packages?
pk_ I usually download modules, build and use it ...
yes
timotimo OK, you can git clone github.com/ugexe/zef 23:12
23:12 pmurias joined, rindolf left
timotimo it has a readme file that explains how to install it, but it's basically "perl6 -I lib bin/zef install ." or something similar 23:12
you may also have to include a specific path in your $PATH for "zef" to become available without the full path
23:12 p6bannerbot sets mode: +v pmurias
pk_ sure ... I will try that 23:13
23:27 pmurias left 23:32 spycrab0 joined, p6bannerbot sets mode: +v spycrab0 23:33 pmurias joined 23:34 p6bannerbot sets mode: +v pmurias
pk_ zef install Inline::Perl5 giving below error 23:34
===> Searching for: Inline::Perl5 ===> Updating cpan mirror: raw.githubusercontent.com/ugexe/Pe...cpan1.json !!!> Failed to update cpan mirror: raw.githubusercontent.com/ugexe/Pe...cpan1.json ===> Updating cpan mirror: raw.githubusercontent.com/ugexe/Pe.../cpan.json !!!> Failed to update cpan mirror: raw.githubusercontent.com/ugexe/Pe...ystems/mas
23:44 aindilis joined, p6bannerbot sets mode: +v aindilis
AlexDaniel pk_: hmm, could it be an issue with ipv6 or something like that? 23:46
23:47 fijidrummerboii1 joined, p6bannerbot sets mode: +v fijidrummerboii1, pmurias left 23:48 fijidrummerboii1 left
pk_ +AlexDaniel : Not getting how to fix that ... any ideas? 23:49
AlexDaniel pk_: can you access these URLs via your browser? 23:52
pk_: for example raw.githubusercontent.com/ugexe/Pe...cpan1.json
pk_: by any chance, is github blocked in your country?
pk_ I can access the link ... I don't think it is blocked 23:54
jnthn Proxy perhaps? Not sure how zef handles that off hand.
23:59 cognominal-p6 joined