Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-06-30

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:06 dha All right, I'm probably going to run out of internet shortly. Time to take a break, methinks.
00:07 [Coke] dha++
00:21 TimToady m: constant term:<½> = 1/2; say ½
00:21 camelia rakudo-moar 7b5256: OUTPUT«0.5␤»
00:21 TimToady AlexDaniel: ^^^
00:22 TEttinger nice!
00:22 TimToady thing is, ½ is not alphanumeric
00:22 TimToady m: say '½' ~~ /\w/
00:22 camelia rakudo-moar 7b5256: OUTPUT«Nil␤»
00:22 TimToady and only alphanumerics get treated as identifier fodder
00:23 TimToady so any other term has to use the term:<> notation, just as you'd use infix:<> and such
00:27 timotimo m: my ${a} = 5
00:27 camelia rakudo-moar 7b5256: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fXNPEaD97k␤Undeclared routine:␤    a used at line 1␤␤»
00:28 timotimo TimToady: was it you who recently changed this? we have a test that expects that to throw X::Obsolete
00:28 timotimo for RT #112470
00:28 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=112470
00:29 timotimo std: my ${a} = 5
00:29 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Undeclared routine:␤     'a' used at line 1␤Check failed␤FAILED 00:00 138m␤»
00:29 timotimo well, that ticket is "STD doesn't accept this, but rakudo does"
00:29 timotimo and now STD accepts it and rakudo does as well; so maybe that ticket should be re-opened with the new intended behavior and the test removed from the spec test suite?
00:38 AlexDaniel TimToady: thanks
00:38 zxvcd joined #perl6
00:40 AlexDaniel m: constant xxx = 1/2; say xxx;
00:40 camelia rakudo-moar 7b5256: OUTPUT«0.5␤»
00:40 AlexDaniel m: constant term:<xxx> = 1/2; say xxx;
00:40 camelia rakudo-moar 7b5256: OUTPUT«0.5␤»
00:40 AlexDaniel any reason why second variant takes 0.5s more to run?
00:47 timotimo how many runs have you tried?
00:48 timotimo to de-noise the measurement i mean
00:48 TimToady takes about .15 more seconds here
00:48 TimToady it's probably the overhead of constructing a new lexer for the new language
00:50 TimToady one of the many things that can probably be optimized some to make the parser faster
00:53 timotimo feel free to put such an optimization in ;)
00:53 * timotimo is probably going to bed now
00:57 AlexDaniel timotimo: 0.3s vs 0.8s, I'm not sure that there is any need to denoise anything
00:57 AlexDaniel one code is clearly slower than the other one...
00:57 VinceDee joined #perl6
00:59 jack_rabbit joined #perl6
01:02 laouji joined #perl6
01:04 aborazmeh joined #perl6
01:04 aborazmeh joined #perl6
01:05 BenGoldberg joined #perl6
01:09 atroxaper joined #perl6
01:17 tony-o AlexDaniel: how many iterations did you do to get those numbers?
01:21 AlexDaniel tony-o: you want me to do a scientific reseach on that subject when the problem is so clearly present?
01:21 AlexDaniel tony-o: or do you get the opposite result?
01:23 tony-o its not scientific research its basic benchmarking
01:24 tony-o and yes, i think testing something dealing with time more than n=1 is a good idea
01:24 AlexDaniel I ran it a couple fo times, but ok, hold on a sec
01:25 ugexe scientific method 187 mutha flukka
01:25 tony-o lol
01:26 telex joined #perl6
01:33 dayangkun joined #perl6
01:34 n0vacane joined #perl6
01:34 n0vacane left #perl6
01:37 AlexDaniel tony-o: 0.7544 and 0.2947, average on 105 runs excluding 5 preliminary runs
01:37 AlexDaniel yes, I have some background processes running, sorry
01:38 vendethiel joined #perl6
01:43 tony-o what about jvm
01:45 AlexDaniel good question
01:45 AlexDaniel actually, I have never tried to run it on jvm ever
01:45 AlexDaniel by the way, I messed the second number a little bit, here is a true one: 0.281
01:46 ugexe it only took 9 hours but i was able to finally dance around moarvm on windows problem printing "\r"
01:47 ugexe unfortunately i was unable to discover the root of the problem in moarvm itself :(
01:53 AlexDaniel tony-o: https://gist.github.com/Alex​Daniel/7fce54c1e6d93b4d424d
01:53 * AlexDaniel shrugs
01:59 yeahnoob joined #perl6
01:59 AlexDaniel so unless somebody can understand what is being wrong with building jvm, I can't really measure it
02:01 AlexDaniel actually, I'm pretty sure that I was able to use rakudo on top of jvm 6 months ago
02:01 AlexDaniel so perhaps something is broken now
02:02 huf joined #perl6
02:04 AlexDaniel Unhandled exception: java.lang.NoClassDefFoundError: Could not initialize class java.lang.Shutdown
02:04 AlexDaniel does it even exist in java 8?
02:05 noganex joined #perl6
02:06 AlexDaniel oh look: https://gist.github.com/to​ny-o/ca71572bc9fe0e25f28d
02:26 govt joined #perl6
02:27 govt joined #perl6
02:27 govt joined #perl6
02:29 tinyblak joined #perl6
02:38 rmgk_ joined #perl6
02:50 kanl gurus, would multi-threaded lock-free r/w access to a weakly mutable array, or parcel be safe, given that each thread only accesses one unique corresponding element in the array/parcel? i.e. if i were to have 5 processes running with Proc::Async, each stdout tap catenates to its own correponding string in an array. can i safely do so without race?
02:51 vendethiel joined #perl6
02:59 [particle] joined #perl6
03:00 JimmyZ_ joined #perl6
03:03 [particle]1 joined #perl6
03:12 skids kanl: the VM gurus all likely all asleep.
03:13 [particle] joined #perl6
03:14 kanl no worries, i can wait :)
03:15 skids As a wild guess I would suspect that would be OK if the threads bound directly to the elements.
03:15 skids like:
03:15 skids m: my $a = [1,2,3]; my $b := $a[0]; $b++; $a.say;
03:15 camelia rakudo-moar 7b5256: OUTPUT«2 2 3␤»
03:16 bin_005 joined #perl6
03:18 ugexe why not use a channel
03:18 ugexe its made for that type of stuff afterall
03:20 kanl yes, i'd have to use channel(s) anyway, even for catentating the output. since stdout/stderr is not tapped in its entirety, like say for example if you run a 'ps' command, stdout tap breaks the output ad-hoc, i'd have to piece it together with a channel/supply inside the tap.
03:21 kanl unfortunately, no documentation on this behavior. i found out through trial and error
03:22 ugexe ive not run into that. can you explain in more detail?
03:23 ugexe i generally just create a class with an attribute i write to for each process
03:23 ugexe https://github.com/ugexe/zef/blob/​master/lib/Zef/Test/Result.pm6#L28
03:23 kanl i'm not saying it's a problem, it may be so by design, but that's the behavior i observed.
03:23 ugexe where i run 5-10 processes at a time
03:23 [particle]1 joined #perl6
03:24 ugexe and get lots of stdout quickly
03:25 ugexe is it actually breaking the output, or is it just not printing it to the screen correctly?
03:26 kanl looking at your code, i'd worry about interleafing output.
03:26 kanl since tap does not guarantee order
03:27 ugexe order is always correct
03:28 kanl the behavior i observed is that stdout.tap certainly does not break by newline
03:28 kanl and stderr/stdout may be interleaved
03:29 kanl perhaps you've been lucky with the command you run. but not all commands guarantee stdout/stderr output in an ordered fashion.
03:30 ugexe well i run 10+ commands per test run, of which i do 20-50 a day
03:30 ugexe not that you are incorrect. but i would also need to be extremely lucky
03:31 kanl if tap does what documentation says it does, then your code doesn't look safe, just saying :)
03:32 ugexe hopefully someone tells whoever merged it into panda
03:33 kanl mind you though, i basically just fell off the proverbial turnip truck, in terms of p6 :) so i
03:33 kanl i may not know what i'm saying :)
03:33 [particle] joined #perl6
03:35 kanl from what i read in the docs, 'act' guarantees contention free, but tap does not.
03:35 ugexe there are some strange bugs with newlines which could have something to do with it
03:36 kanl that perhaps is by design, since programs don't necessarily break up output by newline.
03:37 ugexe its not by design
03:41 ugexe maybe its fixed now. i cant find the comment in the moar repo :)
03:41 atroxaper joined #perl6
03:47 geekosaur joined #perl6
03:48 tinyblak_ joined #perl6
04:01 tinyblak joined #perl6
04:05 kanl ugexe: thanks much. encapsulation with class would indeed be a workaround for my problem. but i'd still like to know for sure :)
04:10 diakopter joined #perl6
04:10 lsm-desktop joined #perl6
04:10 diakopter heya, t/04-nativecall/02-simple-args.t and t/04-nativecall/03-simple-returns.t fail on my USB Armory build
04:12 diakopter also t/04-nativecall/13-union.t
04:13 diakopter summary report: https://gist.github.com/dia​kopter/a280c203bc1bbc871fd8
04:14 diakopter fyi, uname -a says  Linux usbarmory 4.0.2 #2 PREEMPT Thu May 7 15:59:08 CEST 2015 armv7l GNU/Linux
04:15 vendethiel joined #perl6
04:20 tinyblak joined #perl6
04:28 atroxaper Is there something like @list.contains('a'); ?
04:30 atroxaper 'a' ~~ any(@list)
04:33 dalek DBIish: b8260de | hoelzro++ | t/99-common.pl6:
04:33 dalek DBIish: Verify that a query with no results has a falsy value
04:33 dalek DBIish: review: https://github.com/perl6/DBIish/commit/b8260dee08
04:33 dalek DBIish: fbe5826 | hoelzro++ | lib/DBDish/Pg.pm6:
04:33 dalek DBIish: Return an empty Parcel if we have no results in Pg
04:33 dalek DBIish:
04:33 dalek DBIish: Otherwise, fetchrow-hash ends up being a non-falsy value
04:33 dalek DBIish: review: https://github.com/perl6/DBIish/commit/fbe5826003
04:33 dalek DBIish: 03738e3 | hoelzro++ | t/99-common.pl6:
04:33 dalek DBIish: Make sure exhausted statements have falsy results
04:33 dalek DBIish: review: https://github.com/perl6/DBIish/commit/03738e3805
04:33 dalek DBIish: 2cfecb9 | moritz++ | / (2 files):
04:33 dalek DBIish: Merge pull request #12 from hoelzro/master
04:33 dalek DBIish:
04:33 dalek DBIish: Fix bug where Pg driver would still have truthy results from fetchrow-hash
04:33 dalek DBIish: review: https://github.com/perl6/DBIish/commit/2cfecb9d83
04:34 kaare_ joined #perl6
05:03 FROGGS_ diakopter: can you gist details of the test runs?
05:05 tinyblak_ joined #perl6
05:24 laouji joined #perl6
05:26 laouji joined #perl6
05:30 vendethiel joined #perl6
05:46 Psyche^ joined #perl6
05:55 grondilu more spaceships :-)  http://grondilu.github.io/oolite/ships.html
05:55 grondilu I rewrote the Perl6 script for mesh conversion and it's much more robust apparently.
05:56 rurban joined #perl6
06:02 aindilis joined #perl6
06:06 yeahnoob joined #perl6
06:10 diana_olhovik_ joined #perl6
06:12 gfldex joined #perl6
06:25 atroxaper joined #perl6
06:29 RabidGravy joined #perl6
06:31 RabidGravy marnin
06:31 atroxaper RabidGravy: o/
06:33 _mg_ joined #perl6
06:39 [particle] joined #perl6
06:46 domidumont joined #perl6
06:51 domidumont joined #perl6
06:53 laouji joined #perl6
06:54 geekosaur joined #perl6
06:57 dalek roast: 305ca31 | usev6++ | S17-promise/basic.t:
06:57 dalek roast: Add test for RT #125257
06:57 dalek roast: review: https://github.com/perl6/roast/commit/305ca31ff7
06:57 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125257
07:02 zakharyas joined #perl6
07:11 cdc Hello #perl6
07:11 cdc m: say "cdc".trans(:c<d>)
07:11 camelia rakudo-moar 7b5256: OUTPUT«cdc␤»
07:11 cdc say "cdc".trans('c' => 'd')
07:11 cdc m: say "cdc".trans('c' => 'd')
07:11 camelia rakudo-moar 7b5256: OUTPUT«ddd␤»
07:12 espadrine joined #perl6
07:13 cdc is it expected ^ (it doesn't work when using adverbial form of Pair) ?
07:13 moritz cdc: yes; with the adverbial form, it's passed as a named argument, with 'c' => 'd' it's passed a positional argument that happens to be pair
07:14 moritz and .trans expects the substitutions as positionals
07:14 cdc moritz: oops, my bad. Thanks!
07:14 moritz m: say "cdc".trans((:c<d>)) # another way to make it a positional
07:14 camelia rakudo-moar 7b5256: OUTPUT«ddd␤»
07:18 masak morning, #perl6
07:19 masak ...and "interface consistency" prevents us from showing a warning instead of silently swallowing the named... :)
07:20 Ven joined #perl6
07:21 * moritz finds that ":(", not ":)"
07:22 moritz good morning, masak
07:22 masak I was trying to give it a positive spin... :)
07:22 masak I don't want to be seen mindlessly bashing interface consistency, because I see the point of it, and I don't have a better idea.
07:24 moritz well, I don't really see the point
07:24 moritz one has to be mindful of the signatures of the methods one calls
07:25 moritz why should be that different for methods from superclasses?
07:25 masak because nameds are optional
07:25 g4 joined #perl6
07:25 moritz so what?
07:25 moritz you still have to adhere to the API you use
07:26 * masak mumbles while he tries to construct a coherent argument
07:27 masak by S12: "so that C<nextsame> semantics work consistently."
07:27 masak m: class C {}; class D hides C {}
07:27 camelia rakudo-moar 7b5256: ( no output )
07:27 masak huh :)
07:27 masak TIL.
07:28 moritz IMHO nextsame is a weak argument
07:28 masak yes, possibly
07:28 moritz if you add an option you want to process, but don't pass on to the parent classes' method, you can just say   method new(:$foo, *%rest) { process($foo); nexwith |%rest }
07:28 ShimmerFairy I have always said that the implicit *%_ is kinda dumb. Am I hearing people agree with me? :)
07:29 masak we could try it today. make a Rakudo branch and rip out the implicit *%_. see what happens.
07:29 masak suggested branch name: `interface-inconsistency` :P
07:29 moritz masak: I have to $dayjob, but if you do it, I'd be very happy :-)
07:29 ShimmerFairy masak: fwiw, I've ONLY ever seen people tripped up by implicit *%_ , and never thankful for it instead.
07:29 masak moritz: I'll try.
07:29 masak ShimmerFairy: indeed.
07:30 moritz ShimmerFairy: but that's confirmation bias; you don't notice it when it saves your butt
07:30 masak moritz++ # bias alert
07:30 ShimmerFairy moritz: I've never understood how it could save my butt in the first place. "nextsame" is a weak and vague argument.
07:30 ShimmerFairy moritz: I get the bias of course, but I've never seen a concrete example of how implicit *%_ is useful.
07:31 moritz ShimmerFairy: well, one valid argument might be mutli inheritance; it saves you the hassle to figure out which adverbs to pass to which of the parent classes methods
07:31 masak could also be something with multis spread across the inheritance hierarchy
07:31 kanl repeating a previous question, is it by design or a bug that Proc::Async stdout does not tap output in its entirety? ( i thought it's neither )
07:32 ShimmerFairy If that's something you need to worry about, you can always specify your own *% var :)
07:32 moritz kanl: sounds like a bug
07:32 moritz ShimmerFairy: well, the author of the parent classes would need to do that
07:32 masak kanl: please submit an issue on the project with pertinent details
07:33 moritz or maybe it should be the caller that decides that extra named args should be ignored
07:33 kanl masak: do you mean opening a bug? just making sure.
07:33 moritz "I'm passing you a bunch of stuff, but I don't mind if you throw some of it away"
07:33 masak kanl: yes.
07:33 kanl thanks. will do.
07:34 ShimmerFairy masak: speaking of wrecking interface consistency, I still haven't gotten an explanation for the change in spelling of MONKEY_TYPING :) . (In case you didn't catch it, my brain basically considers _ an uppercase - in Perl6-land)
07:35 moritz ShimmerFairy: well, I don't consider _ an uppercase -
07:35 moritz and it's the first time I've heard that connection
07:35 moritz *about
07:35 masak I agree with ShimmerFairy
07:35 ShimmerFairy moritz: on my US keyboard, Shift+- leads to _ , so when I can use - in identifiers too, it's bound to happen :)
07:35 masak but I'm too tired to fight the tide of ridiculous renaming
07:36 ShimmerFairy masak: I know bikeshedding is a useless game, I just want to know why the shed is suddenly a different color, considering the last one wasn't bad to my eyes. :)
07:37 masak ShimmerFairy: enough people seem to agree that FOO-BAR is preferable in Perl 6 core to FOO_BAR
07:37 masak that's it.
07:37 ShimmerFairy Enough people aren't bothered with changing the pressed state of their shift key mid-term, then :P
07:37 masak seems not
07:38 ShimmerFairy I personally think it's such a useless thing to change for allcaps names that I kinda want to fight just as strongly for the superior choice, despite the fact that it's a useless thing to change :P
07:38 masak be my guest
07:39 ShimmerFairy Like I said last night, MONKEY-TYPING looks weird to me kinda like how something like SYSTeM would.
07:40 ShimmerFairy I think for now, the best course would be to keep asking people _why_ the hyphen is better in all-caps names :)
07:40 RabidGravy I think TimToady may have suggested last night that it was decided precisely because it is harder to type
07:40 masak I don't like that argument, even if it was TimToady who made it.
07:40 RabidGravy in that particular case
07:41 masak interesting. a bunch of methods in Temporal.pm explicitly declare *%_
07:41 ShimmerFairy Well, not only is it not harder (which is why it's such a paradoxically useless thing for me to keep arguing about), it's also not how you discourage usage
07:41 masak all of them are .new and .clone methods
07:41 moritz masak: those that pass them along to other methods
07:41 ShimmerFairy RabidGravy: I'd prefer    use MONKEY_TYPING :yes-really; or something like that, for deterring usage.
07:41 DrForr Well, I prefer it because it makes it just that much clearer that you're using perl6 rather than perl5 and helps me to keep the two separated.
07:43 masak m: class C { method foo { say %_.perl } }; C.new.foo(:bar(42))
07:43 camelia rakudo-moar 7b5256: OUTPUT«{:bar(42)}<>␤»
07:43 RabidGravy I've never actually typed it so I don't really have any feelings about it all
07:44 ShimmerFairy .oO(The minorest changes require the majorest explanations, it seems.)
07:45 masak I'm not sure I'm familiar enough with the compiler code to rip out *%_
07:45 masak I'd be happy to have someone walk me through it
07:47 moritz masak: seems to me Perl6::World method create_signature_and_params
07:47 moritz unless @params[+@params - 1]<named_slurpy> || @params[+@params - 1]<is_capture> {
07:47 moritz unless nqp::can($*PACKAGE.HOW, 'hidden') && $*PACKAGE.HOW.hidden($*PACKAGE) {
07:47 moritz @params.push(hash(
07:47 moritz variable_name => '%_',
07:47 moritz nominal_type => self.find_symbol(['Mu']),
07:47 moritz named_slurpy => 1,
07:47 moritz is_multi_invocant => 1,
07:47 moritz sigil => '%'
07:47 moritz ));
07:47 moritz $lexpad[0].unshift(QAST::Var.new( :name('%_'), :scope('lexical'), :decl('var') ));
07:47 moritz $lexpad.symbol('%_', :scope('lexical'));
07:47 moritz }
07:47 moritz sorry, I underestimated the size of the paste
07:47 masak 's ok
07:47 masak moritz++
07:48 masak yes, that seems to be the one.
07:48 telex joined #perl6
07:48 * moritz grapped for %_ in src/Perl6/ and skimmed through the matches
07:48 moritz *grepped
07:49 masak I did too, but somehow missed that one
07:49 masak oh, there it is :)
07:50 masak m: class C { method foo(*%_, *@_) { say "OH HAI" } }; C.new.foo
07:50 camelia rakudo-moar 7b5256: OUTPUT«===SORRY!===␤Lexical '%_' already declared␤»
07:50 * masak submits rakudobug
07:50 masak the joys of reading source :>
07:52 masak S06:1105: sub duplicate($n, *%flag, *@data) {...}
07:52 synbot6 Link: http://design.perl6.org/S06.html#line_1105
07:52 masak so it's allowed.
07:53 abraxxa joined #perl6
07:53 ShimmerFairy m: class C { method foo(*%a, *@b) { say "OH HAI" } }; C.new.foo
07:53 camelia rakudo-moar 7b5256: OUTPUT«OH HAI␤»
07:56 masak m: class C { method foo(*%a, *@b) { say +%a; say +%_ } }; C.new.foo
07:56 camelia rakudo-moar 7b5256: OUTPUT«0␤0␤»
07:56 masak m: class C { method foo(*%a, *@b) { say +%a; say +%_ } }; C.new.foo(:bar)
07:56 camelia rakudo-moar 7b5256: OUTPUT«1␤1␤»
07:56 dayangkun joined #perl6
07:59 dakkar joined #perl6
08:12 kanl oops.. the [BUG] moniker is optional, apparently
08:12 kanl sorry about the dup.
08:13 masak the [BUG] thing causes RT to add a tag to the ticket, IIRC.
08:13 darutoko joined #perl6
08:14 kanl i see. another question regarding Proc::Async
08:14 kanl http://irclog.perlgeek.de/p​erl6/2015-06-30#i_10824513
08:15 * masak is no expert on channels/taps, unfortunately
08:15 kanl anyone please? :)
08:17 RabidGravy I'm not sure what the question is
08:17 ShimmerFairy masak: btw, one of my first (failed) attempts at multithreading was a DLX solver, because no way am I waiting two weeks to generate the number of hexslide boards. Too bad I didn't get to try hexslide boards with it
08:18 masak RabidGravy: the link above, one step before the linked thing
08:18 ShimmerFairy (the solver worked, just not when you tried multithreading it :P)
08:18 masak ShimmerFairy: I can see how multithreading DLX would open a can of hurt, yes.
08:18 kanl RabidGravy: in ugexe++'s code example, should i be worried about output being interleaved?
08:19 kanl since .tap does not guarantee contention free
08:19 ShimmerFairy masak: funny enough, it still worked after making it fit with multithreading, but only so long as I told the thread manager to limit itself to one thread.
08:19 kanl RabidGravy: stdout and stderr both updating the same string could be a race , no?
08:21 masak ShimmerFairy: that means you didn't get the threading right :P
08:21 brrt joined #perl6
08:21 ShimmerFairy it also means I didn't fundamentally break the solver part when reworking it for threads :P
08:21 masak ShimmerFairy: part of the benefit of DLX is that you can do everything on a single data structure without allocating anything new during processing. I'm not sure that's true anymore for a multithreaded program.
08:22 ShimmerFairy but it's sooo sloooow for even moderately-sized inputs
08:22 masak the Perl 6 version, maybe.
08:22 masak the C version is blazingly fast.
08:24 ShimmerFairy masak: not for my C++ version (to be fair, my patience for stuff doesn't last the hour or so moderate inputs start reaching, it feels like I did something wrong with the code if it's gonna take that long)
08:24 masak ShimmerFairy: combinatorial problems are like that. they get slow for quite small N.
08:24 [TuxCM] joined #perl6
08:25 kerb joined #perl6
08:25 masak heh -- reading https://github.com/masak/dlx-simple I feel like getting back to the vision specified therein.
08:25 ShimmerFairy masak: I remember Knuth's paper on DLX mentioning how more-specialized algorithms are always better, so that's made me want to know what the specialized algorithm for hexslide is :)
08:27 RabidGravy kanl, I don't think there is a race condition inasmuch as the capturing is done in a Lock.protect but I'm struggling to follow the code right now
08:31 kanl with the current bug with stdout/stderr's tap, interleaving should definely occur. but that's another problem besides race.
08:31 kanl (if there is a race at all)
08:35 kanl if the taps on stdout and stderr are on different supplies, and there's no lock between the two, then i'd worry about race, in said situation, where the same string is updated by both taps.
08:36 abraxxa joined #perl6
08:37 kanl it may be extremely rare to run into, since most programs don't output stdout and stderr at the same time. but it could/should occur, if my conjecture is right..
08:37 lizmat have you tried using .act instead of .tap ?
08:38 lizmat .act is guaranteed to only run in only one thread at a time
08:38 kanl i would use .act, but it's not my code :)
08:40 lizmat afk again&
08:40 kanl lizmat: but yes, you answered my question/consider, thanks.
08:43 kanl *concern* even.
08:44 amurf joined #perl6
08:45 masak lizmat++
08:46 kanl lizmat++ of course :)
08:48 Ven joined #perl6
08:49 kanl it would be nice for Proc::Async's documentation to advise on the use of act instead of tap in said situation.
08:49 kanl http://doc.perl6.org/type/Proc::Async makes no mention of act :/
08:51 atroxaper joined #perl6
08:51 jnthn morning, #perl6
08:51 yoleaux 29 Jun 2015 22:51Z <TimToady> jnthn: I'm fine with the default FAILGOAL backtracking
08:51 jnthn \o/
08:51 masak jnthn! \o/
08:52 itz joined #perl6
08:52 itz morning
08:52 jnthn On the "can I have a bunch of threads that each write to a different array element" in the backlog
08:52 jnthn 1) Only if it's a fixed size array ("implemented soon!")
08:52 jnthn 2) But don't do it anyway, because false sharing.
08:53 * kanl *nods*, jnthn++
08:58 nwc10 good UGT jnthn
08:58 nwc10 good UGT itz
08:58 nwc10 and everyone else I've missed
08:58 nwc10 jnthn: why is that particualrly  \o/ ?
08:59 jnthn nwc10: Because it means I can fix the second-oldest RT ticket in the Perl 6 queue
09:00 espadrine joined #perl6
09:01 nwc10 ah OK
09:04 Ven joined #perl6
09:05 bartolin jnthn: you mentioned RT #81682 yesterday and tagged it 'testneeded'. ISTR looking at it earlier and wondering whether binding to a typed array with a container of a wrong type is really ok ...
09:05 synbot6 Link:  https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=81682
09:05 bartolin m: my Int @a = 1, 2, 3; my Str $x = "foo"; @a[0] := $x; say @a[0];
09:05 camelia rakudo-moar 7b5256: OUTPUT«foo␤»
09:05 bartolin m: my Int @a = 1, 2, 3; @a[0] := "foo"; say @a[0];
09:05 camelia rakudo-moar 7b5256: OUTPUT«foo␤»
09:05 bartolin there is also RT #123769 which states that the second evaluation should die with X::TypeCheck
09:05 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=123769
09:06 jnthn bartolin: Then I'd leave that "should crash" case to the ticket covering it, and close this one by adding tests for the cases that shouldn't crash, but used to
09:07 bartolin jnthn: sounds good, will do that. thanks for looking
09:07 atroxaper joined #perl6
09:12 bin_005 joined #perl6
09:18 RabidGravy I think the weather precludes making software today  -> seaside
09:18 nwc10 Whistable?
09:18 RabidGravy I think so, it would be rude not to
09:18 nwc10 :-)
09:18 nwc10 have fun
09:18 RabidGravy :)
09:23 itz hmm I think there is some Proc::Async oddness on OS X only
09:24 kanl itz: https://gist.github.com/ano​nymous/79a7e59cf3160f6ac09e
09:25 kanl i run ubuntu
09:25 kanl observe line 58 on test output
09:26 itz ah I would have missed that
09:28 itz I'm seeing "Use of Nil in numeric context  in block  at lib/Panda/Builder.pm:125" on OS X and not debian stable
09:32 AlexDaniel joined #perl6
09:42 JimmyZ_ joined #perl6
09:47 itz I think my issue is different
09:49 kanl joined #perl6
09:54 uncleyear joined #perl6
09:55 itz #125516: "Use of Nil in numeric context" warning seen with Proc::Async exitcode on OS X Ony
09:55 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125516
10:08 smls joined #perl6
10:08 smls Is is possible that HTTP::UserAgent sometimes gives back mangled
10:08 smls response content?
10:08 tadzik is it reproducible?
10:09 smls For example: https://gist.github.com/smls/00da52790c206c448a25
10:09 smls tadzik: No, seems to only happen sometimes
10:09 tadzik :|
10:09 smls that example content is from http://rosettacode.org/wiki/Rosetta_Code/Rank_​languages_by_popularity#Perl_6:_Using_the_API
10:10 smls [add a  spurt "rosetta-{(^1000).pick}.json", $response.content;   line before the from-json line, and run it a few times]
10:12 smls It wouldn't be Mediawiki *sending* that broken content, would it?
10:15 smls btw, timotimo: this^^ means I was probably wrong to think JSON::Fast had bugs, it was probably just a matter of broken inputs.
10:18 * sjn sees a couple failing tests on Linux Jolla 3.4.106.20150416.1 #1 SMP PREEMPT Thu Apr 23 02:16:13 UTC 2015 armv7l armv7l armv7l GNU/Linux
10:20 cognominal joined #perl6
10:28 smls tadzik: It doesn't happen in the majority of runs, but still frequently enough that you could call it sort-of-reprodicible... :P
10:29 tadzik sjn: spectests?
10:29 sjn no, regular make test
10:30 sjn I'm filing a rakudobug atm
10:30 tadzik oh, so you got rakudo to run, awesome :)
10:31 brrt joined #perl6
10:32 sjn the bugs are all NativeCall related
10:34 amurf joined #perl6
10:45 tinyblak joined #perl6
10:47 atroxaper joined #perl6
10:52 dalek roast: 8dd0ebb | usev6++ | S09-typed-arrays/arrays.t:
10:52 dalek roast: Add test for RT #81682
10:52 dalek roast: review: https://github.com/perl6/roast/commit/8dd0ebb164
10:52 synbot6 Link:  https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=81682
11:06 DrForr sjn: Oh? I'm using it for readline, what have you encountered?
11:15 sjn DrForr: not much, this was just something I encountered when building/installing rakudo on my phone
11:17 DrForr "just" the man says :)
11:20 vendethiel joined #perl6
11:23 tinyblak joined #perl6
11:23 hoelzro_trying_w joined #perl6
11:23 masak sjn++ # because who wouldn't want Perl 6 on their phone
11:24 timotimo kanl, ugexe, we run Proc::Async on the event loop, the tapped code runs there as well
11:24 timotimo at least to my understanding
11:24 jnthn Nope
11:24 timotimo oh, okay
11:24 timotimo that's good to know :)
11:24 hoelzro joined #perl6
11:24 jnthn The event loop puts the code to run into the scheduler's queue
11:24 timotimo er, i meant to say: the stdout/stderr reading
11:24 jnthn It is then executed.
11:25 timotimo i think i don't know how exactly ".tap" "scopes" its exclusivity
11:25 jnthn .tap doesn't, it's .act that enforces "one at a time"
11:25 timotimo er, that's the one i meant
11:26 jnthn Though arguably we should enforce one-at-a-time semantics for I/O things by default
11:26 jnthn Certainly I'd prefer it be that way
11:27 timotimo so the stdout_bytes/stdout_chars/... would just do a .act( { $_ } ) appended to it before returning the supply users could tap?
11:27 timotimo would that be enough at all?
11:27 timotimo probably not
11:27 jnthn Well, I'd like to take a leaf from RxJava and introduce some explicit serialize/parallelize operators, I think.
11:28 jnthn But the I/O ones also need to care about the sequence number stuff
11:30 * jnthn should spend some time on this stuff, but wants to focus on multi-dim/fixed size array stuff more immediately.
11:30 timotimo right
11:33 Sqirrel joined #perl6
11:47 vendethiel joined #perl6
11:47 govt joined #perl6
12:04 masak I am happy to report that the Perl 6 version of dlx-solver has not bitrotted. \o/
12:04 timotimo that's cool
12:12 masak I only needed to change one `is_deeply` to `is-deeply`. but all the tests passed and everything.
12:13 masak that's for a non-trivial project that I last touched in 2012.
12:13 jnthn Much wow.
12:20 brrt \o/
12:28 domidumont joined #perl6
12:29 itz joined #perl6
12:30 nys joined #perl6
12:34 dalek roast: d81f538 | (Steve Mynott)++ | S (4 files):
12:34 dalek roast: throws_like changed to throws-like
12:34 dalek roast: review: https://github.com/perl6/roast/commit/d81f538833
12:40 smls m: for Grammar.^methods { say .name; $_ ~~ Any }
12:40 camelia rakudo-moar 7b5256: OUTPUT«parse␤subparse␤parsefile␤FAILGOAL␤Invocant requires a 'Failure' instance, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/i0y3DW29lg:1␤␤»
12:40 smls ^^ jnthn, did you make any progress with the NPQ methods leaking out through Grammar?
12:40 vendethiel joined #perl6
12:41 jnthn smls: Not yet
12:41 jnthn smls: Well, but they should in theory get exposed as a ForeignRoutine or so
12:42 smls m: for Grammar.^methods { say .name; say .WHAT }
12:42 camelia rakudo-moar 7b5256: OUTPUT«parse␤(Method)␤subparse␤(Metho​d)␤parsefile␤(Method)␤FAILGOAL␤Method 'gist' not found for invocant of class 'NQPRoutine'␤  in block <unit> at /tmp/XjDrUydDJR:1␤␤»
12:42 [Sno] joined #perl6
12:42 smls heh
12:43 jnthn Yeah, that's the issue...the NQP object is sneaking into Perl 6 land.
12:45 smls Should I open a rakudobug for it?
12:45 jnthn Can do
12:45 smls ok
12:46 jnthn We'd kinda like the introspection to work out there
12:53 atroxaper joined #perl6
12:58 tony-o that is the same problem with the grammar debugger :-)
13:02 smls tony-o: Exactly
13:04 Ven joined #perl6
13:09 vendethiel joined #perl6
13:12 aborazmeh joined #perl6
13:12 aborazmeh joined #perl6
13:13 notch joined #perl6
13:17 zakharyas joined #perl6
13:18 tinyblak joined #perl6
13:22 diana_olhovik joined #perl6
13:31 sjn_phone_ joined #perl6
13:38 dalek roast: 1d14062 | (Steve Mynott)++ | S02-names/pseudo.t:
13:38 dalek roast: $*PROGRAM_NAME is now $*PROGRAM-NAME
13:38 dalek roast: review: https://github.com/perl6/roast/commit/1d14062f1a
13:40 tony-o m: $*PROGRAM-NAME.say;
13:40 camelia rakudo-moar 7b5256: OUTPUT«/tmp/1k1WwHXDNA␤»
13:42 Possum joined #perl6
13:44 atphalix joined #perl6
13:47 smls What exactly is the purpose of $*PROGRAM-NAME if we already have $*PROGRAM.basename ?
13:48 Ven m: '3' ~~ /$<x>=\d/; say :$<x>
13:48 camelia rakudo-moar 7b5256: OUTPUT«Unexpected named parameter 'x' passed␤  in block <unit> at /tmp/IniAUAtHbm:1␤␤»
13:48 Ven m: '3' ~~ /$<x>=\d/; say $<x>
13:48 camelia rakudo-moar 7b5256: OUTPUT«「3」␤»
13:49 tony-o m: say $*PROGRAM.basename
13:49 camelia rakudo-moar 7b5256: OUTPUT«6vO7iPBRDR␤»
13:49 smls if  $*PROGRAM.basename  is for some reason not safe or desirable, maybe $*PROGRAM should be an object instead (lie $*USER and $*KERNEL) so one would write  $*PROGRAM.name  vs  $*PROGRAM.path
13:50 tony-o m: say $*PROGRAM.WHAT
13:50 camelia rakudo-moar 7b5256: OUTPUT«(IO::Path)␤»
13:50 JimmyZ_ joined #perl6
13:50 tony-o m: say $*PROGRAM-NAME.WHAT
13:50 camelia rakudo-moar 7b5256: OUTPUT«(Str)␤»
13:50 tony-o m: say $*PROGRAM.path
13:50 camelia rakudo-moar 7b5256: OUTPUT«/tmp/fLqgG9rjtG␤»
13:50 smls Having both $*PROGRAM and $*PROGRAM-NAME though, seems like unclean API design
13:51 tony-o smls++  . program name can be coerced from program it looks like
13:51 tony-o maybe there is a difference depending on how theyre started?..
13:51 JimmyZ_ joined #perl6
13:52 smls $*PROGRAM.basename works even for one-liners (it returns "-e", like $PROGRAM-NAME)
13:53 smls a special $*PROGRAM object could have the luxury of setting its .name to an undefined value in that case, which would be cleaner
13:53 smls (because one could in theory have a real file named -e)
13:53 skids joined #perl6
13:53 smls $*PROGRAM.gist/.Str could still return "-e" for one-liners
13:55 smls ^^ lizmat?
14:00 lizmat fwiw, I only inherited this design, am not sure as to the rationale
14:00 * jnthn refrains from a pun about preferring composition over inheritance :P
14:02 yary joined #perl6
14:02 jnthn (And agrees it's a little odd that we have the two)
14:06 smls m: class A does Positional { has @!a is rw; method AT-KEY ($k) { @!a[$k] }; method ASSIGN-KEY ($k, $v) { @!a[$k] = $v } }; my @x := A.new; @x[0] = 42; dd @x.a
14:06 camelia rakudo-moar 7b5256: OUTPUT«Potential difficulties:␤    useless use of 'is rw' on @!a␤    at /tmp/edMtqncF7r:1␤    ------> 3class A does Positional { has @!a is rw7⏏5; method AT-KEY ($k) { @!a[$k] }; method␤Cannot modify an immutable A␤  in block <unit> at /tmp/edMtqn…»
14:06 smls ^^What am I missing?
14:07 atphalix left #perl6
14:07 lizmat m: class A does Positional { has @!a; method AT-KEY ($k) { @!a[$k] }; method ASSIGN-KEY ($k, $v) { @!a[$k] = $v } }; my @x := A.new; @x[0] = 42; dd @x.a
14:07 camelia rakudo-moar 7b5256: OUTPUT«Cannot modify an immutable A␤  in block <unit> at /tmp/w33f3E9oYj:1␤␤»
14:07 timotimo m: class test { has @!a is rw }
14:07 camelia rakudo-moar 7b5256: OUTPUT«Potential difficulties:␤    useless use of 'is rw' on @!a␤    at /tmp/sjRGfolOar:1␤    ------> 3class test { has @!a is rw 7⏏5}␤»
14:07 timotimo you shouldn't need the "is rw" there, but it shouldn't give that error either
14:07 smls d'oh, gotta use -POS instead of -KEY
14:07 jnthn It's not an error, it's a warning. Also, it's correct.
14:07 * smls bangs head
14:08 timotimo oh!
14:08 lizmat smls: indeed, duh  -)
14:08 jnthn smls: It took me as long as you to notice it :)
14:08 timotimo i thought the "is rw" gave the "cannot modify an immutable A" error
14:09 jnthn timotimo: Ah, no :)
14:09 timotimo that would have been very strange indeed
14:10 * [Coke] notes that [BUG] does indeed add the bug tag, but doubt anyone except maybe masak searches RT that way.
14:10 smls On that matter, is there any chance Rakudo could be made to assume
14:10 smls method ASSIGN-KEY (\k, \v) { $.AT-KEY(\k) = \v }
14:11 smls if AT-KEY is implemented but ASSIGN-KEY isn't?
14:11 smls so simple use-cases would only have to implement one of them
14:11 jnthn smls: I think it already does.
14:11 smls oh?
14:12 jnthn At least, I'm pretty sure I made it that way when I added the ASSIGN- variant.
14:12 amurf joined #perl6
14:12 jnthn Since it's an opt-in optimization
14:12 jnthn Yes, in Any:
14:12 jnthn multi method ASSIGN-KEY(\SELF: \key, Mu \assignee) {
14:12 jnthn SELF.AT-KEY(key) = assignee;
14:12 jnthn }
14:12 timotimo maybe smls is inheriting a method ASSIGN-KEY from a different class or role in the hierarchy?
14:13 yary joined #perl6
14:14 smls m: class A does Associative { has %.a; method AT-KEY ($k) { %!a{$k} } }; my %x := A.new; %x<foo> = 1; dd %x.a
14:14 camelia rakudo-moar 7b5256: OUTPUT«Cannot modify an immutable Any␤  in block <unit> at /tmp/KM3SfO7caS:1␤␤»
14:14 dalek rakudo/nom: b2d6d02 | lizmat++ | src/core/Proc.pm:
14:14 dalek rakudo/nom: Add hex status report for more clarity
14:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b2d6d02fa3
14:14 lizmat with that, on the JVM and OS X I get:
14:14 lizmat $ perl6-j t/spec/S32-temporal/Date.t
14:14 lizmat ===SORRY!===
14:14 lizmat Unable to execute 'sw_vers' (ff00)
14:15 lizmat hopes this helps FROGGS
14:15 jnthn smls: "is rw" on your AT-KEY
14:16 smls ah, right.
14:16 jnthn We probably should capture this knowledge into p6doc somewhere :)
14:17 yary rakudo:my $y=multi foo (Int $x) { $x + 1 }; say "multifoo \$y=",$y(5)
14:17 timotimo is there any way we can annotate the Any that was returned from AT-KEY so that we can say "made read-only by ..."?
14:17 jnthn timotimo: no
14:18 timotimo thought so
14:18 jnthn Not unless you want to utterly hose performance :P
14:18 smls maybe the compiler could detect you trying to assign to the return value of a non-rw routine though?
14:19 timotimo it'd be neat to have an extra-verbose mode that you can start if you're looking for some problem like that, but i can't see how that would possibly help rather than just spamming the user with loads of diagnostic messages
14:19 sqirrel_ joined #perl6
14:19 jnthn smls: It's a method in this case, but for routines yes.
14:20 smls ah, right, methods are completely dynamic
14:20 timotimo "method" in this case means we can't compile-time-analyze it
14:20 timotimo yeah
14:21 timotimo we can potentially do it in spesh, but spesh only runs after the code has been hit a few times, and in such cases you'd've already exited the program before spesh would come into play
14:21 jnthn Well, it's more like the profiler thing
14:22 jnthn Well, a key part of the original OO definition was "extreme late binding"
14:23 jnthn Then C++ and Java were invented and many people forgot that, and started putting process boundaries into their systems to recover the late binding... :P
14:23 jnthn </oversimplified-history>
14:23 timotimo i don't remember that o_O
14:24 timotimo hm, yeah, methods have to be known at compile-time in java and c++, don't they ...
14:24 jnthn Right. :)
14:25 timotimo that way lies performance from AOT compilation
14:26 jnthn Oh, for sure.
14:26 Ven joined #perl6
14:29 RabidGravy joined #perl6
14:29 smls m: class A does Positional { has @.a = [2, 4], [6, 8]; method AT-POS ($k) is rw { dd $k; @!a[$k] }; }; my @x := A.new; @x[1; 1] = 42; dd @x.a
14:29 camelia rakudo-moar 7b5256: OUTPUT«$k = 1␤@!a = [[2, 4], [6, 42]]<>␤»
14:29 smls So AT-POS abstracts the multi-dimensionality too?
14:30 smls I can't get the full index (1; 1) at once in AT-POS?
14:31 jnthn smls: Not *yet*, but I'll be working on multi-dim stuff soon
14:31 jnthn smls: So expect changes there
14:31 smls ok
14:31 jnthn (I don't quite know what design I want yet.)
14:31 smls was just wondering if one could make a more idiomatic API for http://rosettacode.org/wiki/Bitmap#Perl_6
14:32 smls my $b = Bitmap.new(width => 10, height => 10);  my $b[5; 5] = Pixel.new( R => 100, G => 200, B => 0)
14:32 smls ^^like that
14:32 timotimo well, postcircumfix:<[ ]> is a multi sub
14:32 timotimo you could implement that for Bitmap
14:33 jnthn Yeah, exporting a postcircumfix is the best way at the moment
14:33 smls yeah, but then you'll have to re-implement *everything* [ ] does
14:33 smls e.g. ranges
14:33 jnthn But...I think we need better
14:33 jnthn As in, I think an object should be able to handle multiple dimensions.
14:34 timotimo yes
14:34 smls yeah
14:34 jnthn Since we'll need that for my int @matrix[3,3] or so
14:34 jnthn Which should allocate one blob of memory for storage
14:34 smls method AT-POS ($scalar)  vs  method AT-POS (@list)   ?
14:34 jnthn It may end up being that
14:35 jnthn Type distinctions work well for us, since loads of our opts hang of type specialization :)
14:35 jnthn *off
14:35 timotimo can we have the possibility to specify the exact alignment of rows/cols? also, C vs pascal index order?
14:38 smls Also, is there any advantage of writing   method AT-KEY (\key)   instead of   method AT-KEY ($key)   currently?
14:38 smls Rakudo itself seems to prefer the former
14:39 smls s/prefer/use/
14:39 smls e.g. which should be recommended to p6doc readers?
14:42 atroxaper joined #perl6
14:44 jnthn The $ form, most probably
14:45 smls ok
14:45 jnthn shopping &
14:46 Araq joined #perl6
14:50 gfldex joined #perl6
14:50 sjn_phone_ joined #perl6
14:53 dalek roast: 806ed2b | coke++ | S09-typed-arrays/arrays.t:
14:53 dalek roast: fix typo
14:53 dalek roast: review: https://github.com/perl6/roast/commit/806ed2b9c9
14:53 hoelzro morning #perl6
14:58 coffee` joined #perl6
15:00 masak ahoy hoelzro
15:00 hoelzro o/ masak
15:05 smls m: class A does Positional { has @.a = 2, 4, 8; method AT-POS ($k) is rw { dd $k; @!a[$k] }; }; my @x := A.new; @x[*-1] = 42; dd @x.a
15:05 camelia rakudo-moar b2d6d0: OUTPUT«$k = 0␤@!a = [42, 4, 8]<>␤»
15:05 smls jnthn: How would one make *-1 indexes work for a custom type? ^^
15:07 masak m: class A does Positional { has @.a handles <elems> = 2, 4, 8; method AT-POS ($k) is rw { dd $k; @!a[$k] }; }; my @x := A.new; @x[*-1] = 42; dd @x.a
15:07 camelia rakudo-moar b2d6d0: OUTPUT«$k = 2␤@!a = [2, 4, 42]<>␤»
15:07 masak smls: ^^
15:08 smls ah, elems
15:08 masak that was literally the first thing that came to mind. glad it worked.
15:08 masak m: class A {}; say A.new.elems
15:08 camelia rakudo-moar b2d6d0: OUTPUT«1␤»
15:08 smls shouldn't it throw an error though if it is not defined?
15:08 smls rather than pretend that 0 was passed
15:08 masak when you don't override .elems somehow, you get the one from Any
15:08 smls ah
15:09 masak see eval above.
15:09 masak I was kinda hoping that either `handles Positional` or `handles Array` would DTRT, but they didn't.
15:11 cognominal_ joined #perl6
15:14 smls it's kind of a WAT though
15:16 dalek roast: 9f658bf | (Steve Mynott)++ | / (3 files):
15:16 dalek roast: fix some more RAKUDO_DEPRECATIONS_FATAL=1
15:16 dalek roast: review: https://github.com/perl6/roast/commit/9f658bf6ad
15:16 Araq left #perl6
15:16 masak all I'm thinking is "hey, you managed to create your own custom Positional class, and you're complaining that you have to write a `handles` to get it to work?"
15:16 masak :P
15:16 smls 1) module implementor implements *-KEY, doesn't think of implementing elems as well
15:16 smls 2) downstream code uses objects of that type like arrays, everything works
15:16 smls 3) downstream code refactor naievely introduces a *-1 index --> silenly procuces wrong result
15:17 smls it's not the "getting it work" I have a problem with, but the "fails to throw an exception if you forgot"
15:17 masak smls: how would you like it to work?
15:18 smls So that $foo[*-1] throws an exception if $foo's class did not intentionally specify how to get its number of elements
15:19 masak this is why AT-POS exists, so thate the implementor doesn't have to re-implement Whatever-based indexing, ranges, etc.
15:19 jnthn Yeah, but they still have to remember to implement elems...
15:19 masak that*
15:20 jnthn But I think it's fair enough
15:20 masak me too.
15:20 jnthn It's not like you go implementing a collection type every day.
15:20 smls I guess
15:20 vendethiel joined #perl6
15:21 JimmyZ__ joined #perl6
15:21 [Coke] A writeup on how to do it for a tutorial page in the docs would probably be awesome, though.
15:21 Alina-malina joined #perl6
15:22 masak it's rare to be knowledgeable enough to know about `does Positional` and `AT-POS`, but not about `elems` :)
15:22 jnthn [Coke]: Agree
15:22 jnthn Could go in the WANTED
15:24 smls I'm already planning such a write-up
15:25 smls Wondering if there's enough info to justify a full  /language/indexing  page describing both how the standard postcircumfixes can be used, and how to make them work for custom types.
15:25 MueThoS76 joined #perl6
15:26 masak yes, sounds nice.
15:26 [Coke] ++smls!
15:27 itz is make -j3 spectest or similar OK?
15:27 timotimo no
15:27 timotimo you use the env var TEST_JOBS instead
15:27 itz ty
15:27 timotimo yw :)
15:30 telex joined #perl6
15:30 khw joined #perl6
15:31 El_Che joined #perl6
15:34 |Tux| joined #perl6
15:34 |Tux| joined #perl6
15:40 masak why can't we also support `make -j3 spectest`, ooc?
15:41 [Coke] because prove.
15:42 masak I... see.
15:42 masak walk &
15:42 [Coke] it's one job as far as make is concerned. (you could theoretically have it set an env var based on the presence of -j, but then it's not going to work on windows)
15:42 [Coke] (because nmake has no -j)
15:48 JimmyZ_ joined #perl6
15:51 timotimo we'd have to have some way of splitting the spec test jobs up into multiple processes that nevertheless intercommunicate to give the final score of how many failures/successes/tests/todos/... we get
15:51 timotimo and to get a proper output of the tests being run and succeeding/failing without interleaving lines and such
15:53 diana_olhovik_ joined #perl6
15:53 JimmyZ_ rewrite prove by perl6'
15:53 JimmyZ_ s async...
15:54 Ven joined #perl6
15:58 ugexe ive nearly got an async prove done. just gotta tie up the grammar a bit more
16:00 captain-adequate joined #perl6
16:03 cognominal joined #perl6
16:03 ugexe calling method `t` on a file handle on windows fails with an ugly message: "Cannot find method 'isatty': no method cache and no .^find_method"
16:05 ugexe oh it does on linux as well. must be nyi
16:07 itz isatty isn't in moar it was in parrot there is an RT ticket open
16:07 AlexDaniel joined #perl6
16:08 itz I had a look at adding it but had no idea where to start
16:09 AlexDaniel joined #perl6
16:10 sjn_phone joined #perl6
16:12 [Coke] timotimo: or we could translate -j to TEST_JOBS
16:13 [Coke] (and let prove do the multi-threading)
16:20 [Sno] joined #perl6
16:22 uncleyear joined #perl6
16:26 isBEKaml joined #perl6
16:30 [Sno] joined #perl6
16:32 |Tux| joined #perl6
16:32 dalek roast: 8d84107 | (Steve Mynott)++ | S17-channel/earliest.t:
16:32 dalek roast: fix minor typo
16:32 dalek roast: review: https://github.com/perl6/roast/commit/8d8410763b
16:33 itz this maybe be news to everyone but "git grep" is very fast on repo checkouts
16:33 itz err maybe not be news I mean :)
16:34 JimmyZ_ never heard it before...
16:35 * jnthn tends to show it off a bit on git courses
16:35 jnthn Nice you can give it flags to control how much context you want also
16:35 vendethiel joined #perl6
16:43 smls ack is fast enough :P
16:45 itz git grep is something like 10x faster
16:46 smls does it support perl style regexes?
16:46 smls (i.e. PCRE)
16:47 itz nope but I came across https://github.com/ggreer/the_silver_searcher
16:48 itz actually it could be good to steal ideas for "ack6" or similar :>
16:49 smls ;)
16:50 smls yay, my distro has a package for the_silver_searcher
16:50 * sjn is running the spectests on armv7l
16:51 itz sjn: what hw is that?
16:52 python joined #perl6
16:53 JimmyZ__ joined #perl6
16:57 FROGGS joined #perl6
17:02 vendethiel joined #perl6
17:05 tadzik jolla phone, I think :)
17:06 tadzik exciting
17:06 tadzik there was this idea on OSDC to get KDE (Qt?) people to work on QML bindings for nativecall, did that work out?
17:12 Ven joined #perl6
17:16 Entonian joined #perl6
17:21 smls QML depends on on the bulk of Qt doesn't it?
17:22 smls so we'd need "normal" Qt binding first
17:22 spider-mario joined #perl6
17:23 sjn itz_: Jolla phone
17:24 sjn tadzik: nah
17:24 smls my 3 most wanted nativecall bindings:  1) libxml2  2) libcurl  3) Qt
17:24 FROGGS ohh yeah, I should continue on libxml2 :S
17:25 JimmyZ__ 4) DBI6
17:31 japhb smls: My most wanted nativecall bindings are to $day-job libraries, but that requires C++ binding.  I guess Qt does as well, come to think of it.  There's a branch for C++ binding, but IIRC it's not yet merged.
17:40 Ven joined #perl6
17:42 davido_ joined #perl6
17:47 timotimo i believe we can get rather far by using Inline::Python to get at PySide
17:49 amurf joined #perl6
17:50 DrForr I'm putting together OpenCV.
17:54 smls Some image loading/saving/editing library would be nice too - imlib2 or so.
17:55 smls But I don't have a real use-case for that right now besides rosettacode tasks
17:55 smls Perl 6 + libxml2/curl thogh, I'd actually use for productive things ;)
17:56 _mg_ joined #perl6
17:57 DrForr Imager has a C interface, and I've got some things waiting on unsigned ints..
17:58 brrt joined #perl6
18:01 timotimo don't we have an imlib2 binding already?
18:02 smls oh, looks like we do: https://github.com/mrhdias/perl6-Imlib2/
18:05 vendethiel joined #perl6
18:20 atroxaper joined #perl6
18:24 [Coke] we should probably remove "readline" from the R* release announcement if we're using linenoise
18:32 masak please do.
18:33 nys joined #perl6
18:38 dalek star: bf2232a | (Will Coleda)++ | docs/announce/2015.06.md:
18:38 dalek star: Update 2015.06.md
18:38 dalek star:
18:38 dalek star: Remove reference to readline, we're using linenoise
18:38 dalek star:
18:38 dalek star: (and unicode support seems OK)
18:38 dalek star: review: https://github.com/rakudo/star/commit/bf2232a14f
18:39 smls "non-blocking I/O (in progress)" - It is?
18:39 _mg_ joined #perl6
18:42 ugexe looks like not in the last year anyway https://github.com/rakudo/rakudo/blo​b/nom/src/vm/jvm/core/IOAsyncFile.pm
18:43 brrt hey, is S32-exceptions/misc.rakudo.moar known to fail
18:47 silug joined #perl6
18:51 vendethiel joined #perl6
18:57 ][Sno][ joined #perl6
18:58 run4flat joined #perl6
18:59 hoelzro http://elm-lang.org/blog/c​ompiler-errors-for-humans
19:00 hoelzro I think the community has done a pretty good job in this department since I started looking at Perl 6, but I think this is a neat read
19:00 leedo speaking of linenoise, should I have access to a history in the repl? or am i building something wrong?
19:02 brrt speaking of speaking
19:02 brrt i've just pushed a branch on moarvm with a libuv update
19:02 ugexe `language: perl6` is valid .travis.yml  now
19:03 brrt since any bugs can be notoriously platform-dependent, i'd appreciate it if anyone using a non-linux platform would care to run it through a spectest
19:03 FROGGS brrt: will check windows
19:04 brrt thanks :-)
19:04 smls leedo: If you install the Linenoise module (e.g. `panda install Linenoise`), then the REPL will use it automatically
19:05 smls Still doesn't remember history across sessions though.
19:05 leedo ah-ha, thanks!
19:06 tony-o m: $*OUT.t
19:06 camelia rakudo-moar b2d6d0: OUTPUT«Cannot find method 'isatty': no method cache and no .^find_method␤  in block <unit> at /tmp/RGMWnRwc0g:1␤␤»
19:06 hoelzro smls: that would be something we could easily add
19:06 hoelzro the question is where do you store it?
19:07 brrt FROGGS: i'm fairly sure you have to do a git submodule update after you change branches, and i think Configure.pl does that
19:07 brrt but anyway reconfigure prior to building :-)
19:07 smls hoelzro: ~/.local/share/perl6/repl.log ?
19:08 hoelzro smls: if it's ok to have a user-specific history, that would work
19:08 hoelzro I can imagine that some people would like a project-specific one, though
19:08 hoelzro perhaps PERL6_HIST?
19:08 smls seems like a strange use-case
19:09 smls do they also want a project-shared bash/zsh history?
19:09 smls they should probably symlinks thir hist files together then
19:09 leedo it might be good to somehow notify people that they can get a history if they install Linenoise
19:09 leedo i'm not sure how you'd do that and not be annoying though
19:10 hoelzro leedo: it's in the README, I think
19:10 hoelzro but I don't know if that's saying much =)
19:11 itz_ I saw S32-exceptions/misc.rakudo.moar fails today as well which I didn't see yesterday (or earlier)
19:11 leedo well it's something at least
19:13 smls hoelzro: Ohh, you mean multiple projects *per* user - not "project" in the sense of collaborating between users?
19:14 hoelzro smls: yes
19:14 hoelzro I think PERL6_HIST would work for that
19:14 bin_005 joined #perl6
19:14 smls I guess an environment variable could be useful for that, though I fon't know if many people would actually bother using it
19:14 smls Though IDE's might
19:15 ][Sno][ joined #perl6
19:15 jnthn smls: On async IO, I've done plenty of stability work of late to improve the situation with IO::Socket::Async, so yeah, there's progress
19:16 mr-foobar joined #perl6
19:17 smls ok
19:18 FROGGS brrt: I always reconfigure (and make realclean prior to that), that's part of my build scripts
19:18 brrt i never do that :-)
19:21 smls hoelzro: Though supporting $PERL6_HIST is orthogonal to using a fixed location like  $XDG_DATA_HOME/perl6/history  if PERL6_HIST is not specified.
19:21 smls So it could always be added if the demand arises
19:22 japhb I forget, how do you add a coercion to a type?  (So that you can say 'Foo() $bar' in a signature, and have it coerced from Any?)
19:24 smls class Foo { method CALL-ME { ... } }   I guess?
19:25 smls that whole corecion system needs some design love though, I think
19:25 smls considering the inconsistent way Rakudo's built-in types handle it, how can we expect user code to do it consistently :P
19:26 * brrt bbiab
19:26 leedo is the tab completion known to be a bit rough?
19:26 ugexe m: say 1 unless try { signal }; # is there some way to see if calling signal will work without an error?
19:26 camelia rakudo-moar b2d6d0: OUTPUT«===SORRY!===␤Cannot find method 'orig'␤»
19:27 leedo e.g. have a line half completed, and tab something. it clears the line and begins a completion at the start
19:28 smls example?
19:28 smls "say spr" TAB completes to "say sprintf" for me
19:30 leedo smls: ah, only happens if i TAB after a space
19:31 leedo so "say <TAB>"
19:31 ][Sno][ joined #perl6
19:31 smls can confirm
19:31 smls interesting
19:31 leedo or after a sigil
19:31 RabidGravy japhb: the $bar has to have a Foo method
19:31 * smls submit a rakudobug
19:37 jnthn Hm, the Rakudo and S32-exceptions/misc.t I had before clocking off last night are clean
19:37 * jnthn pulls latest things
19:40 jnthn yep, with latest I get a failure
19:42 timotimo the X::Obsolete thing?
19:42 timotimo for ${a}?
19:42 jnthn yeah
19:44 dalek roast: 7d7467d | jnthn++ | S32-exceptions/misc.t:
19:44 dalek roast: Update test now "my ${foo}" is allowed.
19:44 dalek roast: review: https://github.com/perl6/roast/commit/7d7467dc49
19:44 timotimo good
19:45 jnthn Should do it
19:46 TimToady arguably 'my ${Int}' is still kinda wrong semantically, unless we pretend it's a % based on the shape
19:47 TimToady m: my $[3];
19:47 camelia rakudo-moar b2d6d0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Uj6by6vv7X␤Shaped variable declarations not yet implemented. Sorry. ␤at /tmp/Uj6by6vv7X:1␤------> 3my $[3]7⏏5;␤»
19:47 TimToady we catch that one
19:48 TimToady though that's just a NYI, not a semantic failure
19:48 run4flat My thoughts on PDL ideas that I would like to see in Perl 6: http://blogs.perl.org/users/david_mertens/2015​/06/pdl-features-id-like-to-see-in-perl-6.html
19:48 jnthn TimToady: The problem isn't that we die, it's that we didn't die with X::Obsolete
19:48 TimToady well, yes, the 'my' was messing up the intended test, as you noticed
19:49 hoelzro I've noticed a lot of proto tokens in Grammar.nqp use <...>; does that symbol actually mean anything
19:49 hoelzro ?
19:49 TimToady hoelzro: that's obsolescent, the intent is that all protos use {*} consistently
19:50 hoelzro timotimo, FROGGS: do either of you have access to the testers.perl6.org box? any way I could get a Pg dump of the database from it, along with knowledge of the current Rakudo/modules versions on there?
19:50 hoelzro TimToady: ah, thanks!
19:50 FROGGS hoelzro: I can do that probably
19:50 hoelzro excellent!
19:52 smls run4flat++
19:53 run4flat smls, thanks
19:53 smls Though PDL'ish support won't make it into Perl 6.0, will it?
19:54 run4flat It won't? Somehow I thought that was on the list
19:54 smls I dunno :P
19:54 run4flat and, to be clear, I'm not suggesting low-level hooks into PDL's engine
19:54 smls My guess is that it would be expected to be prototyed as a module first
19:55 run4flat Is there an example of such a thing that I can look at?
19:55 run4flat ... preferably a simple one. :-)
19:55 smls and then if it turns out that said module can't avoid using nqp:: functionality to do things correctly, merge the required support back into Rakudo
19:55 TimToady smls: well, most of S09 is intended to provide PDLish support, and it remains to be seen how much of S09 gets implemented under jnthn's NSA work
19:56 yqt joined #perl6
19:56 TimToady some of the more abstract mapping semantics might have to wait till after 6.0
19:56 brrt joined #perl6
19:56 zakharyas joined #perl6
19:57 smls right, tightly packed arrays seem to be planned for 6.0
19:57 TimToady but the basic infrastructure should be PDL-ready at least
19:57 smls but having a more high-level PDL-like API as conjectued in the http://design.perl6.org/S09.html#PDL_signatures section, is probably module material right?
19:58 TimToady well, it all depends on whether someone goes wild before Christmas :)
19:58 qwebirc48505 joined #perl6
19:58 run4flat TimToady: I have a bare-bones idea of how to implement this
19:59 run4flat but I don't know how to hack the parser
19:59 run4flat I thought I saw an Advent Calendar entry somewhere, but I've lost it
19:59 TimToady shouldn't have to hack the parser much, since most of S09's syntax is already supported, just some is NYI
19:59 run4flat if somebody can point me in the proper direction, I can start working on things
20:00 TimToady m: my @pdl[3;3;3];
20:00 camelia rakudo-moar b2d6d0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/934irUGve9␤Shaped variable declarations not yet implemented. Sorry. ␤at /tmp/934irUGve9:1␤------> 3my @pdl[3;3;3]7⏏5;␤»
20:01 smls TimToady: Also, maybe the high-level API (beyond simple array munging) *should* stay in module space, so it can experiment and evolve as needed.
20:01 smls and potentially encourage competing solutions :)
20:01 ShimmerFairy joined #perl6
20:02 RabidGravy yeah
20:02 TimToady hopefully the type system can support that easily, plus we can have pragmas that warp the default semantics of built-ins in a given lexical scope
20:02 TimToady if we need that
20:03 run4flat Alright, I'll see what I can come up with
20:03 jnthn Tightly packed arrays are something I'd digging into this week, though the work on that is fairly gutsy
20:04 run4flat Believe it or not, I'm not too concerned with the implementation of the data type
20:04 jnthn Once *that* is in, then I suspect it'll be easier to jump in and work on things in this area.
20:04 run4flat I'm concerned with the implementation of auto-looping
20:04 run4flat oh
20:04 bin_005_e joined #perl6
20:04 run4flat right, well, if the data container isn't yet available, then that'll make my life hard. :-)
20:05 jnthn run4flat: Right; I need to get it in soon anyway, and knowing you're waiting to have it is another nice motivator :)
20:05 run4flat jnthn, is there anything I can do to help?
20:05 run4flat Is there a fork of perl6 I can watch?
20:05 run4flat :-)
20:06 jnthn m: say 'abc' ~~ /a ~ c [d]/
20:06 camelia rakudo-moar b2d6d0: OUTPUT«Nil␤»
20:07 TimToady why the superstitious []?
20:07 jnthn TimToady: 'cus somebody made it warn without it :P
20:07 jnthn m: say 'abc' ~~ /a ~ c d/
20:07 camelia rakudo-moar b2d6d0: OUTPUT«Potential difficulties:␤    Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤    at /tmp/7t1o42lXO9:1␤    ------> 3say 'abc' ~~ /a ~ c7⏏5 …»
20:07 jnthn I'm more curious why that didn't trigger the goal matching error though...
20:08 TimToady hmm, it shouldn't warn on that particular space, since it's not, er, sigificant
20:08 jnthn m: say '"x' ~~ /'"' ~ '"' \w+/
20:08 camelia rakudo-moar b2d6d0: OUTPUT«Unable to parse expression in ; couldn't find final '"' ␤  in block <unit> at /tmp/baTytOWdRa:1␤␤»
20:08 jnthn Locally:
20:08 jnthn > say '"x' ~~ /'"' ~ '"' \w+/
20:08 jnthn Nil
20:09 jnthn But what's freaking me out is...no spectests fail after I did this change o.O
20:09 smls run4flat: jnthn has a Perl 6 blog, where I assume he'll mention progress on tightly packed arrays: https://6guts.wordpress.com/ :)
20:09 jnthn run4flat: What smls said; I only tend to work in branches when I'm going to break stuff that already works, so I'll likely be doing this in mainline branches.
20:09 brrt are you sure it's plugged in?
20:09 brrt jnthn :-P
20:10 jnthn ohhhh
20:10 jnthn The spectest already expect non-exceptional behavior :)
20:10 jnthn And they're skipped rather than todo'd so I got no passing todos :)
20:13 dalek nqp: 121db36 | jnthn++ | src/QRegex/Cursor.nqp:
20:13 dalek nqp: Goal matching syntax fails to match, not throws.
20:13 dalek nqp:
20:13 dalek nqp: Since HLL::Grammar already overrides it, our parse errors still work
20:13 dalek nqp: out fine. This just changes the default behavior for userland.
20:13 dalek nqp: review: https://github.com/perl6/nqp/commit/121db36602
20:13 dalek nqp: 3ae36d0 | jnthn++ | t/qregex/rx_goal:
20:13 dalek nqp: Update NQP test suite for goal matching changes.
20:13 dalek nqp: review: https://github.com/perl6/nqp/commit/3ae36d01bc
20:14 masak run4flat++ # http://blogs.perl.org/users/david_mertens/2015​/06/pdl-features-id-like-to-see-in-perl-6.html
20:14 masak run4flat: I'm curious where you picked up the name "Perl 6 v1.0", which I don't see used at all on #perl6 or on our mailing lists... :)
20:14 run4flat masak: I guessed
20:14 run4flat :-)
20:14 run4flat what is the version slated for Christmas called?
20:14 masak run4flat: I'm more likely to see 6.0.0
20:15 run4flat I'll fix my blog post, if tha helps
20:15 masak run4flat: but the truth is it doesn't have an "official" name.
20:15 run4flat heh
20:15 masak run4flat: it's... a slightly contentious area :/
20:15 TimToady it's probably 6.Christmas
20:15 TimToady and the beta is called 6.Birthday
20:15 masak :>
20:15 run4flat I suppose you can see that I see "Perl 6" is the language name. :-p
20:16 smls 6.six.1.0.for.real
20:16 masak TimToady: at least your attempt at a resolution is sufficiently cute :P
20:16 masak 6.we.mean.it.this.time
20:16 TimToady the language revs don't have to look anything like the compiler revs
20:16 run4flat n/p, I can change it to 6.0.0 if that makes folks happy
20:16 masak run4flat: I don't have a dog in that race, so do what you want
20:16 masak run4flat: I was genuinely curious, nothing more
20:16 smls I think v1.0 gets the point across
20:17 smls even if its unclear if it will actually be called that
20:17 masak if "Perl 6 v1.0" better reflects how you think about the language, then keep it
20:17 masak TIMTOWTDI :)
20:17 TimToady we're not really picky here
20:17 * run4flat shrugs and closes the browser window with the blog editor
20:17 run4flat no problem!
20:18 masak we're an AND culture, not an OR culture :P
20:18 run4flat OK, so let's suppose I wanted to write a module that implements the 'autoloop' keyword
20:18 run4flat can anybody point me to a module that implements a keyword, so I can start cargo-culting?
20:19 FROGGS run4flat: OO::Monitors
20:19 * run4flat looks
20:19 dalek rakudo/nom: 7c35c5e | jnthn++ | tools/build/NQP_REVISION:
20:19 dalek rakudo/nom: Bump to get goal matching semantic change.
20:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7c35c5e462
20:19 masak run4flat: also check out FROGGS++' various slangs on github
20:20 * run4flat tries to google that
20:20 dalek roast: f0e859a | jnthn++ | S05-metachars/tilde.t:
20:20 dalek roast: Unfudge tests for RT #62086, RT #124949, RT #124950.
20:20 dalek roast: review: https://github.com/perl6/roast/commit/f0e859a505
20:20 synbot6 Link:  https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=62086
20:20 [Coke] masak: OR are we?
20:21 masak run4flat: https://github.com/FROGGS/p6-Slang-Tuxic https://github.com/FROGGS/p6-Slang-Piersing
20:22 run4flat masak: thanks! It was actually easier than I expected
20:22 masak \o/
20:23 run4flat masak: I mean finding FROGGS' modules. But adding a keyword looks pretty easy, too
20:23 masak run4flat: slangs are in early days still in Perl 6. there's not much of a "theoretical framework" around them, it's just messing about and hoping stuff comes out right.
20:23 masak run4flat: still, when I read about autolooping in S09 recently, I thought "shouldn't that be a slang"?
20:23 masak run4flat: and I was reminded of that when I skimmed your post just now.
20:25 dalek star: 33e1b0a | FROGGS++ | docs/announce/2015.06.md:
20:25 dalek star: update announcement
20:25 dalek star: review: https://github.com/rakudo/star/commit/33e1b0a539
20:26 hoelzro /'{' .*? '}'/ and /'{' ~ '}' [.*?]/ are equivalent except for the error message on failure, right?
20:27 jnthn hoelzro: Now you don't get an error by default, so they're equivalent by default. However, you can write a method FAILGOAL that thrwos an error if you wish
20:27 smls ...and for the backtracking bugs that ~ still suffers from (I think)
20:27 timotimo ~ doesn't backtrack
20:28 hoelzro jnthn: backtracking bugs? that could explain what I was seeing
20:28 timotimo well, now that it fails instead of throwing, it ought to backtrack
20:28 hoelzro so using a frugal operator like *? with ~ is probably ill-advised?
20:28 masak aye
20:28 jnthn It does backtrack now; the tests relating to that were just unfudged and passing.
20:29 hoelzro m: '{ commit() }' ~~ /'{' .*? '}'/
20:29 camelia rakudo-moar b2d6d0: ( no output )
20:29 masak hoelzro: using .*? is ill-advised for other reasons too. you can almost always be more precise than that.
20:29 hoelzro m: say '{ commit() }' ~~ /'{' .*? '}'/
20:29 camelia rakudo-moar b2d6d0: OUTPUT«「{ commit() }」␤»
20:29 hoelzro m: say '{ commit() }' ~~ /'{' ~ '}' [.*?]/
20:29 camelia rakudo-moar b2d6d0: OUTPUT«Unable to parse expression in ; couldn't find final '}' ␤  in block <unit> at /tmp/0z5EcUK0Ew:1␤␤»
20:29 hoelzro masak: true, I was just doing some prototyping using .*?
20:29 masak hoelzro: there's often a formulation that eliminates backtracking completely. or at least, it's best to aim for one.
20:29 dalek nqp: 57e8469 | TimToady++ | src/QRegex/P6Regex/Grammar.nqp:
20:29 dalek nqp: don't check space between idents inside a ~ b c
20:29 dalek nqp: review: https://github.com/perl6/nqp/commit/57e8469004
20:29 hoelzro is there something I have wrong in the regex above that uses ~?
20:30 japhb joined #perl6
20:31 TimToady you just need to wait for jnthn's recent patch to recompile
20:32 masak stand by for the imminent future being more equally distributed
20:32 brrt future's entropy increasing?
20:32 TimToady also, you've got some superstitious [] there too :P
20:33 hoelzro TimToady: ah, yes, I added that when I thought *that's* what the issue was =)
20:34 Firedancer joined #perl6
20:35 smls m: my @a = 2, 4, 6, 8; my @b := @a[1, 3]; @b[0] = 40; dd @a
20:35 camelia rakudo-moar b2d6d0: OUTPUT«@a = [2, 40, 6, 8]<>␤»
20:35 smls run4flat: ^^ re array slices
20:36 masak nice. now make that work in the multidim case :> kthx
20:37 smls and with native arrays :P
20:37 TimToady multidim isn't the problem; that's relying on containers
20:37 TimToady what smls++ said
20:37 * masak .oO( fast *and* flexible!? )
20:38 smls .oO(and simple and elegant and interoperable and maintainable)
20:39 TimToady .oO(and wicked cool)
20:40 * masak .oO( and *ponies*! )
20:40 dha joined #perl6
20:40 smls .oO(  :picard meme:  jnthn, make it so!  )
20:42 nwc10 I CAN HAZ CHEEZEponyBURGER?
20:42 * brrt thinks we should have a picardbot
20:43 nwc10 written in Perl 6. Obviously.
20:43 masak 6ard
20:43 jnthn m: my int @a = 2, 4, 6, 8; my @b := @a[1, 3]; @b[0] = 40; say @a
20:43 camelia rakudo-moar b2d6d0: OUTPUT«2 40 6 8␤»
20:43 jnthn kthxbai :P
20:43 masak o.O
20:43 TimToady nice delorean
20:43 masak a miracle!
20:43 * brrt is baking popcorn
20:43 TimToady we do have native refs, after all
20:45 dha I have a feeling that the C<scalar> function is not particularly p6ish. Is it gone?
20:45 TimToady very
20:46 dha *nod*
20:46 TimToady as is wantarray
20:46 masak m: say my $x + my $y given $x = 40, $y = 2;
20:46 camelia rakudo-moar b2d6d0: OUTPUT«42␤»
20:46 smls theres no "scalar vs list context" in Perl 6
20:47 TimToady not in the sense that Perl 5 means it, anyway
20:47 smls only coercion of values that have been produced with no knowledge of the caller context
20:48 masak m: say my my $w1 ~ my $s ~ my $w2 given $w1 = "OH", $s = " ", $w2 = $w1.subst(/./, "").subst(/$/, "AI");
20:48 camelia rakudo-moar b2d6d0: OUTPUT«5===SORRY!5===␤Type 'my' is not declared␤at /tmp/e5CacpkF70:1␤------> 3say my my7⏏5 $w1 ~ my $s ~ my $w2 given $w1 = "OH", ␤Malformed my␤at /tmp/e5CacpkF70:1␤------> 3say my7⏏5 my $w1 ~ my $s ~ my $w2 given $w1 = "OH␤␤»
20:48 masak m: say my $w1 ~ my $s ~ my $w2 given $w1 = "OH", $s = " ", $w2 = $w1.subst(/./, "").subst(/$/, "AI");
20:48 camelia rakudo-moar b2d6d0: OUTPUT«OH HAI␤»
20:48 masak \o/
20:49 * TimToady is particularly fond of: repeat while my $x != 42 { ...; $x = 42 }
20:49 kaare_ joined #perl6
20:49 smls what's the difference between "repeat while" and "while"?
20:49 masak smls: when the condition is evaluated; after vs before the loop body
20:50 masak aka `do while` in many older languages
20:50 smls ah, so *that's* the repolacement for   do { ... } while
20:50 TimToady you can also say repeat { ...; $x = 42 } while $x != 42, but that doesn't work unles $x is predeclared
20:51 masak but I really dig Perl 6's version. and TimToady++'s `repeat while my` pattern is a big part of that.
20:51 TimToady and very clearly shows the distinction between order of elaboration and order of executtion
20:52 TimToady m: say '{ commit() }' ~~ /'{' ~ '}' .*?/
20:52 camelia rakudo-moar 7c35c5: OUTPUT«「{ commit() }」␤»
20:52 TimToady there we go
20:52 TimToady jnthn++
20:52 masak and I like that lexical variables are woven into the order of elaboration.
20:52 masak as they should.
20:52 TimToady nqp also has the /a ~ b c/ fix, but I didn't deem it worthy a bump
20:53 TimToady (passes all tests though)
20:53 masak speaking of which
20:53 masak I tried removing Interface Consistency in a local branch
20:53 masak two cases of missing nameds in the core setting -- easily fixed
20:53 ugexe sub signal-jvm($) { Supply.new }; my $signal-handler = &::("signal") ~~ Failure ?? &::("signal-jvm") !! &::("signal"); my $sig-resize = ::("Signal::SIGWINCH"); $signal-handler.($sig-resize).act: { $MAX-TERM-COLS = GET-TERM-COLUMNS() }; # is a better way to catch signals on Moar but still *compile* on JVM?
20:54 masak but then the spectest suite shows loads of "Dubious"es, and then hangs around S32
20:54 masak S32-io, even
20:54 masak no idea why
20:54 masak t/spec/S32-io/copy.t is the file that hangs. even when run directly with `perl6`
20:56 masak fails on a call to `copy($existing-file, $existing-file-stgt)`
20:57 TimToady well, the io system relies on all sorts of weird named options, so I guess I'm not surprised
20:57 * jnthn deals with one of the more fun RTs
20:57 masak I see nothing weird about the definition of `copy` in src/core/io_operators.pm
20:58 jnthn (actually -Ofun)
20:58 jnthn $ perl6-m -e "sub foo(Int $x = 'omg') { }"
20:58 jnthn ===SORRY!=== Error while compiling -e
20:58 jnthn Default value '"omg"' will never bind to a parameter of type Int
20:58 jnthn at -e:1
20:58 jnthn ------> sub foo(Int $x = 'omg'<HERE>) { }
20:58 jnthn :)
20:58 masak I could push this branch if someone else wants to play with it.
20:58 jnthn As requested by masak at some point :)
20:58 TimToady jnthn: why the double quoting?
20:59 nwc10 if I try to build the origin/libuv-1.6.1-update branch, at Configure.pl time it bombs out with
20:59 nwc10 Updating submodules .................................... FAIL git error: fatal: reference is not a tree: 30c8be07bb78a66fdee5141626bf53a49a17094a
20:59 nwc10 Unable to checkout '30c8be07bb78a66fdee5141626bf53a49a17094a' in submodule path '3rdparty/libuv'
20:59 jnthn TimToady: 'cus I .perl the value, but put that in quotes...
21:00 jnthn TimToady: Would you prefer it without any?
21:00 FROGGS nwc10: it worked for me after doing: git submodule foreach git pull origin master
21:00 masak jnthn: cool!
21:00 jnthn TimToady: Was thinking more of when it's like an integer
21:00 TimToady how bout .gist instead?
21:00 jnthn Hm, also works
21:00 TimToady or just leave off the outer quotes
21:00 jnthn Let's try that
21:00 dalek rakudo/interface-inconsistency: dd67e25 | (Carl Masak)++ | src/Perl6/World.nqp:
21:00 dalek rakudo/interface-inconsistency: remove auto-adding of *%_ in methods
21:00 dalek rakudo/interface-inconsistency: review: https://github.com/rakudo/rakudo/commit/dd67e25146
21:00 dalek rakudo/interface-inconsistency: 257b202 | (Carl Masak)++ | src/core/ (2 files):
21:00 dalek rakudo/interface-inconsistency: add two "missing" named params
21:00 dalek rakudo/interface-inconsistency:
21:00 dalek rakudo/interface-inconsistency: The absence of these made `make` fail.
21:00 dalek rakudo/interface-inconsistency: review: https://github.com/rakudo/rakudo/commit/257b2027c3
21:00 jnthn Gone with .gist
21:00 nwc10 FROGGS: it still hates me
21:01 FROGGS :/
21:01 masak there you go. anyone who wants can investigate why we get massive failures and a hang in the spectest suite in that branch ;)
21:01 nwc10 my upstream is https://github.com/joyent/libuv.git
21:01 FROGGS nwc10: should have changed to libuv/libuv.git
21:02 TimToady masak: perhaps IO is the canary in your Mine of Inconsistency
21:02 nwc10 aha. presumably nothing automates that for me...
21:02 TimToady we don't otherwise do much with class hierarchies
21:02 nwc10 FROGGS: now building. thanks. that was the problem.
21:02 masak TimToady: if so, then that's an interesting data point.
21:02 masak but I don't know yet.
21:02 nwc10 the perils of being an early adopter
21:03 TimToady It's okay to be an early adopter if you're also an early adapter...
21:03 masak being an early adopter means getting to say "I will show them! I will show them *all*!" a lot...
21:04 masak "...mwhahahaha!"
21:06 dalek roast: c1305ef | jnthn++ | S06-signature/optional.t:
21:06 dalek roast: Tweak a test the compiler got too clever for.
21:06 dalek roast: review: https://github.com/perl6/roast/commit/c1305ef871
21:06 dalek rakudo/nom: 6519911 | jnthn++ | src/ (2 files):
21:06 dalek rakudo/nom: Catch impossible default values at compile time.
21:06 dalek rakudo/nom:
21:06 dalek rakudo/nom: When we use a literal as a default value, we know its type. We can
21:06 dalek rakudo/nom: check it against any declared nominal type, and complain at compile
21:06 dalek rakudo/nom: time that it's unreasonable.
21:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6519911e0a
21:07 dha Can I assume that the concept of "the currently selected filehandle" does not really apply to p6, and therefore C<select> can be tossed away?
21:07 TimToady yup
21:08 masak m: my $x = 42; sub bar(Int $y = $x) { say $y }; bar(); $x = "OH HAI"; bar()
21:08 camelia rakudo-moar 7c35c5: OUTPUT«42␤Type check failed in binding $y; expected 'Int' but got 'Str'␤  in sub bar at /tmp/J2FLYzug4Q:1␤  in block <unit> at /tmp/J2FLYzug4Q:1␤␤»
21:08 masak dha: if you really like the concept of currently-selected-filehandle, then you can implement it in a class.
21:08 TimToady dha: though you might direct them toward the fact that $*OUT and such are overridable in a dynamic scope
21:09 dha I'm wavering on whether that would be helpful or just confusing. :-)
21:10 TimToady well, the outermost dynamic scope is kinda global... :)
21:10 * [Coke] thinks 6ard might have some negative connotations for amerenglish.
21:10 masak dha: perhaps refer to sergot++'s module that redirects $*OUT to a string?
21:10 dalek roast: c286040 | jnthn++ | S06-signature/optional.t:
21:10 dalek roast: Test for RT #112922.
21:10 dalek roast: review: https://github.com/perl6/roast/commit/c286040e65
21:10 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=112922
21:11 TimToady anyway, select as a global concept is dead
21:11 masak https://github.com/sergot/IO-Capture-Simple
21:12 TimToady though, perhaps the thing that might be confusing to P5ers is the fact that we consider globals to just be the degenerate case of dynamic variables now
21:13 TimToady so "globals" like $*OUT are really just dynamics defined at a very outer level
21:13 TimToady it was kinda one of those 'oh wow' unifications that happened along the way
21:14 dha masak -  thanks. throwing that in.
21:14 jnthn Darn, my patch doesn't actually catch masak's original case in the ticket :P
21:14 FROGGS hehe
21:15 TimToady m: say sub { ... } ~~ Bool
21:15 camelia rakudo-moar 7c35c5: OUTPUT«False␤»
21:15 TimToady you'd think it should
21:16 dha TimToady -  Since, obviously, I have no idea what someone reading this is actually using C<select> for, I mentioned the overriding in the context of "maybe this will be of use to you".
21:16 jnthn A closure ain't a true literal
21:16 TimToady yes, many uses of select were simply to treat some filehandle or other as if it were an object, to set $| or some such
21:16 jnthn 'cus it needs to be cloned etc.
21:16 jnthn But I can make it work
21:17 jnthn Don't want masak re-opening it with "but you didn't fix by bug!!!" :)
21:17 RabidGravy o/ we can fix it ... o/
21:17 colomon joined #perl6
21:18 TimToady ooh, rudimentary type inference
21:18 TimToady as in "we know this can only produce this sort of value, despite it not being a constant
21:18 TEttinger joined #perl6
21:19 jnthn :)
21:19 jnthn Made it work; guess I'd better spectest again :)
21:19 TimToady "All type inference that is useful is mandatory."
21:20 TimToady "The compiler must be at least as smart as the user, but not much smarter."
21:20 dha I'm going to make a leap of faith that semctl, semget and semop are no more.
21:20 jnthn That'd sem sane to me...
21:21 TimToady anything POSIXy, BSDy, or SysVy is gonna be a thing for modules
21:21 TimToady jnthn: ctl yourself
21:21 flussence there's a Semaphore object in the core now...
21:21 TimToady but surely not an OS-level one?
21:22 jnthn Probably not in that sense
21:22 flussence it works well enough I'm not left wanting OS-level ones, at least :)
21:22 jnthn Though surely kernel supported
21:22 jnthn Since it sucks to have a kernel schedule threads that can't proceed.
21:23 TimToady well, the SysV IPC primitives were primarily for, er, IPC
21:24 jnthn Ah...ours are for in-memory
21:24 jnthn uh
21:24 jnthn in-process
21:24 TimToady nod
21:24 jnthn .oO( good job I don't teach this stuff...oh, wait... )
21:24 RabidGravy I think I started a module for that stuff,
21:25 TimToady in fact, me nods off...
21:25 TimToady zzz &
21:25 dalek rakudo/nom: aead30c | jnthn++ | src/Perl6/Actions.nqp:
21:25 dalek rakudo/nom: Extend default type analysis to code objects.
21:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aead30cae1
21:25 hoelzro ShimmerFairy: while backlogging, I saw your statement about *%_.  I was just thinking about how much I dislike it =)
21:25 dalek roast: 6ad32a7 | jnthn++ | S06-signature/optional.t:
21:25 dalek roast: A further test for RT #112922.
21:25 dalek roast: review: https://github.com/perl6/roast/commit/6ad32a76ac
21:25 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=112922
21:29 ugexe re: Windows. with moarvm, run("mode", :out) works. on jvm run("mode", :out) says it cannot find the file. shell("mode") works fine, but thought it may be worth noting the difference in behavior
21:32 dalek roast: 73cd22a | jnthn++ | S06-signature/optional.t:
21:32 dalek roast: Test for RT #123897.
21:32 dalek roast: review: https://github.com/perl6/roast/commit/73cd22ad9d
21:32 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=123897
21:33 DrForr .tell nine Silly point to make, but pragmas appear to not be run when declared as 'use utf8:from<Perl5>;' - I realize it's silly but something to think about.
21:33 yoleaux DrForr: I'll pass your message to nine.
21:37 jnthn Hm, rest or hunt one more RT...
21:39 colomon joined #perl6
21:50 skids joined #perl6
21:53 jnthn heh, RT #72440 was a pretty funny one :)
21:53 synbot6 Link:  https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=72440
21:56 masak :D
21:56 masak I found that bug by *porting* PGE :P
21:57 atroxaper joined #perl6
21:59 jnthn Another 5 year old one taken out :)
22:00 dalek nqp: 5263e63 | jnthn++ | src/QRegex/P6Regex/Grammar.nqp:
22:00 dalek nqp: Remove wrong and duplicate optimization.
22:00 dalek nqp:
22:00 dalek nqp: We don't know that the atom we're looking at really can cope with us
22:00 dalek nqp: swallowing multiple chars into the literal at this point; we may be
22:00 dalek nqp: in a goal or a separator. Rather than fix it, it can simply go away,
22:00 dalek nqp: since there's code in the termish action method that does the very
22:00 dalek nqp: same optimization, but more generally, and when we know it's safe. So
22:00 dalek nqp: we don't lose out, but we do lose a couple of weird bugs.
22:00 dalek nqp: review: https://github.com/perl6/nqp/commit/5263e63464
22:00 Sqirrel joined #perl6
22:00 masak jnthn++ # taking out 5-year-olds -- oh wait
22:00 DrForr That sounds bad in *so* many ways...
22:01 dalek rakudo/nom: 4a72196 | jnthn++ | tools/build/NQP_REVISION:
22:01 dalek rakudo/nom: Get a couple of regex engine fixes.
22:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4a72196ecd
22:01 masak DrForr: worse than I intended, even.
22:02 * jnthn decides he won't take the 12-year-old out of the cupboard to sip on this evening... :P
22:02 dalek roast: 4752d6b | jnthn++ | S05-meta (2 files):
22:02 dalek roast: Tests for RT #72440.
22:02 dalek roast: review: https://github.com/perl6/roast/commit/4752d6be26
22:02 synbot6 Link:  https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=72440
22:05 jnthn m: say "{1031 - 999} to go to get to a 3-digit number of RTs"
22:05 camelia rakudo-moar aead30: OUTPUT«32 to go to get to a 3-digit number of RTs␤»
22:07 jnthn Sounds do-able within the month :)
22:07 * jnthn has slayed 18 RT tickets so far this week :)
22:08 masak let's hope some doofus doesn't keep opening tickets, then :P
22:09 jnthn Well, yeah, we've had like 6 in the last 24 hours
22:10 jnthn Opinions welcome on https://rt.perl.org/Ticket/Display.html?id=125504
22:11 jnthn But since we re-write %foo<a> to %foo{'a'} at compile time...we don't have the info to do any better in terms of knowing which syntax the program used by runtime, which is when the error happens.
22:12 masak yeah.
22:12 masak not sure I see a good way to handle that.
22:12 jnthn Other thing with tickets is they ain't all of equal quality.
22:13 RabidGravy boom
22:13 RabidGravy beddy byes
22:13 masak 'night, RabidGravy
22:13 jnthn RabidGravy: Hope you had a nice day at the beach! :)
22:14 jnthn (By quality, I mean some really are well golfed down, or at least state expected outcome, whereas others are far from golfed or vauge in what they want)
22:15 uncleyear joined #perl6
22:23 japhb .oO( Expected outcome: it works. )
22:23 khw joined #perl6
22:24 jnthn :P
22:24 * masak .oO( Observed outcome: something's wrong )
22:29 colomon joined #perl6
22:30 diana_olhovik_ joined #perl6
22:38 telex joined #perl6
22:39 AlexDaniel joined #perl6
22:43 atweiden joined #perl6
22:45 hoelzro does hack have a very aggressive fail2ban running on it or something? I just tried to get on, but now it's not accepting any traffic from me on port 22 =/
22:48 timotimo i think there's fail2ban on it, yeah
22:49 jnthn .oO( funny name, it didn't fail 2 ban him... )
22:51 raiph joined #perl6
22:53 hoelzro heh
23:01 dha Well, in case anyone wants an update, I've managed to get through perlfunc to C<split>.
23:01 jnthn dha++
23:02 japhb Impressive progress, dha++ !
23:02 dha Thanks. I just hope it winds up being of use to someone...
23:06 masak sounds like a very useful thing.
23:13 masak 'night, #perl6
23:14 flussence m: given DateTime.new(Instant.new(1435708835)) { .say; say .Instant - now } # buckle up
23:14 camelia rakudo-moar 4a7219: OUTPUT«2015-06-30T23:59:60Z␤2702.292092␤»
23:17 jnthn ah, 'tis leap second night! :)
23:18 * jnthn decides to try and sleep through it, so he can get an extra second of sleep :)
23:18 jnthn 'night o/
23:19 * skids waiting to get paged about all the machines which missed the patch for that.
23:29 b2gills I've heard that Google slightly adjusts the clock frequency so they don't have to deal with leap seconds directly
23:30 jercos skew is good for yew
23:35 dalek rakudo-star-daily: 49d742d | coke++ | log/ (8 files):
23:35 dalek rakudo-star-daily: today (automated commit)
23:35 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/49d742ddc5
23:35 dalek perl6-roast-data: 953465c | coke++ | / (9 files):
23:35 dalek perl6-roast-data: today (automated commit)
23:35 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/953465c7c0
23:45 * skids keeps mixing up .foo and $.foo when he has both a topic and a self.  I guess that goes in the "fluency" category.
23:46 TimToady b2gills: that sounds like a BSD adjtime(2) kind of approach
23:53 yqt joined #perl6
23:58 TimToady joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo