»ö« 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.
00:00 lizmat joined 00:03 cognominal left 00:15 rurban left 00:16 dnmfarrell joined 00:17 Zoffix joined 00:20 jack_rabbit left
dnmfarrell Hey y'all I'm getting a strange error with my Pod::Perl5 distribution. Can someone help me? When installing the module, the tests run fine. But now if I do this one liner: perl6 -MPod::Perl5 -e 'say Pod::Perl5::parse-string("=pod\n\n")' I get an error "Could not find symbol '&Grammar'". This did not happen previously. I'm running a fresh Perl6 and moarvm install 00:21
I can load and run the grammar fine with a one liner though: perl6 -MPod::Perl5::Grammar -e 'say Pod::Perl5::Grammar.parse("=pod\n\n") 00:22
00:23 laouji joined
pmichaud upon further reflection, using |[...] or |(...) as the list inserter syntax runs into problems with 'return' 00:28
so, perhaps no-go
timotimo dnmfarrell: did you put all the things that are supposed to be use-able into the META.info under the "provides" section? 00:37
dnmfarrell timotimo: I think so, let me compare mine github.com/dnmfarrell/Pod-Perl5/bl.../META.info with another Perl 6 distro 00:38
00:39 laouji left, laouji joined
dnmfarrell timotimo: it looks ok to me. When panda installs it, it definitely copies all of the *pm files in the distro 00:40
00:41 laouji left 00:46 kurahaupo joined 00:47 BenGoldberg joined, laouji joined
timotimo right, the copying is one part, but registering it into the database is another 00:48
00:48 tinyblak joined 00:49 tinyblak_ joined
timotimo i can't see an obvious mistake you might have made 00:50
let me install it locally to try it out
oh my 00:51
panda segfaults while rebootstrapping
dnmfarrell :(
timotimo oooh 00:52
00:53 tinyblak left
timotimo could it be creating the Pod::Perl5 module in lib/Pod/Perl5.pm file doesn't magically merge the other two things into it? 00:53
it may be the right fix to put the use statements into the module itself?
i wonder if this is our wrongdoing, though
00:54 kurahaupo left
dnmfarrell Hmm, Perl5.pm has use statements for the other two modules. Maybe I've misunderstood 00:55
00:55 kurahaupo joined
raydiak methinks timotimo++ means try putting the 'use's inside the module { ... } block instead of before it 00:58
dnmfarrell raydiak: got it, let me try that, thanks! 01:00
timotimo that's what i meant, yeah 01:01
this used to work, right? i wonder how long ago
and i wonder what the speculations say about this
dnmfarrell yes it stopped working in the past 2-3 weeks 01:03
01:03 aborazmeh joined, aborazmeh left, aborazmeh joined
dnmfarrell timotimo raydiak didnt work. But maybe that's a good thing :) What's weird is that if you're in the local project directory and load lib locally, it works fine: perl6 -Ilib -MPod::Perl5 -e 'say Pod::Perl5::parse-string("=pod\n\n")' 01:06
but remove "-Ilib" and use the "installed" version and it doesn't work 01:07
timotimo :o 01:08
timotimo heads towards bed
but a golfed test case would be great
raydiak dnmfarrell: I don't see anything else obvious either, and second the motion for a golfed bug report :) 01:12
skids m: sub f( $g ($a, $b)) { $g.say; $a.say; $b.say }; f([1,2]); 01:16
camelia rakudo-moar a6d2ed: OUTPUT«1 2␤1␤2␤»
skids m: sub f( $g ($a, :$b)) { $g.say; $a.say; $b.say }; f([1,:b(2)]); # should work?
camelia rakudo-moar a6d2ed: OUTPUT«Too many positionals passed; expected 1 argument but got 2 in sub-signature of parameter $g␤ in sub f at /tmp/b2gFq8zjYr:1␤ in block <unit> at /tmp/b2gFq8zjYr:1␤␤»
skids Ah,nm.
m: sub f( $g ($a, :$b!)) { $g.say; $a.say; $b.say }; f((1,:b(2)));
camelia rakudo-moar a6d2ed: OUTPUT«1 b => 2␤1␤2␤»
01:20 thezip joined, dayangkun joined
dnmfarrell sure I can raise a ticket, I've done that before :-) 01:22
raydiak timotimo thanks for your help
raydiak dnmfarrell: you're quite welcome, thanks for reporting it 01:25
01:26 laouji left, laouji joined 01:28 laouji_ joined, laouji left
timotimo what he said 01:29
dnmfarrell heh, I'm trying to replicate it in a simple class and grammar, and can't replicate the bug 01:38
01:40 telex left 01:41 thezip left 01:42 telex joined
dnmfarrell does anyone know if Panda maintains a module list or internal DB of installed modules somewhere? 01:48
01:49 vike1 left 01:55 vike joined 01:57 AlexDaniel left 01:58 ssqq joined
ssqq anyone use sublime Text as Perl6 editor? 02:00
raydiak dnmfarrell: it does, and those bits have been undergoing revision within the last couple months, so not surprising that an issue might crop up here
dnmfarrell raydiak: do you know where it is? I'm searching the directories under .rakudobrew and can't see it 02:01
raydiak dnmfarrell: how it works precisely has changed over time, at one point the files weren't even stored under the original names, instead some auto-generated ID number or something...don't know at all what the state of it is now, myself 02:03
02:03 sivoais left, sivoais joined
ssqq How setup Perl6 REPL in sublime Text? 02:04
02:04 nys left, sivoais left
raydiak dnmfarrell: but I believe it (Panda) uses Perl 6's CompUnit and CompUnitRepo now, so that might be involved 02:05
02:05 rurban joined
raydiak dnmfarrell: github.com/tadzik/panda/blob/maste...ler.pm#L37 looks like a starting point for figuring out what precisely it's doing 02:05
dnmfarrell: oh github.com/tadzik/panda/blob/maste....pm#L39-43 looks more directly relevant to the state tracking involved, maybe 02:07
02:08 adu joined
dnmfarrell raydiak: thanks, just looking at this file: ~/.rakudobrew/moar-nom/install/share/perl6/site/panda/state 02:08
dalek ast: 30101e3 | hoelzro++ | S16-filehandles/argfiles.t:
Add a test for $*ARGFILES, get(), and lines()
02:09
ast: 859ce43 | hoelzro++ | S16-filehandles/argfiles.t:
Test that two invocations of lines() doesn't touch $*IN

RT #125380
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125380
ast: 1e02a39 | hoelzro++ | S16-filehandles/argfiles.t:
Test $*ARGFILES when - is in @*ARGS
ast: 9da4ffb | hoelzro++ | S16-filehandles/argfiles.t:
Test setting @*ARGS before calling $*ARGFILES things
dnmfarrell looks like it just stores the META json for every installed module 02:10
02:11 rurban1 joined, rurban left, ssqq left
raydiak yeah I poked around a bit but still don't have a real suggestion...if the files are really in ~/.rakudobrew/moar-nom/install/share/perl6/site/lib though, the problem is probably in rakudo instead of panda, and I don't think panda touches any state files that rakudo makes use of, at least from what I've seen so far 02:28
02:28 tinyblak_ left
hoelzro_trying_w dnmfarrell: I think the DB is in a serialized state at this point 02:28
er
hoelzro wrong IRC client =P
it used to be a JSON file, but now it's a serialized Perl 6 object, I believe 02:29
02:29 noganex_ joined
hoelzro hmm, is that DB still in use? I'm not seeing it show up in strace 02:30
dnmfarrell: anyway, why do you ask?
adu radiak!
raydiak! 02:31
dnmfarrell hoelzro: I have a weird error - a module runs fine locally but on install stops working
raydiak hoelzro: irclog.perlgeek.de/perl6/2015-06-11#i_10733542
adu!
adu :)
hoelzro dnmfarrell: ah, that sounds like a serialization bug I saw a while back =/
hoelzro plays around with Pod::Perl5 02:32
dnmfarrell meh!
02:32 noganex left
dnmfarrell hoelzro: thanks, open to suggestions :) My trivial attempts to reproduce the bug with a simpler class and grammar do not reproduce the error 02:32
02:34 tinyblak joined
raydiak adu: build anything cool lately? how's life? 02:34
adu raydiak: dunno, and good
hoelzro dnmfarrell: when's the last time you remember this working?
adu raydiak: I replaced "module" with "unit module" and now C::Parser compiles without warnings again 02:35
dnmfarrell about 2-3 weeks ago
02:35 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk
hoelzro alright 02:35
raydiak adu: oh yeah, some breaking changes happening around here...more to come, I'm sure :)
adu :(
02:38 yqt left
raydiak on the upside, we're theoretically only a few months from things getting frozen for 6.0.0, so no more pulling the rug out from under ourselves in the not-too-distant future 02:38
hoelzro dnmfarrell: bad news; I'm seeing this issue very far back =( 02:42
dnmfarrell hoelzro: darn :( I keep thinking maybe there's an error in the Grammar.pm but then I remember that the test suite runs fine and it hits every part of the grammar, as well as Pod::Perl5.pm 02:44
hoelzro yeah, PERL6LIB=lib works fine; PERL6LIB=blib/lib, not so much =(
dnmfarrell weird!
thanks for looking into it, I can raise a ticket 02:45
hoelzro sure thing
02:50 dduncan joined
dnmfarrell ticket raised: rt.perl.org/Ticket/Display.html?id=125384 02:51
02:51 gagalicious joined
hoelzro dnmfarrell: heh, I was just about to ask =) 02:51
I managed to golf it down
gagalicious what's the command to list all similar channels again? i would like to do a /msg <something> list perl like channel... does anyone know
hoelzro I thought the error was couldn't find &Grammar?
dduncan I have a question with regard to comp unit versioning described at design.perl6.org/S11.html#Versioning ...
dnmfarrell you did? nice work, my simplistic golfed versions never reproduced the bug
dduncan Taking this example for context: 02:52
use Dog:auth(/:i jrandom/):ver(v1.2.1 | v1.3.4);
use Dog:auth({ .substr(0,5) eq 'cpan:'}):ver(Any);
02:53 BenGoldberg left
hoelzro dnmfarrell: I've fought this beast before =) 02:54
dduncan What is the way to say for example that we support 2 different 'auth', lets call them Foo and Bar, and that the supported 'ver' are different for each one. For example, how to say we support Foo ver 2-4 and Bar ver 3-6? The current format seems to just support the cross-product of what is shown in 'auth' and in 'ver'.
dnmfarrell hoelzro: haha. You're right about the error msg. I made some changes in a cloned repo, installed it and get a different error message. I reinstalled Pod::Perl5 but I still get the new error message, not the original &grammar one 02:56
waaaaagh
hoelzro dduncan: I'm not sure I follow 02:58
gagalicious is this correct... if(sth = $dbh->prepare('select * from '.$table)) { continue do something }... i dont want to do the default tutorial... $dbh->prepare('select * from '.$table) or die... the $table and code is inside a while loop. i would like to have it continue to the next $table... so is my code correct? 02:59
dduncan hoelzro, I'll explain this a simpler way ...
hoelzro gagalicious: I think you may want #perl 03:00
gagalicious does anyone know? 03:01
dduncan use Dog:auth<cpan:TPF>:ver(v1.2.1..v1.2.3); use Dog:auth<cpan:JRANDOM>:ver(v14.3..v16.2); 03:02
How do I merge those into a single 'use Dog' without being any less strict?
Eg, I want the 'or' of those 2.
dnmfarrell hoelzro: how do you run that Makefile in the golfed distro? I tried bash, make and perl6 but none work for me 03:03
hoelzro ooooh
dduncan In this example, I believe those authority-specific version ranges are mutually compatible with respect to my code, so I want to say either is okay, without saying anything else is ok, and in either case, use it as 'Dog'.
hoelzro dnmfarrell: plain old 'make' doesn't build it?
dnmfarrell nah make says: "make: Nothing to be done for 'Makefile'." 03:04
hoelzro dduncan: that's a good question; I don't know if anything like that is in the spec
dduncan Right. But I assume it is a realistic requirement, so I wanted it to be covered if it wasn't. I will escalate to a post to perl6-language if the answer isn't known here. 03:05
hoelzro dnmfarrell: and you're in the pod-golf directory?
dnmfarrell yes 03:06
hoelzro dduncan: TimToady could chime in; otherwise, a lot of sixers will be online in a few hours
dnmfarrell: what OS are you on?
dnmfarrell Fedora
dduncan That would be nice, yes, the kind of people I was hoping for input from. 03:07
hoelzro dnmfarrell: what about 'make test'?
03:07 laouji_ left, rurban1 left
dduncan This would seem like a best-for-Larry thing actually. 03:07
dnmfarrell hoelzro: ahhh, works, thanks!
hoelzro dduncan: agreed =)
dnmfarrell: that's still weird; it should invoke 'make build' by default... 03:08
dnmfarrell hoelzro: gotcha 03:09
03:10 rurban joined, laouji joined
dnmfarrell gotta run, thanks again hoelzro ! 03:11
03:12 dnmfarrell left
gagalicious sorry to impose.. is there any other irc servers with a huge perl5 people... that i can go to other than freenode...? i've tried to access irc.perl.org but my connection is very slow. any other recommendations? thanks 03:13
03:19 ilbelkyr left 03:20 ilbelkyr joined 03:23 rurban left, rurban joined
dduncan I just made the perl6-language post for the question. It should be at www.nntp.perl.org/group/perl.perl6....36311.html whenever that archive catches up. 03:31
03:33 adu left
dalek kudo/nom: 3fbd1e6 | hoelzro++ | t/spectest.data:
Add new argfiles tests to spectest list
03:34
kudo/nom: d58e397 | hoelzro++ | src/core/IO/ArgFiles.pm:
Make sure that post-EOF invocations of $*ARGFILES don't open $*IN

Fixes RT #125380
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125380
03:38 tinyblak_ joined, kaare_ joined 03:40 rurban left 03:41 tinyblak left 03:45 spider-mario left 03:56 spider-mario joined 04:02 laouji left, laouji joined
zostay m: say $?ENC; 04:17
camelia rakudo-moar d58e39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5aTi4OSpGL␤Variable '$?ENC' is not declared. Did you mean '@?INC'?␤at /tmp/5aTi4OSpGL:1␤------> 3say 7⏏5$?ENC;␤»
04:32 jack_rabbit joined
pmichaud /lastlog pmichaud 3 04:43
04:47 [Sno] left
dalek c: 786c7a1 | (Sterling Hanenkamp)++ | lib/Type/Channel.pod:
Fix the name of the X::Channel::ReceiveOnClosed
04:50
04:54 skids left 05:03 rurban joined 05:04 rurban left 05:16 mr-foobar left, mr-foobar joined 05:18 mr-foobar left, mr-fooba_ joined 05:20 aborazmeh left 05:22 aborazmeh joined, aborazmeh left, aborazmeh joined
gagalicious i did eval($script); <- the problem is, if the script is awry, it just doesnt generate any error at all... how do i force it to generate errors like it's truly part of the script? 05:38
sorry to impose.. is there any other irc servers with a huge perl5 people... that i can go to other than freenode...? i've tried to access irc.perl.org but my connection is very slow. any other recommendations? thanks 05:42
05:46 Patterner joined 05:49 Psyche^ left 05:57 msouth joined 05:58 domidumont joined 06:02 domidumont left 06:03 domidumont joined 06:04 diana_olhovik joined
kurahaupo gagalicious: well, you could start with #perl here on Freenode 06:10
06:16 SevenWolf left 06:17 llfourn left 06:21 rurban joined 06:24 rurban left 06:25 RabidGravy joined, FROGGS joined
FROGGS o/ 06:46
06:46 msouth left 06:48 [Sno] joined 06:56 RabidGravy left 07:01 Ven joined, Ven left 07:04 _mg_ joined 07:09 amurf left 07:10 amurf joined 07:12 g4 joined, g4 left, g4 joined, gfldex joined 07:14 dduncan left, ab6tract joined 07:15 llfourn joined 07:19 RabidGravy joined
RabidGravy right, extending a CArray to at least the expected length before passing it to sf_readf_int(....) will stop the crashiness 07:32
actually that case is not explicitly stated in the docs 07:39
07:42 aborazmeh left 07:43 aborazmeh joined, aborazmeh left, aborazmeh joined 07:48 Ven joined 07:54 pdcawley joined
Ven o/, #perl6 07:58
08:00 bjz joined
ab6tract howdy Ven 08:03
08:04 Ven left
dalek c: cda09c8 | RabidGravy++ | lib/Language/nativecall.pod:
Add note on pre-extending CArray buffers that are populated by C
08:04
08:07 aborazmeh left 08:08 bjz left 08:11 darutoko joined 08:13 aborazmeh joined, aborazmeh left, aborazmeh joined 08:17 amurf left 08:26 cognominal joined 08:28 gagalicious left
sergot morning o/ 08:28
RabidGravy marnin 08:32
masak \o 08:36
08:36 _mg_ left, spider-mario left, espadrine joined, Ven joined 08:40 bin_005 joined 08:42 bjz joined, zakharyas joined
ab6tract howdy masak 08:43
08:50 [TuxCM] joined 08:51 aborazmeh left 08:55 [Tux] left 08:56 [Tux] joined 09:02 [TuxCM] left 09:06 cognominal_ joined, cognominal left 09:08 rindolf joined 09:19 zakharyas left 09:22 Ven left 09:31 laouji_ joined 09:35 laouji left 09:39 laouji_ left, laouji joined 09:47 laouji left 09:50 laouji joined 09:52 laouji left, laouji joined
Woodi hallo #perl6 :) 09:55
"to flat, or not to flat: this is a question" but so important like in Hamlet case :) 09:58
but probably this not helps pmichaud++
09:58 Ven joined
masak Woodi: the verb form would be "to flatten" ;) 09:59
Woodi I think discussion is a bit tangled with DWIM cases, eg. for 42 is DWIM becouse for/map takes list
masak: I didn't know which one is proper, my bad :)
so for $scalar is simple but for $array is strange... intentionally applayin for to list and wanting just one run 10:01
I think for $a, @b, $c {} should by default visid @b elements but just 1 lvl 10:02
and I like \@array more then $@array... 10:03
but becouse topic is not so important like Hamlet one we should just do what covers moust cases 10:04
also for/map, assignment takes list (I asume)... so this list is first calculated or for takes string or ast and work it on their own ? 10:05
RabidGravy right off out for a bit, Sndfile can wait 10:06
10:06 amurf joined 10:08 tinyblak_ left
Woodi so in for [],[] what "for" takes ? "optimized" list ? 10:09
10:09 tinyblak joined 10:10 RabidGravy left, amurf left
Woodi probably deep flat should not be default anywhere becouse it is too many possibilities in the world. but 1 lvl can be good for general/default/core cases... 10:12
so we need general mechanism - first DWIM cases should be eliminated
also what is itemization ? flattening ? 10:13
10:13 tinyblak left
Woodi and could we just rewrite past into one without "parcels" ? I think it is cargo culted from technical parts of Lisp (which is pre hash and objects world) 10:14
last thing: maybe for (@a @b) {} for flattening 1 lvl ? or for ,@a, @b {} 10:16
Woodi afk ! 10:17
10:23 tinyblak joined 10:29 tinyblak left 10:38 dayangkun left 10:41 dayangkun joined 10:42 dayangkun left 10:43 laouji left, dayangkun joined, dayangkun left 10:47 laouji joined
masak Woodi: the first of these syntax suggestions goes against TTIAR. the second... would be possible, but it looks very weird to be using `,` as a prefix op. 10:50
10:51 laouji left
nwc10 djh on #london.pm found this: coolthingoftheday.tumblr.com/post/1...so-much-on 10:52
of course, I wonder, "this space for rent?"
10:53 pdcawley left 10:54 pdcawley joined
moritz masak: re pythons bound methods, there's one place where I find it really weird 10:54
some.namespaced.Class() vs. from some.namespaced import Class; Class()
somehow modules don't seem to get passed along as invocant? 10:55
10:57 ggoebel left 11:02 nowan_ left 11:05 nowan joined
masak moritz: I'm sorry, I didn't get the essence of the problem you're trying to illustrate :/ 11:05
moritz: are you complaining that it works both with and without the import? 11:09
11:16 pdcawley left 11:17 smls joined
smls sup. 11:18
rosettacode.org/wiki/Sorting_algori...ort#Perl_6 -> is that sentence about "sorted in parallel" realistic?
Will the comma operator ever auto-thread? 11:19
m: my (:True(@before), :False(@after)) := (^10).classify(* before 5); dd @before, @after; 11:21
camelia rakudo-moar d58e39: OUTPUT«[0, 1, 2, 3, 4]<>␤[5, 6, 7, 8, 9]<>␤»
masak ...no.
smls ^^ maybe this would be a better way to do it?
masak smls: the comma operator won't be autothreading, at least not in vanilla Perl 6.
11:21 llfourn_ joined
FROGGS but .grep might do something in parallel, right? 11:21
masak FROGGS: maybe on non-lazy things. 11:22
smls wonders if there is a nicer way to express the signature (:True(@before), :False(@after))
FROGGS if it gets batched...
it could operate on batches in separate workers 11:23
smls FROGGS: but the quicksort(@before), $pivot, quicksort(@after) comma-separated list is what will pull in the lazy list, and it won't do both in parallel, right?
11:24 llfourn left, pdcawley joined, Ven left
FROGGS smls: when you start evaluating that lazy list it kicks of grep to provide values, and that can very well happen in more than on thread 11:24
at least that is how I imagine that given my naive understanding of that topic 11:25
smls yeah but not if you block and wait for the first lazy list to finish, before startying to evaluate the second lazy list 11:26
11:30 Ven joined, |Tux| left 11:31 bin_005 left, |Tux| joined
Woodi hmm, class Array is List { ... } so in Liskov spirit Arrays should just work like Lists... 11:34
masak more precisely, an Array is a kind of List plus some additional behavior. 11:36
moritz and the additional behavior is putting each item into a Scalar 11:37
Ven "@ is mnemonic for l@st" :P
ab6tract Ven: Ive been wondering after that, actually.. "@" is ... ? 11:39
Ven ab6tract: @rray
but it kind-of breaks down
masak in Perl 6 it just means some Positional type.
ab6tract so the same as + or ~ ? a coercion prefix?
smls @(EXPR) is identical to EXPR.list 11:40
11:40 Ven left, Ven_ joined
smls Though when used as a sigil, it's simply part of the variable name. 11:40
Woodi also: generally Arrays means something native and finished in size. but we also have lists, sequences, ranges, streams... maybe something should be unified ? using representations when eg. finishness is known
ab6tract smls: yeah, that part makes sense. I've seen some '@ = list()' kind of examples recently 11:41
that make less sense to me
Ven_ (I was just pointing out that the old mnemonic @rray didn't work anymore)
masak Woodi: I have no idea what you mean. 11:42
Woodi: do you mean "finite" and "finiteness"?
smls .list / list() does not coerce things to the List type - if it did, it would be named with uppercase L 11:43
it simply forces things to become list'y
:P
smls still sees some merit in the idea of removing the inheritance between Array and List; making Array finite+eager+mutable+itemizing (for imperative programming), and List lazy+immutable (for functional programming). 11:46
Haven't yet seen a good use-case that exploits both laziness and mutability of arrays together. 11:48
masak +1 11:49
smls in fact, it looks like lazy Array's only to exist in Perl 6 so we can write "my @x = ..." instead of "my @x := ..." in a few more cases (but still not always).
11:49 jack_rabbit left
masak one big reason Positional is a role is so that there can be less reliance on class inheritance 11:50
11:52 _mg_ joined
Ven_ smls: there's an interesting paper on that, recursion vs corecursion :) 11:54
codata: types2004.lri.fr/SLIDES/altenkirch.pdf
ab6tract smls: that's not what I'm asking about. I'm trying to understand what '@' on the LHS of an assignment means
list() was just meant to be a standin example sub that returns a list 11:55
gimme-list() # would have been better
smls An @ LHS in an assignment has the following consequences (compared to $): 12:01
1) The '=' is considered having list assignment precedence (rather than item assignment precedence), and the RHS is parsed accordingly.
2) An exception is thrown if the RHS does not evaluate to something that does the Positional role.
3) The RHS is flattened, and filled into the LHS item by item from left to right.
12:01 ab6tract left
smls oh, and the thing they're filled into, is an Array by default 12:02
though it's supposed to be possible to override that on a per-pariable basis by declaring it like "my @a is List;" 12:04
12:05 ab6tract joined, Ven joined
smls OTOH in an assignment with $ LHS: 12:08
1) The '=' is considered having item assignment precedence.
2) There is no requirement for the RHS to fulfil a specific Role.
3) The RHS is taken as is (without flattening), and put into an item container.
12:08 Ven_ left
arnsholt Wow. Sometimes, I make the most boneheaded mistakes in my code >.< 12:09
12:10 colomon left 12:12 colomon joined 12:15 itz is now known as itz_, itz joined 12:16 Ven left 12:22 zakharyas joined 12:23 g4 left, cognominal_ left
smls My latest Perl 6 script called MyGrammar.parse a whopping 67,002 times, on a full run with real input data. 12:24
Where do I collect my prize? :P
moritz smls: ask HR :-) 12:26
ab6tract m: (my @ = 1,2,3,4).say; 12:28
camelia rakudo-moar d58e39: OUTPUT«1 2 3 4␤»
itz_ did I imagine it or did I see a utility to manage multiple perl6s like perlbrew links? 12:29
ab6tract thanks for clarifying smls :)
psch itz_: rakudobrew? github.com/tadzik/rakudobrew 12:31
12:32 Ven joined
itz_ ah yes I forgot that did sym link management 12:32
hoelzro good morning, #perl6! 12:38
FROGGS morning hoelzro
hoelzro o/ FROGGS
psch o/ hoelzro, FROGGS
hoelzro o/ psch 12:39
FROGGS hi psch 12:40
FROGGS needs to backlog... interesting things happen these days
dalek kudo-star-daily: e474b32 | coke++ | log/ (2 files):
today (automated commit)
12:42
hoelzro $*ARGFILES respecting changes in @*ARGS is desired behavior, right? I was playing around with $*ARGFILES last night, and I don't think I saw that in the spec^Wdesign documents 12:43
[ptc] agrees with FROGGS, it's hard to keep up
psch doesn't really have time to catch up either 12:44
i missed like a month due to personal stuff, so p6weekly is all i'm up to date with :s
and i'd rather pour the little time i have atm into more jvm easy-of-use 12:45
FROGGS psch++ 12:46
JimmyZ [MB??[MB[MB??[MB 12:48
[Coke] (installing during configure is bad) then you need to run each of the 3 builds on your own, rather than letting rakudo do it for you. 12:54
12:55 telex left 12:56 achauvin left, telex joined
psch it' 13:00
s not quite clear to me though
how i can do what i wanna do 13:01
i mean, i've started from the RakudoEvalServer, to try and get it to run precompiled scripts
i.e. the output of e.g. "perl6-j --target=classfile --output=$FILE.class $FILE.p6"
and i'm not quite seeing through where i have to untie things so i can put the script in 13:02
as in, currently we're running perl6.jar, so to speak, which enters through main.nqp 13:03
and that's already to late to stuff the CU in the classfile from the example command line
hm, do we have a way to start from a specific stage or am i dreaming that up right now 'cause it would make stuff much easier..? :)
13:11 Ven left 13:13 AlexDaniel joined 13:17 RabidGravy joined
RabidGravy back now 13:18
[Coke] gist.github.com/awwaiid/ef3f0abcfa96e34977b4 - this showed up in my perl6 news net.
RabidGravy very pleasant day, I think it's drink cold cider outside until my liver can't take it
13:22 skids joined
Woodi [Coke]: so Perl6 could be ultimate inter-language. or inter-infrastructure-language :) maybe c6pan should include all versions of Python batteries ? 13:24
masak: by "flatteness" there I mean "thing in question is finite" so eg. native array representation could be used. but actually knowing type of array elements is more important, small native array could be allocated (for ints, ..., pointers to objects) and then re-allocated as needed 13:28
FROGGS pmichaud: just watching latest talk... we have a way to mark conjectural tests as such on roast since April... 13:29
13:31 MilkmanDan left, skids left 13:32 JimmyZ_ joined 13:36 MilkmanDan joined, Ven joined 13:43 amurf joined
[Coke] FROGGS: I know there's a fudge syntax, but how do you trigger it when fudging? 13:44
13:47 dayangkun joined 13:48 amurf left
FROGGS [Coke]: fudge takes an option --version 13:48
PerlJam good * #perl6 13:51
[Coke] ok - but it's not invoked by any of the *test targets yet, right?
dalek ast: 4904d78 | FROGGS++ | fudge:
mention --version option for fudge

Note that this needs to be aligned to Perl 6`s language versioning scheme.
13:53
FROGGS [Coke]: it defaults to v6.0.0, and that's what we are aiming for
we need pass that when there is more than one version
13:55 Zoffix left
FROGGS pmichaud: btw, I like 1.2.3 versions... 1.2.4 would be patches that do not add/remove functionality, 1.3.0 would be something that adds features, and 2.0.0 would be something that is incompatible to the previous version 13:55
pmichaud: I'm not saying that this works well enough for a language spec 13:56
but I also don't say it doesn't :P
arnsholt Python is versioned as $major.$minor, and then the compiler is $major.$minor.$patch 13:59
13:59 msouth joined
nwc10 but they sort of already have the same problem as Perl 6 (will) have 14:00
in that, Ppyp is at 2.6, and supports Python version 2.7
er
pypy
and at some point pypy will be at 2.8
and supporting Python version 2.7
and what do the numbers mean?
arnsholt Yeah, Pypy breaks that, that's true. I guess it only holds for CPython
14:04 telex left
FROGGS I don't like to see both having a same-ish version 14:08
14:11 zakharyas left
itz is there anyway of turning off the colour codes in the error messages? 14:16
14:16 rurban joined
psch itz: the env var RAKUDO_ERROR_COLOR defined but false 14:17
e.g. 0 14:18
itz ty
14:26 telex joined 14:29 dayangkun left 14:39 msouth left 14:42 [TuxCM] joined 14:45 diana_olhovik left 14:46 Ven left, diana_olhovik_ joined 14:50 Ven joined 14:52 [Sno] is now known as Sno|Hase
itz "IRC User in Huffy Flounce Shock Horror" 14:53
oops wrong channel :) 14:54
14:55 msouth joined 14:59 Sno|Hase is now known as [Sno] 15:05 espadrine_ joined, espadrine left, espadrine_ is now known as espadrine 15:06 rurban left
jdv79 so, is there some sort of pre-existing way to determine what is not tested yet? 15:11
itz test coverage?
15:11 kurahaupo left
jdv79 the realization that rename() had no tests until a couple weeks ago is a bit concerning 15:11
s/realization/discovery/
basically, in any form, sure
itz AFAIK there is no Devel::Cover 15:12
15:12 skids joined
moritz one could use the JSON data from --profile to create coverage reports 15:14
flussence hmm, it wouldn't be too hard (in theory) to write a setting that writes a list of every sub and unit seen to a file, and every one invoked to another file, then diff those 15:15
itz moritz++ 15:16
flussence but --profile is a better answer because it's already there :)
jdv79 a roast profile would be how many TB? 15:18
i was thinking more about hooking into the debugger stuff but ok
15:19 rurban joined
pmichaud good morning, #perl6 15:19
lizmat pmichaud o/
FROGGS morning pmichaud
hoelzro o/ pmichaud
lizmat is about to come down to the perl6 hackathon
JimmyZ_ o/
pmichaud backlogs 15:20
nwc10 have fun
colomon lizmat: you’re at YAPC::NA?
lizmat colomon: yes 15:23
15:23 diana_olhovik_ left
jdv79 so, i just tried to rebuild and got this: paste.scsys.co.uk/488133 15:24
Ven \o
colomon lizmat++
15:26 kurahaupo1 joined
jdv79 trying from a cleaner slate 15:26
colomon is sorry he’s not there too. 15:27
jnthn afternoon, #perl6 15:30
15:31 lizmat left
nwc10 good UGT heresy, jnthn 15:31
jdv79 seems better now - rebuilt from scratch
15:31 FROGGS[mobile] joined, FROGGS left, FROGGS[mobile] left, FROGGS[mobile] joined 15:33 amurf joined
rurban I'm trying to find a syntax for co/contravariance: see jayconrod.com/posts/76/type-paramet...d-variance 15:33
I like to idea of +/- or nothing
Ven rurban: scala-like? 15:34
rurban yes, but a bit better
design.perl6.org/S06.html says the compiler may decide. 15:35
but then the compiler needs to know exactly if all fields are const
writable objects can only be contravariant
this is needed for type inference
JimmyZ_ afternoon, jnthn 15:36
rurban I'd rather prefer a syntax to define it at compile-time
JimmyZ_ slang? 15:37
jnthn I'm doubtful the default Perl 6 will ever go that far with type inference.
rurban But I'm not sure for which kind of type inferences it will be helpfull at all. The numeric tower not, as they have the same structural layout
15:38 amurf left
jnthn Well, depends if you're doing it primarily for error reporting or optimization. 15:38
rurban jnthn: Ok, so i"ll go forward in my perl5 experiment with type inference and see if it's needed, and if it helps
15:38 lizmat joined
rurban i'm doing it to optimize on types only (inlining and faster ops) 15:39
jnthn We get a lot of that kind of thing to fall out of more general "see what types show up at runtime" 15:40
In Rakudo we can hint "this symbol is a type parameter"; we do nothing with that info on JVM yet, but on MoarVM it's a useful guide to the dynopt. 15:41
15:41 llfourn_ left 15:42 Gardner joined
jnthn The CLR is also a useful data point; it's specialization is less general ('cus they can get away with it for the languages they primarily target), but it JITs per parameterization and has co/contra stuff 15:42
rurban The real problem is, if you strongly type an object, and then method dispatch needs to decide that no supertype exists, on a setter. with inferred types the dispatch is usually correct
but you might want to allow a getter to fall back to a super 15:43
jnthn Well, MoarVM side-steps the whole thing by specializing on exact types.
:)
rurban invariance, ok 15:44
jnthn If you really want to decide it at static (program compile) time, C++ style, then yeah, you have those issues.
rurban it's faster certainly
jnthn Depends. :)
15:44 llfourn joined
rurban class MyNum is <Num {#contra } class MyNum is >Num { #co } class MyNum is Num { #invariant } 15:47
15:47 fhelmberger joined 15:49 fhelmberger left, rurban left, fhelmberger joined, fhelmberger left, ab6tract left
Ven rurban: it's gonna be problematic with untyped hashes/lists though 15:50
15:51 rurban joined 15:52 domidumont left 15:55 Ven left 15:56 zakharyas joined
pmichaud question from the hackathon: how to run the tests for the DBIish module ? 16:01
[Coke] is "ufo" still the answer to that question? 16:02
jdv79 could someone look at github.com/rakudo/rakudo/pull/439 ? 16:03
pmichaud I haven't done much with modules or associated test suites, so I don't know the answer to that question.
hoelzro pmichaud: I would probably say panda-test
I think that panda and its associated scripts have pretty much replaced ufo for just about everything 16:04
itz I find ufo useful for debugging module changes via "make install test"
jnthn Though if you're standing in a checkout of a mdoule, the easiest incantation is perhaps prove -e "perl6 -Ilib" t 16:05
flussence I dunno if DBIish does anything fancy, but ^what jnthn said :)
jnthn Though yeah, it won't have pre-comp'd
16:06 Gardner left
flussence (I have a shell alias that calls exactly that, minus the t on the end because prove's smart enough to dwim) 16:06
dalek kudo/nom: 897bef2 | jdv79++ | src/core/io_operators.pm:
Add createonly to rename(). See RT #125280.
kudo/nom: 1ccb15d | lizmat++ | src/core/io_operators.pm:
Merge pull request #439 from jdv/nom

Add createonly to rename(). See RT #125280.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125280
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125280
hoelzro jdv79: seems good; do you have associated tests in roast?
lizmat jdv79: what hoelzro said
:-) 16:07
16:07 [TuxCM] left
jdv79 was waiting to push those but yes 16:07
hoelzro also, does open() have :createonly?
lizmat think so
hoelzro it's not in S16 16:08
lizmat hmmm....
hoelzro or the S32 covering open()
JimmyZ_ create-only
jdv79 thanks
dalek ast: 6b1e3bf | jdv79++ | S32-io/rename.t:
Add createonly tests. See RT #125280.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125280
jnthn flussence: ooh, I didn't know about the dwim :) 16:09
flussence yeah, it's handy because you can leave it off for implied "t/", or give it a list of filenames to run 16:10
16:10 diana_olhovik_ joined
pmichaud if someone(s) is (are) looking for a GLR-related task 16:11
here at yapc::na (and on channel) we've been looking at removing the itemization from circumfix:<[ ]> 16:12
i.e., [ ] would create an array (but not itemized)
if someone would like to try making that change in a branch and report if it can be made to work, that'd be great :) 16:13
16:13 Gardner joined, spider-mario joined
pmichaud (I can do it, but this task seems delegable) 16:13
the basic step would seem to be to change Array.pm 16:15
sub circumfix:<[ ]>(*@elems) is rw { my $ = @elems.eager }
to
TimToady WHAT?
pmichaud sub circumfix:<[ ]>(*@elems) is rw { @elems.eager } 16:16
16:16 uncleyea1 joined, wingfold joined
jdv79 m: for my $a () # ok 16:17
camelia rakudo-moar d58e39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NBa8OeHlv4␤This appears to be Perl 5 code␤at /tmp/NBa8OeHlv4:1␤------> 3for 7⏏5my $a () # ok␤»
jdv79 m: for my $/ () # what
camelia rakudo-moar d58e39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HkIV3lGWFq␤Signatures as constraints on variables not yet implemented. Sorry. ␤at /tmp/HkIV3lGWFq:1␤------> 3for my $/ () # what7⏏5<EOL>␤»
pmichaud (also on curlies, but let's start with [] first :-)
jdv79 why the diff there?
dalek kudo/arr-con-not-item: aeecc2a | jnthn++ | src/core/Array.pm:
Make [...] not be an item.
jnthn pmichaud: It builds, fails one sanity test 16:18
16:18 uncleyear left, [TuxCM] joined
pmichaud jnthn: I'm more interested in how many spectests fail. :) 16:18
moritz wow, that's more than can be said about most list-related changes I've tried :-)
pmichaud (and what it takes to make them not fail)
jnthn pmichaud: I'll delegate that part :P 16:19
pmichaud jnthn: +1
jnthn (or do it later, but got a distraction now)
16:19 dwarring left
TimToady these Czech programmers, so lazy 16:19
16:21 gagalicious joined
jnthn Hey, I flew to London today :P 16:21
gagalicious how do i escape a string inside a regex?
PerlJam "escape a string"? why? 16:22
gagalicious $string=~m!$pattern!;
16:22 anocelot joined
geekosaur not sure what you're asking? iirc $foo interpolates literally and <$foo> interpolates as a regex though 16:22
gagalicious i would like to make sure my $pattern is escaped
pmichaud in perl 6 you don't need to escape a string
$pattern isn't interpolated, it's matched literally
jnthn ummm, when I "make spectest" 16:23
gagalicious what about perl5? how do i do that?
jnthn C:\PERL64\BIN\perl.exe t/harness --fudge --moar --keep-exit-code --tests-from-file=t/spectest.data
Inline::Perl5 not installed: not running Perl 5 integration tests
Use of uninitialized value in split at t/harness line 154.
Files=0, Tests=0, 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
Result: NOTESTS
Did we break it? :)
geekosaur not really the right channel for that but in perl5 use \Q
jnthn Anyway, really gone for a bit
geekosaur \Q$foo\E matches the contents of $foo literally 16:24
(alternately use the quotemeta function)
16:26 zakharyas left, _mg_ left, domidumont joined
flussence see also: `perldoc -q regex` 16:27
JimmyZ_ hmm, looks like is rw got removed too from that branch 16:28
jdv79 what is the equivalent(s) to the p5 stash? 16:38
world something?
16:40 shamu joined
hoelzro jdv79: you mean a package stash? 16:42
iirc, MyPackage.WHOP
dammit
MyPackage.WHO
jdv79 i want to get all the symbols for coverage checkinng. looking at S02#Names now. 16:44
16:45 itz left, molaf joined
timotimo moarvm does something clever with its dynamic code specializer to build a routine-level profiler; it could do something similar for coverage reports 16:46
16:48 smls left
pmichaud chars "123": 16:48
m: chars "123":
camelia rakudo-moar 1ccb15: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2dGzsjgtvJ␤Confused␤at /tmp/2dGzsjgtvJ:1␤------> 3chars "123":7⏏5<EOL>␤ expecting any of:␤ colon pair␤»
16:50 JimmyZ_ left 16:51 araujo left
TimToady m: say chars "123": ; 16:51
camelia rakudo-moar 1ccb15: OUTPUT«3␤»
TimToady m: say chars "123":
camelia rakudo-moar 1ccb15: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UfD73zu7JR␤Confused␤at /tmp/UfD73zu7JR:1␤------> 3say chars "123":7⏏5<EOL>␤ expecting any of:␤ colon pair␤»
16:52 muraiki joined, araujo joined 16:59 Zhtwn joined 17:00 cognominal joined 17:06 lsm-desktop joined 17:07 Gardner left 17:08 llfourn left
hoelzro m: .say for OUTER::OUTER::.keys 17:09
camelia rakudo-moar 1ccb15: OUTPUT«&pipe␤&symlink␤RESTRICTED-CLASS␤$=pod␤$!␤$_␤EXPORT␤&rmdir␤&MAKE-DIR␤&SYMLINK-PATH␤&UNLINK-PATH␤!UNIT_MARKER␤&chmod␤&CHANGE-DIRECTORY␤PIO␤GLOBALish␤::?PACKAGE␤&link␤&rename␤&COPY-FILE␤NativeCall␤@?INC␤$=finish␤&…»
hoelzro jdv79: ^
17:09 espadrine left
Util is at the Perl 6 Hackathon :^) 17:14
This is very nice: github.com/perl6/specs/blob/master/contents.pod
Shouldn't it also show up somewhere on this web page? : design.perl6.org/
17:17 Gardner joined
dalek c: 44ab10f | (Kevin Metcalf)++ | bin/p6doc:
Added "Function" entry to usage example.
17:18
ab5tract smls: so when I was asking earlier about '@ = gimme-lists()', I was trying to get to the bottom of (my @ = 'a'..'z') pattern in grondilu's golfs yesterday 17:21
irclog.perlgeek.de/perl6/2015-06-10#i_10727483
17:22 andreoss joined
ab5tract But thank you for the breakdowns. I will try to find them a good place to put it in doc.git 17:22
andreoss my $*VAR = 1 is lexical or dynamic? 17:23
m: my $*V = 1; say $*V;
camelia rakudo-moar 1ccb15: OUTPUT«1␤»
TimToady it's lexical *and* dynamic 17:24
the symbol is stored in the lexical pad, but accessed dynamically
17:24 FROGGS joined
lizmat for those interested in NQP programming: github.com/edumentab/rakudo-and-nq...als-course 17:24
17:30 daotoad joined
andreoss m: $*V = 9 ; my $*V = $*V // 8; say $*V 17:31
camelia rakudo-moar 1ccb15: OUTPUT«9␤»
andreoss m: our $*V = 9 ; my $*V = $*V // 8; say $*V
17:31 domidumont left
camelia rakudo-moar 1ccb15: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $*V␤ at /tmp/U9Ffwmhvwr:1␤ ------> 3our $*V = 9 ; my $*V7⏏5 = $*V // 8; say $*V␤9␤» 17:32
andreoss m: our $*V = 66; sub x { $*V }; {my $*V = $*V.defined ?? $*V !! 12; say x():} 17:35
camelia rakudo-moar 1ccb15: OUTPUT«12␤»
jdv79 timotimo: where is that? 17:38
andreoss my $*V is done earlier that $*V.defined? 17:39
17:39 Gardner left
lizmat m: sub a(int $a) { say $a }; a 2**10; a 2**100 # so we unbox automagically to int, but we have no range check ? 17:41
camelia rakudo-moar 1ccb15: OUTPUT«1024␤0␤»
17:42 rurban left, Gardner joined
Util Lembark asked "Why is it named `panda`". 17:44
I said "I don't know. Maybe `(Perl) and a..."
:^)
tadzik: real reason?
dalek c: 982223a | (Kevin Metcalf)++ | bin/p6doc:
Updated to use lowercase example.
17:47
pmichaud Util: I think perhaps the "pan" is relating to c-"pan"
TimToady maybe it's a multi-lingual coinage, like "pango" is All Languages in Greek and Japanese 17:48
so it's All Fields or some such
jdv79 cpandatesters.perl6.org is a lame name imho 17:49
andreoss m: class Y { method z { state $x ||= (^10).pick }} ; my $x = Y.new; my $y = Y.new ; say $x.z ~ " " ~ $y.z;
camelia rakudo-moar 1ccb15: OUTPUT«4 4␤»
TimToady 兌 is DA, "exchange" 17:50
17:51 rindolf left 17:54 Ven joined, araujo_ joined
FROGGS jdv79: that's why the 'official' url is testers.perl6.org 17:54
17:56 araujo left 17:57 yqt joined
andreoss should be state variable be shared between two instances of class? 17:58
can i have per instance state? 17:59
lizmat isn't that called a private attribute ? 18:00
18:02 diakopter joined, Ven left
lizmat m: my int $a = 1 + 2**100; say $a # also silent, but I think more acceptable, because it is clear you're using a native here 18:03
camelia rakudo-moar 1ccb15: OUTPUT«1␤»
diakopter jnthn: my USB Armory board arrived. I'll try building rakudo on it once I get a working Linux
lizmat whereas in the sub case, it is unclear for the caller, and the receiver cannot see it was something else entirely 18:04
FROGGS hi diakopter!
lizmat diakopter o/
diakopter 'course, it has only a half gig of memory (but surely it can use swap from flash!?)
hi
o/
FROGGS :D
diakopter: well, it is called flash because it is damn fast, no? 18:05
diakopter i dunno
18:07 FROGGS[mobile] left
pmichaud what's the standard mechanism for someone to submit a Rakudo pull request? 18:09
lizmat m: 'multi sub a(Int $a) { say "Int $a" }; multi sub a(int $a) { say "int $a" }; a 2; a 2**10; a 2**100 # int candidate is never taken
camelia rakudo-moar 1ccb15: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gAclgeS7oI␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/gAclgeS7oI:1␤------> 3 2**100 # int candidate is never taken7⏏5<EOL>␤ expecting any of:␤ sing…»
diakopter maybe i should first build it for arm in an emulator image and transfer it over
lizmat m: multi sub a(Int $a) { say "Int $a" }; multi sub a(int $a) { say "int $a" }; a 2; a 2**10; a 2**100 # int candidate is never taken
camelia rakudo-moar 1ccb15: OUTPUT«Int 2␤Int 1024␤Int 1267650600228229401496703205376␤»
FROGGS pmichaud: just open a PR
pmichaud FROGGS: how exactly does one do that? Through the github interface, or ...?
FROGGS pmichaud: fork -> hack -> PR 18:10
pmichaud (hint: I've never opened a PR because I always have push access )
18:10 andreoss left
pmichaud does the fork have to be a github fork? 18:10
FROGGS pmichaud: yes, the website is great... you can click on 'edit' in every repo, and it will fork to your user and edit that file
18:10 rurban joined
FROGGS after changing something and commiting (in the webeditor), your can click on 'compare and pull request' 18:11
pmichaud: yes
pmichaud well, in this case we have a working patch in a clone'd repo
18:11 Gardner left
pmichaud re-entering the patch in the webeditor seems... unsafe. 18:11
lizmat would expect either a dispatch fail because finding more than one candidate, or calling the int one on at least 2
FROGGS pmichaud: if you clone and push to a repo hosted elsewhere, you can only email git-am ready patches to RT
pmichaud: you dont have to... you can also click on fork, checkout the forked repo, modify and push 18:12
pmichaud: after that you visit your fork and click again on 'compare and pull request'
tadzik Util: it's named after my dog
(rip :() 18:13
FROGGS ohh
panda++ then
lizmat :-(
panda++ indeed!
18:14 quietfanatic joined
quietfanatic so what's the recommended way to install rakudo to /usr/local? 18:14
18:14 [Sno] left
FROGGS pmichaud: online editing is just nice if you want to correct a typo, and do not intend to get involved more 18:14
pmichaud right. 18:15
quietfanatic I tried Configure.pl --prefix=/usr/local but I had permission issues because it does both building and installing in the same step
skids pmichaud: but if you have push access github will "helpfully" just commit on you by surprise.
FROGGS quietfanatic: sudo perl Configure --prefix=/usr/local --gen-moar --make-install # in the rakudo checkout
quietfanatic: yes, there are three packages involved... moarvm, nqp rakudo 18:16
quietfanatic that works, but then I'll have root-owned files all over the rakudo directory
FROGGS quietfanatic: you need to install moarvm to build nqp for example
quietfanatic I guess I could do that and then chown everything...
FROGGS quietfanatic: or you install the three sequentially
pmichaud we normally don't expect people to be installing from the rakudo clone
timotimo jdv79: it's inside MoarVM
quietfanatic oh, do the monthly releases have a better way? 18:17
dalek kudo/nom: 287ab14 | (Nick Logan)++ | src/core/Exception.pm:
Don't add ", or" if @available.elems == 1
kudo/nom: 4539828 | lizmat++ | src/core/Exception.pm:
Merge pull request #419 from ugexe/exception-nyi-message-fix

Don't print ", or" if @.available.elems == 1
quietfanatic In that case I guess I'll just do what everybody else does and link from ~/bin
FROGGS quietfanatic: that'd be the easiest
pmichaud quietfanatic: if someone is installing into the system, we somewhat expect installing moarvm, nqp, and rakudo in separate steps.
timotimo it might be fun to expose spesh to be scriptable by the user :3 18:18
hoelzro I asked this yesterday, but no one replied: what's the policy for accessing globaly things (eg. $*ARGFILES) from separate threads? "play with fire and you're going to get burned", or do we try to protect people from themselves?
pmichaud the --gen-moar is intended to be a developer convenience, not a system-admin-way-of-doing-things
lizmat hoelzro: you need to protect yourself
hoelzro ok, that's what I figured
thanks for the confirmation, lizmat! 18:19
lizmat there's no protection whatsoever
scalars *may* be the exception on simple assignments
timotimo scalars don't protect you 18:20
quietfanatic pmichaud: ah, okay. Seems like a lot of unnecessary work but I guess that's what package managers are for
lizmat m: my $a = 0; await do for ^5 { start { $a++ for ^1000 } }; say $a # not 5 * 1000
camelia rakudo-moar 1ccb15: OUTPUT«3451␤»
lizmat m: my $a = 0; await do for ^5 { start { $a++ for ^1000 } }; say $a # not 5 * 1000
camelia rakudo-moar 1ccb15: OUTPUT«4731␤»
FROGGS quietfanatic: with six lines you can also install to /usr/local from the three involved repositories if that is what you want 18:21
18:21 domidumont joined
quietfanatic I'll figure something out, thanks 18:22
lizmat m: my @a; await do for ^5 { start { @a.push($_) for ^100 } }; say @a.elems # clunk! 18:23
camelia rakudo-moar 1ccb15: OUTPUT«499␤»
lizmat m: my @a; await do for ^5 { start { @a.push($_) for ^100 } }; say @a.elems # clunk!
camelia rakudo-moar 1ccb15: OUTPUT«500␤»
lizmat m: my @a; await do for ^5 { start { @a.push($_) for ^100 } }; say @a.elems # clunk!
camelia rakudo-moar 1ccb15: OUTPUT«(signal ABRT)*** Error in `/home/camelia/rakudo-inst-1/bin/moar': realloc(): invalid next size: 0x00007fc36c01c930 ***␤======= Backtrace: =========␤/lib64/libc.so.6(+0x730bf)[0x7fc373ce60bf]␤/lib64/libc.so.6(+0x7892e)[0x7fc373ceb92e]␤/lib64/libc.so…»
lizmat m: my @a; await do for ^5 { start { @a.push($_) for ^100 } }; say @a.elems # clunk!
camelia rakudo-moar 1ccb15: OUTPUT«466␤»
lizmat m: my @a; await do for ^5 { start { @a.push($_) for ^100 } }; say @a.elems # clunk!
camelia rakudo-moar 1ccb15: OUTPUT«(timeout)*** Error in `/home/camelia/rakudo-inst-1/bin/moar': realloc(): invalid next size: 0x00007ffb4801c930 ***␤» 18:24
lizmat anyway, so don't do that :-)
[Coke] diakopter: hio
FROGGS quietfanatic: gist.github.com/FROGGS/2d36d141ca34d814f1db
quietfanatic: ups, needs a make step...
for every package 18:25
skids m: my $a = "B"; my @a = (); say (flat (@a.join(', ') || (), $a) ).join(" or ") # That X::NYI::Available code did used to work IIRC, and a more DRY fix.
camelia rakudo-moar 1ccb15: OUTPUT«B␤»
FROGGS I updated the gist
lizmat m: my @a; my $l = Lock.new; await do for ^5 { start { $l.protect( { @a.push($_) } ) for ^1000 } }; say @a.elems # low level approach, probably don't do that 18:26
camelia rakudo-moar 1ccb15: OUTPUT«5000␤»
quietfanatic sorry for all the newb questions but when I link to perl6 from ~/bin and run it it says "Unhandled exception: While looking for 'Perl6/Grammar.moarvm': no such file or directory" 18:31
FROGGS why is stuff that deals with encoding always try&error for me when I write P5?
quietfanatic: did you make install? 18:32
ohh
quietfanatic: to which perl6 did you link?
do not link to the one in the repo, but to the one in install/bin/
quietfanatic ah I forgot about that 18:33
18:33 rurban left
quietfanatic never does the reading closely enough 18:33
skids m: my $a = "B"; my @a = (); say @a ?? (@a.join(', '), $a).join(" or ") !! $a; # or keeping the ternary, you can lose the || () because its function was entirely to remove the " or ".
camelia rakudo-moar 1ccb15: OUTPUT«B␤»
quietfanatic okay thanks, everything's good now 18:34
FROGGS quietfanatic: have fun
18:36 domidumont left, andreoss joined 18:37 lolisa joined
quietfanatic thanks. I'm thinking of reviving Link::C 18:39
18:39 itz joined 18:40 bin_005 joined
FROGGS quietfanatic: ohh, interesting... so it is a bit like SWIG? 18:41
I hope you know about NativeCall
quietfanatic The goal is to make using C libraries in Perl 6 as easy as it is to use them in C 18:44
that is, you just need to supply the header file and the library name, and it'll read the header file and do all the linking for you
FROGGS I understand that... I just skimmed github.com/quietfanatic/link-c/
quietfanatic NativeCall should make this much easier. Previously I had to deal with Parrot's FFI 18:45
Also Rakudo is now fast enough that I shouldn't have to shell off to a Perl 5 parser :)
FROGGS yeah
though, grammars are faster that calling .get in a loop, or using .lines 18:46
quietfanatic Really? That's pretty cool
FROGGS s/that/than/ 18:47
quietfanatic Earlier I actually used a full Perl 5 grammar with the (?(define)) construct
or no 18:48
or yeah
FROGGS hehe
18:49 rurban joined
quietfanatic Complete with returning the data through (?{}) constructs and discovering that for some reason captures don't create lexical scopes for embedded perl code but (?>) does 18:49
IIRC 18:50
nwc10 quietfanatic: which version of Perl 5 was this? Dave fixed a chunk of bugs recently-ish, but tht might have been for v5.18
quietfanatic I think it was 5.10 18:51
nwc10 quite possibly what you describe is still inconsistent in current versions too
aha.
quietfanatic tit was old enough that I was running into problems with the regex engine not being reentrant
nwc10 life will be better with v5.18 or newer
18:51 andreoss left
quietfanatic anyway, now I'm using v6 so :) 18:51
FROGGS ... as advertised by rjbs++
nwc10 yes, that seems something like the old sigs "it said windows 95 or better, so I used a Mac" 18:52
FROGGS :D
quietfanatic hahaha
Util panda++ Thanks, tadzik! 18:54
18:55 rurban left 18:56 meisl joined, quietfanatic left 18:58 virtualsue joined, daotoad left
meisl hello #perl6 18:58
PerlJam meisl: greetings!
FROGGS hi meisl
meisl hi; no questions today, so you can relax (at least none pressing :) 19:00
PerlJam
.oO( when would we *not* relax? ;)
meisl sure, -Orelax 19:01
FROGGS PerlJam: when attempting to fix an Oracle database instance that runs on a windows server that is unable to spawn processes :o)
which... is what I did an hour ago 19:02
meisl without success?
FROGGS meisl: with success 19:03
because I'm smart :D
PerlJam FROGGS: that sounds like the perfect time to relax so that you can get it done. :)
FROGGS: relaxed, but focused.
FROGGS I'm a man, I can't do both
meisl hehe
19:04 skids left, Zhtwn left
meisl FROGGS: seems we're lacking a really manly hyper-op, for auto-parallelization 19:06
FROGGS meisl: and at least for me I can say that my extendability is limited 19:08
19:10 amurf joined
meisl well, there are things for which unlimited expandability would be unhealthy, indeed 19:11
(or extensibility?) 19:12
19:15 amurf left
meisl FROGGS: seriously: what about a new Rakudo* release? (particularly the .msi, which you're the one for I figure) 19:18
19:20 rurban joined 19:21 rurban left 19:22 skids joined
FROGGS meisl: if one would do a star release I can easily create the msi's 19:25
19:25 domidumont joined
meisl i see 19:25
FROGGS meisl: though I do not have time today or tomorrow to do a star release
19:37 Gardner joined
dalek pan style="color: #395be5">perl6-examples: 69413b3 | (Steve Mynott)++ | lib/Pod/Htmlify.pm6:
reenable Text::VimColour
19:38
pan style="color: #395be5">perl6-examples: dc45912 | (Steve Mynott)++ | / (2 files):
import and use initial vim.css
pan style="color: #395be5">perl6-examples: 738b853 | (Steve Mynott)++ | .travis.yml:
Text::VimColour in travis
19:39
19:40 molaf left 19:46 [Sno] joined 19:49 domidumont left 19:51 nowan_ joined 19:53 nowan left 19:57 itz left 20:02 Gardner left 20:03 llfourn joined 20:05 Gardner joined 20:08 llfourn left
dalek kudo/nom: 0ebea8a | flussence++ | docs/running.pod:
Document --profile-filename switch in the manpage

The switch doesn't quite fit on one line, so I've followed coreutils' lead for formatting it. I've also added a short blurb about the default value and json formatting.
20:09
kudo/nom: 821ea7a | lizmat++ | docs/running.pod:
Merge pull request #417 from flussence/patch-1

Document --profile-filename switch in the manpage
kudo/nom: 7ec91e6 | (Chris Jepeway)++ | src/core/Temporal.pm:
Preserve $.timezone in DateTime.later()
20:10
kudo/nom: 975eb98 | (Chris Jepeway)++ | src/core/Temporal.pm:
changed :timezone($.timezone) => :$.timezone -- vendethiel++
kudo/nom: 953b7e8 | (Chris Jepeway)++ | src/core/Temporal.pm:
Fix .later(seconds => ...) to preserve &.formatter
kudo/nom: c194502 | (Chris Jepeway)++ | src/core/Temporal.pm:
Fix DateTime.later() to preserve &.formatter
kudo/nom: 5232f32 | (Chris Jepeway)++ | src/core/Temporal.pm:
First, erroneous cut at fixing DateTime.{local,utc} so
kudo/nom: cead6f1 | lizmat++ | src/core/Temporal.pm:
Merge pull request #418 from cjepeway/date-time-slices-tz

Preserve $.timezone in DateTime.later()
kudo/nom: d13ba35 | paultcochrane++ | t/02-rakudo/01-is_approx.t:
Add "tests" showing current is_approx() behaviour
20:14
kudo/nom: 6ba1b45 | paultcochrane++ | lib/Test.pm:
Replace is_approx() algorithm with relative difference algorithm

Make is_approx the new is-approx, restore the old
20:15 dalek left, dalek joined, ChanServ sets mode: +v dalek 20:20 ggoebel joined
RabidGravy wahat a lot of commits 20:21
[Coke] (star release) were the module installations ever fixed? 20:22
20:22 nys joined 20:23 virtualsue left
lizmat RabidGravy: I'm going through some recentish pull requests
20:25 daotoad joined 20:26 Zhtwn joined 20:27 virtualsue joined 20:30 muraiki left 20:31 zakharyas joined
dalek kudo/nom: 51e88b9 | lizmat++ | lib/Test.pm:
Eliminate return for better test performance
20:33
20:35 darutoko left
[Coke] is last element returns really faster than "return" ? that seems like something that should be identical. 20:38
lizmat should and will be, not right now
pmichaud "return" is exceptional.
lizmat $ 6 'sub a { 42 }; for ^10000000 { a }'
real0m2.036s
pmichaud as in, it throws an exception, that needs to be catchable.
lizmat $ 6 'sub a { return 42 }; for ^10000000 { a }' 20:39
real0m15.357s
pmichaud at least, that's the way it was at one time.
lizmat $ 6 'sub a { return 42 }; for ^10000000 { }'
real0m2.036s
pmichaud: it still is
and it's not optimized away just yet
pmichaud well, I'm wondering about that "needs to be catchable" part still being true. :)
lizmat ah, afaik, jnthn thinks a tail return can be optimized away 20:40
hence I think it doesn't need to be catchable anymore 20:41
pmichaud oh, it likely can be even if catchable, if we have a way of knowing whether a return catcher is in effect
20:43 travis-ci joined
travis-ci Rakudo build failed. lizmat 'Merge pull request #417 from flussence/patch-1 20:43
travis-ci.org/rakudo/rakudo/builds/66439652 github.com/rakudo/rakudo/compare/4...1ea7addabe
20:43 travis-ci left
RabidGravy eh? 20:44
meisl lizmat: "tail call optimization", or "proper" tail calls as some call it, require "returns" to be non-catchable 20:49
dalek kudo/nom: aa79616 | TimToady++ | src/core/Real.pm:
simplify sign implementation
20:50
ast: 4dd5f13 | TimToady++ | S32-num/sign.t:
update to new sign(Int) behavior
20:51
meisl lizmat, pmichaud: so: no-return-catcher-in-effect analysis is necessary prior to tail call opt
(or, rewrite "catching" a return control exception being caugth appropriately, then tail calls) 20:52
nwc10 TimToady++ # method sign(Real:D:) { self > 0 ?? 1 !! self < 0 ?? -1 !! self } 20:54
[Coke] but I think linguistically we don't want there to be a difference between implicit and explicit return.
lizmat TimToady: your last patch subtly changes the meaning of e.g. Int.sign
m: say Int.sign
camelia rakudo-moar 51e88b: OUTPUT«(Mu)␤»
lizmat this *will* become Int now
TimToady it throws an error now
meisl [Coke]: "linguistically"? 20:55
AlexDaniel m: say grammar Gram { regex TOP { ('XX')+ %% $<delim>=.* }; }.parse('XXXX'); 20:56
camelia rakudo-moar 51e88b: OUTPUT«「XXXX」␤ 0 => 「XX」␤ 0 => 「XX」␤ delim => 「」␤ delim => 「」␤»
AlexDaniel what's wrong with these empty delimeters? 20:57
why are they in this order?
m: say grammar Gram { regex TOP { ('XX')+ %% $<delim>=.* }; }.parse('XXyXXz'); 20:58
camelia rakudo-moar 51e88b: OUTPUT«「XXyXXz」␤ 0 => 「XX」␤ delim => 「y」␤ 0 => 「XX」␤ delim => 「z」␤»
AlexDaniel pay attention to the order
flussence do you mean how the second 0 and first delim swap places? 20:59
AlexDaniel yes 21:00
21:00 itz joined
AlexDaniel flussence: is there any meaningful reason for that? 21:01
m: say grammar Gram { regex TOP { ('XX')+ %% $<delim>=.* }; }.parse('XXXXyXXz');
camelia rakudo-moar 51e88b: OUTPUT«「XXXXyXXz」␤ 0 => 「XX」␤ delim => 「XXy」␤ 0 => 「XX」␤ delim => 「z」␤»
AlexDaniel now, this does not make any sense at all to me
oh no, it does 21:02
hm
21:02 timbunce_ joined
meisl [Coke]: do you mean semantically? If so, I agree - and hope that this is fixed in the synopses. I'm only talking of optimization. 21:02
AlexDaniel didn't notice how one XX went into delimiter
21:03 skids left
AlexDaniel m: say grammar Gram { regex TOP { ('XX')+ %% $<delim>=<[a..z]>* }; }.parse('XXXXXX'); 21:05
camelia rakudo-moar 51e88b: OUTPUT«「XXXXXX」␤ 0 => 「XX」␤ 0 => 「XX」␤ delim => 「」␤ 0 => 「XX」␤ delim => 「」␤ delim => 「」␤»
21:12 virtualsue left, bin_005 left 21:13 telex left, timbunce_ is now known as timbunce
flussence m: given grammar { regex TOP { ('XX')+ %% $<delim>=<[a..z]>* }; }.parse('XXXXXX') { say .[0]; say .<delim> } 21:14
camelia rakudo-moar 51e88b: OUTPUT«「XX」 「XX」 「XX」␤「」 「」 「」␤»
flussence m: given grammar { regex TOP { ('XX')+ %% $<delim>=<[a..z]>* }; }.parse('XXXXXX') { say .list; say .values; }
camelia rakudo-moar 51e88b: OUTPUT«「XX」 「XX」 「XX」␤「XX」 「XX」 「XX」 「」 「」 「」␤»
21:14 telex joined
flussence m: given grammar { regex TOP { ('XX')+ %% $<delim>=<[a..z]>* }; }.parse('XXXXXX') { say .list; say .hash.values; } 21:14
camelia rakudo-moar 51e88b: OUTPUT«「XX」 「XX」 「XX」␤「」 「」 「」␤»
TimToady that looks right for %%
for % you'd get one less
21:15 zakharyas left
TimToady m: given grammar { regex TOP { ('XX')+ % $<delim>=<[a..z]>* }; }.parse('XXXXXX') { say .list; say .hash.values; } 21:15
camelia rakudo-moar 51e88b: OUTPUT«「XX」 「XX」 「XX」␤「」 「」␤»
21:16 bin_005 joined
AlexDaniel TimToady: don't you think that the delimiter should be between XXs? 21:16
or is it unordered?
jdv79 trying to get code that used to run on rakudo 6 months ago is not too much fun 21:17
meisl lizmat, pmichaud, [Coke]: I'm sorry, proper tail calls vs implicit/explicit return is of course not the same, only closely related. Omitted quite a bit...
lizmat t/spec/S03-operators/nesting.t , line 41 broke
21:21 ggoebel left 21:22 wingfold left
pmichaud [Coke]: well, the truth is that explicit return is different from implicit return. Or else we treat all subs as having a 'return' at the end (tossing the exception), in which case we always pay the cost. 21:24
dalek kudo/nom: 0b60530 | TimToady++ | src/core/Real.pm:
force sign(Same) to return 0
[Coke] pmichaud: we either need to do that or document the crap out of it. 21:25
heading out, probably will be back sundayish. later. 21:26
timbunce Is rakudobrew still a good way for me to get a fresh rakudo? (It's not mentioned on perl6.org/compilers/ and there's only one mention in rakudo.org/?s=rakudobrew from 2011) 21:27
geekosaur remembers back when perl 5 had a really expensive explicit return...
timbunce and not mentioned in rakudo.org/how-to-get-rakudo/ 21:28
meisl pmichaud, [Coke]: isn't that just a matter of optimization (although an important one)?
lizmat timbunce: afaik, it still is
RabidGravy timbunce, it works well
timbunce thanks 21:30
21:33 daotoad left 21:35 Gardner left 21:39 diana_olhovik_ left
dalek kudo/nom: 0f53d57 | lizmat++ | src/core/Temporal.pm:
Revert code that had debugging in it
21:41
pmichaud meisl: if it's "just a matter of optimization", then thus far it's not been a trivial one (else it would've been done by now) 21:42
determining if a relevant handler is in effect is non-trivial. and just introducing a handler (that may be primarily interested in exceptions other than 'return') could significantly slow things down. 21:43
cognominal pmichaud, how the GLR is going? 21:46
pmichaud working on it now. :)
new version of S07
meisl pmichaud: sure, I'm not saying it's trivial. Rather that I'm feeling this is a difference which the user should (normally) *not* be bothered with. That is: semantically there should be NO difference between explicit and implicit return. 21:47
pmichaud except that semantically there *is* a difference.
return handling is discussed in S04:1122, "Control exceptions". Notably that section makes a clear distinction between "falling off the end of a block" and "abnormal control flow". It then goes on to use 'return' as the principle example of "abnormal control flow".
synbot6 Link: design.perl6.org/S04.html#line_1122
meisl guess I missed something - could you explain? 21:48
pmichaud so, falling off the end of a block would not be caught by a CONTROL handler, whereas "return" would be.
cognominal Am I right to assume the biggest things that will affect the specs until the September freeze are the GLR and lizmat's newio branch?
pmichaud cognominal: and native shaped arrays 21:49
fsvo "specs"
cognominal fsvo?
pmichaud "for some value of"
21:49 Gardner joined
cognominal well, shaped arrays should not affect existing code? 21:50
pmichaud cognominal: I hesitate to make such predictions. :)
TimToady depends on whether the speculated syntax is adequate
cognominal I don't ask for a commitment, just want to get a general idea :) 21:51
pmichaud even then, I don't have a >50% confidence level that it won't affect existing code 21:52
we just don't know where the mines are buried.
that's part of the reason why native shaped arrays are considered pre-6 critical
21:52 llfourn joined
cognominal ok 21:52
pmichaud because they _may_ have that effect on existing code
TimToady the NFG changes turned out to be minimal (whew!) 21:53
lizmat cognominal: perhaps :-) 21:54
timbunce rakudobrew build-panda failure "error: The following untracked working tree files would be overwritten by merge" gist.github.com/timbunce/2440accbede7255168c6
any suggestions re ^?
21:55 khisanth_ joined
cognominal I think Unicode support with NFG will be a big selling point. People want unicode but don't expect things that were O(1) to suddenly change. 21:55
21:56 Gardner left 21:57 llfourn left, Khisanth left 21:58 bin_005_q joined, bin_005 left
meisl pmichaud: ok, i see S04 - and have to meditate over it again. But still, even it contains "which is likely to be optimized away in specific cases" - and a "return" at the end of sub really should be one of these, imho. 21:59
pmichaud my @a = ♭ @b, 3, 4, 5; # prefix:<♭> as the flattening operator :-P :-P
timbunce tadzik: any ideas about gist.github.com/timbunce/2440accbede7255168c6 22:00
cognominal seeing an EXPORTALL in S11 but none on rakudo
pmichaud meisl: I'm in agreement about optimizing it away. :) 22:04
the existence of a CONTROL handler may be another of those "mini-context" flags that I keep throwing around (like sink) 22:05
22:06 rurban joined
RabidGravy okay, that's officially weird "*** Error in `/home/jonathan/.rakudobrew/moar-nom/install/bin/moar': malloc(): smallbin double linked list corrupted: 0x00000000036c0c40 ***" 22:08
22:08 Zhtwn left, itz left
RabidGravy only if I have a sub:infix<~~> .... at the end of the file 22:09
meisl pmichaud: without having completed my meditation - put the handlers aside for a moment, and imagine a sub with "premature returns" in it, wouldn't you, as a human, be able to rewrite it in a matter of minutes into one without them?
22:10 yqt left
lizmat answering for pmichaud: yes, but the computer isn't is so smart :-) 22:10
22:10 kaare_ left, yqt joined 22:11 rurban left, Zhtwn joined
pmichaud there are a lot of programmers that are strongly averse to implicit return. 22:12
jdv79 m: say "a\nb\nc\n" ~~ m:global/.*?\n/ #ok
camelia rakudo-moar 0b6053: OUTPUT«「a␤」 「b␤」 「c␤」␤»
jdv79 m: my $r=".*?\n"; say "a\nb\nc\n" ~~ m:global/<$r>/ # what
camelia rakudo-moar 0b6053: OUTPUT«「」 「」 「」 「」 「」 「」 「」␤»
jdv79 i think those used to be the same
well, probably not actually 22:13
lizmat RabidGravy: could you golf and rakudobug, seems important
pmichaud Here at yapc::na I've even encountered a couple of cases where people are using gather/take instead of a simple for/map because they want the explicit 'take' keyword instead of the fall-off-the-end-of-block value.
(of course, 'take' also is expensive like 'return' is :-). 22:14
(although GLR will likely have to fix that)
jdv79 nm, i got it. interpolation rules there changed i guess
RabidGravy lizmat, lots going on in this code, golf might be tricky 22:15
but I'll look in the morning 22:16
meisl sure, even more reason for taking effort in making it as cheap as the implicit
22:18 rurban joined
lizmat ++RabidGravy 22:18
22:19 wingfold joined
meisl pmichaud: so are you with me in that eliminating "premature returns" (no more but none less) is doable? 22:19
pmichaud meisl: I don't think it will ever be as cheap as the implicit can be 22:21
because they're semantically different.
as far as "eliminating 'premature returns'", I don't understand exactly what that means 22:22
22:23 RabidGravy left
meisl I'm trying to take a close look at the semantics, one by one. So what do you say about eliminating "premature returns"? 22:24
lizmat pmichaud: I think meisl means : sub a { return if foo; ... } 22:25
pmichaud I don't understand what 'premature returns' means here.
lizmat aka, a return that is not at the end of a sub/method
meisl yes, thx
pmichaud I'm certain it's doable, but I know elminating them is not always desirable
meisl taking the view of the optimizer, not the user 22:26
TimToady such a transform would have to guarantee that there was nothing in between dynamically that might be interested in the control exception 22:27
pmichaud what TimToady++ said.
meisl as I said: handlers aside for a moment 22:28
pmichaud if handlers are set aside, then 'return' can be made as cheap as implicit return, yes.
meisl but the dynamical... makes me hesitate...
dalek c/choices: 02e357f | ab5tract++ | bin/p6doc:
Add a disambiguation prompt when there is more than one match for -f
22:29
pmichaud or, at the least, made fairly close to the cost of an implicit return. Note that nested returns still require exceptions to be thrown.
(unless the block has been inlined, which isn't always the case)
meisl "inlined" means on the level of the user program, right?
pmichaud sub a { if foo { ...; return }; ... } # here the return throws an exception to exit the nested block 22:30
meisl understand
ab5tract .tell moritz I pushed a 'choices' branch to doc.git for disambiguating, for instance, -f push
yoleaux ab5tract: I'll pass your message to moritz.
meisl well ok, now for handlers: was thinking that they can viewed as subroutines which are called with the (control) exception as arg (and close over whatever else there is) 22:33
to put it differently: if you were to refactor code with such handlers, and are advised to use only sub/method calls but no handlers - don't you think you could do it? 22:34
Util m: &::( "MY::foobar" ).defined; 22:36
camelia rakudo-moar 0f53d5: OUTPUT«===SORRY!===␤MVMArray: Index out of bounds␤»
Util m: &::("MY::foobar").defined;
camelia ( no output )
lizmat looks
22:37 skids joined 22:40 FROGGS left, FROGGS joined 22:41 bjz left 22:44 grondilu left 22:47 cognominal left
pmichaud m: my @a = 3,4,5; for 1, 2, @a { .say } 22:47
camelia rakudo-moar 0f53d5: OUTPUT«1␤2␤3␤4␤5␤»
pmichaud m: my @a = 3,4,5; for 1, 2, (3,4,5) { .say } 22:48
camelia rakudo-moar 0f53d5: OUTPUT«1␤2␤3 4 5␤»
22:48 amurf joined
meisl pmichaud: what do you think of "handlers as subroutines"? (in fact I'm thinking continuations, rather than "subroutines") 22:48
pmichaud subroutines come with a lot of baggage that I'm not sure a handler should have. 22:49
at the moment I much prefer the phaser/block approach used now... it feels much more natural to me.
meisl noo, not in that sense. conceptually, I mean 22:50
pmichaud m: my @a = 3,4,5; for flat 1, 2, (3,4,5) { .say } 22:51
camelia rakudo-moar 0f53d5: OUTPUT«1␤2␤3␤4␤5␤»
timbunce doc.perl6.org/language/nativecall covers talk to C libraries, any docs for talking to Java classes? 22:52
22:53 amurf left
meisl pmichaud: I am not talking about implementing handlers like that, boldly. I'm after turning/translating advanced/abstract concepts like handlers into more basic ones. 22:54
22:54 ggoebel joined
meisl (and only a *few* basic ones) 22:55
pmichaud meisl: I'm probably not the right person to talk to about it, then. :)
at least not at this time :)
meisl pmichaud: oh... are you sure (I'm not :) 22:56
well ok, it's late over here, too. 22:58
skids meisl: pmichaud is waste-deep in a big refactor right now, don't distract him :-) 23:06
23:07 khisanth_ left, khisanth_ joined 23:08 wingfold left 23:09 amurf joined, spider-mario left
Util m: 23:10
Doh!
m: sub foo {return ();}; my %h = foo();
camelia ( no output )
Util m: sub foo {return ;}; my %h = foo();
camelia rakudo-moar 0f53d5: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at /tmp/Wavaj_azes:1␤␤»
meisl skids, pmichaud: ok, just tried to sketch a route towards cheap explicit "return", at least if last in a sub (totally doable imho, still)
Util m: sub foo {return ();}; my @a = foo(); say @a.perl; 23:12
23:12 grondilu joined
camelia rakudo-moar 0f53d5: OUTPUT«[]<>␤» 23:12
Util ???
lizmat .u steam
yoleaux U+2F53 KANGXI RADICAL STEAM [So] (⽓)
U+1F35C STEAMING BOWL [So] (🍜)
U+1F682 STEAM LOCOMOTIVE [So] (🚂)
lizmat .u roller 23:13
yoleaux U+1F3A2 ROLLER COASTER [So] (🎢)
Util If it returns nothing, how can the hash be getting a odd # of values?
lizmat m: sub foo {return Empty}; my %h = foo()
camelia ( no output )
meisl have a good night, #perl6 23:14
Util gn, meisl
lizmat m: sub foo {return Nil}; my %h = foo()
camelia rakudo-moar 0f53d5: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at /tmp/6M3OnMNINM:1␤␤»
dalek c/choices: f9b7d83 | ab5tract++ | bin/p6doc:
Theoretically support single-value matches
lizmat Util: we don't have context for that in Perl6 so a bare return returns Nil
and that doesn't flatten, so becomes one thingy that generates the odd number of elements warning
japhb .tell [ptc] rakudo commit ba5fab6 sets a default for :$abs_tol = 0, but then immediately dies unless $abs_tol > 0. This seems unintentional. In fact, I don't see why either $abs_tol or $rel_tol == 0 is a problem; it's just the degenerate equality case, rather than approximation. 23:15
yoleaux japhb: I'll pass your message to [ptc].
23:15 quietfanatic joined
quietfanatic I'm having an error trying to run panda 23:15
It says "Cannot parse /stash/lewis/git/rakudo/install/share/perl6/site/panda/projects.json as JSON: Input (4 characters) is not a valid JSON string"
pmichaud m: sub foo { return Empty }; my %h = foo();
camelia ( no output )
quietfanatic the mentioned file contains "Nil"
23:16 meisl left
quietfanatic deleting the file so it'd be regenerated worked, never mind 23:17
skids quietfanatic: maybe "panda update"? 23:18
oh, ok.
(I can never tell whether pidgin os scrolling or not.) 23:19
*is
Util lizmat: So a bare return on general failure is not longer an idiom in Perl 6? 23:22
23:24 pdcawley left
lizmat if it is a failure, you should probably "fail" 23:24
m: sub foo {fail}; my %h = foo()
camelia rakudo-moar 0f53d5: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at /tmp/MIh1sPSxDx:1␤␤»
lizmat hmmm...
m: sub foo {fail}; my %h = foo(); say %h.perl 23:25
camelia rakudo-moar 0f53d5: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at /tmp/cNcTNtteQa:1␤␤»
lizmat this is hiding the original failure
timbunce Where is "use foo::bar:from<java>;" documented?
dalek ecs: eb232c5 | pmichaud++ | S07-glr-draft.pod:
Draft S07 for post-GLR list features.

This document is to be very fluid -- while it's intended to ultimately be the synopsis describing lists, during the Great List Refactor (GLR) it will also be a shared scratchboard for design notes, decisions, and speculations.
23:26
pmichaud timbunce: probably S11 23:27
skids m: sub foo (@a (@b, @c)) { @a.perl.say; @b.perl.say; @c.perl.say }; foo([[1,2],[3,4]])
camelia rakudo-moar 0f53d5: OUTPUT«[[1, 2], [3, 4]]<>␤[1, 2]<>␤[3, 4]<>␤»
skids m: sub foo (@a (@b, @c)) { @a.perl.say; @b.perl.say; @c.perl.say }; foo([1,2,3,4]) 23:28
camelia rakudo-moar 0f53d5: OUTPUT«cannot stringify this␤ in sub foo at /tmp/8jo52jhcgx:1␤ in block <unit> at /tmp/8jo52jhcgx:1␤␤»
pmichaud timbunce: S11:546
synbot6 Link: design.perl6.org/S11.html#line_546
timbunce pmichaud: thanks 23:29
skids m: sub foo (@a (@b, @c)) { }; foo([1,2,3,4])
camelia rakudo-moar 0f53d5: OUTPUT«cannot stringify this␤ in sub foo at /tmp/cfMTzOieGp:1␤ in block <unit> at /tmp/cfMTzOieGp:1␤␤»
skids must be some sort of failure building a failure 23:30
23:33 bin_005_q left 23:35 grondilu left 23:38 DoinkP joined
dalek kudo/nom: 15c6fbf | lizmat++ | src/core/EnumMap.pm:
Don't eat lone failure initializing a hash, Util++
23:39
23:40 DoinkP left
Util lizmat, pmichaud: thx! 23:42
23:42 gfldex left
ab5tract m: my @a = 'Type::Cool', 'Type::Not'; @a.grep(/'Cool'/).say; @a.grep({ ! $_ ~~ /'Cool'/ }).say; # bug? 23:45
camelia rakudo-moar 0f53d5: OUTPUT«Type::Cool␤␤»
ab5tract m: my @a = 'Type::Cool', 'Type::Not'; @a.grep(/'Cool'/).say; @a.grep({ ! $_ ~~ /'Cool'/ }).say; @a.grep(/Not/).say;
camelia rakudo-moar 0f53d5: OUTPUT«Type::Cool␤␤Type::Not␤»
tadzik timbunce: clearing your rakudobrew installation may help 23:49
or at least its panda directory
timbunce tadzik: thanks. I stubled on that as a workaround.
ab5tract precedence, my old friend 23:56
23:57 dagurval left, dagurval joined 23:59 sivoais joined