»ö« 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!
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
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.
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
Geth modules.perl6.org: 44db231bf3 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/Source/GitLab.pm
Fill dist sauce URL for GitLab dists
00:53
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
ravioli_ hi guys I'd like to ask about perl6 oneliner here 04:09
p6: say 3
camelia 3
SmokeMachine Hi ravioli_ 04:12
ravioli_ hi SmokeMachine
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? ↑
ravioli_ AlexDaniel: ah close! thanks I didn't know $0 before 04:37
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
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!
AlexDaniel ravioli_: ah, I just remembered that you can also use just $/ if you want to get the whole thing 05:00
AlexDaniel ravioli_: so this works too: s:g/wawa.+?[[\"]**1]/$/h/ 05:00
AlexDaniel although it looks weird because of $/ :) 05: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 hard
ravioli_ AlexDaniel: thanks for the additional tips 05:01
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!
ravioli_ AlexDaniel: Thanks a lot a lot a lot!!!!! You're so smart, kind, and awesome!!!! 05:14
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
tobs ravioli_: it's fittingly called <?after ...> 06:37
m: say "../test" ~~ /<?after '..'>\/(.*)/
camelia 「/test」
0 => 「test」
tobs m: say "/etc/test" ~~ /<?after '..'>\/(.*)/ 06:37
camelia Nil
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
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
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
Geth Pod-To-HTML: finanalyst++ created pull request #47:
Modify to use templates
07:29
masak I know `ff` stands for "flip-flop"... but what does the third "f" in `fff` stand for? :) 07:31
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. ;(
ravioli_ Hi guys I 07:50
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
lizmat . 08:11
kensanata ravioli_: Looking at the output of perl6 --help makes me think that no such thing exists. 08:25
ravioli_ kensanata: thanks for responding! I think I'll just use bash for that 08:26
kensanata ravioli_: burn! 🤣 08:28
ravioli_ kensanata: sorry if it hurts cause I didn't mean to
kensanata ravioli_: No worries, I laughed.
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
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
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
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
ilmari istr reiserfs was touting transactions back in the day 09:43
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 ;-)
nige TimToady, I'd be happy to help with trade mark smoke testing - it that's useful 11:06
s/it/if/
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
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
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
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
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
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.
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?
eiro leont, that's it! thanks 12:07
Geth doc: MorayJ++ created pull request #2390:
Supply fix
12:40
Geth doc/modules-pod-fix: 5 commits pushed by MorayJ++ 13:12
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
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
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
jnthn Ah, right :) 14:03
SmokeMachine jnthn: ok, thanks! :) 14:05
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
Geth doc/master: 6 commits pushed by MorayJ++ 14:39
eiro tyil, well ... maybe i'll try it in few days. thanks for sharing 14:54
SmokeMachine how can I create a hash from nqp? 15:02
jnthn An NQP-level hash? The literal is nqp::hash('key', $value) 15:06
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
SmokeMachine thanks! 15:09
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
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
SmokeMachine what's the envvar to make spec test run in parallel? 15:46
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
SmokeMachine moritz: thanks! 15:48
SmokeMachine a lot of dubious tests... :( 15:50
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
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
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.
SmokeMachine :( 16:49
SmokeMachine when I stash my changes it gives the same errors... 17:00
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]
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)
SmokeMachine I cloned rakudo again, and now only 2 test files break... 17:43
pmurias tony-o: what is $new-model? 17:48
pmurias tony-o: with nqp::p6bindattrinvres you are trying to get the private attribute @!columns that's declared *in* Array 17:50
pmurias like class Array {has @!columns}; class Foo is Array {}; nqp::p6bindattinvres(Foo.new, Array, '@!columns', @columns) 17:51
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
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
AlexDaniel treegrep: ‘release/01-basic.t’ 18:14
greppable6 AlexDaniel, gist.github.com/cc92b416cd0cc93157...1ba4cb9ea7
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
SmokeMachine sorry, travis 18:19
SmokeMachine :( 18:19
github.com/rakudo/rakudo/pull/2390
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.
pmurias tony-o: what are you writing? 18:27
Zoffix Especially extops. They are going away.
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
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?
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
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
tony-o xinming: do you want 0,2,3,4,5 ? 18:34
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
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
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
xinming ZofBot: Thanks, that's what I want. :-) 19:59
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
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 :)
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
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
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
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
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
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
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
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
AlexDaniel what's the difference between modules and distributions on CPAN? 22:18
[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
timotimo i'd personally go with (elem) for this 22:35
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
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
timotimo maybe, or maybe it's just fine the way it is already 23:46