»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
skids Wow that was a long backlog. 00:04
My insignificant bikeshedding votes: make [| DTRT instead of :[, because it is better for overloaded meanings to be similar, and instead of "Seq", "Feed" 00:05
.oO(":[" as "ordered-hash constructor"?)
00:09
00:13 cognominal left 00:20 vendethiel left 00:22 leont left 00:25 laouji joined 00:31 jack_rabbit_ joined 00:39 laouji left 00:40 laouji joined 00:43 laouji left 00:45 vendethiel joined 00:51 coffee` joined, skids left 00:54 grondilu joined 01:00 Ben_Goldberg joined 01:06 vendethiel left 01:15 vendethiel joined 01:24 atroxaper joined 01:25 Ben_Goldberg is now known as BenGoldberg 01:29 atroxaper left
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
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.
the naming is bikesheddable. 01:33
*bikeshedable 01:34
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:35
01:37 cognominal joined 01:38 vendethiel left 01:40 vendethiel joined 01:41 aborazmeh joined, aborazmeh left, aborazmeh joined, cognominal left 01:42 b2gills left 01:46 telex joined 01:51 johnjohn101 joined
johnjohn101 i perl 6 people 01:52
zacts hey
johnjohn101 how close is perl6? 01:54
01:55 b2gills joined
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:58
zacts perl6 is quite a different language than perl5
ah ok
I'll let others here answer
johnjohn101 i understand it's different. been reading up on it lately
zacts ah yeah
I'm just getting into Perl6 myself
johnjohn101 oh ok 01:59
02:00 skids joined
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:00
johnjohn101 very cool. i hope it does well. 02:01
japhb johnjohn101: Thank you!
02:02 vendethiel left 02:04 aborazmeh left 02:06 aborazmeh joined, aborazmeh left, aborazmeh joined 02:14 noganex_ joined 02:15 vendethiel joined 02:38 rmgk_ joined, rmgk_ is now known as rmgk, vendethiel left 02:40 spider-mario joined
gtodd lizmat: would be nice if perl-5.2_ had something like Perl6::Form as a core module ... so much easier to use 02:44
03:02 pyrimidi_ joined, TEttinger joined
TEttinger m: say ( ")" ~~ /<-[\d\c[APOSTROPHE]\c[QUOTATION MARK]\c[NUMBER SIGN]\{\}\(\)\[\]\s\/`@,~\:\^\.]>/ ) 03:03
camelia rakudo-moar 75307d: OUTPUT«Nil␤»
johnjohn101 almost time for bed
wrong window :(
TEttinger m: say ( "a" ~~ /<-[\d\c[APOSTROPHE]\c[QUOTATION MARK]\c[NUMBER SIGN]\{\}\(\)\[\]\s\/`@,~\:\^\.]>/ ) 03:04
camelia rakudo-moar 75307d: OUTPUT«「a」␤»
TEttinger hmmmmm
m: say ( "" ~~ /<-[\d\c[APOSTROPHE]\c[QUOTATION MARK]\c[NUMBER SIGN]\{\}\(\)\[\]\s\/`@,~\:\^\.]>/ )
camelia rakudo-moar 75307d: OUTPUT«Nil␤»
03:04 Khisanth joined 03:09 bin_005 joined
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
TEttinger hm, there's definitely something wrong with my ws token. 03:13
token ws { <!after <.id> > <!before <.id> > [ \s | ',' | <.comment> ]* }
zostay_ m: my @a = 1, 2, 3; @a[2] :delete; @a.perl.say; @a[3] = 4; @a.perl.say;
camelia rakudo-moar 75307d: OUTPUT«[1, 2]<>␤[1, 2, 3, 4]<>␤»
TEttinger this seems to check the after, and if it matches it doesn't bother to check the before 03:14
03:14 zostay_ is now known as zostay
zostay rakudobugged that one 03:16
03:27 laouji joined 03:32 ssqq joined, ssqq left 03:34 raiph joined 03:44 laouji left 03:47 laouji joined 03:51 bin_005 left 03:55 zacts joined 03:56 johnjohn101 left, BenGoldberg left 04:02 profan joined 04:07 Khisanth left
raiph .tell FROGGS may be of interest: pipe deadlock (dihwidt?): news.ycombinator.com/item?id=9753279 04:09
yoleaux raiph: I'll pass your message to FROGGS.
04:18 Khisanth joined 04:29 aborazmeh left
ugexe its not going to check the before because you have <!after (not after) 04:37
if it matches like you say
also might want to try putting the [ \s | ',' | <.comment> ]* between the after/before 04:38
TEttinger ah, I figured it out btw ugexe 04:40
it turned out to not actually need before or after
ugexe you might want to use || instead of | too. or maybe not 04:42
04:49 laouji left 04:51 laouji joined 04:53 atroxaper joined, skids left 04:54 atroxaper left 04:56 atroxaper joined
dalek ecs: bce89a3 | pmichaud++ | S07-glr-draft.pod:
We need a "immutable list" type (Parcel?)

Note that we're likely to need a separate type to represent immutable lists, and which will be produced using infix:<,> . The naming is open for discussion/bikeshedding.
05:06
ecs: 469f012 | pmichaud++ | S07-glr-draft.pod:
Notes about Slip, Seq, interpolation, iteration.
ecs: f617745 | pmichaud++ | S07-glr-draft.pod:
Add note about Seq (cf Parcel) naming.
05:08
05:11 quester joined
dalek ecs: dc32b3b | pmichaud++ | S07-glr-draft.pod:
Implementation note about flattening/Slip.
05:17
05:32 muethos joined
JimmyZ github.com/perl6/perl6-docker and github.com/perl6/docker looks same ? 05:33
05:37 domidumont joined 05:38 atroxaper left 05:41 domidumont left, domidumont joined 05:45 jack_rabbit_ is now known as jack_rabbit 05:48 muethos left 05:51 domidumont left 06:06 Khisanth left 06:07 Khisanth joined, atroxaper joined 06:09 diana_olhovik_ joined 06:12 laouji left 06:14 domidumont joined 06:16 laouji joined, _mg_ joined 06:19 laouji left 06:21 laouji joined, gfldex joined
Ulti re: bikeshedding name for immutable list, how about Tuple because it is one even in syntax 06:22
06:23 kaare_ joined 06:26 RabidGravy joined 06:30 domidumont left, domidumont joined
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
moritz: I'll pass your message to lichtkind.
06:36 Khisanth left 06:37 Khisanth joined 06:38 gfldex left 06:40 colomon joined, FROGGS joined 06:45 atroxaper left 06:47 atroxaper joined 06:58 darutoko joined 06:59 zakharyas joined 07:01 amurf left 07:03 quester left
lizmat good *, #perl6 07:09
nwc10 good *, lizmat 07:11
07:12 bjz joined
FROGGS morning o/ 07:13
yoleaux 04:09Z <raiph> FROGGS: may be of interest: pipe deadlock (dihwidt?): news.ycombinator.com/item?id=9753279
07:13 bjz left
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:15
RabidGravy marnin 07:17
FROGGS ho RabidGravy
RabidGravy are we all groovy?
masak aye!
FROGGS we are 07:18
masak we're also all ruby, go, rust, elm, and lispy.
moritz is sixy instead
[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
I may be in traction by this evening
masak [Tux]: wow, what's $^A ?
[Tux] just try :) 07:20
it is the "accumulater"
masak oh!
[Tux] <lizmat> .oO( waiting for [Tux] to scream :-)
masak [Tux]: didn't find it in `perldoc perlvar`
[Tux] man perlform
perldoc perlform
masak yeah, I'm doing that now 07:21
oh, and perldoc perlvar does mention it. both as $^A and $ACCUMULATOR 07:22
masak .oO( CS: "we should avoid side-effects and strive to eliminate globals!" -- Perl 5: "hey everybody, look what I made!" ) 07:23
[Tux] shhh 07:24
$., $=, $^, $~, and $- are all semi-global
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
[Tux] it is possible to set $- to maxint as side-effect of fiddling with any of the others. Don't try that at home
masak I promise. 07:26
RabidGravy to be relatively fair, formats were a hangover from a very early Perl
[Tux] and for even more fun. look at my tests in write.t where I *nest* formats!
masak that kind of nails it, though.
global things don't compose well.
[Tux] one can make formats be recursive to optimize brain-damage 07:27
moritz
.oO( recursive, global brain damage )
07:28
dalek kudo/nom: bcf38c9 | lizmat++ | src/core/Array.pm:
Fix #125457, hanenkamp++
07:29
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125457
07:30 abraxxa joined
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.
[Tux] test 50000 42.986 42.899 07:37
test-t 50000 43.348 43.262
the changes of the last two days made my recent work now *slower* than the original!
dalek ast: 2ff938b | lizmat++ | S32-array/delete-adverb.t:
Add test for #125457
07:38
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125457
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!
masak wow, that's quite significant. 07:45
[Tux] github.com/Tux/CSV/blob/master/README.speed
lizmat [Tux]++ for keeping track
[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 :-)
lizmat starts reading up backlog for the past 3 weeks 07:47
07:52 spider-mario left, tardisx joined
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:52
07:53 bjz joined
moritz RabidGravy: submethod DESTROY() { } 07:53
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
moritz RabidGravy: note that this won't be called during global destruction
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
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:57
moritz yes, that's a good use case for DESTROY 07:58
no panic if it doesn't happen on program exit
masak m: my $zombie; class C { submethod DESTROY { say "died, resurrected"; $zombie = self }; method gist { "braaaaaains" } }; { my $c = C.new }; for ^1000 { [] }; say $zombie
camelia rakudo-moar bcf38c: OUTPUT«died, resurrected␤braaaaaains␤»
moritz the OS will free it anyway
masak \o/
moritz masak++
masak bows 07:59
07:59 brrt joined
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
07:59 domidumont left
RabidGravy I'll see how it goes 07:59
08:01 espadrine joined
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␤»
masak oh, that's a polite zombie.
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
camelia rakudo-moar bcf38c: OUTPUT«g'day, ol' chap␤died, resurrected␤braaaaaains␤»
masak better. :)
08:03 spider-mario left 08:04 spider-mario joined, FROGGS left, domidumont joined 08:09 bjz left 08:14 atroxaper left
zacts alright 08:17
I just installed the latest release of rakudo*
2015.03
I guess
so, what is a good ebook / tutorial series?
what is most recommended here? 08:18
(both for total newbies, and for experienced programmers?)
for learning perl6 the language
(not internals of rakudo or anything)
I do see github.com/perl6/book
DrForr I might start with learnxinyminutes.com/docs/perl6/ ...
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
zacts but I want to double check things
08:19 FROGGS joined
masak zacts: the perl 6 book is fine, but incomplete. 08:19
zacts: also do check out learnxinyminutes.com/docs/perl6/ 08:20
zacts: and perlgeek.de/blog-en/perl-5-to-6/
zacts ok cool
masak zacts: and perl6advent.wordpress.com/
08:21 dakkar joined
masak together, those resources cover a lot. 08:21
zacts sweet
masak (and are generally of very high quality, too)
zacts and of course the perl6 language specification docs?
masak yes, but they're sometimes quite specialist and terse.
zacts ok
masak you need to be damaged by the lingo for a few years to appreciate them :P 08:22
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.
m: say "OH HAI, zacts!"
camelia rakudo-moar bcf38c: OUTPUT«OH HAI, zacts!␤»
masak .oO( it's like a puppet show )
zacts salvete
salve camelia bot 08:23
08:23 espadrine left
masak m: say get 08:23
camelia rakudo-moar bcf38c: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
zacts masak: how to utilize perl6advent? 08:24
it looks like a list of daily blog posts?
masak zacts: I'd start at perl6advent.wordpress.com/category...-contents/
zacts is there another blog, on notable posts?
oh I see
masak zacts: and pick a topic that interests you.
zacts I didn't see the TOC yet
masak it's a bit out of the way :)
zacts heh, I missed that one
cool
masak we've been at it for six years, so there's a lot in there. 08:25
zacts yeah
08:30 kurahaupo joined 08:31 bin_005 joined, larion joined 08:34 leont joined 08:45 atroxaper joined
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:49
or is "winner" still in there and just deprecated? I can't remember 08:50
08:50 amurf joined
masak think so. 08:50
m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^870 { [] }
camelia ( no output )
masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^1000 { [] } 08:51
camelia ( no output )
masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^10_000 { [] }
camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
masak hm, GC happens much earlier on my laptop than on camelia's box.
m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^4_000 { [] }
camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
itz morning
masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^2_000 { [] }
camelia ( no output )
masak morning, itz
RabidGravy marnin itz
masak here, it happens after 862 iterations of that loop. 08:52
m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_000 { [] }
camelia ( no output )
masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_500 { [] }
camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_250 { [] }
camelia ( no output )
masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_375 { [] }
camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
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
masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_281 { [] } 08:53
camelia ( no output )
08:53 spider-mario left
masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_296 { [] } 08:53
camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_288 { [] } 08:54
camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_284 { [] }
camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
masak m: class C { submethod DESTROY { say "gc!" } }; { my $c = C.new }; for ^3_282 { [] }
camelia rakudo-moar bcf38c: OUTPUT«gc!␤»
masak ok, 3282.
m: say 3282 / 862
camelia rakudo-moar bcf38c: OUTPUT«3.807425␤»
masak I wonder if camelia's server has 4 times the available RAM. 08:55
08:55 amurf left 08:57 raiph left 08:58 espadrine joined
moritz free -m on camelia says: Mem: 3961 1106 2854 40 0 824 09:02
masak huh, that's 4Gb total, innit? 09:04
09:04 FROGGS left
masak I have 16Gb here. 09:04
GB*
09:04 larion left
masak though less than 2GB free. 09:04
dalek p: 42b8722 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
"Can not" => "Cannot" for a few error messages."
09:06
psch hi #perl6 o/
moritz masak: yes
09:06 larion joined
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?
that sounds a bit too leaky for today's Rakudo. 09:08
moritz no
VMs tend not to use up all free memory before starting to GC
that would be very unfriendly to other processes (likely other instances of the same VM...) on the same OS 09:09
09:11 lsm-desktop joined 09:13 leont left
moritz python confuses me 09:13
masak how so? 09:14
moritz in __init__ (for example) you can initialize attributes simply by assigning them
if you do that in a regular method, you get an exception
but
__init__ runs after the object has been created
where exactly is the boundary that allows or disallows attribute autovivification?
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"
masak moritz: gist.github.com/masak/93815861a74c571c784f 09:16
jnthn: ooh
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.
moritz masak: I'm talking about python 3, fwiw
masak: "age"
masak moritz: gist.github.com/masak/070aa6219ed925728b92 09:17
09:17 nowan joined
masak moritz: you had to say "age", and not "experience" :P 09:17
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
09:18 kurahaupo left
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
moritz: yes, I believe it's happened to me too. but it's not as simple as you claim.
moritz masak: there's a saying about making 10 mistakes 1000 times vs making 10000 mistakes 09:19
masak: maybe it's not "age", but "having wandered far enough", figuratively speaking 09:20
masak I think there has to be a desire to improve, too. 09:23
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
moritz same here :-) 09:24
masak .oO( "it's for your own good, you'll see!" -- "go away, grandpa" )
basically the premise of Looper, by the way.
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
DrForr Oh, no, different time travel flick, but I've seen that too. 09:28
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
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
moritz itz: I liked the first 80% of "Source Code" 09:33
psch the ending of source code was a bit cheesy
still a good movie though 09:34
itz endings are hard a Pareto film is good enough
[ptc] m: my $url = [email@hidden.address] $url ~~ m/ \: $<username> = (.*) \/ /; $url ~~ s/$<username>/"other"/; say $url; 09:36
camelia rakudo-moar bcf38c: OUTPUT«git@github.com:username/reponame.git␤»
09:36 b2gills left
[ptc] hrm, why doesn't the named capture get used in the substitution? 09:36
do I have to assign it to a variable first before using the value in a substitution?
psch m: my $url = [email@hidden.address] $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)␤»
psch [ptc]: you have a new $/ already 09:38
[ptc] ah, I knew I'd missed something
psch: thanks!
masak which makes sense
because you can access $/ already on the left side of the substitution 09:39
so it can't refer to the old one
[ptc] needs more coffee
dalek ast: 6f6461b | peschwa++ | S04-exceptions/fail.t:
Unfudge now-passing test for RT #64990.
09:40
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=64990
09:41 andreoss joined 09:42 laouji left 09:49 b2gills joined 09:50 yeahnoob left, laouji joined 09:55 atroxaper left 09:56 laouji left
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
masak andreoss: 200 OK is such a harsh error code. 09:56
09:56 laouji left
andreoss cant installed modules with new panda, but old version seems okay 09:57
09:57 laouji joined 09:58 atroxaper joined
[ptc] should all modules have an entry for "source-url" in the META.info? 09:59
09:59 leont joined
[ptc] or is it ok to have either "repo-url" and/or "source-url"? 09:59
10:02 pnu joined
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:03
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
RabidGravy: I'm just wondering if I should submit a PR, if it's something which needs to be corrected 10:06
10:07 leont left
RabidGravy ptc, I'd guess the touchstone is whether it appears in the modules list and whether panda can install it 10:07
if the answers are yes then no need ;-)
[ptc] :-) 10:08
RabidGravy andreoss, in lib/Panda/Ecosystem.pm I think
andreoss, hahaha. my hack was looking specifically for HTTP/1.1 10:12
better make that HTTP/1.<[01]> then
[ptc] RabidGravy: surely there's a standard, that module writers should follow
10:13 brrt left
[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 design.perl6.org/S22.html#META6.json but the implementations seem to differ from what that says
[ptc] or has something like that not yet crystallised? 10:14
thanks for the link. You're right, the implementations differ from the spec
tadzik oh, heh 10:15
github.com/tadzik/panda/commit/7d8...3fd18b0ea8
it's checking for HTTP/1.1 %)
[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 :-) )
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:16
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 10:19 leont joined, domidumont left
Ven o/, #perl6! 10:20
masak \o
psch o/ Ven 10:21
Ven lots of "TRANSLATEME" on that swiss perl workshop page =P
[ptc] RabidGravy: here's a good example: Kains (github.com/cedric-vincent/kains/) adheres to the design spec, however can't install via panda since source-url isn't in the metadata
I can see this being frustrating for module authors...
10:23 leont left 10:26 dayangkun left 10:27 Ven left
RabidGravy tadzik, there you go github.com/tadzik/panda/pull/176 10:28
itz talking of pull requests..
github.com/rakudo/rakudo/pull/441
*cough*
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
[ptc] yup 10:30
sue so sign it then
nwc10 and then you write a cheque, er, wait, no, you *can* fax it, IIRC
no cheque needed.
sue wait, fax? what century is this
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.
(about what fakeable technology *is* acceptable as a signature, and what fakeable technology is not)
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
[ptc] RabidGravy: it does seem a bit of an overkill to have 3 separate places to specify the source repo url...
RabidGravy yeah
andreoss, as a matter of interest are you behind a proxy? 10:34
10:36 Ven joined
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:40
panda gen-meta does emit what it says in the s22 10:41
[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:43
moritz [ptc]: FROGGS, lizmat and tadzik 10:44
nine So where can I find this document I have to sign to get a commit bit? 10:45
10:45 atroxaper left
[ptc] moritz: thanks 10:46
nwc10 nine: this, I beleive: www.perlfoundation.org/contributor_..._agreement
[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:47
RabidGravy [ptc], just looked, the modules list does actually reflect the support.source so it would only be panda that needs changing 10:50
10:51 atroxaper joined
RabidGravy doesn't look like a big change to be honest 10:51
[ptc] no, it probably isn't
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:53 bin_005 left
RabidGravy no, it should definitely support what it says in the s22 10:54
10:54 _mg_ left, _mg_ joined
nine nwc10: thanks! Your link led me to www.perlfoundation.org/attachment/legal/cla3.pdf which is better for print 10:57
10:57 laouji left 11:03 Ven left, larion left, larion joined 11:08 Ven joined 11:10 domidumont joined
moritz colomon++ # p6l answer to yary 11:15
colomon :) 11:16
moritz mine would have just been "symbolic math is out of scope for Perl 6 core" 11:18
colomon That would be my default position too, but it’s possible an awesome module implementation of it could convince me otherwise. ;) 11:20
moritz we should provide enough infrastructure to make an awesome module implementation possible 11:21
and well-integrated into the rest of language
colomon absolutely, and I hope we already have.
moritz but I don't want to burden compiler writers with maintaining a computer algebra system
colomon right, it would have to be a very awesome module to make me question your poition. ;) 11:23
11:26 FROGGS joined 11:32 telex left
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:32
11:34 telex joined
masak RabidGravy: no, not threadsafe. 11:35
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.
RabidGravy: maybe have a look at jnthn.net/papers/2014-apw-objects-c...rrency.pdf for ideas
RabidGravy Lock it is then
moritz Lock.protect({ $clients++ }) 11:37
11:39 yakudza joined
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:39
Note you need an instnace of Lock 11:40
But generally it's better to work at a higher level
Note your "if $clients == 0" races with other methods too
11:41 diana_olhovik_ left
jnthn OO::Monitors is probably appropriate for this kind of class. 11:41
11:41 atroxaper left, atroxaper joined 11:42 atroxaper left 11:43 andreoss left 11:44 andreoss joined 11:46 ribasushi joined 11:47 andreoss` joined, b2gills left 11:48 b2gills joined 11:49 andreoss left
RabidGravy hmm, so it's probably have a monitor that has that logic, lets see how that might work out 11:52
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.
JimmyZ ./perl6-m -e "my $i =1" 12:04
===SORRY!=== Error while compiling -e
Malformed my
is it right?
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
jnthn Almost certainly that, then. So you're feeding rakudo "my =1" 12:08
dalek kudo-star-daily: f71f406 | coke++ | log/ (2 files):
today (automated commit)
kudo-star-daily: ef570f8 | coke++ | log/ (2 files):
today (automated commit)
jnthn Which is malformed.
dalek rl6-roast-data: 5c66c05 | coke++ | bin/rakudo.moar-jit.sh:
Hoist out $WORKDIR
rl6-roast-data: 8c1f8e4 | coke++ | bin/rakudo.moar.sh:
moar hoist
rl6-roast-data: 5bb3b29 | coke++ | / (9 files):
today (automated commit)
jnthn Try single quotes
moritz type this to verify: echo ./perl6-m -e "my $i =1"
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 :)
JimmyZ hmm, looks like my bash is interpolating the $
it was not
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.
TEttinger yeah, I hit that difference hard :) 12:11
ShimmerFairy masak: Not my problem DOS isn't user-friendly :P
TEttinger perl6-m -e'my $i =1'
jnthn Thanks for playing rakudo bug bingo. Better luck next time! 12:13
FROGGS :D
masak .oO( newbs ) :P 12:14
[Coke] (backscroll) moritz: our work kitchen is documented as self cleaning. as in, "clean it up yourself"
psch $ ./perl6 --target=jar --output=Foo.jar -e'say "hi"'
$ ./perl6 --with-cu=Foo.jar
hi
name of the switch up for debate :P
but that's a good start for self-executable jar files \o/
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
tadzik jnthn: I now feel a need to create such bingo
FROGGS psch++
cool!
tadzik with squares like "involves silly unicode characters", or "has something to do with precomp" 12:16
jnthn haha :D
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
tadzik: that could be mixed with contribution stuff... 12:18
masak this idea has to be made to happen
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
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."
masak #dammitperl6
FROGGS exactly
masak "yeah, I wasn't able to get any specific help with my problem... so I became a compiler implementor." 12:20
I hate when that happens. :P
TEttinger (let [foo (+ 1 1) foo]) 12:21
if you read that with your eyes, it will not work
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!
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...
TEttinger it however prints 2
RabidGravy jnthn, BTW OO::Monitors has a deprecated isa_ok in its tests
lizmat FROGGS: good news! 12:22
TEttinger FROGGS: so many awesome things in there!
FROGGS lizmat: moarvm will then build on e.g. all debian platforms except Hurd most probably (buildd.debian.org/status/package.php?p=moarvm <--- this will turn less green soon)
err, less red
TEttinger FROGGS: the gcc condition is weird though on windows, there are so many variants
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
TEttinger nice!
which msvc :)
FROGGS other environments need to be ticketed I'd say
2012 express IIRC
17.0 or so
TEttinger there's an open bug I was asked to post re 2015 community not working
2013 works though 12:24
(also community)
FROGGS TEttinger: yes, I'll look into the MSVC-2015 sooner or later
RabidGravy I may dig out the windows machine and give openwatcom a try - if nothing else it will fail to compile quickly ;-)
TEttinger oh my god, community is so much nicer than express. they added so many former-pro features
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
lets you click a function/method name to see its source 12:26
FROGGS nice
TEttinger I'm really enjoying atom as an editor though for perl. nice and simple 12:27
psch hm, use statements might turn out rather complicated with how i've set up stuff atm though 12:28
12:28 amurf joined, brrt joined 12:33 amurf left
tadzik FROGGS: yeah, that's a fun idea :) 12:33
dalek rl6-roast-data: 03c7dc6 | coke++ | bin/git.p5:
Start pulling panda

Will need for Inline::Perl5 tests
12:34
tadzik heh. "My item generator for an RPG was too slow, so I became a compiler contributor"
flawless logic
dalek ast: af92bda | hoelzro++ | S26-documentation/why- (3 files):
post constraints on parameters should'nt affect a sub's declarative docs
12:35
kudo/nom: 7fbd54a | hoelzro++ | src/Perl6/Actions.nqp:
Prevent parameters in post constraint subs from clobbering PRECEDING_DECL

  ...which prevents trailing comments from getting attached to the routine
Fixes RT #125253
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125253
dalek pan style="color: #395be5">perl6-examples: 3ba4aa9 | andreoss++ | categories/euler/prob054-andreoss.pl:
[euler] problem 54 bug fix
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
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?
psch RabidGravy: that's what Process.pm uses for $*USER
... :)
RabidGravy yeah
psch i wonder if setting $*USER to something Failure-y in that case makes sense 12:38
RabidGravy possibly, it would be nicer if it didn't have to shell out to do it at all 12:39
12:42 andreoss` left
jnthn RabidGravy: Do you wnat me to fix the isa-ok, or give you a commit bit so you can? :) 12:43
12:43 atroxaper joined
RabidGravy jnthn, whichever works better for you, I'm just sitting here waiting for some building materials 12:43
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␤␤»
RabidGravy that's a bit odd
jnthn RabidGravy: What's your github id? :) 12:46
RabidGravy jonathanstowe
masak m: say ?$*USER
camelia rakudo-moar bcf38c: OUTPUT«True␤»
nine FROGGS: what's keeping moarvm from building on Hurd?
masak m: say $*USER.^name 12:47
camelia rakudo-moar bcf38c: OUTPUT«IdFetch␤»
jnthn RabidGravy: Added
nwc10 is there an equivalent of s/foo/bar/r in Perl 6?
itz github.com/jnthn/oo-monitors/pull/5
lizmat S/foo/bar/ ?
12:47 atroxaper left
masak the stringification methods in IdFetch assume that it's an instance object, not a type object. 12:48
method Str { return Nil unless fetch(); ~PROCESS::{$!name} }
lizmat masak: will fix
hoelzro morning #perl6 12:49
nine nwc10: "foobar".subst(/foo/, "bar");
RabidGravy itz, just seen and merged ;-)
there that was easy
itz ty
12:50 aborazmeh joined, aborazmeh left, aborazmeh joined
jnthn lizmat: For the 3weekly, can link to my "what I did" blog post :) 12:50
nwc10 nine: thanks. and then globally?
I can't work out where to put the :g
jnthn lizmat: And maybe mention the most exciting things.
lizmat jnthn: already in there :-)
jnthn nwc10: S:g
lizmat ah, the most exciting things such as?
FROGGS nine: libuv
masak lizmat: I would file an RT about it, but I'm a bit busy at the moment.
lizmat masak: no need, fixing as we speak 12:51
masak nodnod
jnthn lizmat: I dunno, look at the headlines of the post and see what excites you :D
nine nwc10: "foofoobar".subst(/foo/, "bar", :g);
nwc10: doc.perl6.org/type/Str#method_subst
masak would be interesting to make a setting-wide search for other Str/gist/Numeric methods that assume instance-hood.
lizmat jnthn: ah, that way... hmmm....
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
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
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 :)
And to libuv along the way :)
*do
nwc10 lets just say that I can write the joke fairly easily in Perl 5:
perl -C7 -le 'print "Unicode" =~ s/./$&\x{0307}/rg;'
FROGGS jnthn: :P
nwc10 oh, hanogn, 0x0308
I fail :-)
12:54 [Sno] joined
masak nwc10: neat :) 12:54
how to do that in Perl 6?
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.
jnthn masak: I think TimToady put it in recentlyish
lizmat f4e4de2e9907368aa04be1f to be precise 12:56
moritz m: say 'Unicode'.subst(:g, /./, -> $/ { "$/\c[COMBINING DOT ABOVE]" })
camelia rakudo-moar 7fbd54: OUTPUT«U̇ṅi̇ċȯḋė␤»
masak lizmat: thanks.
moritz: cool. nwc10++'s had two dots above, though. 12:57
a... "diaresis", I guess.
moritz m: say 'Unicode'.subst(:g, /./, -> $/ { "$/\c[COMBINING DIAERESIS]" })
camelia rakudo-moar 7fbd54: OUTPUT«Ün̈ïc̈öd̈ë␤»
moritz my terminal doesn't print the diaeresis above the n and c
masak oh, S/foo/bar/ is in Rakudo but not in the spec yet. 12:58
moritz: looks fine here.
jnthn m: say [~] 'Unicode'.comb >>~>> "\c[COMBINING DIAERESIS]"
camelia rakudo-moar 7fbd54: OUTPUT«Ün̈ïc̈öd̈ë␤»
jnthn m: say chars [~] 'Unicode'.comb >>~>> "\c[COMBINING DIAERESIS]"
camelia rakudo-moar 7fbd54: OUTPUT«7␤»
jnthn \o/
masak aha, TimToady++ notes it as a "to play with" feature...
12:59 Khisanth left
masak the patch is literally two lines changing <3 12:59
13:01 Khisanth joined
jnthn m: say uniprop 0x9FCD, 'Script' 13:12
camelia rakudo-moar 7fbd54: OUTPUT«Unknown␤»
FROGGS .u 0x9FCD 13:13
yoleaux No characters found
13:13 andreoss` joined
jnthn .u 9FCD 13:15
yoleaux No characters found
jnthn .u horns
yoleaux U+1F608 SMILING FACE WITH HORNS [So] (😈)
masak go FreeBSD!
itz ha 13:16
13:17 aborazmeh left 13:18 Celelibi left
hoelzro I was just playing around earlier, and I noticed that unlinking a non-existent file returns True; is that intentional? 13:19
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
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?
dalek ast: 4cabf2d | jnthn++ | S05-mass/properties-derived.t:
De-fragile <:Ideographic> tests.

Unicode sometimes adds more to the range, so picking one off the end to test "not an ideograph" puts the test at risk of failing for no good reason in future versions of Unicode. This is the case when going from Unicode 7 to Unicode 8, which does all more ideographs.
13:23
masak hoelzro: not if you ask me.
13:23 aborazmeh joined, aborazmeh left, aborazmeh joined
masak hoelzro: that would be a rather hollow success. 13:23
hoelzro I agree
masak hoelzro: what does Perl 5 of that case?
think*
hoelzro checks
returns falsy 13:24
dalek kudo/nom: e862714 | lizmat++ | src/core/Process.pm:
Make Str/Numeric/gist on $*USER/GROUP work ok

  masak++ for pointing out the error of my ways :-)
masak there you go :)
lizmat afaik, the problem lies deeper: 13:25
hoelzro: could you check if it does the same on the JVM?
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? :)
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)'
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␤ …»
masak m: sub foo($x) { say $x; state $y = 42; $y--; say $y; foo($x - 1) unless $x == 0; }; foo(1)
camelia rakudo-moar 7fbd54: OUTPUT«1␤41␤0␤40␤»
masak jnthn: that is correct.
lizmat hoelzro: hmmm.. seems to be the same on JVM
masak jnthn: but you probably implemented them :P 13:28
13:28 aborazmeh left
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.
jnthn Aye
masak m: for ^2 { sub foo { state $y = 42; $y--; say $y }; foo } 13:29
camelia rakudo-moar 7fbd54: OUTPUT«41␤41␤»
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, aborazmeh left, aborazmeh joined
jnthn ...but you could lift the state and get the smae thing and probably be more useful, so... :) 13:29
13:31 aborazmeh left
jnthn RT #125445 is today's first victim :) 13:32
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125445
13:33 AndChat|228864 joined
RabidGravy yay! I can lose an otherwise un-necessary try if you fix that ;-) 13:34
13:34 lolisa joined
lizmat hoelzro: as a datapoint: looks like nqp::unlink on the JVM returns either -2 (doesn't exist) or 0 (success) 13:34
on MoarVM, it appears to always return the filename
perhaps this *should* be rakudobugged :-) 13:35
hoelzro lizmat: I was just looking at that
hoelzro rakudobugs it
jnthn Turns out both of the guesses in the ticket about what was wrong weren't right :)
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⏏050␤ expecting any of:␤ dotty method or postfix␤»
lizmat jnthn: so what was it ?
itz hmm that should give an explicit version error I guess
hoelzro rakudobugged: RT #125463 13:40
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125463
hoelzro it seems MoarVM explicitly treats non-existence as success
13:43 bjz joined
dalek kudo/nom: d078782 | jnthn++ | src/Perl6/Metamodel/ (2 files):
Move .^can into MROBasedMethodDispatch role.

Before, it was only implemented in ClassHOW, meaning that other things that could do method dispatch missed out on having it. This fixes the lack of .^can on EnumHOW, but also means others using the role will get a .^can for free.
13:43
ast: 1eb6df0 | jnthn++ | S12-enums/thorough.t:
Tests for RT #1354250.
13:44
hoelzro I see that copy and rename support :createonly; does anyone else think that open() should have it as well?
masak buy a role, get a can for free!
m: role R { method foo {} }; say R.^can("foo")
camelia rakudo-moar 7fbd54: OUTPUT«Too many positionals passed; expected 2 arguments but got 3␤ in block <unit> at /tmp/j10w_YE3Qy:1␤␤»
masak m: class C { method foo {} }; say C.^can("foo") 13:45
camelia rakudo-moar 7fbd54: OUTPUT«foo␤»
masak are my assumptions wrong with the 'role R' code somehow?
lizmat masak: doesn't the role get punned into a class first ? 13:46
moritz masak: it's the old parametric role thingy again
lizmat hmmm... I guess not
dalek pan style="color: #395be5">perl6-examples: 264a2ba | (Steve Mynott)++ | htmlify.pl:
add database access section
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
(That was exactly the failure mode of enum values)
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")'
Too many positionals passed; expected 2 arguments but got 3
:-(
moritz masak: so several introspection methods return callables instead, which take the exact role candidate(?) as parameter
jnthn heh 13:50
Oh...of *course* roles don't do MRO-based method dispatch. Duh.
So this fix is irrelevant to them.
jnthn wonders what .^can on a role should do :)
I suspect .can works, though, by punning. 13:51
13:51 aborazmeh joined, aborazmeh left, aborazmeh joined
lizmat m: role R { method foo {} }; say R.can("foo") 13:52
camelia rakudo-moar e86271: OUTPUT«foo␤»
jnthn gets another RT nailed 13:54
lizmat jnthn++
jnthn m: class A { my $boo will leave { say "leaving boo" }; }
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␤»
jnthn m: my $boo will leave { say "leaving boo" };
camelia rakudo-moar e86271: OUTPUT«leaving boo␤»
jnthn m: { my $boo will leave { say "leaving boo" }; }
camelia rakudo-moar e86271: OUTPUT«leaving boo␤»
jnthn m: package A { my $boo will leave { say "leaving boo" }; } 13:55
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␤»
jnthn m: sub A { my $boo will leave { say "leaving boo" }; }
camelia ( no output )
jnthn hm, what on earth...
lizmat: "class lexical" is just a plain lexical, so I've no idea what's going on there that makes it not work out...
lizmat there is more oddness there:
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…»
lizmat huh?
dalek ecs/open-createonly: 87bd1b0 | hoelzro++ | S32-setting-library/IO.pod:
Add :createonly to valid named parameters for open()
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: gist.github.com/lue/6d18300a7316a47825b1
psch hrm, LibraryLoader throws WATs into my understanding... :/
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? :)
lizmat yesterday I was looking at the same ticket, and it just wouldn't fail
jnthn :S
I think I know why the phaser is bust though 13:58
13:59 araujo joined
lizmat m: my $a will final { say "foo" } = 42; say $a 14:00
camelia rakudo-moar e86271: OUTPUT«42␤»
lizmat there is a throw in the trait, that just doesn't get called
dalek kudo/nom: c81fdcb | jnthn++ | src/core/Str.pm:
substr-rw should tolerate assignment of non-Str.

Fixes RT #125402.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125402
lizmat m: my $a will foo { say "foo" } = 42; say $a
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…»
dalek ast: 424a9a1 | jnthn++ | S32-str/substr-rw.t:
Test for RT #125402.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125402
lizmat jnthn: OOC, why not STORE => sub ($, Str() $new ?? 14:03
jnthn lizmat: No reason 14:04
lizmat wouldn't that be fewer ops ?
14:05 skids joined
hoelzro jnthn++ # fixing bugs 14:05
jnthn lizmat: No; Str() compiles into exactly what I wrote, iirc
aha 14:06
nqp::bindattr($varvar, $Variable, '$!block', $*DECLARAND);
masak accidentally writes `fir @list` instead of `for @list`, and imagines a loop that somehow iterates on pinecones
lizmat fir sure! 14:07
14:07 andreoss` left
jnthn $*DECLARAND in the class body is not the block 14:07
That's the trait bug.
14:07 muraiki joined
jnthn ponders how to fix it 14:07
ShimmerFairy
.oO(@list[larch])
lizmat jnthn: would you mind if I change it to Str(), so as to be more idiomatic ? 14:09
14:09 yqt joined
jnthn lizmat: Feel free, just check it still passes the test :) 14:11
lizmat done that :-)
jnthn :)
lizmat otherwise I wouldn't have suggested it
dalek kudo/nom: 379ece6 | lizmat++ | src/core/Str.pm:
More idiomatic solution to RT #125402, jnthn++
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125402
jnthn lizmat++ 14:13
Think I figured out how to deal with the var trait in class body bug 14:14
14:15 Khisanth left, Khisanth joined 14:17 amurf joined 14:21 njmurphy joined
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:21 amurf left
jnthn That or a substr(Range) candidate...but maybe that's bad in some other wya 14:22
*way
Something feels a tiny bit off on :$to, but I can't really put my finger on it...
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?
masak I'd prefer the substr(Range) solution, I think.
hoelzro I'm good with substr(Range)
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
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?
masak moritz: that's just as wrong as 'foobar'.substr('f', 'b'), though 14:25
hoelzro commute &
moritz masak: I know; it's just that when one writes the code, proper error messages need to be generated 14:27
masak: and it's very easy to forget that ranges support non-Int endpoints too
masak yes; good point.
PerlJam guesses that .substr(Range) will also imply .substr-rw(Range)
colomon …. actually, is there any reason not to support substr('f'..'b') ? seems like it would be very easy to implement.
masak colomon: :/ 14:28
colomon: that goes against the idea of good ranges, though
PerlJam colomon: yes, it doesn't make any sense.
masak colomon: note that 'f'..'b' is empty
psch it's p5's flipflop, not a range
masak right, anyone who wants that functionality can .comb, .grep and ff 14:29
psch (to rephrase, "as a flipflop it makes sense to me, as a Range it doesn't) 14:30
masak++ for understanding anyway :)
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
basically, what can be done in p6 with role Pet { method noise() { ... } }
colomon hmmm? wouldn’t /(f.*?b)/ be the simple way to do it?
moritz muraiki: Moose (Moose::Role, specifically)
PerlJam muraiki: I thought Altreus gave you the answer: use Moo::Role; and C<requires>
masak colomon: yes, even easier. 14:31
moritz or yes, Moo instead of Moose
muraiki PerlJam: but then somebody said Moo::Role::requires doesn't actually do that :(
moritz: Moose is not something we can use at this time, unfortunately
14:32 atroxaper joined
muraiki well, it's not a huge deal. thanks guys 14:33
PerlJam muraiki: You should use Perl 6 instead ;) 14:34
muraiki PerlJam: that's the plan in the long run, but it's going to be a bit of a process, haha 14:35
we have a fairly large perl5 codebase and are working out how to integrate it with p6 without actually rewriting it
I was hoping to use Inline::Perl5 for much of that
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() )
lizmat hoelzro: I have no clue
muraiki but it seems we will need to call p6 from p5 more than p5 from p6 for quite some time
lizmat afk for some fresh air&
muraiki and I haven't played with how / if that works
moritz with Inline::Perl6, of course :-) 14:36
muraiki moritz: ok, that's something I didn't know about :)
14:36 atroxaper left
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
14:37 njmurphy left
ShimmerFairy masak: I think it's worth pointing out I still have that old S32::Str rewrite idea floating around :) gist.github.com/lue/9941658 14:37
muraiki PerlJam: thanks, that's good to know
14:39 vendethiel joined
muraiki PerlJam: Altreus was correct. this will let me make an interface. sorry for bothering perl6 about it also :) 14:43
masak ShimmerFairy: it's been too long. I remember you doing that, but I no longer remember the goal/purpose. 14:45
decommute &
moritz finds it hard to find changes in that document simply by eyeballing it 14:46
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 )
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:48
14:49 [Sno] left
ShimmerFairy I haven't changed my username on github because I haven't yet felt like dealing with the required additional changes :P 14:49
14:50 pyrimidi_ is now known as pyrimidine, [Sno] joined 14:51 brrt left 14:52 khw joined
PerlJam ShimmerFairy: once you do we'll probably forget that you were once lue :) 14:53
ShimmerFairy :)
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!"
dalek kudo/nom: 46caea2 | jnthn++ | src/Perl6/ (3 files):
Keep track of what code object we're in.

Variable traits need to know the currently surrounding code object. We cannot use $*DECLARAND safely for this, since that may not map to a code object at all. This doesn't fix much, it's just a refactor to allow a fix.
14:56
kudo/nom: db71bf4 | jnthn++ | src/Perl6/ (2 files):
Make package block code objects sooner.

This means they are available for variable trait application to use, thus fixing RT #125455.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125455
ast: 1f667d1 | jnthn++ | S04-declarations/will.t:
Test to cover RT #125455.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125455
psch ...i had been wondering where lue went. i wanted to ask whether abstruncate actually found any usage... :)
14:57 wara joined
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 kudo/attr-isrequired: 3ca77c1 | coke++ | src/core/Exception.pm:
Add a typed exception for required attributes
kudo/attr-isrequired: 70d7278 | coke++ | src/ (2 files):
Update build plan to deal with required attributes

Only say() something, don't yet fail
15:01 larion left
psch ShimmerFairy: 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:03 domidumont left
[Coke] jnthn: do you have a minute to tell me where I'm going wrong in that branch? (attr-isrequired) 15:05
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:06
15:06 skids left, AndChat|228864 is now known as JimmyZ_ 15:07 smls joined
dalek blets: 6eadfa9 | lichtkind++ | docs/appendix- (3 files):
added set ops
15:07
15:10 wara left 15:14 diana_olhovik left 15:15 sqirrel joined
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.
jnthn [Coke]: Taking a look while I spectest a fix :) 15:17
[Coke] Thanks! Happy for any feedback. 15:18
15:19 lolisa left, Ven_ joined 15:22 Ven left
jnthn [Coke]: Did you check if the code in create_BUILDPLAN is really being run? 15:23
[Coke]: Oh, there's also one problem
You correctly ues nqp::bindattr_i
But your required accessor uses nqp::getattr 15:24
Needs to be nqp::getattr_i
dalek kudo/nom: 6f8d25b | jnthn++ | src/Perl6/Grammar.nqp:
Catch undeclared symbol use in 'is' trait.

Fixes RT #125228.
15:26
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125228
dalek ast: b30e373 | jnthn++ | S32-exceptions/misc.t:
Test to cover RT #125228.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125228
[Coke] cargo culted from 2 different spots, probably. (_i vs. not)
fixing, rebuilding, testing...
... damn. that seems to be it. :) 15:27
15:27 zakharyas left
[Coke] now I get no say's during the build, and I get one running the sample code. 15:28
PerlJam Coke++
[Coke] Is the approach for doing this sane?
jnthn [Coke]: yes
15:28 skids joined
dalek kudo/attr-isrequired: 49a2021 | coke++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
need to use _i consistently.

  jnthn++
15:28
jnthn Though the create_BUILDPLAN bit may want a closer look wrt inheritance.
(I didn't look closely enough; I suggest writing tests and seeing if they work out.)
[Coke] Agreed, needs tests. 15:30
15:34 skids left, aborazmeh left
Ven_ "+ <.explain_mystery> <.cry_sorrows>" hahaha 15:36
[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
[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
??
[Coke] seems reasonable, PerlJam. 15:47
moritz [Coke]: pre-declare with class X::Attribute::Required { ... };
[Coke] moritz: Same error.
checking for typos...
15:48 cognominal joined
[Coke] ... something fixed it. 15:49
moritz \o/
[Coke] gist.github.com/coke/7e2a922affbd88046222 15:50
Surely needs some tweaking.
15:50 itz left
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
[Coke] ah, I already have that available as well. 15:51
(I think)
jaffa4 Hi all
what is laceholder variable '@_' cannot override existing signature?
|Tux| gist.github.com/Tux/7fef7af3b56481f83442 <= what is wrong with the +> 64 ???
15:51 sqirrel left
moritz jaffa4: you can't mix a signature with @_ 15:52
dalek kudo/attr-isrequired: b66a0ac | coke++ | src/core/Exception.pm:
Make this a MOP exception

  PerlJam++
kudo/attr-isrequired: 1955a5a | coke++ | src/core/Mu.pm:
Throw a typed exception for empty reqd parameter
jaffa4 Why not?
moritz jaffa4: because they contradict each other 15:53
PerlJam jaffa4: you can do it if you declare @_ as part of the sig.
[Coke] so, first bug, once you declare is required, you always get the error. :)
moritz a signature specifies exactly what arguments are allowed; @_ means "don't validate, gimme everything in here" 15:54
[Coke] heads out for lunchies.
dalek osystem: ecf9cc4 | (Anthony Parsons)++ | META.list:
Add BufUtils
15:55 yqt left
jaffa4 I see 15:57
timotimo [Tux]: have you tried it with Int, too? 15:59
|Tux| try it yourself to hit issue RT#124082 :) 16:00
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124082
timotimo er, wait
hoelzro is List.sort stable?
timotimo you're right, it's kinda weird :)
because if you +> -64 it turns it into an Int, apparently
16:00 gfldex joined
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.
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.
jaffa4 Do you remember who you give advice to?
|Tux| timotimo, is this worth RT'ing? 16:02
timotimo i think so, yeah
hm, wait
if we bitshift to the right in a two's complement 16:03
i *think* we expand with the sign bit
don't we?
hoelzro o/ pmichaud
timotimo otherwise -big_num shifted slightly to the right would end up as a positive number
so if we bit-shift far to the right, at some point we'll end up with 0b11111...1111, which is -1
even if we have an Int
16:04 Ven_ left
pmichaud for some reason I'm not a fan of "Tuple". Maybe because of Python; worried about a false correspondence there. 16:05
16:05 skids joined
|Tux| rt.perl.org/Ticket/Display.html?id=125466 16:05
timotimo [Tux]: the WHAT you give there seems absolutely correct to me 16:07
jaffa4 does qw exist in Perl?
does qw exist in Perl6?
timotimo jaffa4: yeah, it's now < ... >
m: say <foo bar baz>.perl
camelia rakudo-moar 6f8d25: OUTPUT«("foo", "bar", "baz")␤»
jaffa4 can I can change the separator?
tony-o_ DrForr: Data::Dump is handling that .ast in ABNF a lot better now
jnthn m: say nqp::bitshiftr_i(int.Range.max, 64)
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:…»
timotimo the separator for what splits between the < and > ?
jnthn m: use nqp; say nqp::bitshiftr_i(int.Range.max, 64) 16:08
camelia rakudo-moar 6f8d25: OUTPUT«9223372036854775807␤»
jaffa4 no something instead of <?
timotimo oh
yeah
m: say q:w{hello how are you}.perl
camelia rakudo-moar 6f8d25: OUTPUT«("hello", "how", "are", "you")␤»
|Tux| timotimo, how can a sign change on a bitshift if *all* other shifts retain the sign?
timotimo oh
jnthn In MoarVM this is implemented as:
timotimo well, that's a good point :)
jnthn OP(brshift_i):
GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 >> GET_REG(cur_op, 4).i64;
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
timotimo OP(blshift_i):
GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 << GET_REG(cur_op, 4).i64;
same for that
jnthn The sign change is easily explained.
timotimo so i wonder why the blshift doesn't protect the sign bit?
16:09 nys joined
timotimo if it expands the sign bit when right shifting 16:10
jnthn Good question.
timotimo well, that's now a "C semantics" question :) 16:12
and when you use "int" and friends, you opt in to get C semantics
jnthn msdn.microsoft.com/en-us/library/f96c63ed.aspx goes into the semantics
|Tux| suggests perl6 to be more consistent than C and *define* the behavior :P
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."
PerlJam Tux++ (Perl is better than C after all :) 16:13
|Tux| www.nntp.perl.org/group/perl.perl5....28842.html <= start there. it is a good read!
jnthn Well, it's a trade-off, ain't it.
The C semantics probably compile into something that hardware can do very fast. 16:14
16:14 Khisanth left
jnthn Which is probably why you were using native types in the first place. 16:14
|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
jnthn What *isn't* usable? 16:16
moritz |Tux|: if you use Int, you need no .max and .min
because it's unbounded
|Tux| indeed, that's why
16:16 spider-mario joined
dalek ecs: 41876e9 | pmichaud++ | S07-glr-draft.pod:
Add suggestions from nine++ and smls++ (Tuple)
16:16
|Tux| I had two situations where I needed a max other than Inf
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␤␤»
timotimo the bad thing about int.Range.min/max is that you get overflows :S
dalek kudo/nom: 58f73af | jnthn++ | src/Perl6/Actions.nqp:
Make type parameterization fails give location.

Fixes lack of line/file reported in RT #125259.
16:18
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125259
dalek kudo/nom: 6ee5ab2 | jnthn++ | src/core/Exception.pm:
Remove dead line of code.
ast: dbd7e0b | jnthn++ | S32-exceptions/misc.t:
Add test for RT #125259.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125259
|Tux| jnthn, *that* is why I think it is unusable
16:18 TimToady joined
timotimo well, what do you expect? :D 16:18
m: my Int $foo = 10 ** 1000000000; say $foo
|Tux| I do expect Inf of type Int
timotimo poor camelia %) 16:19
camelia rakudo-moar 6f8d25: OUTPUT«(timeout)»
timotimo m: my Int $foo = 2 ** 1000000000; say $foo
16:19 lichtkind joined
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 :)
camelia rakudo-moar 6f8d25: OUTPUT«(timeout)» 16:20
timotimo m: my Int $foo = 2 ** 10_000; say $foo
camelia rakudo-moar 6f8d25: OUTPUT«1995063116880758384883742162683585083823496831886192454852008949852943883022194663191996168403619459789933112942320912427155649134941378111759378593209632395785573004679379452676524655126605989552055008691819331154250860846061810468550907486608962488809048…»
timotimo m: my Int $foo = 2 ** 100_000; say $foo
camelia rakudo-moar 6f8d25: OUTPUT«9990020930143845079440327643300335909804291390541816917715292738631458324642573483274873313324496504031643944455558549300187996607656176562908471354247492875198889629873671093246350427373112479265800278531241088737085605287228390164568691026850675923517914…»
16:20 uncleyea1 joined
timotimo m: my Int $foo = 2 ** 500_000; say $foo 16:20
camelia rakudo-moar 6f8d25: OUTPUT«9950204133230583250182153199035000493996412368610568299341735567697199777503805109840518750919271874746934926830782113083063044247496193791733276073687496102094885226488572470519892885098271996650894821994490220271960353562925664955436047785274565141640139…»
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?
yoleaux 06:33Z <moritz> lichtkind: I found nothing wrong with the tablets.perl6.org cron job; please supply a more precise error description
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.
nine timotimo: 500_000 bits is still > 150K decimal places
timotimo nine: it's still not an infinitely big number!
jnthn I don't see one on the horizon. 16:22
16:22 Ven joined
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
timotimo nine: camelia abbreviates with … after a bunch of chars 16:23
so all we need to do is figure out the "topmost" chars of the infinite number
16:23 larion joined, abraxxa left
timotimo obviously they all have to be 9 :P 16:24
nine 10 ** Inf is a clear case
16:25 Khisanth joined, raiph joined
timotimo 10 ** -Inf is also easy :) 16:26
|Tux| m: say 2 +< int.Range.max
camelia rakudo-moar 6f8d25: OUTPUT«0␤»
|Tux| correct?
timotimo well, both are "int"
int.Range.max is surely above the width of a 64bit register
so undefined behavior 16:27
|Tux| m: say 2 +< 128
camelia rakudo-moar 6f8d25: OUTPUT«680564733841876926926749214863536422912␤»
timotimo m: say Int(2) +< int.Range.max
camelia rakudo-moar 6f8d25: OUTPUT«0␤»
timotimo m: say Int(2) +< Int(int.Range.max)
camelia rakudo-moar 6f8d25: OUTPUT«0␤»
timotimo huh.
|Tux| indeed. a lot of inconsistencies
jnthn Uh, there was no declared int variable in "2 +< int.Range.max" so it shoulda gone with big int semantics there.
|Tux| I bet you lot work out the best.
FROGGS lichtkind: no 16:28
|Tux| goes home and leaves you all to play
jnthn So that one we shouldn't be calling out as "what C says"
16:29 FROGGS left 16:31 cognominal left
timotimo how do we define an operator to have chain associativity? 16:34
the semi-obvious "is assoc('chain')" doesn't work :( 16:35
oh
it has to be "is prec('chain')" or something
actually ... 16:36
apparently it's gotta be prec({ prec => "m=", assoc => "chain", iffy => 1, pasttype => chain }) 16:37
and that still doesn't make it work >_> 16:38
we probably want to have something simpler for that so that users can build their own chaining infix ops
oh 16:44
those are possibly meant to be keyword arguments?
nope
jaffa4 When are you planning to release next rakudo start?
start..
-> star
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!␤»
timotimo jaffa4: this month's release seems like a good candidate to build a new star with
jaffa4 So?
16:47 larion left
timotimo i'm not the one who decides that. except if i go ahead and just build one ... 16:47
jaffa4 who is the decision maker? 16:50
timotimo if somebody makes it, they have decided for it 16:51
if nobody does it, everybody has decided against it
16:51 mikemi joined
DrForr tony-o_: Nie. 16:52
16:52 mikemi left, mikeage joined
tony-o_ DrForr: was that more along the lines of what you were looking for? 16:53
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 16:58 qwebirc188454 joined
DrForr Yes, excellent. 16:58
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:01 JimmyZ_ left 17:02 dakkar left
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:04
17:05 [Sno] left, [Sno] joined
tony-o_ DrForr: you can pass ':color(False)' to Dump 17:06
i should add that to the readme
DrForr Ah, excellent. 17:07
jnthn m: use Test; throws-like 'my $rt125376 = Sub.bless; say $rt125376', Exception 17:08
camelia rakudo-moar 6ee5ab: OUTPUT«(signal SEGV) 1..2␤»
jnthn m: use Test; throws-like 'Sub(0)', Exception
camelia rakudo-moar 6ee5ab: OUTPUT«(signal SEGV) 1..2␤»
dalek p: 0cb8562 | jnthn++ | tools/build/MOAR_REVISION:
Bump to latest MoarVM.
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.
dalek kudo/nom: 2ec5634 | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for latest MoarVM.

