»ö« 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.
Zoffix .tell nige I recall you offering trademark smoketest? This is the current list of proposals I got: gist.github.com/zoffixznet/f18842f...265e40bd15 No pressure if you can't/don't wanna smoketest anything. 00:00
yoleaux Zoffix: I'll pass your message to nige.
Zoffix Thank you robot, you're most kind.
.botsnack
yoleaux :D
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 meaningless 00:04
Zoffix \o/ 00:05
TimToady: awesome.
TimToady: no nudging, Nov 1 is still good. I just wasn't sure if you were gonna respond at all
TimToady my wife will tell you I go way too quiet when I'm thinking :) 00:06
Zoffix OK, sorry :)
.tell nige never mind. Turns out we won't need any polls
yoleaux Zoffix: I'll pass your message to nige.
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 up 00:07
Zoffix holyghost: what do you mean "it's perl 6.c"? 00:08
holyghost the json section "perl" is "6.c"
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 ok
buggable New CPAN upload: Bayes-Learn-0.1.6.tar.gz by HOLYGHOST cpan.metacpan.org/authors/id/H/HO/...1.6.tar.gz 00:10
New CPAN upload: Game-Markov-0.1.4.tar.gz by HOLYGHOST cpan.metacpan.org/authors/id/H/HO/...1.4.tar.gz
Zoffix holyghost: what did you fix? It still has an error? The bayes learn one 00:12
Missing quotes -> "depends" : [ Mathx::Stat ],
And same error still exists in the other one
holyghost Zoffix: fixed and uploaded, thanks 00:17
eco: Mathx::Stat
buggable holyghost, Mathx::Stat 'Statistics package unto Correlation Dimension.': modules.perl6.org/dist/Mathx::Stat:...:HOLYGHOST
Zoffix \o/
holyghost coolness 00:18
my code has been mirrored :-)
Zoffix :)
holyghost (__) 00:22
oo )
|_/\
moooh!
00:24 itaipu left
buggable New CPAN upload: Bayes-Learn-0.1.7.tar.gz by HOLYGHOST cpan.metacpan.org/authors/id/H/HO/...1.7.tar.gz 00:30
New CPAN upload: Game-Markov-0.1.5.tar.gz by HOLYGHOST cpan.metacpan.org/authors/id/H/HO/...1.5.tar.gz
holyghost eco: Bayes::Learn 00:34
buggable holyghost, Nothing found
Zoffix up to ~1hr 00:35
Loading META file from dists-from-CPAN/id/H/HO/HOLYGHOST/Perl6/AI-Markov-0.1.1.meta
[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.
holyghost it's Game::Markov not AI::Markov 00:36
Zoffix holyghost: but I'm saying AI::Markov is also broken.
You didn't re-upload that one
holyghost AI::Markov will disappear 00:37
I had to change the name
Zoffix ok
holyghost it's not even indexed so that should be ok
00:37 lizmat left
holyghost Eventually, I'll try to make a game myself and put it on CPAN 00:37
Geth modules.perl6.org: f917d34665 | (Zoffix Znet)++ (committed using GitHub Web editor) | use-me-for-commit-triggers
[NEWDB] Flush old CPAN dists

Due to github.com/perl6/modules.perl6.org/issues/97
00:38
Zoffix .tell samcv FYI: github.com/samcv/perl6-Git-Log/pull/1 00:41
yoleaux Zoffix: I'll pass your message to samcv.
00:45 mattp_ joined 00:46 p6bannerbot sets mode: +v mattp_
Geth modules.perl6.org: b5ee05aa0d | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/p30METAChecker.pm
Bail out from META checker if we ain't got distro sauce URL
00:47
00:49 lizmat joined, p6bannerbot sets mode: +v lizmat
Geth modules.perl6.org: 44db231bf3 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/Source/GitLab.pm
Fill dist sauce URL for GitLab dists
00:53
00:54 Zoffix left
holyghost eco: Bayes::Learn 01:02
buggable holyghost, Nothing found
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?
Err...
Will "&handler (num64 $returnable is rw)", actually.
timotimo i would expect that to work
if the syntax is right 01:09
Xliff Thanks.
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;
camelia ( no output )
timotimo needs a .new
Xliff m: use NativeCall; my $p = Pointer[num64].new; $p = 1000e0;
camelia ( no output )
Xliff m: use NativeCall; my $p = Pointer[num64].new; $p = 1000e0; say $p;
camelia 1000
Xliff m: use NativeCall; my $p = Pointer[num64].new; $p = 1000e0; say $p; say $p.^name
camelia 1000
Num
timotimo and i'd expect you'll have to bind 01:12
Xliff m: use NativeCall; my $p := Pointer[num64].new; $p = 1000e0; say $p; say $p.^name
camelia Cannot assign to an immutable value
in block <unit> at <tmp> line 1
Xliff ^^ That's what I was expecting.
m: use NativeCall; my $p := Pointer[num64].new; $p.deref = 1000e0; say $p; say $p.^name
camelia 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
Xliff m: use NativeCall; my $p = Pointer[num64].new; $p.deref = 1000e0; say $p; say $p.^name
camelia 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
Xliff m: use NativeCall; my $p = Pointer[num64].new; say $p;
camelia NativeCall::Types::Pointer[num64]<NULL>
timotimo m: use NativeCall; my $p = Pointer[num64].new; $p[0] = 1000e0; say $p.perl;
camelia (signal SEGV) 01:13
timotimo haha
Xliff LOL
timotimo m: use NativeCall; my $p = Pointer[num64].new(1000e0); $p[0] = 1000e0; say $p.perl;
camelia Default constructor for 'NativeCall::Types::Pointer[num64]' only takes named arguments
in block <unit> at <tmp> line 1
timotimo in that case you'll also have to create a CArray
or use malloc
Xliff m: use NativeCall; my $p = CArray[num64].new; $p[0] = 1000e0; say $p; say $p[0]
camelia NativeCall::Types::CArray[num64].new
1000
Xliff OK. That will work, for now. 01:14
01:18 kent\n joined, p6bannerbot sets mode: +v kent\n 01:21 Calibellus joined 01:22 p6bannerbot sets mode: +v Calibellus 01:25 Calibellus left, cognominal-p6 left, cognominal-p6 joined 01:26 p6bannerbot sets mode: +v cognominal-p6 01:27 Calibellus joined, jameslenz joined, p6bannerbot sets mode: +v Calibellus 01:28 p6bannerbot sets mode: +v jameslenz 01:29 jameslen_ joined, jameslenz left 01:30 p6bannerbot sets mode: +v jameslen_, vrurg joined, p6bannerbot sets mode: +v vrurg 01:37 Bucciarati left, avar left, avar joined, avar left, avar joined, p6bannerbot sets mode: +v avar, Bucciarati joined 01:38 p6bannerbot sets mode: +v avar, p6bannerbot sets mode: +v Bucciarati 01:39 mattp_ left, kurahaupo left 01:40 kurahaupo joined, jameslen_ left 01:41 p6bannerbot sets mode: +v kurahaupo 01:49 cognominal-p6 left 01:51 kurahaupo left 01:52 kurahaupo joined 01:53 p6bannerbot sets mode: +v kurahaupo 01:57 mattp_ joined 01:58 p6bannerbot sets mode: +v mattp_ 02:03 mattp_ left 02:18 ufobat_ joined 02:19 p6bannerbot sets mode: +v ufobat_ 02:22 ufobat___ left 02:32 finanalyst joined 02:33 p6bannerbot sets mode: +v finanalyst 02:40 kurahaupo left 02:43 kurahaupo joined, p6bannerbot sets mode: +v kurahaupo 02:52 rbt_ left 02:55 atweiden-air joined 02:56 p6bannerbot sets mode: +v atweiden-air 02:57 imcsk8 joined 02:58 p6bannerbot sets mode: +v imcsk8 03:26 rbt_ joined 03:27 p6bannerbot sets mode: +v rbt_ 03:29 Sgeo__ left 03:31 Sgeo joined 03:32 Calibellus left, p6bannerbot sets mode: +v Sgeo 03:35 finanalyst left 03:37 jameslenz joined 03:38 p6bannerbot sets mode: +v jameslenz 03:42 jameslenz left 03:57 Ven` joined, p6bannerbot sets mode: +v Ven` 04:01 Ven` left 04:05 Bucciarati left 04:07 Bucciarati joined, p6bannerbot sets mode: +v Bucciarati 04:08 AlexDaniel left 04:09 ravioli_ joined, p6bannerbot sets mode: +v ravioli_, AlexDaniel joined
ravioli_ hi guys I'd like to ask about perl6 oneliner here 04:09
p6: say 3
camelia 3
04:10 p6bannerbot sets mode: +v AlexDaniel
SmokeMachine Hi ravioli_ 04:12
ravioli_ hi SmokeMachine
04:13 fake_space_whale joined 04:14 p6bannerbot sets mode: +v fake_space_whale 04:15 kurahaupo left 04:16 kurahaupo joined, p6bannerbot sets mode: +v kurahaupo
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.pod6
Update modules.pod6

An extra clarification about how to use a resources file inside a module.
04:27
synopsebot Link: doc.perl6.org/language/modules
AlexDaniel m: my $x = "aaabbbccc"; $x ~~ s/(aaa)/$0h/; say $x 04:29
camelia aaahbbbccc
AlexDaniel ravioli_: you mean something like this? ↑
04:33 molaf joined 04:34 p6bannerbot sets mode: +v molaf
ravioli_ AlexDaniel: ah close! thanks I didn't know $0 before 04:37
04:39 atweiden-air left 04:45 cognominal-p6 joined 04:46 p6bannerbot sets mode: +v cognominal-p6 04:50 mniip_ is now known as mniip
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.txt 04:52
AlexDaniel ravioli_: what about S:g (with capital S)
ravioli_: ah sorry, that's not the issue 04:53
ravioli_ AlexDaniel: It makes no replacement at all
04:54 molaf left
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 () )
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/
ravioli_ AlexDaniel: I'm so sorry (again)
AlexDaniel ravioli_: no problem, I'm glad to help!
04:58 cognominal-p6 left, cognominal-p6 joined
AlexDaniel ravioli_: ah, I just remembered that you can also use just $/ if you want to get the whole thing 05:00
05:00 troys left
AlexDaniel ravioli_: so this works too: s:g/wawa.+?[[\"]**1]/$/h/ 05:00
05:00 p6bannerbot sets mode: +v cognominal-p6
AlexDaniel although it looks weird because of $/ :) 05:00
05:00 Sgeo_ joined
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 hard
05:00 p6bannerbot sets mode: +v Sgeo_
ravioli_ AlexDaniel: thanks for the additional tips 05:01
05:02 Sgeo left
AlexDaniel ravioli_: perl6 -pe 's:g| wawa.+? )> [\"]**1|$/h|' <<< "wawa29792479429283\"" 05:03
will produce this: wawa29792479429283h"
is that what you wanted?
I hope it is, because I have to get some sleep now 05:08
have a nice day!
05:09 cognominal-p6 left
ravioli_ AlexDaniel: Thanks a lot a lot a lot!!!!! You're so smart, kind, and awesome!!!! 05:14
05:19 Bucciarati left, dct left 05:20 imcsk8 left 05:21 avar left 05:28 Bucciarati joined, avar joined, avar left, avar joined, p6bannerbot sets mode: +v avar, imcsk8 joined, p6bannerbot sets mode: +v Bucciarati, p6bannerbot sets mode: +v avar 05:29 p6bannerbot sets mode: +v imcsk8 05:38 jameslenz joined 05:39 p6bannerbot sets mode: +v jameslenz 05:42 jameslenz left 06:09 domidumont joined 06:10 p6bannerbot sets mode: +v domidumont 06:11 kensanata joined, p6bannerbot sets mode: +v kensanata 06:12 HaraldJoerg joined 06:13 p6bannerbot sets mode: +v HaraldJoerg
ravioli_ Hi guys I'd like to ask again 06:17
how to implement lookbehind in perl 6 regex?
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
06:24 fnux left, fnux joined 06:25 kurahaupo left, p6bannerbot sets mode: +v fnux, imcsk8 left 06:26 kurahaupo joined 06:27 imcsk8 joined, fake_space_whale left, p6bannerbot sets mode: +v kurahaupo, p6bannerbot sets mode: +v imcsk8
tobs ravioli_: it's fittingly called <?after ...> 06:37
m: say "../test" ~~ /<?after '..'>\/(.*)/
camelia 「/test」
0 => 「test」
06:37 nightfro` joined
tobs m: say "/etc/test" ~~ /<?after '..'>\/(.*)/ 06:37
camelia Nil
06:38 p6bannerbot sets mode: +v nightfro`, nightfrog left, nightfro` is now known as nightfrog, abraxxa joined 06:39 p6bannerbot sets mode: +v abraxxa
Xliff m: my @a = (^10); say @a.grep(* != 5).say 06:51
camelia (0 1 2 3 4 6 7 8 9)
True
Xliff m: my @a = (^10); say @a.grep(*.Str ne "5").say
camelia (0 1 2 3 4 6 7 8 9)
True
ravioli_ never mind I already know the answer thanks guys for all the help! 06:52
07:03 robertle joined 07:04 p6bannerbot sets mode: +v robertle
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 now 07:12
tobs ravioli_: no problem. It's better to have found it yourself, isn't it? :) 07:18
ravioli_ tobs: Yes I agree :)
Xliff CIAvash: Did TimToady say something? 07:19
Or is he still thinking? :)
m: '😀'.uniname.say
camelia GRINNING FACE
07:20 avuserow left
Xliff Hexchat needs better unicode support. :p 07:20
CIAvash Xliff: colabti.org/irclogger/irclogger_log...8-10-18#l6 07: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
07:28 dakkar joined 07:29 p6bannerbot sets mode: +v dakkar
Geth Pod-To-HTML: finanalyst++ created pull request #47:
Modify to use templates
07:29
07:29 zakharyas joined 07:30 avuserow joined, p6bannerbot sets mode: +v zakharyas
masak I know `ff` stands for "flip-flop"... but what does the third "f" in `fff` stand for? :) 07:31
07:31 p6bannerbot sets mode: +v avuserow, Xliff_ joined 07:32 p6bannerbot sets mode: +v Xliff_ 07:34 Xliff_ left 07:35 Xliff_ joined, p6bannerbot sets mode: +v Xliff_
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:39 jameslenz joined 07:40 p6bannerbot sets mode: +v jameslenz 07:43 jameslenz left 07:48 Xliff_ left 07:49 kurahaupo_ joined 07:50 p6bannerbot sets mode: +v kurahaupo_
ravioli_ Hi guys I 07:50
07:50 kurahaupo left 07:51 kurahaupo_ left, kurahaupo joined
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
07:52 p6bannerbot sets mode: +v kurahaupo 07:53 cpage_ joined, p6bannerbot sets mode: +v cpage_ 07:55 cpage left, cpage_ is now known as cpage 07:56 scimon joined 07:57 p6bannerbot sets mode: +v scimon 08:04 zakharyas left 08:05 zakharyas joined, cognominal-p6 joined 08:06 p6bannerbot sets mode: +v zakharyas, p6bannerbot sets mode: +v cognominal-p6, cognominal-p6 left 08:07 cognominal-p6 joined, p6bannerbot sets mode: +v cognominal-p6 08:08 rindolf joined 08:09 p6bannerbot sets mode: +v rindolf
lizmat . 08:11
08:17 pecastro joined 08:18 p6bannerbot sets mode: +v pecastro
kensanata ravioli_: Looking at the output of perl6 --help makes me think that no such thing exists. 08:25
08:26 Ven` joined
ravioli_ kensanata: thanks for responding! I think I'll just use bash for that 08:26
08:27 p6bannerbot sets mode: +v Ven`
kensanata ravioli_: burn! 🤣 08:28
ravioli_ kensanata: sorry if it hurts cause I didn't mean to
kensanata ravioli_: No worries, I laughed.
08:29 cognominal-p6 left
kurahaupo ravioli_: « sed -i » is an attractive nuisance that seduces people into thinking sed is a file editor. It's a stream99,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 6 08:32
08:33 leont joined 08:34 p6bannerbot sets mode: +v leont
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 currently 08:35
but it feels like it should be possible to build a standalone command that does what -i does
should even be possible to build it in Perl 6 :)
man, if I had infinite time I would do that and then blog about it ;)
somebody feel free to task-steal that if they want 08:36
08:37 Actualeyes joined 08:38 p6bannerbot sets mode: +v Actualeyes
masak ISTR implementing -i correctly is a fun challenge 08:38
you're not meant to actually replace the old file until you've correctly finished writing the new one 08:39
08:50 cognominal-p6 joined 08:51 cognominal-p6 left, cognominal-p6 joined 08:52 p6bannerbot sets mode: +v cognominal-p6
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 box
kurahaupo … without truncating the file while it's in use? 08:55
masak oh dear 08:56
kurahaupo Mumble Linux mmap()+ splice() syscalls
(It's hard alright) 08:58
leont AFAIK its not that hard, write to a tempfile, and then replace at the end 09:04
kurahaupo leont: and make sure the resulting file has the same hard links as the original ? 09:20
El_Che tmp-file > orig-file 09:27
not moving but overwriting so the ownerships stays correct
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.
leont I definitely can't think of a way to do all those things atomically 09:33
That would require a transactional filesystem 09:34
kurahaupo leont: indeed I don't think there exists a posixish answer. 09:39
09:40 jameslenz joined, p6bannerbot sets mode: +v jameslenz
ilmari istr reiserfs was touting transactions back in the day 09:43
09:44 jameslenz left 09:46 tobs` joined 09:47 p6bannerbot sets mode: +v tobs` 09:57 isBEKaml joined, p6bannerbot sets mode: +v isBEKaml 10:01 isBEKaml left 10:04 [particle]1 joined, [particle] left 10:05 p6bannerbot sets mode: +v [particle]1 10:14 ravioli_ left 10:24 Actualeyes left 11:03 kurahaupo left 11:04 kurahaupo joined, p6bannerbot sets mode: +v kurahaupo
nige o/ 11:05
yoleaux 00:00Z <Zoffix> nige: I recall you offering trademark smoketest? This is the current list of proposals I got: gist.github.com/zoffixznet/f18842f...265e40bd15 No pressure if you can't/don't wanna smoketest anything.
00:06Z <Zoffix> nige: never mind. Turns out we won't need any polls
nige that's great news - always hoped TimToady would come up with a cultural hack ;-)
11:06 zakharyas left
nige TimToady, I'd be happy to help with trade mark smoke testing - it that's useful 11:06
s/it/if/
11:08 Bucciarati left, Bucciarati joined 11:09 p6bannerbot sets mode: +v Bucciarati
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
11:10 rbt_ left, rbt_ joined
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 lost 11:11
11:11 p6bannerbot sets mode: +v rbt_
Altreus I feel like the method should always return the same promise if there's an extant promise 11:13
is there a way of doing that built into promises?
or indeed p6
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 once 11:15
11:15 Ven` left
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 it 11:16
And I can clear the property when the promise is kept 11:17
jnthn Yeah, holding a Promise instead is how I typically do such things
Well, I always keep the promise around anyway
And always ask for the data via it
It's cheap to ask for data form an already kept promise (doesn't even need to do a lock acquisition)
Altreus So I could create it once and just always return it 11:18
jnthn Yes 11: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 that
jnthn Yeah, if you want to be lazy about triggering it 11:20
Altreus Not sure I follow that, sorry
11:20 lizmat left
Altreus Do you mean if I ask for the value again it will re-run it? :x 11:20
jnthn No 11: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 time
Not on first request
Altreus If I call the method twice in quick succession and therefore await the same incomplete promise, will it run twice? 11:22
jnthn No
Altreus that's magic
timotimo you can have a promise that the work immediately awaits
if you have "use 6.d.PREVIEW" it won't tie up a thread
jnthn lunch &
Altreus the promise I'm creating is awaiting a promise from Cro anyway 11: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 list 11:27
eh that's an optimisation for the future 11:28
lunch & 11:34
11:35 sena_kun joined, p6bannerbot sets mode: +v sena_kun 11:40 jameslenz joined, Ven` joined 11:41 p6bannerbot sets mode: +v jameslenz, p6bannerbot sets mode: +v Ven`
AlexDaniel kensanata: stream what? :) screenshots.firefox.com/qCg2hhg49OpKSWg5/null 11:44
yoleaux 09:17Z <lizmat> AlexDaniel: I think I've logged all of my changes
AlexDaniel .tell lizmat Awesome!! Thank you!
yoleaux AlexDaniel: I'll pass your message to lizmat.
11:45 jameslenz left 11:59 kurahaupo is now known as IHateNickMutatio
eiro hello people 12: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 ?
leont sparrowdo?
12:04 IHateNickMutatio is now known as kurahaupo
eiro leont, that's it! thanks 12:07
12:30 random_yanek left 12:31 random_yanek joined, random_yanek left 12:32 zakharyas joined 12:33 p6bannerbot sets mode: +v zakharyas
Geth doc: MorayJ++ created pull request #2390:
Supply fix
12:40
12:47 zakharyas left 12:49 random_yanek joined, random_yanek left, zakharyas joined, p6bannerbot sets mode: +v zakharyas 12:55 leont left
Geth doc/modules-pod-fix: 5 commits pushed by MorayJ++ 13:12
13:15 random_yanek joined, pmurias joined, p6bannerbot sets mode: +v pmurias 13:16 p6bannerbot sets mode: +v random_yanek
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 www.tyil.nl/post/2018/05/07/sparro...g-started/ 13:17
Geth doc: MorayJ++ created pull request #2391:
Remove extra =end item
13:22
13:28 AlexDaniel left, AlexDaniel joined 13:29 lichtkind joined, p6bannerbot sets mode: +v AlexDaniel, p6bannerbot sets mode: +v lichtkind 13:41 jameslenz joined 13:42 p6bannerbot sets mode: +v jameslenz 13:46 jameslenz left 13:50 pmurias left 13:52 pmurias joined, p6bannerbot sets mode: +v pmurias 13:55 telex left 13:56 telex joined 13:57 p6bannerbot sets mode: +v telex
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
14:03 Zoffix joined, p6bannerbot sets mode: +v Zoffix
jnthn SmokeMachine: We'll need to do something like that I guess. It's kinda icky from an API perspective, is all 14:03
Zoffix R#2345
synopsebot R#2345 [open]: github.com/rakudo/rakudo/issues/2345 [regression][⚠ blocker ⚠] Post-2018.09 module install failures
Zoffix err
14:03 Zoffix left
jnthn Ah, right :) 14:03
SmokeMachine jnthn: ok, thanks! :) 14:05
14:07 pmurias left
Geth doc: bab4347c74 | MorayJ++ | doc/Language/modules.pod6
Remove extra =end item
14:09
doc: 1c00ac5f1f | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/modules.pod6
Merge pull request #2391 from MorayJ/modules-pod-fix

Remove extra =end item
synopsebot Link: doc.perl6.org/language/modules
14:16 pmurias joined, p6bannerbot sets mode: +v pmurias 14:21 kurahaupo left, kurahaupo joined 14:22 kurahaupo left 14:23 kurahaupo joined, p6bannerbot sets mode: +v kurahaupo 14:35 molaf joined, p6bannerbot sets mode: +v molaf
Geth doc/master: 6 commits pushed by MorayJ++ 14:39
14:39 pmurias left
14:49 irco left 14:54 pmurias joined, p6bannerbot sets mode: +v pmurias
eiro tyil, well ... maybe i'll try it in few days. thanks for sharing 14:54
14:54 pmurias left 14:59 pmurias joined, p6bannerbot sets mode: +v pmurias 15:01 pmurias left
SmokeMachine how can I create a hash from nqp? 15:02
15:03 rbt_ left 15:04 gregf_ left
jnthn An NQP-level hash? The literal is nqp::hash('key', $value) 15:06
15:06 pmurias joined, p6bannerbot sets mode: +v pmurias
jnthn Or just `my %h := nqp::hash(); %h<foo> := $value` etc. 15:06
SmokeMachine jnthn: thanks
nqp::hash('key1', $value1, 'key2', $value2)? 15:07
jnthn Yes 15:09
15:09 sno left
SmokeMachine thanks! 15:09
15:10 troys joined 15:11 p6bannerbot sets mode: +v troys 15:12 fake_space_whale joined 15:13 p6bannerbot sets mode: +v fake_space_whale
SmokeMachine \o/ www.irccloud.com/pastebin/VK6OimoN/ 15:15
now i need to make that for multi methods 15:16
timotimo m: my int $foo = 1; my int $bar = 2; for ^100_000 -> int $_ { $foo++ if $_ %% $bar }; say now - ENTER now 15:18
camelia 0.01979857
timotimo m: my int $foo = 1; my int $bar = 2; for ^1_000_000 -> int $_ { $foo++ if $_ %% $bar }; say now - ENTER now
camelia 0.2545966
timotimo m: my int $foo = 1; my int $bar = 2; for ^5_000_000 -> int $_ { $foo++ if $_ %% $bar }; say now - ENTER now
camelia 0.774169333
timotimo c: 2018.09 my int $foo = 1; my int $bar = 2; for ^5_000_000 -> int $_ { $foo++ if $_ %% $bar }; say now - ENTER now
committable6 timotimo, ¦2018.09: «2.1200323␤»
timotimo c: HEAD my int $foo = 1; my int $bar = 2; for ^5_000_000 -> int $_ { $foo++ if $_ %% $bar }; say now - ENTER now
committable6 timotimo, ¦HEAD(7d7aaf0): «0.67359971␤»
buggable New CPAN upload: Sparrowdo-VSTS-YAML-Cordova-0.0.17.tar.gz by MELEZHIK modules.perl6.org/dist/Sparrowdo::V...n:MELEZHIK 15:20
15:22 domidumont left 15:27 b2gills left
SmokeMachine is there a way to handles create a multi method? 15:33
Altreus sparrowdo is surely a pun on something
SmokeMachine m: say class :: { has Int $.a handles <is-prime> }.^lookup("is-prime") 15:34
camelia is-prime
SmokeMachine m: say class :: { has Int $.a handles <is-prime> }.^lookup("is-prime").multi 15:35
camelia False
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 composition 15:38
jnthn SmokeMachine: Ah, yes
What else would it apply to?
SmokeMachine to multi stubs? 15:39
but I don't know if it's possible to a `handles` create a multi method...
jnthn Oh, I see. But no, I don't think it's possible for that to happen.
SmokeMachine ok! so I think it's working!!! :) running the spec tests... 15:40
15:41 b2gills joined, p6bannerbot sets mode: +v b2gills 15:42 jameslenz joined 15:43 p6bannerbot sets mode: +v jameslenz 15:44 leont joined 15:45 p6bannerbot sets mode: +v leont
SmokeMachine what's the envvar to make spec test run in parallel? 15:46
15:46 jameslenz left 15:47 b2gills left
moritz TEST_JOBS=4 15:47
Geth doc: a9df6b550f | (İsmail Arılık)++ (committed using GitHub Web editor) | doc/Language/classtut.pod6
Add missing method call to first introspection example
synopsebot Link: doc.perl6.org/language/classtut
15:48 vrurg left
SmokeMachine moritz: thanks! 15:48
15:49 ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy
SmokeMachine a lot of dubious tests... :( 15:50
15:52 b2gills joined, sno joined, p6bannerbot sets mode: +v b2gills, p6bannerbot sets mode: +v sno 16:01 Zoffix joined, p6bannerbot sets mode: +v Zoffix
Zoffix SmokeMachine: by default, spectest already runs in parallel, defaulting to 6 jobs 16:01
(unless you ask it to use P6 harness, which still uses 1 job)
SmokeMachine Zoffix: thanks! 16:06
16:07 robertle left
Geth whateverable: d3230c935b | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Whateverable/Running.pm6
Add :wipe named parameter in run-smth

As well as another helper method to avoid run-smth altogether. This allows heavy parallelization of things that need to use the same build at the same time. Quotable, Benchable and Project Blin can benefit from that. Note that if you use that you'll have to remove unpacked builds yourself (the location of them is returned by run-smth-build-path).
16:08
16:08 sno left
16:17 scimon left 16:23 raynold_ joined, p6bannerbot sets mode: +v raynold_, raynold_ left 16:25 Ven` left 16:28 pmurias left 16:30 tobs` left 16:33 pmurias joined, p6bannerbot sets mode: +v pmurias 16:34 vrurg joined 16:35 p6bannerbot sets mode: +v vrurg
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.t 16: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.t 16:40
SmokeMachine Zoffix: and t/spec/S11-modules/nested.t broke on spec test but I run it by hand and that worked...
Zoffix That one flops
SmokeMachine Zoffix www.irccloud.com/pastebin/vgL2Nr2z/ 16:42
I diânt copy the last one, sorry...
s/diânt/didn't/ 16:43
www.irccloud.com/pastebin/h0SMLPr8/
Zoffix: even with the last commits, t/spec/MISC/bug-coverage.t is broken... 16:45
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!
s/write/right/
Zoffix SmokeMachine: no idea about the other ones. 16:48
My stresstest is clean.
16:48 dakkar left
SmokeMachine :( 16:49
16:51 Zoffix left 16:55 domidumont joined, p6bannerbot sets mode: +v domidumont 16:56 molaf left
SmokeMachine when I stash my changes it gives the same errors... 17:00
17:02 zakharyas left 17:03 zakharyas joined 17:04 p6bannerbot sets mode: +v zakharyas 17:14 robertle joined 17:15 p6bannerbot sets mode: +v robertle, noganex_ left 17:16 noganex joined 17:17 p6bannerbot sets mode: +v noganex 17:18 Sauvin left 17:21 kensanata left
SmokeMachine I think the error was a wrong version of MoarVM or nqp... 17:22
tony-o hmm 17: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.
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 ? gist.github.com/tony-o/c7e08d5bed8...5177e5fcf8
Geth doc: d7f8c617f8 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Any.pod6
Mark .toggle as experimental as it's not making 6.d

  github.com/rakudo/rakudo/issues/2089
17:35
synopsebot Link: doc.perl6.org/type/Any
xinming m: for (1 .. Inf).head(5) -> @a { @a.perl.say; } 17:36
camelia Type check failed in binding to parameter '@a'; expected Positional but got Int (1)
in block <unit> at <tmp> line 1
xinming m: for (1 .. Inf).head(5) -> *@a { @a.perl.say; } 17:38
camelia [1]
[2]
[3]
[4]
[5]
17:39 zakharyas left
tobs xinming: List.rotor is what you're looking for 17:39
xinming Thanks
tobs m: for (^1000).rotor(200) -> *@a { say sum @a } 17:40
camelia 19900
59900
99900
139900
179900
tobs actually, you can drop the * in *@a 17:41
m: for (^12).rotor(3) -> @a { say @a }
camelia (0 1 2)
(3 4 5)
(6 7 8)
(9 10 11)
17:43 jameslenz joined
SmokeMachine I cloned rakudo again, and now only 2 test files break... 17:43
17:44 p6bannerbot sets mode: +v jameslenz 17:48 jameslenz left
pmurias tony-o: what is $new-model? 17:48
17:50 aa joined, p6bannerbot sets mode: +v aa
pmurias tony-o: with nqp::p6bindattrinvres you are trying to get the private attribute @!columns that's declared *in* Array 17:50
17:50 aa is now known as Guest54177, Guest54177 left
pmurias like class Array {has @!columns}; class Foo is Array {}; nqp::p6bindattinvres(Foo.new, Array, '@!columns', @columns) 17:51
17:51 vrurg left 17:54 AlexDaniel left 17:55 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 18:03 Zoffix joined, p6bannerbot sets mode: +v Zoffix
Zoffix xinming: note that rotor will by default throw away remaining elements if they don't make an exact batch. There's also .batch method 18: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.
xinming Zoffix: Ok, Thanks. Will use batch method. :-)\ 18:09
18:11 kent\n left
SmokeMachine I don't know what to do... master is breaking on my machine... but I'd like to PR this commit (github.com/FCO/rakudo/commit/fd5d5...eea7ca92f) but its breaking the same tests that it breaks on master on my machine... 18:13
AlexDaniel treegrep: release/01-basic.t 18:14
greppable6 AlexDaniel, gist.github.com/30c64fa23afcbba179...f13cc9ea52
18:14 ryn1x joined, kent\n joined, p6bannerbot sets mode: +v kent\n
AlexDaniel treegrep: ‘release/01-basic.t’ 18:14
greppable6 AlexDaniel, gist.github.com/cc92b416cd0cc93157...1ba4cb9ea7
18:15 p6bannerbot sets mode: +v ryn1x
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 roast
18:19 ryn1x left, ryn1x_ joined
SmokeMachine sorry, travis 18:19
18:19 holyghost left
SmokeMachine :( 18:19
github.com/rakudo/rakudo/pull/2390
18:19 p6bannerbot sets mode: +v ryn1x_, holyghost joined 18:20 p6bannerbot sets mode: +v holyghost
Geth ecosystem: c0d4254580 | tony-o++ (committed using GitHub Web editor) | META.list
Change name of database ORM to Xoo so we're not vulgar in arabic
18: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_value 18:25
pmurias++
Zoffix: that isn't really helpful
Zoffix tony-o: I'm just stating facts.
18:26 noganex_ joined 18:27 sno joined
pmurias tony-o: what are you writing? 18:27
Zoffix Especially extops. They are going away.
18:27 p6bannerbot sets mode: +v noganex_, p6bannerbot sets mode: +v sno
tony-o pmurias: it's composing anonymous ORM classes from YAML so you can define your model classes in plain-ish text 18: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
18:28 Zoffix left
pmurias tony-o: you should avoid using nqp:: stuff in modules 18: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 helpful 18:29
xinming m: perl6 -e 'for (1 .. 10) -> $i { my $t = $i; FIRST { $t = 0; }; $t.say; }'
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3perl6 -e7⏏5 'for (1 .. 10) -> $i { my $t = $i; FIRS
expecting any of:
infix
infix stopper
postfix
statement…
xinming m: for (1 .. 10) -> $i { my $t = $i; FIRST { $t = 0; }; $t.say; }
camelia 1
2
3
4
5
6
7
8
9
10
tony-o pmurias: composing an ORM model class from YAML that looks like this github.com/tony-o/perl6-xoo/blob/m...tomer.yaml 18:30
xinming Why will this exmample, the $t won't be initialized to 0?
18:30 noganex left
xinming m: for (1 .. 3) -> $i { my $t = $i; FIRST { $t = 0; }; $t.say; } 18:30
camelia 1
2
3
tony-o m: for (1 .. 10) -> $i { my $t = $i; FIRST { 't=0'.say; $t = 0; }; $t.say; } 18:31
camelia t=0
1
2
3
4
5
6
7
8
9
10
tony-o t is assigned in FIRST prior to `my $t = $i;` is executed
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 notice
18:32 lichtkind left 18:33 sno left
tony-o m: for (0 .. 10) -> $i { my $t = $i; $t.say; } 18:33
camelia 0
1
2
3
4
5
6
7
8
9
10
tony-o no argument there pmurias
xinming tony-o: i mean the use of FIRST 18:34
18:34 ryn1x_ left
tony-o xinming: do you want 0,2,3,4,5 ? 18:34
18:34 ryn1x_ joined
xinming m: my $t; for (1 .. 10) -> $i { $t = $i; FIRST { $t = 0 }; $t.say; } 18:34
camelia 1
2
3
4
5
6
7
8
9
10
xinming tony-o: I don't.
but I think I understand the logic now. 18:35
I can't do it with FIRST
18:35 p6bannerbot sets mode: +v ryn1x_, domidumont left
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; }
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$t' is not declared
at <tmp>:1
------> 3for (1 .. 10) -> $i { 7⏏5$t.say; qw<do stuff here with t=0>; my $
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; }
camelia Potential difficulties:
Redeclaration of symbol '$t'
at <tmp>:1
------> 3t.say; qw<do stuff here with t=0>; my $t7⏏5 = $i; FIRST { $t = 0; }; qw<now do stuf
0
1
(Any)
2
(Any)
3
(Any)
4
(Any)
5
(Any)
6
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; }
camelia 0
1
(Any)
2
(Any)
3
(Any)
4
(Any)
5
(Any)
6
(Any)
7
(Any)
8
(Any)
9
(Any)
10
tony-o gah 18:36
xinming m: my $t; for (1 .. 10) -> $i { $t.say; $t = $i; FIRST { $t = 0; }; $t.say; } 18:37
camelia 0
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
18:48 bdmatatu joined, p6bannerbot sets mode: +v bdmatatu 19:04 zakharyas joined, p6bannerbot sets mode: +v zakharyas 19:07 bdmatatu left 19:09 Zoffix joined, p6bannerbot sets mode: +v Zoffix
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 thing 19:10
m: my $t; for (1 .. 10) -> $i { $t = $i; once $t = 0; $t.say; }
camelia 0
2
3
4
5
6
7
8
9
10
19:11 Zoffix left 19:18 sno joined 19:19 p6bannerbot sets mode: +v sno 19:23 grumble left 19:26 grumble joined, p6bannerbot sets mode: +v grumble 19:32 ryn1x_ left 19:43 ExtraCrispy left, ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy 19:44 jameslenz joined, p6bannerbot sets mode: +v jameslenz 19:46 ExtraCrispy left 19:48 jameslenz left 19:55 irco joined 19:56 p6bannerbot sets mode: +v irco
xinming ZofBot: Thanks, that's what I want. :-) 19:59
20:03 ufobat_ left 20:14 zakharyas left
xinming Will 'take' do "return" for the block? 20:23
or, I need another return after 'take'
AlexDaniel xinming: no, take does not return 20:25
why do you want to return?
xinming I try to rewrite a recursive function to use gather and take 20:26
AlexDaniel xinming: well, it depends, but it can be recursive *and* use take at the same time 20:28
xinming Yes, So, still thinking on how to make it work
AlexDaniel related doc ticket: github.com/perl6/doc/issues/2388
m: sub foo { take 42; foo }; my $x = gather foo; for @$x { .say; last if $++ > 10 }
camelia 42
42
42
42
42
42
42
42
42
42
42
42
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.
will try 20:30
20:31 pmurias left
AlexDaniel xinming: fwiw you can also write `return take 42` if you need that 20:32
maybe I'll be able to tell more if you can show some code :)
20:37 sno left
xinming AlexDaniel: termbin.com/hnvw 20:37
AlexDaniel: This is the recursive function I'm trying to write. going to use lazy list features in perl6
I wrote it yesterday, Still need time to figure how lazy lists can be handled like this. 20:38
20:40 leont left
xinming It's just a recursive function which when we meet the array/list, We "duplicate" config 20:41
Since if the config is large, It'll take a while to do that
AlexDaniel xinming: what's the expected result? 20:42
20:44 sftp left, sftp joined, p6bannerbot sets mode: +v sftp
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 this
20:45 sena_kun left 20:46 sena_kun joined, sena_kun left
AlexDaniel xinming: it's pretty cool :) 20:53
SmokeMachine xinming: something like this? www.irccloud.com/pastebin/OReK55oH/ 20:54
hum! hashes! sorry
Xliff m: my @a = <A B C a b c>; say @a.first(* eq 'a', :k) 20:55
camelia 3
Xliff m: my @a = <A B C a b c>; say @a.first(* eq 'a', :k)
camelia 3
Xliff m: my @a = <A B C a b c>; say @a.first(* eq 'B', :k)
camelia 1
Xliff m: my @a = <A B C a b c>; say @a.first(* eq 'Z', :k)
camelia Nil
xinming SmokeMachine: It'll try to inflate to hashes. 20:56
My code does work. It's just don't do gather/take.
It's pure old school way to write something like that.
AlexDaniel yeah
SmokeMachine sorry, I had it understood wrong 20:57
AlexDaniel (yeah to “it does work”)
xinming If a array is a lazy list, Is it ok to do something like @lazy_list == 1 ? 20:58
to test the lenth.
moritz if you do, it reifies the list
AlexDaniel I don't think you can even .elems a lazy list 21:00
ehhh well… it depends
moritz m: my @a := gather { take $_ for ^200 }; say @a.lazy; say @a.elems
camelia Type check failed in binding; expected Positional but got Seq ($((0, 1, 2, 3, 4, 5, ...)
in block <unit> at <tmp> line 1
moritz m: my @a = gather { take $_ for ^200 }; say @a.lazy; say @a.elems
camelia (...)
200
moritz m: my @a = gather { take $_ for ^200 }; say @a.is-lazy; say @a.elems
camelia False
200
21:01
moritz m: my @a = ^Inf; say @a.is-lazy; say @a.elems
camelia True
Cannot .elems a lazy list
in block <unit> at <tmp> line 1
xinming gather for sub-containers-take -> $item { take $item } 21:02
for gather sub-containers-take -> $item { take $item }
Are these 2 the same?
For now, I'm using the latter one
SmokeMachine m: my @a = lazy gather { take $_ for ^200 }; say @a.is-lazy; say @a.elems 21:03
camelia True
Cannot .elems a lazy list
in block <unit> at <tmp> line 1
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 think 21:04
xinming AlexDaniel: Thanks for the clarification. 21:05
then first one is what I want.
buggable New CPAN upload: Sparrowdo-0.0.41.tar.gz by MELEZHIK modules.perl6.org/dist/Sparrowdo:cpan:MELEZHIK 21:10
xinming AlexDaniel: The for gather sub-containers-take { take blabla } does something required in some case 21:11
Xliff \o 21:15
Anyone have any ideas on the best way to cut this code down to size? 21:16
github.com/Xliff/p6-GtkPlus/blob/m...Widget.pm6
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 help 21:17
xinming AlexDaniel: Thanks for your time anyway. I'm almost there.
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 sure
xinming Now trying to make lazy list work.
I have a version which is already working. 21:19
I'm trying to make it lazy list.
termbin.com/9ymk
But with some bug 21: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;
This is the most tricky part I met in this problem 21:27
21:28 sftp left 21:34 sftp joined, p6bannerbot sets mode: +v sftp
xinming for gather inflate-config(%cloned) { take $_ } 21:36
finally make everything set.
Geth doc: 7b38d71a3f | Coke++ | 2 files
whitespace
21:37
doc: 97ad92f257 | Coke++ | doc/Language/classtut.pod6
Don't use WHAT

It's mentioned elsewhere in this file, but doesn't add anything in particular to this example which already has .^name
synopsebot Link: doc.perl6.org/language/classtut
21:44 jameslenz joined
Geth doc: 168463f07c | Coke++ | doc/Language/modules.pod6
unindent paragraph (otherwise it's implicit code)
21:45
doc: ba42f5d7b2 | Coke++ | doc/Language/modules.pod6
Fix incorrect 'e.g.'
synopsebot Link: doc.perl6.org/language/modules
21:45 p6bannerbot sets mode: +v jameslenz 21:46 agentzh joined, agentzh left, agentzh joined, p6bannerbot sets mode: +v agentzh 21:47 regreg__ left, p6bannerbot sets mode: +v agentzh
Geth doc: 40416b382f | Coke++ | doc/Language/modules.pod6
whitespace

While both are valid POD6, this passes the finicky links test.
21:48
synopsebot Link: doc.perl6.org/language/modules
21:49 jameslenz left
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;
camelia Bool::False
xinming m: my @a = (1 .. 5); (1 ~~ @a).perl.say;
camelia Bool::False
xinming m: my @a = ('a' .. 'c'); ('a' ~~ @a).perl.say; 21:52
camelia Bool::False
xinming m: my @a = ('a' .. 'c'); (@a ~~ 'a').perl.say;
camelia Bool::False
Geth whateverable: 2909f0a932 | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Whateverable/Output.pm6
SIGKILL if it doesn't terminate by itself

I don't know if this is going to help much, but I'm seeing something and it might.
xinming m: my @a = ('a' .. 'c'); @a.Set{'a'}.perl.say; 21:53
camelia Bool::True
21:55 george joined, p6bannerbot sets mode: +v george 22:01 hamhu3 joined 22:02 p6bannerbot sets mode: +v hamhu3 22:05 alpha left 22:07 hamhu3 left 22:12 vrurg joined, p6bannerbot sets mode: +v vrurg 22:14 alpha joined 22:15 p6bannerbot sets mode: +v alpha 22:17 rindolf left
AlexDaniel what's the difference between modules and distributions on CPAN? 22:18
22:20 sno joined 22:21 p6bannerbot sets mode: +v sno 22:30 pecastro left 22:31 Voldenet left
[Coke] xinming: grep? 22:32
or, better: .first ?
xinming [Coke]: .Set{'a'} is good enough. 22:33
I just need .Set{'a'} in my case
22:34 fake_space_whale left
timotimo i'd personally go with (elem) for this 22:35
22:41 hamhu3 joined, hamhu3 left 23:02 cognominal-p6 left
Geth doc: 233cfa5657 | (Zoffix Znet)++ | doc/Type/Str.pod6
[v6.d REVIEW] Document :count on `lines` as deprecated
23:10
synopsebot Link: doc.perl6.org/type/Str
23:21 george left 23:26 HaraldJoerg left
SmokeMachine could someone take a look at 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 passed 23:38
perhaps that's better than returning it
SmokeMachine timotimo: i agree that would be better... 23:43
23:45 jameslenz joined 23:46 Voldenet joined, Voldenet left, Voldenet joined, p6bannerbot sets mode: +v Voldenet, p6bannerbot sets mode: +v jameslenz
timotimo maybe, or maybe it's just fine the way it is already 23:46
23:47 p6bannerbot sets mode: +v Voldenet 23:50 jameslenz left