Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-04-28

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:02 skids joined #perl6
00:03 tinyblak joined #perl6
00:25 laouji joined #perl6
00:38 laouji joined #perl6
00:46 tadzik couldn't sleep. Started wondering how pi is calculated. Then in turn how sqrt() is calculated. Then in turn took my laptop and wrote a P6 program that calculates sqrt() with infinite precision
00:46 tadzik on a scale from 3 to pi how much of a math nerd am I? :)
00:47 tadzik the program writes out one digit at a time, it looks like it would make a nice screensaver
00:49 colomon :)
00:53 laouji joined #perl6
00:53 aindilis joined #perl6
00:54 dayangkun joined #perl6
00:55 dayangkun joined #perl6
00:58 dnmfarrell joined #perl6
01:00 dnmfarrell m: say "match!" if 'HTML' ~~ m/HTML/;
01:00 camelia rakudo-moar b6b180: OUTPUT«match!␤»
01:01 dnmfarrell on version 2015.04-51-g0c197cd I get this error: "Cannot assign to a readonly variable or a value"
01:01 skids m: grammar foo { rule f is DEPRECATED { a }; }; foo.parse("a",:rule<f>).say
01:01 camelia rakudo-moar b6b180: OUTPUT«「a」␤»
01:02 * skids was pondering de-underscoring the IETF grammar modules. (IETF uses hypens in the RFC).
01:08 dalek rakudo-star-daily: 68607ca | coke++ | log/ (2 files):
01:08 dalek rakudo-star-daily: today (automated commit)
01:08 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/68607ca627
01:08 skids (Also I started a bit on RFC7230 and might peck away at it further in the coming weeks.)
01:11 aindilis joined #perl6
01:19 skids dnmfarrell: what are you working on?
01:29 dnmfarrell skids: A pod to HTML action class for this grammar: https://github.com/dnmfarrell/Pod-Perl​5/blob/master/lib/Pod/Perl5/Grammar.pm
01:30 skids Oh cool.
01:31 * skids wonders if perl5 pod could be hooked into .WHYs when used via Inline::Perl5.
01:31 dnmfarrell skids: interesting idea :)
01:33 dnmfarrell After this grammar is down, I'm going to work on a pseudpod extension for perltricks.com. So stuff like @<handle> will convert to twitter links etc.
01:36 dnmfarrell skids: what are you working on?
01:37 skids I'm just sort of "knitting" right now, transcribing rules from RFC7230
01:39 raiph joined #perl6
01:41 jack_rabbit joined #perl6
01:53 jack_rabbit joined #perl6
01:55 ilbot3 joined #perl6
01:55 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
01:57 jack_rabbit joined #perl6
02:04 jack_rabbit joined #perl6
02:08 tinyblak_ joined #perl6
02:14 chenryn joined #perl6
02:20 rmgk joined #perl6
02:38 raiph joined #perl6
02:48 rmgk joined #perl6
02:55 noganex joined #perl6
02:56 telex joined #perl6
02:57 timotimo https://p6weekly.wordpress.com/2015/04/28/2​014-16-17-a-release-nfg-and-more-glr-work/ finally published
02:57 timotimo i shouldn't have played so much of that video game ... again ...
02:58 dalek gtk-simple: 6f5fdfb | timotimo++ | lib/GTK/Simple.pm6:
02:58 dalek gtk-simple: We use a bunch of nqp ops directly in here.
02:58 dalek gtk-simple:
02:58 dalek gtk-simple: we have to declare that nowadays.
02:58 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/6f5fdfbef2
03:01 skids timotimo: which game?
03:01 pierrot joined #perl6
03:07 skids timotimo++ for weekly.  Though, you missed windows-1252 codepage support ;-)
03:18 tinyblak joined #perl6
03:22 labster timotimo++ for the weekly (though I kinda hoped you would mention rakudo a96118dc8 from me)
03:23 labster skids: we are ignored :)
03:24 skids He must have picked the game controller back up :-)
03:25 ugexe skids if youre doing grammar for 7230 this might be handy https://github.com/ugexe/Perl6-IETF--RFC_Gra​mmar--HTTP/tree/master/lib/IETF/RFC_Grammar
03:26 skids ugexe++
03:26 labster at some point, you just gotta stop reading git log and post (and game)
03:27 skids ugexe: you'e been busy
03:28 cschwenz joined #perl6
03:29 ugexe the power of caffeine and ocd
03:31 konsolebox joined #perl6
03:41 skids ugexe: Maybe we could talk to FROGGS++ about membership in perl6-community-modules and consolodate 3968
03:42 vendethiel joined #perl6
03:42 skids Also could be fun to play with tadzik's new BNF translator.
03:47 tinyblak joined #perl6
04:01 BenGoldberg m: say( 0 + ' 1/7' )
04:01 camelia rakudo-moar b6b180: OUTPUT«0.142857␤»
04:02 BenGoldberg m: say( 0 + ' ⅐' )
04:02 camelia rakudo-moar b6b180: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in ' ⏏⅐' (indicated by ⏏)␤  in sub parse-int-frac-exp at src/gen/m-CORE.setting:7455␤  in sub parse-simple-number at src/gen/m-CORE.setting:7633␤  in sub parse-…»
04:08 fhelmberger joined #perl6
04:43 laouji joined #perl6
04:45 flussence m: say unival('⅐')
04:45 camelia rakudo-moar b6b180: OUTPUT«0.142857␤»
04:49 laouji joined #perl6
04:57 laouji joined #perl6
05:07 vendethiel joined #perl6
05:07 cschwenz joined #perl6
05:15 alini joined #perl6
05:15 chenryn joined #perl6
05:21 yeahnoob joined #perl6
05:22 chenryn joined #perl6
05:32 cschwenz joined #perl6
05:33 TimToady m: say unival('⅐').perl
05:33 camelia rakudo-moar b6b180: OUTPUT«<1/7>␤»
05:33 TimToady note it's actually a Rat, not an approximation
05:36 vendethiel joined #perl6
05:42 kaare_ joined #perl6
05:45 Psyche^ joined #perl6
05:52 laouji_ joined #perl6
05:54 cschwenz p6: say( 0 + ' ⅐' )
05:54 camelia rakudo-moar b6b180: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in ' ⏏⅐' (indicated by ⏏)␤  in sub parse-int-frac-exp at src/gen/m-CORE.setting:7455␤  in sub parse-simple-number at src/gen/m-CORE.setting:7633␤  in sub parse-…»
05:54 cschwenz p6: say( 0 + '⅐' )
05:54 camelia rakudo-moar b6b180: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏⅐' (indicated by ⏏)␤  in sub parse-int-frac-exp at src/gen/m-CORE.setting:7455␤  in sub parse-simple-number at src/gen/m-CORE.setting:7633␤  in sub parse-r…»
05:54 cschwenz m: say( 0 + unival('⅐') )
05:54 camelia rakudo-moar b6b180: OUTPUT«0.142857␤»
05:56 _mg_ joined #perl6
05:56 cschwenz left #perl6
05:58 laouji joined #perl6
05:59 vike joined #perl6
06:02 diana_olhovik joined #perl6
06:04 raiph joined #perl6
06:04 jack_rabbit joined #perl6
06:09 cdc timotimo: 2014.16 -> 2015.16
06:16 domidumont joined #perl6
06:19 FROGGS joined #perl6
06:21 domidumont joined #perl6
06:23 FROGGS o/
06:23 nwc10 \o
06:26 colomon joined #perl6
06:39 vendethiel joined #perl6
06:41 gfldex joined #perl6
06:55 RabidGravy joined #perl6
07:07 darutoko joined #perl6
07:08 rindolf joined #perl6
07:09 Ven joined #perl6
07:09 Ven \o, #perl6!
07:09 masak morning, #perl6
07:10 jnthn morning all o/
07:10 * jnthn caught up on backlog :)
07:10 TimToady o/
07:10 jnthn Also resolved the RT about grapheme-level reasoning since it's in
07:10 jnthn We can open more specific tickets about more specific issues :)
07:11 jnthn m sub f(|$everything) { say $everything.perl }; my %h  = :a, :b, :!c; f(%h)
07:11 jnthn m: sub f(|$everything) { say $everything.perl }; my %h  = :a, :b, :!c; f(%h)
07:11 camelia rakudo-moar b6b180: OUTPUT«Obsolete use of | or \ with sigil on param $everything␤\(:a, :b, :!c)␤»
07:12 jnthn m: sub f(|everything) { say everything.perl }; my %h  = :a, :b, :!c; f(%h)
07:12 camelia rakudo-moar b6b180: OUTPUT«\(:a, :b, :!c)␤»
07:12 jnthn That looks wrong...
07:12 jnthn and I'd hoped the .map not flattening change would magically fix it :)
07:13 jnthn Oh, unless that .map got changed to a .for :P
07:13 zakharyas joined #perl6
07:15 * jnthn thinks he has a fix :)
07:16 jnthn Hopefully a nice easy RT for breakfast :)
07:17 * TimToady has been experimenting with making for loops non-flattening by default
07:18 Rounin joined #perl6
07:18 moritz TimToady: that's rather exciting
07:19 TimToady not always in the positive sense :)
07:19 moritz well
07:19 moritz the current state of list (non)-flattening isn't particularly exciting in the positive sense either
07:20 brrt joined #perl6
07:20 TimToady I've discovered several ways not to do it already :0
07:20 brrt \o
07:20 Tux__ joined #perl6
07:23 xfix joined #perl6
07:23 xfix joined #perl6
07:28 lizmat good *, #perl6!
07:28 lizmat timotimo++ for the P6W
07:28 lizmat m: (^10).rotor(1,2).perl.say  # old behaviour does *not* work anymore
07:28 camelia rakudo-moar b6b180: OUTPUT«((0,), (1, 2), (3,), (4, 5), (6,), (7, 8), (9,))␤»
07:29 lizmat timotimo: ^^
07:30 jack_rabbit joined #perl6
07:42 dalek rakudo/nom: 71d6480 | jnthn++ | src/core/Capture.pm:
07:42 dalek rakudo/nom: Ensure Capture.perl doesn't flatten in hashes.
07:42 dalek rakudo/nom:
07:42 dalek rakudo/nom: Fixes RT #114100.
07:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/71d6480c01
07:42 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=114100
07:42 dalek roast: 50dbbdf | jnthn++ | S02-types/capture.t:
07:42 dalek roast: Test for RT #114100 (Capture.perl flattening bug).
07:42 dalek roast: review: https://github.com/perl6/roast/commit/50dbbdfc99
07:42 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=114100
07:43 jnthn Back down to 670 tickets :)
07:44 brrt \o/
07:44 brrt fwiw: "One that treats a list as a collection of items and one that causes a list to flatten its inner lists and iterate over the result." - the second version could be chain?
07:45 TimToady at the moment in my copy, there's only a non-flattening 'for', and you have to write 'for flat' to get the other
07:45 brrt ah, that seems just as far
07:45 brrt fair
07:45 TimToady or deal with the args downstreadm
07:46 TimToady so, for instance, 'for @a X @b -> ($a, $b) {...}' using parens
07:46 TimToady is an alternative to 'for flat @a X @b -> $a, $b {...}'
07:47 TimToady we speculated that 'for flat' might be 'foreach' earlier
07:47 TimToady if we decide we want the sugar
07:47 brrt i think for flat is actually clearer
07:47 Tux__ joined #perl6
07:49 TimToady anyway, .for will not be the flattening alternative to .map
07:50 laouji_ joined #perl6
07:51 tinyblak_ joined #perl6
07:55 Ven TimToady: I'm not sure I get it. isn't `for` supposed to flatten in the GLR?
07:56 Ven or is the GLR going to do more work than first intended?
07:56 lizmat jnthn: if you have a minute, could you look at https://gist.github.com/li​zmat/ea3b3e842aa3e4f5d7ee and tell me if I'm on the right track ?
07:57 fhelmberger_ joined #perl6
08:01 cschwenz joined #perl6
08:02 jnthn lizmat: I suspect tht runs into %*PRAGMAS only closing the hash per scope, *not* any of the values in it.
08:02 TimToady Ven: yes, we're taking GLR a bit further, I think; it makes sense to change for to non-flattening because of all the things that produce non-itemized lists now, such as .combinations and .rotor
08:03 Ven TimToady: so we're leaving a bit perl5-flattening-land? or rather, leaving it a bit more
08:03 FROGGS lizmat: that feels like you want a :my %*PRAGMAS in each block
08:03 jnthn lizmat: So I think you may end up with the scope escaping
08:03 jnthn FROGGS: It *is* per block already
08:03 FROGGS ohh
08:03 jnthn That's how I got things like "use fatal" to behave lexically :)
08:03 FROGGS yeah, I see
08:03 jnthn It's just htat all the ones I did so far are just boolean flags
08:03 jnthn Which are really values
08:04 lizmat yeah, and I'm expanding on that idea  :-)
08:04 TimToady Ven: yes, the main question is whether we want to put in a 'foreach' for old times sake, but we can see how it goes with 'for flat' for now
08:04 jnthn Whereas if you start putting mutable things into %*PRAGMAS then you're sorta asking for trouble if you don't clone/tweak/update-the-hash.
08:04 lizmat so you're saying, it's the wrong approach ?
08:05 * jnthn is looking at 111962, 121830 (which is a dupe of it) and 111704 (related)
08:05 lizmat I was under the impresssion that the cloning already was done?
08:05 jnthn lizmat: It clones %*PRAGMAS - one level deep
08:05 fhelmberger joined #perl6
08:06 lizmat ah, ok
08:06 jnthn unless $INC { %*PRAGMAS<INC> := $INC := nqp::list() }
08:06 jnthn This will create a list that is shared between all inner scopes
08:06 jnthn Instead you need to clone any existing list (nqp::clone), push into the clone, and bind the clone into %*PRAGMAS
08:07 jnthn Then it should work fine enough
08:07 lizmat ok, that makes sense  :-)
08:08 lizmat (I think now :-)
08:08 laouji joined #perl6
08:09 jnthn FROGGS: For the perl6-valgrind-m did we get a way to give valgrind args?
08:10 FROGGS jnthn: timotimo proposed to use an env var for that
08:11 FROGGS so, not yet
08:11 donaldh joined #perl6
08:11 jnthn k
08:11 FROGGS you'd have to tweak tools/build/create-moar-runner.pl for that
08:12 jnthn well, or I can hack the generated script ;)
08:12 FROGGS bah
08:12 FROGGS that's lame :P
08:13 jnthn That's me :P
08:13 FROGGS hehe
08:13 koo6 joined #perl6
08:14 domidumont joined #perl6
08:15 TimToady okay, I've pretty much got it passing all the tests with non-flattening 'for'.  Do I push it?
08:15 TimToady it will likely have more effects on the ecosystem
08:15 TimToady but we've already sort of bitten that bullet this time anyway...
08:16 jnthn TimToady: How sure are you we're sticking with this, or do you need to see ecosystem fallout to know more?
08:16 FROGGS well, there won't be a better time I guess
08:17 jnthn Yeah
08:17 jnthn We're a long way from the next monthly.
08:17 TimToady I feel pretty good about it, and I think it's cleaner
08:17 jnthn OK
08:17 jnthn I think let's go for it.
08:17 TimToady it's a couple large commits, so easy to back out if necessary
08:17 * FROGGS .oO( to quote Salt'n'Pepper: Ahhh Sssss Push It )
08:18 dalek rakudo/nom: 04cc1d5 | TimToady++ | src/core/ (16 files):
08:18 dalek rakudo/nom: pervasive changes for non-flattening for loops
08:18 dalek rakudo/nom:
08:18 dalek rakudo/nom: (It's possible we can remove some of the .flats here or there without
08:18 dalek rakudo/nom: damage, but I erred on the side of caution on some of them.)
08:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/04cc1d52c5
08:18 dalek roast: ee79237 | TimToady++ | / (8 files):
08:18 dalek roast: tweaks for new non-flattening for loop
08:18 dalek roast: review: https://github.com/perl6/roast/commit/ee79237b00
08:18 dayangkun joined #perl6
08:19 FROGGS so, I have to 'for flat 1, 2, 3 {' ?
08:19 TimToady no
08:19 jnthn You'd have to for flat @a, @b { ... } though?
08:19 TimToady yes
08:19 FROGGS k
08:19 jnthn Gotcha.
08:19 lizmat TimToady: did you realize that SLICE.pm is generated ?
08:19 TimToady oh, well... :)
08:20 jnthn This is what happens when you generate things :P
08:20 TimToady feel free to upstream any changes there
08:21 FROGGS ahh, makeSLIVE.pl6
08:21 larion joined #perl6
08:21 FROGGS SLICE*
08:21 FROGGS I'll do it
08:21 Ven TimToady: thanks for the precisions! Seeing as flattening is one of the thing that feels less..."obvious" to me when I'm perl6-in
08:21 TimToady thanks
08:21 lizmat FROGGS++
08:22 * Ven remember trying to be too clever at times, typing `[@a, @b][0].push x` or something
08:22 * jnthn thinks this'll heap learnability some :)
08:22 jnthn *help
08:22 TimToady I hope so
08:23 jnthn "make test" works here with it :)
08:23 andreoss joined #perl6
08:23 colomon joined #perl6
08:23 TimToady there was a failure or two in the larger test suite that I didn't think was my fault, but I could be wrong...
08:24 jnthn I'll kick off a run
08:24 jnthn I did one recently
08:24 TimToady and if it *is* my fault, I'm going to bed :)
08:24 lizmat good night, TimToady
08:24 psch joined #perl6
08:24 jnthn :)
08:24 jnthn 'night, TimToady++
08:24 masak wait, we don't know if it is his fault yet :P
08:25 TimToady oops
08:25 lizmat ah, I thought that was a given  :-)
08:25 masak haha
08:25 nine .tell skids I'd love to merge a patch hooking perl5 pod into .WHY :) Making usage of Perl 5 modules in Perl 6 be more convenient than in Perl 5 would be just awesome
08:25 yoleaux nine: I'll pass your message to skids.
08:25 * masak .oO( respect your elders... )
08:25 TimToady lizmat++ firm grasp of history
08:26 pmichaud joined #perl6
08:27 andreoss` joined #perl6
08:28 dalek rakudo/nom: 4fafbe8 | FROGGS++ | / (2 files):
08:28 dalek rakudo/nom: move changes to SLICE.pm@04cc1d52c5 to makeSLICE.pl6
08:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4fafbe8144
08:28 sqirrel joined #perl6
08:32 dakkar joined #perl6
08:36 wryk joined #perl6
08:37 jnthn I see a regression in integration/advent2010-day06.t
08:38 RabidGravy joined #perl6
08:38 jnthn Otherwise looks good.
08:38 wryk joined #perl6
08:38 TimToady forgot to check in that one
08:38 jnthn ah :)
08:38 dalek roast: e0193f5 | TimToady++ | integration/advent2010-day06.t:
08:38 dalek roast: more for loop damage
08:38 dalek roast: review: https://github.com/perl6/roast/commit/e0193f58df
08:39 lizmat afk for a few hours&
08:42 alini joined #perl6
08:43 itz raydiak: thanks I'll have another look later
08:44 espadrine joined #perl6
08:47 dalek Inline-Python: 9838e88 | (Stefan Seifert)++ | lib/Inline/Python.pm6:
08:47 dalek Inline-Python: Only create wrappers for methods with a legal Python name
08:47 dalek Inline-Python:
08:47 dalek Inline-Python: ^methods nowadays lists
08:47 dalek Inline-Python: -> (Mu:D \fles: *%_) { #`(Method+{<anon>}|109046056) ... }
08:47 dalek Inline-Python: which obviously cannot be used as a method name in Python.
08:47 dalek Inline-Python:
08:47 dalek Inline-Python: Since a Perl 6 subclass of a Python class may want to use names that
08:47 dalek Inline-Python: would not be legal in Python (e.g. hypenated-names), it's good to filter
08:47 dalek Inline-Python: those anyway.
08:47 dalek Inline-Python: review: https://github.com/niner/Inl​ine-Python/commit/9838e88ecb
08:48 nine Both Inline::Perl5 and Inline::Python test well with the TimToady's for change. So the largest part of the ecosystem is usable as is ;)
08:49 cschwenz left #perl6
08:49 TimToady darn it, I have to stay up then... :)
08:50 TimToady (actually, still backlogging last night; was too busy hacking (and writing a Collision talk) to backlog during the day
08:50 TimToady )
08:50 nwc10 is Gloria away?
08:50 TimToady no, she's sleeping right here, but she's not a night owl like me
08:50 TimToady and I type quietly
08:51 nwc10 aha right. I thought you usually got "encouraged" to go to sleep when she was around, and not so much when she wasn't
08:51 nwc10 but I guessed wrong this time.
08:51 RabidGravy I'm not sure that the Channel.list is entirely "thread safe"
08:51 RabidGravy https://gist.github.com/jonat​hanstowe/fe573758f3490a529f68
08:53 RabidGravy gives rise to either working as expected, "Unhandled exception: Cannot call method 'count' on a null object", "Unhandled exception: Cannot assign to a readonly variable or a value", "Type check failed in binding exception; expected 'Any' but got 'Mu'"
08:55 RabidGravy or even occasionally "Unhandled exception: This representation (Null) does not support elems"
08:55 Ven joined #perl6
08:57 dalek perl6-examples: 8b6054a | TimToady++ | categories/shootout/n-body-v2.p6:
08:57 dalek perl6-examples: s/\.for/\.flatmap/
08:57 dalek perl6-examples:
08:57 dalek perl6-examples: since .for is not longer the flattening variant of .map
08:57 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/8b6054a306
08:57 Ven jnthn: right. this was one of touchy things when I wrote the learnx
08:58 * Ven actually had put up the GLR-style flattening explanation for a while, but extracted it into an issue eventually
08:59 Ven will it be possible to optimize `for flat` ? (not to create a new data structure, that is)
08:59 RabidGravy I'd probably be happier if it did any one of those consistently
08:59 nbdsp joined #perl6
08:59 TimToady .flatmap is already optimized
08:59 Ven are we still going to have a .for then?
08:59 TimToady so it could optimize to that
08:59 pecastro joined #perl6
09:00 Ven TimToady: very glad to hear that :-)
09:01 Ven .oO( will it be flatmap {} or foreach {} :P )
09:01 TimToady at the moment .for is the implementation of the 'for' keyword, so should probably be renamed to .FOR or so
09:01 TimToady one the abortive tries was to just use .map instead, but then it became impossible to distinguish 'for @foo' from 'for $foo'
09:01 Ven TimToady: it'd mean `for {}` is `.map` and `foreach{}` is `.flatmap`?
09:02 TimToady for {} is .for still, but probably should be hidden a bit better
09:03 TimToady since it has to do shenanigans to determine if a single argument is containerized
09:03 TimToady (to handle the 'for @foo' vs 'for $foo' issue
09:03 Ven is there any difference between .for and .map then? I feel like I'm missing something :-)
09:03 Ven ah, so $for will unitemize the first level, always?
09:03 TimToady the problem with using bare .map was that by the time you get to the map method, the container info is discarded
09:03 TimToady no
09:03 TimToady for $foo is still itemized
09:04 TimToady unlike $foo.map
09:04 TimToady and for $foo, $bar is two items
09:04 rjbs joined #perl6
09:04 TimToady so it's still iterating the top level, taking into account containers, basically
09:05 TimToady you just can't use .flat internally for that, since .flat is recursive on sublists
09:06 SHODAN joined #perl6
09:06 TimToady so the compiler still wraps the .for method in infix:<,>, just so that Parcel.for can look at it to determine if the one and only argument should be treated as a list or not
09:06 jnthn m: try { say $_ } for <1 2>
09:06 camelia rakudo-moar 4fafbe: OUTPUT«(Any)␤(Any)␤»
09:06 jnthn m: (do { say $_ }) for <1 2>
09:06 camelia rakudo-moar 4fafbe: OUTPUT«(Any)␤(Any)␤»
09:06 jnthn Got those fixed and also blockless gather :)
09:06 jnthn Now for le spectest...
09:06 TimToady cool, thanks
09:07 jnthn TimToady: They weren't recent regressions, to be clear. Busted for a bit.
09:07 jnthn TimToady: I did have to change the test case from RT #111962 though
09:07 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=111962
09:07 jnthn It does this:
09:07 jnthn for [-1,-1],[+0,-1],[+1,-1],
09:07 jnthn [-1,+0],(     ),[+1,+0],
09:07 jnthn [-1,+1],[+0,+1],[+1,+1];
09:08 jnthn Which is very pretty but that empty (...) upsets things now
09:08 DrForr Someone's writing GoL in perl6 :)
09:08 jnthn So I just replaced it with whitespace
09:09 TimToady that works, or so would a flat, though maybe with whitespace they could be () now instead of []
09:10 * TimToady -> for flat 8 hours...
09:10 jnthn :)
09:10 jnthn o/
09:12 |Tux| joined #perl6
09:14 nbdsp Greetings! Could someone advise please how to use '&' in regexen for matching two groups regardless of their sequential order? E.g. how to match "bbaa" with "aa" and "bb"? For example:
09:14 nbdsp m: say "bbaa" ~~ m/aa & bb/;
09:14 camelia rakudo-moar 4fafbe: OUTPUT«False␤»
09:16 DrForr I only see & in the context of character classes.
09:17 nbdsp Ahh... Is there another way to do something like this?
09:17 nbdsp Only grammar?
09:17 jnthn & is valid there, but it matches the first thing, and then wants all of the other things in the conjunction to match the same characters
09:17 jnthn That is, it doesn't scan the string again.
09:18 jnthn So this matches the 'aa' and then tries to see if the same chars match 'bb' and of course they don't.
09:19 jnthn m: say "bbaa" ~~ /aa/ & /bb/ # one way
09:19 camelia rakudo-moar 4fafbe: OUTPUT«True␤»
09:19 FROGGS m: say 'bbaa' ~~ / [ 'aa' | 'bb' ]+ / # might that be enough?
09:19 camelia rakudo-moar 4fafbe: OUTPUT«「bbaa」␤»
09:19 DrForr Matches 'bbbb' as well.
09:19 FROGGS true
09:20 * DrForr reads up on documentation specs in order to package up Readline for public consumption.
09:20 nbdsp m: say "bbccaa" ~~ /aa/ & /bb/
09:20 camelia rakudo-moar 4fafbe: OUTPUT«True␤»
09:21 cschwenz joined #perl6
09:21 cschwenz left #perl6
09:21 jnthn nbdsp: If that isn't what you want either then & of either kind is probably the wrong tool for the job :)
09:22 FROGGS m: my %seen; say 'bbaabb' ~~ / [ ('aa' | 'bb') <!{ %seen{$1}++ > 1 }> ]+ / # though, side effects are ugly
09:22 camelia rakudo-moar 4fafbe: OUTPUT«「bbaa」␤ 0 => 「bb」␤ 0 => 「aa」␤»
09:22 jnthn Yeah
09:22 nbdsp I misunderstood the usage of &
09:24 jnthn my token any-order($a, $b) { $a$b || $b$a }; say 'aabb' ~~ /<any-order('aa', 'bb')>/ # maybe :)
09:24 jnthn m: my token any-order($a, $b) { $a$b || $b$a }; say 'aabb' ~~ /<any-order('aa', 'bb')>/ # maybe :)
09:24 camelia rakudo-moar 4fafbe: OUTPUT«「aabb」␤ any-order => 「aabb」␤»
09:25 Ven I wonder what will happen with the reduce meta-op due to that "new glr model"
09:27 nbdsp Jnthn: thanks!
09:27 nbdsp But with more groups it grows exponentially
09:29 jnthn Yeah, that's trickier :)
09:29 jnthn I don't immediately have a nice solution.
09:29 dalek rakudo/nom: 5774ac0 | jnthn++ | src/Perl6/ (3 files):
09:29 dalek rakudo/nom: Start giving statements an ID.
09:29 dalek rakudo/nom:
09:29 dalek rakudo/nom: Also tag blocks pushed while compiling that statement with the ID.
09:29 dalek rakudo/nom: Will be used for fixing various thunking scoping bugs.
09:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5774ac03e6
09:29 dalek rakudo/nom: 0ffe68f | jnthn++ | src/Perl6/Actions.nqp:
09:29 dalek rakudo/nom: Toss unused parameter.
09:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0ffe68f843
09:29 dalek rakudo/nom: c5d7aa0 | jnthn++ | src/Perl6/Actions.nqp:
09:29 dalek rakudo/nom: Fix scoping bugs with s.m. for and given.
09:29 dalek rakudo/nom:
09:29 dalek rakudo/nom: "try { say $_ } for ..." and "try { say $_ } given ..." did not move
09:29 dalek rakudo/nom: the blocks into the thunk generated for for/given, so we looked up the
09:29 dalek rakudo/nom: wrong $_.
09:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c5d7aa085e
09:29 dalek rakudo/nom: 4a8a61f | jnthn++ | src/Perl6/Actions.nqp:
09:29 dalek rakudo/nom: Make blorsts migrate blocks into thunks.
09:29 dalek rakudo/nom:
09:29 dalek rakudo/nom: This fixes various bugs with e.g. block-less gather working wrongly
09:29 dalek rakudo/nom: when adding a block worked.
09:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4a8a61f042
09:30 dalek roast: 47400f0 | jnthn++ | S04-statements/gather.t:
09:30 dalek roast: Test for RT #111962.
09:30 dalek roast: review: https://github.com/perl6/roast/commit/47400f0031
09:30 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=111962
09:31 nbdsp I thought it's a somewhat standard task. Will think how to accomplish in other way.
09:31 itz_ joined #perl6
09:32 Tux__ joined #perl6
09:32 DrForr token x{ 'a' & 'baab' } # Hrm.
09:35 andreoss` joined #perl6
09:36 Ven .tell eli-se echo "require-sandbox: True" >> ~/.cabal/config
09:36 yoleaux Ven: I'll pass your message to eli-se.
09:36 DrForr TINC
09:41 |Tux| moar speed still not super, but slowly returning to what it was 6 days ago (as in: better than yesterday)
09:43 FROGGS m: { say 42 } if True
09:43 camelia rakudo-moar 4fafbe: ( no output )
09:44 FROGGS jnthn: will that one be fixed too? I lost a lot of hairs twice when attempting to fix it
09:44 jnthn Um...is that wrong?
09:44 FROGGS I.. I guess so
09:45 jnthn m: { say 42 } for ^5
09:45 camelia rakudo-moar 4fafbe: OUTPUT«42␤42␤42␤42␤42␤»
09:45 jnthn Hmm
09:45 jnthn Well, it's inconsistent at least.
09:45 FROGGS it should .sink it, right?
09:45 jnthn Nothing to do with .sink
09:45 FROGGS okay
09:45 jnthn the parse is <EXPR> followed by statement modifiers
09:45 jnthn and an EXPR { say 42 } normally just becomes a closure
09:46 jnthn It seems for special-cases it so it says "oh, EXPR is a block, I'll magically call it"
09:46 jnthn Grr
09:47 FROGGS O.o
09:47 * FROGGS .oO( I'm sorry )
09:47 jnthn Turns out the blorst fix I did was fine but there's something wrong with for/given modifier one :/
09:48 jnthn It looked like it worked 'cus I had a one line script and it worked for that :S
09:49 FROGGS yeah, I know that feeling
09:51 fhelmberger joined #perl6
10:05 masak same thing happened for me with the .indent thing yesterday
10:05 masak I had one test file passing, but then I got failures in the spectests
10:05 masak yes, it's "Grr" -- but it's also "thank you, spectests! keep up le good work!"
10:10 Akagi201 joined #perl6
10:10 rarara joined #perl6
10:12 jnthn RT #100746
10:12 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=100746
10:16 jnthn RT #122306
10:16 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122306
10:28 timotimo labster: i mentioned that commit in the previous weekly already :)
10:29 dalek rakudo/nom: 709b77d | jnthn++ | src/Perl6/Actions.nqp:
10:29 dalek rakudo/nom: Fix thinko in block migration predicate check.
10:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/709b77dd76
10:29 dalek rakudo/nom: cd53104 | jnthn++ | src/Perl6/Grammar.nqp:
10:29 dalek rakudo/nom: Start statement ID at 1 to avoid bogus matches.
10:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cd531046bd
10:30 dalek roast: 8c29100 | jnthn++ | S04-statement-modifiers/ (2 files):
10:30 dalek roast: Tests for RT #111704.
10:30 dalek roast: review: https://github.com/perl6/roast/commit/8c29100291
10:30 dalek roast: 59e1e9d | jnthn++ | S04-statement-modifiers/ (2 files):
10:30 dalek roast: Unfudge tests for RT #100746.
10:30 dalek roast: review: https://github.com/perl6/roast/commit/59e1e9def1
10:30 dalek roast: 93e1675 | jnthn++ | integration/advent2011-day23.t:
10:30 dalek roast: Unfudge test for RT #122306.
10:30 dalek roast: review: https://github.com/perl6/roast/commit/93e16756b6
10:33 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=111704
10:33 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=100746
10:33 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122306
10:34 nine_ joined #perl6
10:34 yogan joined #perl6
10:35 telex joined #perl6
10:36 telex joined #perl6
10:37 dalek roast: f2b5f0d | jnthn++ | S04-statements/gather.t:
10:37 dalek roast: Unfudge now-passing test for RT #117635.
10:37 dalek roast: review: https://github.com/perl6/roast/commit/f2b5f0df9a
10:37 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=117635
10:39 dalek roast: b1648de | jnthn++ | S04-statements/try.t:
10:39 dalek roast: Unfudge another RT #111704 test.
10:39 dalek roast: review: https://github.com/perl6/roast/commit/b1648de4d2
10:39 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=111704
10:39 jnthn There's another bunch of RTs down
10:41 masak jnthn++
10:41 FROGGS jnthn++
10:42 masak meh, neither of those were my RT tickets :P
10:43 rurban joined #perl6
10:43 jnthn masak: None of the 7 I fixed today so far were yours? Wow :P
10:44 masak oh, I meant the last two.
10:44 masak 7 is good going.
10:44 masak here, have some more karma: jnthn++
10:44 FROGGS hour hero :o)
10:44 FROGGS our*
10:44 masak this regardless if some of those were mine, OR if you managed to find 7 that were not mine :P
10:48 timotimo .tell the video game i'm sinking so much time into these days is Disgaea 4. the bad thing is, it'll accept any amount of time you offer :)
10:48 yoleaux timotimo: I'll pass your message to the.
10:50 jnthn lunch, bbs :)
10:51 nbdsp joined #perl6
10:58 fhelmberger joined #perl6
10:59 alini joined #perl6
11:03 _mg_ joined #perl6
11:21 Ven joined #perl6
11:22 lizmat I've had some thoughts about going further with module loading: https://gist.github.com/li​zmat/c7f53fa206da900c2b42
11:22 lizmat comments greatly appreciated !
11:23 vendethiel joined #perl6
11:23 Ven timotimo: .tell the?
11:24 timotimo hah
11:24 timotimo .tell skids the video game i'm sinking so much time into these days is Disgaea 4. the bad thing is, it'll accept any amount of time you offer :)
11:24 yoleaux timotimo: I'll pass your message to skids.
11:24 timotimo thank you, ven
11:26 nine_ lizmat: great to see you working on module loading :)
11:26 fhelmberger joined #perl6
11:26 lizmat yeah, the session with you at the QAH was inspiring  :-)
11:28 nine_ lizmat: I wonder if instead of going from one extreme (fully initialized CompUnitRepos) to the other (Perl 5 style strings), there could be an in between solution.
11:28 lizmat well, you could consider the strings as place holder objects, really
11:28 nine_ lizmat: how about creating CompUnitRepo objects but defering their initialization until they are really used. I think creating objects in Rakudo is quite fast as long as they do not run some costly initialization code.
11:29 lizmat I've thought about that too
11:29 nine_ lizmat: in essence: have placeholder CompUnitRepos that lazily upgrade themselves
11:29 lizmat but that wouldn't solve the -I. issue
11:29 nine_ That would hide the performance hack from the language user
11:30 nine_ What is the -I. issue?
11:30 lizmat in P5, if you add -I., P5 will always search in the current dir whatever the dir is
11:30 lizmat in P6, -I. will freeze on whatever the current dir is at the time
11:30 lizmat (well, at the moment, afaik)
11:31 * Ven is now building .net on his macbook
11:31 Ven maybe this mac will get mad at me for that :/
11:31 FROGGS timotimo++ # blog
11:31 nine_ lizmat: you mean perl -I. -e 'use Foo; BEGIN { chdir "/tmp" }; use Bar;' will find Bar.pm in /tmp? Didn't know that :)
11:31 Ven timotimo++ # blug
11:31 timotimo thank you :)
11:31 lizmat that's how it works in P5, adaik
11:31 lizmat *afaik
11:31 timotimo you shouldn't praise me if my blog comes out so late :P
11:31 nine_ lizmat: is that a bug or a feature?
11:32 nine_ lizmat: as a user, this seems highly surprising to me :)
11:32 lizmat people consider this a feature, afaik
11:32 FROGGS timotimo: well, it is still good :o)
11:32 Ven timotimo: why not?
11:32 nine_ Is . a special case or is this rather true for all relative paths?
11:33 lizmat it's for all relative paths
11:33 lizmat and I just checked, and it does work that way  :)
11:33 nine_ me, too :)
11:34 lizmat $ perl6 -I. -e 'use Foo; BEGIN { chdir "/tmp" }; use Bar'
11:34 lizmat Foo
11:34 lizmat ===SORRY!===
11:34 lizmat Could not find Bar
11:35 lizmat .oO( a nice example of code that doesn't change between P5 and P6 )
11:35 nine_ How do strings in @?INC solve this?
11:35 lizmat because before being used as a key, they will be absolutified
11:36 lizmat and that key will be used to search for the CompUnitRepo, rather than what's in @?INC
11:36 nine_ Ah, of course
11:36 Ven m: my @a; @a[15..*] = 1, 3...*; @a[0..10] = 0, 2 ... *; say @a;
11:36 camelia rakudo-moar cd5310: OUTPUT«0 2 4 6 8 10 12 14 16 18 20␤»
11:36 lizmat it's up to the CompUnitRepo implementation to decide what absolutify does
11:37 Ven m: my @a; @a[15..*] = 1, 3...* > 50; @a[0..10] = 0, 2 ... *; say @a;
11:37 camelia rakudo-moar cd5310: OUTPUT«0 2 4 6 8 10 12 14 16 18 20 (Any) (Any) (Any) (Any) 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51␤»
11:37 lizmat for Local::File/Installation, it would be .IO.abspath
11:37 nine_ lizmat: but couldn't a CompUnitRepo that's initialized with a relative path do abspath for every access as well?
11:38 lizmat for Local::File that could be, but for Local::Installation they would be 2 different databases
11:38 lizmat so 2 different objects
11:39 lizmat CompUnitRepo::Local::Installation objects
11:39 nine_ I guess include paths would usually point to Local::File?
11:39 lizmat yes, that is the default for -I
11:39 lizmat you could do: -Iinst:.
11:40 lizmat which would indicate a CURL::Installation type of object
11:40 lizmat -I. is short for -Ifile:.
11:40 nine_ As I didn't even know about this feature, it's hard for me to come up with use cases that I can use for validating my suggestions
11:41 lizmat think: parameter to script to run different versions of modules ?
11:41 * jnthn back
11:43 nine_ That does make sense. But the utility of having relative paths resolved relative to the cwd of the process at runtime escapes me.
11:43 timotimo i suggest -Irelfile:.
11:44 timotimo at the very least require opt-in to this weird behavior
11:44 nine_ To me that sounds like exactly the kind of action at a distance problem that @?INC is there to avoid.
11:45 lizmat well, I can live without that feature, for sure
11:45 xinming joined #perl6
11:45 lizmat it's just something I've heard from early P5->P6 adopters and packagers, as being an issue
11:45 nine_ I could imagine a naive Module::Pluggable implementation using chdir when searching for pluggings and thereby breaking -Ilib which we use for every single application
11:46 nine_ I'm really curious who uses this "feature" and for what :)
11:46 lizmat I believe [Tux]  might be able to explain better
11:47 |Tux| what?
11:48 lizmat the use of -I. in Perl 5
11:48 lizmat that it is relative to the current cwd()
11:48 lizmat and thus follows changes
11:48 jnthn lizmat: About "the next CompUnitRepo object (deduced from @?INC) will be tried", did TimToady have some concerns about the sequential searching of @?INC, or am I mis-remembering?
11:48 |Tux| iirc (but do not tie me to it) there have been circumstances related to security that excluded . from @INC
11:49 lizmat well, yeah  :-)  don't use -I. if you want security
11:49 lizmat jnthn: good point, I will try to address that
11:49 FROGGS jnthn: IIRC TimToady said that @[*?]INC is not the right pig to hang that off
11:49 nine_ |Tux|: what we're discussing is the highly surprising "feature" that perl -I. -e 'use Foo; BEGIN { chdir "/tmp" }; use Bar;' will find Bar.pm in /tmp
11:50 jnthn FROGGS: Hm, ok
11:50 FROGGS though, I don't know about details
11:50 * |Tux| would ask leont first :)
11:51 nine_ TimToady++ will probably be in flat land for 5:20 hours more...
11:52 nine_ |Tux|: in progress
11:55 jnthn FROGGS: Just found the bit in S04 about { say $^x } if foo(); :)
11:58 colomon joined #perl6
11:58 wryk joined #perl6
11:58 nine_ https://metacpan.org/pod/rlib
12:00 FROGGS jnthn: and it should run it?
12:01 [ptc] m: for <a b c d> -> $a, $b { say $a; say $b }
12:01 camelia rakudo-moar cd5310: OUTPUT«a␤b␤c␤d␤»
12:01 [ptc] m: for <a b c d> -> $a, $b { say $a }
12:01 camelia rakudo-moar cd5310: OUTPUT«a␤c␤»
12:01 [ptc] m: for <a b c d> Z <w x y z> -> $a, $b { say $a }
12:01 camelia rakudo-moar cd5310: OUTPUT«a w␤c y␤»
12:03 jnthn FROGGS: Yes.
12:03 jnthn FROGGS: And we've an RT for it
12:03 FROGGS cool :o)
12:03 jnthn Working on it now.
12:03 dalek perl6-examples: 7b3c280 | paultcochrane++ | categories/wsg/advanced-2008/event002-eric256.pl:
12:03 dalek perl6-examples: Input file location now independent of run location
12:03 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/7b3c2805ad
12:03 dalek perl6-examples: f3d5a86 | paultcochrane++ | categories/wsg/advanced-2008/event005-eric256.pl:
12:03 dalek perl6-examples: No longer looping indefinitely
12:03 lizmat added a "depth-first vs breadth-first" paragrapth to https://gist.github.com/li​zmat/c7f53fa206da900c2b42
12:04 dalek joined #perl6
12:04 lizmat nine_ FROGGS ^^
12:04 * FROGGS looks
12:06 FROGGS so, a 'require lib $path; require Bar' won't be supported eventually? (dunno how useful it is anyway)
12:07 lizmat require lib $path ?
12:07 chenryn joined #perl6
12:07 FROGGS the clean way of saying: unshift @*INC ...
12:07 lizmat well, hmmm...
12:07 FROGGS just a thought...
12:07 nine_ lizmat: :auth and :ver should be able to fix any version confusion. I just wonder, how those work with -Ilib for example. The file name is only the short name and I guess my local development checkout is no full CompUnitRepo database?
12:08 lizmat nine_: your local development is a CURL::File object: it ignores all auth/version settings and just checks the file system
12:08 lizmat basically, like P5
12:08 FROGGS nine_: if you use a module that exists in your dev tree (aka CURLF), the auth and ver is basically ignored
12:09 laouji joined #perl6
12:09 lizmat FROGGS: if "lib" becomes a pragma, 'require lib' won't work anymore
12:10 FROGGS hmmm, what is "the next CompUnitRepo" mentioned at line 31?
12:10 lizmat the next in @?INC
12:10 FROGGS obtained via the next string in @?INC?
12:11 FROGGS k
12:11 FROGGS ahh, it even says so >.<
12:11 lizmat it's not that different from what we already have
12:11 FROGGS aye
12:11 lizmat except for using strings in @?INC and creating CUR objects on demand
12:12 lizmat and being able to handle relative path specs dynamically
12:12 lizmat which may or may not be a good thing  :-)
12:12 FROGGS :o)
12:14 lizmat wrt to require
12:14 FROGGS lizmat: about erroring out... if I 'use Foo' and have a Foo:v1 and a Foo:v2 in the first CUR, will that error out?
12:14 lizmat yes
12:14 lizmat or warn and pick the first
12:14 FROGGS :/
12:14 lizmat or maybe not warn and just pick the first
12:14 FROGGS +1 :D
12:15 FROGGS that's what I'd like to see
12:15 lizmat I guess you could argue it shouldn't make a difference whether matches are within a CURL or not
12:15 lizmat s/matches/doubles/
12:15 timotimo pick the first? so ... it'd prefer v1 over v2?
12:15 FROGGS depends if we stop after the first CUR found someting matching or not
12:16 FROGGS timotimo: v2 over v1 hopefully
12:16 lizmat it would take the first it finds
12:16 lizmat however a CUR that implements, who cares
12:16 FROGGS the first in CURLF, but the best in CURLI
12:16 FROGGS aye
12:16 lizmat the fact that there is more than one, indicates you don't care
12:16 cognominal joined #perl6
12:16 FROGGS that's not true
12:17 lizmat well, that you have not been precise enough
12:17 FROGGS if I say I want Foo:ver(v1.2.+), and I have two of those...
12:17 FROGGS yes, but that might be my intend
12:17 lizmat I mean, that's one of the *big* mindset changes we need to get to developers
12:17 lizmat for production code, you must be as precise as possible in your "use" statements
12:17 fhelmberger joined #perl6
12:17 nine_ FROGGS: if you have two of those, both should be ok according to your spec
12:18 FROGGS according to semver Foo:ver(v1.2.+) is totally fine, and probably what I will choose in future
12:18 lizmat this will allow for trouble free upgrades of your system, as that code will continue to use whatever you indicated it should
12:18 lizmat even after an upgrade
12:18 FROGGS nine_: yes, and I want the one with the highest version, because this contains more bug fixes
12:19 lizmat or more bugs, who is to say ?
12:19 lizmat or may be incompatible?
12:19 lizmat that's why specifying ver(v1.2.+) is so dangerours
12:20 FROGGS lizmat: that's up to me... I can use my own stuff that follow semver, or trust ppl that do so
12:20 lizmat if Foo:ver(v1.2) does what it is supposed to, why want any other version?
12:20 FROGGS because of not yet known bugs
12:22 lizmat if you find a problem with Foo:ver(v1.2) and you fixed that in Foo(v1.4), you should have a supersedes :ver(v1.2) in the META6 of Foo:ver(v1.4)
12:22 * [Coke] wakes up to find jnthn++ fixed a really old bug.
12:22 FROGGS that not what patch release are for
12:23 FROGGS because 1.4 introduce (buggy) features, it might not my choice #1
12:23 lizmat well, then it shouldn't have a "supersedes" in it
12:23 FROGGS lizmat: skim semver.org, then you know why I am talking about the third digit here only
12:24 nine_ I wonder if those version pinning capabilities will lead us down the Java path where developers don't care about backwards compatibility anymore because users pin exact versions anyway and distributions give up packaging this stuff
12:24 lizmat the former I would say yes to, the latter I would hope not
12:24 lizmat packaging Perl 6 modules is going to be a pain anyway
12:25 FROGGS we need to give the "users" some freedom to choose what really works
12:25 nine_ I would very much like it to be the exact opposite :)
12:25 FROGGS s/choose/find out/
12:25 lizmat which may only get solved by having distribution specific CompUnitRepo implementations
12:25 lizmat nine_: please elaborate?
12:26 [Coke] I feel like the new flat stuff matches what I was asking for when I didn't know any better a few months ago. yay. :)
12:27 masak just glancing at the backlog here. not reading carefully. it's kind of a difference between gradual typing ("type not at all or as much as you want") and the discussion about use statements ("be as precise as possible").
12:27 nine_ lizmat: at the PQAH I had a very nice talk with Andreas about packaging perl modules and how we see the whole perlbrew/local::lib movement as somewhat worrying. There are big advantages to distributions worrying about security updates for me and they only do that for stuff that's packaged
12:27 masak just thought that difference was... interesting.
12:27 masak we don't seem to have a notion of "gradual dependency versioning".
12:28 lizmat because it has more dimensions ?
12:28 masak than types? :)
12:28 lizmat yeah  :-)
12:28 masak how do you figure that? honest question.
12:28 masak s/honest/earnest/
12:29 lizmat because in types, you have one direction: type -> subtype
12:29 jnthn FROGGS: I see why you had fun ;)
12:29 masak ...which *branches*, types -> subtypes
12:29 lizmat in semantic versioning, you have at least three (major,minor,patch)
12:29 jnthn FROGGS: (on the if/unless patch)
12:29 masak ...which is one axis.
12:29 FROGGS *g*
12:29 jnthn FROGGS: Took me 2 tries to nail the thing, dammit :)
12:29 FROGGS jnthn: I'm eager to see your patch :o)
12:29 masak teaching again &
12:30 jnthn FROGGS: It's spectestin' now.
12:31 lizmat masak: in an ideal world, higher would always be better
12:31 lizmat masak: unfortunately, that is not the case
12:32 lizmat but if the consensus is that if we have multiple candidates, it should always select the higher version one
12:32 lizmat I guess I can live with that, as that's the de-factor P5 behaviour anyway (from a sysadmin point of view)
12:33 lizmat perhaps we should also allow :ver(*..1.2) to indicate anything up to 1.2 ?
12:34 dnmfarrell joined #perl6
12:34 lizmat :ver(*..1.2,1.4..*) # don't do 1.3
12:35 lizmat 1.3.x for that matter :-)
12:36 jnthn FROGGS: bah, I bust something. Time for attempt 3.
12:36 lizmat FROGGS: is it really only the patchlevel you want the highest version of, of also Minor?
12:38 FROGGS lizmat: every range object will do, besides specific version literals etc
12:39 FROGGS lizmat: for the common case I probably like to not specify the patch level, but only from projects I know they do it "the semver way"
12:39 FROGGS lizmat: but whatever range one supplies is fine
12:40 FROGGS like one can say that four letter words are awesome enough to do: use Foo:name(*.chars == 4)
12:40 FROGGS it is not up to us to restrict that
12:41 FROGGS s/name/auth/
12:42 Foxcool_ joined #perl6
12:42 Foxcool joined #perl6
12:43 lizmat well, major version numbers indicate a different API
12:43 FROGGS they are supposed to, yes
12:43 lizmat so that feels like asking for trouble if just saying "return the highest always"
12:43 FROGGS but if I say: use Foo, you do you want to limit that to a certain major release?
12:44 FROGGS you are implying that 'use Foo' itself is a compile time error
12:44 lizmat if you say "use Foo" *without* any version info, you will get the first one it finds, in my book
12:44 timotimo do we really expect negative version numbers?
12:44 timotimo if we don't, we should be fine without ranges that have * as a starting point
12:44 FROGGS timotimo: huh?
12:45 lizmat timotimo: I guess whatever in that context means 0
12:45 timotimo :)
12:45 timotimo m: my $range = *..10;
12:45 camelia rakudo-moar cd5310: ( no output )
12:45 timotimo ah, that works
12:45 timotimo never mind :)
12:45 lizmat m: (*..1.2,1.4..*).perl.say
12:45 camelia rakudo-moar cd5310: OUTPUT«(-Inf..1.2, 1.4..Inf)␤»
12:46 lizmat m: ((*..1.2) | (1.4..*)).perl.say
12:46 camelia rakudo-moar cd5310: OUTPUT«any(-Inf..1.2, 1.4..Inf)␤»
12:46 timotimo yes, i was about to say
12:46 timotimo anyway, gotta AFK now
12:49 jnthn m: -> $i { $a += $i } for 1..3;
12:49 camelia rakudo-moar cd5310: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RQQoGkZwqh␤Variable '$a' is not declared␤at /tmp/RQQoGkZwqh:1␤------> 3-> $i { $a7⏏5 += $i } for 1..3;␤    expecting any of:␤        postfix␤»
12:49 jnthn m: my $a; -> $i { $a += $i } for 1..3; say $a;
12:49 camelia rakudo-moar cd5310: OUTPUT«6␤»
12:49 jnthn I wonder if this one is actually allowed...
12:49 jnthn std: my $a; -> $i { $a += $i } for 1..3; say $a;
12:49 camelia std 28329a7: OUTPUT«ok 00:00 141m␤»
12:49 nine_ Returning the first module found that satisfies the given specification is certainly a very simple and proven concept.
12:50 jnthn We have tests that "sub a() { } given 1" does not call the sub (or that is the effect of the test, anyways)
12:52 lizmat nine_: indeed, and I like KISS  :-)
12:52 lizmat afk for a bit
12:52 jnthn std: my $a; sub ($i) { $a += $i } for 1..3; say $a;
12:52 camelia std 28329a7: OUTPUT«ok 00:00 142m␤»
12:52 jnthn m: my $a; sub ($i) { $a += $i } for 1..3; say $a;
12:52 camelia rakudo-moar cd5310: OUTPUT«6␤»
12:52 jnthn I don't think we can have that way in 'for' and the other way in 'given'
12:53 jnthn S04 only mentions bare blocks with placeholders as being invoke-y with the statement modifiers.
12:54 jnthn I think for now I'll go with making it so only bare blocks work in this way, and do away with the test wanting a pointy block to work there
12:54 jnthn And see if anybody gets upset :)
12:58 RabidGravy joined #perl6
13:00 RabidGravy boing
13:01 nwc10 joined #perl6
13:03 lucasb joined #perl6
13:03 RabidGravy I'm wondering if Channel needs a "vow-like" thingy so exactly one thread can obtain an exclusive read permission on it
13:03 masak lizmat: (backlogging) when I last peeked into this debate (which is a while ago, granted), I had it as "higher versions are preferred if nothing else is stated and as long as it's *the same auth* we're comparing"
13:04 masak that "same auth" part is important, since different auths are likely to have sometimes wildly different versioning schemes.
13:04 nbdsp joined #perl6
13:04 masak what I just said is hopefully completely obvious to the people who are doing version handling nowadays. sorry about that ;)
13:05 lucasb o/
13:05 jnthn RabidGravy: I don't think so; it just gets in the way of scaling out, and once we implemnet async waiting on the value where the task can migrate over threads on each wait, it'll hurt some there too...
13:05 masak jnthn++ # thinking ahead
13:06 jnthn wtf, I think my for loop change managed to wedge the bag tests... :S
13:06 RabidGravy but then you can't securely "fan-out" a channel to some other stream like a Supply for instance
13:06 lucasb I think IO::Path is forbidden in restricted setting, but it's still possible to get one using dir().
13:07 lolisa joined #perl6
13:09 jnthn RabidGravy: Our Channels is really a concurrent queue (and perhaps should be named such). It's mostly useful for producer/consumer scenarios, where consumers compete over items.
13:15 RabidGravy yep, got that, but not being able to gain an exclusive read would limit their use to your own code, you can't safely use one that is provided by some other API
13:16 RabidGravy or maybe I'm over-thinking this
13:20 rurban joined #perl6
13:21 skids joined #perl6
13:21 dalek rakudo/nom: b317d0a | jnthn++ | src/Perl6/Actions.nqp:
13:21 dalek rakudo/nom: Fix '{ say $^x } given 42'.
13:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b317d0a6c0
13:21 dalek rakudo/nom: a5f38ae | jnthn++ | src/Perl6/Actions.nqp:
13:21 dalek rakudo/nom: Implement bare block case of if/unless s.m.
13:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a5f38ae1fd
13:21 dalek roast: 8ab25b4 | jnthn++ | S04-statement-modifiers/ (3 files):
13:21 dalek roast: Tests for block s.m. given/if/unless.
13:21 dalek roast:
13:21 dalek roast: Includes a test for RT #78142.
13:21 dalek roast: review: https://github.com/perl6/roast/commit/8ab25b4e4d
13:21 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=78142
13:22 lizmat masak: I could live with the "same auth" part, *if* an auth is specified of course ?
13:23 lizmat in any case, I hope TimToady will be able to sound in
13:23 lizmat once he unflattens  :-)
13:25 lizmat jnthn: I was thinking or Parcelizing %*PRAGMAS<INC> and then binding that to @?INC
13:25 lizmat however, I seem to miss the magic incantation to do the latter  :-(
13:25 lizmat $*W.add_string_constant(nqp::join(' ',$INC))  just doesn't cut it  :-)
13:26 jnthn lizmat: No, that gets you a Str, not a Parcel
13:26 lizmat indeed, it was just for testing  :-)
13:26 jnthn lizmat: Do you need to do this in CORE.setting?
13:26 jnthn lizmat: oh, but actually that probably doesn't matter
13:26 lizmat this is on Actions.nqp
13:26 lizmat so yes
13:26 jnthn lizmat: If you hve an NQP list then just hllize it
13:27 jnthn grep for hllizefor
13:27 lizmat ack
13:27 jnthn I forget how the ars go, it's like nqp::hllizefor('perl6', @nqp-list) or so
13:27 lizmat will find and try  :-)
13:27 FROGGS the ars?
13:28 jnthn Then $*W.add_object(...) it to get it referenceable through a WVal, or use install_lexical_value or so
13:28 jnthn FROGGS: uh, args :)
13:28 FROGGS that's clearly state of the ars
13:28 jnthn .oO( pain in the args )
13:28 jnthn Hm, mebbe I'll do a few regex RTs too :)
13:29 FROGGS jnthn: leave some NYI's for me please :o)
13:31 smash joined #perl6
13:34 hobbs joined #perl6
13:34 RabidGravy btw, did anyone look at this https://gist.github.com/jonat​hanstowe/fe573758f3490a529f68 ? (you may need to run it a few times to get the full effect)
13:34 jnthn FROGGS: There's still 663 RTs :P
13:35 FROGGS >.<
13:35 jnthn RabidGravy: Yes, there's a bunch of things like that I've seen. I'll get to them. I suspect the scoping bustedness I fixed today was one part of it.
13:36 RabidGravy coolio
13:36 baest_ joined #perl6
13:36 brrt joined #perl6
13:39 lucasb 'foo' x * currently creates a WhateverCode. Post 6.0 it will create a lazy infinite string or will stay this way?
13:40 [Coke] p6: say uniname(0x110000);
13:40 camelia rakudo-moar cd5310: OUTPUT«<unassigned>␤»
13:40 Vlavv joined #perl6
13:40 [Coke] j: say uniname(0x110000);
13:41 camelia rakudo-jvm cd5310: OUTPUT«<illegal>␤»
13:42 RabidGravy jnthn, it's a shame because it was the simplest example of multiple writers, multiple readers I could think of
13:43 RabidGravy :)
13:45 [Coke] it looks like moarvm never says <illegal> when you ask it about a codepoint. I'll put in a patch to nqp-j to replace the <illegal> with <unassigned>
13:45 muraiki joined #perl6
13:46 lizmat m: my $a := "foo" x *; say $a(10)   # feels like we could create at least substr on this WhateverCode
13:46 camelia rakudo-moar cd5310: OUTPUT«foofoofoofoofoofoofoofoofoofoo␤»
13:50 brrt m: my @a = q:w(a b c d);
13:50 camelia rakudo-moar a5f38a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lKvJDSMJQd␤Invalid adverb value for :w(a b c d)␤at /tmp/lKvJDSMJQd:1␤------> 3my @a = q:w(a b c d)7⏏5;␤»
13:51 brrt my @a = qw<a b c d>; @a.perl.say;
13:51 lizmat jnthn: if you have a min: https://gist.github.com/li​zmat/d29fffcf2df73a823da5   # seem to be doing something wrong  :-(
13:51 brrt m: my @a = qw<a b c d>; @a.perl.say;
13:51 camelia rakudo-moar a5f38a: OUTPUT«["a", "b", "c", "d"]<>␤»
13:52 lizmat m: my @a = q:w/a b c d/; @a.perl.say  # seems paren related
13:52 camelia rakudo-moar a5f38a: OUTPUT«["a", "b", "c", "d"]<>␤»
13:52 brrt aye
13:52 lizmat because you can't use () there:
13:52 lizmat my @a = q(a b c d); @a.perl.say
13:52 lizmat m: my @a = q(a b c d)
13:52 camelia rakudo-moar a5f38a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aXphGvthVH␤Undeclared routines:␤    a used at line 1␤    b used at line 1␤    c used at line 1␤    d used at line 1␤    q used at line 1␤␤»
13:53 lucasb m: my @a = q:w (a b c); say @a.perl
13:53 camelia rakudo-moar a5f38a: OUTPUT«["a", "b", "c"]<>␤»
13:53 lizmat so the error is LTA, I guess
13:53 jnthn lizmat: Oh, you're generating code to access the thing...rather than installing it
13:53 jnthn Hmm
13:53 lizmat jnthn: not sure what I'm doing there
13:53 [Coke] S09-subscript/multidim-assignment.t has a say on line 7 that shouldn't be there. (added by TimToady++) - mind if I remove it?
13:53 jnthn lizmat: :P
13:54 lizmat I'm not sure we want that precompiled
13:54 brrt m: my @a = 1..4; @a[1] = 5; @a[3] := 6; say @a;
13:54 camelia rakudo-moar a5f38a: OUTPUT«1 5 3 6␤»
13:54 jnthn lizmat: Want what pre-compiled?
13:54 lizmat @?INC's contents
13:55 jnthn lizmat: Any @?FOO is gonna be.
13:55 brrt m: my @a = 1..4; @a[1] = 5; @a[3] := 6; say @a; @a[^2] = qw<a b>;
13:55 camelia rakudo-moar a5f38a: OUTPUT«1 5 3 6␤»
13:55 lizmat hmmm... then maybe @?INC isn't the right name after all
13:56 jnthn lizmat: That or what you want to put into @?INC is some object that will correctly interpret the value in question at runtime.
13:56 brrt m: my @a = 1..4; @a[1] = 5; @a[3] := 6; say @a; @a[^2] = qw<a b>; @a[2,3] = qw<c d>;
13:56 camelia rakudo-moar a5f38a: OUTPUT«1 5 3 6␤Cannot modify an immutable Int␤  in method STORE at src/gen/m-CORE.setting:9505␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3528␤  in block <unit> at /tmp/JvoG8SaVVY:1␤␤»
13:56 lizmat I see %*PRAGMAS<INC> as the source for determining CUR search order
13:57 jnthn lizmat: In a particular lexical scope, yes?
13:57 lizmat yes
13:57 * brrt thinks the code above is going to confuse so many people
13:57 lizmat use lib's effects should be lexical, like any 'use' is in Perl 6
13:57 jnthn lizmat: And it's a pragma so fixed at compile time?
13:57 lizmat eh, yeah,
13:58 jnthn lizmat: so I don't see a danger if it ends up serialized in the precomp?
13:58 jnthn lizmat: What case are you concerned about?
13:58 lizmat well, suppose I precomp it with -I. and run it without it ?
13:58 jnthn brrt: Um, I think only so many people will use binding :)
13:58 dalek nqp: 0fbba5f | coke++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
13:58 dalek nqp: RT #124144 - make jvm give the same output as moar
13:58 dalek nqp: review: https://github.com/perl6/nqp/commit/0fbba5f926
13:58 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124144
13:58 brrt yeah, that is true
13:59 PerlJam brrt: and those that use it should hopefully understand it :)
13:59 jnthn lizmat: Then you get consistent semantics with -Mstrict, -Mwhatever, and so forth.
13:59 jnthn lizmat: That is, it's a compiler flag.
13:59 lizmat I guess that's true
13:59 jnthn lizmat: If we don't want it that way, it needs to be PROCESS-y rather than lexical.
13:59 lizmat ok, so what do I need to do to get it to precomp
13:59 brrt i'm probably wrong in some subtle way, but i kind of dislike the whole container business
13:59 jnthn lizmat: But then lexical 'use lib' makes less sense.
14:00 lizmat indeed
14:00 jnthn lizmat: imho, I'd not emit special code for @?INC
14:00 [ptc] jnthn: commit 709b77d seems to have caused some of the examples to stop working.  Specifically those which use `gather for given first` constructions
14:00 [ptc] any idea as to what I can do to fix the examples?
14:00 brrt i mean, i see why it's useful to have lvalues reified in some sense, but this is probably a huge pessimisation
14:00 lizmat jnthn: not sure what you mean, scratch @?INC altogether ?
14:01 [ptc] jnthn: meaning, I guess that I just have to add some braces somewhere (maybe)
14:01 jnthn lizmat: Hmm, actually maybe you have the righter idea. :)
14:02 jnthn lizmat: These lines here are wrong:
14:02 jnthn +            $past := $*W.install_lexical_symbol(
14:02 jnthn +              $*W.cur_lexpad(),
14:02 jnthn +              '&?INC',
14:02 jnthn +              nqp::hllizefor(@INC, 'perl6')
14:02 jnthn +            );
14:02 jnthn I'd do someting like:
14:02 Ven joined #perl6
14:02 jnthn my $p6inc := nqp::hllizefor(@INC, 'perl6');
14:02 jnthn $*W.add_object($p6inc);
14:02 [Coke] how to gen a new NQP version string for tools/build?
14:02 jnthn $past := QAST::WVal.new( :value($p6inc) );
14:03 jnthn [Coke]: git describe
14:03 vytas joined #perl6
14:03 lizmat jnthn: will try
14:03 Ven DrForr: are you done with your GoL?
14:03 jnthn [ptc]: Grumble, that means we're missing some spectests...
14:03 * Ven assumed it was "game of life" and is probably wrong :P
14:03 jnthn [ptc]: Can you golf me an example that broke?
14:03 [ptc] jnthn: I can point you at specific examples
14:04 [ptc] jnthn: been trying...  will see if i can reduce the size a bit more
14:04 DrForr No, I was guessing that's what masak or whomever was writing, when I saw [-1,-1],[0,-1],[+1,-1].
14:04 jnthn Ven: It was probably game of life but DrForr was only commenting on the code example I was fixing, which I think may have been from TimToady.
14:04 Ven ha, thanks for the details jnthn
14:05 jnthn m: my regex foo($s) { $s };  say 'a' ~~ / <&foo('a')> /
14:05 camelia rakudo-moar a5f38a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ox2S8IaZ0m␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at /tmp/Ox2S8IaZ0m:1␤------> 3egex foo($s) { $s };  say 'a' ~~ / <&foo7⏏5('a')> /␤»
14:05 [ptc] jnthn: https://github.com/perl6/perl6-examples/blob​/master/categories/rosalind/cons-grondilu.pl
14:05 jnthn OK, let's fix that'n...
14:05 [ptc] jnthn: the example contains expected output
14:05 lizmat $ 6l 'use cur <foo>; say @?INC.perl; { use cur <bar>; say @?INC.perl}; say @?INC.perl; use cur <baz>; say @?INC.perl'
14:05 lizmat ("foo",)
14:05 lizmat ("foo", "bar")
14:05 lizmat ("foo",)
14:05 lizmat ("foo", "baz")
14:05 lizmat :-)
14:05 DrForr (that's the Conway neighborhood of a square grid.)
14:05 [ptc] jnthn: I noticed that the new output has the first element of the gather duplicated, if that helps at all
14:06 DrForr I could write one, I suppose.
14:06 vendethiel joined #perl6
14:06 jnthn lizmat: $*W.add_object(...) means "add this object to the set of things that we build at compile time, and can talk about at runtime, and if we pre-comp then serialize them"
14:06 jnthn lizmat: You then can refernce the object in a QAST::WVal to talk about it at runtime.
14:06 lizmat ok, I guess we will find out whether that is a good thing or not in the future  :-)
14:09 jnthn [ptc]: Hm, that's really not a very easy example for me to try and debug from.
14:10 [ptc] jnthn: I know, am in the middle of golfing
14:10 jnthn [ptc]: OK, thanks.
14:10 [ptc] jnthn: wanted to show you an example which is currently failing (just in case that helps)
14:10 masak lizmat: specifying a version without specifying an auth is probably fine, as long as there's a single auth. (which is not guaranteed and might change over time.)
14:11 [ptc] jnthn: didn't have the expectation that you'd work on that example
14:11 masak lizmat: I'm quite fine with specifying version but not auth falling under "OK, suit yourself"
14:11 lizmat masak: ack
14:11 masak lizmat: (and maybe having community guidelines saying "don't do that")
14:11 lizmat perhaps being able to set a default auth lexically, might help
14:12 masak yes, well.
14:12 masak the assumption is that someone didn't care enough to specify an auth :)
14:12 lizmat indeed  :-)
14:19 nine_ Version without auth might actually be ok. Maintainers change while CPAN social guide lines ask people to honor the original author's design and mode of operation.
14:25 hobbs joined #perl6
14:30 brrt` joined #perl6
14:31 dayangkun joined #perl6
14:31 wryk joined #perl6
14:32 chenryn joined #perl6
14:32 molaf joined #perl6
14:32 |Tux| if a match matched, is there some magic variable/method that can tell me the position the match matched inside the string mached against?
14:33 PerlJam |Tux|: $/.from and $/.to
14:33 |Tux| \o/ (/me tries …)
14:34 [Coke] m: ("aaasdf" ~~ /"sd"/).from.say
14:34 camelia rakudo-moar a5f38a: OUTPUT«3␤»
14:34 jercos joined #perl6
14:34 ShimmerFairy joined #perl6
14:35 mrf joined #perl6
14:36 |Tux| note to self: use $/.from *before* doing another regex
14:37 lizmat or do the other regex in a different scope ?
14:37 |Tux| sure
14:37 |Tux| but not here
14:37 PerlJam |Tux|: also, $/ is fairly volatile, but your own match var is not.
14:38 |Tux| if (!$!binary and $f.text ~~ m{ <[ \x00..\x08 \x0A..\x1F ]> }) {
14:38 |Tux| $!error_pos     = $/.from + 1 + ?$f.is_quoted;
14:38 |Tux| $!errno         = $f.is_quoted ??
14:38 |Tux| $f.text ~~ m{<[ \r ]>} ?? 2022 !!
14:38 |Tux| $f.text ~~ m{<[ \n ]>} ?? 2021 !!  2026 !! 2037;
14:38 |Tux| scope is small nuf
14:38 Alina-malina joined #perl6
14:38 lizmat afk for a few hours&
14:39 |Tux| I now have to recall why two of those values currently are 1 based and one is 0-based
14:40 masak nine_: yes -- version without auth might be OK -- and is OK, provided there will never be two auths installed on the system.
14:40 masak nine_: it's kind of a tradeoff.
14:41 PerlJam |Tux|: I find it slightly interesting that you would use numeric addition on a value you've coerced into a Bool and not coerce that same value to a Bool when used in a boolean context.
14:41 masak nine_: I imagine I will probably myself end up always specifying both, or neither.
14:41 |Tux| which one?
14:41 PerlJam $f.is_quoted
14:44 dalek doc: 148b048 | skids++ | lib/Language/control.pod:
14:44 dalek doc: Adjust docs now that '{...} if True' is no longer 'True ?? {...} !! ()'
14:44 dalek doc: review: https://github.com/perl6/doc/commit/148b04838e
14:47 mr_ron joined #perl6
14:51 [ptc] m: %profile = {:A([0, 3]), :C([3, 0])}<>; @profile = %profile<A C>; [~] gather for ^2 -> \c { take <A C>[$_] given first { @profile[$_][c] == 3 }, ^2; }
14:51 camelia rakudo-moar a5f38a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UA2NG1uRAq␤Variable '%profile' is not declared␤at /tmp/UA2NG1uRAq:1␤------> 3%profile7⏏5 = {:A([0, 3]), :C([3, 0])}<>; @profile ␤    expecting any of:␤        postfix␤»
14:51 [ptc] m: my %profile = {:A([0, 3]), :C([3, 0])}<>; my @profile = %profile<A C>; [~] gather for ^2 -> \c { take <A C>[$_] given first { @profile[$_][c] == 3 }, ^2; }
14:51 camelia rakudo-moar a5f38a: ( no output )
14:51 [ptc] m: my %profile = {:A([0, 3]), :C([3, 0])}<>; my @profile = %profile<A C>; say [~] gather for ^2 -> \c { take <A C>[$_] given first { @profile[$_][c] == 3 }, ^2; }
14:51 camelia rakudo-moar a5f38a: OUTPUT«CC␤»
14:52 [ptc] jnthn: that should be CA
14:52 [ptc] jnthn: that was the best golfing solution I could come up with...
14:53 mr_ron m: my Num constant baz = 42; say 'ok so far ', baz; my Num constant biz = 'bleh'; say biz
14:53 camelia rakudo-moar a5f38a: OUTPUT«ok so far 42␤bleh␤»
14:55 chenryn joined #perl6
14:56 mr_ron planning to file an rt unless objection
15:03 molaf_ joined #perl6
15:03 jnthn mr_ron: Think we may already have one...
15:04 arnsholt This is something that feels like it has a standard answer: I have set with $n$ elements; if I perform repeated samplings of $m$ elements (without replacement for a sampling, but each sampling starts with all $n$), what number of distinct sampled elements can I expect after $p$ samplings?
15:04 arnsholt That sound familiar to any of you?
15:06 |Tux| is there already a warn (that can be caught) that does *not* show the location, like adding \n in perl5?
15:06 |Tux| want $error, :nolocation; # maybe
15:07 dalek rakudo/nom: 8782513 | jnthn++ | src/ (3 files):
15:07 dalek rakudo/nom: Implement <&foo: $arg> and <&foo($arg)>.
15:07 dalek rakudo/nom:
15:07 dalek rakudo/nom: We don't parse quite so liberally as STD does here, mostly because it
15:07 dalek rakudo/nom: seems like a great way to have to do a bunch of more fragile analysis
15:07 dalek rakudo/nom: without obviously implementing anything else from the design.
15:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/878251393d
15:07 |Tux| warn $error, :nolocation; # maybe
15:07 dalek roast: f3d73db | jnthn++ | S05-interpolation/lexicals.t:
15:07 dalek roast: Tests for RT #77152 (<&foo($arg)>).
15:07 dalek roast: review: https://github.com/perl6/roast/commit/f3d73db674
15:07 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=77152
15:07 jnthn |Tux|: Nothing implemented for that yet; agree it could be nice.
15:07 nine_ |Tux|: note
15:07 moritz nine_: note isn't (easily) catchable
15:07 * |Tux| postpones testing for that part of the diagnostics
15:07 moritz oh, with a quiet { } block; not sure if it's implemented
15:08 ugexe that will always use non-ssl
15:08 ugexe oops
15:09 jnthn mr_ron: Yes, it's already in RT: https://rt.perl.org/Ticket/Display.html?id=121296
15:11 mr_ron jnthn: yes I checked and say that one but if you look carefully it is similar but a bit different.  Can I add mine as commentary to RT 121296?
15:11 mr_ron s/say/saw/
15:11 PerlJam mr_ron: the "ignores the type constraint" comment at the end seems exactly like the behavior you noticed.
15:12 mr_ron yes I missed the note at the end you are right it is identical sorry
15:12 PerlJam no worries
15:13 gfldex joined #perl6
15:13 [ptc] jnthn: golfed version of `gather for given first` issue
15:13 [ptc] m: my %profile = {:A([0, 3]), :C([3, 0])}<>; my @profile = %profile<A C>; say [~] gather for ^2 -> \c { take <A C>[$_] given first { @profile[$_][c] == 3 }, ^2; }
15:13 camelia rakudo-moar a5f38a: OUTPUT«CC␤»
15:13 [ptc] jnthn: this should be CA
15:14 [ptc] jnthn: hopefully I haven't golfed it down too far.
15:14 [ptc] jnthn: the example above doesn't point out the fact that the first element to be returned is actually repeated twice.  One can see this with a longer example
15:15 jnthn [ptc]: Hmmm
15:15 jnthn You can get rid of the hash too
15:15 jnthn m: my @profile = [0, 3], [3, 0]; say gather for ^2 -> \c { take <A C>[$_] given first { @profile[$_][c] == 3 }, ^2; }
15:15 camelia rakudo-moar a5f38a: OUTPUT«C C␤»
15:16 [ptc] jnthn: one problem I have is that I don't 100% understand what the original example was doing...
15:16 [ptc] jnthn: and thus tried to retain a bit of its original structure
15:17 jnthn m: my @profile = [0, 3], [3, 0]; for ^2 -> \c { .say given first { @profile[$_][c] == 3 }, ^2; }
15:17 camelia rakudo-moar a5f38a: OUTPUT«1␤1␤»
15:17 jnthn Can even get rid of the gather, it seems
15:18 [ptc] m: my @profile = [0, 0, 3], [0, 3, 0], [3, 0, 0]; say gather for ^3 -> \c { take <A C G>[$_] given first { @profile[$_][c] == 3 }, ^3 }
15:18 camelia rakudo-moar a5f38a: OUTPUT«G G C␤»
15:18 [ptc] actually, the gather is needed since the for loop actually does more than that in the original example
15:19 jnthn yeah but with the golf I just did it's still the wrong answer without a gather invlved, no?
15:19 [ptc] m: my @profile = [0, 0, 3], [0, 3, 0], [3, 0, 0]; say gather for ^3 -> \c { my $max = max map { @profile[$_][c] }, ^3; take <A C G>[$_] given first { @profile[$_][c] == 3 }, ^3 }
15:19 camelia rakudo-moar 878251: OUTPUT«G G C␤»
15:19 [ptc] jnthn: correct
15:20 [ptc] there was a commit recently which had to do with $_ and how it is assigned in for/given blocks.  Maybe the issue here is something to do with that?
15:20 TimToady it's something that changed since my last checking last night
15:20 [ptc] .... just a guess
15:21 TimToady when I ran the short one, I got 1 0, but after a pull and recompile, got 1 1
15:21 jnthn [ptc]: I'm suspecting so, yes
15:21 jnthn It works with given first(...) { .say }
15:25 [ptc] jnthn: btw, after a git-bisect the issued turned up in commit 709b77d; interestingly enough not in the commit about the for/given
15:26 jnthn [ptc]: Yeah, I think I've an idea what's going wrong.
15:33 jnthn m: for ^2 -> \c { 1 given first { c.say; 0 }, ^2; }
15:33 camelia rakudo-moar 878251: OUTPUT«0␤0␤0␤0␤»
15:33 jnthn Golfs to this.
15:37 [ptc] impressed
15:37 [ptc] so some kind of interaction between for and given?
15:37 FROGGS joined #perl6
15:38 jnthn The fix I did earlier for thunks accidentally shuffles the block passed to first into the thunk scope made for the expression to the left of the given.
15:40 PerlJam m: for ^2 -> \c { say "c: {c}"; 1 given first { c.say; 0 }, ^2; }
15:40 camelia rakudo-moar 878251: OUTPUT«c: 0␤0␤0␤c: 1␤0␤0␤»
15:40 mr_ron left #perl6
15:42 PerlJam I guess that explains how c lost its value?
15:42 jnthn Yeah
15:42 jnthn Apparently we need more spectests ;)
15:42 dalek nqp: 547d08a | coke++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
15:42 dalek nqp: RT #124144 - make jvm give the same output as moar
15:42 dalek nqp:
15:42 dalek nqp: Handle negative points as well as out of range.
15:42 dalek nqp: review: https://github.com/perl6/nqp/commit/547d08aad0
15:42 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124144
15:43 [ptc] it's nice that the examples have been able to spot an issue like this :-)
15:44 moritz joined #perl6
15:44 PerlJam m: for 5,6 -> \c { say "c: {c}"; 1 given first { c.say; 0 }, ^2; }
15:44 camelia rakudo-moar 878251: OUTPUT«c: 5␤5␤5␤c: 6␤5␤5␤»
15:44 Bucciarati joined #perl6
15:44 masak joined #perl6
15:44 PerlJam Perhaps "lost its value" was a bit wrong-headed  :)
15:46 lucasb m: for ^3 -> $x { .say given { $x }() }
15:46 camelia rakudo-moar 878251: OUTPUT«0␤0␤1␤»
15:46 jnthn m: use Test; my @a; for ^2 -> \c { 1 given first { @a.push(c); 0 }, ^2; }; is @a, (0, 0, 1, 1);
15:46 camelia rakudo-moar 878251: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/cMp0Indj96 line 1␤# expected: '0 0 1 1'␤#      got: '0 0 0 0'␤»
15:47 jnthn m: use Test; my @a; for ^2 -> \c { 1 for first { @a.push(c); 0 }, ^2; }; is @a, (0, 0, 1, 1);
15:47 camelia rakudo-moar 878251: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/TiY9FmEjFP line 1␤# expected: '0 0 1 1'␤#      got: '0 0 0 0'␤»
15:47 jnthn Good, those'll cover it.
15:50 [ptc] m: use Test; my @a; for ^2 -> $c { 1 given first { @a.push($c); 0 }, ^2; }; is @a, (0, 0, 1, 1);
15:50 camelia rakudo-moar 878251: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/rvERo8xikf line 1␤# expected: '0 0 1 1'␤#      got: '0 0 0 0'␤»
15:52 dalek rakudo/nom: feca211 | coke++ | tools/build/NQP_REVISION:
15:52 dalek rakudo/nom: Bump nqp for jvm bugfix for RT #124144
15:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/feca21176d
15:52 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124144
15:53 jnthn [ptc]: I'm spectesting what is hopefully a fix at the moment
15:53 jnthn [ptc]: And have a copule of extra spectests ready to push too
15:56 [ptc] jnthn: sweet!  Awesome work!
15:56 raiph joined #perl6
15:59 japhb_ I've been having problems with Panda in my r-j builds the last week or two; I'm getting "Function X::Panda needs parens to avoid gobbling block" and "Missing block (apparently taken by 'X::Panda')".  Are these known?  (Note: haven't tried a build today; last build was yesterday.)
15:59 * japhb fixes his nickburp
16:01 diana_olhovik joined #perl6
16:02 dalek rakudo/nom: 4b39cd5 | jnthn++ | src/Perl6/ (3 files):
16:02 dalek rakudo/nom: Fix regression in s.m. given/for.
16:02 dalek rakudo/nom:
16:02 dalek rakudo/nom: We accidentally relocated blocks occurring in a statement modifier
16:02 dalek rakudo/nom: into the thunk for given and for, rather than just the ones in the
16:02 dalek rakudo/nom: statement. Need an extra bit of state to fix this, as we still want
16:02 dalek rakudo/nom: to do the move when we're doing blorst thunks.
16:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4b39cd5285
16:03 dalek roast: f113f3f | jnthn++ | S04-statement-modifiers/ (2 files):
16:03 dalek roast: Tests covering regression in given/for s.m.
16:03 dalek roast: review: https://github.com/perl6/roast/commit/f113f3fa2d
16:03 jnthn [ptc]++ # promptly spotting/reporting the regression
16:05 [ptc] no probs :-)
16:06 [ptc] commute &
16:07 * japhb tries nuking his local panda repo and rebuilding from a fresh clone
16:09 jnthn std: when 42 { say "This should fail" }
16:09 camelia std 28329a7: OUTPUT«ok 00:00 137m␤»
16:10 eli-se joined #perl6
16:14 sue_ joined #perl6
16:14 PerlJam Has anyone done something like http://blog.plover.com/2015/04/24/#monad-search in Perl6? (on rosettacode maybe?)
16:15 mohij joined #perl6
16:16 PerlJam mjd mentions at the end that he tried it in Perl once but it sucked.  Surely P6 would do *much* better
16:19 masak_grr PerlJam: I'm gearing up to write a blog post about that.
16:20 masak_grr PerlJam: it will contain parsing, grammars, DSLs, and macros.
16:21 PerlJam masak_grr: so ... I was about to ++ you, but after that second sentence I'm no longer sure  ;)
16:22 PerlJam masak++ anyway :)
16:24 konsolebox joined #perl6
16:24 konsolebox joined #perl6
16:24 masak_grr hehe
16:25 masak_grr PerlJam: I will now consider it a challenge to have the blog post please you ;)
16:25 masak_grr (it's not as crazy as it sounds. I think.)
16:26 dalek rakudo/nom: 71ff418 | TimToady++ | src/ (11 files):
16:26 dalek rakudo/nom: for's impl is now .FOR, remaining .for can be .map
16:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/71ff41810b
16:26 TimToady there is no .for, nor can this be construed as a response...
16:28 tinyblak joined #perl6
16:30 chenryn joined #perl6
16:30 vendethiel joined #perl6
16:30 jnthn TimToady: S04 wants that 'when' only be allowed in a topicalizer block
16:31 moritz TimToady: please don't remove .for without deprecation
16:31 moritz TimToady: the ecosystem (at least those parts under my control) use it
16:31 jnthn TimToady: given/for are obvious, something with an explicit $_ in its signature is obvious, anything else?
16:32 jnthn TimToady: Uh, CATCH is too
16:32 jnthn And CONTROL...
16:34 masak_grr I think that's it.
16:34 PerlJam do any of the statement prefixes like do, once, gather, etc.  topicalize?
16:35 masak oh! `andthen` and `orelse`
16:35 masak or at least the former.
16:35 jnthn masak: Those aren't *blocks*
16:36 masak hm, troo.
16:36 jnthn "The given block is just one way to set the current topic, but a switch statement can be any block that sets $_, including a for loop (assuming one of its loop variables is bound to $_) or the body of a method (if you have declared the invocant as $_). "
16:37 masak or any routine that declares a parameter as $_
16:37 rurban joined #perl6
16:37 lucasb m: $_ = 42; say 'yes' when 42
16:37 camelia rakudo-moar 4b39cd: OUTPUT«yes␤»
16:38 lucasb For the record, P5 dies with 'Can't "when" outside a topicalizer'
16:38 TimToady moritz: I just completely broke for loops, and you want deprecation on a little old *method*?
16:39 moritz TimToady: yes
16:39 jnthn lucasb: hm, yeah, I should take care of the statement modifier form too.
16:39 dalek perl6-roast-data: 216ca5a | coke++ | / (9 files):
16:39 dalek perl6-roast-data: today (automated commit)
16:39 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/216ca5aa27
16:39 TimToady GLR breaks things
16:39 moritz TimToady: because we told people to use .for instead .map to be forward compatible
16:39 moritz TimToady: so, is there a good reason why we can't have a .for right now?
16:40 TimToady we can, and it should probably refer people to .flatmap if they want it
16:41 moritz the GLR breaks things because it needs to break things. There's no reason to break things with .for removal right now.
16:41 * TimToady looks around for a sous chef to clean up the omelette...
16:41 masak dinner &
16:41 raydiak haven't backlogged thoroughly but wrt when and $_, what about blocks to map, grep, etc?
16:42 jnthn m: { when 1 { say 'one!' }; when 2 { say 'two' } }(1)
16:42 camelia rakudo-moar 4b39cd: OUTPUT«one!␤»
16:42 jnthn m: { when 1 { say 'one!' }; when 2 { say 'two' } }(2)
16:42 camelia rakudo-moar 4b39cd: OUTPUT«two␤»
16:42 jnthn Do we want ^^ to keep working?
16:42 TimToady why wouldn't it?
16:44 jnthn TimToady: It's about whether it counts as a topicalizer block
16:44 jnthn TimToady: I'm worrying about:
16:44 jnthn m: { when 1 { say 'one!' }; when 2 { say 'two' }; say $^a }(2)
16:44 camelia rakudo-moar 4b39cd: OUTPUT«use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/qh9Kcr2IlT:1␤␤use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/qh9Kcr2IlT:1␤␤2␤»
16:44 jnthn We already parsed/accepted then when blocks there before we hit the placeholder
16:45 TimToady then it should probably fail as a conflicted signature somehow
16:45 grettis joined #perl6
16:45 jnthn m: ( say $_; say $^a; }(1)
16:45 camelia rakudo-moar 4b39cd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9k7KOvFRbo␤Cannot use placeholder parameter $^a in the mainline␤at /tmp/9k7KOvFRbo:1␤------> 3( say $_; say $^a7⏏5; }(1)␤»
16:46 TimToady well, but we don't know which block the when is aimed at, hmm
16:46 jnthn m: (( say $_; say $^a; })(1)
16:46 camelia rakudo-moar 4b39cd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OxYTVchqD8␤Cannot use placeholder parameter $^a in the mainline␤at /tmp/OxYTVchqD8:1␤------> 3(( say $_; say $^a7⏏5; })(1)␤»
16:46 jnthn huh
16:46 TimToady s/(/{/
16:46 jnthn oh!
16:46 jnthn m: { say $_; say $^a; }(1)
16:46 camelia rakudo-moar 4b39cd: OUTPUT«(Any)␤1␤»
16:46 jnthn Thanks. So the question: does this one complain about conflict too?
16:48 TimToady maybe...but if the (1) ain't there, the $_ is legal, but the $^a isn't, go figure
16:49 TimToady at some point we give up and declare it erroneous
16:49 jnthn grmbl, you're right
16:50 jnthn OK, I'll just let that one through.
16:50 dalek rakudo/nom: 4372ca2 | moritz++ | src/core/Any.pm:
16:50 dalek rakudo/nom: Re-introduce a deprecated Any.for
16:50 dalek rakudo/nom:
16:50 dalek rakudo/nom: no reason to break this particular feature right now
16:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4372ca2287
16:51 dalek doc: c24d79c | (Heiko Jansen)++ | lib/Type/Cool.pod:
16:51 dalek doc: Update Cool.pod to fix minor inconsistencies
16:51 dalek doc: review: https://github.com/perl6/doc/commit/c24d79cb12
16:51 dalek doc: 82bdd79 | moritz++ | lib/Type/Cool.pod:
16:51 dalek doc: Merge pull request #78 from heikojansen/patch-1
16:51 dalek doc:
16:51 dalek doc: Update Cool.pod to fix minor inconsistencies
16:51 dalek doc: review: https://github.com/perl6/doc/commit/82bdd79796
16:54 TimToady moritz: thanks
16:54 rjbs I am curious about KEEP/UNDO.  S04 says that UNDO runs on unsuccessful block exit.  S04 also says that a loop that does not return defined or a parcel is unsuccessful.
16:54 rjbs What are the semantics here for exiting a loop via 'next'?
16:55 rjbs Context:  Someone proposed on p5p a for/else construct as in Python.  The obvious thing to look at in p6 is the phasers construct, but I don't see any phaser relevant to the uses "run when loop exits early" or "run when loop naturally exhausts itself"
16:57 TimToady KEEP/UNDO would apply to each iteration of the loop, so would be unsuitable for such a thing
16:58 jnthn You don't really want any such thing to be declared inside the loop, I suspect, becauase it brings up hairy things about scoping
16:58 rjbs That's what I thought.  I sort of got sidetracked wondering about the "definition of success," though.
16:59 rjbs jnthn: not to mention readability
17:02 telex joined #perl6
17:07 moritz m: for 'a' { KEEP say 'keep'; UNDO say 'undo'; LEAVE say 'leave'; next }
17:07 camelia rakudo-moar 71ff41: OUTPUT«leave␤undo␤»
17:07 moritz rjbs: seems we regard next as unsuccessful block exit
17:07 TimToady in P6 we have little need of an else on a loop, because we don't usually use loops for linear searches
17:08 TimToady either we use 'first', or we can always just || do {...} on the returned value of the loop
17:08 TimToady that is, on the returned list, which will always be true if anything is in it
17:09 TimToady P5 can't do @a || @b so it has more of a problem there
17:10 dalek roast: 55c98f8 | jnthn++ | S04-statements/when.t:
17:10 dalek roast: A bunch of tests for when is/isn't OK.
17:10 dalek roast:
17:10 dalek roast: We leave the given/for/CATCH/CONTROL cases to the many existing tests.
17:10 dalek roast: review: https://github.com/perl6/roast/commit/55c98f8c23
17:10 vendethiel joined #perl6
17:11 TimToady m: say (first *.is-prime, 4,6,8 orelse 3)
17:11 camelia rakudo-moar 71ff41: OUTPUT«3␤»
17:13 TimToady m: say (gather for 4,6,8 { if .is-prime { take $_; last } }) || 3
17:13 camelia rakudo-moar 71ff41: OUTPUT«3␤»
17:13 skids m: @a = (while(0..4.pick) { 42 }); @a.say; # I don't think that's RTd but maybe already on the GLR todo list.
17:13 yoleaux 08:25Z <nine> skids: I'd love to merge a patch hooking perl5 pod into .WHY :) Making usage of Perl 5 modules in Perl 6 be more convenient than in Perl 5 would be just awesome
17:13 camelia rakudo-moar 71ff41: OUTPUT«5===SORRY!5=== Error while compiling /tmp/a047plUZbY␤Variable '@a' is not declared␤at /tmp/a047plUZbY:1␤------> 3@a7⏏5 = (while(0..4.pick) { 42 }); @a.say; # ␤    expecting any of:␤        postfix␤»
17:13 yoleaux 11:24Z <timotimo> skids: the video game i'm sinking so much time into these days is Disgaea 4. the bad thing is, it'll accept any amount of time you offer :)
17:13 [Coke] https://p6weekly.wordpress.com/2015/04/28/2​014-16-17-a-release-nfg-and-more-glr-work/ - this showed up in the pl6anet feed as "PHA+SGVsbG8gZXZlcnlib2R5I​SBJJiM4MjE3O20gYmFjay..." and about a million times that.
17:14 skids m: my @a = (while(0..4.pick) { 42 }); @a.say; # I don't think that's RTd but maybe already on the GLR todo list.
17:14 camelia rakudo-moar 71ff41: OUTPUT«5===SORRY!5===␤Word 'while' interpreted as 'while()' function call; please use whitespace instead of parens␤at /tmp/O7zot5JFs6:1␤------> 3my @a = (while7⏏5(0..4.pick) { 42 }); @a.say; # I don't t␤Unexpected block in infix position (two te…»
17:14 skids grr
17:14 skids m: my @a = (while (0..4.pick) { 42 }); @a.say; # I don't think that's RTd but maybe already on the GLR todo list.
17:14 camelia rakudo-moar 71ff41: OUTPUT«(timeout)»
17:15 skids oh dear.  Anyway the pointis while/loop/until do not return the list of block results yet.
17:15 TimToady what are you expecting that to do, besides not work several ways?
17:15 TimToady first, you need (0..4).pick
17:15 TimToady second, that's always going to be true
17:16 jnthn m: given 'abc' { when /a/ { when /b/ { say 'hmm' } } }
17:16 camelia rakudo-moar 71ff41: OUTPUT«hmm␤»
17:16 jnthn Verdict? :)
17:16 TimToady well, I guess if the first is fixed, the second is okay
17:16 jnthn It's in a spectest, but my patch rejects it 'cus when ain't a topicalizer. :)
17:17 TimToady rejects what?  both those whens are inside a topicalizer
17:17 jnthn *sigh*
17:17 jnthn I assumed "directly"
17:17 jnthn Because otherwise we need to go worrying about things like, what is transparent.
17:17 TimToady no, this is why it uses exceptions
17:17 jnthn And what isnt.
17:17 rjbs TimToady++ # thanks, re: above
17:17 jnthn ...it's a static check.
17:18 jnthn Nothing to do with exceptions.
17:18 TimToady anything that is not a topicalizer is transparent, I'd think
17:18 jnthn given foo() { sub bar() { when 1 { } } } # surely this when ain't in a topicalizer block
17:19 TimToady well, out to a routine, anyway
17:19 TimToady but even that could conceivable have a lexotic definition
17:19 jnthn OK, I can live with routine
17:20 jnthn What could have a lexotic definition?
17:20 TimToady as long as bar isn't called outside the dynamic scope of the given
17:20 jnthn But the $_ of the given will never be visible in the block 'cus a routine always gets a fresh one.
17:21 jnthn visible in bar, I menat.
17:21 eli-se joined #perl6
17:21 TimToady true nuff, so I guess in that sense every routine is a topicalizer
17:21 TimToady so you can stop there
17:21 jnthn OK
17:21 TimToady it's a topicalizer with a boring topic :)
17:22 jnthn Well, it's not a topicalizer as in "I can sanely use when here"...
17:22 TimToady well, if you say "$_ = 'foo'" inside the routine
17:22 TimToady it is, admittedly, ugly
17:23 b2gills joined #perl6
17:23 raydiak I have constructs like that in places
17:23 jnthn TimToady: Yeah, I just found code that actually *does* set $_ like that.
17:23 jnthn eww
17:24 * TimToady imagines a blockless "given 'foo';"
17:24 * TimToady has a bad imagination :)
17:24 jnthn :P
17:24 jnthn If we allow that, though, the check is kinda useless
17:25 _mg_ joined #perl6
17:25 jnthn Because as soon as you put some code in a sub or method, you can use when/default anywhere
17:25 jnthn So it'll only outlaw use of it in the mainline.
17:25 * raydiak always expected 'when' should work more or less anywhere there's a $_ and something to next/last/return out of
17:25 TimToady well, so?
17:25 TimToady why not allow succeeding out of a routine?
17:26 TimToady I mean, it's a code smell if you assign $_ rather than making it one of the parameters, but still
17:27 jnthn TimToady: I dunno, it feels for the machinery I introduced to do the check we get rather little value.
17:27 jnthn m: $_ = 42; when 42 { say 'ok' }
17:27 camelia rakudo-moar 4372ca: OUTPUT«ok␤»
17:27 jnthn You can even set the $_ in the mainline.
17:27 jnthn There's nowhere you don't have one.
17:28 skids Any thoughts on http://irclog.perlgeek.de/p​erl6/2015-04-18#i_10462461 ?
17:30 nbdsp joined #perl6
17:30 TimToady jnthn: then I guess we don't really need the machinery all that much, and we can start up a hair faster...
17:30 nbdsp Greetings! On my machine filling a hash from a file with about 90,000 short lines (one number, one word and one letter) takes a long time (more than 5 minutes). Is something wrong with this code? : class A{ has %!forms; submethod BUILD{ for "/home/user/words".IO.slurp.lines { my ($id, $form, $pof) = $_.words; %!forms.push( ( $form, $pof ) ); } } } - The 'push' method for adding to hash is used in order to keep multiple values for one ke
17:31 jnthn TimToady: OK, in which case S04 changes to acknowledge that there always is some $_ available, and I can reject RT #71368?
17:31 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=71368
17:32 TimToady seems okay to me
17:33 jnthn OK.
17:33 jnthn I'll do so after dinner.
17:34 nbdsp Will try to profile. Thanks!
17:34 jnthn nbdsp: Don't see anything immediately wrong with it, though no idea how .push on a hash is implemented. :)
17:34 * jnthn - dinner, bbl
17:35 nbdsp I think the .push is the cause.
17:35 TimToady why the extra parens?
17:35 ir2ivps4 joined #perl6
17:35 TimToady and why not an explicit pair?
17:35 nbdsp For making a list. Are they not needed?
17:36 TimToady m: my %h; %h.push: 'foo', 'bar'; say %h.perl
17:36 camelia rakudo-moar 4372ca: OUTPUT«{:foo("bar")}<>␤»
17:37 TimToady m: my %h; %h.push: 'foo' => 'bar'; say %h.perl
17:37 camelia rakudo-moar 4372ca: OUTPUT«{:foo("bar")}<>␤»
17:37 TimToady m: my %h; %h.push: ('foo', 'bar'); say %h.perl
17:37 camelia rakudo-moar 4372ca: OUTPUT«{:foo("bar")}<>␤»
17:37 skids nbdsp: try just .lines instead of .slurp.lines?
17:37 ShimmerFairy That reminds me; I've been seeing that <> in .perl output lately, what exactly is that for?
17:38 Alina-malina joined #perl6
17:38 TimToady maybe try an :eager variant?
17:38 TimToady in the absence of GLR optimizations
17:38 TimToady but profile first
17:39 nbdsp Will try :eager and .lines. Thanks.
17:39 TimToady and you can probably do a single push of all the pairs, instead of pushing every line
17:39 TimToady dunno if that'd help either
17:43 skids ShimmerFairy: It is a "decontainerizer"
17:44 ShimmerFairy part of the GLR then, I take it?
17:45 TimToady not really, more just trying to get rid of all the FooClass.new() boilerplate out of .perl
17:46 TimToady and all the .item and .list.item output
17:46 ShimmerFairy Can the <> contain anything, or is always just a literal <> ?
17:46 domidumont joined #perl6
17:46 TimToady it's a Zen slice; [] or {} would work as well
17:47 TimToady if you put something in it, you'd require the left side to be a hash
17:47 TimToady m: say [1,2,3] ~~ Scalar; say [1,2,3]<> ~~ Scalar;
17:47 camelia rakudo-moar 4372ca: OUTPUT«False␤False␤»
17:48 TimToady hmm
17:48 TimToady m: say VAR([1,2,3]) ~~ Scalar; say VAR([1,2,3]<>) ~~ Scalar;
17:48 camelia rakudo-moar 4372ca: OUTPUT«True␤False␤»
17:49 TimToady m: say VAR([1,2,3]) ~~ Scalar; say VAR([1,2,3]<oops>) ~~ Scalar;
17:49 camelia rakudo-moar 4372ca: OUTPUT«True␤False␤»
17:50 TimToady m: say [1,2,3]<oops>
17:50 camelia rakudo-moar 4372ca: OUTPUT«postcircumfix:<{ }> not defined for type Array␤  in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:3721␤  in block <unit> at /tmp/FGndjyuT4H:1␤␤»
17:50 TimToady m: say VAR([1,2,3]) ~~ Scalar; say VAR([1,2,3]<oops>) ~~ Failure;
17:50 camelia rakudo-moar 4372ca: OUTPUT«True␤True␤»
17:52 japhb Dagnabbit, it looks like panda is screwed up from me on r-j, even with a fresh clone of panda
17:52 japhb Is there something else I need to freshly clone, or is panda just not working on r-j right now?
17:53 skids japhb: last time I tried panda was broken on r-j.
17:53 skids (and it was a known issue)
17:54 TimToady vendethiel: nothing happens to reduce ops; their flattening behavior is already determined by whether you feed them a scalar or list infix operator
17:55 japhb Wait ... is panda no longer using submodules?
17:55 TimToady which reminds me, now that we can send associtivity along with operators, we need to handle nodal similarly
17:56 lucasb m: my %h; %h.push: 'a' => 1; say %h
17:56 camelia rakudo-moar 4372ca: OUTPUT«a => 1␤»
17:56 lucasb m: my %h; %h.push: a => 1; say %h
17:56 camelia rakudo-moar 4372ca: OUTPUT«␤»
17:57 lucasb Any rationale why methods don't warn about unexpected named parameters?
17:58 ShimmerFairy Methods have an implicit slurpy hash parameter defined for them.
17:59 lucasb ShimmerFairy: Oh, I was expecting something like this. Is it used for something?
18:00 ShimmerFairy I've had it explained to me a couple times (something involving MMD), but I've forgotten the explanation every time :P .
18:01 lucasb ShimmerFairy: Thanks for telling me!
18:01 lucasb m: class A { method m() { say %_ } }; say A.m(:foo, :bar)
18:01 camelia rakudo-moar 4372ca: OUTPUT«bar => True, foo => True␤True␤»
18:01 raydiak lucasb: http://design.perl6.org/S12​.html#Interface_Consistency talks about it
18:01 TimToady see S12:Interface_consistency
18:01 synbot6 Link: http://design.perl6.org/S12​.html#Interface_consistency
18:01 ShimmerFairy And every time I don't know the explanation, I can't help but think that we really shouldn't be doing it.
18:01 lucasb Even with an explicit empty "()" signature...
18:02 lucasb raydiak, TimToady: I'll read it, thanks!
18:02 b2gills m: class A { method m( *% () ) { say %_ } }; say A.m(:foo, :bar); # you can explicitly cause it to fail currently
18:02 camelia rakudo-moar 4372ca: OUTPUT«2 unexpected named parameters passed (foo,bar) in sub-signature␤  in method m at /tmp/mlV_xwjiQV:1␤  in block <unit> at /tmp/mlV_xwjiQV:1␤␤»
18:03 TimToady and we may have some way in the future of detecting unused parameters
18:04 ShimmerFairy Yeah, I'm always fuzzy on why not having *%_ messes with nextsame semantics. (After all, why no implicit *@_ ? Why are named parameters special?)
18:05 TimToady they are options that are typically aimed at a single parent class or subclass
18:05 TimToady especially with new, where they initialize only the attributes that are private to that level
18:06 TimToady there's a specced mechanism for bundling up options for a particular level in a WHENCE-like object, but that is NYI
18:06 TimToady afaik
18:06 vendethiel TimToady: so [+](@a) will still be equivalent to [+] @a ?
18:07 vendethiel asking because it wasn't clear to me, as a beginner, how [+] @a, @b would go. would it be @a + @b or [+](|@a, |@b)
18:07 TimToady yes, just as any listop(@a) is equivalent to listop @a
18:07 TimToady + is a scalar op, so flattens
18:07 TimToady X, on the other hand, takes lists
18:07 vendethiel TimToady: would you mind me quoting these words for the learnx? they seem wise :P
18:08 * TimToady can't stop people from quoting him...
18:09 * TimToady tries not to say too many stupid things in the first place, for that reason :)
18:09 nbdsp I tried : for eager "/home/use/words".IO.lines - but nothing changed. Here is a profile: https://github.com/nbdsp/profile-report/b​lob/master/profile-1430243512.45954.html What info in profile can help to spot the cause of the problem?
18:09 vendethiel you're doing good then ;-)
18:10 b2gills m: say ((^3).pick(*) xx 4).perl; # is there a way to get this to return a lol? ( where 4 is * )
18:10 camelia rakudo-moar 4372ca: OUTPUT«(1, 0, 2, 1, 0, 2, 2, 1, 0, 0, 1, 2)␤»
18:10 vendethiel m: say ([(^3).pick(*)] xx 4).lol
18:10 eli-se .perl should never return a lol, silly
18:10 yoleaux 09:36Z <Ven> eli-se: echo "require-sandbox: True" >> ~/.cabal/config
18:10 camelia rakudo-moar 4372ca: OUTPUT«ListIter.new␤»
18:10 vendethiel m: say ([(^3).pick(*)] xx 4).lol.perl
18:10 camelia rakudo-moar 4372ca: OUTPUT«([2, 0, 1], [1, 0, 2], [0, 1, 2], [0, 2, 1])␤»
18:11 b2gills ... where I don't have to itemize
18:11 tinyblak joined #perl6
18:11 ShimmerFairy TimToady: suddenly I'm getting the weird feeling that named parameters aren't quite parameters; they look like parameters, but don't quite act like it. (I've got no specifics, just a general sense I'm getting now, I think because of at least a few times I've noticed them when encountering something unexpected)
18:11 araujo joined #perl6
18:12 eli-se yoleaux: no, I hate Cabal
18:12 vendethiel ShimmerFairy: instructions about the call to be done? (in the "meta" sense)
18:12 TimToady they're a bit like dynvars that way
18:13 vendethiel m: module A { our %*b; }; say %*A::b.perl
18:13 camelia rakudo-moar 4372ca: OUTPUT«Failure.new(exception => X::Dynamic::NotFound.new(name => "\%*b"), backtrace => (Backtrace::Frame.new(file => "src/gen/m-CORE.setting", line => 595, code => sub DYNAMIC (Any \name) { #`(Sub|36505624) ... }, subname => "DYNAMIC"), Backtrace::Frame.new(file …»
18:13 b2gills ShimmerFairy:  you could think of named parameters as calling a slightly different routine ( in some cases that is literally true )
18:13 ShimmerFairy I'm also thinking of that business where a Bool named parameter without a default is effectively a tri-state variable... :P
18:14 raydiak m: say (^12).pick(*).rotor(3).perl
18:14 camelia rakudo-moar 4372ca: OUTPUT«((1, 0, 7), (3, 6, 2), (4, 8, 5), (10, 11, 9))␤»
18:14 RabidGravy joined #perl6
18:14 TimToady it's probably an xx bug that it loses those parens
18:15 vendethiel I do think I reported something similar a week or two ago
18:15 b2gills I think it would be useful to be able to get flattening and non-flattening behavior out of xx
18:18 FROGGS good evening dear #perl6
18:18 raydiak good morning dear FROGGS :)
18:18 FROGGS :o)
18:19 nbdsp Could someone point to docs on how to read profile report for determining bottlenecks, please?
18:19 moritz it's list iteration :(
18:21 b2gills m: multi sub test (){ 'no named' }; multi sub test ( Bool :$a! ){ $a }; say test; say test :a($_) for Bool,True,False; # ShimmerFairy: actually you can even get 4 states out of a named Bool argument
18:21 camelia rakudo-moar 4372ca: OUTPUT«no named␤(Bool)␤True␤False␤»
18:22 zakharyas joined #perl6
18:22 ShimmerFairy well, I suppose it's debatable as to whether nonexistence is a state or not :P
18:24 ir2ivps4 joined #perl6
18:26 lucasb m: say (^10).rotor(0=>9, (1=>-2) xx 9, 1)  # going backwards with the new rotor :)
18:26 camelia rakudo-moar 4372ca: OUTPUT« 9 8 7 6 5 4 3 2 1 0 ␤»
18:26 FROGGS m: say "foo bar" ~~ / .+? <|w> /
18:26 camelia rakudo-moar 4372ca: OUTPUT«「foo」␤»
18:27 lucasb m: (1,2,3).rotor  # a tiny bug, rotor without args
18:27 camelia rakudo-moar 4372ca: OUTPUT«(timeout)»
18:27 nbdsp joined #perl6
18:28 Sqirrel joined #perl6
18:29 raydiak I wondered about how we should handle backwards rotors...certainly ones with a net movement of 0 across the whole pattern should fail
18:29 raydiak backwards ones would break lazyness
18:33 chenryn joined #perl6
18:34 raydiak so I guess my question is should backwards rotors be made to work e.g. .rotor(-1) eqv .reverse or something along those lines?
18:35 raydiak or just fail?
18:35 PerlJam raydiak: I vote fail
18:36 moritz fail
18:36 moritz the elems count is an ordinal number (thus always non-negative)
18:36 Rounin joined #perl6
18:37 moritz it's the step/gap argument that may be <0
18:37 FROGGS m: say "foo bar" ~~ / $7=[\w+] /
18:37 camelia rakudo-moar 4372ca: OUTPUT«Method 'from' not found for invocant of class 'Any'␤  in method caps at src/gen/m-CORE.setting:16526␤  in method gist at src/gen/m-CORE.setting:16557␤  in sub say at src/gen/m-CORE.setting:19269␤  in block <unit> at /tmp/GdSkWaUMVJ:1␤␤»
18:37 raydiak what about .rotor(1 => -2) ?
18:37 rurban joined #perl6
18:38 PerlJam raydiak: fail if we've backed up before the beginning.
18:38 moritz aye
18:38 timotimo .rotor(0 => 100, (1 => -2) xx *)
18:38 raydiak ah, that makes sense...I was just gonna check the sign of the sum of all the steps and gaps
18:39 timotimo (trololo)
18:39 dalek rakudo/nom: 6b29e3d | (Jeffrey Goff)++ | CREDITS:
18:39 dalek rakudo/nom: Adding myself as the release manager for Parrot directly after Simon.
18:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6b29e3dddc
18:39 dalek rakudo/nom: 29ead06 | (Will Coleda)++ | CREDITS:
18:39 dalek rakudo/nom: Merge pull request #420 from drforr/nom
18:39 dalek rakudo/nom:
18:39 dalek rakudo/nom: Adding myself as the release manager for Parrot directly after Simon.
18:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/29ead0639d
18:40 moritz timotimo: next up: the .rollator method, extra for you :-)
18:40 timotimo ouch
18:41 lizmat nbdsp: re http://irclog.perlgeek.de/p​erl6/2015-04-28#i_10518310, you might want to try adding :eager to lines()
18:41 TimToady jnthn: I think allowing bare blocks with placeholders somewhere that we do not allow ordinary lambdas would be rather peculiar
18:41 TimToady druther draw the boundary at routine vs block
18:42 TimToady otherwise we can't write decent list comprehensions using X
18:42 FROGGS m: say (^0x2000)».chr.join('') ~~ m:g/ <+ :NumericValue({+$_ > 0}) -digit +alpha >+ / # I <3 our syntax
18:42 camelia rakudo-moar 4372ca: OUTPUT«「ABCDEFGHIJKLMNOPQRSTUVWXYZ」 「_」 「abcdefghijklmnopqrstuvwxyz」 「ª」 「²³」 「µ」 「¹º」 「¼½¾」 「ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ」 「ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö」 「øù…»
18:43 TimToady and I'm quite certain there's rosettacode that relies on lambdas inside a for modifier
18:43 nbdsp lizmat: i tried two variants: 'for eager "file.IO.lines" '  and 'for "file.IO.lines :eager' - no results.
18:44 lizmat I seem to recall that IO.slurp.lines(:eager) was the fastest variant for reading lines
18:44 lizmat if it doesn't make a lot of difference, then maybe it *is* the push that is the problem
18:45 TimToady IO.slurp.words.rotor(3)
18:45 chenryn joined #perl6
18:46 lizmat ah, I see now, you want words
18:47 dalek perl6-examples: 2168bf6 | paultcochrane++ | categories/rosalind/mprt-grondilu.pl:
18:47 dalek perl6-examples: Use local FASTA files if available
18:47 dalek perl6-examples:
18:47 dalek perl6-examples: Fall back to file from internet if file isn't available
18:47 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/2168bf6d4d
18:47 dalek perl6-examples: d8e51fa | paultcochrane++ | categories/rosalind/ (4 files):
18:47 dalek perl6-examples: Add input files for mprt example
18:47 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/d8e51fa2c8
18:47 dalek perl6-examples: 8a490d0 | paultcochrane++ | categories/rosalind/ (2 files):
18:47 dalek perl6-examples: Flattening lists on input to for loops
18:47 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/8a490d0886
18:47 dalek perl6-examples: b62f395 | paultcochrane++ | categories/rosalind/dbpr-grondilu.pl:
18:47 dalek perl6-examples: Use local .txt input files if available
18:47 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/b62f39502e
18:47 dalek perl6-examples: 9612390 | paultcochrane++ | categories/rosalind/Q5SLP9.txt:
18:47 dalek perl6-examples: Add input file for dbpr example
18:47 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/961239055b
18:57 nbdsp joined #perl6
19:03 dalek perl6-examples: f55f5e4 | (Andrei Osipov)++ | categories/euler/ (2 files):
19:03 dalek perl6-examples: Problem 59 solution
19:03 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/f55f5e470b
19:03 dalek perl6-examples: 47b40b1 | (Andrei Osipov)++ | categories/euler/prob100-andreoss.pl:
19:03 dalek perl6-examples: [euler] problem 100
19:03 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/47b40b1081
19:03 dalek perl6-examples: 397742b | (Andrei Osipov)++ | categories/euler/prob100-andreoss.pl:
19:03 dalek perl6-examples: fixed title
19:03 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/397742b36f
19:03 dalek perl6-examples: 9d7332b | paultcochrane++ | categories/euler/ (3 files):
19:03 dalek perl6-examples: Merge pull request #22 from andreoss/andreoss
19:03 dalek perl6-examples:
19:03 dalek perl6-examples: [euler] some solutions
19:03 espadrine joined #perl6
19:03 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/9d7332bb1a
19:05 nbdsp I wonder, does the profile report provide some hints about what function takes the most time to run? The code runs about 8-9 minutes. I'm just perplexed what can cause such slowness...
19:12 lizmat nbdsp: perhaps this can give you some inspiration: https://gist.github.com/li​zmat/e692c9fab1c3b449714f
19:15 dalek perl6-examples: f40b232 | paultcochrane++ | categories/euler/prob025-polettix.pl:
19:15 dalek perl6-examples: Flatten input list to for loop
19:15 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/f40b2326e7
19:15 dalek perl6-examples: 286b09a | paultcochrane++ | categories/euler/ (3 files):
19:15 dalek perl6-examples: Merge branch 'master' of github.com:perl6/perl6-examples
19:15 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/286b09a606
19:15 dalek perl6-examples: 010c114 | paultcochrane++ | categories/euler/prob059-andreoss.pl:
19:15 dalek perl6-examples: [euler] wrap text to within 80 chars
19:15 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/010c114aa8
19:15 dalek perl6-examples: 9164035 | paultcochrane++ | categories/euler/prob (2 files):
19:15 dalek perl6-examples: Purge trailing whitespace
19:15 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/9164035ea3
19:15 dalek perl6-examples: 37f017e | paultcochrane++ | categories/euler/prob100-andreoss.pl:
19:15 dalek perl6-examples: Wrap text to within 80 chars
19:15 dalek perl6-examples:
19:15 dalek perl6-examples: This is consistent with the other examples and makes the text easy to read
19:15 dalek perl6-examples: in all editors.
19:15 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/37f017e1dc
19:15 dalek perl6-examples: e6a5495 | paultcochrane++ | categories/euler/prob (2 files):
19:15 dalek perl6-examples: Add vim coda
19:15 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/e6a5495871
19:15 dalek perl6-examples: 85003a9 | paultcochrane++ | categories/euler/prob059-andreoss.pl:
19:15 dalek perl6-examples: Make location of cipher.txt input file independent of run location
19:15 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/85003a9903
19:16 nbdsp lizmat: thanks! will try it. but nonetheless its strange that normally looking code behaves in such a way.
19:16 lizmat if we wouldn't be in the middle of the GLR, I would investigate deeper
19:16 lizmat but most loop based assumptions, especially wrt benchmarking, are up for grabs until the dust around the GLR settles
19:17 lizmat nbdsp: it would help if you could post a few lines from your words file
19:18 lizmat raydiak: are you working on parameter sanity checks in List.rotor?
19:19 nbdsp The line format: <number: from 1 to 50000> <word: normal english words> <letter: one latin letter>: example: '1 aardvark N'
19:21 dalek perl6-examples: 219e6a1 | paultcochrane++ | t/categories/euler.t:
19:21 dalek perl6-examples: [euler] add a test for prob100
19:21 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/219e6a1779
19:22 alini joined #perl6
19:23 lizmat nbdsp: code seems to work for me, is it any faster for you know?
19:24 yqt joined #perl6
19:24 xtreak joined #perl6
19:24 xinming joined #perl6
19:25 lizmat I wonder whether the quietly block allows for fine enough grained control over warnings
19:26 lizmat it feels to me to be a sibling of "use fatal"
19:26 labster timotimo: can I use your time machine?  because last week's weekly was on 13 April and I commited that on 19 April
19:26 lizmat something you may want to switch on/ off inside a scope for specific sets of statements, without the need of a scope
19:27 lizmat jnthn TimToady masak moritz thoughts ?
19:27 nbdsp lizmat: your solution solved the problem. thanks!
19:27 lizmat Hash.push has a lot of logic in there that you didn't need
19:27 lizmat so how fast is it now ?
19:28 nbdsp Instead of 8-9 minutes it runs now for less than 30 seconds.
19:29 raydiak lizmat: don't have anything actually written yet and eating lunch now, so if you feel inclined to do it yourself feel free...was looking at how we define exceptions and agonizing over wording more than accomplishing :)
19:30 lizmat okidoki, I was just testing some patches
19:31 amaliapomian joined #perl6
19:33 eternaleye joined #perl6
19:33 PerlJam Perhaps oddly, that's my reaction to our exceptions too. (Do we have an exception for this condition already and if not, what should the name be?)
19:34 raydiak yes precisely whta I was going through, scrolled through all of them...
19:34 lizmat nbdsp: cool!
19:36 PerlJam raydiak: wrt, .rotor I think we would use X::OutOfRange and at least one new one:  X::Parameter::TooFew  (or something)  I'm not sure what to call the one where someone has done backedup before the beginning.
19:37 dalek doc: a9ab269 | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
19:37 dalek doc: Start Channels
19:37 dalek doc: review: https://github.com/perl6/doc/commit/a9ab2695bf
19:37 dalek doc: 4331ec1 | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
19:37 dalek doc: More supply
19:37 dalek doc: review: https://github.com/perl6/doc/commit/4331ec11ca
19:37 dalek doc: 1d73e2a | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
19:37 dalek doc: More channel
19:37 dalek doc: review: https://github.com/perl6/doc/commit/1d73e2a289
19:37 dalek doc: 1732101 | (Jonathan Stowe)++ | lib/ (2 files):
19:37 dalek doc: Merge branch 'master' of github.com:perl6/doc
19:37 dalek doc: review: https://github.com/perl6/doc/commit/1732101fa1
19:37 lizmat PerlJam: X::OutOfRange is exactly what I'm testing
19:37 PerlJam raydiak: do we have tests for the weird .rotor conditions?  That's probably easier to do than name the execptions :)
19:37 PerlJam lizmat++
19:38 lizmat however failing or throwing inside the gather gives strange effects
19:38 lizmat $ 6 '{ (^10).rotor(-1 => 1) }'
19:38 lizmat Unhandled exception: Elements out of range. Is: -1, should be in 1..Inf
19:38 lizmat at src/gen/m-CORE.setting:14577  (/Users/liz/Github/rakudo.moar/install/share/p​erl6/runtime/./CORE.setting.moarvm:throw:121)
19:38 PerlJam lizmat: there are at least 3 conditions that we've talked about today.   .rotor(),  .rotor(-3), and .rotor(1 => -2)
19:39 lizmat looking at all 3 of them
19:39 PerlJam awesome.
19:40 lizmat https://gist.github.com/li​zmat/c2e5a958813d4b2d50da
19:40 lizmat but it doesn't give the desired effect  :-(
19:40 PerlJam what's the difference between   fail X::Whatever.new()  and X::Whatever.new().throw ?
19:41 lizmat well, the throw one is a "die" really  :-)
19:42 lizmat with fail I get:
19:42 lizmat $ 6 '{ (^10).rotor(-1 => 1) }'
19:42 lizmat Unhandled exception: Could not find symbol '&Return'
19:42 lizmat at src/gen/m-CORE.setting:14576  (/Users/liz/Github/rakudo.moar/install/share/p​erl6/runtime/./CORE.setting.moarvm:throw:121)
19:42 lizmat which is a big WAT for me
19:43 PerlJam me too
19:43 PerlJam almost deserves a new acronym FAALTA  (far and away less than awesome)
19:44 lizmat think I found it: it nows about X::TypeCheck, but not about X::TypeCheck::Return
19:44 lizmat *knows
19:45 lizmat nope, that's not it...
19:48 lizmat updated https://gist.github.com/li​zmat/c2e5a958813d4b2d50da with a stack trace, maybe jnthn can make some sense of it
19:50 PerlJam lizmat: The die might read better as:   die "Must specify at least one cycle for .rotor()" unless @cycle;    # give the programmer something more specific to look at
19:50 lizmat the message was really just a placeholder until a typed exception was found / made  :-)
19:51 PerlJam sure, but who knows when that's going to happen?  ;)
19:51 * raydiak is not quite sure what was wrong with the original .throw version
19:51 lizmat m: gather for ^10 { fail }
19:52 camelia rakudo-moar 29ead0: OUTPUT«Unhandled exception: ␤   at src/gen/m-CORE.setting:14568  (/home/camelia/rakudo-inst-1/share/perl6​/runtime/CORE.setting.moarvm:throw:121)␤ from src/gen/m-CORE.setting:16445  (/home/camelia/rakudo-inst-1/share/perl6​/runtime/CORE.setting.moarvm:sink:32)…»
19:52 raydiak m: fail
19:52 camelia rakudo-moar 29ead0: OUTPUT«Unhandled exception: ␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/share/perl6/run​time/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:16445  (/home/camelia/rakudo-inst-1/share/perl​6/runtime/CORE.setting.moarvm:sink:32)␤ from sr…»
19:53 lizmat m: gather for ^10 { die }  # is this what we expect?
19:53 camelia rakudo-moar 29ead0: OUTPUT«Unhandled exception: Died␤   at src/gen/m-CORE.setting:14568  (/home/camelia/rakudo-inst-1/share/perl6​/runtime/CORE.setting.moarvm:throw:121)␤ from src/gen/m-CORE.setting:792  (/home/camelia/rakudo-inst-1/share/perl​6/runtime/CORE.setting.moarvm:die:35)…»
19:53 lizmat m: die
19:53 camelia rakudo-moar 29ead0: OUTPUT«Died␤  in block <unit> at /tmp/m1LbzMWmJW:1␤␤»
19:54 PerlJam Was a call frame optimized away?
19:56 PZt joined #perl6
19:56 lizmat don't see a difference between running with --optimize=0 and not
20:03 ugexe would changing mkdir to mkdirs for jvm be a good idea? or changing it in rakudo? it would then have the same behavior as moar. i.e. moar will succeed with mkdir("non-existant-dir/subdir") but jvm will fail.
20:03 ugexe jvm currently fails with that rather
20:13 timotimo labster: damn, you're right, i did miss those :<
20:22 dalek doc: 6368d45 | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
20:22 dalek doc: earliest example
20:22 dalek doc: review: https://github.com/perl6/doc/commit/6368d45ef9
20:22 * jnthn back
20:23 jnthn lizmat: fail inside of a gather/take is a bad idea, in so far as it's going to look up the return handler of the surrounding routine, but it will already have returned, and then boom.
20:23 lizmat so the best thing would be to take a Failure ?
20:25 jnthn lizmat: I'd die.
20:25 japhb Gave up on trying to use panda with r-j; just using r-m however, I notice that it looks like Debugger::UI::CommandLine needs a 'use nqp'
20:26 lizmat where does that live ?
20:29 jnthn japhb: Added the 'use nqp'; thanks!
20:30 jnthn lizmat: lives at git@github.com:jnthn/rakudo-debugger.git
20:31 lizmat ok, so too late for a PR  :-)
20:32 jnthn lizmat: Yeah but if you want a commit bit on that module just ask :)
20:32 * lizmat asks  :-)
20:33 lizmat .oO( but promises nothng :-)
20:34 jnthn lizmat: done :)
20:34 lizmat thanks!
20:34 jnthn Has a bunch of open issues; I should find some tuits for it at some point :)
20:35 jnthn otoh, Rakudo has quite a few more open issues ;)
20:35 jnthn 12 to go until we lose a page of RTs, though :)
20:39 dalek doc: 5cd9864 | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
20:39 dalek doc: Need to await on the reader thread to get all output
20:39 dalek doc: review: https://github.com/perl6/doc/commit/5cd986476f
20:54 larion joined #perl6
20:58 bartolin m: macro postfix:<!>($n) { quasi { {{{$n}}}+1 } } ; say $_! for 3..5; # RT #116370
20:58 synbot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=116370
20:59 camelia rakudo-moar 29ead0: OUTPUT«4␤4␤4␤»
20:59 bartolin ^^ is that the expected output?
21:00 vendethiel don't think so
21:02 FROGGS m: macro postfix:<!>($n) { quasi { {{{$n}}}+1 } } ; for 3..5 { say $_! }
21:02 camelia rakudo-moar 29ead0: OUTPUT«4␤4␤4␤»
21:03 bartolin at least it's consistent now :)
21:03 FROGGS m: macro postfix:<!>($n) { quasi { {{{$n}}}+1 } } ; say 3!; say 4!; say 5!
21:03 camelia rakudo-moar 29ead0: OUTPUT«4␤5␤6␤»
21:04 FROGGS masa\Wmacros are weird
21:04 dalek rakudo/nom: fa2e089 | lizmat++ | src/Perl6/ (2 files):
21:04 dalek rakudo/nom: Move loading and symbol setup to World
21:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fa2e0891f2
21:08 virtualsue joined #perl6
21:09 pippo joined #perl6
21:09 pippo o/ #perl6
21:10 pippo FROGGS: I was looking at what you wrote: say "foo bar" ~~ / .+? <|w> /
21:10 pippo FROGGS: what does <|w> mean?
21:11 FROGGS that's a zero width assertion for word boundaries
21:12 FROGGS mentioned in S05
21:12 FROGGS and I just checked if it is implemented yet or not
21:12 pippo FROGGS: thank you
21:13 FROGGS you're welcome
21:13 pippo :-)
21:14 tinyblak joined #perl6
21:16 colomon joined #perl6
21:25 dalek rakudo-star-daily: ad9183b | coke++ | log/ (2 files):
21:25 dalek rakudo-star-daily: today (automated commit)
21:25 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/ad9183b2cd
21:26 pippo o/
21:26 larion joined #perl6
21:26 pippo left #perl6
21:27 timotimo .u |
21:27 yoleaux U+007C VERTICAL LINE [Sm] (|)
21:27 timotimo i didn't know this syntax existed
21:27 dalek doc: a55d1e8 | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
21:27 dalek doc: Not tab
21:27 dalek doc: review: https://github.com/perl6/doc/commit/a55d1e8842
21:27 timotimo m: say <1 2 3 4>.perl
21:27 camelia rakudo-moar fa2e08: OUTPUT«("1", "2", "3", "4")␤»
21:28 timotimo m: say <1>.perl
21:28 camelia rakudo-moar fa2e08: OUTPUT«"1"␤»
21:28 timotimo m: say <1/2>.perl
21:28 camelia rakudo-moar fa2e08: OUTPUT«0.5␤»
21:28 timotimo is <1> not supposed to turn into a Str?
21:30 diana_olhovik_ joined #perl6
21:30 ShimmerFairy m: say <1>.WHAT
21:30 camelia rakudo-moar fa2e08: OUTPUT«(Str)␤»
21:31 timotimo er ...
21:31 timotimo is <1> not suppose dto turn into an Int?
21:31 ShimmerFairy Either that or an IntStr. Forget which.
21:31 timotimo i mean ... since we already have code in there for <1/2> and <1+2i>
21:31 timotimo i'm not 100% sure if we were still going for the IntStr thing, as it's kind of hard to have
21:32 ShimmerFairy timotimo: <1/2> and <1+2i> are just literal Rats and Complexes (whereas without the <> you're actually relying on constant folding)
21:32 timotimo oh, right
21:36 dalek rakudo/nom: 20f5f6d | lizmat++ | src/Perl6/ (2 files):
21:36 dalek rakudo/nom: Move the mop up and check code to World
21:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/20f5f6d1f0
21:36 Zoffix joined #perl6
21:52 FROGGS joined #perl6
21:55 masak 'night, #perl6
21:56 Zoffix left #perl6
21:57 lizmat good night, masak
22:02 japhb When Panda tests Inline::Perl5 on install, it finds a failure in t/call.t, but has this strange output: t/call.t ......................
22:02 japhb All 12 subtests passed
22:02 japhb What in general causes that kind of error?
22:03 japhb Oh I see it:   Non-zero wait status: 11
22:03 japhb Missed that the first time.  Must be dying after the tests have all run ....
22:05 jnthn maybe some cleanup explosion, though Moar tends to Just Call exit(0) And Be Done...
22:05 jnthn ('cus the OS can surely clean up faster than we can)
22:06 jnthn Maybe Inline::Perl5 has some END block where Perl 5 things get cleaned up a bit though.
22:08 jnthn 'night, #perl6
22:08 japhb That wouldn't surprise me ...
22:09 lizmat good night, jnthn!
22:09 japhb .tell nine_ Please see http://irclog.perlgeek.de/p​erl6/2015-04-28#i_10520477 re: test failure during Inline::Perl5 install
22:09 yoleaux japhb: I'll pass your message to nine_.
22:09 japhb Good night, jnthn!
22:12 raydiak has anyone else spent much time thinking about how much a clean grammar looks like a template?
22:23 lizmat I guess not much  :-)
22:29 TimToady well, now I feel a little stupid; I've been putting off fixing the windshield wiper on my '88 Honda because I thought it was broken, but it turned out to just be a loose nut, and I coulda "fixed" it a month ago...
22:29 dalek rakudo/nom: 452504e | lizmat++ | src/Perl6/World.nqp:
22:29 dalek rakudo/nom: s/\$\*W/self/ where possible in World
22:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/452504eabf
22:29 TimToady I have a button somewhere that reads, "Larry Wall, Honda Mechanic"
22:29 TimToady I guess I'll need to turn that back in...
22:30 lizmat well, maybe you don't need it there anymore ?
22:30 lizmat it being the wiper  :-)
22:30 TimToady hey, it's rained here three times in the last year, at least!
22:36 lizmat wow!
22:37 lizmat that's not a lot  :-(
22:42 timotimo lizmat: i think i'll measure how many cpu instructions we save by using self instead of $*W there
22:42 telex joined #perl6
22:42 dalek rakudo/nom: f4ff0a8 | lizmat++ | src/Perl6/ (2 files):
22:42 dalek rakudo/nom: Move import_EXPORTHOW to World
22:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f4ff0a873f
22:43 dnmfarrell joined #perl6
22:43 lizmat timotimo: that's not really the reason I'm doing it...
22:44 timotimo but i'm still interested :)
22:45 lizmat well, any gain would be great  :-)
22:45 timotimo what's your foremost motivation for that commit?
22:46 diana_olhovik_ joined #perl6
22:47 dnmfarrell Hey y'all I'm having some trouble with grammars and action classes. I coudl be wrong but it appears if you call Grammar.parse($string, :$actions); the action object is ignored. If you call Grammar.parse($string, :actions($actions)); it uses the action object, but croaks if the action object class uses any regex. Any suggestions?
22:48 lizmat timotimo: moving all the code that has to do with module loading into one place
22:48 timotimo ah
22:48 timotimo fair enough
22:48 lizmat so it can be worked on better (by me)
22:54 raydiak m: grammar G { token TOP { . } }; class A { method TOP ($/) { say ~$/ } }; my $actions = A.new; G.parse: 'x', :$actions;
22:54 camelia rakudo-moar 452504: OUTPUT«x␤»
22:55 raydiak dnmfarrell: a gist might be helpful here
22:55 dnmfarrell raydiak: thanks I'll do that
22:56 dalek rakudo/nom: 59b8935 | lizmat++ | src/Perl6/ (2 files):
22:56 dalek rakudo/nom: Move add_package_declarator to World
22:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/59b8935677
22:56 lizmat and with that, I've changed World enough for today  :-)
22:56 lizmat good night, #perl6!
22:57 raydiak 'night Worldhacker lizmat++
23:00 labster good job lizmat++, night
23:01 dnmfarrell raydiak: https://gist.github.com/dnmf​arrell/47e413f4bd27f2c24eda
23:01 dnmfarrell Maybe my code is wrong ...
23:01 timotimo yes, of course
23:02 timotimo you're passing $action as the named parameter "action" in one case, "actions" in the other
23:02 timotimo methods don't complain about keyword arguments that they don't have an interest in
23:02 timotimo so you don't get a warning for that
23:02 timotimo er, i didn't mean "yes, of course your code is wrong"
23:04 dnmfarrell timotimo: so the variable name must match the parameter name in order to use a positonal?
23:04 raydiak dnmfarrell: you have :$action ...with no s...but the name of the paramter you need to pass is 'actions' with an s
23:04 raydiak so you are passing :action($action)
23:05 dnmfarrell but the variable name is $action, not $actions. Does it need to be renamed to $actions?
23:05 raydiak yes, or do it with :actions($action) like you have the 2nd way
23:05 dnmfarrell raydiak: ok, thanks, that explains the not executing part :)
23:06 raydiak the other part is that regen use $/
23:06 raydiak long story short, use method TOP ($/ is copy) and that other problem will go away
23:06 raydiak ^^regexen*
23:07 dnmfarrell raydiak: but why does that cause a problem as $/ is not part of the regex statement?
23:07 muraiki joined #perl6
23:08 raydiak regexes put the match in $/ implicitly
23:08 dnmfarrell or is that the long story ... :) ?
23:08 TimToady raydiak: jnthn++ has already given a talk a couple years ago on using a grammar as a generator
23:08 raydiak b/c you pass $/ in it's read-only unless you use 'is copy' or 'is rw', so when the regex inside runs and tries to assign its match to $/, it blows up
23:08 cognominal joined #perl6
23:08 dnmfarrell ohhhhh
23:09 raydiak TimToady: thanks, I'll look around for that
23:09 dnmfarrell raydiak: thanks so much, that clears it up
23:09 raydiak dnmfarrell: you're quite welcome :)
23:09 skids joined #perl6
23:18 raydiak dnmfarrell: note you can totally call that param whatever you want e.g. $match, doesn't have to be $/, and then regexes inside the action work without 'is copy'; it's just common to pass it in as $/, because then you can write $0 or $<subrule> instead of $match[0] or $match<subrule>
23:24 raydiak but if you call it something else, then you can still get to the original match object you were passed after you run a regex...like if you do method TOP($/ is copy) { $0 ~~ /foo/; say $0 }, the thing passed to say will always be undefined, because now you're talking about $0 from the /foo/ instead of the match you were passed in
23:26 * raydiak sometimes wonders if he'd be better off writing books
23:28 raiph joined #perl6
23:34 alini joined #perl6
23:35 muraiki what's a good resource for learning how to make nested hashes in perl6?
23:35 muraiki I'm looking at http://doc.perl6.org/language.html but kind of lost, heh
23:36 BenGoldberg joined #perl6
23:37 TimToady that should work pretty much the same way as in Perl 5
23:37 muraiki p6: my %n = foo => (x => 1, y => 2); %n<foo><y>;
23:37 camelia rakudo-moar 59b893: OUTPUT«Unhandled exception: postcircumfix:<{ }> not defined for type Parcel␤   at src/gen/m-CORE.setting:14568  (/home/camelia/rakudo-inst-2/share/perl6​/runtime/CORE.setting.moarvm:throw:121)␤ from src/gen/m-CORE.setting:16445  (/home/camelia/rakudo-inst-2/sh…»
23:38 muraiki I imagine that I'm doing something dumb
23:38 TimToady m: my $h = { a => { x => 1, y => 2 }, b => { z => 3 } }; say $h<a><y>
23:38 camelia rakudo-moar 59b893: OUTPUT«2␤»
23:38 muraiki ah
23:38 TimToady use {} instead of ()
23:38 japhb TimToady beat me to it.  :-)
23:38 muraiki and he also thought of making it spell out hay :)
23:39 TimToady m: my %h = a => { x => 1, y => 2 }, b => { z => 3 }; say %h<a><y>
23:39 camelia rakudo-moar 59b893: OUTPUT«2␤»
23:39 TimToady m: my %h = a => { x => 1, y => 2 }, b => { z => 3 }; say %h<a><x>
23:39 camelia rakudo-moar 59b893: OUTPUT«1␤»
23:39 muraiki should I prefer one form over the other?
23:40 TimToady depends on whether you want a % or a $
23:40 muraiki yeah, I guess it depends on the situation. thanks :)
23:43 tinyblak joined #perl6
23:50 TimToady well, and whether you use = or :=

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

Perl 6 | Reference Documentation | Rakudo