Includes Unicode 8 support along with fixes for a couple of SEGVs.
17:11
tony-o_ the failure thing comes from not being able to access the value of that key from the hash
DrForr Not questioning the ode... Ah. No problem, introspection thing.
dalek ast: d2eddcc | jnthn++ | S06-other/misc.t:
Further RT #125376 tests.
17:12
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125376
tony-o_ yea, i'm sure there is another way to get the value when it fails but i'm still looking for alternatives
DrForr No problem, I'm still happy to get indented output that doesn't induce eyestrain.
17:16 mikeage left
jnthn lizmat: The Unicode 8 support is available from Rakudo HEAD, if you want to mention it in the w33kly :) 17:16
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:17
jnthn It's a constant battle between compiler engineering to make it faster and built-in development adding stuff :) 17:18
17:20 espadrine left
jnthn dinner & 17:23
17:25 domidumont joined
jaffa4 I got his message without line number... Cannot look up attributes in a type object 17:25
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);␤»
jaffa4 rakudo: print (q:q (hello channel));
camelia rakudo-moar 6ee5ab: OUTPUT«===SORRY!===␤Cannot look up attributes in a type object␤»
DrForr jaffa4: File a rakudobug?
17:27 ChristopherBotto left 17:28 yqt joined
jaffa4 Is that supposed to work? 17:29
timotimo it's not supposed to give such a bad error, in any case
dinner time \o/ 17:30
DrForr jaffa4: It's supposed to return a line number, yes. Feel free to file a bug.
jaffa4 How do I quote by the way? 17:31
tony-o_ m: print 'hello world';
camelia rakudo-moar 6ee5ab: OUTPUT«hello world»
jaffa4 in a more sophisticateed way
DrForr Sophisticated? I suppose you could use guillemots, those are French and supposedly sophisticated-looking... 17:34
q<<foo>> (where << >> are quillemots,not the ASCII equiv)
tony-o_ m: say Buf.new(0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64).decode("utf8");
camelia rakudo-moar 6ee5ab: OUTPUT«hello world␤»
ugexe hmm didnt someone bring up the q:q() bug re: parens the other day?
17:35 cognominal joined
tony-o_ m: say ‘sophista quotes’ 17:36
camelia rakudo-moar 6ee5ab: OUTPUT«sophista quotes␤»
lizmat jnthn: added to the P6W draft, any particular new codepoints I should mention? 17:37
afk again for some Andreas trembling&
jnthn lizmat: SIGN OF THE HORNS
.oO( Why is she making Andreas tremble? )
tony-o_ m: say q«this is a quoted str».perl
camelia rakudo-moar 6ee5ab: OUTPUT«"this is a quoted str"␤»
tony-o_ jaffa4: to answer your question ^ 17:38
lizmat jnthn: www.imdb.com/title/tt2126355/
CIAvash How can I put 'where' constraints on optional parameters? 17:39
tony-o_ surprisingly not a terrible movie
jnthn lizmat: aha :)
tony-o_ CIAvash: what do you mean by where constraints?
jnthn really away for dinner :)
flussence m: sub foo(Int $bar where * > 50 = 0) { ... } 17:40
camelia ( no output )
tony-o_ as in, only optional sometimes?
ugexe m: sub foo(:$x where ($_ eq 1)) { say "OK" }; foo(1)
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␤␤»
ugexe m: sub foo(:$x where ($_ eq 1)) { say "OK" }; foo(x => 1)
camelia rakudo-moar 6ee5ab: OUTPUT«OK␤»
flussence m: sub foo(Int $bar where * > 50 = 0) { $bar }; foo()
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 Ven left
tony-o_ he wants the constraint on $var? 17:40
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:41 domidumont left
tony-o_ m: sub foo(Int $foo?) { 'yo'.say; }; foo; 17:42
camelia rakudo-moar 6ee5ab: OUTPUT«yo␤»
CIAvash tony-o_: I did that too and it gives error when you call the function without any parameters 17:44
tony-o_ m: sub foo(Int $foo? where { "check".say; * > 50; }) { 'yo'.say; }; foo; 17:45
camelia rakudo-moar 6ee5ab: OUTPUT«check␤yo␤»
tony-o_ m: sub foo(Int $foo? where { $_.say; $_ > 50; }) { 'yo'.say; }; foo;
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␤␤»
tony-o_ m: sub foo(Int $foo? where { $_.perl.say; $_ > 50; }) { 'yo'.say; }; foo;
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
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␤␤»
tony-o_ m: sub foo(Int $foo? where { !$_.defined || ($_.defined && $_ > 50); }) { 'yo'.say; }; foo; 17:48
camelia rakudo-moar 6ee5ab: OUTPUT«yo␤»
tony-o_ m: sub foo(Int $foo? where { !$_.defined || ($_.defined && $_ > 50); }) { 'yo'.say; }; foo(25);
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␤␤»
tony-o_ m: sub foo(Int $foo? where { !$_.defined || ($_.defined && $_ > 50); }) { 'yo'.say; }; foo(51);
camelia rakudo-moar 6ee5ab: OUTPUT«yo␤»
tony-o_ CIAvash: ^^
ugexe m: sub foo(Int $foo?) { 'yo'.say; }; foo; # this *isnt* calling the function with any parameters
camelia rakudo-moar 6ee5ab: OUTPUT«yo␤»
tony-o_ he still wants to constrain when a parameter is passed, checking for defined'ness in the 'where' works 17:49
ugexe there are better ways to accomplish that. protos/multi dispatch for instance 17:51
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
CIAvash tony-o_: I reached a similar solution but I thought there should be a better way 17:54
17:55 amurf joined
tony-o_ CIAvash: the method ugexe and flussence did above with multi's is the way i'd go with it 17:55
17:59 amurf left, Ven left, smls left
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:03
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?
flussence test for definedness
muraiki I found info on doing watching a file as a supply, but not actually reading it... 18:08
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
CIAvash flussence: didn't know about them! Are they explained in the documentation? 18:10
18:10 atroxaper joined
muraiki ugexe: thanks! 18:10
DrForr tony-o_: Slight nitpick - Redundant commas at the end of array/hashes. Not a big thing, just pointing out. 18:11
jaffa4 How am I supposed to use sygnals in Perl6? 18:12
18:13 yqt left
flussence CIAvash: it's kind of hard to find anything for those, but there's a list of the recognised ones at design.perl6.org/S06.html#Parameter...onstraints 18:13
18:13 gtbjj joined 18:14 atroxaper left
TEttinger .u horns 18:14
yoleaux U+1F608 SMILING FACE WITH HORNS [So] (😈)
TEttinger .u sign horns
yoleaux No characters found
TEttinger .u sign of
yoleaux No characters found
TEttinger hm
CIAvash and one last question, how can I add a default value when using the 'where' block? 18:15
timotimo we do have something that gets you lines from a file asynchronously as channels 18:17
ugexe (did you mean "...where * > 3 = 1 "?) 18:18
except that doesnt actually set the value to 1
timotimo hmm
i'm not sure it's actually exposed, though
ugexe you are thinking of Proc::Async char/byte_supply i think 18:19
timotimo no
CIAvash ugexe: yes
timotimo we had something at some point on the jvm
ugexe CIAvash: that was a compiler error message that seems wrong
timotimo yeah, rakudo-j has a IO::Async::File 18:20
and that has async slurp, async spurt and async lines
seems like nobody ported it to moarvm yet
ugexe i looked for IO::Async in the rakudo repo but didnt see it :o 18:21
jaffa4 ugexe: what does that mean? 18:23
timotimo right, it's under src/vm/jvm/core/
ugexe m: sub foo($bar where (* > 3) = 1 ) { $bar.say; }; foo(4) 18:25
camelia rakudo-moar 2ec563: OUTPUT«4␤»
18:26 telex left
jaffa4 would not rakudo version work under moarvm? 18:26
18:26 telex joined
CIAvash ugexe: I ran it on my computer and it gave this error: 18:28
Cannot modify an immutable WhateverCode
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␤␤»
ugexe setting a default value makes it optional 18:30
tony-o_ m: sub foo($bar where { $_ = 1} ) { $bar.say; }; foo(50);
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␤␤»
ugexe CIAvash: whats the output from your `perl6 -v`
the compiler already hints at the syntax: (did you mean "...where * > 3 = 1 "?). It just doesnt work as expected 18:31
jaffa4 What is wrong with this for sort keys %($rexpansion) -> $abbrev {? 18:32
18:33 broheim joined
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 { }␤»
ugexe m: my @a = 1,2,3,4; for @a.hash.sort -> $k, $v { say $k; say $v; }
camelia rakudo-moar 2ec563: OUTPUT«1 => 2␤3 => 4␤»
geekosaur that looks perl5-y
colomon jaffa4: is $rexpansion a Hash?
jaffa4 I guess so
colomon it isn’t in your sample code up there, it’s an Array (or maybe a List) 18:35
ugexe its inside a %()
colomon m: my $s = <h q a>; for sort keys %($s) { .say }
camelia rakudo-moar 2ec563: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at /tmp/7ki5p12ubO:1␤␤»
jaffa4 rakudo: my %s = <h q a b>; for sort keys %($s) -> $abbrev { }
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 { }␤»
tony-o_ m: my @a = 1,2,3; for @a.hash.sort <-> $k, $v? { "$k => $v".say; }
camelia rakudo-moar 2ec563: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at /tmp/kvRRXfab8V:1␤␤»
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)
jaffa4 rakudo: my $s = <h q a b>; for sort keys %($s) -> $abbrev { } 18:36
camelia ( no output )
tony-o_ m: my @a = 1,2,3; for @a.sort <-> ($k, $v?) { "$k => $v".say; }
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␤␤»
ugexe m: my @a = 3,4,0,1; for @a.hash.sort -> $k, $v { say $k; say $v; }
camelia rakudo-moar 2ec563: OUTPUT«0 => 1␤3 => 4␤»
tony-o_ whatever
CIAvash ugexe: jnthn: just updated moarvm, now it works.
jnthn :)
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
dalek rl6-roast-data: c3e015a | coke++ | / (9 files):
today (automated commit)
18:39
18:40 muethos joined, gtbjj left 18:41 larion left 18:43 FROGGS joined
TEttinger jnthn: how long do you think it took to add Unicode 8.0 support? 18:44
18:44 Vlavv joined
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
DrForr Trailing, I'll check to make sure I saw what I saw in a sec.
tony-o_ DrForr: there are trailing commas for sure 18:47
wouldn't be difficult to get rid of them, just tedious, i'll do that tonight 18:48
[Coke] (rakudo star) still blocking, sfaik, on module installation based on a panda change from months ago. 18:49
18:52 bin_005 joined
tony-o_ flussence: re-'stage parse', is that 64s for moar or jvm? 18:52
18:52 smls joined
flussence that's moar 18:53
18:53 qwebirc188454 left
smls jnthn: Looks like Grammar::Debugger can't be installed on r-m nom/master due do test falures... 18:54
"Invocant requires a 'Failure' instance, but a type object was passed. Did you forget a .new?"
jnthn smls: I don't think I wrote any tests. :)
smls: I think they were contributed later. So I'd have to do as much as anyone else to get into them :) 18:55
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
*way were
smls jnthn: Apparently the test is just a simple lives-ok: github.com/jnthn/grammar-debugger/...debugger.t
18:57 uncleyea1 is now known as uncleyear, uncleyear left, uncleyear joined
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
I was thinking of using a regex match but that seems overkill
smls jnthn: Also, I get the same error when cloning the repo and running 18:58
perl6 -I ./lib -MGrammar::Debugger -e '(grammar { token TOP { a } }).parse("a")'
ugexe $string.chomp if $string.ends-with(',') maybe
jaffa4 this caused a probelem my $os = (@_) ?? shift !! Win_OS_Type();
nine m: my $string = 'foo,bar,'; $string.chop(1) if $string.ends-with(','); $string.say; 18:59
camelia rakudo-moar 2ec563: OUTPUT«foo,bar,␤»
muraiki ugexe: I didn't know about ends-with, thanks! chomp didn't take out the comma though
nine m: my $string = 'foo,bar,'; $string.chop if $string.ends-with(','); $string.say; 19:00
camelia rakudo-moar 2ec563: OUTPUT«foo,bar,␤»
nine m: my $string = 'foo,bar,'; say $string.chop if $string.ends-with(','); $string.say;
camelia rakudo-moar 2ec563: OUTPUT«foo,bar␤foo,bar,␤»
muraiki oh, chop! thanks so much :)
ok, next time I will look at the string methods first. that should have been obvious. 19:01
[Coke] stage parse: 31.419
pmichaud m: my $string = 'foo,bar,,,,'; $string.chop while $string.ends-with(','); $string.say; # checking
jnthn smls: Heh, guess the test was good at flagging up the failure then :)
tony-o_ Stage parse : 28.589
camelia rakudo-moar 2ec563: OUTPUT«(timeout)» 19:02
jnthn pmichaud: .=chop
[Coke] tony-o_: pi*10, though.
FROGGS wow, 28s is faaaaast
[Coke] oh, crap, it's not!
pmichaud m: my $string = 'foo,bar,,,,'; $string.=chop while $string.ends-with(','); $string.say; # checking
camelia rakudo-moar 2ec563: OUTPUT«foo,bar␤»
pmichaud jnthn++
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]
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>…»
moritz m: say ('foo,bar....', *.chop ... !*.end-with('.'))[*-1]
camelia rakudo-moar 2ec563: OUTPUT«Method 'end-with' not found for invocant of class 'Str'␤ in whatevercode at /tmp/gRobXx82au:1␤␤»
moritz m: say ('foo,bar....', *.chop ... !*.ends-with('.'))[*-1]
camelia rakudo-moar 2ec563: OUTPUT«foo,bar␤»
tony-o_ [Coke]: needs s/9$/5/
jnthn pmichaud: SP3?
pmichaud Surface Pro 3
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
moritz Perl "you don't need to write that loop yourself" 6
tony-o_ lol
DrForr SP3 is rootable? Herm.
pmichaud since my 2009 laptop only has VGA output, and the conference seemed to want HDMI everywhere :)
SP3 is not only rootable, but Kubuntu installed on it without having to do any BIOS changes. 19:05
tony-o_ DrForr: sure enough.
ugexe m: say "a,b,c,d,," ~~ /<alpha> *%% ","/
camelia rakudo-moar 2ec563: OUTPUT«「a,b,c,d,」␤ alpha => 「a」␤ alpha => 「b」␤ alpha => 「c」␤ alpha => 「d」␤»
pmichaud I didn't even have to disable "secure boot"
tony-o_ oh nice
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
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
tony-o_ ah ^ , that was the one thing i was surprised worked out of the box for me
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. :)
DrForr There was one hiding under the podium in my room.
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
19:08 muethos left
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␤␤»
nine ^^^ bug?
pmichaud Stage parse : 46.855 # desktop
Stage parse : 32.427 # SP3
flussence possible workaround: carry a RPi around, stream VGA laptop's screen to it :)
tony-o_ my 28s is an imac 19:09
19:09 muethos joined
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
flussence 6, actually...
DrForr 44s on VBox on a dual-core i5 here.
smls Yeah, looks like it fails when it gets $name = "!cursor_init"
flussence iirc on my netbook (32-bit Atom) it takes roughly 5 minutes... 19:10
tony-o_ they made laptops with atom procs?
pmichaud so, I'm curious about reactions to the names for Parcle/List/Tuple types in GLR
*Parcel
ugexe oooh fixing grammar debugger++
pmichaud anyone have any strong preferences?
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
vendethiel pmichaud: a name for the base-type immutable list"?
nine m: my @a = 1, 2; my @b = <1 2>; for @a Z @b -> $a, $b { }
camelia ( no output )
jnthn I'll have to look more closely at that; got another packing errand to do first...
nine m: my @a = 1, 2, 3, 4; my @b = <1 2 3 4>; for @a Z @b -> $a, $b { }
camelia ( no output )
pmichaud vendethiel: yes; more directly: what to call the base list types
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; }
camelia rakudo-moar 2ec563: OUTPUT«1 1 Z 2 2␤3 3 Z 4 4␤»
tony-o_ m: for (1,2,3,4) Z (1,2,3,4) -> ($a, $b) { "$a Z $b".say; }
camelia rakudo-moar 2ec563: OUTPUT«1 Z 1␤2 Z 2␤3 Z 3␤4 Z 4␤»
nine m: for (1,2,3,4) Z (1,2,3,4) -> ($a, $b) { "$a Z $b".say; }
camelia rakudo-moar 2ec563: OUTPUT«1 Z 1␤2 Z 2␤3 Z 3␤4 Z 4␤»
tony-o_ nine: is the ($a, $b) more what you're looking for?
nine m: for (1,2,3) Z (1,2,3) -> ($a, $b) { "$a Z $b".say; }
camelia rakudo-moar 2ec563: OUTPUT«1 Z 1␤2 Z 2␤3 Z 3␤»
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; }
camelia rakudo-moar 2ec563: OUTPUT«Cannot assign to a readonly variable or a value␤ in block <unit> at /tmp/AXrTLfvJ9X:1␤␤»
nine tony-o_: it's more that I wonder where the "Too few positionals passed; expected 2 arguments but got 1" is coming from
pmichaud m: say ((1,2,3,4) Z (1,2,3,4)).perl
camelia rakudo-moar 2ec563: OUTPUT«((1, 1), (2, 2), (3, 3), (4, 4))␤»
tony-o_ m: @a = 1,2,3; @b = 1,2,3; for @a Z @b <-> ($a, $b) { $b *= $a; "$a Z $b".say; }
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 <-> ␤»
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␤␤»
tony-o_ nine: because the for @a Z @b -> $a, $b is giving $a the value of (1,1) and $b (2,2)
pmichaud should infix:<Z> be producing parcels or an interleaved list ?
19:14 dha joined
nine tony-o_: then this is a bug in SVG::Plot. But a couple months ago this code just worked 19:14
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 CIAvash left
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
tony-o_ pmichaud: agreed, i'd expect to not have to wrap the params
nine list infix reductions no longer flatten
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; }
camelia rakudo-moar 2ec563: OUTPUT«$(1, 1)␤$(2, 2)␤$(3, 3)␤»
tony-o_ m: for (1,2,3) Z (1,2,3) -> $a, $b? { $a.perl.say; }
camelia rakudo-moar 2ec563: OUTPUT«$(1, 1)␤$(3, 3)␤»
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:19 Guest84625 left
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␤»
pmichaud yeah, flattening helps here. 19:21
nine Question remains: is this intended or a bug?
pmichaud I'm okay with needing to include flat
makes me wonder if .kv should act the same, though :) 19:22
19:22 yqt joined
pmichaud i.e., for %hash.kv -> $k, $v versus for flat %hash.kv -> $k, $v 19:22
although flat is a very blunt instrument to use, since it will (recursively) flatten any of the values
tony-o_ m: for flat (1,2,3) Z (4,5,6) -> $a , $b { $a.perl.say; }
camelia rakudo-moar 2ec563: OUTPUT«1␤2␤3␤»
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 ␤»
pmichaud m: for (1,2,3) Z ((4,4), (5,5), (6,6)) { .perl.say }
camelia rakudo-moar 2ec563: OUTPUT«(1, 4)␤(2, 4)␤(3, 5)␤»
19:23 broheim left
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 ␤»
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))␤»
tony-o_ m: for (1,2,3) Z ((4,4),(5,5),(6,6)) -> ($a, $b) { "$a Z $b\t".say; }
camelia rakudo-moar 2ec563: OUTPUT«1 Z 4 ␤2 Z 4 ␤3 Z 5 ␤»
pmichaud ah, infix:<Z> flattens it arguments already. Interesting. 19:25
*its
tony-o_ i would have expected 1, (4,4) for the first iteration
19:26 smls_ joined, smls left
nine Ok, I'm pushing the fix to SVG::Plot. 19:28
masak nine++ 19:29
wow, you people produce backlog tonight.
nine This is what we do :)
dalek ecs: 65be127 | pmichaud++ | S07-glr-draft.pod:
Add a note about list operator flattening.
19:32
masak has been prototyping in Perl 6 all day, and then rewriting his prototypes to Java
(for $work)
dalek line-Perl5: 75eab84 | (Stefan Seifert)++ | / (2 files):
Fix empty return value list producing a stray Nil

