IRCloggy #perl6 2018-10-18

Logs Search ←Prev date Next date→ Channels Documentation

Provider of IRC logs since 2005.
WARNING: As Freenode became unjoinable and lost all warnings in topics, we cannot log channels on Freenode anymore.

2018-10-18

Zoffix .tell nige I recall you offering trademark smoketest? This is the current list of proposals I got: https://gist.github.com/zoffixznet/f18842f7c7e051b8c2fcdc265e40bd15 No pressure if you can't/don't wanna smoketest anything.00:00
yoleaux Zoffix: I'll pass your message to nige.00:00
Zoffix Thank you robot, you're most kind.00:00
.botsnack00:00
yoleaux :D00:00
TimToady Zoffix: while impatience is certainly a virtue, I don't entirely appreciate this nudging the timeline up; I've been deliberating with the intent to make a decision by Nov 1 as originally stipulated, and I do intend to be the decider (because cultural hacks are what I do), so a straw poll will (at best) be relatively meaningless00:04
Zoffix \o/00:05
TimToady: awesome.00:05
TimToady: no nudging, Nov 1 is still good. I just wasn't sure if you were gonna respond at all00:05
TimToady my wife will tell you I go way too quiet when I'm thinking :)00:06
Zoffix OK, sorry :)00:06
.tell nige never mind. Turns out we won't need any polls00:06
yoleaux Zoffix: I'll pass your message to nige.00:06
holyghost Zoffix: I've uploaded again, the errors should be out now, note that it's perl 6.c that's probably why it does not show up00:07
Zoffix holyghost: what do you mean "it's perl 6.c"?00:08
holyghost the json section "perl" is "6.c"00:08
Zoffix holyghost: that's fine. That section indicates the minimum language version your module supports. 6.c is the current version (until next month).00:09
holyghost ok00:09
buggable New CPAN upload: Bayes-Learn-0.1.6.tar.gz by HOLYGHOST https://cpan.metacpan.org/authors/id/H/HO/HOLYGHOST/Perl6/Bayes-Learn-0.1.6.tar.gz00:10
New CPAN upload: Game-Markov-0.1.4.tar.gz by HOLYGHOST https://cpan.metacpan.org/authors/id/H/HO/HOLYGHOST/Perl6/Game-Markov-0.1.4.tar.gz00:10
Zoffix holyghost: what did you fix? It still has an error? The bayes learn one00:12
Missing quotes -> "depends" : [ Mathx::Stat ],00:12
And same error still exists in the other one00:12
holyghost Zoffix: fixed and uploaded, thanks00:17
eco: Mathx::Stat00:17
buggable holyghost, Mathx::Stat 'Statistics package unto Correlation Dimension.': http://modules.perl6.org/dist/Mathx::Stat:cpan:HOLYGHOST 00:17
Zoffix \o/00:17
holyghost coolness00:18
my code has been mirrored :-)00:18
Zoffix :)00:18
holyghost (__)00:22
oo )00:22
|_/\00:22
moooh!00:22
itaipu left00:24
buggable New CPAN upload: Bayes-Learn-0.1.7.tar.gz by HOLYGHOST https://cpan.metacpan.org/authors/id/H/HO/HOLYGHOST/Perl6/Bayes-Learn-0.1.7.tar.gz00:30
New CPAN upload: Game-Markov-0.1.5.tar.gz by HOLYGHOST https://cpan.metacpan.org/authors/id/H/HO/HOLYGHOST/Perl6/Game-Markov-0.1.5.tar.gz00:30
holyghost eco: Bayes::Learn00:34
buggable holyghost, Nothing found00:34
Zoffix up to ~1hr00:35
Loading META file from dists-from-CPAN/id/H/HO/HOLYGHOST/Perl6/AI-Markov-0.1.1.meta00:35
[error] Failed to parse: JSON error: , or } expected while parsing object/hash, at character offset 393 (before ""AI::Markov::" : "HM...") at /home/modules.perl6.org/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/JSON/Meth.pm line 34.00:35
holyghost it's Game::Markov not AI::Markov00:36
Zoffix holyghost: but I'm saying AI::Markov is also broken.00:36
You didn't re-upload that one00:36
holyghost AI::Markov will disappear00:37
I had to change the name00:37
Zoffix ok00:37
holyghost it's not even indexed so that should be ok00:37
lizmat left00:37
holyghost Eventually, I'll try to make a game myself and put it on CPAN00:37
Geth ¦ modules.perl6.org: f917d34665 | (Zoffix Znet)++ (committed using GitHub Web editor) | use-me-for-commit-triggers00:38
¦ modules.perl6.org: [NEWDB] Flush old CPAN dists 00:38
¦ modules.perl6.org:00:38
¦ modules.perl6.org: Due to https://github.com/perl6/modules.perl6.org/issues/9700:38
¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/f917d3466500:38
Zoffix .tell samcv FYI: https://github.com/samcv/perl6-Git-Log/pull/100:41
yoleaux Zoffix: I'll pass your message to samcv.00:41
mattp_ joined00:45
p6bannerbot set mode: +v00:46
Geth ¦ modules.perl6.org: b5ee05aa0d | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/p30METAChecker.pm00:47
¦ modules.perl6.org: Bail out from META checker if we ain't got distro sauce URL 00:47
¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/b5ee05aa0d00:47
lizmat joined00:49
p6bannerbot set mode: +v00:49
Geth ¦ modules.perl6.org: 44db231bf3 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/Source/GitLab.pm00:53
¦ modules.perl6.org: Fill dist sauce URL for GitLab dists 00:53
¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/44db231bf300:53
Zoffix left00:54
holyghost eco: Bayes::Learn01:02
buggable holyghost, Nothing found01:02
Xliff What's the best way to write a call back with a pointer to a double?01:08
Will "&handler (gdouble $returnable is rw)" work?01:08
Err...01:08
Will "&handler (num64 $returnable is rw)", actually.01:08
timotimo i would expect that to work01:08
if the syntax is right01:09
Xliff Thanks.01:09
Here's another question. How do I assign a value to a Pointer[num64] from a num64?01:10
timotimo doesn't assigning into it work?01:11
Xliff m: use NativeCall; my $p = Pointer[num64]; $p = 1000e0;01:11
camelia rakudo-moar 4bf55b1ef: ( no output )01:11
timotimo needs a .new01:11
Xliff m: use NativeCall; my $p = Pointer[num64].new; $p = 1000e0;01:11
camelia rakudo-moar 4bf55b1ef: ( no output )01:11
Xliff m: use NativeCall; my $p = Pointer[num64].new; $p = 1000e0; say $p;01:11
camelia rakudo-moar 4bf55b1ef: OUTPUT: «1000␤»01:11
Xliff m: use NativeCall; my $p = Pointer[num64].new; $p = 1000e0; say $p; say $p.^name01:11
camelia rakudo-moar 4bf55b1ef: OUTPUT: «1000␤Num␤»01:11
timotimo and i'd expect you'll have to bind01:12
Xliff m: use NativeCall; my $p := Pointer[num64].new; $p = 1000e0; say $p; say $p.^name01:12
camelia rakudo-moar 4bf55b1ef: OUTPUT: «Cannot assign to an immutable value␤ in block <unit> at <tmp> line 1␤␤»01:12
Xliff ^^ That's what I was expecting.01:12
m: use NativeCall; my $p := Pointer[num64].new; $p.deref = 1000e0; say $p; say $p.^name01:12
camelia rakudo-moar 4bf55b1ef: OUTPUT: «Can't dereference a Null Pointer␤ in method deref at /home/camelia/rakudo-m-inst-1/share/perl6/sources/51E302443A2C8FF185ABC10CA1E5520EFEE885A1 (NativeCall::Types) line 58␤ in block <unit> at <tmp> line 1␤␤»01:12
Xliff m: use NativeCall; my $p = Pointer[num64].new; $p.deref = 1000e0; say $p; say $p.^name01:12
camelia rakudo-moar 4bf55b1ef: OUTPUT: «Can't dereference a Null Pointer␤ in method deref at /home/camelia/rakudo-m-inst-1/share/perl6/sources/51E302443A2C8FF185ABC10CA1E5520EFEE885A1 (NativeCall::Types) line 58␤ in block <unit> at <tmp> line 1␤␤»01:12
Xliff m: use NativeCall; my $p = Pointer[num64].new; say $p;01:12
camelia rakudo-moar 4bf55b1ef: OUTPUT: «NativeCall::Types::Pointer[num64]<NULL>␤»01:12
timotimo m: use NativeCall; my $p = Pointer[num64].new; $p[0] = 1000e0; say $p.perl;01:12
camelia rakudo-moar 4bf55b1ef: OUTPUT: «(signal SEGV)»01:13
timotimo haha01:13
Xliff LOL01:13
timotimo m: use NativeCall; my $p = Pointer[num64].new(1000e0); $p[0] = 1000e0; say $p.perl;01:13
camelia rakudo-moar 4bf55b1ef: OUTPUT: «Default constructor for 'NativeCall::Types::Pointer[num64]' only takes named arguments␤ in block <unit> at <tmp> line 1␤␤»01:13
timotimo in that case you'll also have to create a CArray01:13
or use malloc01:13
Xliff m: use NativeCall; my $p = CArray[num64].new; $p[0] = 1000e0; say $p; say $p[0]01:13
camelia rakudo-moar 4bf55b1ef: OUTPUT: «NativeCall::Types::CArray[num64].new␤1000␤»01:13
Xliff OK. That will work, for now.01:14
kent\n joined01:18
p6bannerbot set mode: +v01:18
Calibellus joined01:21
p6bannerbot set mode: +v01:22
Calibellus left01:25
cognominal-p6 left01:25
cognominal-p6 joined01:25
p6bannerbot set mode: +v01:26
Calibellus joined01:27
jameslenz joined01:27
p6bannerbot set mode: +v01:27
p6bannerbot set mode: +v01:28
jameslen_ joined01:29
jameslenz left01:29
p6bannerbot set mode: +v01:30
vrurg joined01:30
p6bannerbot set mode: +v01:30
Bucciarati left01:37
avar left01:37
avar joined01:37
avar left01:37
avar joined01:37
p6bannerbot set mode: +v01:37
Bucciarati joined01:37
p6bannerbot set mode: +v01:38
p6bannerbot set mode: +v01:38
mattp_ left01:39
kurahaupo left01:39
kurahaupo joined01:40
jameslen_ left01:40
p6bannerbot set mode: +v01:41
cognominal-p6 left01:49
kurahaupo left01:51
kurahaupo joined01:52
p6bannerbot set mode: +v01:53
mattp_ joined01:57
p6bannerbot set mode: +v01:58
mattp_ left02:03
ufobat_ joined02:18
p6bannerbot set mode: +v02:19
ufobat___ left02:22
finanalyst joined02:32
p6bannerbot set mode: +v02:33
kurahaupo left02:40
kurahaupo joined02:43
p6bannerbot set mode: +v02:43
rbt_ left02:52
atweiden-air joined02:55
p6bannerbot set mode: +v02:56
imcsk8 joined02:57
p6bannerbot set mode: +v02:58
rbt_ joined03:26
p6bannerbot set mode: +v03:27
Sgeo__ left03:29
Sgeo joined03:31
Calibellus left03:32
p6bannerbot set mode: +v03:32
finanalyst left03:35
jameslenz joined03:37
p6bannerbot set mode: +v03:38
jameslenz left03:42
Ven` joined03:57
p6bannerbot set mode: +v03:57
Ven` left04:01
Bucciarati left04:05
Bucciarati joined04:07
p6bannerbot set mode: +v04:07
AlexDaniel left04:08
ravioli_ joined04:09
p6bannerbot set mode: +v04:09
AlexDaniel joined04:09
ravioli_ hi guys I'd like to ask about perl6 oneliner here04:09
p6: say 304:09
camelia rakudo-moar 4bf55b1ef: OUTPUT: «3␤»04:09
p6bannerbot set mode: +v04:10
SmokeMachine Hi ravioli_04:12
ravioli_ hi SmokeMachine04:12
fake_space_whale joined04:13
p6bannerbot set mode: +v04:14
kurahaupo left04:15
kurahaupo joined04:16
p6bannerbot set mode: +v04:16
ravioli_ suppose I get string like ' wawa29792479429283" '04:17
so I match it with /wawa.+?((\")**1)/04:18
but how could I append [[ on the beginning of the matched string and add )) on the end of the string?04:19
on sed the &h on s/aaa/&h/g means add h after aaa, is there something similar on perl6?04:21
Geth ¦ doc: 09e227e216 | (Richard Hainsworth)++ (committed using GitHub Web editor) | doc/Language/modules.pod604:27
¦ doc: Update modules.pod6 04:27
¦ doc:04:27
¦ doc: An extra clarification about how to use a resources file inside a module.04:27
¦ doc: review: https://github.com/perl6/doc/commit/09e227e21604:27
synopsebot Link: https://doc.perl6.org/language/modules04:27
AlexDaniel m: my $x = "aaabbbccc"; $x ~~ s/(aaa)/$0h/; say $x04:29
camelia rakudo-moar 4bf55b1ef: OUTPUT: «aaahbbbccc␤»04:29
AlexDaniel ravioli_: you mean something like this? ↑04:29
molaf joined04:33
p6bannerbot set mode: +v04:34
ravioli_ AlexDaniel: ah close! thanks I didn't know $0 before04:37
atweiden-air left04:39
cognominal-p6 joined04:45
p6bannerbot set mode: +v04:46
mniip_mniip04:50
ravioli_ AlexDaniel: I'm using command: perl6 -pe 's:g/wawa.+?((\")**1)/$0h/' test.txt but the command removes the matched string. Any idea?04:51
AlexDaniel: the command: perl6 -pe 's:g/wawa.+?((\")**1)/$0h/' test.txt04:52
AlexDaniel ravioli_: what about S:g (with capital S)04:52
ravioli_: ah sorry, that's not the issue04:53
ravioli_ AlexDaniel: It makes no replacement at all04:53
molaf left04:54
AlexDaniel it should be s:g/(wawa.+?[[\"]**1])/$0h/04:54
so we want to capture the whole thing, and the other bits don't need to be captured (so we can use [] instead of () )04:54
ravioli_ AlexDaniel: thanks for your help, but it still removes the matched string and add 'h'04:55
AlexDaniel: sorry I typed it manually and forget the parentheses, it did work! Thanks a lot!04:57
AlexDaniel \o/04:57
ravioli_ AlexDaniel: I'm so sorry (again)04:57
AlexDaniel ravioli_: no problem, I'm glad to help!04:57
cognominal-p6 left04:58
cognominal-p6 joined04:58
AlexDaniel ravioli_: ah, I just remembered that you can also use just $/ if you want to get the whole thing05:00
troys left05:00
AlexDaniel ravioli_: so this works too: s:g/wawa.+?[[\"]**1]/$/h/05:00
p6bannerbot set mode: +v05:00
AlexDaniel although it looks weird because of $/ :)05:00
Sgeo_ joined05:00
ravioli_ AlexDaniel: one more question if you don't mind, the current regex also matches a double quote after wawa{somerandomcharacter}, how can I insert something after {somerandomcharacter} and before a double quote?05:00
AlexDaniel: yeah I'm sorry this is too hard05:00
p6bannerbot set mode: +v05:00
ravioli_ AlexDaniel: thanks for the additional tips05:01
Sgeo left05:02
AlexDaniel ravioli_: perl6 -pe 's:g| wawa.+? )> [\"]**1|$/h|' <<< "wawa29792479429283\""05:03
will produce this: wawa29792479429283h"05:03
is that what you wanted?05:03
I hope it is, because I have to get some sleep now05:08
have a nice day!05:08
cognominal-p6 left05:09
ravioli_ AlexDaniel: Thanks a lot a lot a lot!!!!! You're so smart, kind, and awesome!!!!05:14
Bucciarati left05:19
dct left05:19
imcsk8 left05:20
avar left05:21
Bucciarati joined05:28
avar joined05:28
avar left05:28
avar joined05:28
p6bannerbot set mode: +v05:28
imcsk8 joined05:28
p6bannerbot set mode: +v05:28
p6bannerbot set mode: +v05:28
p6bannerbot set mode: +v05:29
jameslenz joined05:38
p6bannerbot set mode: +v05:39
jameslenz left05:42
domidumont joined06:09
p6bannerbot set mode: +v06:10
kensanata joined06:11
p6bannerbot set mode: +v06:11
HaraldJoerg joined06:12
p6bannerbot set mode: +v06:13
ravioli_ Hi guys I'd like to ask again06:17
how to implement lookbehind in perl 6 regex?06:17
based on this command: user@localhost: $ perl6 -pe 's:g| \.\.\/wawa.+? )> [\"]**1|zzz$/zzz|' <<< "../wawa29792479429283\"irfirifrj\"dkjdkfj\""06:19
Now I'd like to implement lookbehind in .. on string ../wawa29792479429283\"irfirifrj\"dkjdkfj\"06:20
fnux left06:24
fnux joined06:24
kurahaupo left06:25
p6bannerbot set mode: +v06:25
imcsk8 left06:25
kurahaupo joined06:26
imcsk8 joined06:27
fake_space_whale left06:27
p6bannerbot set mode: +v06:27
p6bannerbot set mode: +v06:27
tobs ravioli_: it's fittingly called <?after ...>06:37
m: say "../test" ~~ /<?after '..'>\/(.*)/06:37
camelia rakudo-moar 4bf55b1ef: OUTPUT: «「/test」␤ 0 => 「test」␤»06:37
nightfro` joined06:37
tobs m: say "/etc/test" ~~ /<?after '..'>\/(.*)/06:37
camelia rakudo-moar 4bf55b1ef: OUTPUT: «Nil␤»06:37
p6bannerbot set mode: +v06:38
nightfrog left06:38
nightfro`nightfrog06:38
abraxxa joined06:38
p6bannerbot set mode: +v06:39
Xliff m: my @a = (^10); say @a.grep(* != 5).say06:51
camelia rakudo-moar 4bf55b1ef: OUTPUT: «(0 1 2 3 4 6 7 8 9)␤True␤»06:51
Xliff m: my @a = (^10); say @a.grep(*.Str ne "5").say06:51
camelia rakudo-moar 4bf55b1ef: OUTPUT: «(0 1 2 3 4 6 7 8 9)␤True␤»06:51
ravioli_ never mind I already know the answer thanks guys for all the help!06:52
robertle joined07:03
p6bannerbot set mode: +v07:04
CIAvash TimToady: I wrote this last night but deleted it and didn't send it "I think when TimToady is quiet, it means he is thinking. But who knows :)" I guess I was right 😀07:10
ravioli_ tobs: thanks a lot sorry I just noticed your help now07:12
tobs ravioli_: no problem. It's better to have found it yourself, isn't it? :)07:18
ravioli_ tobs: Yes I agree :)07:18
Xliff CIAvash: Did TimToady say something?07:19
Or is he still thinking? :)07:19
m: '😀'.uniname.say07:19
camelia rakudo-moar 4bf55b1ef: OUTPUT: «GRINNING FACE␤»07:19
avuserow left07:20
Xliff Hexchat needs better unicode support. :p07:20
CIAvash Xliff: http://colabti.org/irclogger/irclogger_log/perl6?date=2018-10-18#l607:22
Xliff CIAvash: LOL! I was active an hour and 38 minutes later. The one thing this should tell you? I should scour my scrollback more dutifully.07:24
dakkar joined07:28
p6bannerbot set mode: +v07:29
Geth ¦ Pod-To-HTML: finanalyst++ created pull request #47: Modify to use templates 07:29
¦ Pod-To-HTML: review: https://github.com/perl6/Pod-To-HTML/pull/4707:29
zakharyas joined07:29
avuserow joined07:30
p6bannerbot set mode: +v07:30
masak I know `ff` stands for "flip-flop"... but what does the third "f" in `fff` stand for? :)07:31
p6bannerbot set mode: +v07:31
Xliff_ joined07:31
p6bannerbot set mode: +v07:32
Xliff_ left07:34
Xliff_ joined07:35
p6bannerbot set mode: +v07:35
Xliff_ Thanks.07:37
I'm trying out a new IRC client that's has better unicode support than HexChat.07:38
Unfortunately, the look and feel is too mIRC-like for me. ;(07:38
jameslenz joined07:39
p6bannerbot set mode: +v07:40
jameslenz left07:43
Xliff_ left07:48
kurahaupo_ joined07:49
p6bannerbot set mode: +v07:50
ravioli_ Hi guys I07:50
kurahaupo left07:50
kurahaupo_ left07:51
kurahaupo joined07:51
ravioli_ I'd like to ask again, the 'sed' command modify a file, how can I make perl 6 modify a file in command line instead of output to stdout?07:51
p6bannerbot set mode: +v07:52
cpage_ joined07:53
p6bannerbot set mode: +v07:53
cpage left07:55
cpage_cpage07:55
scimon joined07:56
p6bannerbot set mode: +v07:57
zakharyas left08:04
zakharyas joined08:05
cognominal-p6 joined08:05
p6bannerbot set mode: +v08:06
p6bannerbot set mode: +v08:06
cognominal-p6 left08:06
cognominal-p6 joined08:07
p6bannerbot set mode: +v08:07
rindolf joined08:08
p6bannerbot set mode: +v08:09
lizmat .08:11
pecastro joined08:17
p6bannerbot set mode: +v08:18
kensanata ravioli_: Looking at the output of perl6 --help makes me think that no such thing exists.08:25
Ven` joined08:26
ravioli_ kensanata: thanks for responding! I think I'll just use bash for that08:26
p6bannerbot set mode: +v08:27
kensanata ravioli_: burn! 🤣08:28
ravioli_ kensanata: sorry if it hurts cause I didn't mean to08:28
kensanata ravioli_: No worries, I laughed.08:28
cognominal-p6 left08:29
kurahaupo ravioli_: « sed -i » is an attractive nuisance that seduces people into thinking sed is a file editor. It's a stream,99 editor that can read one file and write another. The -i just means it moves the new file over the old one, regardless of whether any changes were made, and without necessarily keeping ownership or permissions correct. And definitely not keeping hard links. 08:29
ravioli_ kurahaupo: thanks for the info, unfortunately sed has different regex syntax with perl 608:32
leont joined08:33
p6bannerbot set mode: +v08:34
kurahaupo ravioli_: Well, perl5 has perl -i$suffix that mimics sed -i - so maybe perl6 does the same?08:34
masak `perl6` doesn't have an -i flag currently08:35
but it feels like it should be possible to build a standalone command that does what -i does08:35
should even be possible to build it in Perl 6 :)08:35
man, if I had infinite time I would do that and then blog about it ;)08:35
somebody feel free to task-steal that if they want08:36
Actualeyes joined08:37
p6bannerbot set mode: +v08:38
masak ISTR implementing -i correctly is a fun challenge08:38
you're not meant to actually replace the old file until you've correctly finished writing the new one08:39
cognominal-p6 joined08:50
cognominal-p6 left08:51
cognominal-p6 joined08:51
p6bannerbot set mode: +v08:52
kurahaupo masak: for added bonus points, get it to maintain multiple hard links…08:54
masak guessing Perl 5's -i does that out of the box08:54
kurahaupo … without truncating the file while it's in use?08:55
masak oh dear08:56
kurahaupo Mumble Linux mmap()+ splice() syscalls08:56
(It's hard alright)08:58
leont AFAIK its not that hard, write to a tempfile, and then replace at the end09:04
kurahaupo leont: and make sure the resulting file has the same hard links as the original ?09:20
El_Che tmp-file > orig-file09:27
not moving but overwriting so the ownerships stays correct09:27
kurahaupo And doing that atomically, so that the orig-file isn't momentarily truncated, nor a blended mix of old and new ? And doesn't leave a broken file if the fs runs out of space?09:30
It might be possible to meet all these, but it's not nearly as obvious as it seems.09:30
leont I definitely can't think of a way to do all those things atomically09:33
That would require a transactional filesystem09:34
kurahaupo leont: indeed I don't think there exists a posixish answer.09:39
jameslenz joined09:40
p6bannerbot set mode: +v09:40
ilmari istr reiserfs was touting transactions back in the day09:43
jameslenz left09:44
tobs` joined09:46
p6bannerbot set mode: +v09:47
isBEKaml joined09:57
p6bannerbot set mode: +v09:57
isBEKaml left10:01
[particle]1 joined10:04
[particle] left10:04
p6bannerbot set mode: +v10:05
ravioli_ left10:14
Actualeyes left10:24
kurahaupo left11:03
kurahaupo joined11:04
p6bannerbot set mode: +v11:04
nige o/11:05
yoleaux 00:00Z <Zoffix> nige: I recall you offering trademark smoketest? This is the current list of proposals I got: https://gist.github.com/zoffixznet/f18842f7c7e051b8c2fcdc265e40bd15 No pressure if you can't/don't wanna smoketest anything.11:05
00:06Z <Zoffix> nige: never mind. Turns out we won't need any polls11:05
nige that's great news - always hoped TimToady would come up with a cultural hack ;-)11:05
zakharyas left11:06
nige TimToady, I'd be happy to help with trade mark smoke testing - it that's useful11:06
s/it/if/11:06
Bucciarati left11:08
Bucciarati joined11:08
p6bannerbot set mode: +v11:09
Altreus How do I stop a race condition when a promise sets data? I have methods on objects that return promises because the first time it's run it fetches the data, but it seems to me that if I run it twice I have a race condition so whichever promise completes last gets to set the data in perpetuity (since once it's set, the promise just resolves immediately)11:10
rbt_ left11:10
rbt_ joined11:10
Altreus This is a problem because if I receive an event through another channel that patches the data, I'm going to go and fetch the data, and then patch it - but if someone else happens to fetch the data and trigger the race condition, my patch will be lost11:11
p6bannerbot set mode: +v11:11
Altreus I feel like the method should always return the same promise if there's an extant promise11:13
is there a way of doing that built into promises?11:13
or indeed p611:13
timotimo Altreus: you'll probably have to create the promise at object creation, or have one lock per instance to guard against creating promises more than once11:15
Ven` left11:15
Altreus That's true - I don't actually need a property to hold the fetched data, but I could use a property to hold the promise for it11:16
And I can clear the property when the promise is kept11:17
jnthn Yeah, holding a Promise instead is how I typically do such things11:17
Well, I always keep the promise around anyway11:17
And always ask for the data via it11:17
It's cheap to ask for data form an already kept promise (doesn't even need to do a lock acquisition)11:17
Altreus So I could create it once and just always return it11:18
jnthn Yes11:19
timotimo hm, you may have to create two promises, so that you only run the code to generate the value once, since a promise doesn't have an extra state for that11:19
jnthn Yeah, if you want to be lazy about triggering it11:20
Altreus Not sure I follow that, sorry11:20
lizmat left11:20
Altreus Do you mean if I ask for the value again it will re-run it? :x11:20
jnthn No11:21
timotimo's point was that if you do something like `has $!promise = start { ...blah work... };` then it will start the work at object construction time11:21
Not on first request11:21
Altreus If I call the method twice in quick succession and therefore await the same incomplete promise, will it run twice?11:22
jnthn No11:22
Altreus that's magic11:22
timotimo you can have a promise that the work immediately awaits11:22
if you have "use 6.d.PREVIEW" it won't tie up a thread11:22
jnthn lunch &11:22
Altreus the promise I'm creating is awaiting a promise from Cro anyway11:23
ah, no, now I have another question - how do I mutate this value? :)11:26
The User object must promise its list of guilds, but the websocket can tell me that the user has joined a guild. Rather than dirtying that list, it would be better simply to add the new guild to the list11:27
eh that's an optimisation for the future11:28
lunch &11:34
sena_kun joined11:35
p6bannerbot set mode: +v11:35
jameslenz joined11:40
Ven` joined11:40
p6bannerbot set mode: +v11:41
p6bannerbot set mode: +v11:41
AlexDaniel kensanata: stream what? :) https://screenshots.firefox.com/qCg2hhg49OpKSWg5/null11:44
yoleaux 09:17Z <lizmat> AlexDaniel: I think I've logged all of my changes11:44
AlexDaniel .tell lizmat Awesome!! Thank you!11:44
yoleaux AlexDaniel: I'll pass your message to lizmat.11:44
jameslenz left11:45
kurahaupoIHateNickMutatio11:59
eiro hello people12:00
i remember someone started to write a configuration manager or something like that in perl6. i'm searching for a project that has .name ~~ /do$/12:01
any idea ?12:01
leont sparrowdo?12:01
IHateNickMutatiokurahaupo12:04
eiro leont, that's it! thanks12:07
random_yanek left12:30
random_yanek joined12:31
random_yanek left12:31
zakharyas joined12:32
p6bannerbot set mode: +v12:33
Geth ¦ doc: MorayJ++ created pull request #2390: Supply fix 12:40
¦ doc: review: https://github.com/perl6/doc/pull/239012:40
zakharyas left12:47
random_yanek joined12:49
random_yanek left12:49
zakharyas joined12:49
p6bannerbot set mode: +v12:49
leont left12:55
Geth ¦ doc/modules-pod-fix: 5 commits pushed by MorayJ++13:12
¦ doc/modules-pod-fix: ce68a6d53d | Clarifies done and quit callbacks on taps 13:12
¦ doc/modules-pod-fix: 7bbf18f2d5 | Clarifies why all suppliers being done triggers done 13:12
¦ doc/modules-pod-fix: b602d3c9a2 | Merge branch 'master' of https://github.com/perl6/doc into supply-fix 13:12
¦ doc/modules-pod-fix: bfa76195f4 | Adds return markers 13:12
¦ doc/modules-pod-fix: 88381ad449 | Fix syntax error on modules.pod6 13:12
¦ doc/modules-pod-fix: review: https://github.com/perl6/doc/compare/ce68a6d53d4d^...88381ad4491613:12
random_yanek joined13:15
pmurias joined13:15
p6bannerbot set mode: +v13:15
p6bannerbot set mode: +v13:16
tyil eiro: if you're looking to get started with sparrowdo, I wrote a blog post a while ago, it should still work as described in there https://www.tyil.nl/post/2018/05/07/sparrowdo-getting-started/13:17
Geth ¦ doc: MorayJ++ created pull request #2391: Remove extra =end item 13:22
¦ doc: review: https://github.com/perl6/doc/pull/239113:22
AlexDaniel left13:28
AlexDaniel joined13:28
lichtkind joined13:29
p6bannerbot set mode: +v13:29
p6bannerbot set mode: +v13:29
jameslenz joined13:41
p6bannerbot set mode: +v13:42
jameslenz left13:46
pmurias left13:50
pmurias joined13:52
p6bannerbot set mode: +v13:52
telex left13:55
telex joined13:56
p6bannerbot set mode: +v13:57
SmokeMachine jnthn: I trying to fix the issue about the role stub do not checking the attribute handles... I made the RoleToClassApplier.apply return a list of not yet implemented stubs and on ClassHOW.compose I get it and test it again after the attribute composition and die if its not implemented yet... does that make sense? Im not sure if make apply return a list of stubs is a good idea...14:01
Zoffix joined14:03
p6bannerbot set mode: +v14:03
jnthn SmokeMachine: We'll need to do something like that I guess. It's kinda icky from an API perspective, is all14:03
Zoffix R#234514:03
synopsebot R#2345 [open] : https://github.com/rakudo/rakudo/issues/2345 [regression][⚠ blocker ⚠] Post-2018.09 module install failures 14:03
Zoffix err14:03
Zoffix left14:03
jnthn Ah, right :)14:03
SmokeMachine jnthn: ok, thanks! :)14:05
pmurias left14:07
Geth ¦ doc: bab4347c74 | MorayJ++ | doc/Language/modules.pod614:09
¦ doc: Remove extra =end item 14:09
¦ doc: review: https://github.com/perl6/doc/commit/bab4347c7414:09
¦ doc: 1c00ac5f1f | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/modules.pod614:09
¦ doc: Merge pull request #2391 from MorayJ/modules-pod-fix 14:09
synopsebot Link: https://doc.perl6.org/language/modules14:09
Geth ¦ doc:14:09
¦ doc: Remove extra =end item14:09
¦ doc: review: https://github.com/perl6/doc/commit/1c00ac5f1f14:09
pmurias joined14:16
p6bannerbot set mode: +v14:16
kurahaupo left14:21
kurahaupo joined14:21
kurahaupo left14:22
kurahaupo joined14:23
p6bannerbot set mode: +v14:23
molaf joined14:35
p6bannerbot set mode: +v14:35
Geth ¦ doc/master: 6 commits pushed by MorayJ++14:39
¦ doc/master: ce68a6d53d | Clarifies done and quit callbacks on taps 14:39
¦ doc/master: 7bbf18f2d5 | Clarifies why all suppliers being done triggers done 14:39
¦ doc/master: b602d3c9a2 | Merge branch 'master' of https://github.com/perl6/doc into supply-fix 14:39
¦ doc/master: bfa76195f4 | Adds return markers 14:39
¦ doc/master: 2b5d57d14f | Merge branch 'master' of https://github.com/perl6/doc into supply-fix 14:39
¦ doc/master: df915216eb | Merge pull request #2390 from MorayJ/supply-fix 14:39
pmurias left14:39
Geth ¦ doc/master: review: https://github.com/perl6/doc/compare/1c00ac5f1fb9...df915216ebfa14:39
irco left14:49
pmurias joined14:54
p6bannerbot set mode: +v14:54
eiro tyil, well ... maybe i'll try it in few days. thanks for sharing14:54
pmurias left14:54
pmurias joined14:59
p6bannerbot set mode: +v14:59
pmurias left15:01
SmokeMachine how can I create a hash from nqp?15:02
rbt_ left15:03
gregf_ left15:04
jnthn An NQP-level hash? The literal is nqp::hash('key', $value)15:06
pmurias joined15:06
p6bannerbot set mode: +v15:06
jnthn Or just `my %h := nqp::hash(); %h<foo> := $value` etc.15:06
SmokeMachine jnthn: thanks15:06
nqp::hash('key1', $value1, 'key2', $value2)?15:07
jnthn Yes15:09
sno left15:09
SmokeMachine thanks!15:09
troys joined15:10
p6bannerbot set mode: +v15:11
fake_space_whale joined15:12
p6bannerbot set mode: +v15:13
SmokeMachine \o/ https://www.irccloud.com/pastebin/VK6OimoN/15:15
now i need to make that for multi methods15:16
timotimo m: my int $foo = 1; my int $bar = 2; for ^100_000 -> int $_ { $foo++ if $_ %% $bar }; say now - ENTER now15:18
camelia rakudo-moar 49bb6cf41: OUTPUT: «0.01979857␤»15:18
timotimo m: my int $foo = 1; my int $bar = 2; for ^1_000_000 -> int $_ { $foo++ if $_ %% $bar }; say now - ENTER now15:18
camelia rakudo-moar 49bb6cf41: OUTPUT: «0.2545966␤»15:18
timotimo m: my int $foo = 1; my int $bar = 2; for ^5_000_000 -> int $_ { $foo++ if $_ %% $bar }; say now - ENTER now15:18
camelia rakudo-moar 49bb6cf41: OUTPUT: «0.774169333␤»15:18
timotimo c: 2018.09 my int $foo = 1; my int $bar = 2; for ^5_000_000 -> int $_ { $foo++ if $_ %% $bar }; say now - ENTER now15:18
committable6 timotimo, ¦2018.09: «2.1200323␤»15:18
timotimo c: HEAD my int $foo = 1; my int $bar = 2; for ^5_000_000 -> int $_ { $foo++ if $_ %% $bar }; say now - ENTER now15:18
committable6 timotimo, ¦HEAD(7d7aaf0): «0.67359971␤»15:18
buggable New CPAN upload: Sparrowdo-VSTS-YAML-Cordova-0.0.17.tar.gz by MELEZHIK http://modules.perl6.org/dist/Sparrowdo::VSTS::YAML::Cordova:cpan:MELEZHIK15:20
domidumont left15:22
b2gills left15:27
SmokeMachine is there a way to handles create a multi method?15:33
Altreus sparrowdo is surely a pun on something15:33
SmokeMachine m: say class :: { has Int $.a handles <is-prime> }.^lookup("is-prime")15:34
camelia rakudo-moar 7d7aaf0c1: OUTPUT: «is-prime␤»15:34
SmokeMachine m: say class :: { has Int $.a handles <is-prime> }.^lookup("is-prime").multi15:35
camelia rakudo-moar 7d7aaf0c1: OUTPUT: «False␤»15:35
SmokeMachine jnthn: should that change be made only for only stubs?15:36
jnthn SmokeMachine: Which change?15:37
SmokeMachine to "recheck" if the stub was implemented after the attribute composition15:38
jnthn SmokeMachine: Ah, yes15:38
What else would it apply to?15:38
SmokeMachine to multi stubs?15:39
but I don't know if it's possible to a `handles` create a multi method...15:39
jnthn Oh, I see. But no, I don't think it's possible for that to happen.15:39
SmokeMachine ok! so I think it's working!!! :) running the spec tests...15:40
b2gills joined15:41
p6bannerbot set mode: +v15:41
jameslenz joined15:42
p6bannerbot set mode: +v15:43
leont joined15:44
p6bannerbot set mode: +v15:45
SmokeMachine what's the envvar to make spec test run in parallel?15:46
jameslenz left15:46
b2gills left15:47
moritz TEST_JOBS=415:47
Geth ¦ doc: a9df6b550f | (İsmail Arılık)++ (committed using GitHub Web editor) | doc/Language/classtut.pod615:47
¦ doc: Add missing method call to first introspection example 15:47
¦ doc: review: https://github.com/perl6/doc/commit/a9df6b550f15:47
synopsebot Link: https://doc.perl6.org/language/classtut15:47
vrurg left15:48
SmokeMachine moritz: thanks!15:48
ExtraCrispy joined15:49
p6bannerbot set mode: +v15:49
SmokeMachine a lot of dubious tests... :(15:50
b2gills joined15:52
sno joined15:52
p6bannerbot set mode: +v15:52
p6bannerbot set mode: +v15:52
Zoffix joined16:01
p6bannerbot set mode: +v16:01
Zoffix SmokeMachine: by default, spectest already runs in parallel, defaulting to 6 jobs16:01
(unless you ask it to use P6 harness, which still uses 1 job)16:01
SmokeMachine Zoffix: thanks!16:06
robertle left16:07
Geth ¦ whateverable: d3230c935b | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Whateverable/Running.pm616:08
¦ whateverable: Add :wipe named parameter in run-smth 16:08
¦ whateverable:16:08
¦ whateverable: As well as another helper method to avoid run-smth altogether. This16:08
¦ whateverable: allows heavy parallelization of things that need to use the same16:08
¦ whateverable: build at the same time. Quotable, Benchable and Project Blin can16:08
¦ whateverable: benefit from that. Note that if you use that you'll have to remove16:08
sno left16:08
Geth ¦ whateverable: unpacked builds yourself (the location of them is returned by16:08
¦ whateverable: run-smth-build-path).16:09
¦ whateverable: review: https://github.com/perl6/whateverable/commit/d3230c935b16:09
scimon left16:17
raynold_ joined16:23
p6bannerbot set mode: +v16:23
raynold_ left16:23
Ven` left16:25
pmurias left16:28
tobs` left16:30
pmurias joined16:33
p6bannerbot set mode: +v16:33
vrurg joined16:34
p6bannerbot set mode: +v16:35
SmokeMachine there are 3 test files with error for me... but it doesn't look anything to do with my change... :(16:35
Zoffix SmokeMachine: what are they?16:38
SmokeMachine Zoffix: t/spec/MISC/bug-coverage.t, t/spec/S17-supply/watch-path.t and t/spec/S32-str/utf8-c8.t16:39
Zoffix SmokeMachine: the t/spec/MISC/bug-coverage.t one is likely you're missing latest commit in rakudo. What's the output of: t/fudgeandrun t/spec/S17-supply/watch-path.t t/spec/S32-str/utf8-c8.t16:40
SmokeMachine Zoffix: and t/spec/S11-modules/nested.t broke on spec test but I run it by hand and that worked...16:40
Zoffix That one flops16:40
SmokeMachine Zoffix https://www.irccloud.com/pastebin/vgL2Nr2z/16:42
I diânt copy the last one, sorry...16:42
s/diânt/didn't/16:43
https://www.irccloud.com/pastebin/h0SMLPr8/16:43
Zoffix: even with the last commits, t/spec/MISC/bug-coverage.t is broken...16:45
https://www.irccloud.com/pastebin/3z45n9DD/16:46
Zoffix SmokeMachine: no, you don't have the last commit. Or you didn't rebuild your rakudo correctly (it was a MoarVM bump)16:47
SmokeMachine write! I got the commit but didn't make... sorry!16:47
s/write/right/16:47
Zoffix SmokeMachine: no idea about the other ones.16:48
My stresstest is clean.16:48
dakkar left16:48
SmokeMachine :(16:49
Zoffix left16:51
domidumont joined16:55
p6bannerbot set mode: +v16:55
molaf left16:56
SmokeMachine when I stash my changes it gives the same errors...17:00
zakharyas left17:02
zakharyas joined17:03
p6bannerbot set mode: +v17:04
robertle joined17:14
p6bannerbot set mode: +v17:15
noganex_ left17:15
noganex joined17:16
p6bannerbot set mode: +v17:17
Sauvin left17:18
kensanata left17:21
SmokeMachine I think the error was a wrong version of MoarVM or nqp...17:22
tony-o hmm17:28
xinming for a list, How do we take several items as group and iterating over these groups?17:33
for example, for 1 .. Inf { } <--- For this list, we group 500 numbers as a group and process them.17:33
tony-o is this a bug in nqp, nqp::p6bindattrinvres not finding the attribute that was added or should i be using some other mechanism ? https://gist.github.com/tony-o/c7e08d5bed8077616430a55177e5fcf817:33
Geth ¦ doc: d7f8c617f8 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Any.pod617:35
¦ doc: Mark .toggle as experimental as it's not making 6.d 17:35
¦ doc:17:35
¦ doc: https://github.com/rakudo/rakudo/issues/208917:35
¦ doc: review: https://github.com/perl6/doc/commit/d7f8c617f817:35
synopsebot Link: https://doc.perl6.org/type/Any17:35
xinming m: for (1 .. Inf).head(5) -> @a { @a.perl.say; }17:36
camelia rakudo-moar b50aa51e0: OUTPUT: «Type check failed in binding to parameter '@a'; expected Positional but got Int (1)␤ in block <unit> at <tmp> line 1␤␤»17:36
xinming m: for (1 .. Inf).head(5) -> *@a { @a.perl.say; }17:38
camelia rakudo-moar b50aa51e0: OUTPUT: «[1]␤[2]␤[3]␤[4]␤[5]␤»17:38
zakharyas left17:39
tobs xinming: List.rotor is what you're looking for17:39
xinming Thanks17:39
tobs m: for (^1000).rotor(200) -> *@a { say sum @a }17:40
camelia rakudo-moar b50aa51e0: OUTPUT: «19900␤59900␤99900␤139900␤179900␤»17:40
tobs actually, you can drop the * in *@a17:41
m: for (^12).rotor(3) -> @a { say @a }17:41
camelia rakudo-moar b50aa51e0: OUTPUT: «(0 1 2)␤(3 4 5)␤(6 7 8)␤(9 10 11)␤»17:41
jameslenz joined17:43
SmokeMachine I cloned rakudo again, and now only 2 test files break...17:43
p6bannerbot set mode: +v17:44
jameslenz left17:48
pmurias tony-o: what is $new-model?17:48
aa joined17:50
p6bannerbot set mode: +v17:50
pmurias tony-o: with nqp::p6bindattrinvres you are trying to get the private attribute @!columns that's declared *in* Array17:50
aaGuest5417717:50
Guest54177 left17:50
pmurias like class Array {has @!columns}; class Foo is Array {}; nqp::p6bindattinvres(Foo.new, Array, '@!columns', @columns)17:51
vrurg left17:51
AlexDaniel left17:54
AlexDaniel joined17:55
p6bannerbot set mode: +v17:55
Zoffix joined18:03
p6bannerbot set mode: +v18:03
Zoffix xinming: note that rotor will by default throw away remaining elements if they don't make an exact batch. There's also .batch method18:04
tony-o: RE "should i be using some other mechanism"... FWIW nqp is not user-supported. You should not be using it at all.18:04
xinming Zoffix: Ok, Thanks. Will use batch method. :-)\18:09
kent\n left18:11
SmokeMachine I don't know what to do... master is breaking on my machine... but I'd like to PR this commit (https://github.com/FCO/rakudo/commit/fd5d5bdfb97930cfae1f9b2572d2ab6eea7ca92f) but its breaking the same tests that it breaks on master on my machine...18:13
AlexDaniel treegrep: release/01-basic.t18:14
greppable6 AlexDaniel, https://gist.github.com/30c64fa23afcbba179dfeff13cc9ea5218:14
ryn1x joined18:14
kent\n joined18:14
p6bannerbot set mode: +v18:14
AlexDaniel treegrep: ‘release/01-basic.t’18:14
greppable6 AlexDaniel, https://gist.github.com/cc92b416cd0cc9315764031ba4cb9ea718:14
p6bannerbot set mode: +v18:15
Zoffix SmokeMachine: if the tests are broken even without your commit, I think it's fairly safe to PR.18:15
SmokeMachine Zoffix: ok, Ill do that... (and we'll see if jenkis finds the same errors)18:16
Zoffix .oO( who's Jenkins )18:18
travis doesn't run roast18:18
ryn1x left18:19
ryn1x_ joined18:19
SmokeMachine sorry, travis18:19
holyghost left18:19
SmokeMachine :(18:19
https://github.com/rakudo/rakudo/pull/239018:19
p6bannerbot set mode: +v18:19
holyghost joined18:19
p6bannerbot set mode: +v18:20
Geth ¦ ecosystem: c0d4254580 | tony-o++ (committed using GitHub Web editor) | META.list18:23
¦ ecosystem: Change name of database ORM to Xoo so we're not vulgar in arabic 18:23
¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/c0d425458018:23
tony-o @pmurias that seemed to work prior about a month ago, $new-model is anonymous class in this instance class :: { }18:24
the way i originally tried seems to work now, though with finding the attribute and calling .set_value18:25
pmurias++18:25
Zoffix: that isn't really helpful18:25
Zoffix tony-o: I'm just stating facts.18:25
noganex_ joined18:26
sno joined18:27
pmurias tony-o: what are you writing?18:27
Zoffix Especially extops. They are going away.18:27
p6bannerbot set mode: +v18:27
p6bannerbot set mode: +v18:27
tony-o pmurias: it's composing anonymous ORM classes from YAML so you can define your model classes in plain-ish text18:27
Zoffix So it is helpful, because when they're removed without any notice because there's no user support for NQP your code will break.18:28
Zoffix left18:28
pmurias tony-o: you should avoid using nqp:: stuff in modules18:28
tony-o Zoffix: you're welcome to your opinion but it didn't help get any closer to solution, it didn't do any harm, either - which isn't the same as being helpful18:29
xinming m: perl6 -e 'for (1 .. 10) -> $i { my $t = $i; FIRST { $t = 0; }; $t.say; }'18:29
camelia rakudo-moar b50aa51e0: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> perl6 -e 'for (1 .. 10) -> $i { my $t = $i; FIRS ␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement…»18:29
xinming m: for (1 .. 10) -> $i { my $t = $i; FIRST { $t = 0; }; $t.say; }18:29
camelia rakudo-moar b50aa51e0: OUTPUT: «1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»18:29
tony-o pmurias: composing an ORM model class from YAML that looks like this https://github.com/tony-o/perl6-xoo/blob/master/t/models/customer.yaml18:30
xinming Why will this exmample, the $t won't be initialized to 0?18:30
noganex left18:30
xinming m: for (1 .. 3) -> $i { my $t = $i; FIRST { $t = 0; }; $t.say; }18:30
camelia rakudo-moar b50aa51e0: OUTPUT: «1␤2␤3␤»18:30
tony-o m: for (1 .. 10) -> $i { my $t = $i; FIRST { 't=0'.say; $t = 0; }; $t.say; }18:31
camelia rakudo-moar b50aa51e0: OUTPUT: «t=0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»18:31
tony-o t is assigned in FIRST prior to `my $t = $i;` is executed18:31
xinming hmm, what is the right way to do this if I want to init the $t to 0 for the first loop?18:32
pmurias tony-o: Zoffix is right in that the nqp:: ops are just exposed rakudo internals and the rakudo devs can change/remove them without prior notice18:32
lichtkind left18:32
sno left18:33
tony-o m: for (0 .. 10) -> $i { my $t = $i; $t.say; }18:33
camelia rakudo-moar 3c0b01bc5: OUTPUT: «0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»18:33
tony-o no argument there pmurias18:33
xinming tony-o: i mean the use of FIRST18:34
ryn1x_ left18:34
tony-o xinming: do you want 0,2,3,4,5 ?18:34
ryn1x_ joined18:34
xinming m: my $t; for (1 .. 10) -> $i { $t = $i; FIRST { $t = 0 }; $t.say; }18:34
camelia rakudo-moar 3c0b01bc5: OUTPUT: «1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»18:34
xinming tony-o: I don't.18:34
but I think I understand the logic now.18:35
I can't do it with FIRST18:35
p6bannerbot set mode: +v18:35
domidumont left18:35
xinming I'm thinking wether there is a phaser which will be run in order for the FIRST loop.18:35
tony-o m: for (1 .. 10) -> $i { $t.say; qw<do stuff here with t=0>; my $t = $i; FIRST { $t = 0; }; qw<now do stuff with $t=1>; $t.say; }18:35
camelia rakudo-moar 3c0b01bc5: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Variable '$t' is not declared␤at <tmp>:1␤------> for (1 .. 10) -> $i { $t.say; qw<do stuff here with t=0>; my $ ␤»18:35
tony-o m: for (1 .. 10) -> $i { my $t; $t.say; qw<do stuff here with t=0>; my $t = $i; FIRST { $t = 0; }; qw<now do stuff with $t=1>; $t.say; }18:35
camelia rakudo-moar 3c0b01bc5: OUTPUT: «Potential difficulties:␤ Redeclaration of symbol '$t'␤ at <tmp>:1␤ ------> t.say; qw<do stuff here with t=0>; my $t = $i; FIRST { $t = 0; }; qw<now do stuf ␤0␤1␤(Any)␤2␤(Any)␤3␤(Any)␤4␤(Any)␤5␤(Any)␤6␤…»18:35
tony-o m: for (1 .. 10) -> $i { my $t; $t.say; qw<do stuff here with t=0>; $t = $i; FIRST { $t = 0; }; qw<now do stuff with $t=1>; $t.say; }18:35
camelia rakudo-moar 3c0b01bc5: OUTPUT: «0␤1␤(Any)␤2␤(Any)␤3␤(Any)␤4␤(Any)␤5␤(Any)␤6␤(Any)␤7␤(Any)␤8␤(Any)␤9␤(Any)␤10␤»18:35
tony-o gah18:36
xinming m: my $t; for (1 .. 10) -> $i { $t.say; $t = $i; FIRST { $t = 0; }; $t.say; }18:37
camelia rakudo-moar 3c0b01bc5: OUTPUT: «0␤1␤1␤2␤2␤3␤3␤4␤4␤5␤5␤6␤6␤7␤7␤8␤8␤9␤9␤10␤»18:37
bdmatatu joined18:48
p6bannerbot set mode: +v18:48
zakharyas joined19:04
p6bannerbot set mode: +v19:04
bdmatatu left19:07
Zoffix joined19:09
p6bannerbot set mode: +v19:09
Zoffix xinming: the position of the phaser in code pretty much doesn't matter (it only affects implicit return value of the block). You could use `once` statement for your thing19:10
m: my $t; for (1 .. 10) -> $i { $t = $i; once $t = 0; $t.say; }19:10
camelia rakudo-moar 3c0b01bc5: OUTPUT: «0␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»19:10
Zoffix left19:11
sno joined19:18
p6bannerbot set mode: +v19:19
grumble left19:23
grumble joined19:26
p6bannerbot set mode: +v19:26
ryn1x_ left19:32
ExtraCrispy left19:43
ExtraCrispy joined19:43
p6bannerbot set mode: +v19:43
jameslenz joined19:44
p6bannerbot set mode: +v19:44
ExtraCrispy left19:46
jameslenz left19:48
irco joined19:55
p6bannerbot set mode: +v19:56
xinming ZofBot: Thanks, that's what I want. :-)19:59
ufobat_ left20:03
zakharyas left20:14
xinming Will 'take' do "return" for the block?20:23
or, I need another return after 'take'20:23
AlexDaniel xinming: no, take does not return20:25
why do you want to return?20:25
xinming I try to rewrite a recursive function to use gather and take20:26
AlexDaniel xinming: well, it depends, but it can be recursive *and* use take at the same time20:28
xinming Yes, So, still thinking on how to make it work20:28
AlexDaniel related doc ticket: https://github.com/perl6/doc/issues/238820:28
m: sub foo { take 42; foo }; my $x = gather foo; for @$x { .say; last if $++ > 10 }20:28
camelia rakudo-moar 3c0b01bc5: OUTPUT: «42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤»20:28
AlexDaniel here it does infinite recursion but that's not a problem (well, unless you go very deep because then things start to slow down)20:29
xinming Thanks.20:29
will try20:30
pmurias left20:31
AlexDaniel xinming: fwiw you can also write `return take 42` if you need that20:32
maybe I'll be able to tell more if you can show some code :)20:32
sno left20:37
xinming AlexDaniel: http://termbin.com/hnvw20:37
AlexDaniel: This is the recursive function I'm trying to write. going to use lazy list features in perl620:37
I wrote it yesterday, Still need time to figure how lazy lists can be handled like this.20:38
leont left20:40
xinming It's just a recursive function which when we meet the array/list, We "duplicate" config20:41
Since if the config is large, It'll take a while to do that20:41
AlexDaniel xinming: what's the expected result?20:42
sftp left20:44
sftp joined20:44
p6bannerbot set mode: +v20:44
xinming for example, { :a<a>, :b(1,2,3,4,5) } It'll inflate to { :a<a>, :b(1) }, { :a<a>, :b(2) }, { :a<c>, :b(3) } ....20:44
AlexDaniel: Something like this20:44
sena_kun left20:45
sena_kun joined20:46
sena_kun left20:46
AlexDaniel xinming: it's pretty cool :)20:53
SmokeMachine xinming: something like this? https://www.irccloud.com/pastebin/OReK55oH/20:54
hum! hashes! sorry20:54
Xliff m: my @a = <A B C a b c>; say @a.first(* eq 'a', :k)20:55
camelia rakudo-moar 3c0b01bc5: OUTPUT: «3␤»20:55
Xliff m: my @a = <A B C a b c>; say @a.first(* eq 'a', :k)20:55
camelia rakudo-moar 3c0b01bc5: OUTPUT: «3␤»20:55
Xliff m: my @a = <A B C a b c>; say @a.first(* eq 'B', :k)20:55
camelia rakudo-moar 3c0b01bc5: OUTPUT: «1␤»20:55
Xliff m: my @a = <A B C a b c>; say @a.first(* eq 'Z', :k)20:55
camelia rakudo-moar 3c0b01bc5: OUTPUT: «Nil␤»20:55
xinming SmokeMachine: It'll try to inflate to hashes.20:56
My code does work. It's just don't do gather/take.20:56
It's pure old school way to write something like that.20:56
AlexDaniel yeah20:56
SmokeMachine sorry, I had it understood wrong20:57
AlexDaniel (yeah to “it does work”)20:57
xinming If a array is a lazy list, Is it ok to do something like @lazy_list == 1 ?20:58
to test the lenth.20:58
moritz if you do, it reifies the list20:58
AlexDaniel I don't think you can even .elems a lazy list21:00
ehhh well… it depends21:00
moritz m: my @a := gather { take $_ for ^200 }; say @a.lazy; say @a.elems21:00
camelia rakudo-moar 3c0b01bc5: OUTPUT: «Type check failed in binding; expected Positional but got Seq ($((0, 1, 2, 3, 4, 5, ...)␤ in block <unit> at <tmp> line 1␤␤»21:00
moritz m: my @a = gather { take $_ for ^200 }; say @a.lazy; say @a.elems21:00
camelia rakudo-moar 3c0b01bc5: OUTPUT: «(...)␤200␤»21:00
moritz m: my @a = gather { take $_ for ^200 }; say @a.is-lazy; say @a.elems21:00
camelia rakudo-moar 3c0b01bc5: OUTPUT: «False␤200␤»21:01
moritz m: my @a = ^Inf; say @a.is-lazy; say @a.elems21:01
camelia rakudo-moar 3c0b01bc5: OUTPUT: «True␤Cannot .elems a lazy list␤ in block <unit> at <tmp> line 1␤␤»21:01
xinming gather for sub-containers-take -> $item { take $item }21:02
for gather sub-containers-take -> $item { take $item }21:02
Are these 2 the same?21:02
For now, I'm using the latter one21:02
SmokeMachine m: my @a = lazy gather { take $_ for ^200 }; say @a.is-lazy; say @a.elems21:03
camelia rakudo-moar 3c0b01bc5: OUTPUT: «True␤Cannot .elems a lazy list␤ in block <unit> at <tmp> line 1␤␤»21:03
AlexDaniel xinming: I'm not even sure what the second one does, the first one is like gather { for sub-containers-take -> $item { take $item } }, I think21:04
xinming AlexDaniel: Thanks for the clarification.21:05
then first one is what I want.21:05
buggable New CPAN upload: Sparrowdo-0.0.41.tar.gz by MELEZHIK http://modules.perl6.org/dist/Sparrowdo:cpan:MELEZHIK21:10
xinming AlexDaniel: The for gather sub-containers-take { take blabla } does something required in some case21:11
Xliff \o21:15
Anyone have any ideas on the best way to cut this code down to size?21:16
https://github.com/Xliff/p6-GtkPlus/blob/master/lib/GTK/Roles/Signals/Widget.pm621:16
AlexDaniel xinming: heh I look at the code and don't quite follow it… also a bit busy with something else. I guess I can't help21:17
xinming AlexDaniel: Thanks for your time anyway. I'm almost there.21:17
AlexDaniel xinming: but from when you call that sub it should be like my @res = gather inflate-config(%config);21:18
xinming: so basically the question is how to get the topmost call to `take` instead of `return`, I think… but I'm not sure21:18
xinming Now trying to make lazy list work.21:18
I have a version which is already working.21:19
I'm trying to make it lazy list.21:19
http://termbin.com/9ymk21:19
But with some bug21:21
@res.push: |(gather inflate-config(%cloned)); <--- What is the right way to merge multiple gather list please?21:26
the @res will also doing something like take $_ for @res;21:26
This is the most tricky part I met in this problem21:27
sftp left21:28
sftp joined21:34
p6bannerbot set mode: +v21:34
xinming for gather inflate-config(%cloned) { take $_ }21:36
finally make everything set.21:36
Geth ¦ doc: 7b38d71a3f | Coke++ | 2 files21:37
¦ doc: whitespace 21:37
¦ doc: review: https://github.com/perl6/doc/commit/7b38d71a3f21:37
¦ doc: 97ad92f257 | Coke++ | doc/Language/classtut.pod621:37
¦ doc: Don't use WHAT 21:37
¦ doc:21:37
synopsebot Link: https://doc.perl6.org/language/classtut21:37
Geth ¦ doc: It's mentioned elsewhere in this file, but doesn't add anything21:37
¦ doc: in particular to this example which already has .^name21:37
¦ doc: review: https://github.com/perl6/doc/commit/97ad92f25721:37
jameslenz joined21:44
Geth ¦ doc: 168463f07c | Coke++ | doc/Language/modules.pod621:45
¦ doc: unindent paragraph (otherwise it's implicit code) 21:45
¦ doc: review: https://github.com/perl6/doc/commit/168463f07c21:45
¦ doc: ba42f5d7b2 | Coke++ | doc/Language/modules.pod621:45
¦ doc: Fix incorrect 'e.g.' 21:45
synopsebot Link: https://doc.perl6.org/language/modules21:45
Geth ¦ doc: review: https://github.com/perl6/doc/commit/ba42f5d7b221:45
p6bannerbot set mode: +v21:45
agentzh joined21:46
agentzh left21:46
agentzh joined21:46
p6bannerbot set mode: +v21:46
regreg__ left21:47
p6bannerbot set mode: +v21:47
Geth ¦ doc: 40416b382f | Coke++ | doc/Language/modules.pod621:48
¦ doc: whitespace 21:48
¦ doc:21:48
¦ doc: While both are valid POD6, this passes the finicky links test.21:48
¦ doc: review: https://github.com/perl6/doc/commit/40416b382f21:48
synopsebot Link: https://doc.perl6.org/language/modules21:48
jameslenz left21:49
xinming What is the best way to check an item is in an array?21:51
m: my @a = (1 .. 5); (@a ~~ 1).perl.say;21:51
camelia rakudo-moar 3c0b01bc5: OUTPUT: «Bool::False␤»21:51
xinming m: my @a = (1 .. 5); (1 ~~ @a).perl.say;21:51
camelia rakudo-moar 3c0b01bc5: OUTPUT: «Bool::False␤»21:51
xinming m: my @a = ('a' .. 'c'); ('a' ~~ @a).perl.say;21:52
camelia rakudo-moar 3c0b01bc5: OUTPUT: «Bool::False␤»21:52
xinming m: my @a = ('a' .. 'c'); (@a ~~ 'a').perl.say;21:52
camelia rakudo-moar 3c0b01bc5: OUTPUT: «Bool::False␤»21:52
Geth ¦ whateverable: 2909f0a932 | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Whateverable/Output.pm621:52
¦ whateverable: SIGKILL if it doesn't terminate by itself 21:52
¦ whateverable:21:52
¦ whateverable: I don't know if this is going to help much, but I'm seeing something21:52
¦ whateverable: and it might.21:52
¦ whateverable: review: https://github.com/perl6/whateverable/commit/2909f0a93221:52
xinming m: my @a = ('a' .. 'c'); @a.Set{'a'}.perl.say;21:53
camelia rakudo-moar 3c0b01bc5: OUTPUT: «Bool::True␤»21:53
george joined21:55
p6bannerbot set mode: +v21:55
hamhu3 joined22:01
p6bannerbot set mode: +v22:02
alpha left22:05
hamhu3 left22:07
vrurg joined22:12
p6bannerbot set mode: +v22:12
alpha joined22:14
p6bannerbot set mode: +v22:15
rindolf left22:17
AlexDaniel what's the difference between modules and distributions on CPAN?22:18
sno joined22:20
p6bannerbot set mode: +v22:21
pecastro left22:30
Voldenet left22:31
[Coke] xinming: grep?22:32
or, better: .first ?22:32
xinming [Coke]: .Set{'a'} is good enough.22:33
I just need .Set{'a'} in my case22:33
fake_space_whale left22:34
timotimo i'd personally go with (elem) for this22:35
hamhu3 joined22:41
hamhu3 left22:41
cognominal-p6 left23:02
Geth ¦ doc: 233cfa5657 | (Zoffix Znet)++ | doc/Type/Str.pod623:10
¦ doc: [v6.d REVIEW] Document :count on `lines` as deprecated 23:10
¦ doc: review: https://github.com/perl6/doc/commit/233cfa565723:10
synopsebot Link: https://doc.perl6.org/type/Str23:10
george left23:21
HaraldJoerg left23:26
SmokeMachine could someone take a look at https://github.com/rakudo/rakudo/pull/2390? I want to merge it, but Im not sure if its good enough...23:33
timotimo i wonder how jnthn would feel about changing the api of apply to accept an optional parameter that it would push the @stubs to if it was passed23:38
perhaps that's better than returning it23:38
SmokeMachine timotimo: i agree that would be better...23:43
jameslenz joined23:45
Voldenet joined23:46
Voldenet left23:46
Voldenet joined23:46
p6bannerbot set mode: +v23:46
p6bannerbot set mode: +v23:46
timotimo maybe, or maybe it's just fine the way it is already23:46
p6bannerbot set mode: +v23:47
jameslenz left23:50

Logs Search ←Prev date Next date→ Channels Documentation