Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-06-23

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:04 skids Wow that was a long backlog.
00:05 skids My insignificant bikeshedding votes: make [| DTRT instead of :[, because it is better for overloaded meanings to be similar, and instead of "Seq", "Feed"
00:09 skids .oO(":[" as "ordered-hash constructor"?)
00:25 laouji joined #perl6
00:31 jack_rabbit_ joined #perl6
00:40 laouji joined #perl6
00:45 vendethiel joined #perl6
00:51 coffee` joined #perl6
00:54 grondilu joined #perl6
01:00 Ben_Goldberg joined #perl6
01:15 vendethiel joined #perl6
01:24 atroxaper joined #perl6
01:31 pmichaud It's unlikely that we'll make | be a flattening operator unless we also want to change the syntax of argument interpolating and captures.  I'm not sure we're up for that radical a change.
01:31 pmichaud Latest musing is that Parcel might not be going away -- it may end up being the base class for lists, and be immutable.  List would then be a subclass of Parcel, adding the mutating methods.
01:33 pmichaud the naming is bikesheddable.
01:34 pmichaud *bikeshedable
01:35 pmichaud I'm also open to leaving List as the base class (immutable), then coming up with another name for the class that adds the mutating methods.
01:37 cognominal joined #perl6
01:40 vendethiel joined #perl6
01:41 aborazmeh joined #perl6
01:41 aborazmeh joined #perl6
01:46 telex joined #perl6
01:51 johnjohn101 joined #perl6
01:52 johnjohn101 i perl 6 people
01:52 zacts hey
01:54 johnjohn101 how close is perl6?
01:55 b2gills joined #perl6
01:57 zacts johnjohn101: close to perl5 in similarity, or do you mean how close is Perl6 to having a stable release?
01:57 johnjohn101 stable release
01:57 zacts perl6 is quite a different language than perl5
01:58 zacts ah ok
01:58 zacts I'll let others here answer
01:58 johnjohn101 i understand it's different. been reading up on it lately
01:58 zacts ah yeah
01:58 zacts I'm just getting into Perl6 myself
01:59 johnjohn101 oh ok
02:00 skids joined #perl6
02:00 japhb johnjohn101: We have dev releases monthly (and have for a long time).  We plan a release that more people might think of as "stable" this December.
02:01 johnjohn101 very cool. i hope it does well.
02:01 japhb johnjohn101: Thank you!
02:06 aborazmeh joined #perl6
02:06 aborazmeh joined #perl6
02:14 noganex_ joined #perl6
02:15 vendethiel joined #perl6
02:38 rmgk_ joined #perl6
02:40 spider-mario joined #perl6
02:44 gtodd lizmat: would be nice if perl-5.2_ had something like Perl6::Form as a core module ... so much easier to use
03:02 pyrimidi_ joined #perl6
03:02 TEttinger joined #perl6
03:03 TEttinger m: say ( ")" ~~ /<-[\d\c[APOSTROPHE]\c[QUOTATION MARK]\c[NUMBER SIGN]\{\}\(\)\[\]\s\/`@,~\:\^\.]>/ )
03:03 camelia rakudo-moar 75307d: OUTPUT«Nil␤»
03:03 johnjohn101 almost time for bed
03:03 johnjohn101 wrong window :(
03:04 TEttinger m: say ( "a" ~~ /<-[\d\c[APOSTROPHE]\c[QUOTATION MARK]\c[NUMBER SIGN]\{\}\(\)\[\]\s\/`@,~\:\^\.]>/ )
03:04 camelia rakudo-moar 75307d: OUTPUT«「a」␤»
03:04 TEttinger hmmmmm
03:04 TEttinger m: say ( "" ~~ /<-[\d\c[APOSTROPHE]\c[QUOTATION MARK]\c[NUMBER SIGN]\{\}\(\)\[\]\s\/`@,~\:\^\.]>/ )
03:04 camelia rakudo-moar 75307d: OUTPUT«Nil␤»
03:04 Khisanth joined #perl6
03:09 bin_005 joined #perl6
03:13 zostay_ m: my @a = 1, 2, 3; @a[2] :delete; @a[3] = 4; @a.perl.say;
03:13 camelia rakudo-moar 75307d: OUTPUT«[1, 2, 3, 4]<>␤»
03:13 yeahnoob joined #perl6
03:13 TEttinger hm, there's definitely something wrong with my ws token.
03:13 TEttinger token ws { <!after <.id> > <!before <.id> > [ \s | ',' | <.comment> ]* }
03:13 zostay_ m: my @a = 1, 2, 3; @a[2] :delete; @a.perl.say; @a[3] = 4; @a.perl.say;
03:13 camelia rakudo-moar 75307d: OUTPUT«[1, 2]<>␤[1, 2, 3, 4]<>␤»
03:14 TEttinger this seems to check the after, and if it matches it doesn't bother to check the before
03:16 zostay rakudobugged that one
03:27 laouji joined #perl6
03:32 ssqq joined #perl6
03:34 raiph joined #perl6
03:47 laouji joined #perl6
03:55 zacts joined #perl6
04:02 profan joined #perl6
04:09 raiph .tell FROGGS may be of interest: pipe deadlock (dihwidt?): https://news.ycombinator.com/item?id=9753279
04:09 yoleaux raiph: I'll pass your message to FROGGS.
04:18 Khisanth joined #perl6
04:37 ugexe its not going to check the before because you have <!after (not after)
04:37 ugexe if it matches like you say
04:37 ugexe also might want to try putting the [ \s | ',' | <.comment> ]* between the after/before
04:40 TEttinger ah, I figured it out btw ugexe
04:40 TEttinger it turned out to not actually need before or after
04:42 ugexe you might want to use || instead of | too. or maybe not
04:51 laouji joined #perl6
04:52 atroxaper joined #perl6
04:56 atroxaper joined #perl6
05:06 dalek specs: bce89a3 | pmichaud++ | S07-glr-draft.pod:
05:06 dalek specs: We need a "immutable list" type (Parcel?)
05:06 dalek specs:
05:06 dalek specs: Note that we're likely to need a separate type to represent
05:06 dalek specs: immutable lists, and which will be produced using infix:<,> .
05:06 dalek specs: The naming is open for discussion/bikeshedding.
05:06 dalek specs: review: https://github.com/perl6/specs/commit/bce89a3dad
05:06 dalek specs: 469f012 | pmichaud++ | S07-glr-draft.pod:
05:06 dalek specs: Notes about Slip, Seq, interpolation, iteration.
05:06 dalek specs: review: https://github.com/perl6/specs/commit/469f01235b
05:08 dalek specs: f617745 | pmichaud++ | S07-glr-draft.pod:
05:08 dalek specs: Add note about Seq (cf Parcel) naming.
05:08 dalek specs: review: https://github.com/perl6/specs/commit/f6177458ea
05:11 quester joined #perl6
05:17 dalek specs: dc32b3b | pmichaud++ | S07-glr-draft.pod:
05:17 dalek specs: Implementation note about flattening/Slip.
05:17 dalek specs: review: https://github.com/perl6/specs/commit/dc32b3b600
05:32 muethos joined #perl6
05:33 JimmyZ https://github.com/perl6/perl6-docker and https://github.com/perl6/docker looks same ?
05:37 domidumont joined #perl6
05:41 domidumont joined #perl6
06:07 Khisanth joined #perl6
06:07 atroxaper joined #perl6
06:09 diana_olhovik_ joined #perl6
06:14 domidumont joined #perl6
06:16 laouji joined #perl6
06:16 _mg_ joined #perl6
06:21 laouji joined #perl6
06:21 gfldex joined #perl6
06:22 Ulti re: bikeshedding name for immutable list, how about Tuple because it is one even in syntax
06:23 kaare_ joined #perl6
06:26 RabidGravy joined #perl6
06:30 domidumont joined #perl6
06:33 moritz .tell lichtkind I found nothing wrong with the tablets.perl6.org cron job; please supply a more precise error description
06:33 yoleaux 22 Jun 2015 21:04Z <mohij> moritz: <lichtkind> can someone please check the tablets cronjob, it stopped working
06:33 yoleaux moritz: I'll pass your message to lichtkind.
06:37 Khisanth joined #perl6
06:40 colomon joined #perl6
06:40 FROGGS joined #perl6
06:47 atroxaper joined #perl6
06:58 darutoko joined #perl6
06:59 zakharyas joined #perl6
07:03 quester left #perl6
07:09 lizmat good *, #perl6
07:11 nwc10 good *, lizmat
07:12 bjz joined #perl6
07:13 FROGGS morning o/
07:13 yoleaux 04:09Z <raiph> FROGGS: may be of interest: pipe deadlock (dihwidt?): https://news.ycombinator.com/item?id=9753279
07:15 FROGGS raiph: thanks, we do take care of that, at least where we (not the user) read the captured output and close the pipe(s)
07:17 RabidGravy marnin
07:17 FROGGS ho RabidGravy
07:17 RabidGravy are we all groovy?
07:17 masak aye!
07:18 FROGGS we are
07:18 masak we're also all ruby, go, rust, elm, and lispy.
07:18 * moritz is sixy instead
07:18 [Tux] $ perl -E'formline"\@".("|"x80),"Good morning perl6";say$^A'
07:19 RabidGravy I'm just waiting for a quarter of a tonne of limestone slab and a similar quantity of sand to be delivered
07:19 RabidGravy I may be in traction by this evening
07:19 masak [Tux]: wow, what's $^A ?
07:20 [Tux] just try :)
07:20 [Tux] it is the "accumulater"
07:20 masak oh!
07:20 [Tux] <lizmat> .oO( waiting for [Tux] to scream :-)
07:20 masak [Tux]: didn't find it in `perldoc perlvar`
07:20 [Tux] man perlform
07:20 [Tux] perldoc perlform
07:21 masak yeah, I'm doing that now
07:22 masak oh, and perldoc perlvar does mention it. both as $^A and $ACCUMULATOR
07:23 * masak .oO( CS: "we should avoid side-effects and strive to eliminate globals!" -- Perl 5: "hey everybody, look what I made!" )
07:24 [Tux] shhh
07:24 [Tux] $., $=, $^, $~, and $- are all semi-global
07:25 [Tux] as in: they should be bound to the current selected output handle, but don';t try to track any of these into the core: you'll be surprised
07:25 * moritz emphatically won't try to track them into core
07:25 [Tux] it is possible to set $- to maxint as side-effect of fiddling with any of the others. Don't try that at home
07:26 masak I promise.
07:26 RabidGravy to be relatively fair, formats were a hangover from a very early Perl
07:26 [Tux] and for even more fun. look at my tests in write.t where I *nest* formats!
07:26 masak that kind of nails it, though.
07:26 masak global things don't compose well.
07:27 [Tux] one can make formats be recursive to optimize brain-damage
07:28 moritz .oO( recursive, global brain damage )
07:29 dalek rakudo/nom: bcf38c9 | lizmat++ | src/core/Array.pm:
07:29 dalek rakudo/nom: Fix #125457, hanenkamp++
07:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bcf38c99af
07:29 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125457
07:30 abraxxa joined #perl6
07:35 nine .tell pmichaud What about Tuple as the name for the immutable List type instead of Parcel? There'd be precedent in other languages for the usage.
07:35 yoleaux nine: I'll pass your message to pmichaud.
07:37 [Tux] test             50000    42.986    42.899
07:37 [Tux] test-t           50000    43.348    43.262
07:37 [Tux] the changes of the last two days made my recent work now *slower* than the original!
07:38 dalek roast: 2ff938b | lizmat++ | S32-array/delete-adverb.t:
07:38 dalek roast: Add test for #125457
07:38 dalek roast: review: https://github.com/perl6/roast/commit/2ff938b724
07:38 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125457
07:43 masak [Tux]: I haven't been following along closely, but someone said yesterday that it's a known slowdown, and people are working on fixing it.
07:43 [Tux] that 43.3 once was 35.5!
07:45 masak wow, that's quite significant.
07:45 [Tux] https://github.com/Tux/CSV​/blob/master/README.speed
07:45 lizmat [Tux]++ for keeping track
07:46 * [Tux] adds today's timing just for the record …
07:46 lizmat fwiw, I haven't seen the spectest slow down that much in the past days, so it must be related to something loopy  :-)
07:47 * lizmat starts reading up backlog for the past 3 weeks
07:52 tardisx joined #perl6
07:52 RabidGravy can there be a phaser on a class such that when an object of that class is going out of scope, being destroyed or whatever still has access to "self"?
07:53 bjz joined #perl6
07:53 moritz RabidGravy: submethod DESTROY() { }
07:54 masak RabidGravy: but it's the VM's perogative exactly when this happens.
07:54 RabidGravy ah, I think I was missing the submethod part .... cheers
07:54 moritz RabidGravy: note that this won't be called during global destruction
07:55 moritz so you can't rely on it being called for every object that was created
07:55 masak RabidGravy: also, unless you know what "object resurrection" is, maybe stop and read about it ;)
07:56 spider-mario joined #perl6
07:57 RabidGravy Hmm, the background of this is that libshout has a CStruct allocated and consequently you need to shout_free(shout_t *) on it, I'm storing this in an attribute
07:58 moritz yes, that's a good use case for DESTROY
07:58 moritz no panic if it doesn't happen on program exit
07:58 masak m: my $zombie; class C { submethod DESTROY { say "died, resurrected"; $zombie = self }; method gist { "braaaaaains" } }; { my $c = C.new }; for ^1000 { [] }; say $zombie
07:58 camelia rakudo-moar bcf38c: OUTPUT«died, resurrected␤braaaaaains␤»
07:58 moritz the OS will free it anyway
07:58 masak \o/
07:58 moritz masak++
07:59 * masak bows
07:59 brrt joined #perl6
07:59 RabidGravy yeah, it's mostly for the long running process that may instantiate and throw away a number of them in its lifetime
07:59 RabidGravy I'll see how it goes
08:01 espadrine joined #perl6
08:02 masak m: my $zombie; class C { has $.is-zombie = False; submethod DESTROY { say "died, resurrected"; $zombie = self; $!is-zombie = True }; method gist { $.is-zombie ?? "g'day, ol' chap" !! "braaaaaains" } }; { my $c = C.new; say $c }; for ^1000 { [] }; say $zombie
08:02 camelia rakudo-moar bcf38c: OUTPUT«braaaaaains␤died, resurrected␤g'day, ol' chap␤»
08:02 masak oh, that's a polite zombie.
08:02 masak m: my $zombie; class C { has $.is-zombie = False; submethod DESTROY { say "died, resurrected"; $zombie = self; $!is-zombie = True }; method gist { $.is-zombie ?? "braaaaaains" !! "g'day, ol' chap" } }; { my $c = C.new; say $c }; for ^1000 { [] }; say $zombie
08:02 camelia rakudo-moar bcf38c: OUTPUT«g'day, ol' chap␤died, resurrected␤braaaaaains␤»
08:02 masak better. :)
08:04 spider-mario joined #perl6
08:04 domidumont joined #perl6
08:17 zacts alright
08:17 zacts I just installed the latest release of rakudo*
08:17 zacts 2015.03
08:17 zacts I guess
08:17 zacts so, what is a good ebook / tutorial series?
08:18 zacts what is most recommended here?
08:18 zacts (both for total newbies, and for experienced programmers?)
08:18 zacts for learning perl6 the language
08:18 zacts (not internals of rakudo or anything)
08:18 zacts I do see https://github.com/perl6/book
08:18 DrForr I might start with http://learnxinyminutes.com/docs/perl6/ ...
08:18 yoleaux 22 Jun 2015 21:09Z <tony-o_> DrForr: give Data::Dump a shot with the ABNF stuff, i think it turned out pretty well
08:18 zacts but I want to double check things
08:19 FROGGS joined #perl6
08:19 masak zacts: the perl 6 book is fine, but incomplete.
08:20 masak zacts: also do check out http://learnxinyminutes.com/docs/perl6/
08:20 masak zacts: and http://perlgeek.de/blog-en/perl-5-to-6/
08:20 zacts ok cool
08:20 masak zacts: and https://perl6advent.wordpress.com/
08:21 dakkar joined #perl6
08:21 masak together, those resources cover a lot.
08:21 zacts sweet
08:21 masak (and are generally of very high quality, too)
08:21 zacts and of course the perl6 language specification docs?
08:21 masak yes, but they're sometimes quite specialist and terse.
08:21 zacts ok
08:22 masak you need to be damaged by the lingo for a few years to appreciate them :P
08:22 masak as soon as there's something that's unclear, poke us here on the channel, and we'll camelia things together to clear stuff up.
08:22 masak m: say "OH HAI, zacts!"
08:22 camelia rakudo-moar bcf38c: OUTPUT«OH HAI, zacts!␤»
08:22 * masak .oO( it's like a puppet show )
08:22 zacts salvete
08:22 zacts salve camelia bot
08:23 masak m: say get
08:23 camelia rakudo-moar bcf38c: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
08:24 zacts masak: how to utilize perl6advent?
08:24 zacts it looks like a list of daily blog posts?
08:24 masak zacts: I'd start at https://perl6advent.wordpress.c​om/category/table-of-contents/
08:24 zacts is there another blog, on notable posts?
08:24 zacts oh I see
08:24 masak zacts: and pick a topic that interests you.
08:24 zacts I didn't see the TOC yet
08:24 masak it's a bit out of the way :)
08:24 zacts heh, I missed that one
08:24 zacts cool
08:25 masak we've been at it for six years, so there's a lot in there.
08:25 zacts yeah
08:30 kurahaupo joined #perl6
08:31 bin_005 joined #perl6
08:31 larion joined #perl6
08:34 leont joined #perl6
08:45 atroxaper joined #perl6
08:49 RabidGravy also at least one of the advents regarding concurrency won't work, I can't remember which one but it uses "winner" rather than "earliest" to do something with Channels
08:50 RabidGravy or is "winner" still in there and just deprecated? I can't remember
08:50 amurf joined #perl6
08:50 masak think so.
08:50 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^870 { [] }
08:50 camelia rakudo-moar bcf38c: ( no output )
08:51 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^1000 { [] }
08:51 camelia rakudo-moar bcf38c: ( no output )
08:51 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^10_000 { [] }
08:51 camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
08:51 masak hm, GC happens much earlier on my laptop than on camelia's box.
08:51 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^4_000 { [] }
08:51 camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
08:51 itz morning
08:51 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^2_000 { [] }
08:51 camelia rakudo-moar bcf38c: ( no output )
08:51 masak morning, itz
08:51 RabidGravy marnin itz
08:52 masak here, it happens after 862 iterations of that loop.
08:52 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_000 { [] }
08:52 camelia rakudo-moar bcf38c: ( no output )
08:52 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_500 { [] }
08:52 camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
08:52 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_250 { [] }
08:52 camelia rakudo-moar bcf38c: ( no output )
08:52 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_375 { [] }
08:52 camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
08:53 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_312 { [] }
08:53 camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
08:53 itz joined #perl6
08:53 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_281 { [] }
08:53 camelia rakudo-moar bcf38c: ( no output )
08:53 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_296 { [] }
08:53 camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
08:54 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_288 { [] }
08:54 camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
08:54 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_284 { [] }
08:54 camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
08:54 masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_282 { [] }
08:54 camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
08:54 masak ok, 3282.
08:54 masak m: say 3282 / 862
08:54 camelia rakudo-moar bcf38c: OUTPUT«3.807425␤»
08:55 masak I wonder if camelia's server has 4 times the available RAM.
08:58 espadrine joined #perl6
09:02 moritz free -m on camelia says: Mem:          3961       1106       2854         40          0        824
09:04 masak huh, that's 4Gb total, innit?
09:04 masak I have 16Gb here.
09:04 masak GB*
09:04 masak though less than 2GB free.
09:06 dalek nqp: 42b8722 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
09:06 dalek nqp: "Can not" => "Cannot" for a few error messages."
09:06 dalek nqp: review: https://github.com/perl6/nqp/commit/42b8722142
09:06 psch hi #perl6 o/
09:06 moritz masak: yes
09:06 larion joined #perl6
09:07 moritz though the concept of "free memory" is somewhat meaningless on UNIXy systems that use up all "free" ram as buffer
09:07 masak hm, does it also mean that 3282 iterations of that loop end up filling up ~2GB of RAM?
09:07 masak that sounds a bit too leaky for today's Rakudo.
09:08 moritz no
09:08 moritz VMs tend not to use up all free memory before starting to GC
09:09 moritz that would be very unfriendly to other processes (likely other instances of the same VM...) on the same OS
09:11 lsm-desktop joined #perl6
09:13 moritz python confuses me
09:14 masak how so?
09:14 moritz in __init__ (for example) you can initialize attributes simply by assigning them
09:14 moritz if you do that in a regular method, you get an exception
09:14 moritz but
09:14 moritz __init__ runs after the object has been created
09:14 moritz where exactly is the boundary that allows or disallows attribute autovivification?
09:15 masak moritz: I think you're wrong about "if you do that in a regular method, you get an exception"
09:15 jnthn masak: The difference is just as likely down to things like "my environment has some more symbols than camelia's one" or, even more likely, "I'm not running the restricted setting"
09:16 masak moritz: https://gist.github.com/masak/93815861a74c571c784f
09:16 masak jnthn: ooh
09:16 masak what's it called when a developer gets more and more insensitive to complexity? I find that happens to me at basically all levels, from writing small expressions to making high-level architectural decisions.
09:16 moritz masak: I'm talking about python 3, fwiw
09:16 moritz masak: "age"
09:17 masak moritz: https://gist.github.com/masak/070aa6219ed925728b92
09:17 nowan joined #perl6
09:17 masak moritz: you had to say "age", and not "experience" :P
09:18 moritz masak: I can't reproduce it now, but I'm pretty certain I got exceptions when trying to assign to non-existing attributes; if it happens again, I'll try to isolate it
09:18 masak moritz: but I suspect it's not even that simple. I know a lot of people who never travel that path, even though they have walked far.
09:18 masak moritz: yes, I believe it's happened to me too. but it's not as simple as you claim.
09:19 moritz masak: there's a saying about making 10 mistakes 1000 times vs making 10000 mistakes
09:20 moritz masak: maybe it's not "age", but "having wandered far enough", figuratively speaking
09:22 masak I think there has to be a desire to improve, too.
09:23 masak and something tells me that I wouldn't be all that successful in convincing my 15-year-old self to adopt the coding style I have today. :P
09:24 moritz same here :-)
09:24 * masak .oO( "it's for your own good, you'll see!" -- "go away, grandpa" )
09:24 masak basically the premise of Looper, by the way.
09:27 DrForr I might have seen that on the plane over to YAPC...
09:27 masak oh, the movie. first I thought you meant you witnessed that conversation between two fellow passengers :P
09:28 DrForr Oh, no, different time travel flick, but I've seen that too.
09:31 DrForr What I watched on the plane was some half-ass Blair Witch ripoff.
09:31 RabidGravy but yeah Looper is odd
09:31 rindolf joined #perl6
09:32 itz I liked "Source Code" by the guy who made "Moon" although there isn't actually any coding in it
09:32 RabidGravy yeah that's freaky too
09:33 moritz itz: I liked the first 80% of "Source Code"
09:33 psch the ending of source code was a bit cheesy
09:34 psch still a good movie though
09:34 itz endings are hard a Pareto film is good enough
09:36 [ptc] m: my $url = "git@github.com:username/reponame.git"; $url ~~ m/ \: $<username> = (.*) \/ /; $url ~~ s/$<username>/"other"/; say $url;
09:36 camelia rakudo-moar bcf38c: OUTPUT«git@github.com:username/reponame.git␤»
09:36 [ptc] hrm, why doesn't the named capture get used in the substitution?
09:36 [ptc] do I have to assign it to a variable first before using the value in a substitution?
09:37 psch m: my $url = "git@github.com:username/reponame.git"; $url ~~ m/ \: $<username> = (.*) \/ /; $url ~~ m/{ $/.perl.say }/;;
09:37 camelia rakudo-moar bcf38c: OUTPUT«Match.new(ast => Any, list => (), hash => EnumMap.new(), orig => "git\@github.com:username/reponame.git", to => 0, from => 0)␤»
09:38 psch [ptc]: you have a new $/ already
09:38 [ptc] ah, I knew I'd missed something
09:38 [ptc] psch: thanks!
09:38 masak which makes sense
09:39 masak because you can access $/ already on the left side of the substitution
09:39 masak so it can't refer to the old one
09:39 * [ptc] needs more coffee
09:40 dalek roast: 6f6461b | peschwa++ | S04-exceptions/fail.t:
09:40 dalek roast: Unfudge now-passing test for RT #64990.
09:40 dalek roast: review: https://github.com/perl6/roast/commit/6f6461b3ec
09:40 synbot6 Link:  https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=64990
09:41 andreoss joined #perl6
09:49 b2gills joined #perl6
09:50 laouji joined #perl6
09:56 andreoss > Could not download module metadata: can't download projects file HTTP/1.0 200 OK
09:56 yoleaux 19 Jun 2015 16:55Z <[ptc]> andreoss: could you have a look at euler/prob054-andreoss.pl please?  It runs again, however gives 380 as the answer instead of 376, and I'm not sure why
09:56 laouji joined #perl6
09:56 masak andreoss: 200 OK is such a harsh error code.
09:57 andreoss cant installed modules with new panda, but old version seems okay
09:57 laouji joined #perl6
09:58 atroxaper joined #perl6
09:59 [ptc] should all modules have an entry for "source-url" in the META.info?
09:59 leont joined #perl6
09:59 [ptc] or is it ok to have either "repo-url" and/or "source-url"?
10:02 pnu joined #perl6
10:03 RabidGravy I think the code of the thing that makes the modules list looks for source-url, but that may have changed since I last looked
10:05 RabidGravy andreoss that may have been me, I added a quick hack to stop it over-writing the modules list if it got other than a 200
10:05 [ptc] RabidGravy: I just stumbled across a module which doesn't have source-url, however does have repo-url
10:06 [ptc] RabidGravy: I'm just wondering if I should submit a PR, if it's something which needs to be corrected
10:07 RabidGravy ptc, I'd guess the touchstone is whether it appears in the modules list and whether panda can install it
10:07 RabidGravy if the answers are yes then no need ;-)
10:07 [ptc] :-)
10:08 RabidGravy andreoss, in lib/Panda/Ecosystem.pm I think
10:12 RabidGravy andreoss, hahaha.  my hack was looking specifically for HTTP/1.1
10:12 RabidGravy better make that HTTP/1.<[01]> then
10:12 [ptc] RabidGravy: surely there's a standard, that module writers should follow
10:13 [ptc] RabidGravy: or at least a set of specs to help module writers have the correct metadata in the META* files
10:13 RabidGravy it's http://design.perl6.org/S22.html#META6.json but the implementations seem to differ from what that says
10:13 [ptc] or has something like that not yet crystallised?
10:14 [ptc] thanks for the link.  You're right, the implementations differ from the spec
10:15 tadzik oh, heh
10:15 tadzik https://github.com/tadzik/panda/commit/7​d88f35bdd891961714685419738d73fd18b0ea8
10:15 tadzik it's checking for HTTP/1.1 %)
10:15 [ptc] I'm thinking about things from a documentation point of view: what should one write in the docs to help new module writers?  (rhetorical question :-) )
10:16 RabidGravy tadzik, do you want a PR to un-screw that or are you happy to fix yourself.  I hadn't considered that the HTTP version might change from what I was see when I tested that ;-)
10:17 tadzik RabidGravy: A PR would be welcome, I may not have a chance to fix it any time soon
10:17 RabidGravy okay
10:18 Ven joined #perl6
10:19 leont joined #perl6
10:20 Ven o/, #perl6!
10:20 masak \o
10:20 psch o/ Ven
10:21 Ven lots of "TRANSLATEME" on that swiss perl workshop page =P
10:21 [ptc] RabidGravy: here's a good example: Kains (https://github.com/cedric-vincent/kains/) adheres to the design spec, however can't install via panda since source-url isn't in the metadata
10:21 [ptc] I can see this being frustrating for module authors...
10:28 RabidGravy tadzik, there you go https://github.com/tadzik/panda/pull/176
10:28 itz talking of pull requests..
10:28 itz https://github.com/rakudo/rakudo/pull/441
10:28 itz *cough*
10:29 nwc10 itz: would it be faster to get a commit bit? :-)
10:29 itz probably .. but don't I have to sign something or other
10:29 [ptc] yup
10:30 sue so sign it then
10:30 nwc10 and then you write a cheque, er, wait, no, you *can* fax it, IIRC
10:30 nwc10 no cheque needed.
10:30 sue wait, fax? what century is this
10:31 RabidGravy [ptc], it's probably fix panda and the thing that generates the module list
10:31 nwc10 sue: the other end is somewhere in the US. Although I think that the UK is similarly brain dead in some of these things.
10:31 nwc10 (about what fakeable technology *is* acceptable as a signature, and what fakeable technology is not)
10:32 sue print, sign, scan, email
10:32 itz sounds like a good yak shaving project .. write a NativeCall interface to an old fax library first
10:32 [ptc] RabidGravy: it does seem a bit of an overkill to have 3 separate places to specify the source repo url...
10:32 RabidGravy yeah
10:34 RabidGravy andreoss, as a matter of interest are you behind a proxy?
10:36 Ven joined #perl6
10:40 RabidGravy [ptc], probably have the module list thing accept all of them and regularize and have panda transitionally accept all but warn that it should be changed to support/source or whatever the right thing is
10:41 RabidGravy panda gen-meta does emit what it says in the s22
10:43 [ptc] who's the right person to ask about what the future Right Thing(TM) is?  FROGGS maybe?  He's done a lot of work on the META* stuff
10:44 moritz [ptc]: FROGGS, lizmat and tadzik
10:45 nine So where can I find this document I have to sign to get a commit bit?
10:46 [ptc] moritz: thanks
10:46 nwc10 nine: this, I beleive: http://www.perlfoundation.org/​contributor_license_agreement
10:47 [ptc] sorry to be annoying, just stumbled across the issue and thought if I can correct something now, hopefully it reduces the pain for others later
10:50 RabidGravy [ptc], just looked, the modules list does actually reflect the support.source so it would only be panda that needs changing
10:51 atroxaper joined #perl6
10:51 RabidGravy doesn't look like a big change to be honest
10:51 [ptc] no, it probably isn't
10:52 RabidGravy still waiting for building materials delivery otherwise I'd dive in
10:52 [ptc] I think my biggest problem is that there are 3 ways to do the same thing, which might not really be in the sense of TMTOWDI
10:54 RabidGravy no, it should definitely support what it says in the s22
10:54 _mg_ joined #perl6
10:57 nine nwc10: thanks! Your link led me to http://www.perlfoundation.or​g/attachment/legal/cla3.pdf which is better for print
11:03 larion joined #perl6
11:08 Ven joined #perl6
11:10 domidumont joined #perl6
11:15 moritz colomon++ # p6l answer to yary
11:16 colomon :)
11:18 moritz mine would have just been "symbolic math is out of scope for Perl 6 core"
11:20 colomon That would be my default position too, but it’s possible an awesome module implementation of it could convince me otherwise.  ;)
11:21 moritz we should provide enough infrastructure to make an awesome module implementation possible
11:21 moritz and well-integrated into the rest of language
11:21 colomon absolutely, and I hope we already have.
11:21 moritz but I don't want to burden compiler writers with maintaining a computer algebra system
11:23 colomon right, it would have to be a very awesome module to make me question your poition.  ;)
11:26 FROGGS joined #perl6
11:32 RabidGravy is access to a "my" variable in the body of a class threadsafe or is it better to protect it with a  Lock ?
11:34 telex joined #perl6
11:35 masak RabidGravy: no, not threadsafe.
11:36 RabidGravy i.e. class A { my Int $clients = 0; method init() { if $clients == 0 { # do something }; $clients++ } method shutdown { $clients--; if $clients == 0 { # do something } }
11:36 masak RabidGravy: probably better to have some kind of synchronization mechanism, yes.
11:36 masak RabidGravy: maybe have a look at http://jnthn.net/papers/2014​-apw-objects-concurrency.pdf for ideas
11:36 RabidGravy Lock it is then
11:37 moritz Lock.protect({ $clients++ })
11:39 yakudza joined #perl6
11:39 jnthn Strictly, it's not that access to the variable itself isn't threadsafe, it's that $clients++ is a read/compute/write sequence which is not atomic.
11:40 jnthn Note you need an instnace of Lock
11:40 jnthn But generally it's better to work at a higher level
11:40 jnthn Note your "if $clients == 0" races with other methods too
11:41 jnthn OO::Monitors is probably appropriate for this kind of class.
11:41 atroxaper joined #perl6
11:44 andreoss joined #perl6
11:46 ribasushi joined #perl6
11:47 andreoss` joined #perl6
11:48 b2gills joined #perl6
11:52 RabidGravy hmm, so it's probably have a monitor that has that logic, lets see how that might work out
11:59 RabidGravy so in the above $clients would be an attribute of a monitor class and replaced with a single monitor object
11:59 masak one of the really nice hidden benefits of IDE rename refactors is that you can initiate them from a usage site. which is usually where you have the need to rename something.
12:04 JimmyZ ./perl6-m -e "my $i =1"
12:04 JimmyZ ===SORRY!=== Error while compiling -e
12:04 JimmyZ Malformed my
12:04 JimmyZ is it right?
12:06 jnthn JimmyZ: Your shell will be interpolating the $i if you're using double quotes, no?
12:06 JimmyZ no sure ,on linux
12:07 diana_olhovik joined #perl6
12:08 jnthn Almost certainly that, then. So you're feeding rakudo "my  =1"
12:08 dalek rakudo-star-daily: f71f406 | coke++ | log/ (2 files):
12:08 dalek rakudo-star-daily: today (automated commit)
12:08 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/f71f40662b
12:08 dalek rakudo-star-daily: ef570f8 | coke++ | log/ (2 files):
12:08 dalek rakudo-star-daily: today (automated commit)
12:08 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/ef570f822c
12:08 jnthn Which is malformed.
12:08 dalek perl6-roast-data: 5c66c05 | coke++ | bin/rakudo.moar-jit.sh:
12:08 dalek perl6-roast-data: Hoist out $WORKDIR
12:08 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/5c66c053f2
12:08 dalek perl6-roast-data: 8c1f8e4 | coke++ | bin/rakudo.moar.sh:
12:08 dalek perl6-roast-data: moar hoist
12:08 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/8c1f8e49c5
12:08 dalek perl6-roast-data: 5bb3b29 | coke++ | / (9 files):
12:08 dalek perl6-roast-data: today (automated commit)
12:08 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/5bb3b293c4
12:08 jnthn Try single quotes
12:08 moritz type this to verify:   echo ./perl6-m -e "my $i =1"
12:08 moritz that way you can see the command after the shell is finished with it
12:09 ShimmerFairy Yeah, using single quotes for perl6 -e has become second-nature for me by this point :)
12:09 JimmyZ hmm, looks like my bash is interpolating the $
12:09 JimmyZ it was not
12:10 moritz it should
12:10 masak ShimmerFairy: which is fine as long as you're on a Unix system. when you're in a Window shell, only double quotes work.
12:11 TEttinger yeah, I hit that difference hard :)
12:11 ShimmerFairy masak: Not my problem DOS isn't user-friendly :P
12:11 TEttinger perl6-m -e'my $i =1'
12:13 jnthn Thanks for playing rakudo bug bingo. Better luck next time!
12:13 FROGGS :D
12:13 * masak .oO( newbs ) :P
12:14 [Coke] (backscroll) moritz: our work kitchen is documented as self cleaning. as in, "clean it up yourself"
12:14 psch $ ./perl6 --target=jar --output=Foo.jar -e'say "hi"'
12:14 psch $ ./perl6 --with-cu=Foo.jar
12:14 psch hi
12:14 psch name of the switch up for debate :P
12:14 psch but that's a good start for self-executable jar files \o/
12:15 masak [Coke]: that's the same kind of usage as when some people refer to IIFEs as "self-invoking functions".
12:15 psch everything else that does something similar was hidden somewhere in Perl6::Grammar and not as easily reachable
12:15 tadzik jnthn: I now feel a need to create such bingo
12:15 FROGGS psch++
12:15 FROGGS cool!
12:15 tadzik with squares like "involves silly unicode characters", or "has something to do with precomp"
12:16 jnthn haha :D
12:17 TEttinger tadzik: hang on let me find my favorite clojure snippets involving silly unicode, see how they port
12:17 FROGGS tadzik: and then we print it and hand it out at the next workshop :P
12:18 FROGGS tadzik: that could be mixed with contribution stuff...
12:18 masak this idea has to be made to happen
12:18 lizmat PSA: I'm working on the Perl 6 Weekly, if there is something that happened in the past 3 weeks that you want mentioned, please let me know
12:19 masak make one of the squares "someone makes their first contribution to a Perl 6 repo"
12:19 FROGGS "Scream damnit if all of these apply to you: Tried Something; Hit a bug; Asked for Help; Fixed the Bug; Became compiler implementer."
12:19 masak #dammitperl6
12:19 FROGGS exactly
12:20 masak "yeah, I wasn't able to get any specific help with my problem... so I became a compiler implementor."
12:20 masak I hate when that happens. :P
12:21 TEttinger (let [foo (+ 1 1) foo])
12:21 TEttinger if you read that with your eyes, it will not work
12:21 RabidGravy jnthn, yep putting the init and shutdown logic in a monitor of which there is a single instance for the class works nicely. Cheers!
12:21 FROGGS lizmat: I made rakudo@maor buildable on gcc+gmake on windows, and am about to launch run()/shell() as pipe() replacement and am about to launch libffi support to let moarvm build on any platform...
12:21 TEttinger it however prints 2
12:21 RabidGravy jnthn, BTW OO::Monitors has a deprecated isa_ok in its tests
12:21 lizmat FROGGS: good news!
12:22 TEttinger FROGGS: so many awesome things in there!
12:22 FROGGS lizmat: moarvm will then build on e.g. all debian platforms except Hurd most probably (https://buildd.debian.org/s​tatus/package.php?p=moarvm <--- this will turn less green soon)
12:22 FROGGS err, less red
12:22 TEttinger FROGGS: the gcc condition is weird though on windows, there are so many variants
12:23 TEttinger tdm-gcc has been good so far for me
12:23 FROGGS TEttinger: it works perfectly on my box using msvc and strawberry's gcc
12:23 TEttinger nice!
12:23 TEttinger which msvc :)
12:23 FROGGS other environments need to be ticketed I'd say
12:23 FROGGS 2012 express IIRC
12:23 FROGGS 17.0 or so
12:23 TEttinger there's an open bug I was asked to post re 2015 community not working
12:23 TEttinger 2013 works though
12:24 TEttinger (also community)
12:24 FROGGS TEttinger: yes, I'll look into the MSVC-2015 sooner or later
12:24 RabidGravy I may dig out the windows machine and give openwatcom a try - if nothing else it will fail to compile quickly ;-)
12:24 TEttinger oh my god, community is so much nicer than express.  they added so many former-pro features
12:25 FROGGS RabidGravy: it probably will... because we are checking for the existence of cl.exe/gmake.exe/gcc.exe/nmake.exe
12:25 TEttinger 2015 has a really nice profiler that by default runs in a side pane of VS, shows memory usage and CPU usage in realtime, what's using the most time
12:26 TEttinger lets you click a function/method name to see its source
12:26 FROGGS nice
12:27 TEttinger I'm really enjoying atom as an editor though for perl.  nice and simple
12:28 psch hm, use statements might turn out rather complicated with how i've set up stuff atm though
12:28 amurf joined #perl6
12:28 brrt joined #perl6
12:33 tadzik FROGGS: yeah, that's a fun idea :)
12:34 dalek perl6-roast-data: 03c7dc6 | coke++ | bin/git.p5:
12:34 dalek perl6-roast-data: Start pulling panda
12:34 dalek perl6-roast-data:
12:34 dalek perl6-roast-data: Will need for Inline::Perl5 tests
12:34 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/03c7dc650d
12:34 tadzik heh. "My item generator for an RPG was too slow, so I became a compiler contributor"
12:34 tadzik flawless logic
12:34 dalek roast: af92bda | hoelzro++ | S26-documentation/why- (3 files):
12:34 dalek roast: post constraints on parameters should'nt affect a sub's declarative docs
12:34 dalek roast: review: https://github.com/perl6/roast/commit/af92bdafc9
12:35 dalek rakudo/nom: 7fbd54a | hoelzro++ | src/Perl6/Actions.nqp:
12:35 dalek rakudo/nom: Prevent parameters in post constraint subs from clobbering PRECEDING_DECL
12:35 dalek rakudo/nom:
12:35 dalek rakudo/nom: ...which prevents trailing comments from getting attached to the routine
12:35 dalek rakudo/nom:
12:35 dalek rakudo/nom: Fixes RT #125253
12:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7fbd54ad35
12:35 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125253
12:35 dalek perl6-examples: 3ba4aa9 | andreoss++ | categories/euler/prob054-andreoss.pl:
12:35 dalek perl6-examples: [euler] problem 54 bug fix
12:35 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/3ba4aa9939
12:35 RabidGravy I'm seeing testers results which seem to suggest that $*USER is not defined on Linux,  I'm not quite sure why that might be
12:37 psch RabidGravy: no id in PATH i'd guess
12:37 RabidGravy is it possible that someone is testing e.g. in a docker container that doesn't have /usr/bin/id or something?
12:37 psch RabidGravy: that's what Process.pm uses for $*USER
12:37 psch ... :)
12:37 RabidGravy yeah
12:38 psch i wonder if setting $*USER to something Failure-y in that case makes sense
12:39 RabidGravy possibly, it would be nicer if it didn't have to shell out to do it at all
12:42 andreoss` left #perl6
12:43 jnthn RabidGravy: Do you wnat me to fix the isa-ok, or give you a commit bit so you can? :)
12:43 atroxaper joined #perl6
12:43 RabidGravy jnthn, whichever works better for you, I'm just sitting here waiting for some building materials
12:45 RabidGravy m: say $*USER; say $*USER.WHAT;
12:45 camelia rakudo-moar bcf38c: OUTPUT«camelia (1012)␤Cannot look up attributes in a type object␤  in block <unit> at /tmp/H3pQbEs2Kq:1␤␤»
12:45 RabidGravy that's a bit odd
12:46 jnthn RabidGravy: What's your github id? :)
12:46 RabidGravy jonathanstowe
12:46 masak m: say ?$*USER
12:46 camelia rakudo-moar bcf38c: OUTPUT«True␤»
12:46 nine FROGGS: what's keeping moarvm from building on Hurd?
12:46 masak m: say $*USER.^name
12:46 camelia rakudo-moar bcf38c: OUTPUT«IdFetch␤»
12:47 jnthn RabidGravy: Added
12:47 nwc10 is there an equivalent of s/foo/bar/r in Perl 6?
12:47 itz https://github.com/jnthn/oo-monitors/pull/5
12:47 lizmat S/foo/bar/ ?
12:48 masak the stringification methods in IdFetch assume that it's an instance object, not a type object.
12:48 masak method Str     { return Nil unless fetch(); ~PROCESS::{$!name} }
12:48 lizmat masak: will fix
12:48 hoelzro morning #perl6
12:49 nine nwc10: "foobar".subst(/foo/, "bar");
12:49 RabidGravy itz, just seen and merged ;-)
12:49 RabidGravy there that was easy
12:49 itz ty
12:50 aborazmeh joined #perl6
12:50 aborazmeh joined #perl6
12:50 jnthn lizmat: For the 3weekly, can link to my "what I did" blog post :)
12:50 nwc10 nine: thanks. and then globally?
12:50 nwc10 I can't work out where to put the :g
12:50 jnthn lizmat: And maybe mention the most exciting things.
12:50 lizmat jnthn: already in there  :-)
12:50 jnthn nwc10: S:g
12:50 lizmat ah, the most exciting things such as?
12:50 FROGGS nine: libuv
12:50 masak lizmat: I would file an RT about it, but I'm a bit busy at the moment.
12:50 lizmat masak: no need, fixing as we speak
12:51 masak nodnod
12:51 jnthn lizmat: I dunno, look at the headlines of the post and see what excites you :D
12:51 nine nwc10: "foofoobar".subst(/foo/, "bar", :g);
12:51 nine nwc10: http://doc.perl6.org/type/Str#method_subst
12:51 masak would be interesting to make a setting-wide search for other Str/gist/Numeric methods that assume instance-hood.
12:51 lizmat jnthn: ah, that way...  hmmm....
12:51 FROGGS nine: I attempted to port it, though one has to implement some event functions using poll(), where libuv uses pollset/kqueue/epoll on other platforms
12:52 masak it's a well-known trap of Perl 6, failing to consider both the type object case and the instantiated object case.
12:52 nwc10 nine: thanks
12:53 nwc10 mmm, fractionally LTA in that document - captures, and how to use them
12:53 jnthn Just say that the "h" in hurd is for "hipster", and then somebody will surely want to port node.js to it :)
12:53 jnthn And to libuv along the way :)
12:53 jnthn *do
12:53 nwc10 lets just say that I can write the joke fairly easily in Perl 5:
12:53 nwc10 perl -C7 -le 'print "Unicode" =~ s/./$&\x{0307}/rg;'
12:53 FROGGS jnthn: :P
12:53 nwc10 oh, hanogn, 0x0308
12:53 nwc10 I fail :-)
12:54 [Sno] joined #perl6
12:54 masak nwc10: neat :)
12:54 masak how to do that in Perl 6?
12:55 masak I notice some people mentioning a S/foo/bar/ form in the backlog. is this spec?
12:55 nwc10 yes I'm failing on that part.
12:55 jnthn masak: I think TimToady put it in recentlyish
12:56 lizmat f4e4de2e9907368aa04be1f to be precise
12:56 moritz m: say 'Unicode'.subst(:g, /./, -> $/ { "$/\c[COMBINING DOT ABOVE]" })
12:56 camelia rakudo-moar 7fbd54: OUTPUT«U̇ṅi̇ċȯḋė␤»
12:56 masak lizmat: thanks.
12:57 masak moritz: cool. nwc10++'s had two dots above, though.
12:57 masak a... "diaresis", I guess.
12:57 moritz m: say 'Unicode'.subst(:g, /./, -> $/ { "$/\c[COMBINING DIAERESIS]" })
12:57 camelia rakudo-moar 7fbd54: OUTPUT«Ün̈ïc̈öd̈ë␤»
12:57 moritz my terminal doesn't print the diaeresis above the n and c
12:58 masak oh, S/foo/bar/ is in Rakudo but not in the spec yet.
12:58 masak moritz: looks fine here.
12:58 jnthn m: say [~] 'Unicode'.comb >>~>> "\c[COMBINING DIAERESIS]"
12:58 camelia rakudo-moar 7fbd54: OUTPUT«Ün̈ïc̈öd̈ë␤»
12:58 jnthn m: say chars [~] 'Unicode'.comb >>~>> "\c[COMBINING DIAERESIS]"
12:58 camelia rakudo-moar 7fbd54: OUTPUT«7␤»
12:58 jnthn \o/
12:58 masak aha, TimToady++ notes it as a "to play with" feature...
12:59 masak the patch is literally two lines changing <3
13:01 Khisanth joined #perl6
13:01 danieli left #perl6
13:12 jnthn m: say uniprop 0x9FCD, 'Script'
13:12 camelia rakudo-moar 7fbd54: OUTPUT«Unknown␤»
13:13 FROGGS .u 0x9FCD
13:13 yoleaux No characters found
13:13 andreoss` joined #perl6
13:15 jnthn .u 9FCD
13:15 yoleaux No characters found
13:15 jnthn .u horns
13:15 yoleaux U+1F608 SMILING FACE WITH HORNS [So] (😈)
13:15 masak go FreeBSD!
13:16 itz ha
13:19 hoelzro I was just playing around earlier, and I noticed that unlinking a non-existent file returns True; is that intentional?
13:19 hoelzro designs docs say &unlink should return a list of files successfully deleted; I don't know if that applies to IO.unlink, though
13:21 Celelibi joined #perl6
13:21 masak hoelzro: the implementation in the setting suggests that IO.unlink returning true is expected, and helps &unlink return a list of successfully deleted files.
13:22 hoelzro masak: alright. Should unlinking a file that doesn't exist be considered successful, though?
13:23 dalek roast: 4cabf2d | jnthn++ | S05-mass/properties-derived.t:
13:23 dalek roast: De-fragile <:Ideographic> tests.
13:23 dalek roast:
13:23 dalek roast: Unicode sometimes adds more to the range, so picking one off the end
13:23 dalek roast: to test "not an ideograph" puts the test at risk of failing for no
13:23 dalek roast: good reason in future versions of Unicode. This is the case when going
13:23 dalek roast: from Unicode 7 to Unicode 8, which does all more ideographs.
13:23 dalek roast: review: https://github.com/perl6/roast/commit/4cabf2d89e
13:23 masak hoelzro: not if you ask me.
13:23 aborazmeh joined #perl6
13:23 aborazmeh joined #perl6
13:23 masak hoelzro: that would be a rather hollow success.
13:23 hoelzro I agree
13:23 masak hoelzro: what does Perl 5 of that case?
13:23 masak think*
13:23 * hoelzro checks
13:24 hoelzro returns falsy
13:24 dalek rakudo/nom: e862714 | lizmat++ | src/core/Process.pm:
13:24 dalek rakudo/nom: Make Str/Numeric/gist on $*USER/GROUP work ok
13:24 dalek rakudo/nom:
13:24 dalek rakudo/nom: masak++ for pointing out the error of my ways  :-)
13:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e8627149e9
13:24 masak there you go :)
13:25 lizmat afaik, the problem lies deeper:
13:25 lizmat hoelzro: could you check if it does the same on the JVM?
13:26 hoelzro sure, I'll just have to build it
13:26 masak I just double-checked whether `state` is shared between recursive calls to the same routine. anyone care to hazard a guess? :)
13:27 jnthn I'd expect it is.
13:27 masak m: sub foo($x) { say $x; state $y = 42; $y--; say $y; foo($x - 1) unless $x == 0; }; foo(1)'
13:27 camelia rakudo-moar 7fbd54: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NbuR505sb7␤Two terms in a row␤at /tmp/NbuR505sb7:1␤------> 3y; foo($x - 1) unless $x == 0; }; foo(1)7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤   …»
13:27 masak m: sub foo($x) { say $x; state $y = 42; $y--; say $y; foo($x - 1) unless $x == 0; }; foo(1)
13:27 camelia rakudo-moar 7fbd54: OUTPUT«1␤41␤0␤40␤»
13:27 masak jnthn: that is correct.
13:27 lizmat hoelzro: hmmm.. seems to be the same on JVM
13:28 masak jnthn: but you probably implemented them :P
13:28 jnthn masak: Yes, but it's still relatively clear what's going on: there's no clone in a recursive call :)
13:28 masak jnthn: right. there is if the surrounding scope is re-entered, though.
13:28 jnthn Aye
13:29 masak m: for ^2 { sub foo { state $y = 42; $y--; say $y }; foo }
13:29 camelia rakudo-moar 7fbd54: OUTPUT«41␤41␤»
13:29 jnthn There's probably something horribly you can do involving a state variable, a closure, and recursion in order to collect the result of a tree traversal...
13:29 aborazmeh joined #perl6
13:29 aborazmeh joined #perl6
13:29 jnthn ...but you could lift the state and get the smae thing and probably be more useful, so... :)
13:32 jnthn RT #125445 is today's first victim :)
13:32 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125445
13:33 AndChat|228864 joined #perl6
13:34 RabidGravy yay! I can lose an otherwise un-necessary try if you fix that ;-)
13:34 lolisa joined #perl6
13:34 lizmat hoelzro: as a datapoint: looks like nqp::unlink on the JVM returns either -2 (doesn't exist) or 0 (success)
13:34 lizmat on MoarVM, it appears to always return the filename
13:35 lizmat perhaps this *should* be rakudobugged  :-)
13:35 hoelzro lizmat: I was just looking at that
13:35 * hoelzro rakudobugs it
13:35 jnthn Turns out both of the guesses in the ticket about what was wrong weren't right :)
13:38 itz m: use 5.10.0
13:38 camelia rakudo-moar 7fbd54: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zPsLuCWznD␤Confused␤at /tmp/zPsLuCWznD:1␤------> 3use 5.10.7⏏0␤    expecting any of:␤        dotty method or postfix␤»
13:38 lizmat jnthn: so what was it ?
13:38 itz hmm that should give an explicit version error I guess
13:40 hoelzro rakudobugged: RT #125463
13:40 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125463
13:40 hoelzro it seems MoarVM explicitly treats non-existence as success
13:42 bjz joined #perl6
13:43 dalek rakudo/nom: d078782 | jnthn++ | src/Perl6/Metamodel/ (2 files):
13:43 dalek rakudo/nom: Move .^can into MROBasedMethodDispatch role.
13:43 dalek rakudo/nom:
13:43 dalek rakudo/nom: Before, it was only implemented in ClassHOW, meaning that other things
13:43 dalek rakudo/nom: that could do method dispatch missed out on having it. This fixes the
13:43 dalek rakudo/nom: lack of .^can on EnumHOW, but also means others using the role will
13:43 dalek rakudo/nom: get a .^can for free.
13:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d078782c60
13:44 dalek roast: 1eb6df0 | jnthn++ | S12-enums/thorough.t:
13:44 dalek roast: Tests for RT #1354250.
13:44 dalek roast: review: https://github.com/perl6/roast/commit/1eb6df0b40
13:44 hoelzro I see that copy and rename support :createonly; does anyone else think that open() should have it as well?
13:44 masak buy a role, get a can for free!
13:44 masak m: role R { method foo {} }; say R.^can("foo")
13:44 camelia rakudo-moar 7fbd54: OUTPUT«Too many positionals passed; expected 2 arguments but got 3␤  in block <unit> at /tmp/j10w_YE3Qy:1␤␤»
13:45 masak m: class C { method foo {} }; say C.^can("foo")
13:45 camelia rakudo-moar 7fbd54: OUTPUT«foo␤»
13:45 masak are my assumptions wrong with the 'role R' code somehow?
13:46 lizmat masak: doesn't the role get punned into a class first ?
13:46 moritz masak: it's the old parametric role thingy again
13:46 lizmat hmmm... I guess not
13:46 dalek perl6-examples: 264a2ba | (Steve Mynott)++ | htmlify.pl:
13:46 dalek perl6-examples: add database access section
13:46 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/264a2ba3af
13:47 masak moritz: I must have forgotten what this old thing refers to. :) I know about parametric roles, though.
13:47 jnthn masak: Try it on the latest version :)
13:48 jnthn (That was exactly the failure mode of enum values)
13:48 moritz masak: introspection on roles usually can't work, because roles can have several (parameterized) candidates
13:49 lizmat jnthn: $ 6 'role R { method foo {} }; say R.^can("foo")'
13:49 lizmat Too many positionals passed; expected 2 arguments but got 3
13:49 lizmat :-(
13:49 moritz masak: so several introspection methods return callables instead, which take the exact role candidate(?) as parameter
13:50 jnthn heh
13:50 jnthn Oh...of *course* roles don't do MRO-based method dispatch. Duh.
13:50 jnthn So this fix is irrelevant to them.
13:50 * jnthn wonders what .^can on a role should do :)
13:51 jnthn I suspect .can works, though, by punning.
13:51 aborazmeh joined #perl6
13:51 aborazmeh joined #perl6
13:52 lizmat m: role R { method foo {} }; say R.can("foo")
13:52 camelia rakudo-moar e86271: OUTPUT«foo␤»
13:54 * jnthn gets another RT nailed
13:54 lizmat jnthn++
13:54 jnthn m: class A { my $boo will leave { say "leaving boo" }; }
13:54 camelia rakudo-moar e86271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ICi1Dn7zjw␤Method 'add_phaser' not found for invocant of class 'A'␤at /tmp/ICi1Dn7zjw:1␤»
13:54 jnthn m: my $boo will leave { say "leaving boo" };
13:54 camelia rakudo-moar e86271: OUTPUT«leaving boo␤»
13:54 jnthn m: { my $boo will leave { say "leaving boo" }; }
13:54 camelia rakudo-moar e86271: OUTPUT«leaving boo␤»
13:54 jnthn m: package A { my $boo will leave { say "leaving boo" }; }
13:54 camelia rakudo-moar e86271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FZKRYnIOhV␤Method 'add_phaser' not found for invocant of class 'A'␤at /tmp/FZKRYnIOhV:1␤»
13:55 jnthn m: sub  A { my $boo will leave { say "leaving boo" }; }
13:55 camelia rakudo-moar e86271: ( no output )
13:55 jnthn hm, what on earth...
13:55 jnthn lizmat: "class lexical" is just a plain lexical, so I've no idea what's going on there that makes it not work out...
13:55 lizmat there is more oddness there:
13:56 lizmat m: my $a will foo { ... }  # should fail
13:56 camelia rakudo-moar e86271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FxC24WCkb1␤Can't use unknown trait 'will foo' in a variable declaration.␤at /tmp/FxC24WCkb1:1␤------> 3my $a will foo { ... }  # should fail7⏏5<EOL>␤    expecting any of:␤        begin check fin…»
13:56 lizmat huh?
13:56 dalek specs/open-createonly: 87bd1b0 | hoelzro++ | S32-setting-library/IO.pod:
13:56 dalek specs/open-createonly: Add :createonly to valid named parameters for open()
13:56 dalek specs/open-createonly: review: https://github.com/perl6/specs/commit/87bd1b0e30
13:56 ShimmerFairy I decided to mess around with creating safe versions of the quantifiers (where e.g. <.ws>* won't freeze), and this is what I came up with: https://gist.github.com/lue/6d18300a7316a47825b1
13:56 psch hrm, LibraryLoader throws WATs into my understanding... :/
13:57 ShimmerFairy Hopefully it'll be interesting to people, even if it doesn't get used much :)
13:57 jnthn lizmat: I don't see the oddness? :)
13:57 lizmat yesterday I was looking at the same ticket, and it just wouldn't fail
13:57 jnthn :S
13:58 jnthn I think I know why the phaser is bust though
13:59 araujo joined #perl6
13:59 araujo joined #perl6
14:00 lizmat m: my $a will final { say "foo" } = 42; say $a
14:00 camelia rakudo-moar e86271: OUTPUT«42␤»
14:00 lizmat there is a throw in the trait, that just doesn't get called
14:00 dalek rakudo/nom: c81fdcb | jnthn++ | src/core/Str.pm:
14:00 dalek rakudo/nom: substr-rw should tolerate assignment of non-Str.
14:00 dalek rakudo/nom:
14:00 dalek rakudo/nom: Fixes RT #125402.
14:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c81fdcb0ac
14:00 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125402
14:00 lizmat m: my $a will foo { say "foo" } = 42; say $a
14:00 camelia rakudo-moar e86271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qTD_ByiAqX␤Can't use unknown trait 'will foo' in a variable declaration.␤at /tmp/qTD_ByiAqX:1␤------> 3my $a will foo { say "foo" }7⏏5 = 42; say $a␤    expecting any of:␤        begin check fina…»
14:00 dalek roast: 424a9a1 | jnthn++ | S32-str/substr-rw.t:
14:00 dalek roast: Test for RT #125402.
14:00 dalek roast: review: https://github.com/perl6/roast/commit/424a9a1ede
14:00 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125402
14:03 lizmat jnthn: OOC, why not STORE => sub ($, Str() $new ??
14:04 jnthn lizmat: No reason
14:04 lizmat wouldn't that be fewer ops ?
14:05 skids joined #perl6
14:05 hoelzro jnthn++ # fixing bugs
14:05 jnthn lizmat: No; Str() compiles into exactly what I wrote, iirc
14:06 jnthn aha
14:06 jnthn nqp::bindattr($varvar, $Variable, '$!block', $*DECLARAND);
14:06 * masak accidentally writes `fir @list` instead of `for @list`, and imagines a loop that somehow iterates on pinecones
14:07 lizmat fir sure!
14:07 andreoss` left #perl6
14:07 jnthn $*DECLARAND in the class body is not the block
14:07 jnthn That's the trait bug.
14:07 muraiki joined #perl6
14:07 * jnthn ponders how to fix it
14:07 ShimmerFairy .oO(@list[larch])
14:09 lizmat jnthn: would you mind if I change it to Str(), so as to be more idiomatic ?
14:09 yqt joined #perl6
14:11 jnthn lizmat: Feel free, just check it still passes the test :)
14:11 lizmat done that  :-)
14:11 jnthn :)
14:11 lizmat otherwise I wouldn't have suggested it
14:11 dalek rakudo/nom: 379ece6 | lizmat++ | src/core/Str.pm:
14:11 dalek rakudo/nom: More idiomatic solution to RT #125402, jnthn++
14:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/379ece6267
14:11 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125402
14:13 jnthn lizmat++
14:14 jnthn Think I figured out how to deal with the var trait in class body bug
14:15 Khisanth joined #perl6
14:17 amurf joined #perl6
14:21 njmurphy joined #perl6
14:21 hoelzro sometimes I want to get the substring between two indices, rather than the substring of a given length starting at a given index.  What do you all think of a :$to named parameter for substr?
14:21 moritz hoelzro: +1
14:22 jnthn That or a substr(Range) candidate...but maybe that's bad in some other wya
14:22 jnthn *way
14:22 jnthn Something feels a tiny bit off on :$to, but I can't really put my finger on it...
14:23 masak maybe the fact that a non-required named parameter obviates a positional parameter?
14:23 hoelzro jnthn: it is ambiguity between whether the character at $to is included or not?
14:23 masak I'd prefer the substr(Range) solution, I think.
14:23 hoelzro I'm good with substr(Range)
14:24 moritz beware, ranges can not only have integer endpoints
14:24 masak we already flirt with this kind of thinking by allowing .substr($from, * - 2)
14:24 AlexDaniel joined #perl6
14:24 moritz 'foobar'.substr('f'..'b')
14:24 hoelzro lizmat: I noticed your comment on my unlink RT ticket; how does MoarVM return the filename? is it because it's in the 0th register?
14:25 masak moritz: that's just as wrong as 'foobar'.substr('f', 'b'), though
14:25 hoelzro commute &
14:27 moritz masak: I know; it's just that when one writes the code, proper error messages need to be generated
14:27 moritz masak: and it's very easy to forget that ranges support non-Int endpoints too
14:27 masak yes; good point.
14:27 * PerlJam guesses that .substr(Range) will also imply .substr-rw(Range)
14:27 colomon …. actually, is there any reason not to support substr('f'..'b') ?  seems like it would be very easy to implement.
14:28 masak colomon: :/
14:28 masak colomon: that goes against the idea of good ranges, though
14:28 PerlJam colomon: yes, it doesn't make any sense.
14:28 masak colomon: note that 'f'..'b' is empty
14:28 psch it's p5's flipflop, not a range
14:29 masak right, anyone who wants that functionality can .comb, .grep and ff
14:30 psch (to rephrase, "as a flipflop it makes sense to me, as a Range it doesn't)
14:30 psch masak++ for understanding anyway :)
14:30 muraiki so this question didn't go over too well in #perl... does anybody know if there is a module that provides interfaces for perl5? so I could specify a role with methods that are implemented in the things that do the role, vs in the role itself
14:30 muraiki basically, what can be done in p6 with role Pet { method noise() { ... } }
14:30 colomon hmmm?  wouldn’t /(f.*?b)/ be the simple way to do it?
14:30 moritz muraiki: Moose (Moose::Role, specifically)
14:30 PerlJam muraiki: I thought Altreus gave you the answer: use Moo::Role; and C<requires>
14:31 masak colomon: yes, even easier.
14:31 moritz or yes, Moo instead of Moose
14:31 muraiki PerlJam: but then somebody said Moo::Role::requires doesn't actually do that :(
14:31 muraiki moritz: Moose is not something we can use at this time, unfortunately
14:32 atroxaper joined #perl6
14:33 muraiki well, it's not a huge deal. thanks guys
14:34 PerlJam muraiki: You should use Perl 6 instead ;)
14:35 muraiki PerlJam: that's the plan in the long run, but it's going to be a bit of a process, haha
14:35 muraiki we have a fairly large perl5 codebase and are working out how to integrate it with p6 without actually rewriting it
14:35 muraiki I was hoping to use Inline::Perl5 for much of that
14:35 ShimmerFairy I always thought that there should be a :to() parameter and a :for() parameter for that kind of stuff ( that is, .substr(5, :to(7)) or .substr(5, :for(3)), assuming an inclusive :to() )
14:35 lizmat hoelzro: I have no clue
14:35 muraiki but it seems we will need to call p6 from p5 more than p5 from p6 for quite some time
14:35 lizmat afk for some fresh air&
14:35 muraiki and I haven't played with how / if that works
14:36 moritz with Inline::Perl6, of course :-)
14:36 muraiki moritz: ok, that's something I didn't know about :)
14:37 PerlJam muraiki: defining the boundaries between P5/P6 well will be important no matter what as marshalling data back and forth between them could be a major bottle-neck.
14:37 njmurphy left #perl6
14:37 ShimmerFairy masak: I think it's worth pointing out I still have that old S32::Str rewrite idea floating around :)  https://gist.github.com/lue/9941658
14:37 muraiki PerlJam: thanks, that's good to know
14:39 vendethiel joined #perl6
14:43 muraiki PerlJam: Altreus was correct. this will let me make an interface. sorry for bothering perl6 about it also :)
14:45 masak ShimmerFairy: it's been too long. I remember you doing that, but I no longer remember the goal/purpose.
14:45 masak decommute &
14:46 * moritz finds it hard to find changes in that document simply by eyeballing it
14:47 ShimmerFairy masak: part of when I was working on S15, doing work on S32::Str just kinda fell out of that :)  (I remember I didn't do much with it because I didn't want to put another Pod6 doc in the specs)
14:47 moritz .oO( I also find it hard to keep track of changing nick names and/or nick names that are different between IRC/github/email )
14:48 ShimmerFairy moritz: the main changes in that S32 I wrote is making the language (in particular the types being discussed) more in tune with S15, and explicitly disallowing the ~X bitwise ops on strings (making you explicitly convert to the desired buffer first)
14:49 ShimmerFairy I haven't changed my username on github because I haven't yet felt like dealing with the required additional changes :P
14:50 [Sno] joined #perl6
14:52 khw joined #perl6
14:53 PerlJam ShimmerFairy: once you do we'll probably forget that you were once lue :)
14:53 ShimmerFairy :)
14:53 PerlJam and one day we'll be looking back through the irclogs and wonder "what ever happened to lue?" and you'll be "I'm right here!"
14:56 dalek rakudo/nom: 46caea2 | jnthn++ | src/Perl6/ (3 files):
14:56 dalek rakudo/nom: Keep track of what code object we're in.
14:56 dalek rakudo/nom:
14:56 dalek rakudo/nom: Variable traits need to know the currently surrounding code object. We
14:56 dalek rakudo/nom: cannot use $*DECLARAND safely for this, since that may not map to a
14:56 dalek rakudo/nom: code object at all. This doesn't fix much, it's just a refactor to
14:56 dalek rakudo/nom: allow a fix.
14:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/46caea2bdd
14:56 dalek rakudo/nom: db71bf4 | jnthn++ | src/Perl6/ (2 files):
14:56 dalek rakudo/nom: Make package block code objects sooner.
14:56 dalek rakudo/nom:
14:56 dalek rakudo/nom: This means they are available for variable trait application to use,
14:56 dalek rakudo/nom: thus fixing RT #125455.
14:56 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125455
14:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/db71bf44ae
14:56 dalek roast: 1f667d1 | jnthn++ | S04-declarations/will.t:
14:56 dalek roast: Test to cover RT #125455.
14:56 dalek roast: review: https://github.com/perl6/roast/commit/1f667d1def
14:56 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125455
14:56 psch ...i had been wondering where lue went.  i wanted to ask whether abstruncate actually found any usage... :)
14:57 wara joined #perl6
14:59 ShimmerFairy Heh, I actually did get into thinking about rounding just a couple days ago, so I probably did think about abstruncate (if it's away from zero, then I did at least come to it again, as the logical fourth method)
14:59 dalek rakudo/attr-isrequired: 3ca77c1 | coke++ | src/core/Exception.pm:
14:59 dalek rakudo/attr-isrequired: Add a typed exception for required attributes
14:59 dalek rakudo/attr-isrequired: review: https://github.com/rakudo/rakudo/commit/3ca77c1b58
14:59 dalek rakudo/attr-isrequired: 70d7278 | coke++ | src/ (2 files):
14:59 dalek rakudo/attr-isrequired: Update build plan to deal with required attributes
14:59 dalek rakudo/attr-isrequired:
14:59 dalek rakudo/attr-isrequired: Only say() something, don't yet fail
14:59 dalek rakudo/attr-isrequired: review: https://github.com/rakudo/rakudo/commit/70d72784ae
15:02 psch ShimmerFairy: http://irclog.perlgeek.de/​perl6/2014-08-10#i_9162769, so yes, you prompted the search for a better word :)
15:02 ShimmerFairy I do recall being responsible for the word, I just wasn't sure of the definition now :P
15:05 [Coke] jnthn: do you have a minute to tell me where I'm going wrong in that branch? (attr-isrequired)
15:06 [Coke] that branch now prints out a bunch of "eek, a required.." when doing a make, despite the fact that there shouldn't be any required attributes in core.
15:07 smls joined #perl6
15:07 dalek tablets: 6eadfa9 | lichtkind++ | docs/appendix- (3 files):
15:07 dalek tablets: added set ops
15:07 dalek tablets: review: https://github.com/perl6/tablets/commit/6eadfa94df
15:15 sqirrel joined #perl6
15:16 smls .tell pmichaud Does Perl 6 actually *need* a list type that is mutable but not an array?  Having only    List = immutable,   Array = mutable & itemizes its elements    could improve simplicity and orthogonality, lack of which is IMO making the pre-GLR design so confusing.
15:16 yoleaux smls: I'll pass your message to pmichaud.
15:17 jnthn [Coke]: Taking a look while I spectest a fix :)
15:18 [Coke] Thanks! Happy for any feedback.
15:19 Ven_ joined #perl6
15:23 jnthn [Coke]: Did you check if the code in create_BUILDPLAN is really being run?
15:23 jnthn [Coke]: Oh, there's also one problem
15:23 jnthn You correctly  ues nqp::bindattr_i
15:24 jnthn But your required accessor uses nqp::getattr
15:24 jnthn Needs to be nqp::getattr_i
15:26 dalek rakudo/nom: 6f8d25b | jnthn++ | src/Perl6/Grammar.nqp:
15:26 dalek rakudo/nom: Catch undeclared symbol use in 'is' trait.
15:26 dalek rakudo/nom:
15:26 dalek rakudo/nom: Fixes RT #125228.
15:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6f8d25bba6
15:26 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125228
15:26 dalek roast: b30e373 | jnthn++ | S32-exceptions/misc.t:
15:26 dalek roast: Test to cover RT #125228.
15:26 dalek roast: review: https://github.com/perl6/roast/commit/b30e373da5
15:26 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125228
15:26 [Coke] cargo culted from 2 different spots, probably. (_i vs. not)
15:26 [Coke] fixing, rebuilding, testing...
15:27 [Coke] ... damn. that seems to be it. :)
15:28 [Coke] now I get no say's during the build, and I get one running the sample code.
15:28 PerlJam Coke++
15:28 [Coke] Is the approach for doing this sane?
15:28 jnthn [Coke]: yes
15:28 skids joined #perl6
15:28 dalek rakudo/attr-isrequired: 49a2021 | coke++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
15:28 dalek rakudo/attr-isrequired: need to use _i consistently.
15:28 dalek rakudo/attr-isrequired:
15:28 dalek rakudo/attr-isrequired: jnthn++
15:28 dalek rakudo/attr-isrequired: review: https://github.com/rakudo/rakudo/commit/49a2021ffa
15:28 jnthn Though the create_BUILDPLAN bit may want a closer look wrt inheritance.
15:28 jnthn (I didn't look closely enough; I suggest writing tests and seeing if they work out.)
15:30 [Coke] Agreed, needs tests.
15:36 Ven_ "+        <.explain_mystery> <.cry_sorrows>" hahaha
15:44 [Coke] should an exception for a required attribute have the role X::Comp ?
15:44 jnthn [Coke]: Don't think so, it's a runtime exception, and X::Comp is for compile-time
15:46 [Coke] if I add X::Attribute::Required.new(...).throw in src/core/Mu.pm, I'm getting Could not find symbol '&Required' - pretty sure this is directly related to the exception, since when I accidentally had :::Required, it complained of Attribute. Any pointers?
15:46 PerlJam Coke:  does X::MOP maybe
15:46 PerlJam ??
15:47 [Coke] seems reasonable, PerlJam.
15:47 moritz [Coke]: pre-declare with  class X::Attribute::Required { ... };
15:47 [Coke] moritz: Same error.
15:47 [Coke] checking for typos...
15:48 cognominal joined #perl6
15:49 [Coke] ... something fixed it.
15:49 moritz \o/
15:50 [Coke] https://gist.github.com/coke/7e2a922affbd88046222
15:50 [Coke] Surely needs some tweaking.
15:50 moritz including the class name would be helpful
15:50 PerlJam what moritz said
15:51 moritz s/class name/class/
15:51 jaffa4 joined #perl6
15:51 [Coke] ah, I already have that available as well.
15:51 [Coke] (I think)
15:51 jaffa4 Hi all
15:51 jaffa4 what is laceholder variable '@_' cannot override existing signature?
15:51 |Tux| https://gist.github.com/Tux/7fef7af3b56481f83442 <= what is wrong with the +> 64 ???
15:52 moritz jaffa4: you can't mix a signature with @_
15:52 dalek rakudo/attr-isrequired: b66a0ac | coke++ | src/core/Exception.pm:
15:52 dalek rakudo/attr-isrequired: Make this a MOP exception
15:52 dalek rakudo/attr-isrequired:
15:52 dalek rakudo/attr-isrequired: PerlJam++
15:52 dalek rakudo/attr-isrequired: review: https://github.com/rakudo/rakudo/commit/b66a0acfdd
15:52 dalek rakudo/attr-isrequired: 1955a5a | coke++ | src/core/Mu.pm:
15:52 dalek rakudo/attr-isrequired: Throw a typed exception for empty reqd parameter
15:52 dalek rakudo/attr-isrequired: review: https://github.com/rakudo/rakudo/commit/1955a5a4a6
15:52 jaffa4 Why not?
15:53 moritz jaffa4: because they contradict each other
15:53 PerlJam jaffa4: you can do it if you declare @_ as part of the sig.
15:53 [Coke] so, first bug, once you declare is required, you always get the error. :)
15:54 moritz a signature specifies exactly what arguments are allowed; @_ means "don't validate, gimme everything in here"
15:54 * [Coke] heads out for lunchies.
15:54 dalek ecosystem: ecf9cc4 | (Anthony Parsons)++ | META.list:
15:54 dalek ecosystem: Add BufUtils
15:54 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/ecf9cc431b
15:57 jaffa4 I see
15:59 timotimo [Tux]: have you tried it with Int, too?
16:00 |Tux| try it yourself to hit issue RT#124082 :)
16:00 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=124082
16:00 timotimo er, wait
16:00 hoelzro is List.sort stable?
16:00 timotimo you're right, it's kinda weird :)
16:00 timotimo because if you +> -64 it turns it into an Int, apparently
16:00 gfldex joined #perl6
16:01 pmichaud good morning, #perl6
16:01 yoleaux 07:35Z <nine> pmichaud: What about Tuple as the name for the immutable List type instead of Parcel? There'd be precedent in other languages for the usage.
16:01 yoleaux 15:16Z <smls> pmichaud: Does Perl 6 actually *need* a list type that is mutable but not an array?  Having only    List = immutable,   Array = mutable & itemizes its elements    could improve simplicity and orthogonality, lack of which is IMO making the pre-GLR design so confusing.
16:01 jaffa4 Do you remember who you give advice to?
16:02 |Tux| timotimo, is this worth RT'ing?
16:02 timotimo i think so, yeah
16:02 timotimo hm, wait
16:03 timotimo if we bitshift to the right in a two's complement
16:03 timotimo i *think* we expand with the sign bit
16:03 timotimo don't we?
16:03 hoelzro o/ pmichaud
16:03 timotimo otherwise -big_num shifted slightly to the right would end up as a positive number
16:03 timotimo so if we bit-shift far to the right, at some point we'll end up with 0b11111...1111, which is -1
16:03 timotimo even if we have an Int
16:05 pmichaud for some reason I'm not a fan of "Tuple".  Maybe because of Python; worried about a false correspondence there.
16:05 skids joined #perl6
16:05 |Tux| https://rt.perl.org/Ticket/Display.html?id=125466
16:07 timotimo [Tux]: the WHAT you give there seems absolutely correct to me
16:07 jaffa4 does qw exist in Perl?
16:07 jaffa4 does qw exist in Perl6?
16:07 timotimo jaffa4: yeah, it's now < ... >
16:07 timotimo m: say <foo bar baz>.perl
16:07 camelia rakudo-moar 6f8d25: OUTPUT«("foo", "bar", "baz")␤»
16:07 jaffa4 can I can change the separator?
16:07 tony-o_ DrForr: Data::Dump is handling that .ast in ABNF a lot better now
16:07 jnthn m: say nqp::bitshiftr_i(int.Range.max, 64)
16:07 camelia rakudo-moar 6f8d25: OUTPUT«======================================​=========================================␤The use of nqp::operations has been deprecated for non-CORE code.  Please␤change your code to not use these non-portable functions.  If you really want␤to keep using nqp:…»
16:07 timotimo the separator for what splits between the < and > ?
16:08 jnthn m: use nqp; say nqp::bitshiftr_i(int.Range.max, 64)
16:08 camelia rakudo-moar 6f8d25: OUTPUT«9223372036854775807␤»
16:08 jaffa4 no something instead of <?
16:08 timotimo oh
16:08 timotimo yeah
16:08 timotimo m: say q:w{hello how are you}.perl
16:08 camelia rakudo-moar 6f8d25: OUTPUT«("hello", "how", "are", "you")␤»
16:08 |Tux| timotimo, how can a sign change on a bitshift if *all* other shifts retain the sign?
16:08 timotimo oh
16:08 jnthn In MoarVM this is implemented as:
16:08 timotimo well, that's a good point :)
16:08 jnthn OP(brshift_i):
16:08 jnthn GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 >> GET_REG(cur_op, 4).i64;
16:09 jnthn That is, you're getting the same semantics C gives :)
16:09 |Tux| jnthn, which is why I tried. that is a discussion on p5p that started yesterday by jhi
16:09 timotimo OP(blshift_i):
16:09 timotimo GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 << GET_REG(cur_op, 4).i64;
16:09 timotimo same for that
16:09 jnthn The sign change is easily explained.
16:09 timotimo so i wonder why the blshift doesn't protect the sign bit?
16:09 nys joined #perl6
16:10 timotimo if it expands the sign bit when right shifting
16:10 jnthn Good question.
16:12 timotimo well, that's now a "C semantics" question :)
16:12 timotimo and when you use "int" and friends, you opt in to get C semantics
16:12 jnthn https://msdn.microsoft.com/​en-us/library/f96c63ed.aspx goes into the semantics
16:12 * |Tux| suggests perl6 to be more consistent than C and *define* the behavior :P
16:12 jnthn "The result of a shift operation is undefined if the second operand is negative, or if the right operand is greater than or equal to the width in bits of the promoted left operand."
16:13 PerlJam Tux++  (Perl is better than C after all :)
16:13 |Tux| http://www.nntp.perl.org/group/perl.​perl5.porters/2015/06/msg228842.html <= start there. it is a good read!
16:13 jnthn Well, it's a trade-off, ain't it.
16:14 jnthn The C semantics probably compile into something that hardware can do very fast.
16:14 jnthn Which is probably why you were using native types in the first place.
16:15 |Tux| jnthn, I sometimes use int instead of Int because int.Range.max (and .min) are actually useable
16:15 jnthn That...makes no sense.
16:16 diana_olhovik_ joined #perl6
16:16 jnthn What *isn't* usable?
16:16 moritz |Tux|: if you use Int, you need no .max and .min
16:16 moritz because it's unbounded
16:16 |Tux| indeed, that's why
16:16 spider-mario joined #perl6
16:16 dalek specs: 41876e9 | pmichaud++ | S07-glr-draft.pod:
16:16 dalek specs: Add suggestions from nine++ and smls++ (Tuple)
16:16 dalek specs: review: https://github.com/perl6/specs/commit/41876e977b
16:16 |Tux| I had two situations where I needed a max other than Inf
16:17 |Tux| m: my Int $i = Int.Range.max;
16:17 camelia rakudo-moar 6f8d25: OUTPUT«Type check failed in assignment to '$i'; expected 'Int' but got 'Num'␤  in block <unit> at /tmp/JCVnfxJW6A:1␤␤»
16:17 timotimo the bad thing about int.Range.min/max is that you get overflows :S
16:18 dalek rakudo/nom: 58f73af | jnthn++ | src/Perl6/Actions.nqp:
16:18 dalek rakudo/nom: Make type parameterization fails give location.
16:18 dalek rakudo/nom:
16:18 dalek rakudo/nom: Fixes lack of line/file reported in RT #125259.
16:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/58f73af398
16:18 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125259
16:18 dalek rakudo/nom: 6ee5ab2 | jnthn++ | src/core/Exception.pm:
16:18 dalek rakudo/nom: Remove dead line of code.
16:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6ee5ab258e
16:18 dalek roast: dbd7e0b | jnthn++ | S32-exceptions/misc.t:
16:18 dalek roast: Add test for RT #125259.
16:18 dalek roast: review: https://github.com/perl6/roast/commit/dbd7e0b4d2
16:18 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125259
16:18 |Tux| jnthn, *that* is why I think it is unusable
16:18 TimToady joined #perl6
16:18 timotimo well, what do you expect? :D
16:18 timotimo m: my Int $foo = 10 ** 1000000000; say $foo
16:18 |Tux| I do expect Inf of type Int
16:19 timotimo poor camelia %)
16:19 camelia rakudo-moar 6f8d25: OUTPUT«(timeout)»
16:19 timotimo m: my Int $foo = 2 ** 1000000000; say $foo
16:19 lichtkind joined #perl6
16:19 timotimo m: my Int $foo = 2 ** 1_000_000; say $foo
16:19 pmichaud why 1000000?  Just go with 2**128 and be done with it :)
16:20 camelia rakudo-moar 6f8d25: OUTPUT«(timeout)»
16:20 camelia rakudo-moar 6f8d25: OUTPUT«(timeout)»
16:20 timotimo m: my Int $foo = 2 ** 10_000; say $foo
16:20 camelia rakudo-moar 6f8d25: OUTPUT«19950631168807583848837421626835850838​234968318861924548520089498529438830221946631​919961684036194597899331129423209124271556491​349413781117593785932096323957855730046793794​526765246551266059895520550086918193311542508​60846061810468550907486608962488809048…»
16:20 timotimo m: my Int $foo = 2 ** 100_000; say $foo
16:20 camelia rakudo-moar 6f8d25: OUTPUT«99900209301438450794403276433003359098​042913905418169177152927386314583246425734832​748733133244965040316439444555585493001879966​076561765629084713542474928751988896298736710​932463504273731124792658002785312410887370856​05287228390164568691026850675923517914…»
16:20 uncleyea1 joined #perl6
16:20 timotimo m: my Int $foo = 2 ** 500_000; say $foo
16:20 camelia rakudo-moar 6f8d25: OUTPUT«99502041332305832501821531990350004939​964123686105682993417355676971997775038051098​405187509192718747469349268307821130830630442​474961937917332760736874961020948852264885724​705198928850982719966508948219944902202719603​53562925664955436047785274565141640139…»
16:21 timotimo biggest number you can print without camelia timeouting is between 500_000 bits long and 1_000_000 bits long
16:21 lichtkind FROGGS: cheers, you changed the tablets cron job to daily yes?
16:21 yoleaux 06:33Z <moritz> lichtkind: I found nothing wrong with the tablets.perl6.org cron job; please supply a more precise error description
16:21 jnthn The oldest ticket in the Perl 6 RT queue is about having an Inf of type Int. In 6 years, nobody has come up with anything even close to a solution.
16:21 nine timotimo: 500_000 bits is still > 150K decimal places
16:21 timotimo nine: it's still not an infinitely big number!
16:22 jnthn I don't see one on the horizon.
16:22 Ven joined #perl6
16:22 lichtkind ah moritz yes your right
16:22 nine timotimo: how long do you expect camlia to take to print an infinitely big number? ;)
16:22 ChristopherBotto joined #perl6
16:23 timotimo nine: camelia abbreviates with … after a bunch of chars
16:23 timotimo so all we need to do is figure out the "topmost" chars of the infinite number
16:23 larion joined #perl6
16:24 timotimo obviously they all have to be 9 :P
16:24 nine 10 ** Inf is a clear case
16:25 Khisanth joined #perl6
16:25 raiph joined #perl6
16:26 timotimo 10 ** -Inf is also easy :)
16:26 |Tux| m: say 2 +< int.Range.max
16:26 camelia rakudo-moar 6f8d25: OUTPUT«0␤»
16:26 |Tux| correct?
16:26 timotimo well, both are "int"
16:26 timotimo int.Range.max is surely above the width of a 64bit register
16:27 timotimo so undefined behavior
16:27 |Tux| m: say 2 +< 128
16:27 camelia rakudo-moar 6f8d25: OUTPUT«680564733841876926926749214863536422912␤»
16:27 timotimo m: say Int(2) +< int.Range.max
16:27 camelia rakudo-moar 6f8d25: OUTPUT«0␤»
16:27 timotimo m: say Int(2) +< Int(int.Range.max)
16:27 camelia rakudo-moar 6f8d25: OUTPUT«0␤»
16:27 timotimo huh.
16:27 |Tux| indeed. a lot of inconsistencies
16:27 jnthn Uh, there was no declared int variable in "2 +< int.Range.max" so it shoulda gone with big int semantics there.
16:27 |Tux| I bet you lot work out the best.
16:28 FROGGS lichtkind: no
16:28 * |Tux| goes home and leaves you all to play
16:28 jnthn So that one we shouldn't be calling out as "what C says"
16:34 timotimo how do we define an operator to have chain associativity?
16:35 timotimo the semi-obvious "is assoc('chain')" doesn't work :(
16:35 timotimo oh
16:35 timotimo it has to be "is prec('chain')" or something
16:36 timotimo actually ...
16:37 timotimo apparently it's gotta be prec({ prec => "m=", assoc => "chain", iffy => 1, pasttype => chain })
16:38 timotimo and that still doesn't make it work >_>
16:38 timotimo we probably want to have something simpler for that so that users can build their own chaining infix ops
16:44 timotimo oh
16:44 timotimo those are possibly meant to be keyword arguments?
16:44 timotimo nope
16:44 jaffa4 When are you planning to release next rakudo start?
16:44 jaffa4 start..
16:44 jaffa4 -> star
16:46 timotimo m: sub infix:<foo>($x, $y) is prec({ prec => "m=", assoc => "chain", iffy => 1, pasttype => "chain" }) { say "hey $x, $y!" }; 1 foo 2 foo 3
16:46 camelia rakudo-moar 6f8d25: OUTPUT«hey 2, 3!␤hey 1, True!␤»
16:46 timotimo jaffa4: this month's release seems like a good candidate to build a new star with
16:46 jaffa4 So?
16:47 timotimo i'm not the one who decides that. except if i go ahead and just build one ...
16:50 jaffa4 who is the decision maker?
16:51 timotimo if somebody makes it, they have decided for it
16:51 timotimo if nobody does it, everybody has decided against it
16:51 mikemi joined #perl6
16:52 DrForr tony-o_: Nie.
16:52 mikeage joined #perl6
16:53 tony-o_ DrForr: was that more along the lines of what you were looking for?
16:54 tony-o_ i added a controllable recursion depth because i let it sit for 5 minutes with no output during one of the tests
16:54 DrForr I just got home, haven't looked at anything yet.
16:55 CIAvash joined #perl6
16:58 qwebirc188454 joined #perl6
16:58 DrForr Yes, excellent.
16:59 tony-o_ cool, i'll close the bug out on github.  thanks for creating the issue
16:59 DrForr No problem, figured it didn't belong on rakudo-l.
17:04 DrForr A way to bypass the coloring would be nice, incidentally. I'd almost make that an environment variable though, or possibly checking if the output is going to a terminal.
17:05 [Sno] joined #perl6
17:06 tony-o_ DrForr: you can pass ':color(False)' to Dump
17:06 tony-o_ i should add that to the readme
17:07 DrForr Ah, excellent.
17:08 jnthn m: use Test; throws-like 'my $rt125376 = Sub.bless; say $rt125376', Exception
17:08 camelia rakudo-moar 6ee5ab: OUTPUT«(signal SEGV)    1..2␤»
17:08 jnthn m: use Test; throws-like 'Sub(0)', Exception
17:08 camelia rakudo-moar 6ee5ab: OUTPUT«(signal SEGV)    1..2␤»
17:10 dalek nqp: 0cb8562 | jnthn++ | tools/build/MOAR_REVISION:
17:10 dalek nqp: Bump to latest MoarVM.
17:10 dalek nqp: review: https://github.com/perl6/nqp/commit/0cb8562439
17:10 DrForr I do question the '=> failure' bits, I'd swear my code sets those values to Nil or False, but that may just be my misunderstanding of the type tree.
17:11 dalek rakudo/nom: 2ec5634 | jnthn++ | tools/build/NQP_REVISION:
17:11 dalek rakudo/nom: Bump NQP_REVISION for latest MoarVM.
17:11 dalek rakudo/nom:
17:11 dalek rakudo/nom: Includes Unicode 8 support along with fixes for a couple of SEGVs.
17:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2ec5634fde
17:11 tony-o_ the failure thing comes from not being able to access the value of that key from the hash
17:11 DrForr Not questioning the ode... Ah. No problem, introspection thing.
17:12 dalek roast: d2eddcc | jnthn++ | S06-other/misc.t:
17:12 dalek roast: Further RT #125376 tests.
17:12 dalek roast: review: https://github.com/perl6/roast/commit/d2eddcca8c
17:12 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125376
17:12 tony-o_ yea, i'm sure there is another way to get the value when it fails but i'm still looking for alternatives
17:12 DrForr No problem, I'm still happy to get indented output that doesn't induce eyestrain.
17:16 mikeage left #perl6
17:16 jnthn lizmat: The Unicode 8 support is available from Rakudo HEAD, if you want to mention it in the w33kly :)
17:17 flussence "Stage parse      :  64.711" - something shaved 5 seconds off that since I last paid attention... but still, it used to be below a minute :)
17:18 jnthn It's a constant battle between compiler engineering to make it faster and built-in development adding stuff :)
17:23 jnthn dinner &
17:25 domidumont joined #perl6
17:25 jaffa4 I got his message without line number... Cannot look up attributes in a type object
17:26 jaffa4 rakudo: print (q:q(hello channel));
17:26 camelia rakudo-moar 6ee5ab: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Invalid adverb value for :q(hello channel)␤at /tmp/tmpfile:1␤------> 3print (q:q(hello channel)7⏏5);␤»
17:26 jaffa4 rakudo: print (q:q (hello channel));
17:26 camelia rakudo-moar 6ee5ab: OUTPUT«===SORRY!===␤Cannot look up attributes in a type object␤»
17:26 DrForr jaffa4: File a rakudobug?
17:28 yqt joined #perl6
17:29 jaffa4 Is that supposed to work?
17:29 timotimo it's not supposed to give such a bad error, in any case
17:30 timotimo dinner time \o/
17:30 DrForr jaffa4: It's supposed to return a line number, yes. Feel free to file a bug.
17:31 jaffa4 How do I quote by the way?
17:31 tony-o_ m: print 'hello world';
17:31 camelia rakudo-moar 6ee5ab: OUTPUT«hello world»
17:31 jaffa4 in a more sophisticateed way
17:34 DrForr Sophisticated? I suppose you could use guillemots, those are French and supposedly sophisticated-looking...
17:34 DrForr q<<foo>> (where << >> are quillemots,not the ASCII equiv)
17:34 tony-o_ m: say Buf.new(0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64).decode("utf8");
17:34 camelia rakudo-moar 6ee5ab: OUTPUT«hello world␤»
17:34 ugexe hmm didnt someone bring up the q:q() bug re: parens the other day?
17:35 cognominal joined #perl6
17:36 tony-o_ m: say ‘sophista quotes’
17:36 camelia rakudo-moar 6ee5ab: OUTPUT«sophista quotes␤»
17:37 lizmat jnthn: added to the P6W draft, any particular new codepoints I should mention?
17:37 lizmat afk again for some Andreas trembling&
17:37 jnthn lizmat: SIGN OF THE HORNS
17:37 jnthn .oO( Why is she making Andreas tremble? )
17:37 tony-o_ m: say q«this is a quoted str».perl
17:37 camelia rakudo-moar 6ee5ab: OUTPUT«"this is a quoted str"␤»
17:38 tony-o_ jaffa4: to answer your question ^
17:38 lizmat jnthn: http://www.imdb.com/title/tt2126355/
17:39 CIAvash How can I put 'where' constraints on optional parameters?
17:39 tony-o_ surprisingly not a terrible movie
17:39 jnthn lizmat: aha :)
17:39 tony-o_ CIAvash: what do you mean by where constraints?
17:39 * jnthn really away for dinner :)
17:40 flussence m: sub foo(Int $bar where * > 50 = 0) { ... }
17:40 camelia rakudo-moar 6ee5ab: ( no output )
17:40 tony-o_ as in, only optional sometimes?
17:40 ugexe m: sub foo(:$x where ($_ eq 1)) { say "OK" }; foo(1)
17:40 camelia rakudo-moar 6ee5ab: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub foo at /tmp/fj66aRqeld:1␤  in block <unit> at /tmp/fj66aRqeld:1␤␤»
17:40 ugexe m: sub foo(:$x where ($_ eq 1)) { say "OK" }; foo(x => 1)
17:40 camelia rakudo-moar 6ee5ab: OUTPUT«OK␤»
17:40 flussence m: sub foo(Int $bar where * > 50 = 0) { $bar }; foo()
17:40 camelia rakudo-moar 6ee5ab: OUTPUT«Constraint type check failed for parameter '$bar'␤  in sub foo at /tmp/ADNJHF62A2:1␤  in block <unit> at /tmp/ADNJHF62A2:1␤␤»
17:40 tony-o_ he wants the constraint on $var?
17:41 tony-o_ m: sub foo(Int $foo? where * > 50) { 'yo'.say; }; foo;
17:41 camelia rakudo-moar 6ee5ab: OUTPUT«Invocant requires a 'Int' instance, but a type object was passed.  Did you forget a .new?␤  in sub foo at /tmp/2AbxaK5woA:1␤  in block <unit> at /tmp/2AbxaK5woA:1␤␤»
17:42 tony-o_ m: sub foo(Int $foo?) { 'yo'.say; }; foo;
17:42 camelia rakudo-moar 6ee5ab: OUTPUT«yo␤»
17:44 CIAvash tony-o_: I did that too and it gives error when you call the function without any parameters
17:45 tony-o_ m: sub foo(Int $foo? where { "check".say; * > 50; }) { 'yo'.say; }; foo;
17:45 camelia rakudo-moar 6ee5ab: OUTPUT«check␤yo␤»
17:45 tony-o_ m: sub foo(Int $foo? where { $_.say; $_ > 50; }) { 'yo'.say; }; foo;
17:45 camelia rakudo-moar 6ee5ab: OUTPUT«(Int)␤Invocant requires a 'Int' instance, but a type object was passed.  Did you forget a .new?␤  in sub foo at /tmp/1j9GCuNoGt:1␤  in block <unit> at /tmp/1j9GCuNoGt:1␤␤»
17:45 tony-o_ m: sub foo(Int $foo? where { $_.perl.say; $_ > 50; }) { 'yo'.say; }; foo;
17:45 camelia rakudo-moar 6ee5ab: OUTPUT«Int␤Invocant requires a 'Int' instance, but a type object was passed.  Did you forget a .new?␤  in sub foo at /tmp/GJXZ4aVXzh:1␤  in block <unit> at /tmp/GJXZ4aVXzh:1␤␤»
17:47 Ven joined #perl6
17:47 tony-o_ m: sub foo(Int $foo? where { return True unless $_.defined; $_ > 50; }) { 'yo'.say; }; foo;
17:47 camelia rakudo-moar 6ee5ab: OUTPUT«Attempt to return outside of any Routine␤␤»
17:48 tony-o_ m: sub foo(Int $foo? where { !$_.defined || ($_.defined && $_ > 50); }) { 'yo'.say; }; foo;
17:48 camelia rakudo-moar 6ee5ab: OUTPUT«yo␤»
17:48 tony-o_ m: sub foo(Int $foo? where { !$_.defined || ($_.defined && $_ > 50); }) { 'yo'.say; }; foo(25);
17:48 camelia rakudo-moar 6ee5ab: OUTPUT«Constraint type check failed for parameter '$foo'␤  in sub foo at /tmp/bKJOtZom9U:1␤  in block <unit> at /tmp/bKJOtZom9U:1␤␤»
17:48 tony-o_ m: sub foo(Int $foo? where { !$_.defined || ($_.defined && $_ > 50); }) { 'yo'.say; }; foo(51);
17:48 camelia rakudo-moar 6ee5ab: OUTPUT«yo␤»
17:48 tony-o_ CIAvash: ^^
17:48 ugexe m: sub foo(Int $foo?) { 'yo'.say; }; foo; # this  *isnt* calling the function with any parameters
17:48 camelia rakudo-moar 6ee5ab: OUTPUT«yo␤»
17:49 tony-o_ he still wants to constrain when a parameter is passed, checking for defined'ness in the 'where' works
17:51 ugexe there are better ways to accomplish that. protos/multi dispatch for instance
17:53 flussence m: multi sub foo(Int:U $foo?) {'a'}; multi sub foo(Int:D $foo where * > 50) {'b'}; say (try foo), (try foo 25), (try foo 51)
17:53 camelia rakudo-moar 2ec563: OUTPUT«aNilb␤»
17:54 larion joined #perl6
17:54 CIAvash tony-o_: I reached a similar solution but I thought there should be a better way
17:55 amurf joined #perl6
17:55 tony-o_ CIAvash: the method ugexe and flussence did above with multi's is the way i'd go with it
18:03 hoelzro is S07-glr-draft.pod a pretty comprehensive work on the details of the GLR? or is there more I should be reading to get up to speed?
18:07 muraiki is there a way to open a file and expose it as a supply? ideally I'd like to process lines from the file in parallel
18:07 CIAvash flussence: what do :U and :D after Int do?
18:07 flussence test for definedness
18:08 muraiki I found info on doing watching a file as a supply, but not actually reading it...
18:09 muraiki or actually, I guess that I want to send each line over a channel
18:09 ugexe my $supply; start { $supply.emit($_) for $IOHandle.lines } something like this
18:10 CIAvash flussence: didn't know about them! Are they explained in the documentation?
18:10 atroxaper joined #perl6
18:10 muraiki ugexe: thanks!
18:11 DrForr tony-o_: Slight nitpick - Redundant commas at the end of array/hashes. Not a big thing, just pointing out.
18:12 jaffa4 How am I supposed to use sygnals in Perl6?
18:13 flussence CIAvash: it's kind of hard to find anything for those, but there's a list of the recognised ones at http://design.perl6.org/S06.html#​Parameters_with_type_constraints
18:13 gtbjj joined #perl6
18:14 TEttinger .u horns
18:14 yoleaux U+1F608 SMILING FACE WITH HORNS [So] (😈)
18:14 TEttinger .u sign horns
18:14 yoleaux No characters found
18:14 TEttinger .u sign of
18:14 yoleaux No characters found
18:14 TEttinger hm
18:15 CIAvash and one last question, how can I add a default value when using the 'where' block?
18:17 timotimo we do have something that gets you lines from a file asynchronously as channels
18:18 ugexe (did you mean "...where * > 3  = 1 "?)
18:18 ugexe except that doesnt actually set the value to 1
18:18 timotimo hmm
18:18 timotimo i'm not sure it's actually exposed, though
18:19 ugexe you are thinking of Proc::Async char/byte_supply i think
18:19 timotimo no
18:19 CIAvash ugexe: yes
18:19 timotimo we had something at some point on the jvm
18:19 ugexe CIAvash: that was a compiler error message that seems wrong
18:20 timotimo yeah, rakudo-j has a IO::Async::File
18:20 timotimo and that has async slurp, async spurt and async lines
18:20 timotimo seems like nobody ported it to moarvm yet
18:21 ugexe i looked for IO::Async in the rakudo repo but didnt see it :o
18:23 jaffa4 ugexe: what does that mean?
18:23 timotimo right, it's under src/vm/jvm/core/
18:25 ugexe m: sub foo($bar where (* > 3) = 1 ) { $bar.say; }; foo(4)
18:25 camelia rakudo-moar 2ec563: OUTPUT«4␤»
18:26 jaffa4 would not rakudo version work under moarvm?
18:26 telex joined #perl6
18:28 CIAvash ugexe: I ran it on my computer and it gave this error:
18:28 CIAvash Cannot modify an immutable WhateverCode
18:29 tony-o_ m: sub foo($bar? where (* > 3) = 1) { $bar.say; }; foo;
18:29 camelia rakudo-moar 2ec563: OUTPUT«Constraint type check failed for parameter '$bar'␤  in sub foo at /tmp/wpqg9lNuti:1␤  in block <unit> at /tmp/wpqg9lNuti:1␤␤»
18:30 ugexe setting a default value makes it optional
18:30 tony-o_ m: sub foo($bar where { $_ = 1} ) { $bar.say; }; foo(50);
18:30 camelia rakudo-moar 2ec563: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub foo at /tmp/jcFChaHZC8:1␤  in block <unit> at /tmp/jcFChaHZC8:1␤␤»
18:30 ugexe CIAvash: whats the output from your `perl6 -v`
18:31 ugexe the compiler already hints at the syntax: (did you mean "...where * > 3  = 1 "?). It just doesnt work as expected
18:32 jaffa4 What is wrong with this for  sort keys %($rexpansion)  -> $abbrev {?
18:33 broheim joined #perl6
18:34 jaffa4 rakudo: my $s = <h q a>; for  sort keys %($rexpansion)  -> $abbrev { }
18:34 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Variable '$rexpansion' is not declared␤at /tmp/tmpfile:1␤------> 3my $s = <h q a>; for  sort keys %(7⏏5$rexpansion)  -> $abbrev { }␤»
18:34 ugexe m: my @a = 1,2,3,4; for @a.hash.sort  -> $k, $v { say $k; say $v; }
18:34 camelia rakudo-moar 2ec563: OUTPUT«1 => 2␤3 => 4␤»
18:34 geekosaur that looks perl5-y
18:34 colomon jaffa4: is $rexpansion a Hash?
18:34 jaffa4 I guess so
18:35 colomon it isn’t in your sample code up there, it’s an Array (or maybe a List)
18:35 ugexe its inside a %()
18:35 colomon m: my $s = <h q a>; for  sort keys %($s) { .say }
18:35 camelia rakudo-moar 2ec563: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/7ki5p12ubO:1␤␤»
18:35 jaffa4 rakudo: my %s = <h q a b>; for  sort keys %($s)  -> $abbrev { }
18:35 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Variable '$s' is not declared. Did you mean '%s'?␤at /tmp/tmpfile:1␤------> 3my %s = <h q a b>; for  sort keys %(7⏏5$s)  -> $abbrev { }␤»
18:35 tony-o_ m: my @a = 1,2,3; for @a.hash.sort <-> $k, $v? { "$k => $v".say; }
18:35 camelia rakudo-moar 2ec563: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/kvRRXfab8V:1␤␤»
18:35 jnthn CIAvash: Up until very recently, there was a parsing bug that involved where constraints. It got fixed; you can either upgrade to bleading edge, or the workaround is to put a newline before the default (yeah, ugly, I know)
18:36 jaffa4 rakudo: my $s = <h q a b>; for  sort keys %($s)  -> $abbrev { }
18:36 camelia rakudo-moar 2ec563: ( no output )
18:36 tony-o_ m: my @a = 1,2,3; for @a.sort <-> ($k, $v?) { "$k => $v".say; }
18:36 camelia rakudo-moar 2ec563: OUTPUT«Too few positionals passed; expected 1 or 2 arguments but got 0 in sub-signature␤  in block <unit> at /tmp/XnmuKexQXr:1␤␤»
18:36 ugexe m: my @a = 3,4,0,1; for @a.hash.sort  -> $k, $v { say $k; say $v; }
18:36 camelia rakudo-moar 2ec563: OUTPUT«0 => 1␤3 => 4␤»
18:36 tony-o_ whatever
18:36 CIAvash ugexe: jnthn: just updated moarvm, now it works.
18:36 jnthn :)
18:38 CIAvash ugexe: jnthn: flussence: tony-o_: thanks for your help
18:38 TEttinger I am so happy to see how fast progress is made by all y'all perl 6 people
18:39 dalek perl6-roast-data: c3e015a | coke++ | / (9 files):
18:39 dalek perl6-roast-data: today (automated commit)
18:39 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/c3e015a6cc
18:40 muethos joined #perl6
18:43 FROGGS joined #perl6
18:44 TEttinger jnthn: how long do you think it took to add Unicode 8.0 support?
18:44 Vlavv joined #perl6
18:45 tony-o_ DrForr: the trailing commas or is it doubling up somewhere?
18:45 TEttinger it seemed very fast, I got the impression that supporting the stuff needed for 7.0 was a very long and involved process
18:45 DrForr Trailing, I'll check to make sure I saw what I saw in a sec.
18:47 tony-o_ DrForr: there are trailing commas for sure
18:48 tony-o_ wouldn't be difficult to get rid of them, just tedious, i'll do that tonight
18:49 [Coke] (rakudo star) still blocking, sfaik, on module installation based on a panda change from months ago.
18:52 bin_005 joined #perl6
18:52 tony-o_ flussence: re-'stage parse', is that 64s for moar or jvm?
18:52 smls joined #perl6
18:53 flussence that's moar
18:54 smls jnthn: Looks like Grammar::Debugger can't be installed on r-m nom/master due do test falures...
18:54 smls "Invocant requires a 'Failure' instance, but a type object was passed.  Did you forget a .new?"
18:54 jnthn smls: I don't think I wrote any tests. :)
18:55 jnthn smls: I think they were contributed later. So I'd have to do as much as anyone else to get into them :)
18:56 jnthn TEttinger: It was very fast, mostly because (a) none of the algorithms that they updated in a non-data-driven were ones we implement, and (b) for all the Unicode database driven bits, the upgrade process is scripted.
18:56 jnthn *way were
18:56 smls jnthn: Apparently the test is just a simple lives-ok: https://github.com/jnthn/grammar-​debugger/blob/master/t/debugger.t
18:57 uncleyear joined #perl6
18:57 muraiki if I have a string that might end in a comma (and which does contain commas throughout the string), what's the best way to strip out the trailing comma if it is present?
18:57 muraiki I was thinking of using a regex match but that seems overkill
18:58 smls jnthn: Also, I get the same error when cloning the repo and running
18:58 smls perl6 -I ./lib -MGrammar::Debugger -e '(grammar { token TOP { a } }).parse("a")'
18:58 ugexe $string.chomp if $string.ends-with(',') maybe
18:58 jaffa4 this caused a probelem my $os = (@_) ?? shift !! Win_OS_Type();
18:59 nine m: my $string = 'foo,bar,'; $string.chop(1) if $string.ends-with(','); $string.say;
18:59 camelia rakudo-moar 2ec563: OUTPUT«foo,bar,␤»
18:59 muraiki ugexe: I didn't know about ends-with, thanks! chomp didn't take out the comma though
19:00 nine m: my $string = 'foo,bar,'; $string.chop if $string.ends-with(','); $string.say;
19:00 camelia rakudo-moar 2ec563: OUTPUT«foo,bar,␤»
19:00 nine m: my $string = 'foo,bar,'; say $string.chop if $string.ends-with(','); $string.say;
19:00 camelia rakudo-moar 2ec563: OUTPUT«foo,bar␤foo,bar,␤»
19:00 muraiki oh, chop! thanks so much :)
19:01 muraiki ok, next time I will look at the string methods first. that should have been obvious.
19:01 [Coke] stage parse: 31.419
19:01 pmichaud m: my $string = 'foo,bar,,,,';  $string.chop while $string.ends-with(','); $string.say;   # checking
19:01 jnthn smls: Heh, guess the test was good at flagging up the failure then :)
19:01 tony-o_ Stage parse      :  28.589
19:02 camelia rakudo-moar 2ec563: OUTPUT«(timeout)»
19:02 jnthn pmichaud: .=chop
19:02 [Coke] tony-o_: pi*10, though.
19:02 FROGGS wow, 28s is faaaaast
19:02 [Coke] oh, crap, it's not!
19:02 pmichaud m: my $string = 'foo,bar,,,,';  $string.=chop while $string.ends-with(','); $string.say;   # checking
19:02 camelia rakudo-moar 2ec563: OUTPUT«foo,bar␤»
19:02 pmichaud jnthn++
19:02 * pmichaud tries a build on his brand new SP3 to see how it compares
19:03 moritz m: say ('foo,bar....', *.chop ... !*.end-with('.'))[-1]
19:03 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1gQRa98DKV␤Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1␤at /tmp/1gQRa98DKV:1␤------> 3r....', *.chop ... !*.end-with('.'))[-1]7⏏5<EOL>…»
19:03 moritz m: say ('foo,bar....', *.chop ... !*.end-with('.'))[*-1]
19:03 camelia rakudo-moar 2ec563: OUTPUT«Method 'end-with' not found for invocant of class 'Str'␤  in whatevercode  at /tmp/gRobXx82au:1␤␤»
19:03 moritz m: say ('foo,bar....', *.chop ... !*.ends-with('.'))[*-1]
19:03 camelia rakudo-moar 2ec563: OUTPUT«foo,bar␤»
19:03 tony-o_ [Coke]: needs s/9$/5/
19:03 jnthn pmichaud: SP3?
19:03 pmichaud Surface Pro 3
19:04 pmichaud YAPC::NA convinced me it was time for a new portable computer.
19:04 tony-o_ my times were closer to 50s on my SP3 with debian
19:04 moritz Perl "you don't need to write that loop yourself" 6
19:04 tony-o_ lol
19:04 DrForr SP3 is rootable? Herm.
19:04 pmichaud since my 2009 laptop only has VGA output, and the conference seemed to want HDMI everywhere :)
19:05 pmichaud SP3 is not only rootable, but Kubuntu installed on it without having to do any BIOS changes.
19:05 tony-o_ DrForr: sure enough.
19:05 ugexe m: say "a,b,c,d,," ~~ /<alpha> *%% ","/
19:05 camelia rakudo-moar 2ec563: OUTPUT«「a,b,c,d,」␤ alpha => 「a」␤ alpha => 「b」␤ alpha => 「c」␤ alpha => 「d」␤»
19:05 pmichaud I didn't even have to disable "secure boot"
19:05 tony-o_ oh nice
19:05 tony-o_ i did and and had to compile a bunch of drivers to get some stuff to work right, like sound.  but i used debian testing
19:06 DrForr pmichaud: That's a very new change, most of the time I've had to borrow others' laptops as I have only HDMI on my touring beast and keep forgetting to buy an HDMI-VGA.
19:06 pmichaud I had to make a kernel mod to get the type cover keyboard to work.  Apparently I have a newer build of the keyboard with a different product usb id
19:06 tony-o_ ah ^ , that was the one thing i was surprised worked out of the box for me
19:07 tony-o_ i read one of the early ubuntu type write ups that had people recompiling kernels and all kinds of other stuff
19:07 pmichaud DrForr: yes, I was a little shocked by it as well.  They did ultimately provide a VGA->HDMI adapter, but for me it was "final straw" that said it's time to retire the 2009 laptop.  :)
19:07 DrForr There was one hiding under the podium in my room.
19:08 pmichaud and also my VGA had sync issues with their projection/livestream system.  The video kept cutting out every 5-10 seconds or so.
19:08 nine m: my @a = 1, 2, 3; my @b = <1 2 3>; for @a Z @b -> $a, $b { }
19:08 camelia rakudo-moar 2ec563: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/tvbAWQATuU:1␤␤»
19:08 nine ^^^ bug?
19:08 pmichaud Stage parse      :  46.855    # desktop
19:08 pmichaud Stage parse      :  32.427    # SP3
19:08 flussence possible workaround: carry a RPi around, stream VGA laptop's screen to it :)
19:09 tony-o_ my 28s is an imac
19:09 muethos joined #perl6
19:09 flussence the 64s I got is on a 5 year old AMD desktop
19:09 jnthn smls: Very strange, it fails on th eline "return $meth unless $meth ~~ Regex;" apparently
19:09 flussence 6, actually...
19:09 DrForr 44s on VBox on a dual-core i5 here.
19:09 smls Yeah, looks like it fails when it gets   $name = "!cursor_init"
19:10 flussence iirc on my netbook (32-bit Atom) it takes roughly 5 minutes...
19:10 tony-o_ they made laptops with atom procs?
19:10 pmichaud so, I'm curious about reactions to the names for Parcle/List/Tuple types in GLR
19:10 pmichaud *Parcel
19:10 ugexe oooh fixing grammar debugger++
19:10 pmichaud anyone have any strong preferences?
19:11 vendethiel amazing to hear
19:11 jnthn smls: yeah, it seems that at some point we somehow "lost" getting NQPRoutine mapped into a Perl 6 type
19:11 vendethiel pmichaud: a name for the base-type immutable list"?
19:11 nine m: my @a = 1, 2; my @b = <1 2>; for @a Z @b -> $a, $b { }
19:11 camelia rakudo-moar 2ec563: ( no output )
19:11 jnthn I'll have to look more closely at that; got another packing errand to do first...
19:11 nine m: my @a = 1, 2, 3, 4; my @b = <1 2 3 4>; for @a Z @b -> $a, $b { }
19:11 camelia rakudo-moar 2ec563: ( no output )
19:11 pmichaud vendethiel: yes; more directly: what to call the base list types
19:12 vendethiel .oO( AbstractList ) *g*
19:12 tony-o_ m: for (1,2,3,4) Z (1,2,3,4) -> $a, $b { "$a Z $b".say; }
19:12 camelia rakudo-moar 2ec563: OUTPUT«1 1 Z 2 2␤3 3 Z 4 4␤»
19:12 tony-o_ m: for (1,2,3,4) Z (1,2,3,4) -> ($a, $b) { "$a Z $b".say; }
19:12 camelia rakudo-moar 2ec563: OUTPUT«1 Z 1␤2 Z 2␤3 Z 3␤4 Z 4␤»
19:12 nine m: for (1,2,3,4) Z (1,2,3,4) -> ($a, $b) { "$a Z $b".say; }
19:12 camelia rakudo-moar 2ec563: OUTPUT«1 Z 1␤2 Z 2␤3 Z 3␤4 Z 4␤»
19:12 tony-o_ nine: is the ($a, $b) more what you're looking for?
19:12 nine m: for (1,2,3) Z (1,2,3) -> ($a, $b) { "$a Z $b".say; }
19:12 camelia rakudo-moar 2ec563: OUTPUT«1 Z 1␤2 Z 2␤3 Z 3␤»
19:13 pmichaud well, none of them are really "abstract"
19:13 tony-o_ m: for (1,2,3,4) Z (1,2,3,4) <-> ($a, $b) { $b *= $a; "$a Z $b".say; }
19:13 camelia rakudo-moar 2ec563: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <unit> at /tmp/AXrTLfvJ9X:1␤␤»
19:13 nine tony-o_: it's more that I wonder where the "Too few positionals passed; expected 2 arguments but got 1" is coming from
19:13 pmichaud m:  say ((1,2,3,4) Z (1,2,3,4)).perl
19:13 camelia rakudo-moar 2ec563: OUTPUT«((1, 1), (2, 2), (3, 3), (4, 4))␤»
19:13 tony-o_ m: @a = 1,2,3; @b = 1,2,3; for @a Z @b <-> ($a, $b) { $b *= $a; "$a Z $b".say; }
19:13 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cIJVds0689␤Variable '@a' is not declared␤at /tmp/cIJVds0689:1␤------> 3<BOL>7⏏5@a = 1,2,3; @b = 1,2,3; for @a Z @b <-> ␤»
19:14 nine m: my @a = 1, 2, 3; my @b = <1 2 3>; for @a Z @b -> $a, $b { "$a Z $b".say }
19:14 camelia rakudo-moar 2ec563: OUTPUT«1 1 Z 2 2␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/GHJ3Ua2vqW:1␤␤»
19:14 tony-o_ nine: because the for @a Z @b -> $a, $b   is giving $a the value of (1,1) and $b (2,2)
19:14 pmichaud should infix:<Z> be producing parcels or an interleaved list ?
19:14 dha joined #perl6
19:14 nine tony-o_: then this is a bug in SVG::Plot. But a couple months ago this code just worked
19:15 pmichaud per S03, Parcels.
19:15 khw Does anyone know the genesis of \b in perl5 and earlier patterns, meaning boundary between word/non-word.  I asked on #p5p, and it was suggested I come here to ask
19:17 pmichaud having infix:<Z> produces parcels feels weird.. it means the canonical    for @a Z @b Z @c -> $a, $b, $c  { ... }  doesn't work.
19:17 nine commit da8c1c26bb81af74e6dc4c80a0ebe7556935f658
19:17 tony-o_ pmichaud: agreed, i'd expect to not have to wrap the params
19:17 nine list infix reductions no longer flatten
19:18 smls @a X (@b Z @c)  doesn't dwim either currently - have to write  @a X (@b Z @c).tree.list
19:18 tony-o_ m: for (1,2,3) Z (1,2,3) -> $z { $z.perl.say; }
19:18 camelia rakudo-moar 2ec563: OUTPUT«$(1, 1)␤$(2, 2)␤$(3, 3)␤»
19:18 tony-o_ m: for (1,2,3) Z (1,2,3) -> $a, $b? { $a.perl.say; }
19:18 camelia rakudo-moar 2ec563: OUTPUT«$(1, 1)␤$(3, 3)␤»
19:19 pmichaud m: for <1 2 3> Z <a b c> Z <1 2 3> { .perl.say }
19:19 camelia rakudo-moar 2ec563: OUTPUT«("1", "a", "1")␤("2", "b", "2")␤("3", "c", "3")␤»
19:20 pmichaud m: for flat <1 2 3> Z <a b c> Z <1 2 3> -> $a, $b, $c { say "$a $b $c"; }
19:20 camelia rakudo-moar 2ec563: OUTPUT«1 a 1␤2 b 2␤3 c 3␤»
19:21 pmichaud yeah, flattening helps here.
19:21 nine Question remains: is this intended or a bug?
19:21 pmichaud I'm okay with needing to include flat
19:22 pmichaud makes me wonder if .kv should act the same, though :)
19:22 yqt joined #perl6
19:22 pmichaud i.e.,   for %hash.kv -> $k, $v      versus    for flat %hash.kv -> $k, $v
19:22 pmichaud although flat is a very blunt instrument to use, since it will (recursively) flatten any of the values
19:22 tony-o_ m: for flat (1,2,3) Z (4,5,6) -> $a , $b { $a.perl.say; }
19:22 camelia rakudo-moar 2ec563: OUTPUT«1␤2␤3␤»
19:23 tony-o_ m: for flat (1,2,3) Z (4,5,6) -> $a, $b { "$a Z $b\t".say; }
19:23 camelia rakudo-moar 2ec563: OUTPUT«1 Z 4        ␤2 Z 5  ␤3 Z 6  ␤»
19:23 pmichaud m: for (1,2,3) Z ((4,4), (5,5), (6,6)) { .perl.say }
19:23 camelia rakudo-moar 2ec563: OUTPUT«(1, 4)␤(2, 4)␤(3, 5)␤»
19:23 tony-o_ m: for flat (1,2,3) Z ((4,4),(5,5),(6,6)) -> $a, $b { "$a Z $b\t".say; }
19:23 camelia rakudo-moar 2ec563: OUTPUT«1 Z 4        ␤2 Z 4  ␤3 Z 5  ␤»
19:24 pmichaud m: ((1,2,3) Z ((4,4), (5,5), (6,6))).perl.say
19:24 camelia rakudo-moar 2ec563: OUTPUT«((1, 4), (2, 4), (3, 5))␤»
19:24 tony-o_ m: for (1,2,3) Z ((4,4),(5,5),(6,6)) -> ($a, $b) { "$a Z $b\t".say; }
19:24 camelia rakudo-moar 2ec563: OUTPUT«1 Z 4        ␤2 Z 4  ␤3 Z 5  ␤»
19:25 pmichaud ah, infix:<Z> flattens it arguments already.  Interesting.
19:25 pmichaud *its
19:25 tony-o_ i would have expected 1, (4,4) for the first iteration
19:26 smls_ joined #perl6
19:28 nine Ok, I'm pushing the fix to SVG::Plot.
19:29 masak nine++
19:29 masak wow, you people produce backlog tonight.
19:29 nine This is what we do :)
19:32 dalek specs: 65be127 | pmichaud++ | S07-glr-draft.pod:
19:32 dalek specs: Add a note about list operator flattening.
19:32 dalek specs: review: https://github.com/perl6/specs/commit/65be12770b
19:32 * masak has been prototyping in Perl 6 all day, and then rewriting his prototypes to Java
19:32 masak (for $work)
19:32 dalek Inline-Perl5: 75eab84 | (Stefan Seifert)++ | / (2 files):
19:32 dalek Inline-Perl5: Fix empty return value list producing a stray Nil
19:32 dalek Inline-Perl5:
19:32 dalek Inline-Perl5: Passing an emtpy list returned by a Perl 5 function to another Perl 5
19:32 dalek Inline-Perl5: function led to the latter getting an extra argument via the
19:32 dalek Inline-Perl5: Nil -> Any -> undef chain.
19:32 dalek Inline-Perl5:
19:32 dalek Inline-Perl5: Fix by replacing return; with return @retvals; (which is empty).
19:32 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/75eab84e1a
19:33 pmichaud masak: it's all about reaching that magical day of perfection when #perl6 is a seamless forum for cat pictures.
19:33 nine pmichaud: will the GLR make this sort of error go away ^^^?
19:33 nine pmichaud: or at least make the fix a bit less magic like return Seq()?
19:34 masak pmichaud: the closest thing to cat pictures we have in Perl 6 is ^..^ -- the neko operator. :)
19:34 pmichaud nine: I don't know.  At the moment I suppose it's an open question as to whether a bare return should return Nil or Slip
19:36 p6basicbot joined #perl6
19:36 nine Hi bot!
19:36 p6basicbot Hullo nine!
19:37 nine bot quit
19:37 vendethiel .oO( we're pretty safe from HAL taking over the world with that )
19:37 gcole joined #perl6
19:37 bartolin good evening, #perl6
19:38 abraxxa joined #perl6
19:38 nine Nice to see my examples still working :)
19:38 bartolin could it be, that jnthn++ did a bump for nqp, but didn't actually push the nqp commit? (I'm unable to build Rakudo atm)
19:39 bartolin "error: pathspec '2015.06-6-g0cb8562' did not match any file(s) known to git"
19:39 dha Eep.
19:39 ugexe i was able to update
19:39 PerlJam bartolin: built just fine here via rakudobrew.
19:39 * dha just made the mistake of estimating the number of functions in perlvar.
19:40 bartolin PerlJam: I'm building manually from HEAD
19:40 pmichaud I was able to update
19:40 muraiki I have a file with 17,881,759 lines. it's json with one object per line. I want to convert each line to a P6 object using JSON::Tiny, but each line is anywhere between 20k and 150k chars long. so even converting a single line is taking a few seconds, yet alone the whole thing :(
19:41 ugexe sometimes just nuking the .rakudobrew directory and reinstalling both rakudobrew and rakudo
19:41 bartolin okay, will investigate. thanks!
19:41 ugexe is fastest
19:41 FROGGS muraiki: I fear rakudo is not capable for that yet
19:42 muraiki FROGGS: ok, I figured it was probably something at that level. thanks though :) I still had fun getting as much working as I did
19:42 FROGGS :o)
19:42 bartolin yeah, turned out to be a stupid mistake on my side ...
19:43 PerlJam muraiki: use JSON::Tiny:from<Perl5>;  #  :-)
19:44 Quom Does NFG factor in to #122340?
19:44 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=122340
19:45 muraiki argh, forgot to install perl5 with fpic
19:45 Quom m: my $पहला = 1
19:45 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oBmCXqDsmY␤Bogus postfix␤at /tmp/oBmCXqDsmY:1␤------> 3my $पहल7⏏5ा = 1␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤        postfix␤        statem…»
19:45 Quom m: my $दूसरा = 2;
19:45 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iK5ndIHefa␤Bogus postfix␤at /tmp/iK5ndIHefa:1␤------> 3my $द7⏏5ूसरा = 2;␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤        postfix␤        st…»
19:45 masak Quom: seems to be a non-alphanumeric in there.
19:50 smls_ pmichaud: I don't think X and Z need to flatten their arguments in order for   list1 Z list2 Z lis3   to work
19:51 smls_ since those operators (are supposed to) gave list associativity
19:51 smls_ *have
19:51 smls_ so I think it would be better if they did *not* explicitly flatten
19:52 smls_ because then we could have it both ways
19:52 smls_ list1 Z list2 Z list3  if you want flat  (elem1, elem2, elem3)  output
19:52 masak smls_: while I agree, the real test should be whether there is any spectest fallout :)
19:52 masak the spectests know more about these things than any of us at this point
19:52 smls_ (list1 Z list2) Z list3   etc. if you want without 'flattening'
19:53 Quom masak: Yeah, I was confused because those non-alnums are marks, but I doh'd when I remembered mark != combining character
19:53 smls_ masak: Well, the GLR will have spectest fallout in any case :P
19:53 timotimo muraiki: if you have something this huge, JSON::Tiny (and also JSON::Fast) will most probably capitulate due to memory constraints
19:54 timotimo but if you do a line-by-line transformation, you may get somewhere a tiny bit nicer ... sadly, we're still a bit too far away from "awesome fast" for such big tasks (
19:54 timotimo ;(
19:54 masak yes, but I mean that the way those spectests fail will tell us about our expectations vs our predecessors' expectations
19:54 Quom smls_: FWIW, (list1 Z list2) Z list3 being different than list1 Z list2 Z lis3 seems really nonintuitive
19:55 smls_ Quom: Only if you expect lists to flatten like in Perl 5
19:55 muraiki timotimo: I was trying to recreate this article in p6, since it seemed like a good fit for supplies: http://engineering.intenthq.com​/2015/06/wikidata-akka-streams/
19:55 dha I have decided to try to feel that the pain of explaining filetests in p6 to p5 programmers will make the rest of perlfunc seem easy.
19:55 smls_ (1, 2, 3)  is already different from  (1, (2, 3))
19:55 muraiki since it seems like p6 supplies is basically an implementation of Reactive Extensions
19:57 smls_ Quom: And  (1 < (3 < 4))  returns True while  (1 < (3 < 4))  returns False
19:57 smls_ sorry, first was meant to be (1 < 3 < 4)
19:58 smls_ So that's normal for Perl 6.
19:59 timotimo you may have to be a bit careful about not keeping the previous lines' strings around
20:00 Quom smls_: I think I'm just used to Z being flatter or something
20:00 timotimo but yeah, our Supplies are basically Reactive Extensions
20:00 FROGGS well, (3 < 4) which is true numifies to 1, so (1 < 1) is not true
20:00 smls_ exactly
20:00 FROGGS and yes, parens are there for grouping but do not create arrays on its own
20:00 smls_ 'chaining' and 'list' associative operators work within the same expression
20:01 FROGGS that' what I regularly hear from pmichaud++
20:01 masak smls_: they do, but only because they're at different levels of precedence.
20:01 masak smls_: associativity only kicks into gear on the same level of precedence.
20:01 smls_ yes
20:02 masak s/on/between adjacent operators on/
20:02 pmichaud smls:  I'm assuming that the choice to have flattening arguments for cross/zip/reduce is more than a little deliberate.
20:02 [Coke] if someone has an attribute that is required, is it sufficient to insure it's not a type value?
20:02 pmichaud it's not something I'm willing to change for GLR without a declaration from TimToady that it should change, or a lot of examples indicating an overwhelming need for change
20:02 smls_ masak: My point was that  (A op B) op C  being different from  A op B op C  is perfectly normal for op's with 'chain' or 'list' assoc.
20:03 masak oh, granted.
20:03 pmichaud m:  say ((<1 2 3> Z <a b c>) Z <4 5 6>).perl
20:03 camelia rakudo-moar 2ec563: OUTPUT«(("1", "4"), ("a", "5"), ("2", "6"))␤»
20:04 nine There's less and less to say about the examples from my FOSDEM talk. It's literally just "use it like it was a Perl 6 class": https://gist.github.com/niner/564671ce4611556a9604
20:04 dalek roast: 054be39 | (Sterling Hanenkamp)++ | S32-array/delete.t:
20:04 dalek roast: Adding a test for RT #125457 regressions
20:04 dalek roast: review: https://github.com/perl6/roast/commit/054be398b1
20:04 dalek roast: 89da7f0 | (David Warring david.warring@gmail.com)++ | S32-array/delete.t:
20:04 dalek roast: Merge branch 'rt125457' of https://github.com/zostay/roast into zostay-rt125457
20:04 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125457
20:04 dalek roast: review: https://github.com/perl6/roast/commit/89da7f00c9
20:04 dalek roast: 9a42069 | (David Warring david.warring@gmail.com)++ | S32-array/delete.t:
20:04 dalek roast: Merge branch 'zostay-rt125457'
20:04 dalek roast: review: https://github.com/perl6/roast/commit/9a4206926c
20:05 pmichaud my purpose in adding the note to S07-glr about Z/X/[] flattening arguments was so that I don't forget that behavior... and also because it's another place where flattening takes place.
20:05 masak nine: that's great, though. you can get up and literally *complain* at how bloody convenient it all is.
20:05 Quom m: say ((<1 2 3> Z <a b c>).tree.list Z <4 5 6>).perl
20:05 camelia rakudo-moar 2ec563: OUTPUT«((("1"; "a").item, "4"), (("2"; "b").item, "5"), (("3"; "c").item, "6"))␤»
20:05 masak nine: "makes me *sick*" :P
20:05 Quom m: say ((<1 2 3> Z <a b c>).tree<> Z <4 5 6>).perl
20:05 camelia rakudo-moar 2ec563: OUTPUT«((("1"; "a").item, "4"), (("2"; "b").item, "5"), (("3"; "c").item, "6"))␤»
20:06 Quom nine++
20:06 smls_ pmichaud: In any case, I think the case should be made separately for  X/Z  vs  []
20:06 pmichaud although at yapc::na TimToady had indicated that the only flattening places were list assignment, explicit flat, and slurpy, so I don't know if that was intended to mean that list operators should no longer flatten
20:06 smls_ the latter being sort of like a listop taking a *@_ slurpy arg
20:07 pmichaud smls_: for me, the best argument will be made with examples
20:07 masak finding out why Z and X flatten their operands sounds like a worthy cause.
20:08 nine masak: yes, there's just too little secret knowledge to keep me employed till retirement ;)
20:08 dalek specs: 64b65ba | pmichaud++ | S07-glr-draft.pod:
20:08 dalek specs: Revise note about list operator flattening.
20:08 dalek specs: review: https://github.com/perl6/specs/commit/64b65ba84f
20:08 smls_ pmichaud: Well, the example I posted already (@x X (@b Z @c)) was not purely theoretical, I encountered that while coding a Perl 6 script recently
20:09 PerlJam [Coke]: That sounds like a really good first approximation.
20:09 masak nine: you can rant about how, because the system is so easy to use, you essentially have no job security.
20:10 [Coke] PerlJam: good, because I have no idea how to do the other thing. ;)
20:10 smls_ pmichaud: I was warsing with a grammar whose TOP looked something like    <verb> [ <quantity> <object> ]*   and then wanted to iterate over each   verb X (quantity Z object)  combination
20:10 pmichaud smls_: so, with my @a = <a b c>; my @b = <1 2 3>; my @c = <x y z>;   you expect   (@a X (@b Z @c)) to produce ... (writing)
20:11 smls_ *parsing
20:11 smls_ ('a', (1, 'x'), ('a', (2, 'y'), ('a', (3, 'z'), ...
20:12 pmichaud ((a, (1, x)), (a, (2, y)), (a, (3, z)), (b, (1, x)), (b, (2, y)), ...
20:12 smls_ yeah
20:12 pmichaud I see missing parens in yours :)
20:12 TEttinger m: nqp::say({'a', 1})
20:12 camelia rakudo-moar 2ec563: OUTPUT«======================================​=========================================␤The use of nqp::operations has been deprecated for non-CORE code.  Please␤change your code to not use these non-portable functions.  If you really want␤to keep using nqp:…»
20:12 smls_ heh
20:12 pmichaud or rather, I don't see the missing parens :)
20:12 jnthn Quom: 122340 seems entirely unrelated to NFG, in so far as there's no synthetics involved there
20:12 smls_ yours is correct :P
20:12 TEttinger m: say({'a', 1})
20:12 camelia rakudo-moar 2ec563: OUTPUT«-> ($_? is parcel) { #`(Block|58370672) ... }␤»
20:12 TEttinger hm
20:13 TEttinger is the best way to do this data dumping it?
20:13 jnthn m: say 'पहला' ~~ /\w+/
20:13 camelia rakudo-moar 2ec563: OUTPUT«「पहल」␤»
20:13 TEttinger some way to print a hash
20:13 jnthn m: say ('पहला' ~~ /\w+/).chars
20:13 camelia rakudo-moar 2ec563: OUTPUT«3␤»
20:13 TEttinger woah
20:13 jnthn m: say ('पहला').chars
20:13 camelia rakudo-moar 2ec563: OUTPUT«4␤»
20:13 jnthn Only 3 out of the 4 chars match \w
20:14 jnthn m: say uninames 'पहला'
20:14 camelia rakudo-moar 2ec563: OUTPUT«DEVANAGARI LETTER PA DEVANAGARI LETTER HA DEVANAGARI LETTER LA DEVANAGARI VOWEL SIGN AA␤»
20:14 PerlJam [Coke]: If we had some sort of universal formless void type that all things started from (a true "bottom type") then the other thing might be possible.  But since we don't, I can't imagine how you'd do the other thing anyway  :)
20:14 jnthn m: say uniprop .ord, 'Canonical_Combining_Class' for 'पहला'.comb
20:14 camelia rakudo-moar 2ec563: OUTPUT«0␤0␤0␤0␤»
20:14 jnthn No combiners.
20:15 pmichaud .tell TimToady   in post-GLR, should arguments of cross/zip still flatten?
20:15 yoleaux pmichaud: I'll pass your message to TimToady.
20:15 jnthn So going on the Unicode data for the chars involved, I don't see Rakudo doing anything not to spec.
20:16 [Coke] when constructing an object, if I try to get the current value of an attribute, that seems to work. but if I say:
20:16 TEttinger so... the nqp::say op doesn't seem to be able to print hashes when I try in my basic lisp that can currently only call nqp ops
20:16 [Coke] if !nqp::defined($cur_value) .... I get Cannot find method 'item': no method cache and no .^find_method
20:17 [Coke] do i need some lower level construct?
20:17 jnthn TEttinger: Indeed; your language's stringification semantics are for you to implement. nqp::say really wants a string.
20:18 PerlJam [Coke]: how did you get $cur_value?
20:18 moritz [Coke]: are you the error is coming from that line? the line number might be off a little bit...
20:19 [Coke] nqp::getattr(self, obj type, "attr_name")
20:20 eternaleye joined #perl6
20:20 [Coke] moritz: if I comment out that line, no error, pretty sure. double checking
20:21 RabidGravy jnthn, you know that #125408 with the CArray[num64]? It's taken a turn for the weird.  Updated the ticket, but it seems the code in the ticket now works but the actual code is worse than before
20:21 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125408
20:21 [Coke] moritz: arglebargle. probably changed two things at once and forgot about the first one.
20:23 moritz [Coke]: or if you comment out an "if", it might be from something inside the block that otherwise isn't run :-)
20:24 moritz anway, TTFN folks
20:27 colomon o/
20:27 timotimo what's "TTFN"?
20:28 PerlJam Ta Ta For Now
20:28 RabidGravy ta ta for now
20:28 RabidGravy :
20:28 RabidGravy )
20:28 flussence http://www.dict.org/bin/Dict?Form=D​ict2&amp;Database=*&amp;Query=TTFN <- handy site
20:29 timotimo ah
20:29 muraiki Time To Feed Nematodes
20:29 PerlJam timotimo: https://www.youtube.com/watch?v=5Gu50vq5ux4
20:29 timotimo muraiki: at what stage of your project does rakudo capitulate, OOC?
20:30 muraiki timotimo: well I only tried to process the first 20 lines or so, but since converting each line from json to an object was taking a few seconds per line, I just gave up
20:30 dha For those of you following along at home, I've started on my p5->p6 Functions document.
20:31 timotimo muraiki: can you try my very own JSON::Fast instead of JSON::Tiny?
20:31 muraiki timotimo: sure thing, give me a few minutes
20:32 PerlJam dha: careful!  If you keep going on like this, you might end up as an author of some book on the subject  :)
20:32 timotimo it should be a drop-in replacement and i'm hoping it'll be about 2x faster
20:33 dha PerlJam - Nah. that might actually make it worth my time. :-)
20:33 broheim joined #perl6
20:33 broheim HAI GAIS
20:33 * colomon needs to sit down and do some serious JSON timings soon.
20:33 broheim :B
20:33 skids o/
20:34 vendethiel o/
20:35 muraiki timotimo: JSON::Fast 12.508s for 10 entries; JSON::Tiny 22.827s; JSON::Tiny:from<Perl5> 25.153s
20:36 timotimo cool, i almost hit my mark of 2x
20:36 espadrine joined #perl6
20:36 timotimo (i admit it's still a few orders of magnitude less awesome than it should be)
20:36 timotimo (and i know parts of what makes it bad)
20:38 smls_ timotimo: I vaugely remember JSON::Fast having trouble parsing the JSON responses in http://rosettacode.org/wiki/Rosetta_Code/Rank_​languages_by_popularity#Perl_6:_Using_the_API though when I wrote that example
20:38 smls_ that's why I used JSON::Tiny instead
20:40 timotimo can you help me figure out what's wrong with it?
20:40 timotimo it doesn't do surrogate pairs for extended unicode characters :\
20:40 smls_ I don't know much about JSON I'm afraid
20:41 smls_ If I see another failure, I can try to golf it though
20:45 [Sno] joined #perl6
20:45 timotimo thanks!
20:46 spider-mario joined #perl6
20:48 [Sno] joined #perl6
20:50 dalek roast: 63eb5fe | usev6++ | S03-operators/assign.t:
20:50 dalek roast: Unfudge passing test for chained assignment
20:50 dalek roast: review: https://github.com/perl6/roast/commit/63eb5fef3a
20:55 nine muraiki: can you try JSON::XS from Perl5?
20:55 * [Coke] ᴙ dumb.
20:57 dalek rakudo/attr-isrequired: b484e3b | coke++ | src/core/Mu.pm:
20:57 dalek rakudo/attr-isrequired: Only throw when the value wasn't given
20:57 dalek rakudo/attr-isrequired:
20:57 dalek rakudo/attr-isrequired: Previous, adding "is required" would always die.
20:57 dalek rakudo/attr-isrequired: review: https://github.com/rakudo/rakudo/commit/b484e3ba0c
20:58 [Coke] $ ./perl6 -e 'class ᴙ { has $.x is required }; ᴙ.new()'
20:58 [Coke] The attribute '$!x' is required, but you did not provide a value for it.
20:58 [Coke] $ ./perl6 -e 'class ᴙ { has $.x is required }; ᴙ.new(:x(3))' # silent
21:00 dha m: say abs(-15);
21:00 camelia rakudo-moar 2ec563: OUTPUT«15␤»
21:00 dha m: say -15.abs;
21:00 camelia rakudo-moar 2ec563: OUTPUT«-15␤»
21:00 b2gills m: say (-15).abs;
21:00 camelia rakudo-moar 2ec563: OUTPUT«15␤»
21:01 dha Yeah, I just thought of that. So I'm guessing a precedence issue. But it's not, IMO obvious.
21:03 timotimo oooooh
21:06 hoelzro [Coke]: ты знаешь русский язык?
21:07 masak 'night, #perl6
21:07 hoelzro good night masak
21:09 timotimo gnite masak!
21:10 RabidGravy arp
21:11 leont joined #perl6
21:11 cognominal joined #perl6
21:14 muraiki joined #perl6
21:15 dha So, in p6, what does C<accept> return?
21:15 dha Docs say "In listen/server mode, waits for a new incoming connection, and returns it." What, in this instance, would "it" actually be?
21:16 timotimo a socket that has the incoming connection bound to it
21:16 timotimo a new socket for each time you call accept
21:16 FROGGS_ joined #perl6
21:17 dha I assume that's an IO::Socket::INET object?
21:18 tony-o_ if you're using that for the listening server, yes
21:19 dha Well, accept seems to be a method of that class.
21:20 tony-o_ there is also IO::Socket::Async
21:20 dalek roast: edc79af | usev6++ | S12-enums/thorough.t:
21:20 dalek roast: Fix test count and usage of '#?DOES'
21:20 dalek roast: review: https://github.com/perl6/roast/commit/edc79af0f0
21:20 dha ...which doesn't seem to be in the docs. :-/
21:21 dha But one can safely assume it returns an IO::Socket object of some kind?
21:21 tony-o_ looking at roast or the core source is easier sometimes, https://github.com/perl6/roast/blo​b/master/S32-io/IO-Socket-Async.t
21:22 dha The trick is knowing where to look, however. :-)
21:23 tony-o_ the listen doesn't,  .accept returns the incomin connection which is an IO::Socket of some kind, I don't know of an instance where that wouldn't be true
21:23 dha Not seeing any reference to accept on that page.
21:23 flussence looking knowledgeable around here only requires knowing how to use `ack` effectively :)
21:24 tony-o_ dha: https://github.com/rakudo/rakudo/blob​/nom/src/core/IO/Socket/Async.pm#L163
21:24 raydiak http://design.perl6.org/S32/IO.html#IO%3A%3ASocket says "method accept( --> IO::Socket)"...so without evidence to the contrary and at least a bit in favor, I'd say that's safe to assume (unless there's an error of some sort)
21:24 tony-o_ dha: https://github.com/rakudo/rakudo/blob​/nom/src/core/IO/Socket/INET.pm#L122
21:25 dha You want me to look at THE SOURCE? are you MAD?
21:25 tony-o_ dha: the Async server emits connections through a supply
21:26 muraiki nine: JSON::XS:from<Perl5> took 31.788s
21:27 raydiak the source being written in perl _is_ often rather convenient for these purposes :)
21:32 amurf joined #perl6
21:33 dha Yes, but the source is crazy. :-)
21:34 tadzik How can we improve it? :)
21:34 dha How should I know? I'm just trying to make things easier for people coming from perl 5. :-)
21:35 ugexe look at the perl5 source then. it will make perl6 source seem self explanitory
21:35 dha Actually, for all I know, the source is fine. But It would make my life somewhat easier if the docs were a bit less sparse.
21:35 tadzik Well, why do you think it's crazy? :)
21:36 tadzik Oh yes, no denying that
21:36 dha tadzik - I was just assuming. I do come from a perl 5 background. :-)
21:36 raydiak agreed, the docs are known to be incomplete, and are being worked on...patches welcome, of course :)
21:36 tadzik Right)
21:36 tadzik :)
21:36 dha raydiak - Kind of what I'm trying to do here, actually... :-)
21:37 dha For those just encountering my countless questions for the first time, https://github.com/dha/perl5-to-perl6-docs
21:38 * raydiak has been mostly absent for a couple weeks, goes to look
21:38 muraiki dha: looks great
21:38 dha Thanks muraiki
21:39 dha I've done the special variables and am moving on to the functions. hence the current onslaught of questions about functions beginning with "a". :-)
21:40 dha speaking of which. C<alarm()> is no longer?
21:42 raydiak ah, I see...neat, thanks dha++ :)
21:44 dha For my own sanity, I probably shouldn't have taken that p6 beginners course at YAPC, but... too late now. ;-)
21:44 raydiak I'd guess alarm is meant to be superseded by other concurrency things like Promise.in
21:44 raydiak in large part, sanity is relative :)
21:45 dha Indeed. :-)
21:46 census joined #perl6
21:47 atroxaper joined #perl6
21:52 b2gills m: $]
21:52 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/n3LvStIuVL␤Unsupported use of $] variable; in Perl 6 please use $*PERL.version or $*PERL.compiler.version␤at /tmp/n3LvStIuVL:1␤------> 3$]7⏏5<EOL>␤»
21:52 tony-o_ dha++ for special vars
21:53 dha Thanks. Comments welcome, by the way. I pretty much just plowed through perlvar, so some tweaks being needed would not be surprising.
21:54 kaare__ joined #perl6
21:54 dalek roast: 66b3dd6 | usev6++ | S11-modules/export.t:
21:54 dalek roast: Narrow down fudging
21:54 dalek roast: review: https://github.com/perl6/roast/commit/66b3dd6d4e
21:54 b2gills dha: .split does work on the default scalar variable $_
21:54 b2gills I mean shift
21:55 dha ...
21:55 tony-o_ m: sub foo { .shift.say; }; foo('bar');
21:55 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zZmkHdm0jk␤Calling foo(str) will never work with declared signature ()␤at /tmp/zZmkHdm0jk:1␤------> 3sub foo { .shift.say; }; 7⏏5foo('bar');␤»
21:55 tony-o_ m: sub foo { $_.shift.say; }; foo('bar');
21:55 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GXS9JC120L␤Calling foo(str) will never work with declared signature ()␤at /tmp/GXS9JC120L:1␤------> 3sub foo { $_.shift.say; }; 7⏏5foo('bar');␤»
21:55 dha I wouldn't have even *thought* of using shift on $_
21:55 tony-o_ m: sub foo { @_.shift.say; }; foo('bar');
21:55 camelia rakudo-moar 2ec563: OUTPUT«bar␤»
21:55 b2gills m: $_ = ^5; say .shift; .say
21:55 camelia rakudo-moar 2ec563: OUTPUT«Method 'shift' not found for invocant of class 'Range'␤  in block <unit> at /tmp/sHPnpCdWOT:1␤␤»
21:56 tony-o_ i think above is what dha was documenting ^^
21:56 tony-o_ mostly referring to subs/signatures
21:56 tony-o_ m: (^5).shift.say;
21:56 camelia rakudo-moar 2ec563: OUTPUT«Method 'shift' not found for invocant of class 'Range'␤  in block <unit> at /tmp/T0SClZ8Vp4:1␤␤»
21:56 tony-o_ m: @(^5).shift.say;
21:56 camelia rakudo-moar 2ec563: OUTPUT«0␤»
21:58 b2gills dha: basically $_ is special in that you can call all of it's methods as `.method`, whereas @_ is only special in that it will get populated by default if you don't specify a parameter list
21:58 dha right.
22:00 dha But C<.shift> isn't, afaict, a method of C<$_>
22:00 raydiak m: my &foo = { .shift }; say foo [^5]
22:00 camelia rakudo-moar 2ec563: OUTPUT«0␤»
22:01 tony-o_ why does it work as anon Callable?
22:01 tony-o_ but not:
22:01 tony-o_ m: sub foo { .shift; }; say foo(^5);
22:01 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Shue7Y0beM␤Calling foo(Mu) will never work with declared signature ()␤at /tmp/Shue7Y0beM:1␤------> 3sub foo { .shift; }; say 7⏏5foo(^5);␤»
22:02 raydiak m: sub {}.signature.say
22:02 camelia rakudo-moar 2ec563: OUTPUT«()␤»
22:02 raydiak m: {}.signature.say
22:02 camelia rakudo-moar 2ec563: OUTPUT«Method 'signature' not found for invocant of class 'Hash'␤  in block <unit> at /tmp/IJYjuXYwwW:1␤␤»
22:02 raydiak m: {;}.signature.say
22:02 camelia rakudo-moar 2ec563: OUTPUT«($_? is parcel)␤»
22:02 tony-o_ m: my &a = { }; &a.signature.say;
22:02 camelia rakudo-moar 2ec563: OUTPUT«Type check failed in assignment to '&a'; expected 'Callable' but got 'Hash'␤  in block <unit> at /tmp/Mn2XDe2pso:1␤␤»
22:02 tony-o_ m: my &a = { return 1; }; &a.signature.say;
22:02 camelia rakudo-moar 2ec563: OUTPUT«($_? is parcel)␤»
22:03 tony-o_ seems like an empty signature would more of an explicit thing with the sub syntax
22:03 tony-o_ m: sub foo () { } #eg
22:03 camelia rakudo-moar 2ec563: ( no output )
22:04 tony-o_ err, i guess i mean it seems inconsistent that:  my &foo = sub {}   and   sub foo { }  get created with different signatures
22:05 dha m: my &f = {.shift};say f(^5);
22:05 camelia rakudo-moar 2ec563: OUTPUT«Method 'shift' not found for invocant of class 'Range'␤  in block <unit> at /tmp/sHOvDvhUCB:1␤␤»
22:05 raydiak not sure myself if it's a bug or not, could see arguments for or against it
22:05 tony-o_ dha: raydiak was passing an array with [^5]
22:05 dha ah. yes.
22:05 tony-o_ raydiak: same
22:05 tony-o_ m: my &f = {.shift}; say f([^5])
22:05 camelia rakudo-moar 2ec563: OUTPUT«0␤»
22:06 ugexe m: my &a = -> $x { say $x }; a(1)
22:06 camelia rakudo-moar 2ec563: OUTPUT«1␤»
22:07 tony-o_ m: \a = sub { }; a.signature.say;
22:07 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ER98ZEQ_hJ␤Preceding context expects a term, but found infix = instead␤at /tmp/ER98ZEQ_hJ:1␤------> 3\a =7⏏5 sub { }; a.signature.say;␤»
22:07 tony-o_ m: my \a = sub { }; &a.signature.say;
22:07 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/F2GpjqCVOM␤Undeclared routine:␤    &a used at line 1␤␤»
22:08 dha Ok, any suggestions on how I should change my doc? Or should I leave it as is until we figure out if it's a bug or not?
22:08 AlexDani` joined #perl6
22:09 tony-o_ dha: i think your document is technically accurate, the only thing might be a caveat that the signature is different if the sub is anonymous
22:10 dha hm. I think for the purposes of a p5->p6 document, that may be beyond what's needed. Possibly something to go into the actual p6 docs at some point, maybe?
22:10 raydiak well no, sub {} (anon) has the same sig as sub foo {} (named)...different if it's a block than if it's a sub, but not sure if I'm using precisely the right words here
22:10 ugexe m: my \a = sub ($x) { }; a.signature.say;
22:10 camelia rakudo-moar 2ec563: OUTPUT«(Any $x)␤»
22:11 tony-o_ raydiak: i know what you mean, i'm not really sure how to phrase that either
22:11 tony-o_ m: my &a = sub :: { ; }; &a.signature.say;
22:11 camelia rakudo-moar 2ec563: OUTPUT«()␤»
22:11 raydiak lambda maybe
22:12 tony-o_ m: my &a = sub :: { .shift; }; a([^5]).say; #fail
22:12 camelia rakudo-moar 2ec563: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub  at /tmp/pERKYXIWH5:1␤  in block <unit> at /tmp/pERKYXIWH5:1␤␤»
22:12 dha Well, if you ever get it figured out and it turns out to be relevant to someone coming from Perl 5, let me know. :-)
22:12 tony-o_ m: my &a = sub { ; }; &a.signature.say;
22:12 camelia rakudo-moar 2ec563: OUTPUT«()␤»
22:15 spider-mario joined #perl6
22:15 raydiak in the context of p5 you only have sub {} iirc, not lambdas/pointy blocks/anything like that, so inside a sub {} (with no explicit signature), you will always have a $_, so implicit method calls will go to whatever is passed to it
22:15 census left #perl6
22:15 raydiak iirc that had something to do with how the discussion got here, thought tbh I haven't looked at the document in question, am semi-afk atm
22:16 ugexe m: my &a = sub (*@_) { @_.shift }; say a([^5]);
22:16 camelia rakudo-moar 2ec563: OUTPUT«0 1 2 3 4␤»
22:16 tony-o_ raydiak: that makes a lot of sense
22:17 tony-o_ because &a =  {; } is really a Callable, i think
22:17 dha m: my &a = sub (*@_) { .shift }; say a([^5]);
22:17 camelia rakudo-moar 2ec563: OUTPUT«Method 'shift' not found for invocant of class 'Any'␤  in sub  at /tmp/ZV3hq6n0_B:1␤  in block <unit> at /tmp/ZV3hq6n0_B:1␤␤»
22:17 tony-o_ m: my &a = { ; }; &a.WHAT.say;
22:17 camelia rakudo-moar 2ec563: OUTPUT«(Block)␤»
22:17 tony-o_ Block ..
22:17 tony-o_ m: my &a = { ; }; &a.^mro.say;
22:17 camelia rakudo-moar 2ec563: OUTPUT«(Block) (Code) (Any) (Mu)␤»
22:17 raydiak Callable is role anyway, not a class
22:17 ugexe sub doesnt have a self. you cant just .shift
22:18 tony-o_ you can .shift in a block though
22:18 tony-o_ m: sub a (*$_) { .shift; }; a([^5]).say;
22:18 camelia rakudo-moar 2ec563: OUTPUT«0␤»
22:18 raydiak m: sub foo ($_) { .shift }; say foo [^5]   # or explicitly in a sub...
22:18 camelia rakudo-moar 2ec563: OUTPUT«0␤»
22:18 tony-o_ beat ya :-)
22:18 raydiak heh nice :)
22:20 dha Not that you should stop digging at this, of course, but for my purposes, is C<.shift> in any of these cases, actually working on C<@_>?
22:21 ugexe they are assigning the value to $_ directly which is confusing you
22:21 tony-o_ dha: .shift always works on $_
22:21 tony-o_ a .<method> always works on $_
22:23 dha right, so when my document says that C<.shift> doesn't work on C<@_>, that's solid. I'm thinking that adding information on C<.shift> working on $_ there is somewhat arcane and mostly confusing for someone trying to look from p5 to p6.
22:23 tony-o_ making the signature *$_ it's assigning all variables to $_ (* is slurpy) which is why .shift works, in perl6 if you did @_[1] to get the second value, you'd get an error, $_[1] would work tho
22:24 ugexe m: my &a = sub (*@_) { @_.shift }; say a([^5]);
22:24 camelia rakudo-moar 2ec563: OUTPUT«0 1 2 3 4␤»
22:24 ugexe you can shift off it but its not an implicit @_
22:24 tony-o_ then .shift doesn't work
22:24 dha right.
22:25 ugexe it does work
22:25 * lizmat has blugged: https://p6weekly.wordpress.com/2015/06/2​3/2015-23-25-catching-up-is-hard-to-do/
22:25 tony-o_ m: my &a = sub (*@_) { @_.shift }; say a(^5);
22:25 camelia rakudo-moar 2ec563: OUTPUT«0␤»
22:25 tony-o_ you don't need the [] for slurpy sig
22:26 dha In other news, I've reached the "b"s. I'm guessing the p5 C<bind> function is gone in p6?
22:26 tony-o_ lizmat++
22:28 dha lizmat++ # always :-)
22:32 cognominal joined #perl6
22:32 woolfy joined #perl6
22:32 woolfy left #perl6
22:33 lizmat dha: afaik, "bind" as such is gone.  Not sure what the equivalent is...
22:33 * lizmat is very tired and will go to bed now
22:33 dha I'm *guessing* that any binding is done when a new socket object is created.
22:34 dha I'm also guessing that C<binmode> is gone as well.
22:43 raydiak yep binmode() is gone, replacements are the :bin and :nl params to open()
22:48 dha Ah. saw :bin. Will look at :nl. Thanks.
22:48 raydiak yw
22:48 leont joined #perl6
22:49 dha Guessing that C<break>ing out of a C<given> block is no longer a thing.
22:50 ugexe m: given 1 { break; die; }
22:50 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VuOzIkVXiR␤Undeclared routine:␤    break used at line 1␤␤»
22:51 b2gills `break` comes out of  `given` is implemented in Perl 5
22:52 timotimo we don't have "break" in perl6 at all
22:52 timotimo but we have "succeed" and "proceed"
22:53 leont Probably was a break when it was added to perl 5
22:53 dha Yes. It was.
22:54 leont *there
22:55 skids joined #perl6
22:55 dalek rakudo-star-daily: c4339a2 | coke++ | log/ (2 files):
22:55 dalek rakudo-star-daily: today (automated commit)
22:55 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/c4339a27be
22:56 spidermario joined #perl6
22:57 [Coke] hoelzro: I know about 3 words, and about as many cyrillic letters.
22:58 dha Huh. There seems to be a test file for C<caller()> in roast, but C<caller()> doesn't appear to make Perl 6 happy.
23:00 [Coke] коледа <- which you may recognise.
23:01 b2gills That test file may not get run
23:02 dha Yeah, I figured. Just confirming that I can say that C<caller> is gone.
23:03 dha Also caller-related. It appears to be at best difficult to get a package name out of C<callframe>
23:08 spider-mario joined #perl6
23:10 amurf joined #perl6
23:10 b2gills m: say callframe(0).annotations
23:10 camelia rakudo-moar 2ec563: OUTPUT«file => /tmp/UjfIpAgR2c, line => 1␤»
23:10 [Coke] .ask timtoady you ok with adding "is required" as a trait for attributes?
23:10 yoleaux [Coke]: I'll pass your message to timtoady.
23:12 dha b2gills - yeah, you can get the file and line number, but not the package.
23:13 ugexe m: say $?PACKAGE
23:13 camelia rakudo-moar 2ec563: OUTPUT«(GLOBAL)␤»
23:14 spider-mario joined #perl6
23:14 pecastro joined #perl6
23:15 Vlavv joined #perl6
23:15 b2gills m: sub c { say $?CALLER::PACKAGE }; package B { c() }
23:15 camelia rakudo-moar 2ec563: OUTPUT«(B)␤»
23:17 dha That would just be the immediate caller, though, right? If you're looking back x number of callframes...
23:19 dha Incidentally, it looks like an exception class for C<chdir> is documented but not C<chdir> itself.
23:20 spider-mario joined #perl6
23:21 dolmen joined #perl6
23:22 dha Anyway, I should go find some dinner. Thanks for the help, all.
23:24 ugexe m: sub c { say $?CALLER::CALLER::PACKAGE }; package C { package B { c() } } # cant is such a strong word
23:24 camelia rakudo-moar 2ec563: OUTPUT«(C)␤»
23:28 dalek perl6-bench: 39db33a | smls++ | minibenchmarks.pl:
23:28 dalek perl6-bench: add 'x_label' and improve 'expected' field for rc-perfect-shuffle
23:28 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/39db33a4bf
23:28 dalek perl6-bench: 00000fb | japhb++ | minibenchmarks.pl:
23:28 dalek perl6-bench: Merge pull request #25 from smls/master
23:28 dalek perl6-bench:
23:28 dalek perl6-bench: add 'x_label' and improve 'expected' field for rc-perfect-shuffle
23:28 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/00000fbea8
23:30 dalek roast: 107f8c4 | Coke++ | S12-class/attributes-required.t:
23:30 dalek roast: add new test file for required attributes
23:30 dalek roast: review: https://github.com/perl6/roast/commit/107f8c4923
23:30 dalek rakudo/attr-isrequired: 6042ec5 | Coke++ | t/spectest.data:
23:30 dalek rakudo/attr-isrequired: Run new test file
23:30 dalek rakudo/attr-isrequired: review: https://github.com/rakudo/rakudo/commit/6042ec5c9a
23:35 [Coke] someone have an example of throws-like that uses the matcher optional param?
23:42 [Coke] folks, feel free to update S12-class/attributes-required.t if you want - I'm aware of "mention the class name in the error message".
23:54 ugexe perl6-j -e 'Proc::Async' #Could not find symbol '&Async'
23:56 japhb ugexe: That might be NYI on r-j

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

Perl 6 | Reference Documentation | Rakudo