Passing an emtpy list returned by a Perl 5 function to another Perl 5 function led to the latter getting an extra argument via the Nil -> Any -> undef chain.
Fix by replacing return; with return @retvals; (which is empty).
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 ^^^?
pmichaud: or at least make the fix a bit less magic like return Seq()?
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
nine Hi bot! 19:36
p6basicbot Hullo nine!
nine bot quit 19:37
19:37 p6basicbot left
vendethiel
.oO( we're pretty safe from HAL taking over the world with that )
19:37
19:37 gcole joined
bartolin good evening, #perl6 19:37
19:38 abraxxa joined
nine Nice to see my examples still working :) 19:38
19:38 abraxxa left
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:38
"error: pathspec '2015.06-6-g0cb8562' did not match any file(s) known to git" 19:39
dha Eep.
ugexe i was able to update
PerlJam bartolin: built just fine here via rakudobrew.
dha just made the mistake of estimating the number of functions in perlvar.
bartolin PerlJam: I'm building manually from HEAD 19:40
pmichaud I was able to update
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 :(
ugexe sometimes just nuking the .rakudobrew directory and reinstalling both rakudobrew and rakudo 19:41
bartolin okay, will investigate. thanks!
ugexe is fastest
FROGGS muraiki: I fear rakudo is not capable for that yet
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)
bartolin yeah, turned out to be a stupid mistake on my side ...
PerlJam muraiki: use JSON::Tiny:from<Perl5>; # :-) 19:43
Quom Does NFG factor in to #122340? 19:44
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=122340
muraiki argh, forgot to install perl5 with fpic 19:45
Quom m: my $पहला = 1
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…»
Quom m: my $दूसरा = 2;
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…»
masak Quom: seems to be a non-alphanumeric in there.
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:50
since those operators (are supposed to) gave list associativity 19:51
*have
so I think it would be better if they did *not* explicitly flatten
because then we could have it both ways 19:52
list1 Z list2 Z list3 if you want flat (elem1, elem2, elem3) output
masak smls_: while I agree, the real test should be whether there is any spectest fallout :)
the spectests know more about these things than any of us at this point
smls_ (list1 Z list2) Z list3 etc. if you want without 'flattening'
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
timotimo muraiki: if you have something this huge, JSON::Tiny (and also JSON::Fast) will most probably capitulate due to memory constraints 19:54
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 (
;(
masak yes, but I mean that the way those spectests fail will tell us about our expectations vs our predecessors' expectations
Quom smls_: FWIW, (list1 Z list2) Z list3 being different than list1 Z list2 Z lis3 seems really nonintuitive
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: engineering.intenthq.com/2015/06/wi...a-streams/
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.
smls_ (1, 2, 3) is already different from (1, (2, 3))
muraiki since it seems like p6 supplies is basically an implementation of Reactive Extensions
smls_ Quom: And (1 < (3 < 4)) returns True while (1 < (3 < 4)) returns False 19:57
sorry, first was meant to be (1 < 3 < 4)
So that's normal for Perl 6. 19:58
timotimo you may have to be a bit careful about not keeping the previous lines' strings around 19:59
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
FROGGS well, (3 < 4) which is true numifies to 1, so (1 < 1) is not true
smls_ exactly
20:00 darutoko left
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
FROGGS that' what I regularly hear from pmichaud++ 20:01
masak smls_: they do, but only because they're at different levels of precedence.
smls_: associativity only kicks into gear on the same level of precedence.
smls_ yes
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.
[Coke] if someone has an attribute that is required, is it sufficient to insure it's not a type value?
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
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.
masak oh, granted. 20:03
pmichaud m: say ((<1 2 3> Z <a b c>) Z <4 5 6>).perl
camelia rakudo-moar 2ec563: OUTPUT«(("1", "4"), ("a", "5"), ("2", "6"))␤»
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": gist.github.com/niner/564671ce4611556a9604 20:04
dalek ast: 054be39 | (Sterling Hanenkamp)++ | S32-array/delete.t:
Adding a test for RT #125457 regressions
ast: 89da7f0 | (David Warring [email@hidden.address] | S32-array/delete.t:
Merge branch 'rt125457' of github.com/zostay/roast into zostay-rt125457
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125457
ast: 9a42069 | (David Warring [email@hidden.address] | S32-array/delete.t:
Merge branch 'zostay-rt125457'
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.
Quom m: say ((<1 2 3> Z <a b c>).tree.list Z <4 5 6>).perl
camelia rakudo-moar 2ec563: OUTPUT«((("1"; "a").item, "4"), (("2"; "b").item, "5"), (("3"; "c").item, "6"))␤»
masak nine: "makes me *sick*" :P
Quom m: say ((<1 2 3> Z <a b c>).tree<> Z <4 5 6>).perl
camelia rakudo-moar 2ec563: OUTPUT«((("1"; "a").item, "4"), (("2"; "b").item, "5"), (("3"; "c").item, "6"))␤»
Quom nine++ 20:06
smls_ pmichaud: In any case, I think the case should be made separately for X/Z vs []
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
smls_ the latter being sort of like a listop taking a *@_ slurpy arg
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.
nine masak: yes, there's just too little secret knowledge to keep me employed till retirement ;) 20:08
dalek ecs: 64b65ba | pmichaud++ | S07-glr-draft.pod:
Revise note about list operator flattening.
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
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.
[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
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)
smls_ *parsing 20:11
('a', (1, 'x'), ('a', (2, 'y'), ('a', (3, 'z'), ...
pmichaud ((a, (1, x)), (a, (2, y)), (a, (3, z)), (b, (1, x)), (b, (2, y)), ... 20:12
smls_ yeah
pmichaud I see missing parens in yours :)
TEttinger m: nqp::say({'a', 1})
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:…»
smls_ heh
pmichaud or rather, I don't see the missing parens :)
jnthn Quom: 122340 seems entirely unrelated to NFG, in so far as there's no synthetics involved there
smls_ yours is correct :P
TEttinger m: say({'a', 1})
camelia rakudo-moar 2ec563: OUTPUT«-> ($_? is parcel) { #`(Block|58370672) ... }␤»
TEttinger hm
is the best way to do this data dumping it? 20:13
jnthn m: say 'पहला' ~~ /\w+/
camelia rakudo-moar 2ec563: OUTPUT«「पहल」␤»
TEttinger some way to print a hash
jnthn m: say ('पहला' ~~ /\w+/).chars
camelia rakudo-moar 2ec563: OUTPUT«3␤»
TEttinger woah
jnthn m: say ('पहला').chars
camelia rakudo-moar 2ec563: OUTPUT«4␤»
jnthn Only 3 out of the 4 chars match \w
m: say uninames 'पहला' 20:14
camelia rakudo-moar 2ec563: OUTPUT«DEVANAGARI LETTER PA DEVANAGARI LETTER HA DEVANAGARI LETTER LA DEVANAGARI VOWEL SIGN AA␤»
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 :)
jnthn m: say uniprop .ord, 'Canonical_Combining_Class' for 'पहला'.comb
camelia rakudo-moar 2ec563: OUTPUT«0␤0␤0␤0␤»
jnthn No combiners.
pmichaud .tell TimToady in post-GLR, should arguments of cross/zip still flatten? 20:15
yoleaux pmichaud: I'll pass your message to TimToady.
jnthn So going on the Unicode data for the chars involved, I don't see Rakudo doing anything not to spec.
[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
[Coke] if !nqp::defined($cur_value) .... I get Cannot find method 'item': no method cache and no .^find_method
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.
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 eternaleye left
[Coke] nqp::getattr(self, obj type, "attr_name") 20:19
20:20 eternaleye joined
[Coke] moritz: if I comment out that line, no error, pretty sure. double checking 20:20
20:20 cognominal left
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: rt.perl.org/rt3/Public/Bug/Display...?id=125408
[Coke] moritz: arglebargle. probably changed two things at once and forgot about the first one.
moritz [Coke]: or if you comment out an "if", it might be from something inside the block that otherwise isn't run :-) 20:23
anway, TTFN folks 20:24
colomon o/ 20:27
timotimo what's "TTFN"?
PerlJam Ta Ta For Now 20:28
RabidGravy ta ta for now
:
)
flussence www.dict.org/bin/Dict?Form=Dict2&am...Query=TTFN <- handy site
timotimo ah 20:29
muraiki Time To Feed Nematodes
PerlJam timotimo: www.youtube.com/watch?v=5Gu50vq5ux4
timotimo muraiki: at what stage of your project does rakudo capitulate, OOC?
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.
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
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
dha PerlJam - Nah. that might actually make it worth my time. :-) 20:33
20:33 broheim joined
broheim HAI GAIS 20:33
colomon needs to sit down and do some serious JSON timings soon.
broheim :B
skids o/
vendethiel o/ 20:34
muraiki timotimo: JSON::Fast 12.508s for 10 entries; JSON::Tiny 22.827s; JSON::Tiny:from<Perl5> 25.153s 20:35
timotimo cool, i almost hit my mark of 2x 20:36
20:36 espadrine joined
timotimo (i admit it's still a few orders of magnitude less awesome than it should be) 20:36
(and i know parts of what makes it bad)
smls_ timotimo: I vaugely remember JSON::Fast having trouble parsing the JSON responses in rosettacode.org/wiki/Rosetta_Code/R...ng_the_API though when I wrote that example 20:38
that's why I used JSON::Tiny instead
timotimo can you help me figure out what's wrong with it? 20:40
it doesn't do surrogate pairs for extended unicode characters :\
smls_ I don't know much about JSON I'm afraid
If I see another failure, I can try to golf it though 20:41
20:45 [Sno] left, spider-mario left, [Sno] joined
timotimo thanks! 20:45
20:46 spider-mario joined 20:48 [Sno] left, [Sno] joined
dalek ast: 63eb5fe | usev6++ | S03-operators/assign.t:
Unfudge passing test for chained assignment
20:50
nine muraiki: can you try JSON::XS from Perl5? 20:55
[Coke] ᴙ dumb.
dalek kudo/attr-isrequired: b484e3b | coke++ | src/core/Mu.pm:
Only throw when the value wasn't given

Previous, adding "is required" would always die.
20:57
[Coke] $ ./perl6 -e 'class ᴙ { has $.x is required }; ᴙ.new()' 20:58
The attribute '$!x' is required, but you did not provide a value for it.
$ ./perl6 -e 'class ᴙ { has $.x is required }; ᴙ.new(:x(3))' # silent
dha m: say abs(-15); 21:00
camelia rakudo-moar 2ec563: OUTPUT«15␤»
dha m: say -15.abs;
camelia rakudo-moar 2ec563: OUTPUT«-15␤»
b2gills m: say (-15).abs;
camelia rakudo-moar 2ec563: OUTPUT«15␤»
dha Yeah, I just thought of that. So I'm guessing a precedence issue. But it's not, IMO obvious. 21:01
timotimo oooooh 21:03
21:03 smls_ left
hoelzro [Coke]: ты знаешь русский язык? 21:06
masak 'night, #perl6 21:07
hoelzro good night masak
21:08 muraiki left 21:09 skids left
timotimo gnite masak! 21:09
RabidGravy arp 21:10
21:11 leont joined, cognominal joined 21:12 rindolf left 21:14 muraiki joined
dha So, in p6, what does C<accept> return? 21:15
Docs say "In listen/server mode, waits for a new incoming connection, and returns it." What, in this instance, would "it" actually be?
timotimo a socket that has the incoming connection bound to it 21:16
a new socket for each time you call accept
21:16 FROGGS_ joined
dha I assume that's an IO::Socket::INET object? 21:17
tony-o_ if you're using that for the listening server, yes 21:18
dha Well, accept seems to be a method of that class. 21:19
tony-o_ there is also IO::Socket::Async 21:20
dalek ast: edc79af | usev6++ | S12-enums/thorough.t:
Fix test count and usage of '#?DOES'
21:20 FROGGS left
dha ...which doesn't seem to be in the docs. :-/ 21:20
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, github.com/perl6/roast/blob/master...et-Async.t
dha The trick is knowing where to look, however. :-) 21:22
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.
flussence looking knowledgeable around here only requires knowing how to use `ack` effectively :)
tony-o_ dha: github.com/rakudo/rakudo/blob/nom/...nc.pm#L163 21:24
raydiak 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)
tony-o_ dha: github.com/rakudo/rakudo/blob/nom/...ET.pm#L122
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
muraiki nine: JSON::XS:from<Perl5> took 31.788s 21:26
raydiak the source being written in perl _is_ often rather convenient for these purposes :) 21:27
21:32 amurf joined, diana_olhovik_ left
dha Yes, but the source is crazy. :-) 21:33
21:34 _mg_ left
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. :-)
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.
tadzik Well, why do you think it's crazy? :)
Oh yes, no denying that 21:36
dha tadzik - I was just assuming. I do come from a perl 5 background. :-)
raydiak agreed, the docs are known to be incomplete, and are being worked on...patches welcome, of course :)
tadzik Right)
:)
dha raydiak - Kind of what I'm trying to do here, actually... :-)
21:37 amurf left
dha For those just encountering my countless questions for the first time, github.com/dha/perl5-to-perl6-docs 21:37
raydiak has been mostly absent for a couple weeks, goes to look 21:38
muraiki dha: looks great
21:38 FROGGS_ left
dha Thanks muraiki 21:38
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:39
speaking of which. C<alarm()> is no longer? 21:40
raydiak ah, I see...neat, thanks dha++ :) 21:42
21:43 muethos left
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
in large part, sanity is relative :)
dha Indeed. :-) 21:45
21:46 census joined 21:47 atroxaper joined, jaffa4 left, muraiki left 21:48 broheim left 21:50 leont left 21:51 atroxaper left
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>␤»
tony-o_ dha++ for special vars
dha Thanks. Comments welcome, by the way. I pretty much just plowed through perlvar, so some tweaks being needed would not be surprising. 21:53
21:54 kaare__ joined
dalek ast: 66b3dd6 | usev6++ | S11-modules/export.t:
Narrow down fudging
21:54
21:54 kaare_ left
b2gills dha: .split does work on the default scalar variable $_ 21:54
I mean shift
dha ... 21:55
tony-o_ m: sub foo { .shift.say; }; foo('bar');
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 kaare__ left
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');␤»
dha I wouldn't have even *thought* of using shift on $_
tony-o_ m: sub foo { @_.shift.say; }; foo('bar');
camelia rakudo-moar 2ec563: OUTPUT«bar␤»
b2gills m: $_ = ^5; say .shift; .say
camelia rakudo-moar 2ec563: OUTPUT«Method 'shift' not found for invocant of class 'Range'␤ in block <unit> at /tmp/sHPnpCdWOT:1␤␤»
tony-o_ i think above is what dha was documenting ^^ 21:56
mostly referring to subs/signatures
m: (^5).shift.say;
camelia rakudo-moar 2ec563: OUTPUT«Method 'shift' not found for invocant of class 'Range'␤ in block <unit> at /tmp/T0SClZ8Vp4:1␤␤»
tony-o_ m: @(^5).shift.say;
camelia rakudo-moar 2ec563: OUTPUT«0␤»
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.
But C<.shift> isn't, afaict, a method of C<$_> 22:00
22:00 RabidGravy left
raydiak m: my &foo = { .shift }; say foo [^5] 22:00
camelia rakudo-moar 2ec563: OUTPUT«0␤»
tony-o_ why does it work as anon Callable? 22:01
but not:
m: sub foo { .shift; }; say foo(^5);
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);␤»
raydiak m: sub {}.signature.say 22:02
camelia rakudo-moar 2ec563: OUTPUT«()␤»
raydiak m: {}.signature.say
camelia rakudo-moar 2ec563: OUTPUT«Method 'signature' not found for invocant of class 'Hash'␤ in block <unit> at /tmp/IJYjuXYwwW:1␤␤»
raydiak m: {;}.signature.say
camelia rakudo-moar 2ec563: OUTPUT«($_? is parcel)␤»
tony-o_ m: my &a = { }; &a.signature.say;
camelia rakudo-moar 2ec563: OUTPUT«Type check failed in assignment to '&a'; expected 'Callable' but got 'Hash'␤ in block <unit> at /tmp/Mn2XDe2pso:1␤␤»
tony-o_ m: my &a = { return 1; }; &a.signature.say;
camelia rakudo-moar 2ec563: OUTPUT«($_? is parcel)␤»
tony-o_ seems like an empty signature would more of an explicit thing with the sub syntax 22:03
m: sub foo () { } #eg
camelia ( no output )
tony-o_ err, i guess i mean it seems inconsistent that: my &foo = sub {} and sub foo { } get created with different signatures 22:04
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␤␤»
raydiak not sure myself if it's a bug or not, could see arguments for or against it
tony-o_ dha: raydiak was passing an array with [^5]
dha ah. yes.
tony-o_ raydiak: same
m: my &f = {.shift}; say f([^5])
camelia rakudo-moar 2ec563: OUTPUT«0␤»
ugexe m: my &a = -> $x { say $x }; a(1) 22:06
camelia rakudo-moar 2ec563: OUTPUT«1␤»
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;␤»
tony-o_ m: my \a = sub { }; &a.signature.say;
camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/F2GpjqCVOM␤Undeclared routine:␤ &a used at line 1␤␤»
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
22:08 AlexDani` joined
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:09
22:10 AlexDaniel left
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
ugexe m: my \a = sub ($x) { }; a.signature.say;
camelia rakudo-moar 2ec563: OUTPUT«(Any $x)␤»
tony-o_ raydiak: i know what you mean, i'm not really sure how to phrase that either 22:11
m: my &a = sub :: { ; }; &a.signature.say;
camelia rakudo-moar 2ec563: OUTPUT«()␤»
raydiak lambda maybe
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␤␤»
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. :-)
tony-o_ m: my &a = sub { ; }; &a.signature.say;
camelia rakudo-moar 2ec563: OUTPUT«()␤»
22:14 spider-mario left 22:15 spider-mario joined
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
22:15 census left
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:15
ugexe m: my &a = sub (*@_) { @_.shift }; say a([^5]); 22:16
camelia rakudo-moar 2ec563: OUTPUT«0 1 2 3 4␤»
tony-o_ raydiak: that makes a lot of sense
because &a = {; } is really a Callable, i think 22:17
dha m: my &a = sub (*@_) { .shift }; say a([^5]);
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␤␤»
tony-o_ m: my &a = { ; }; &a.WHAT.say;
camelia rakudo-moar 2ec563: OUTPUT«(Block)␤»
tony-o_ Block ..
m: my &a = { ; }; &a.^mro.say;
camelia rakudo-moar 2ec563: OUTPUT«(Block) (Code) (Any) (Mu)␤»
raydiak Callable is role anyway, not a class
ugexe sub doesnt have a self. you cant just .shift
tony-o_ you can .shift in a block though 22:18
m: sub a (*$_) { .shift; }; a([^5]).say;
camelia rakudo-moar 2ec563: OUTPUT«0␤»
raydiak m: sub foo ($_) { .shift }; say foo [^5] # or explicitly in a sub...
camelia rakudo-moar 2ec563: OUTPUT«0␤»
tony-o_ beat ya :-)
raydiak heh nice :)
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:20
ugexe they are assigning the value to $_ directly which is confusing you 22:21
tony-o_ dha: .shift always works on $_
a .<method> always works on $_
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:23 bin_005 left
ugexe m: my &a = sub (*@_) { @_.shift }; say a([^5]); 22:24
camelia rakudo-moar 2ec563: OUTPUT«0 1 2 3 4␤»
ugexe you can shift off it but its not an implicit @_
tony-o_ then .shift doesn't work
dha right.
ugexe it does work 22:25
lizmat has blugged: p6weekly.wordpress.com/2015/06/23/...ard-to-do/
tony-o_ m: my &a = sub (*@_) { @_.shift }; say a(^5);
camelia rakudo-moar 2ec563: OUTPUT«0␤»
tony-o_ you don't need the [] for slurpy sig
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++
dha lizmat++ # always :-) 22:28
22:29 AlexDani` left 22:30 cognominal left 22:31 gfldex left 22:32 cognominal joined, woolfy joined, woolfy left
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
dha I'm *guessing* that any binding is done when a new socket object is created.
I'm also guessing that C<binmode> is gone as well. 22:34
22:37 yqt left
raydiak yep binmode() is gone, replacements are the :bin and :nl params to open() 22:43
22:46 bjz left
dha Ah. saw :bin. Will look at :nl. Thanks. 22:48
raydiak yw
22:48 leont joined
dha Guessing that C<break>ing out of a C<given> block is no longer a thing. 22:49
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␤␤»
b2gills `break` comes out of `given` is implemented in Perl 5 22:51
timotimo we don't have "break" in perl6 at all 22:52
but we have "succeed" and "proceed"
22:52 raiph left
leont Probably was a break when it was added to perl 5 22:53
dha Yes. It was.
leont *there 22:54
22:55 skids joined
dalek kudo-star-daily: c4339a2 | coke++ | log/ (2 files):
today (automated commit)
22:55
22:56 spidermario joined 22:57 spider-mario left
[Coke] hoelzro: I know about 3 words, and about as many cyrillic letters. 22:57
22:57 spidermario is now known as spider-mario
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. 22:58
[Coke] коледа <- which you may recognise. 23:00
b2gills That test file may not get run 23:01
dha Yeah, I figured. Just confirming that I can say that C<caller> is gone. 23:02
Also caller-related. It appears to be at best difficult to get a package name out of C<callframe> 23:03
23:04 spider-mario left, lichtkind left 23:08 spider-mario joined 23:10 amurf joined
b2gills m: say callframe(0).annotations 23:10
camelia rakudo-moar 2ec563: OUTPUT«file => /tmp/UjfIpAgR2c, line => 1␤»
[Coke] .ask timtoady you ok with adding "is required" as a trait for attributes?
yoleaux [Coke]: I'll pass your message to timtoady.
dha b2gills - yeah, you can get the file and line number, but not the package. 23:12
23:12 spider-mario left
ugexe m: say $?PACKAGE 23:13
camelia rakudo-moar 2ec563: OUTPUT«(GLOBAL)␤»
23:13 Vlavv left 23:14 spider-mario joined, pecastro joined 23:15 Vlavv joined
b2gills m: sub c { say $?CALLER::PACKAGE }; package B { c() } 23:15
camelia rakudo-moar 2ec563: OUTPUT«(B)␤»
23:16 TEttinger left
dha That would just be the immediate caller, though, right? If you're looking back x number of callframes... 23:17
23:19 spider-mario left
dha Incidentally, it looks like an exception class for C<chdir> is documented but not C<chdir> itself. 23:19
23:20 spider-mario joined 23:21 dolmen joined
dha Anyway, I should go find some dinner. Thanks for the help, all. 23:22
23:22 dha left
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)␤»
dalek rl6-bench: 39db33a | smls++ | minibenchmarks.pl:
add 'x_label' and improve 'expected' field for rc-perfect-shuffle
23:28
rl6-bench: 00000fb | japhb++ | minibenchmarks.pl:
Merge pull request #25 from smls/master

add 'x_label' and improve 'expected' field for rc-perfect-shuffle
ast: 107f8c4 | Coke++ | S12-class/attributes-required.t:
add new test file for required attributes
23:30
kudo/attr-isrequired: 6042ec5 | Coke++ | t/spectest.data:
Run new test file
23:33 dolmen left
[Coke] someone have an example of throws-like that uses the matcher optional param? 23:35
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:42
ugexe perl6-j -e 'Proc::Async' #Could not find symbol '&Async' 23:54
23:55 espadrine left
japhb ugexe: That might be NYI on r-j 23:56