Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-06-11

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 lizmat joined #perl6
00:16 dnmfarrell joined #perl6
00:17 Zoffix joined #perl6
00:21 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:22 dnmfarrell 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:23 laouji joined #perl6
00:28 pmichaud upon further reflection, using |[...] or |(...)  as the list inserter syntax runs into problems with 'return'
00:28 pmichaud so, perhaps no-go
00:37 timotimo dnmfarrell: did you put all the things that are supposed to be use-able into the META.info under the "provides" section?
00:38 dnmfarrell timotimo: I think so, let me compare mine https://github.com/dnmfarrell/P​od-Perl5/blob/master/META.info with another Perl 6 distro
00:39 laouji joined #perl6
00:40 dnmfarrell timotimo: it looks ok to me. When panda installs it, it definitely copies all of the *pm files in the distro
00:46 kurahaupo joined #perl6
00:47 BenGoldberg joined #perl6
00:47 laouji joined #perl6
00:48 timotimo right, the copying is one part, but registering it into the database is another
00:48 tinyblak joined #perl6
00:49 tinyblak_ joined #perl6
00:50 timotimo i can't see an obvious mistake you might have made
00:50 timotimo let me install it locally to try it out
00:51 timotimo oh my
00:51 timotimo panda segfaults while rebootstrapping
00:51 dnmfarrell :(
00:52 timotimo oooh
00:53 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 timotimo it may be the right fix to put the use statements into the module itself?
00:53 timotimo i wonder if this is our wrongdoing, though
00:55 dnmfarrell Hmm, Perl5.pm has use statements for the other two modules. Maybe I've misunderstood
00:55 kurahaupo joined #perl6
00:58 raydiak methinks timotimo++ means try putting the 'use's inside the module { ... } block instead of before it
01:00 dnmfarrell raydiak: got it, let me try that, thanks!
01:01 timotimo that's what i meant, yeah
01:01 timotimo this used to work, right? i wonder how long ago
01:01 timotimo and i wonder what the speculations say about this
01:03 dnmfarrell yes it stopped working in the past 2-3 weeks
01:03 aborazmeh joined #perl6
01:03 aborazmeh joined #perl6
01:06 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:07 dnmfarrell but remove "-Ilib" and use the "installed" version and it doesn't work
01:08 timotimo :o
01:08 * timotimo heads towards bed
01:08 timotimo but a golfed test case would be great
01:12 raydiak dnmfarrell: I don't see anything else obvious either, and second the motion for a golfed bug report :)
01:16 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␤»
01:16 skids m: sub f( $g ($a, :$b)) { $g.say; $a.say; $b.say }; f([1,:b(2)]); # should work?
01:16 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␤␤»
01:16 skids Ah,nm.
01:16 skids m: sub f( $g ($a, :$b!)) { $g.say; $a.say; $b.say }; f((1,:b(2)));
01:16 camelia rakudo-moar a6d2ed: OUTPUT«1 b => 2␤1␤2␤»
01:20 thezip joined #perl6
01:20 dayangkun joined #perl6
01:22 dnmfarrell sure I can raise a ticket, I've done that before :-)
01:22 dnmfarrell raydiak timotimo thanks for your help
01:25 raydiak dnmfarrell: you're quite welcome, thanks for reporting it
01:26 laouji joined #perl6
01:28 laouji_ joined #perl6
01:29 timotimo what he said
01:38 dnmfarrell heh, I'm trying to replicate it in a simple class and grammar, and can't replicate the bug
01:45 telex joined #perl6
01:48 dnmfarrell does anyone know if Panda maintains a module list or internal DB of installed modules somewhere?
01:55 vike joined #perl6
01:58 ssqq joined #perl6
02:00 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
02:01 dnmfarrell raydiak: do you know where it is? I'm searching the directories under .rakudobrew and can't see it
02:03 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 sivoais joined #perl6
02:04 ssqq How setup Perl6 REPL in sublime Text?
02:04 raydiak dnmfarrell: but I believe it (Panda) uses Perl 6's CompUnit and CompUnitRepo now, so that might be involved
02:05 rurban joined #perl6
02:05 raydiak dnmfarrell: https://github.com/tadzik/panda/blo​b/master/lib/Panda/Installer.pm#L37 looks like a starting point for figuring out what precisely it's doing
02:07 raydiak dnmfarrell: oh https://github.com/tadzik/panda/bl​ob/master/lib/Panda/App.pm#L39-43 looks more directly relevant to the state tracking involved, maybe
02:08 adu joined #perl6
02:08 dnmfarrell raydiak: thanks, just looking at this file: ~/.rakudobrew/moar-nom/install​/share/perl6/site/panda/state
02:09 dalek roast: 30101e3 | hoelzro++ | S16-filehandles/argfiles.t:
02:09 dalek roast: Add a test for $*ARGFILES, get(), and lines()
02:09 dalek roast: review: https://github.com/perl6/roast/commit/30101e3500
02:09 dalek roast: 859ce43 | hoelzro++ | S16-filehandles/argfiles.t:
02:09 dalek roast: Test that two invocations of lines() doesn't touch $*IN
02:09 dalek roast:
02:09 dalek roast: RT #125380
02:09 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125380
02:09 dalek roast: review: https://github.com/perl6/roast/commit/859ce43977
02:09 dalek roast: 1e02a39 | hoelzro++ | S16-filehandles/argfiles.t:
02:09 dalek roast: Test $*ARGFILES when - is in @*ARGS
02:09 dalek roast: review: https://github.com/perl6/roast/commit/1e02a39a69
02:09 dalek roast: 9da4ffb | hoelzro++ | S16-filehandles/argfiles.t:
02:09 dalek roast: Test setting @*ARGS before calling $*ARGFILES things
02:09 dalek roast: review: https://github.com/perl6/roast/commit/9da4ffbf75
02:10 dnmfarrell looks like it just stores the META json for every installed module
02:11 rurban1 joined #perl6
02:28 raydiak yeah I poked around a bit but still don't have a real suggestion...if the files are really in ~/.rakudobrew/moar-nom/ins​tall/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 hoelzro_trying_w dnmfarrell: I think the DB is in a serialized state at this point
02:28 hoelzro_trying_w er
02:28 hoelzro wrong IRC client =P
02:29 hoelzro it used to be a JSON file, but now it's a serialized Perl 6 object, I believe
02:29 noganex_ joined #perl6
02:30 hoelzro hmm, is that DB still in use? I'm not seeing it show up in strace
02:30 hoelzro dnmfarrell: anyway, why do you ask?
02:30 adu radiak!
02:31 adu raydiak!
02:31 dnmfarrell hoelzro: I have a weird error - a module runs fine locally but on install stops working
02:31 raydiak hoelzro: http://irclog.perlgeek.de/p​erl6/2015-06-11#i_10733542
02:31 raydiak adu!
02:31 adu :)
02:31 hoelzro dnmfarrell: ah, that sounds like a serialization bug I saw a while back =/
02:31 * hoelzro plays around with Pod::Perl5
02:32 dnmfarrell meh!
02:32 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:34 tinyblak joined #perl6
02:34 raydiak adu: build anything cool lately?  how's life?
02:34 adu raydiak: dunno, and good
02:34 hoelzro dnmfarrell: when's the last time you remember this working?
02:35 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 #perl6
02:35 hoelzro alright
02:35 raydiak adu: oh yeah, some breaking changes happening around here...more to come, I'm sure :)
02:35 adu :(
02:38 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:42 hoelzro dnmfarrell: bad news; I'm seeing this issue very far back =(
02:44 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 =(
02:44 dnmfarrell weird!
02:45 dnmfarrell thanks for looking into it, I can raise a ticket
02:45 hoelzro sure thing
02:50 dduncan joined #perl6
02:51 dnmfarrell ticket raised: https://rt.perl.org/Ticket/Display.html?id=125384
02:51 gagalicious joined #perl6
02:51 hoelzro dnmfarrell: heh, I was just about to ask =)
02:51 hoelzro I managed to golf it down
02:51 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
02:51 hoelzro I thought the error was couldn't find &Grammar?
02:51 dduncan I have a question with regard to comp unit versioning described at http://design.perl6.org/S11.html#Versioning ...
02:51 dnmfarrell you did? nice work, my simplistic golfed versions never reproduced the bug
02:52 dduncan Taking this example for context:
02:52 dduncan use Dog:auth(/:i jrandom/):ver(v1.2.1 | v1.3.4);
02:52 dduncan use Dog:auth({ .substr(0,5) eq 'cpan:'}):ver(Any);
02:54 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'.
02:56 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 dnmfarrell waaaaagh
02:58 hoelzro dduncan: I'm not sure I follow
02:59 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 ...
03:00 hoelzro gagalicious: I think you may want #perl
03:01 gagalicious does anyone know?
03:02 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 dduncan How do I merge those into a single 'use Dog' without being any less strict?
03:02 dduncan Eg, I want the 'or' of those 2.
03:03 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
03:03 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'.
03:03 hoelzro dnmfarrell: plain old 'make' doesn't build it?
03:04 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
03:05 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?
03:06 dnmfarrell yes
03:06 hoelzro dduncan: TimToady could chime in; otherwise, a lot of sixers will be online in a few hours
03:06 hoelzro dnmfarrell: what OS are you on?
03:06 dnmfarrell Fedora
03:07 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 dduncan This would seem like a best-for-Larry thing actually.
03:07 dnmfarrell hoelzro: ahhh, works, thanks!
03:07 hoelzro dduncan: agreed =)
03:08 hoelzro dnmfarrell: that's still weird; it should invoke 'make build' by default...
03:09 dnmfarrell hoelzro: gotcha
03:10 rurban joined #perl6
03:10 laouji joined #perl6
03:11 dnmfarrell gotta run, thanks again hoelzro !
03:13 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:20 ilbelkyr joined #perl6
03:23 rurban joined #perl6
03:31 dduncan I just made the perl6-language post for the question.  It should be at  http://www.nntp.perl.org/group/perl.​perl6.language/2015/06/msg36311.html whenever that archive catches up.
03:34 dalek rakudo/nom: 3fbd1e6 | hoelzro++ | t/spectest.data:
03:34 dalek rakudo/nom: Add new argfiles tests to spectest list
03:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3fbd1e62ff
03:34 dalek rakudo/nom: d58e397 | hoelzro++ | src/core/IO/ArgFiles.pm:
03:34 dalek rakudo/nom: Make sure that post-EOF invocations of $*ARGFILES don't open $*IN
03:34 dalek rakudo/nom:
03:34 dalek rakudo/nom: Fixes RT #125380
03:34 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125380
03:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d58e397cdd
03:38 tinyblak_ joined #perl6
03:38 kaare_ joined #perl6
03:56 spider-mario joined #perl6
04:02 laouji joined #perl6
04:17 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 #perl6
04:43 pmichaud /lastlog pmichaud 3
04:50 dalek doc: 786c7a1 | (Sterling Hanenkamp)++ | lib/Type/Channel.pod:
04:50 dalek doc: Fix the name of the X::Channel::ReceiveOnClosed
04:50 dalek doc: review: https://github.com/perl6/doc/commit/786c7a1f06
05:03 rurban joined #perl6
05:16 mr-foobar joined #perl6
05:18 mr-fooba_ joined #perl6
05:22 aborazmeh joined #perl6
05:22 aborazmeh joined #perl6
05:38 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:42 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
05:46 Patterner joined #perl6
05:57 msouth joined #perl6
05:58 domidumont joined #perl6
06:03 domidumont joined #perl6
06:04 diana_olhovik joined #perl6
06:10 kurahaupo gagalicious: well, you could start with #perl here on Freenode
06:21 rurban joined #perl6
06:25 RabidGravy joined #perl6
06:25 FROGGS joined #perl6
06:46 FROGGS o/
06:48 [Sno] joined #perl6
07:01 Ven joined #perl6
07:04 _mg_ joined #perl6
07:10 amurf joined #perl6
07:12 g4 joined #perl6
07:12 gfldex joined #perl6
07:14 dduncan left #perl6
07:14 ab6tract joined #perl6
07:15 llfourn joined #perl6
07:19 RabidGravy joined #perl6
07:32 RabidGravy right, extending a CArray to at least the expected length before passing it to sf_readf_int(....) will stop the crashiness
07:39 RabidGravy actually that case is not explicitly stated in the docs
07:43 aborazmeh joined #perl6
07:43 aborazmeh joined #perl6
07:48 Ven joined #perl6
07:54 pdcawley joined #perl6
07:58 Ven o/, #perl6
08:00 bjz joined #perl6
08:03 ab6tract howdy Ven
08:04 dalek doc: cda09c8 | RabidGravy++ | lib/Language/nativecall.pod:
08:04 dalek doc: Add note on pre-extending CArray buffers that are populated by C
08:04 dalek doc: review: https://github.com/perl6/doc/commit/cda09c83cd
08:11 darutoko joined #perl6
08:13 aborazmeh joined #perl6
08:13 aborazmeh joined #perl6
08:26 cognominal joined #perl6
08:28 sergot morning o/
08:32 RabidGravy marnin
08:36 masak \o
08:36 espadrine joined #perl6
08:36 Ven joined #perl6
08:40 bin_005 joined #perl6
08:42 bjz joined #perl6
08:42 zakharyas joined #perl6
08:43 ab6tract howdy masak
08:50 [TuxCM] joined #perl6
08:56 [Tux] joined #perl6
09:06 cognominal_ joined #perl6
09:08 rindolf joined #perl6
09:31 laouji_ joined #perl6
09:39 laouji joined #perl6
09:50 laouji joined #perl6
09:52 laouji joined #perl6
09:55 Woodi hallo #perl6 :)
09:58 Woodi "to flat, or not to flat: this is a question" but so important like in Hamlet case :)
09:58 Woodi but probably this not helps pmichaud++
09:58 Ven joined #perl6
09:59 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
09:59 Woodi masak: I didn't know which one is proper, my bad :)
10:01 Woodi so for $scalar is simple but  for $array is strange... intentionally applayin for to list and wanting just one run
10:02 Woodi I think for $a, @b, $c {}  should by default visid @b elements but just 1 lvl
10:03 Woodi and I like \@array more then  $@array...
10:04 Woodi but becouse topic is not so important like Hamlet one we should just do what covers moust cases
10:05 Woodi 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:06 RabidGravy right off out for a bit, Sndfile can wait
10:06 amurf joined #perl6
10:09 Woodi so in for [],[]  what "for" takes ? "optimized" list ?
10:09 tinyblak joined #perl6
10:11 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 Woodi so we need general mechanism - first DWIM cases should be eliminated
10:13 Woodi also what is itemization ? flattening ?
10:14 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:16 Woodi last thing:  maybe  for (@a @b) {}  for flattening 1 lvl ? or  for ,@a, @b {}
10:17 * Woodi afk !
10:23 tinyblak joined #perl6
10:41 dayangkun joined #perl6
10:43 dayangkun joined #perl6
10:47 laouji joined #perl6
10:50 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:52 nwc10 djh on #london.pm found this: http://coolthingoftheday.tumblr.com/post/11657330​7811/in-indias-thar-desert-nomads-rely-so-much-on
10:52 nwc10 of course, I wonder, "this space for rent?"
10:53 pdcawley joined #perl6
10:54 moritz masak: re pythons bound methods, there's one place where I find it really weird
10:54 moritz some.namespaced.Class() vs.  from some.namespaced import Class; Class()
10:55 moritz somehow modules don't seem to get passed along as invocant?
11:05 nowan joined #perl6
11:05 masak moritz: I'm sorry, I didn't get the essence of the problem you're trying to illustrate :/
11:09 masak moritz: are you complaining that it works both with and without the import?
11:17 smls joined #perl6
11:18 smls sup.
11:18 smls http://rosettacode.org/wiki/Sort​ing_algorithms/Quicksort#Perl_6  -> is that sentence about "sorted in parallel" realistic?
11:19 smls Will the comma operator ever auto-thread?
11:21 smls 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]<>␤»
11:21 masak ...no.
11:21 smls ^^ maybe this would be a better way to do it?
11:21 masak smls: the comma operator won't be autothreading, at least not in vanilla Perl 6.
11:21 llfourn_ joined #perl6
11:21 FROGGS but .grep might do something in parallel, right?
11:22 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))
11:22 FROGGS if it gets batched...
11:23 FROGGS 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 pdcawley joined #perl6
11:24 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:25 FROGGS 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:30 Ven joined #perl6
11:31 |Tux| joined #perl6
11:34 Woodi hmm,  class Array is List { ... }   so in Liskov spirit Arrays should just work like Lists...
11:36 masak more precisely, an Array is a kind of List plus some additional behavior.
11:37 moritz and the additional behavior is putting each item into a Scalar
11:37 Ven "@ is mnemonic for l@st" :P
11:39 ab6tract Ven: Ive been wondering after that, actually.. "@" is ... ?
11:39 Ven ab6tract: @rray
11:39 Ven but it kind-of breaks down
11:39 masak in Perl 6 it just means some Positional type.
11:39 ab6tract so the same as + or ~ ? a coercion prefix?
11:40 smls @(EXPR)  is identical to  EXPR.list
11:40 Ven_ joined #perl6
11:40 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
11:41 ab6tract smls: yeah, that part makes sense. I've seen some '@ = list()' kind of examples recently
11:41 ab6tract that make less sense to me
11:41 Ven_ (I was just pointing out that the old mnemonic @rray didn't work anymore)
11:42 masak Woodi: I have no idea what you mean.
11:42 masak Woodi: do you mean "finite" and "finiteness"?
11:43 smls .list / list()  does not coerce things to the List type - if it did, it would be named with uppercase L
11:43 smls it simply forces things to become list'y
11:43 smls :P
11:46 * 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:47 smls Haven't yet seen a good use-case that exploits both laziness and mutability of arrays together.
11:49 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:50 masak one big reason Positional is a role is so that there can be less reliance on class inheritance
11:52 _mg_ joined #perl6
11:54 Ven_ smls: there's an interesting paper on that, recursion vs corecursion :)
11:54 Ven_ codata: http://types2004.lri.fr/SLIDES/altenkirch.pdf
11:54 ab6tract smls: that's not what I'm asking about. I'm trying to understand what '@' on the LHS of an assignment means
11:55 ab6tract list() was just meant to be a standin example sub that returns a list
11:55 ab6tract gimme-list() # would have been better
12:01 smls An @ LHS in an assignment has the following consequences (compared to $):
12:01 smls 1) The '=' is considered having list assignment precedence (rather than item assignment precedence), and the RHS is parsed accordingly.
12:01 smls 2) An exception is thrown if the RHS does not evaluate to something that does the  Positional role.
12:01 smls 3) The RHS is flattened, and filled into the LHS item by item from left to right.
12:02 smls oh, and the thing they're filled into, is an Array by default
12:04 smls though it's supposed to be possible to override that on a per-pariable basis by declaring it like  "my @a is List;"
12:05 ab6tract joined #perl6
12:05 Ven joined #perl6
12:08 smls OTOH in an assignment with $ LHS:
12:08 smls 1) The '=' is considered having item assignment precedence.
12:08 smls 2) There is no requirement for the RHS to fulfil a specific Role.
12:08 smls 3) The RHS is taken as is (without flattening), and put into an item container.
12:09 arnsholt Wow. Sometimes, I make the most boneheaded mistakes in my code >.<
12:12 colomon joined #perl6
12:15 itz joined #perl6
12:22 zakharyas joined #perl6
12:24 smls My latest Perl 6 script called   MyGrammar.parse   a whopping 67,002 times, on a full run with real input data.
12:24 smls Where do I collect my prize? :P
12:26 moritz smls: ask HR :-)
12:28 ab6tract m: (my @ = 1,2,3,4).say;
12:28 camelia rakudo-moar d58e39: OUTPUT«1 2 3 4␤»
12:28 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 :)
12:31 psch itz_: rakudobrew? https://github.com/tadzik/rakudobrew
12:32 Ven joined #perl6
12:32 itz_ ah yes I forgot that did sym link management
12:37 hoelzro good morning, #perl6!
12:38 FROGGS morning hoelzro
12:38 hoelzro o/ FROGGS
12:38 psch o/ hoelzro, FROGGS
12:39 hoelzro o/ psch
12:40 FROGGS hi psch
12:40 * FROGGS needs to backlog... interesting things happen these days
12:42 dalek rakudo-star-daily: e474b32 | coke++ | log/ (2 files):
12:42 dalek rakudo-star-daily: today (automated commit)
12:42 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/e474b32246
12:43 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
12:44 * psch doesn't really have time to catch up either
12:44 psch i missed like a month due to personal stuff, so p6weekly is all i'm up to date with :s
12:45 psch and i'd rather pour the little time i have atm into more jvm easy-of-use
12:46 FROGGS psch++
12:48 JimmyZ [MB??[MB[MB??[MB
12:54 [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:56 telex joined #perl6
13:00 psch it'
13:00 psch s not quite clear to me though
13:01 psch how i can do what i wanna do
13:01 psch i mean, i've started from the RakudoEvalServer, to try and get it to run precompiled scripts
13:01 psch i.e. the output of e.g. "perl6-j --target=classfile --output=$FILE.class $FILE.p6"
13:02 psch and i'm not quite seeing through where i have to untie things so i can put the script in
13:02 psch as in, currently we're running perl6.jar, so to speak, which enters through main.nqp
13:03 psch and that's already to late to stuff the CU in the classfile from the example command line
13:03 psch 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:13 AlexDaniel joined #perl6
13:17 RabidGravy joined #perl6
13:18 RabidGravy back now
13:18 [Coke] https://gist.github.com/aw​waiid/ef3f0abcfa96e34977b4 - this showed up in my perl6 news net.
13:18 RabidGravy very pleasant day, I think it's drink cold cider outside until my liver can't take it
13:22 skids joined #perl6
13:24 Woodi [Coke]: so Perl6 could be ultimate inter-language. or inter-infrastructure-language :) maybe c6pan should include all versions of Python batteries ?
13:28 Woodi 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:29 FROGGS pmichaud: just watching latest talk... we have a way to mark conjectural tests as such on roast since April...
13:32 JimmyZ_ joined #perl6
13:36 MilkmanDan joined #perl6
13:36 Ven joined #perl6
13:43 amurf joined #perl6
13:44 [Coke] FROGGS: I know there's a fudge syntax, but how do you trigger it when fudging?
13:47 dayangkun joined #perl6
13:48 FROGGS [Coke]: fudge takes an option --version
13:51 PerlJam good * #perl6
13:51 [Coke] ok - but it's not invoked by any of the *test targets yet, right?
13:53 dalek roast: 4904d78 | FROGGS++ | fudge:
13:53 dalek roast: mention --version option for fudge
13:53 dalek roast:
13:53 dalek roast: Note that this needs to be aligned to Perl 6`s language versioning scheme.
13:53 dalek roast: review: https://github.com/perl6/roast/commit/4904d784da
13:53 FROGGS [Coke]: it defaults to v6.0.0, and that's what we are aiming for
13:53 FROGGS we need pass that when there is more than one version
13:55 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:56 FROGGS pmichaud: I'm not saying that this works well enough for a language spec
13:56 FROGGS but I also don't say it doesn't :P
13:59 arnsholt Python is versioned as $major.$minor, and then the compiler is $major.$minor.$patch
13:59 msouth joined #perl6
13:59 nwc10 but they sort of already have the same problem as Perl 6 (will) have
14:00 nwc10 in that, Ppyp is at 2.6, and supports Python version 2.7
14:00 nwc10 er
14:00 nwc10 pypy
14:00 nwc10 and at some point pypy will be at 2.8
14:00 nwc10 and supporting Python version 2.7
14:00 nwc10 and what do the numbers mean?
14:00 arnsholt Yeah, Pypy breaks that, that's true. I guess it only holds for CPython
14:08 FROGGS I don't like to see both having a same-ish version
14:16 itz is there anyway of turning off the colour codes in the error messages?
14:16 rurban joined #perl6
14:17 psch itz: the env var RAKUDO_ERROR_COLOR defined but false
14:17 psch e.g. 0
14:18 itz ty
14:25 telex joined #perl6
14:42 [TuxCM] joined #perl6
14:46 diana_olhovik_ joined #perl6
14:50 Ven joined #perl6
14:53 itz "IRC User in Huffy Flounce Shock Horror"
14:54 itz oops wrong channel :)
14:55 msouth joined #perl6
15:05 espadrine_ joined #perl6
15:11 jdv79 so, is there some sort of pre-existing way to determine what is not tested yet?
15:11 itz test coverage?
15:11 jdv79 the realization that rename() had no tests until a couple weeks ago is a bit concerning
15:11 jdv79 s/realization/discovery/
15:11 jdv79 basically, in any form, sure
15:12 itz AFAIK there is no Devel::Cover
15:12 skids joined #perl6
15:14 moritz one could use the JSON data from --profile to create coverage reports
15:15 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:16 itz moritz++
15:16 flussence but --profile is a better answer because it's already there :)
15:18 jdv79 a roast profile would be how many TB?
15:18 jdv79 i was thinking more about hooking into the debugger stuff but ok
15:19 rurban joined #perl6
15:19 pmichaud good morning, #perl6
15:19 lizmat pmichaud o/
15:19 FROGGS morning pmichaud
15:19 hoelzro o/ pmichaud
15:19 * lizmat is about to come down to the perl6 hackathon
15:19 JimmyZ_ o/
15:20 * pmichaud backlogs
15:20 nwc10 have fun
15:20 colomon lizmat: you’re at YAPC::NA?
15:23 lizmat colomon: yes
15:24 jdv79 so, i just tried to rebuild and got this:  http://paste.scsys.co.uk/488133
15:24 Ven \o
15:24 colomon lizmat++
15:26 kurahaupo1 joined #perl6
15:26 jdv79 trying from a cleaner slate
15:27 * colomon is sorry he’s not there too.
15:30 jnthn afternoon, #perl6
15:31 nwc10 good UGT heresy, jnthn
15:31 jdv79 seems better now - rebuilt from scratch
15:31 FROGGS[mobile] joined #perl6
15:31 FROGGS[mobile] joined #perl6
15:33 amurf joined #perl6
15:33 rurban I'm trying to find a syntax for co/contravariance: see http://jayconrod.com/posts/76/ty​pe-parameter-bounds-and-variance
15:33 rurban I like to idea of +/- or nothing
15:34 Ven rurban: scala-like?
15:34 rurban yes, but a bit better
15:35 rurban http://design.perl6.org/S06.html says the compiler may decide.
15:35 rurban but then the compiler needs to know exactly if all fields are const
15:35 rurban writable objects can only be contravariant
15:35 rurban this is needed for type inference
15:36 JimmyZ_ afternoon, jnthn
15:36 rurban I'd rather prefer a syntax to define it at compile-time
15:37 JimmyZ_ slang?
15:37 jnthn I'm doubtful the default Perl 6 will ever go that far with type inference.
15:37 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 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 #perl6
15:39 rurban i'm doing it to optimize on types only (inlining and faster ops)
15:40 jnthn We get a lot of that kind of thing to fall out of more general "see what types show up at runtime"
15:41 jnthn 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:42 Gardner joined #perl6
15:42 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
15:43 rurban 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.
15:43 jnthn :)
15:44 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.
15:44 rurban it's faster certainly
15:44 jnthn Depends. :)
15:44 llfourn joined #perl6
15:47 rurban class MyNum is <Num {#contra } class MyNum is >Num { #co } class MyNum is Num { #invariant }
15:47 fhelmberger joined #perl6
15:49 fhelmberger joined #perl6
15:50 Ven rurban: it's gonna be problematic with untyped hashes/lists though
15:51 rurban joined #perl6
15:56 zakharyas joined #perl6
16:01 pmichaud question from the hackathon:  how to run the tests for the DBIish module ?
16:02 [Coke] is "ufo" still the answer to that question?
16:03 jdv79 could someone look at https://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.
16:03 hoelzro pmichaud: I would probably say panda-test
16:04 hoelzro 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"
16:05 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 :)
16:05 jnthn Though yeah, it won't have pre-comp'd
16:06 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 rakudo/nom: 897bef2 | jdv79++ | src/core/io_operators.pm:
16:06 dalek rakudo/nom: Add createonly to rename().  See RT #125280.
16:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/897bef2caf
16:06 dalek rakudo/nom: 1ccb15d | lizmat++ | src/core/io_operators.pm:
16:06 dalek rakudo/nom: Merge pull request #439 from jdv/nom
16:06 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125280
16:06 dalek rakudo/nom:
16:06 dalek rakudo/nom: Add createonly to rename().  See RT #125280.
16:06 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125280
16:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1ccb15d38a
16:06 hoelzro jdv79: seems good; do you have associated tests in roast?
16:06 lizmat jdv79: what hoelzro said
16:07 lizmat :-)
16:07 jdv79 was waiting to push those but yes
16:07 hoelzro also, does open() have :createonly?
16:07 lizmat think so
16:08 hoelzro it's not in S16
16:08 lizmat hmmm....
16:08 hoelzro or the S32 covering open()
16:08 JimmyZ_ create-only
16:08 jdv79 thanks
16:08 dalek roast: 6b1e3bf | jdv79++ | S32-io/rename.t:
16:08 dalek roast: Add createonly tests.  See RT #125280.
16:08 dalek roast: review: https://github.com/perl6/roast/commit/6b1e3bf362
16:08 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125280
16:09 jnthn flussence: ooh, I didn't know about the dwim :)
16:10 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 diana_olhovik_ joined #perl6
16:11 pmichaud if someone(s) is (are) looking for a GLR-related task
16:12 pmichaud here at yapc::na (and on channel) we've been looking at removing the itemization from circumfix:<[ ]>
16:12 pmichaud i.e.,   [ ] would create an array (but not itemized)
16:13 pmichaud 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 Gardner joined #perl6
16:13 spider-mario joined #perl6
16:13 pmichaud (I can do it, but this task seems delegable)
16:15 pmichaud the basic step would seem to be to change Array.pm
16:15 pmichaud sub circumfix:<[ ]>(*@elems) is rw { my $ = @elems.eager }
16:15 pmichaud to
16:15 TimToady WHAT?
16:16 pmichaud sub circumfix:<[ ]>(*@elems) is rw { @elems.eager }
16:16 uncleyea1 joined #perl6
16:16 wingfold joined #perl6
16:17 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␤»
16:17 jdv79 m: for my $/ () # what
16:17 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>␤»
16:17 pmichaud (also on curlies, but let's start with [] first :-)
16:17 jdv79 why the diff there?
16:17 dalek rakudo/arr-con-not-item: aeecc2a | jnthn++ | src/core/Array.pm:
16:17 dalek rakudo/arr-con-not-item: Make [...] not be an item.
16:17 dalek rakudo/arr-con-not-item: review: https://github.com/rakudo/rakudo/commit/aeecc2aadc
16:18 jnthn pmichaud: It builds, fails one sanity test
16:18 [TuxCM] joined #perl6
16:18 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 :-)
16:18 pmichaud (and what it takes to make them not fail)
16:19 jnthn pmichaud: I'll delegate that part :P
16:19 pmichaud jnthn: +1
16:19 jnthn (or do it later, but got a distraction now)
16:19 TimToady these Czech programmers, so lazy
16:21 gagalicious joined #perl6
16:21 jnthn Hey, I flew to London today :P
16:21 gagalicious how do i escape a string inside a regex?
16:22 PerlJam "escape a string"?  why?
16:22 gagalicious $string=~m!$pattern!;
16:22 anocelot joined #perl6
16:22 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
16:22 pmichaud in perl 6 you don't need to escape a string
16:22 pmichaud $pattern isn't interpolated, it's matched literally
16:23 jnthn ummm, when I "make spectest"
16:23 gagalicious what about perl5? how do i do that?
16:23 jnthn C:\PERL64\BIN\perl.exe t/harness --fudge --moar --keep-exit-code --tests-from-file=t/spectest.data
16:23 jnthn Inline::Perl5 not installed: not running Perl 5 integration tests
16:23 jnthn Use of uninitialized value in split at t/harness line 154.
16:23 jnthn Files=0, Tests=0,  0 wallclock secs ( 0.00 usr +  0.00 sys =  0.00 CPU)
16:23 jnthn Result: NOTESTS
16:23 jnthn Did we break it? :)
16:23 geekosaur not really the right channel for that but in perl5 use \Q
16:23 jnthn Anyway, really gone for a bit
16:24 geekosaur \Q$foo\E matches the contents of $foo literally
16:24 geekosaur (alternately use the quotemeta function)
16:26 domidumont joined #perl6
16:27 flussence see also: `perldoc -q regex`
16:28 JimmyZ_ hmm, looks like is rw got removed too from that branch
16:38 jdv79 what is the equivalent(s) to the p5 stash?
16:38 jdv79 world something?
16:40 shamu joined #perl6
16:42 hoelzro jdv79: you mean a package stash?
16:42 hoelzro iirc, MyPackage.WHOP
16:42 hoelzro dammit
16:42 hoelzro MyPackage.WHO
16:44 jdv79 i want to get all the symbols for coverage checkinng.  looking at S02#Names now.
16:45 molaf joined #perl6
16:46 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:48 pmichaud chars "123":
16:48 pmichaud m: chars "123":
16:48 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:51 TimToady m: say chars "123": ;
16:51 camelia rakudo-moar 1ccb15: OUTPUT«3␤»
16:51 TimToady m: say chars "123":
16:51 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 #perl6
16:52 araujo joined #perl6
16:59 Zhtwn joined #perl6
17:00 cognominal joined #perl6
17:06 lsm-desktop joined #perl6
17:09 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-DI​RECTORY␤PIO␤GLOBALish␤::?PACKAGE␤&link␤&rena​me␤&COPY-FILE␤NativeCall␤@?INC␤$=finish␤&…»
17:09 hoelzro jdv79: ^
17:14 * Util is at the Perl 6 Hackathon :^)
17:14 Util This is very nice: https://github.com/perl6/spe​cs/blob/master/contents.pod
17:14 Util Shouldn't it also show up somewhere on this web page? : http://design.perl6.org/
17:17 Gardner joined #perl6
17:18 dalek doc: 44ab10f | (Kevin Metcalf)++ | bin/p6doc:
17:18 dalek doc: Added "Function" entry to usage example.
17:18 dalek doc: review: https://github.com/perl6/doc/commit/44ab10f12b
17:21 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 ab5tract http://irclog.perlgeek.de/p​erl6/2015-06-10#i_10727483
17:22 andreoss joined #perl6
17:22 ab5tract But thank you for the breakdowns. I will try to find them a good place to put it in doc.git
17:23 andreoss my $*VAR = 1 is lexical or dynamic?
17:23 andreoss m: my $*V = 1; say $*V;
17:23 camelia rakudo-moar 1ccb15: OUTPUT«1␤»
17:24 TimToady it's lexical *and* dynamic
17:24 TimToady the symbol is stored in the lexical pad, but accessed dynamically
17:24 FROGGS joined #perl6
17:24 lizmat for those interested in NQP programming: https://github.com/edumentab/r​akudo-and-nqp-internals-course
17:30 daotoad joined #perl6
17:31 andreoss m: $*V = 9 ;  my $*V = $*V // 8;  say $*V
17:31 camelia rakudo-moar 1ccb15: OUTPUT«9␤»
17:31 andreoss m: our $*V = 9 ;  my $*V = $*V // 8;  say $*V
17:31 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:35 andreoss m: our $*V = 66; sub x { $*V }; {my $*V = $*V.defined ?? $*V !! 12; say x():}
17:35 camelia rakudo-moar 1ccb15: OUTPUT«12␤»
17:38 jdv79 timotimo: where is that?
17:39 andreoss my $*V is done earlier that $*V.defined?
17:41 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 Gardner joined #perl6
17:44 Util Lembark asked "Why is it named `panda`".
17:44 Util I said "I don't know. Maybe `(Perl) and a..."
17:44 Util :^)
17:44 Util tadzik: real reason?
17:47 dalek doc: 982223a | (Kevin Metcalf)++ | bin/p6doc:
17:47 dalek doc: Updated to use lowercase example.
17:47 dalek doc: review: https://github.com/perl6/doc/commit/982223ad1c
17:47 pmichaud Util: I think perhaps the "pan" is relating to c-"pan"
17:48 TimToady maybe it's a multi-lingual coinage, like "pango" is All Languages in Greek and Japanese
17:48 TimToady so it's All Fields or some such
17:49 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;
17:49 camelia rakudo-moar 1ccb15: OUTPUT«4 4␤»
17:50 TimToady 兌 is DA, "exchange"
17:54 Ven joined #perl6
17:54 araujo_ joined #perl6
17:54 FROGGS jdv79: that's why the 'official' url is testers.perl6.org
17:57 yqt joined #perl6
17:58 andreoss should be state variable be shared between two instances of class?
17:59 andreoss can i have per instance state?
18:00 lizmat isn't that called a private attribute ?
18:02 diakopter joined #perl6
18:03 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␤»
18:03 diakopter jnthn: my USB Armory board arrived. I'll try building rakudo on it once I get a working Linux
18:04 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!
18:04 lizmat diakopter o/
18:04 diakopter 'course, it has only a half gig of memory (but surely it can use swap from flash!?)
18:04 diakopter hi
18:04 diakopter o/
18:04 FROGGS :D
18:05 FROGGS diakopter: well, it is called flash because it is damn fast, no?
18:05 diakopter i dunno
18:09 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
18:09 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…»
18:09 diakopter maybe i should first build it for arm in an emulator image and transfer it over
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
18:09 camelia rakudo-moar 1ccb15: OUTPUT«Int 2␤Int 1024␤Int 1267650600228229401496703205376␤»
18:09 FROGGS pmichaud: just open a PR
18:09 pmichaud FROGGS: how exactly does one do that?  Through the github interface, or ...?
18:10 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 #perl6
18:10 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 #perl6
18:11 FROGGS after changing something and commiting (in the webeditor), your can click on 'compare and pull request'
18:11 FROGGS pmichaud: yes
18:11 pmichaud well, in this case we have a working patch in a clone'd repo
18:11 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
18:11 FROGGS pmichaud: if you clone and push to a repo hosted elsewhere, you can only email git-am ready patches to RT
18:12 FROGGS pmichaud: you dont have to... you can also click on fork, checkout the forked repo, modify and push
18:12 FROGGS pmichaud: after that you visit your fork and click again on 'compare and pull request'
18:12 tadzik Util: it's named after my dog
18:13 tadzik (rip :()
18:13 FROGGS ohh
18:13 FROGGS panda++ then
18:13 lizmat :-(
18:13 lizmat panda++ indeed!
18:14 quietfanatic joined #perl6
18:14 quietfanatic so what's the recommended way to install rakudo to /usr/local?
18:14 FROGGS pmichaud: online editing is just nice if you want to correct a typo, and do not intend to get involved more
18:15 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
18:15 skids pmichaud: but if you have push access github will "helpfully" just commit on you by surprise.
18:15 FROGGS quietfanatic: sudo perl Configure --prefix=/usr/local --gen-moar --make-install # in the rakudo checkout
18:16 FROGGS 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
18:16 FROGGS quietfanatic: you need to install moarvm to build nqp for example
18:16 quietfanatic I guess I could do that and then chown everything...
18:16 FROGGS quietfanatic: or you install the three sequentially
18:16 pmichaud we normally don't expect people to be installing from the rakudo clone
18:16 timotimo jdv79: it's inside MoarVM
18:17 quietfanatic oh, do the monthly releases have a better way?
18:17 dalek rakudo/nom: 287ab14 | (Nick Logan)++ | src/core/Exception.pm:
18:17 dalek rakudo/nom: Don't add ", or" if @available.elems == 1
18:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/287ab147ed
18:17 dalek rakudo/nom: 4539828 | lizmat++ | src/core/Exception.pm:
18:17 dalek rakudo/nom: Merge pull request #419 from ugexe/exception-nyi-message-fix
18:17 dalek rakudo/nom:
18:17 dalek rakudo/nom: Don't print ", or" if @.available.elems == 1
18:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4539828a23
18:17 quietfanatic In that case I guess I'll just do what everybody else does and link from ~/bin
18:17 FROGGS quietfanatic: that'd be the easiest
18:17 pmichaud quietfanatic: if someone is installing into the system, we somewhat expect installing moarvm, nqp, and rakudo in separate steps.
18:18 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?
18:18 pmichaud the --gen-moar is intended to be a developer convenience, not a system-admin-way-of-doing-things
18:18 lizmat hoelzro: you need to protect yourself
18:18 hoelzro ok, that's what I figured
18:19 hoelzro thanks for the confirmation, lizmat!
18:19 lizmat there's no protection whatsoever
18:19 lizmat scalars *may* be the exception on simple assignments
18:20 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
18:20 lizmat m: my $a = 0; await do for ^5 { start { $a++ for ^1000 } }; say $a   # not 5 * 1000
18:20 camelia rakudo-moar 1ccb15: OUTPUT«3451␤»
18:20 lizmat m: my $a = 0; await do for ^5 { start { $a++ for ^1000 } }; say $a   # not 5 * 1000
18:20 camelia rakudo-moar 1ccb15: OUTPUT«4731␤»
18:21 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 domidumont joined #perl6
18:22 quietfanatic I'll figure something out, thanks
18:23 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␤»
18:23 lizmat m: my @a; await do for ^5 { start { @a.push($_) for ^100 } }; say @a.elems   # clunk!
18:23 camelia rakudo-moar 1ccb15: OUTPUT«500␤»
18:23 lizmat m: my @a; await do for ^5 { start { @a.push($_) for ^100 } }; say @a.elems   # clunk!
18:23 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)[0​x7fc373ce60bf]␤/lib64/libc.so.6(+0x789​2e)[0x7fc373ceb92e]␤/lib64/libc.so…»
18:23 lizmat m: my @a; await do for ^5 { start { @a.push($_) for ^100 } }; say @a.elems   # clunk!
18:23 camelia rakudo-moar 1ccb15: OUTPUT«466␤»
18:23 lizmat m: my @a; await do for ^5 { start { @a.push($_) for ^100 } }; say @a.elems   # clunk!
18:24 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  :-)
18:24 [Coke] diakopter: hio
18:24 FROGGS quietfanatic: https://gist.github.com/FR​OGGS/2d36d141ca34d814f1db
18:24 FROGGS quietfanatic: ups, needs a make step...
18:25 FROGGS 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.
18:25 camelia rakudo-moar 1ccb15: OUTPUT«B␤»
18:25 FROGGS I updated the gist
18:26 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␤»
18:31 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?
18:32 FROGGS quietfanatic: did you make install?
18:32 FROGGS ohh
18:32 FROGGS quietfanatic: to which perl6 did you link?
18:32 FROGGS do not link to the one in the repo, but to the one in install/bin/
18:33 quietfanatic ah I forgot about that
18:33 * 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 ".
18:33 camelia rakudo-moar 1ccb15: OUTPUT«B␤»
18:34 quietfanatic okay thanks, everything's good now
18:34 FROGGS quietfanatic: have fun
18:36 andreoss joined #perl6
18:37 lolisa joined #perl6
18:39 quietfanatic thanks.  I'm thinking of reviving Link::C
18:39 itz joined #perl6
18:40 bin_005 joined #perl6
18:41 FROGGS quietfanatic: ohh, interesting... so it is a bit like SWIG?
18:41 FROGGS I hope you know about NativeCall
18:44 quietfanatic The goal is to make using C libraries in Perl 6 as easy as it is to use them in C
18:44 quietfanatic 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
18:44 FROGGS I understand that... I just skimmed https://github.com/quietfanatic/link-c/
18:45 quietfanatic NativeCall should make this much easier.  Previously I had to deal with Parrot's FFI
18:45 quietfanatic Also Rakudo is now fast enough that I shouldn't have to shell off to a Perl 5 parser :)
18:45 FROGGS yeah
18:46 FROGGS though, grammars are faster that calling .get in a loop, or using .lines
18:46 quietfanatic Really?  That's pretty cool
18:47 FROGGS s/that/than/
18:47 quietfanatic Earlier I actually used a full Perl 5 grammar with the (?(define)) construct
18:48 quietfanatic or no
18:48 quietfanatic or yeah
18:48 FROGGS hehe
18:49 rurban joined #perl6
18:49 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:50 quietfanatic 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
18:51 quietfanatic I think it was 5.10
18:51 nwc10 quite possibly what you describe is still inconsistent in current versions too
18:51 nwc10 aha.
18:51 quietfanatic tit was old enough that I was running into problems with the regex engine not being reentrant
18:51 nwc10 life will be better with v5.18 or newer
18:51 quietfanatic anyway, now I'm using v6 so :)
18:51 FROGGS ... as advertised by rjbs++
18:52 nwc10 yes, that seems something like the old sigs "it said windows 95 or better, so I used a Mac"
18:52 FROGGS :D
18:52 quietfanatic hahaha
18:54 Util panda++   Thanks, tadzik!
18:56 meisl joined #perl6
18:58 virtualsue joined #perl6
18:58 meisl hello #perl6
18:58 PerlJam meisl: greetings!
18:58 FROGGS hi meisl
19:00 meisl hi; no questions today, so you can relax (at least none pressing :)
19:00 PerlJam .oO( when would we *not* relax?  ;)
19:01 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)
19:02 FROGGS which... is what I did an hour ago
19:02 meisl without success?
19:03 FROGGS meisl: with success
19:03 FROGGS because I'm smart :D
19:03 PerlJam FROGGS: that sounds like the perfect time to relax so that you can get it done.  :)
19:03 PerlJam FROGGS: relaxed, but focused.
19:03 FROGGS I'm a man, I can't do both
19:03 meisl hehe
19:06 meisl FROGGS: seems we're lacking a really manly hyper-op, for auto-parallelization
19:08 FROGGS meisl: and at least for me I can say that my extendability is limited
19:10 amurf joined #perl6
19:11 meisl well, there are things for which unlimited expandability would be unhealthy, indeed
19:12 meisl (or extensibility?)
19:18 meisl FROGGS: seriously: what about a new Rakudo* release? (particularly the .msi, which you're the one for I figure)
19:20 rurban joined #perl6
19:22 skids joined #perl6
19:25 FROGGS meisl: if one would do a star release I can easily create the msi's
19:25 domidumont joined #perl6
19:25 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 #perl6
19:38 dalek perl6-examples: 69413b3 | (Steve Mynott)++ | lib/Pod/Htmlify.pm6:
19:38 dalek perl6-examples: reenable Text::VimColour
19:38 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/69413b325f
19:38 dalek perl6-examples: dc45912 | (Steve Mynott)++ | / (2 files):
19:38 dalek perl6-examples: import and use initial vim.css
19:38 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/dc45912fe2
19:39 dalek perl6-examples: 738b853 | (Steve Mynott)++ | .travis.yml:
19:39 dalek perl6-examples: Text::VimColour in travis
19:39 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/738b853db9
19:46 [Sno] joined #perl6
19:51 nowan_ joined #perl6
20:03 llfourn joined #perl6
20:05 Gardner joined #perl6
20:09 dalek rakudo/nom: 0ebea8a | flussence++ | docs/running.pod:
20:09 dalek rakudo/nom: Document --profile-filename switch in the manpage
20:09 dalek rakudo/nom:
20:09 dalek rakudo/nom: 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 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0ebea8a6f0
20:09 dalek rakudo/nom: 821ea7a | lizmat++ | docs/running.pod:
20:09 dalek rakudo/nom: Merge pull request #417 from flussence/patch-1
20:09 dalek rakudo/nom:
20:09 dalek rakudo/nom: Document --profile-filename switch in the manpage
20:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/821ea7adda
20:10 dalek rakudo/nom: 7ec91e6 | (Chris Jepeway)++ | src/core/Temporal.pm:
20:10 dalek rakudo/nom: Preserve $.timezone in DateTime.later()
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7ec91e66ba
20:10 dalek rakudo/nom: 975eb98 | (Chris Jepeway)++ | src/core/Temporal.pm:
20:10 dalek rakudo/nom: changed :timezone($.timezone) => :$.timezone -- vendethiel++
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/975eb9877a
20:10 dalek rakudo/nom: 953b7e8 | (Chris Jepeway)++ | src/core/Temporal.pm:
20:10 dalek rakudo/nom: Fix .later(seconds => ...) to preserve &.formatter
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/953b7e835c
20:10 dalek rakudo/nom: c194502 | (Chris Jepeway)++ | src/core/Temporal.pm:
20:10 dalek rakudo/nom: Fix DateTime.later() to preserve &.formatter
20:10 dalek rakudo/nom: when given a time unit other than seconds
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c1945021c4
20:10 dalek rakudo/nom: 5232f32 | (Chris Jepeway)++ | src/core/Temporal.pm:
20:10 dalek rakudo/nom: First, erroneous cut at fixing DateTime.{local,utc} so
20:10 dalek rakudo/nom: they won't slice off timezone classes.
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5232f324fc
20:10 dalek rakudo/nom: cead6f1 | lizmat++ | src/core/Temporal.pm:
20:10 dalek rakudo/nom: Merge pull request #418 from cjepeway/date-time-slices-tz
20:10 dalek rakudo/nom:
20:10 dalek rakudo/nom: Preserve $.timezone in DateTime.later()
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cead6f13c7
20:14 dalek rakudo/nom: d13ba35 | paultcochrane++ | t/02-rakudo/01-is_approx.t:
20:14 dalek rakudo/nom: Add "tests" showing current is_approx() behaviour
20:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d13ba35107
20:14 dalek rakudo/nom: 6ba1b45 | paultcochrane++ | lib/Test.pm:
20:14 dalek rakudo/nom: Replace is_approx() algorithm with relative difference algorithm
20:15 dalek joined #perl6
20:20 ggoebel joined #perl6
20:21 RabidGravy wahat a lot of commits
20:22 [Coke] (star release) were the module installations ever fixed?
20:22 nys joined #perl6
20:25 dalek rakudo/nom: e83b602 | lizmat++ | / (3 files):
20:25 dalek rakudo/nom: Make is_approx the new is-approx, restore the old
20:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e83b6020ca
20:25 lizmat RabidGravy: I'm going through some recentish pull requests
20:25 daotoad joined #perl6
20:26 Zhtwn joined #perl6
20:27 virtualsue joined #perl6
20:31 zakharyas joined #perl6
20:33 dalek rakudo/nom: 51e88b9 | lizmat++ | lib/Test.pm:
20:33 dalek rakudo/nom: Eliminate return for better test performance
20:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/51e88b9fbb
20:38 [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
20:38 pmichaud "return" is exceptional.
20:38 lizmat $ 6 'sub a { 42 }; for ^10000000 { a }'
20:38 lizmat real0m2.036s
20:38 pmichaud as in, it throws an exception, that needs to be catchable.
20:39 lizmat $ 6 'sub a { return 42 }; for ^10000000 { a }'
20:39 lizmat real0m15.357s
20:39 pmichaud at least, that's the way it was at one time.
20:39 lizmat $ 6 'sub a { return 42 }; for ^10000000 { }'
20:39 lizmat real0m2.036s
20:39 lizmat pmichaud: it still is
20:39 lizmat and it's not optimized away just yet
20:39 pmichaud well, I'm wondering about that "needs to be catchable" part still being true.  :)
20:40 lizmat ah, afaik, jnthn thinks a tail return can be optimized away
20:41 lizmat 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 #perl6
20:43 travis-ci Rakudo build failed. lizmat 'Merge pull request #417 from flussence/patch-1
20:43 travis-ci http://travis-ci.org/rakudo/rakudo/builds/66439652 https://github.com/rakudo/rakudo/c​ompare/4539828a2376...821ea7addabe
20:43 travis-ci left #perl6
20:44 RabidGravy eh?
20:49 meisl lizmat: "tail call optimization", or "proper" tail calls as some call it, require "returns" to be non-catchable
20:50 dalek rakudo/nom: aa79616 | TimToady++ | src/core/Real.pm:
20:50 dalek rakudo/nom: simplify sign implementation
20:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aa79616756
20:51 dalek roast: 4dd5f13 | TimToady++ | S32-num/sign.t:
20:51 dalek roast: update to new sign(Int) behavior
20:51 dalek roast: review: https://github.com/perl6/roast/commit/4dd5f134bd
20:51 meisl lizmat, pmichaud: so: no-return-catcher-in-effect analysis is necessary prior to tail call opt
20:52 meisl (or, rewrite "catching" a return control exception being caugth appropriately, then tail calls)
20:54 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.
20:54 lizmat TimToady: your last patch subtly changes the meaning of e.g. Int.sign
20:54 lizmat m: say Int.sign
20:54 camelia rakudo-moar 51e88b: OUTPUT«(Mu)␤»
20:54 lizmat this *will* become Int now
20:54 TimToady it throws an error now
20:55 meisl [Coke]: "linguistically"?
20:56 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 => 「」␤»
20:57 AlexDaniel what's wrong with these empty delimeters?
20:57 AlexDaniel why are they in this order?
20:58 AlexDaniel 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」␤»
20:58 AlexDaniel pay attention to the order
20:59 flussence do you mean how the second 0 and first delim swap places?
21:00 AlexDaniel yes
21:00 itz joined #perl6
21:01 AlexDaniel flussence: is there any meaningful reason for that?
21:01 AlexDaniel m: say grammar Gram { regex TOP { ('XX')+ %% $<delim>=.* }; }.parse('XXXXyXXz');
21:01 camelia rakudo-moar 51e88b: OUTPUT«「XXXXyXXz」␤ 0 => 「XX」␤ delim => 「XXy」␤ 0 => 「XX」␤ delim => 「z」␤»
21:01 AlexDaniel now, this does not make any sense at all to me
21:02 AlexDaniel oh no, it does
21:02 AlexDaniel hm
21:02 timbunce_ joined #perl6
21:02 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:05 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:14 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」␤「」 「」 「」␤»
21:14 flussence m: given grammar { regex TOP { ('XX')+ %% $<delim>=<[a..z]>* }; }.parse('XXXXXX') { say .list; say .values; }
21:14 camelia rakudo-moar 51e88b: OUTPUT«「XX」 「XX」 「XX」␤「XX」 「XX」 「XX」 「」 「」 「」␤»
21:14 telex joined #perl6
21:14 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」␤「」 「」 「」␤»
21:14 TimToady that looks right for %%
21:14 TimToady for % you'd get one less
21:15 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 #perl6
21:16 AlexDaniel TimToady: don't you think that the delimiter should be between XXs?
21:16 AlexDaniel or is it unordered?
21:17 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...
21:17 lizmat t/spec/S03-operators/nesting.t , line 41 broke
21:24 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 rakudo/nom: 0b60530 | TimToady++ | src/core/Real.pm:
21:24 dalek rakudo/nom: force sign(Same) to return 0
21:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0b60530645
21:25 [Coke] pmichaud: we either need to do that or document the crap out of it.
21:26 [Coke] heading out, probably will be back sundayish. later.
21:27 timbunce Is rakudobrew still a good way for me to get a fresh rakudo? (It's not mentioned on http://perl6.org/compilers/ and there's only one mention in http://rakudo.org/?s=rakudobrew from 2011)
21:27 * geekosaur remembers back when perl 5 had a really expensive explicit return...
21:28 timbunce and not mentioned in http://rakudo.org/how-to-get-rakudo/
21:28 meisl pmichaud, [Coke]: isn't that just a matter of optimization (although an important one)?
21:28 lizmat timbunce: afaik, it still is
21:28 RabidGravy timbunce, it works well
21:30 timbunce thanks
21:41 dalek rakudo/nom: 0f53d57 | lizmat++ | src/core/Temporal.pm:
21:41 dalek rakudo/nom: Revert code that had debugging in it
21:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0f53d578d5
21:42 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:43 pmichaud 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:46 cognominal pmichaud, how the GLR is going?
21:46 pmichaud working on it now.  :)
21:46 pmichaud new version of S07
21:47 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.
21:47 pmichaud 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".
21:47 synbot6 Link: http://design.perl6.org/S04.html#line_1122
21:48 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.
21:48 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?
21:49 pmichaud cognominal: and native shaped arrays
21:49 pmichaud fsvo "specs"
21:49 cognominal fsvo?
21:49 pmichaud "for some value of"
21:49 Gardner joined #perl6
21:50 cognominal well, shaped arrays should not affect existing code?
21:50 pmichaud cognominal: I hesitate to make such predictions.  :)
21:50 TimToady depends on whether the speculated syntax is adequate
21:51 cognominal I don't ask for a commitment, just want to get a general idea :)
21:52 pmichaud even then, I don't have a >50% confidence level that it won't affect existing code
21:52 pmichaud we just don't know where the mines are buried.
21:52 pmichaud that's part of the reason why native shaped arrays are considered pre-6 critical
21:52 llfourn joined #perl6
21:52 cognominal ok
21:52 pmichaud because they _may_ have that effect on existing code
21:53 TimToady the NFG changes turned out to be minimal (whew!)
21:54 lizmat cognominal: perhaps :-)
21:54 timbunce rakudobrew build-panda failure "error: The following untracked working tree files would be overwritten by merge"  https://gist.github.com/tim​bunce/2440accbede7255168c6
21:54 timbunce any suggestions re ^?
21:55 khisanth_ joined #perl6
21:55 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:58 bin_005_q joined #perl6
21:59 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
22:00 timbunce tadzik: any ideas about https://gist.github.com/tim​bunce/2440accbede7255168c6
22:00 cognominal seeing an EXPORTALL in S11 but none on rakudo
22:04 pmichaud meisl: I'm in agreement about optimizing it away.  :)
22:05 pmichaud the existence of a CONTROL handler may be another of those "mini-context" flags that I keep throwing around (like sink)
22:06 rurban joined #perl6
22:08 RabidGravy okay, that's officially weird "*** Error in `/home/jonathan/.rakudobrew/​moar-nom/install/bin/moar': malloc(): smallbin double linked list corrupted: 0x00000000036c0c40 ***"
22:09 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 lizmat answering for pmichaud: yes, but the computer isn't is so smart  :-)
22:10 yqt joined #perl6
22:11 Zhtwn joined #perl6
22:12 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
22:12 camelia rakudo-moar 0b6053: OUTPUT«「a␤」 「b␤」 「c␤」␤»
22:12 jdv79 m: my $r=".*?\n"; say "a\nb\nc\n" ~~ m:global/<$r>/ # what
22:12 camelia rakudo-moar 0b6053: OUTPUT«「」 「」 「」 「」 「」 「」 「」␤»
22:12 jdv79 i think those used to be the same
22:13 jdv79 well, probably not actually
22:13 lizmat RabidGravy: could you golf and rakudobug, seems important
22:13 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.
22:14 pmichaud (of course, 'take' also is expensive like 'return' is :-).
22:14 pmichaud (although GLR will likely have to fix that)
22:14 jdv79 nm, i got it.  interpolation rules there changed i guess
22:15 RabidGravy lizmat, lots going on in this code, golf might be tricky
22:16 RabidGravy 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 #perl6
22:18 lizmat ++RabidGravy
22:19 wingfold joined #perl6
22:19 meisl pmichaud: so are you with me in that eliminating "premature returns" (no more but none less) is doable?
22:21 pmichaud meisl: I don't think it will ever be as cheap as the implicit can be
22:21 pmichaud because they're semantically different.
22:22 pmichaud as far as "eliminating 'premature returns'", I don't understand exactly what that means
22:24 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:25 lizmat pmichaud: I think meisl means : sub a { return if foo; ... }
22:25 pmichaud I don't understand what 'premature returns' means here.
22:25 lizmat aka, a return that is not at the end of a sub/method
22:25 meisl yes, thx
22:25 pmichaud I'm certain it's doable, but I know elminating them is not always desirable
22:26 meisl taking the view of the optimizer, not the user
22:27 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.
22:28 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.
22:28 meisl but the dynamical... makes me hesitate...
22:29 dalek doc/choices: 02e357f | ab5tract++ | bin/p6doc:
22:29 dalek doc/choices: Add a disambiguation prompt when there is more than one match for -f
22:29 dalek doc/choices: review: https://github.com/perl6/doc/commit/02e357f0ea
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.
22:29 pmichaud (unless the block has been inlined, which isn't always the case)
22:29 meisl "inlined" means on the level of the user program, right?
22:30 pmichaud sub a { if foo { ...; return }; ... }     # here the return throws an exception to exit the nested block
22:30 meisl understand
22:30 ab5tract .tell moritz I pushed a 'choices' branch to doc.git for disambiguating, for instance, -f push
22:30 yoleaux ab5tract: I'll pass your message to moritz.
22:33 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:34 meisl 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:36 Util m: &::( "MY::foobar" ).defined;
22:36 camelia rakudo-moar 0f53d5: OUTPUT«===SORRY!===␤MVMArray: Index out of bounds␤»
22:36 Util m: &::("MY::foobar").defined;
22:36 camelia rakudo-moar 0f53d5: ( no output )
22:36 * lizmat looks
22:37 skids joined #perl6
22:40 FROGGS joined #perl6
22:47 pmichaud m: my @a = 3,4,5;  for 1, 2, @a { .say }
22:47 camelia rakudo-moar 0f53d5: OUTPUT«1␤2␤3␤4␤5␤»
22:48 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 #perl6
22:48 meisl pmichaud: what do you think of "handlers as subroutines"? (in fact I'm thinking continuations, rather than "subroutines")
22:49 pmichaud subroutines come with a lot of baggage that I'm not sure a handler should have.
22:49 pmichaud at the moment I much prefer the phaser/block approach used now... it feels much more natural to me.
22:50 meisl noo, not in that sense. conceptually, I mean
22:51 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␤»
22:52 timbunce http://doc.perl6.org/language/nativecall covers talk to C libraries, any docs for talking to Java classes?
22:54 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 ggoebel joined #perl6
22:55 meisl (and only a *few* basic ones)
22:55 pmichaud meisl: I'm probably not the right person to talk to about it, then.  :)
22:55 pmichaud at least not at this time :)
22:56 meisl pmichaud: oh... are you sure (I'm not :)
22:58 meisl well ok, it's late over here, too.
23:06 skids meisl: pmichaud is waste-deep in a big refactor right now, don't distract him :-)
23:07 khisanth_ joined #perl6
23:09 amurf joined #perl6
23:10 Util m:
23:10 Util Doh!
23:10 Util m: sub foo {return ();}; my %h = foo();
23:10 camelia rakudo-moar 0f53d5: ( no output )
23:10 Util m: sub foo {return ;}; my %h = foo();
23:10 camelia rakudo-moar 0f53d5: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/Wavaj_azes:1␤␤»
23:10 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)
23:12 Util m: sub foo {return ();}; my @a = foo(); say @a.perl;
23:12 grondilu joined #perl6
23:12 camelia rakudo-moar 0f53d5: OUTPUT«[]<>␤»
23:12 Util ???
23:12 lizmat .u steam
23:12 yoleaux U+2F53 KANGXI RADICAL STEAM [So] (⽓)
23:12 yoleaux U+1F35C STEAMING BOWL [So] (🍜)
23:12 yoleaux U+1F682 STEAM LOCOMOTIVE [So] (🚂)
23:13 lizmat .u roller
23:13 yoleaux U+1F3A2 ROLLER COASTER [So] (🎢)
23:13 Util If it returns nothing, how can the hash be getting a odd # of values?
23:13 lizmat m: sub foo {return Empty}; my %h = foo()
23:13 camelia rakudo-moar 0f53d5: ( no output )
23:14 meisl have a good night, #perl6
23:14 Util gn, meisl
23:14 lizmat m: sub foo {return Nil}; my %h = foo()
23:14 camelia rakudo-moar 0f53d5: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/6M3OnMNINM:1␤␤»
23:14 dalek doc/choices: f9b7d83 | ab5tract++ | bin/p6doc:
23:14 dalek doc/choices: Theoretically support single-value matches
23:14 dalek doc/choices: review: https://github.com/perl6/doc/commit/f9b7d83258
23:14 lizmat Util: we don't have context for that in Perl6 so a bare return returns Nil
23:14 lizmat and that doesn't flatten, so becomes one thingy that generates the odd number of elements warning
23:15 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 #perl6
23:15 quietfanatic I'm having an error trying to run panda
23:15 quietfanatic It says "Cannot parse /stash/lewis/git/rakudo/install/sh​are/perl6/site/panda/projects.json as JSON: Input (4 characters) is not a valid JSON string"
23:15 pmichaud m: sub foo { return Empty };  my %h = foo();
23:15 camelia rakudo-moar 0f53d5: ( no output )
23:15 quietfanatic the mentioned file contains "Nil"
23:17 quietfanatic deleting the file so it'd be regenerated worked, never mind
23:18 skids quietfanatic: maybe "panda update"?
23:18 skids oh, ok.
23:19 skids (I can never tell whether pidgin os scrolling or not.)
23:19 skids *is
23:22 Util lizmat: So a bare return on general failure is not longer an idiom in Perl 6?
23:24 lizmat if it is a failure, you should probably "fail"
23:24 lizmat m: sub foo {fail}; my %h = foo()
23:24 camelia rakudo-moar 0f53d5: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/MIh1sPSxDx:1␤␤»
23:24 lizmat hmmm...
23:25 lizmat 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␤␤»
23:25 lizmat this is hiding the original failure
23:25 timbunce Where is "use foo::bar:from<java>;" documented?
23:26 dalek specs: eb232c5 | pmichaud++ | S07-glr-draft.pod:
23:26 dalek specs: Draft S07 for post-GLR list features.
23:26 dalek specs:
23:26 dalek specs: This document is to be very fluid -- while it's intended to ultimately
23:26 dalek specs: be the synopsis describing lists, during the Great List Refactor (GLR)
23:26 dalek specs: it will also be a shared scratchboard for design notes, decisions,
23:26 dalek specs: and speculations.
23:26 dalek specs: review: https://github.com/perl6/specs/commit/eb232c5bef
23:27 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]])
23:27 camelia rakudo-moar 0f53d5: OUTPUT«[[1, 2], [3, 4]]<>␤[1, 2]<>␤[3, 4]<>␤»
23:28 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␤␤»
23:28 pmichaud timbunce: S11:546
23:28 synbot6 Link: http://design.perl6.org/S11.html#line_546
23:29 timbunce pmichaud: thanks
23:29 skids m: sub foo (@a (@b, @c)) { }; foo([1,2,3,4])
23:29 camelia rakudo-moar 0f53d5: OUTPUT«cannot stringify this␤  in sub foo at /tmp/cfMTzOieGp:1␤  in block <unit> at /tmp/cfMTzOieGp:1␤␤»
23:30 skids must be some sort of failure building a failure
23:38 DoinkP joined #perl6
23:39 dalek rakudo/nom: 15c6fbf | lizmat++ | src/core/EnumMap.pm:
23:39 dalek rakudo/nom: Don't eat lone failure initializing a hash, Util++
23:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/15c6fbf0a8
23:42 Util lizmat, pmichaud: thx!
23:45 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␤␤»
23:45 ab5tract m: my @a = 'Type::Cool', 'Type::Not'; @a.grep(/'Cool'/).say; @a.grep({ ! $_ ~~ /'Cool'/ }).say; @a.grep(/Not/).say;
23:45 camelia rakudo-moar 0f53d5: OUTPUT«Type::Cool␤␤Type::Not␤»
23:49 tadzik timbunce: clearing your rakudobrew installation may help
23:49 tadzik or at least its panda directory
23:49 timbunce tadzik: thanks. I stubled on that as a workaround.
23:56 ab5tract precedence, my old friend
23:57 dagurval joined #perl6
23:59 sivoais joined #perl6

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

Perl 6 | Reference Documentation | Rakudo