»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
00:02 skids joined 00:03 tinyblak joined 00:25 laouji joined 00:28 tinyblak left 00:32 gfldex left 00:37 laouji left 00:38 laouji joined 00:42 laouji left
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
on a scale from 3 to pi how much of a math nerd am I? :)
the program writes out one digit at a time, it looks like it would make a nice screensaver 00:47
colomon :) 00:49
00:53 laouji joined, aindilis joined 00:54 dayangkun joined 00:55 dayangkun left, dayangkun joined 00:58 dnmfarrell joined
dnmfarrell m: say "match!" if 'HTML' ~~ m/HTML/; 01:00
camelia rakudo-moar b6b180: OUTPUT«match!␤»
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
camelia rakudo-moar b6b180: OUTPUT«「a」␤»
skids was pondering de-underscoring the IETF grammar modules. (IETF uses hypens in the RFC). 01:02
01:03 raiph left 01:05 aindilis left
dalek kudo-star-daily: 68607ca | coke++ | log/ (2 files):
today (automated commit)
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
skids dnmfarrell: what are you working on? 01:19
01:21 cognominal left
dnmfarrell skids: A pod to HTML action class for this grammar: github.com/dnmfarrell/Pod-Perl5/bl...Grammar.pm 01:29
skids Oh cool. 01:30
skids wonders if perl5 pod could be hooked into .WHYs when used via Inline::Perl5. 01:31
dnmfarrell skids: interesting idea :)
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:33
skids: what are you working on? 01:36
skids I'm just sort of "knitting" right now, transcribing rules from RFC7230 01:37
01:39 raiph joined 01:41 jack_rabbit joined 01:44 jack_rabbit left, jack_rabbit joined 01:46 ilbot3 left, tinyblak joined 01:48 bayprogrammer joined 01:53 slavik1 left 01:55 ilbot3 joined, jack_rabbit left 01:57 jack_rabbit joined 02:01 jack_rabbit left 02:04 jack_rabbit joined 02:08 tinyblak_ joined, tinyblak left 02:11 jack_rabbit left 02:13 rmgk left 02:14 chenryn joined 02:20 rmgk joined 02:28 raiph left 02:38 raiph joined 02:45 rmgk left 02:48 rmgk joined 02:54 dnmfarrell left 02:55 telex left, noganex joined, pierrot left 02:56 telex joined
timotimo p6weekly.wordpress.com/2015/04/28/...-glr-work/ finally published 02:57
i shouldn't have played so much of that video game ... again ...
dalek k-simple: 6f5fdfb | timotimo++ | lib/GTK/Simple.pm6:
We use a bunch of nqp ops directly in here.

we have to declare that nowadays.
02:58
02:58 noganex_ left
skids timotimo: which game? 03:01
03:01 pierrot joined
skids timotimo++ for weekly. Though, you missed windows-1252 codepage support ;-) 03:07
03:18 tinyblak_ left, tinyblak joined
labster timotimo++ for the weekly (though I kinda hoped you would mention rakudo a96118dc8 from me) 03:22
03:23 tinyblak left
labster skids: we are ignored :) 03:23
skids He must have picked the game controller back up :-) 03:24
ugexe skids if youre doing grammar for 7230 this might be handy github.com/ugexe/Perl6-IETF--RFC_G...FC_Grammar 03:25
skids ugexe++ 03:26
labster at some point, you just gotta stop reading git log and post (and game)
skids ugexe: you'e been busy 03:27
03:28 cschwenz joined
ugexe the power of caffeine and ocd 03:29
03:31 konsolebox joined 03:32 adu left
skids ugexe: Maybe we could talk to FROGGS++ about membership in perl6-community-modules and consolodate 3968 03:41
03:42 vendethiel joined, laouji left
skids Also could be fun to play with tadzik's new BNF translator. 03:42
03:47 tinyblak joined 03:54 chenryn left 04:01 koo6 left
BenGoldberg m: say( 0 + ' 1/7' ) 04:01
camelia rakudo-moar b6b180: OUTPUT«0.142857␤»
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 04:10 BenGoldberg left 04:22 skids left 04:43 laouji joined
flussence m: say unival('⅐') 04:45
camelia rakudo-moar b6b180: OUTPUT«0.142857␤»
04:47 laouji left 04:49 laouji joined 04:53 cschwenz left 04:57 laouji left 04:58 laouji joined, vendethiel left 05:07 vendethiel joined, cschwenz joined 05:15 alini joined, chenryn joined 05:17 cschwenz left 05:20 chenryn left 05:21 yeahnoob joined 05:22 chenryn joined 05:28 vendethiel left 05:32 cschwenz joined
TimToady m: say unival('⅐').perl 05:33
camelia rakudo-moar b6b180: OUTPUT«<1/7>␤»
TimToady note it's actually a Rat, not an approximation
05:36 vendethiel joined 05:40 colomon left 05:42 kaare_ joined 05:45 Psyche^ joined 05:49 Patterner left 05:52 laouji_ joined
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-…»
cschwenz p6: say( 0 + '⅐' )
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…»
cschwenz m: say( 0 + unival('⅐') )
camelia rakudo-moar b6b180: OUTPUT«0.142857␤»
05:55 laouji left 05:56 _mg_ joined, cschwenz left 05:57 laouji_ left 05:58 laouji joined 05:59 vike joined, vendethiel left 06:01 raiph left 06:02 diana_olhovik joined 06:04 raiph joined, jack_rabbit joined
cdc timotimo: 2014.16 -> 2015.16 06:09
06:16 domidumont joined 06:19 FROGGS joined 06:20 domidumont left 06:21 alini left, domidumont joined
FROGGS o/ 06:23
nwc10 \o
06:26 colomon joined 06:39 vendethiel joined 06:41 gfldex joined 06:55 RabidGravy joined 07:02 vendethiel left 07:07 darutoko joined 07:08 rindolf joined 07:09 Ven joined
Ven \o, #perl6! 07:09
masak morning, #perl6
jnthn morning all o/ 07:10
jnthn caught up on backlog :)
TimToady o/
jnthn Also resolved the RT about grapheme-level reasoning since it's in
We can open more specific tickets about more specific issues :)
07:11 jack_rabbit left
jnthn m sub f(|$everything) { say $everything.perl }; my %h = :a, :b, :!c; f(%h) 07:11
m: sub f(|$everything) { say $everything.perl }; my %h = :a, :b, :!c; f(%h)
camelia rakudo-moar b6b180: OUTPUT«Obsolete use of | or \ with sigil on param $everything␤\(:a, :b, :!c)␤»
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)␤»
jnthn That looks wrong...
and I'd hoped the .map not flattening change would magically fix it :) 07:13
Oh, unless that .map got changed to a .for :P
07:13 zakharyas joined 07:14 gfldex left
jnthn thinks he has a fix :) 07:15
Hopefully a nice easy RT for breakfast :) 07:16
TimToady has been experimenting with making for loops non-flattening by default 07:17
07:18 Rounin joined
moritz TimToady: that's rather exciting 07:18
TimToady not always in the positive sense :) 07:19
moritz well
the current state of list (non)-flattening isn't particularly exciting in the positive sense either 07:20
07:20 brrt joined
TimToady I've discovered several ways not to do it already :0 07:20
brrt \o
07:20 Tux__ joined, dwarring left 07:21 |Tux| left 07:23 xfix joined, xfix left, xfix joined
lizmat good *, #perl6! 07:28
timotimo++ for the P6W
m: (^10).rotor(1,2).perl.say # old behaviour does *not* work anymore
camelia rakudo-moar b6b180: OUTPUT«((0,), (1, 2), (3,), (4, 5), (6,), (7, 8), (9,))␤»
lizmat timotimo: ^^ 07:29
07:30 jack_rabbit joined
dalek kudo/nom: 71d6480 | jnthn++ | src/core/Capture.pm:
Ensure Capture.perl doesn't flatten in hashes.

Fixes RT #114100.
07:42
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=114100
dalek ast: 50dbbdf | jnthn++ | S02-types/capture.t:
Test for RT #114100 (Capture.perl flattening bug).
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=114100
jnthn Back down to 670 tickets :) 07:43
brrt \o/ 07:44
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?
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
fair
TimToady or deal with the args downstreadm
so, for instance, 'for @a X @b -> ($a, $b) {...}' using parens 07:46
is an alternative to 'for flat @a X @b -> $a, $b {...}'
we speculated that 'for flat' might be 'foreach' earlier 07:47
if we decide we want the sugar
07:47 Tux__ left
brrt i think for flat is actually clearer 07:47
07:47 Tux__ joined
TimToady anyway, .for will not be the flattening alternative to .map 07:49
07:50 laouji_ joined, laouji left 07:51 tinyblak_ joined 07:53 domidumont left, laouji_ left 07:54 tinyblak left
Ven TimToady: I'm not sure I get it. isn't `for` supposed to flatten in the GLR? 07:55
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 gist.github.com/lizmat/ea3b3e842aa3e4f5d7ee and tell me if I'm on the right track ?
07:57 jack_rabbit left, fhelmberger_ joined 08:00 fhelmberger left 08:01 cschwenz joined
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
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
jnthn lizmat: So I think you may end up with the scope escaping
FROGGS: It *is* per block already
FROGGS ohh
jnthn That's how I got things like "use fatal" to behave lexically :)
FROGGS yeah, I see
jnthn It's just htat all the ones I did so far are just boolean flags
Which are really values
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
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.
lizmat so you're saying, it's the wrong approach ?
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?
jnthn lizmat: It clones %*PRAGMAS - one level deep
08:05 fhelmberger_ left 08:06 fhelmberger joined
lizmat ah, ok 08:06
jnthn unless $INC { %*PRAGMAS<INC> := $INC := nqp::list() }
This will create a list that is shared between all inner scopes
Instead you need to clone any existing list (nqp::clone), push into the clone, and bind the clone into %*PRAGMAS
Then it should work fine enough 08:07
lizmat ok, that makes sense :-)
(I think now :-) 08:08
08:08 laouji joined
jnthn FROGGS: For the perl6-valgrind-m did we get a way to give valgrind args? 08:09
FROGGS jnthn: timotimo proposed to use an env var for that 08:10
so, not yet 08:11
08:11 donaldh joined
jnthn k 08:11
FROGGS you'd have to tweak tools/build/create-moar-runner.pl for that
jnthn well, or I can hack the generated script ;) 08:12
FROGGS bah
that's lame :P
08:13 dayangkun left
jnthn That's me :P 08:13
FROGGS hehe
08:13 koo6 joined 08:14 domidumont joined
TimToady okay, I've pretty much got it passing all the tests with non-flattening 'for'. Do I push it? 08:15
it will likely have more effects on the ecosystem
but we've already sort of bitten that bullet this time anyway...
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
jnthn Yeah 08:17
We're a long way from the next monthly.
TimToady I feel pretty good about it, and I think it's cleaner
jnthn OK
I think let's go for it.
TimToady it's a couple large commits, so easy to back out if necessary
FROGGS .oO( to quote Salt'n'Pepper: Ahhh Sssss Push It ) 08:18
dalek kudo/nom: 04cc1d5 | TimToady++ | src/core/ (16 files):
pervasive changes for non-flattening for loops

  (It's possible we can remove some of the .flats here or there without
damage, but I erred on the side of caution on some of them.)
ast: ee79237 | TimToady++ | / (8 files):
tweaks for new non-flattening for loop
08:18 dayangkun joined
FROGGS so, I have to 'for flat 1, 2, 3 {' ? 08:19
TimToady no
jnthn You'd have to for flat @a, @b { ... } though?
TimToady yes
FROGGS k
jnthn Gotcha.
lizmat TimToady: did you realize that SLICE.pm is generated ?
TimToady oh, well... :)
jnthn This is what happens when you generate things :P 08:20
TimToady feel free to upstream any changes there
FROGGS ahh, makeSLIVE.pl6 08:21
08:21 larion joined
FROGGS SLICE* 08:21
I'll do it
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
TimToady thanks
lizmat FROGGS++
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 :)
*help
TimToady I hope so
08:22 colomon left
jnthn "make test" works here with it :) 08:23
08:23 andreoss joined, colomon joined
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:23
jnthn I'll kick off a run 08:24
I did one recently
08:24 psch left
TimToady and if it *is* my fault, I'm going to bed :) 08:24
lizmat good night, TimToady
08:24 psch joined
jnthn :) 08:24
'night, TimToady++
masak wait, we don't know if it is his fault yet :P
TimToady oops 08:25
lizmat ah, I thought that was a given :-)
masak haha
08:25 Ven left
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.
masak .oO( respect your elders... )
TimToady lizmat++ firm grasp of history
08:26 pmichaud joined 08:27 andreoss` joined
dalek kudo/nom: 4fafbe8 | FROGGS++ | / (2 files):
move changes to SLICE.pm@04cc1d52c5 to makeSLICE.pl6
08:28
08:28 sqirrel joined 08:29 andreoss left 08:32 RabidGravy left, dakkar joined 08:36 wryk joined
jnthn I see a regression in integration/advent2010-day06.t 08:37
08:38 wryk left, RabidGravy joined
jnthn Otherwise looks good. 08:38
08:38 wryk joined
TimToady forgot to check in that one 08:38
jnthn ah :)
dalek ast: e0193f5 | TimToady++ | integration/advent2010-day06.t:
more for loop damage
lizmat afk for a few hours& 08:39
08:42 alini joined
itz raydiak: thanks I'll have another look later 08:43
08:43 brrt left 08:44 espadrine joined
dalek line-Python: 9838e88 | (Stefan Seifert)++ | lib/Inline/Python.pm6:
Only create wrappers for methods with a legal Python name

  ^methods nowadays lists
  -> (Mu:D \fles: *%_) { #`(Method+{<anon>}|109046056) ... }
which obviously cannot be used as a method name in Python.
Since a Perl 6 subclass of a Python class may want to use names that would not be legal in Python (e.g. hypenated-names), it's good to filter those anyway.
08:47
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:48
08:49 cschwenz left
TimToady darn it, I have to stay up then... :) 08:49
(actually, still backlogging last night; was too busy hacking (and writing a Collision talk) to backlog during the day 08:50
)
nwc10 is Gloria away?
TimToady no, she's sleeping right here, but she's not a night owl like me
and I type quietly
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
but I guessed wrong this time.
RabidGravy I'm not sure that the Channel.list is entirely "thread safe"
gist.github.com/jonathanstowe/fe57...490a529f68
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:53
or even occasionally "Unhandled exception: This representation (Null) does not support elems" 08:55
08:55 Ven joined
dalek pan style="color: #395be5">perl6-examples: 8b6054a | TimToady++ | categories/shootout/n-body-v2.p6:
s/\.for/\.flatmap/

since .for is not longer the flattening variant of .map
08:57
Ven jnthn: right. this was one of touchy things when I wrote the learnx
Ven actually had put up the GLR-style flattening explanation for a while, but extracted it into an issue eventually 08:58
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
TimToady .flatmap is already optimized 08:59
Ven are we still going to have a .for then?
TimToady so it could optimize to that
08:59 pecastro joined
Ven TimToady: very glad to hear that :-) 09:00
.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
one the abortive tries was to just use .map instead, but then it became impossible to distinguish 'for @foo' from 'for $foo'
Ven TimToady: it'd mean `for {}` is `.map` and `foreach{}` is `.flatmap`?
TimToady for {} is .for still, but probably should be hidden a bit better 09:02
since it has to do shenanigans to determine if a single argument is containerized 09:03
(to handle the 'for @foo' vs 'for $foo' issue
Ven is there any difference between .for and .map then? I feel like I'm missing something :-)
ah, so $for will unitemize the first level, always?
TimToady the problem with using bare .map was that by the time you get to the map method, the container info is discarded
no
for $foo is still itemized 09:04
unlike $foo.map
09:04 donaldh left, rjbs left
TimToady and for $foo, $bar is two items 09:04
09:04 rjbs joined
TimToady so it's still iterating the top level, taking into account containers, basically 09:04
you just can't use .flat internally for that, since .flat is recursive on sublists 09:05
09:06 SHODAN joined
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>
camelia rakudo-moar 4fafbe: OUTPUT«(Any)␤(Any)␤»
jnthn m: (do { say $_ }) for <1 2>
camelia rakudo-moar 4fafbe: OUTPUT«(Any)␤(Any)␤»
jnthn Got those fixed and also blockless gather :)
Now for le spectest...
TimToady cool, thanks
jnthn TimToady: They weren't recent regressions, to be clear. Busted for a bit. 09:07
TimToady: I did have to change the test case from RT #111962 though
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=111962
jnthn It does this:
for [-1,-1],[+0,-1],[+1,-1],
[-1,+0],( ),[+1,+0],
[-1,+1],[+0,+1],[+1,+1];
Which is very pretty but that empty (...) upsets things now 09:08
DrForr Someone's writing GoL in perl6 :)
jnthn So I just replaced it with whitespace
TimToady that works, or so would a flat, though maybe with whitespace they could be () now instead of [] 09:09
09:10 Tux__ left
TimToady -> for flat 8 hours... 09:10
jnthn :)
o/
09:12 |Tux| joined
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
m: say "bbaa" ~~ m/aa & bb/;
camelia rakudo-moar 4fafbe: OUTPUT«False␤»
DrForr I only see & in the context of character classes. 09:16
nbdsp Ahh... Is there another way to do something like this? 09:17
Only grammar?
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
That is, it doesn't scan the string again.
So this matches the 'aa' and then tries to see if the same chars match 'bb' and of course they don't. 09:18
m: say "bbaa" ~~ /aa/ & /bb/ # one way 09:19
camelia rakudo-moar 4fafbe: OUTPUT«True␤»
FROGGS m: say 'bbaa' ~~ / [ 'aa' | 'bb' ]+ / # might that be enough?
camelia rakudo-moar 4fafbe: OUTPUT«「bbaa」␤»
DrForr Matches 'bbbb' as well.
FROGGS true
DrForr reads up on documentation specs in order to package up Readline for public consumption. 09:20
nbdsp m: say "bbccaa" ~~ /aa/ & /bb/
camelia rakudo-moar 4fafbe: OUTPUT«True␤»
09:21 cschwenz joined, cschwenz left
jnthn nbdsp: If that isn't what you want either then & of either kind is probably the wrong tool for the job :) 09:21
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」␤»
jnthn Yeah
nbdsp I misunderstood the usage of &
jnthn my token any-order($a, $b) { $a$b || $b$a }; say 'aabb' ~~ /<any-order('aa', 'bb')>/ # maybe :) 09:24
m: my token any-order($a, $b) { $a$b || $b$a }; say 'aabb' ~~ /<any-order('aa', 'bb')>/ # maybe :)
camelia rakudo-moar 4fafbe: OUTPUT«「aabb」␤ any-order => 「aabb」␤»
Ven I wonder what will happen with the reduce meta-op due to that "new glr model" 09:25
nbdsp Jnthn: thanks! 09:27
But with more groups it grows exponentially
jnthn Yeah, that's trickier :) 09:29
I don't immediately have a nice solution.
dalek kudo/nom: 5774ac0 | jnthn++ | src/Perl6/ (3 files):
Start giving statements an ID.

Also tag blocks pushed while compiling that statement with the ID. Will be used for fixing various thunking scoping bugs.
kudo/nom: 0ffe68f | jnthn++ | src/Perl6/Actions.nqp:
Toss unused parameter.
kudo/nom: c5d7aa0 | jnthn++ | src/Perl6/Actions.nqp:
Fix scoping bugs with s.m. for and given.

  "try { say $_ } for ..." and "try { say $_ } given ..." did not move
the blocks into the thunk generated for for/given, so we looked up the wrong $_.
kudo/nom: 4a8a61f | jnthn++ | src/Perl6/Actions.nqp:
Make blorsts migrate blocks into thunks.

This fixes various bugs with e.g. block-less gather working wrongly when adding a block worked.
ast: 47400f0 | jnthn++ | S04-statements/gather.t:
Test for RT #111962.
09:30
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=111962
nbdsp I thought it's a somewhat standard task. Will think how to accomplish in other way. 09:31
09:31 itz_ joined 09:32 Tux__ joined, |Tux| left
DrForr token x{ 'a' & 'baab' } # Hrm. 09:32
09:33 Tux__ is now known as |Tux| 09:35 andreoss` left, andreoss` joined
Ven .tell eli-se echo "require-sandbox: True" >> ~/.cabal/config 09:36
yoleaux Ven: I'll pass your message to eli-se.
DrForr TINC
|Tux| moar speed still not super, but slowly returning to what it was 6 days ago (as in: better than yesterday) 09:41
09:43 Ven left
FROGGS m: { say 42 } if True 09:43
camelia ( no output )
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?
FROGGS I.. I guess so 09:45
jnthn m: { say 42 } for ^5
camelia rakudo-moar 4fafbe: OUTPUT«42␤42␤42␤42␤42␤»
jnthn Hmm
Well, it's inconsistent at least.
FROGGS it should .sink it, right?
jnthn Nothing to do with .sink
FROGGS okay
jnthn the parse is <EXPR> followed by statement modifiers
and an EXPR { say 42 } normally just becomes a closure
09:46 nbdsp left
jnthn It seems for special-cases it so it says "oh, EXPR is a block, I'll magically call it" 09:46
Grr
FROGGS O.o 09:47
FROGGS .oO( I'm sorry )
jnthn Turns out the blorst fix I did was fine but there's something wrong with for/given modifier one :/
09:47 fhelmberger left
jnthn It looked like it worked 'cus I had a one line script and it worked for that :S 09:48
FROGGS yeah, I know that feeling 09:49
09:51 fhelmberger joined
masak same thing happened for me with the .indent thing yesterday 10:05
I had one test file passing, but then I got failures in the spectests
yes, it's "Grr" -- but it's also "thank you, spectests! keep up le good work!"
10:10 Akagi201 joined, rarara joined
jnthn RT #100746 10:12
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=100746
jnthn RT #122306 10:16
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122306
10:20 yeahnoob left 10:23 alini left 10:24 RabidGravy left 10:25 _mg_ left
timotimo labster: i mentioned that commit in the previous weekly already :) 10:28
dalek kudo/nom: 709b77d | jnthn++ | src/Perl6/Actions.nqp:
Fix thinko in block migration predicate check.
10:29
kudo/nom: cd53104 | jnthn++ | src/Perl6/Grammar.nqp:
Start statement ID at 1 to avoid bogus matches.
ast: 8c29100 | jnthn++ | S04-statement-modifiers/ (2 files):
Tests for RT #111704.
10:30
ast: 59e1e9d | jnthn++ | S04-statement-modifiers/ (2 files):
Unfudge tests for RT #100746.
ast: 93e1675 | jnthn++ | integration/advent2011-day23.t:
Unfudge test for RT #122306.
10:30 yogan left 10:31 sqirrel left
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=111704 10:33
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=100746
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122306
10:34 nine_ joined, yogan joined, telex left 10:35 telex joined, chenryn left, telex left 10:36 telex joined, Akagi201 left
dalek ast: f2b5f0d | jnthn++ | S04-statements/gather.t:
Unfudge now-passing test for RT #117635.
10:37
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=117635
10:38 dayangkun left
dalek ast: b1648de | jnthn++ | S04-statements/try.t:
Unfudge another RT #111704 test.
10:39
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=111704
jnthn There's another bunch of RTs down
masak jnthn++ 10:41
FROGGS jnthn++ 10:42
masak meh, neither of those were my RT tickets :P
10:43 rurban joined
jnthn masak: None of the 7 I fixed today so far were yours? Wow :P 10:43
masak oh, I meant the last two. 10:44
7 is good going.
here, have some more karma: jnthn++
FROGGS hour hero :o)
our*
masak this regardless if some of those were mine, OR if you managed to find 7 that were not mine :P
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.
jnthn lunch, bbs :) 10:50
10:51 nbdsp joined 10:52 fhelmberger left 10:58 fhelmberger joined 10:59 alini joined 11:03 _mg_ joined 11:15 wryk left 11:16 fhelmberger left 11:20 Vlavv left 11:21 Ven joined
lizmat I've had some thoughts about going further with module loading: gist.github.com/lizmat/c7f53fa206da900c2b42 11:22
comments greatly appreciated !
11:23 vendethiel joined
Ven timotimo: .tell the? 11:23
timotimo hah 11:24
.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 :)
yoleaux timotimo: I'll pass your message to skids.
timotimo thank you, ven
nine_ lizmat: great to see you working on module loading :) 11:26
11:26 fhelmberger joined
lizmat yeah, the session with you at the QAH was inspiring :-) 11:26
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
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.
lizmat I've thought about that too 11:29
nine_ lizmat: in essence: have placeholder CompUnitRepos that lazily upgrade themselves
lizmat but that wouldn't solve the -I. issue
nine_ That would hide the performance hack from the language user
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
in P6, -I. will freeze on whatever the current dir is at the time
(well, at the moment, afaik)
Ven is now building .net on his macbook 11:31
maybe this mac will get mad at me for that :/
FROGGS timotimo++ # blog
nine_ lizmat: you mean perl -I. -e 'use Foo; BEGIN { chdir "/tmp" }; use Bar;' will find Bar.pm in /tmp? Didn't know that :)
Ven timotimo++ # blug
timotimo thank you :)
lizmat that's how it works in P5, adaik
*afaik
timotimo you shouldn't praise me if my blog comes out so late :P
nine_ lizmat: is that a bug or a feature?
lizmat: as a user, this seems highly surprising to me :) 11:32
lizmat people consider this a feature, afaik
FROGGS timotimo: well, it is still good :o)
Ven timotimo: why not?
nine_ Is . a special case or is this rather true for all relative paths?
lizmat it's for all relative paths 11:33
and I just checked, and it does work that way :)
nine_ me, too :)
lizmat $ perl6 -I. -e 'use Foo; BEGIN { chdir "/tmp" }; use Bar' 11:34
Foo
===SORRY!===
Could not find Bar
.oO( a nice example of code that doesn't change between P5 and P6 )
11:35
nine_ How do strings in @?INC solve this?
lizmat because before being used as a key, they will be absolutified
and that key will be used to search for the CompUnitRepo, rather than what's in @?INC 11:36
nine_ Ah, of course
Ven m: my @a; @a[15..*] = 1, 3...*; @a[0..10] = 0, 2 ... *; say @a;
camelia rakudo-moar cd5310: OUTPUT«0 2 4 6 8 10 12 14 16 18 20␤»
lizmat it's up to the CompUnitRepo implementation to decide what absolutify does
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␤»
lizmat for Local::File/Installation, it would be .IO.abspath
nine_ lizmat: but couldn't a CompUnitRepo that's initialized with a relative path do abspath for every access as well?
lizmat for Local::File that could be, but for Local::Installation they would be 2 different databases 11:38
so 2 different objects
CompUnitRepo::Local::Installation objects 11:39
nine_ I guess include paths would usually point to Local::File?
lizmat yes, that is the default for -I
you could do: -Iinst:.
which would indicate a CURL::Installation type of object 11:40
-I. is short for -Ifile:.
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
lizmat think: parameter to script to run different versions of modules ? 11:41
jnthn back
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:.
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.
lizmat well, I can live without that feature, for sure 11:45
11:45 xinming joined
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
I'm really curious who uses this "feature" and for what :) 11:46
lizmat I believe [Tux] might be able to explain better
|Tux| what? 11:47
lizmat the use of -I. in Perl 5 11:48
that it is relative to the current cwd()
11:48 colomon left
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?
|Tux| iirc (but do not tie me to it) there have been circumstances related to security that excluded . from @INC
lizmat well, yeah :-) don't use -I. if you want security 11:49
jnthn: good point, I will try to address that
FROGGS jnthn: IIRC TimToady said that @[*?]INC is not the right pig to hang that off
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
jnthn FROGGS: Hm, ok 11:50
FROGGS though, I don't know about details
|Tux| would ask leont first :)
nine_ TimToady++ will probably be in flat land for 5:20 hours more... 11:51
|Tux|: in progress 11:52
jnthn FROGGS: Just found the bit in S04 about { say $^x } if foo(); :) 11:55
11:58 colomon joined, wryk joined
nine_ metacpan.org/pod/rlib 11:58
FROGGS jnthn: and it should run it? 12:00
12:00 Ven left
[ptc] m: for <a b c d> -> $a, $b { say $a; say $b } 12:01
camelia rakudo-moar cd5310: OUTPUT«a␤b␤c␤d␤»
[ptc] m: for <a b c d> -> $a, $b { say $a }
camelia rakudo-moar cd5310: OUTPUT«a␤c␤»
[ptc] m: for <a b c d> Z <w x y z> -> $a, $b { say $a }
camelia rakudo-moar cd5310: OUTPUT«a w␤c y␤» 12:02
jnthn FROGGS: Yes. 12:03
FROGGS: And we've an RT for it
FROGGS cool :o)
jnthn Working on it now.
dalek pan style="color: #395be5">perl6-examples: 7b3c280 | paultcochrane++ | categories/wsg/advanced-2008/event002-eric256.pl:
Input file location now independent of run location
perl6-examples: f3d5a86 | paultcochrane++ | categories/wsg/advanced-2008/event005-eric256.pl:
perl6-examples: No longer looping indefinitely
12:03 dalek left
lizmat added a "depth-first vs breadth-first" paragrapth to gist.github.com/lizmat/c7f53fa206da900c2b42 12:03
12:04 dalek joined, ChanServ sets mode: +v dalek
lizmat nine_ FROGGS ^^ 12:04
FROGGS looks
so, a 'require lib $path; require Bar' won't be supported eventually? (dunno how useful it is anyway) 12:06
lizmat require lib $path ? 12:07
12:07 chenryn joined
FROGGS the clean way of saying: unshift @*INC ... 12:07
lizmat well, hmmm...
FROGGS just a thought... 12:08
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 vendethiel left
lizmat nine_: your local development is a CURL::File object: it ignores all auth/version settings and just checks the file system 12:08
basically, like P5
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 left, laouji joined
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?
lizmat the next in @?INC
FROGGS obtained via the next string in @?INC? 12:11
k
ahh, it even says so >.<
lizmat it's not that different from what we already have
FROGGS aye
lizmat except for using strings in @?INC and creating CUR objects on demand
and being able to handle relative path specs dynamically 12:12
which may or may not be a good thing :-)
FROGGS :o)
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?
lizmat yes
or warn and pick the first
FROGGS :/
lizmat or maybe not warn and just pick the first
FROGGS +1 :D
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
s/matches/doubles/
timotimo pick the first? so ... it'd prefer v1 over v2?
FROGGS depends if we stop after the first CUR found someting matching or not 12:16
timotimo: v2 over v1 hopefully
lizmat it would take the first it finds
however a CUR that implements, who cares
FROGGS the first in CURLF, but the best in CURLI
aye
lizmat the fact that there is more than one, indicates you don't care
12:16 cognominal joined
FROGGS that's not true 12:16
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 fhelmberger left
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
for production code, you must be as precise as possible in your "use" statements
12:17 fhelmberger joined
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
lizmat this will allow for trouble free upgrades of your system, as that code will continue to use whatever you indicated it should
even after an upgrade
FROGGS nine_: yes, and I want the one with the highest version, because this contains more bug fixes
lizmat or more bugs, who is to say ? 12:19
or may be incompatible?
that's why specifying ver(v1.2.+) is so dangerours
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?
FROGGS because of not yet known bugs
12:20 nbdsp left
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.
FROGGS that not what patch release are for
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
FROGGS lizmat: skim semver.org, then you know why I am talking about the third digit here only
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
packaging Perl 6 modules is going to be a pain anyway
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 :)
FROGGS s/choose/find out/
lizmat which may only get solved by having distribution specific CompUnitRepo implementations
nine_: please elaborate?
[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:26
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
masak just thought that difference was... interesting.
we don't seem to have a notion of "gradual dependency versioning".
lizmat because it has more dimensions ? 12:28
masak than types? :)
lizmat yeah :-)
masak how do you figure that? honest question.
s/honest/earnest/
lizmat because in types, you have one direction: type -> subtype 12:29
jnthn FROGGS: I see why you had fun ;)
masak ...which *branches*, types -> subtypes
lizmat in semantic versioning, you have at least three (major,minor,patch)
jnthn FROGGS: (on the if/unless patch)
masak ...which is one axis.
FROGGS *g*
jnthn FROGGS: Took me 2 tries to nail the thing, dammit :)
FROGGS jnthn: I'm eager to see your patch :o) 12:30
masak teaching again &
jnthn FROGGS: It's spectestin' now.
12:31 rurban left
lizmat masak: in an ideal world, higher would always be better 12:31
masak: unfortunately, that is not the case 12:32
but if the consensus is that if we have multiple candidates, it should always select the higher version one
I guess I can live with that, as that's the de-factor P5 behaviour anyway (from a sysadmin point of view)
perhaps we should also allow :ver(*..1.2) to indicate anything up to 1.2 ? 12:33
12:34 dnmfarrell joined
lizmat :ver(*..1.2,1.4..*) # don't do 1.3 12:34
1.3.x for that matter :-) 12:35
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?
FROGGS lizmat: every range object will do, besides specific version literals etc 12:38
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
lizmat: but whatever range one supplies is fine
12:40 laouji left
FROGGS like one can say that four letter words are awesome enough to do: use Foo:name(*.chars == 4) 12:40
it is not up to us to restrict that
s/name/auth/ 12:41
12:42 Foxcool_ left, Foxcool_ joined, Foxcool_ is now known as Foxcool, Foxcool left, Foxcool joined
lizmat well, major version numbers indicate a different API 12:43
FROGGS they are supposed to, yes
lizmat so that feels like asking for trouble if just saying "return the highest always"
FROGGS but if I say: use Foo, you do you want to limit that to a certain major release?
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
timotimo do we really expect negative version numbers?
if we don't, we should be fine without ranges that have * as a starting point 12:45
FROGGS timotimo: huh?
lizmat timotimo: I guess whatever in that context means 0
timotimo :)
m: my $range = *..10;
camelia ( no output )
timotimo ah, that works
never mind :)
lizmat m: (*..1.2,1.4..*).perl.say
camelia rakudo-moar cd5310: OUTPUT«(-Inf..1.2, 1.4..Inf)␤»
lizmat m: ((*..1.2) | (1.4..*)).perl.say 12:46
camelia rakudo-moar cd5310: OUTPUT«any(-Inf..1.2, 1.4..Inf)␤»
timotimo yes, i was about to say
anyway, gotta AFK now
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␤»
jnthn m: my $a; -> $i { $a += $i } for 1..3; say $a;
camelia rakudo-moar cd5310: OUTPUT«6␤»
jnthn I wonder if this one is actually allowed...
std: my $a; -> $i { $a += $i } for 1..3; say $a;
camelia std 28329a7: OUTPUT«ok 00:00 141m␤»
12:49 dnmfarrell left
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)
lizmat nine_: indeed, and I like KISS :-) 12:52
afk for a bit
jnthn std: my $a; sub ($i) { $a += $i } for 1..3; say $a;
camelia std 28329a7: OUTPUT«ok 00:00 142m␤»
jnthn m: my $a; sub ($i) { $a += $i } for 1..3; say $a;
camelia rakudo-moar cd5310: OUTPUT«6␤»
jnthn I don't think we can have that way in 'for' and the other way in 'given'
S04 only mentions bare blocks with placeholders as being invoke-y with the statement modifiers. 12:53
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
And see if anybody gets upset :)
12:58 RabidGravy joined
RabidGravy boing 13:01
13:01 nwc10 left, nwc10 joined 13:03 lucasb joined
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"
that "same auth" part is important, since different auths are likely to have sometimes wildly different versioning schemes. 13:04
13:04 chenryn left, nbdsp joined
masak what I just said is hopefully completely obvious to the people who are doing version handling nowadays. sorry about that ;) 13:04
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...
masak jnthn++ # thinking ahead
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
lucasb I think IO::Path is forbidden in restricted setting, but it's still possible to get one using dir().
13:07 lolisa joined
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:09
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:15
or maybe I'm over-thinking this 13:16
13:20 rurban joined 13:21 skids joined
dalek kudo/nom: b317d0a | jnthn++ | src/Perl6/Actions.nqp:
Fix '{ say $^x } given 42'.
13:21
kudo/nom: a5f38ae | jnthn++ | src/Perl6/Actions.nqp:
Implement bare block case of if/unless s.m.
ast: 8ab25b4 | jnthn++ | S04-statement-modifiers/ (3 files):
Tests for block s.m. given/if/unless.

Includes a test for RT #78142.
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=78142
lizmat masak: I could live with the "same auth" part, *if* an auth is specified of course ? 13:22
in any case, I hope TimToady will be able to sound in 13:23
once he unflattens :-)
jnthn: I was thinking or Parcelizing %*PRAGMAS<INC> and then binding that to @?INC 13:25
however, I seem to miss the magic incantation to do the latter :-(
$*W.add_string_constant(nqp::join(' ',$INC)) just doesn't cut it :-)
jnthn lizmat: No, that gets you a Str, not a Parcel 13:26
lizmat indeed, it was just for testing :-)
jnthn lizmat: Do you need to do this in CORE.setting?
lizmat: oh, but actually that probably doesn't matter
lizmat this is on Actions.nqp
so yes
jnthn lizmat: If you hve an NQP list then just hllize it
grep for hllizefor 13:27
lizmat ack
jnthn I forget how the ars go, it's like nqp::hllizefor('perl6', @nqp-list) or so
lizmat will find and try :-) 13:28
FROGGS the ars?
jnthn Then $*W.add_object(...) it to get it referenceable through a WVal, or use install_lexical_value or so
FROGGS: uh, args :)
FROGGS that's clearly state of the ars
jnthn
.oO( pain in the args )
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 left 13:32 smash joined 13:33 hobbs left 13:34 hobbs joined
RabidGravy btw, did anyone look at this gist.github.com/jonathanstowe/fe57...490a529f68 ? (you may need to run it a few times to get the full effect) 13:34
jnthn FROGGS: There's still 663 RTs :P
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.
RabidGravy coolio 13:36
13:36 baest_ joined, brrt joined
lucasb 'foo' x * currently creates a WhateverCode. Post 6.0 it will create a lazy infinite string or will stay this way? 13:39
[Coke] p6: say uniname(0x110000); 13:40
camelia rakudo-moar cd5310: OUTPUT«<unassigned>␤»
13:40 Vlavv joined
[Coke] j: say uniname(0x110000); 13:40
camelia rakudo-jvm cd5310: OUTPUT«<illegal>␤» 13:41
RabidGravy jnthn, it's a shame because it was the simplest example of multiple writers, multiple readers I could think of 13:42
:) 13:43
[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
13:45 lolisa left 13:46 muraiki joined
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␤»
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;␤»
brrt my @a = qw<a b c d>; @a.perl.say; 13:51
lizmat jnthn: if you have a min: gist.github.com/lizmat/d29fffcf2df73a823da5 # seem to be doing something wrong :-(
brrt m: my @a = qw<a b c d>; @a.perl.say;
camelia rakudo-moar a5f38a: OUTPUT«["a", "b", "c", "d"]<>␤»
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"]<>␤»
brrt aye
lizmat because you can't use () there:
my @a = q(a b c d); @a.perl.say
m: my @a = q(a b c d)
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
camelia rakudo-moar a5f38a: OUTPUT«["a", "b", "c"]<>␤»
lizmat so the error is LTA, I guess
jnthn lizmat: Oh, you're generating code to access the thing...rather than installing it
Hmm
lizmat jnthn: not sure what I'm doing there
[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?
jnthn lizmat: :P
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;
camelia rakudo-moar a5f38a: OUTPUT«1 5 3 6␤»
jnthn lizmat: Want what pre-compiled?
lizmat @?INC's contents 13:55
jnthn lizmat: Any @?FOO is gonna be.
brrt m: my @a = 1..4; @a[1] = 5; @a[3] := 6; say @a; @a[^2] = qw<a b>;
camelia rakudo-moar a5f38a: OUTPUT«1 5 3 6␤»
lizmat hmmm... then maybe @?INC isn't the right name after all
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>;
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␤␤»
lizmat I see %*PRAGMAS<INC> as the source for determining CUR search order
jnthn lizmat: In a particular lexical scope, yes? 13:57
lizmat yes
brrt thinks the code above is going to confuse so many people
lizmat use lib's effects should be lexical, like any 'use' is in Perl 6
jnthn lizmat: And it's a pragma so fixed at compile time?
lizmat eh, yeah,
jnthn lizmat: so I don't see a danger if it ends up serialized in the precomp? 13:58
lizmat: What case are you concerned about?
lizmat well, suppose I precomp it with -I. and run it without it ?
jnthn brrt: Um, I think only so many people will use binding :)
dalek p: 0fbba5f | coke++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
RT #124144 - make jvm give the same output as moar
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124144
brrt yeah, that is true
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.
lizmat: That is, it's a compiler flag.
lizmat I guess that's true
jnthn lizmat: If we don't want it that way, it needs to be PROCESS-y rather than lexical.
lizmat ok, so what do I need to do to get it to precomp
brrt i'm probably wrong in some subtle way, but i kind of dislike the whole container business
jnthn lizmat: But then lexical 'use lib' makes less sense.
14:00 nbdsp left
lizmat indeed 14:00
jnthn lizmat: imho, I'd not emit special code for @?INC
[ptc] jnthn: commit 709b77d seems to have caused some of the examples to stop working. Specifically those which use `gather for given first` constructions
any idea as to what I can do to fix the examples?
brrt i mean, i see why it's useful to have lvalues reified in some sense, but this is probably a huge pessimisation
lizmat jnthn: not sure what you mean, scratch @?INC altogether ?
[ptc] jnthn: meaning, I guess that I just have to add some braces somewhere (maybe) 14:01
14:01 FROGGS left
jnthn lizmat: Hmm, actually maybe you have the righter idea. :) 14:01
lizmat: These lines here are wrong: 14:02
+ $past := $*W.install_lexical_symbol(
+ $*W.cur_lexpad(),
+ '&?INC',
+ nqp::hllizefor(@INC, 'perl6')
+ );
I'd do someting like:
14:02 Ven joined
jnthn my $p6inc := nqp::hllizefor(@INC, 'perl6'); 14:02
$*W.add_object($p6inc);
[Coke] how to gen a new NQP version string for tools/build?
jnthn $past := QAST::WVal.new( :value($p6inc) );
[Coke]: git describe 14:03
14:03 vytas joined
lizmat jnthn: will try 14:03
Ven DrForr: are you done with your GoL?
jnthn [ptc]: Grumble, that means we're missing some spectests...
Ven assumed it was "game of life" and is probably wrong :P
jnthn [ptc]: Can you golf me an example that broke?
[ptc] jnthn: I can point you at specific examples
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].
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.
Ven ha, thanks for the details jnthn
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')> /␤»
[ptc] jnthn: github.com/perl6/perl6-examples/bl...rondilu.pl
jnthn OK, let's fix that'n...
[ptc] jnthn: the example contains expected output
lizmat $ 6l 'use cur <foo>; say @?INC.perl; { use cur <bar>; say @?INC.perl}; say @?INC.perl; use cur <baz>; say @?INC.perl'
("foo",)
("foo", "bar")
("foo",)
("foo", "baz")
:-)
DrForr (that's the Conway neighborhood of a square grid.)
[ptc] jnthn: I noticed that the new output has the first element of the gather duplicated, if that helps at all
DrForr I could write one, I suppose. 14:06
14:06 vendethiel joined
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
lizmat: You then can refernce the object in a QAST::WVal to talk about it at runtime.
lizmat ok, I guess we will find out whether that is a good thing or not in the future :-)
jnthn [ptc]: Hm, that's really not a very easy example for me to try and debug from. 14:09
[ptc] jnthn: I know, am in the middle of golfing 14:10
jnthn [ptc]: OK, thanks.
[ptc] jnthn: wanted to show you an example which is currently failing (just in case that helps)
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.)
[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"
lizmat masak: ack
masak lizmat: (and maybe having community guidelines saying "don't do that")
lizmat perhaps being able to set a default auth lexically, might help
masak yes, well. 14:12
the assumption is that someone didn't care enough to specify an auth :)
lizmat indeed :-)
14:12 gcole left
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:19
14:24 hobbs left 14:25 hobbs joined 14:30 brrt` joined 14:31 wryk left, dayangkun joined, wryk joined 14:32 chenryn joined, molaf joined
|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:32
14:33 brrt left
PerlJam |Tux|: $/.from and $/.to 14:33
14:33 ShimmerFairy left
|Tux| \o/ (/me tries …) 14:33
[Coke] m: ("aaasdf" ~~ /"sd"/).from.say 14:34
camelia rakudo-moar a5f38a: OUTPUT«3␤»
14:34 _mg_ left, jercos joined, ShimmerFairy joined 14:35 mrf joined, brrt` left, Alina-malina left
|Tux| note to self: use $/.from *before* doing another regex 14:36
lizmat or do the other regex in a different scope ? 14:37
|Tux| sure
but not here
PerlJam |Tux|: also, $/ is fairly volatile, but your own match var is not.
|Tux| if (!$!binary and $f.text ~~ m{ <[ \x00..\x08 \x0A..\x1F ]> }) { 14:38
$!error_pos = $/.from + 1 + ?$f.is_quoted;
$!errno = $f.is_quoted ??
$f.text ~~ m{<[ \r ]>} ?? 2022 !!
$f.text ~~ m{<[ \n ]>} ?? 2021 !! 2026 !! 2037;
scope is small nuf
14:38 Alina-malina joined
lizmat afk for a few hours& 14:38
|Tux| I now have to recall why two of those values currently are 1 based and one is 0-based 14:39
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
nine_: it's kind of a tradeoff.
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.
|Tux| which one?
PerlJam $f.is_quoted 14:42
dalek c: 148b048 | skids++ | lib/Language/control.pod:
Adjust docs now that '{...} if True' is no longer 'True ?? {...} !! ()'
14:44
14:47 mr_ron joined
[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␤»
[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; }
camelia ( no output )
[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; }
camelia rakudo-moar a5f38a: OUTPUT«CC␤»
[ptc] jnthn: that should be CA 14:52
14:52 chenryn left, dayangkun left
[ptc] jnthn: that was the best golfing solution I could come up with... 14:52
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
mr_ron planning to file an rt unless objection 14:56
14:58 vendethiel left, chenryn left, Ven left 15:03 molaf_ joined
jnthn mr_ron: Think we may already have one... 15:03
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
That sound familiar to any of you?
15:05 baest_ left
|Tux| is there already a warn (that can be caught) that does *not* show the location, like adding \n in perl5? 15:06
want $error, :nolocation; # maybe
dalek kudo/nom: 8782513 | jnthn++ | src/ (3 files):
Implement <&foo: $arg> and <&foo($arg)>.

We don't parse quite so liberally as STD does here, mostly because it seems like a great way to have to do a bunch of more fragile analysis without obviously implementing anything else from the design.
15:07
15:07 molaf left
|Tux| warn $error, :nolocation; # maybe 15:07
dalek ast: f3d73db | jnthn++ | S05-interpolation/lexicals.t:
Tests for RT #77152 (<&foo($arg)>).
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77152
jnthn |Tux|: Nothing implemented for that yet; agree it could be nice.
nine_ |Tux|: note
moritz nine_: note isn't (easily) catchable
|Tux| postpones testing for that part of the diagnostics
moritz oh, with a quiet { } block; not sure if it's implemented
ugexe that will always use non-ssl 15:08
oops
jnthn mr_ron: Yes, it's already in RT: rt.perl.org/Ticket/Display.html?id=121296 15:09
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
s/say/saw/
PerlJam mr_ron: the "ignores the type constraint" comment at the end seems exactly like the behavior you noticed.
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
[ptc] jnthn: golfed version of `gather for given first` issue 15:13
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; }
camelia rakudo-moar a5f38a: OUTPUT«CC␤»
[ptc] jnthn: this should be CA
jnthn: hopefully I haven't golfed it down too far. 15:14
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
jnthn [ptc]: Hmmm 15:15
You can get rid of the hash too
m: my @profile = [0, 3], [3, 0]; say gather for ^2 -> \c { take <A C>[$_] given first { @profile[$_][c] == 3 }, ^2; }
camelia rakudo-moar a5f38a: OUTPUT«C C␤»
[ptc] jnthn: one problem I have is that I don't 100% understand what the original example was doing... 15:16
jnthn: and thus tried to retain a bit of its original structure
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␤»
jnthn Can even get rid of the gather, it seems
[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␤»
[ptc] actually, the gather is needed since the for loop actually does more than that in the original example
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 }
camelia rakudo-moar 878251: OUTPUT«G G C␤»
[ptc] jnthn: correct
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
[ptc] .... just a guess
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
It works with given first(...) { .say }
15:24 diana_olhovik left
[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:25
15:26 domidumont left
jnthn [ptc]: Yeah, I think I've an idea what's going wrong. 15:26
15:27 larion left 15:33 konsolebox left
jnthn m: for ^2 -> \c { 1 given first { c.say; 0 }, ^2; } 15:33
camelia rakudo-moar 878251: OUTPUT«0␤0␤0␤0␤»
jnthn Golfs to this.
15:34 zakharyas left
[ptc] impressed 15:37
so some kind of interaction between for and given?
15:37 FROGGS joined
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:38
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
PerlJam I guess that explains how c lost its value? 15:42
jnthn Yeah
Apparently we need more spectests ;)
dalek p: 547d08a | coke++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
RT #124144 - make jvm give the same output as moar

Handle negative points as well as out of range.
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124144
[ptc] it's nice that the examples have been able to spot an issue like this :-) 15:43
15:44 masak left, moritz joined
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, masak joined
PerlJam Perhaps "lost its value" was a bit wrong-headed :) 15:44
15:45 masak is now known as Guest85434
lucasb m: for ^3 -> $x { .say given { $x }() } 15:46
camelia rakudo-moar 878251: OUTPUT«0␤0␤1␤»
jnthn m: use Test; my @a; for ^2 -> \c { 1 given first { @a.push(c); 0 }, ^2; }; is @a, (0, 0, 1, 1);
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'␤»
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'␤»
jnthn Good, those'll cover it.
15:50 alini left
[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:51 Guest85434 is now known as masak_grr
dalek kudo/nom: feca211 | coke++ | tools/build/NQP_REVISION:
Bump nqp for jvm bugfix for RT #124144
15:52
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124144
jnthn [ptc]: I'm spectesting what is hopefully a fix at the moment 15:53
[ptc]: And have a copule of extra spectests ready to push too
15:54 wryk left 15:55 raiph left
[ptc] jnthn: sweet! Awesome work! 15:56
15:56 raiph joined 15:57 tinyblak_ left 15:58 rurban left
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
15:59 japhb_ is now known as japhb
japhb fixes his nickburp 15:59
16:01 diana_olhovik joined
dalek kudo/nom: 4b39cd5 | jnthn++ | src/Perl6/ (3 files):
Fix regression in s.m. given/for.

We accidentally relocated blocks occurring in a statement modifier into the thunk for given and for, rather than just the ones in the statement. Need an extra bit of state to fix this, as we still want to do the move when we're doing blorst thunks.
16:02
ast: f113f3f | jnthn++ | S04-statement-modifiers/ (2 files):
Tests covering regression in given/for s.m.
16:03
jnthn [ptc]++ # promptly spotting/reporting the regression
[ptc] no probs :-) 16:05
commute & 16:06
16:06 Rounin left
japhb tries nuking his local panda repo and rebuilding from a fresh clone 16:07
jnthn std: when 42 { say "This should fail" } 16:09
camelia std 28329a7: OUTPUT«ok 00:00 137m␤»
16:10 eli-se joined 16:14 sue_ joined
PerlJam Has anyone done something like blog.plover.com/2015/04/24/#monad-search in Perl6? (on rosettacode maybe?) 16:14
16:15 mohij joined
PerlJam mjd mentions at the end that he tried it in Perl once but it sucked. Surely P6 would do *much* better 16:16
masak_grr PerlJam: I'm gearing up to write a blog post about that. 16:19
PerlJam: it will contain parsing, grammars, DSLs, and macros. 16:20
PerlJam masak_grr: so ... I was about to ++ you, but after that second sentence I'm no longer sure ;) 16:21
masak++ anyway :) 16:22
16:24 konsolebox joined, konsolebox left, konsolebox joined
masak_grr hehe 16:24
PerlJam: I will now consider it a challenge to have the blog post please you ;) 16:25
(it's not as crazy as it sounds. I think.)
dalek kudo/nom: 71ff418 | TimToady++ | src/ (11 files):
for's impl is now .FOR, remaining .for can be .map
16:26
TimToady there is no .for, nor can this be construed as a response...
16:28 tinyblak joined 16:30 chenryn joined, vendethiel joined
jnthn TimToady: S04 wants that 'when' only be allowed in a topicalizer block 16:30
moritz TimToady: please don't remove .for without deprecation 16:31
TimToady: the ecosystem (at least those parts under my control) use it
jnthn TimToady: given/for are obvious, something with an explicit $_ in its signature is obvious, anything else?
TimToady: Uh, CATCH is too 16:32
And CONTROL...
masak_grr I think that's it. 16:34
16:34 masak_grr is now known as masak
PerlJam do any of the statement prefixes like do, once, gather, etc. topicalize? 16:34
masak oh! `andthen` and `orelse` 16:35
or at least the former.
jnthn masak: Those aren't *blocks*
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 $_). "
masak or any routine that declares a parameter as $_ 16:37
16:37 rurban joined
lucasb m: $_ = 42; say 'yes' when 42 16:37
camelia rakudo-moar 4b39cd: OUTPUT«yes␤»
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*?
moritz TimToady: yes 16:39
jnthn lucasb: hm, yeah, I should take care of the statement modifier form too.
dalek rl6-roast-data: 216ca5a | coke++ | / (9 files):
today (automated commit)
TimToady GLR breaks things
moritz TimToady: because we told people to use .for instead .map to be forward compatible
TimToady: so, is there a good reason why we can't have a .for right now?
TimToady we can, and it should probably refer people to .flatmap if they want it 16:40
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...
masak dinner &
raydiak haven't backlogged thoroughly but wrt when and $_, what about blocks to map, grep, etc?
jnthn m: { when 1 { say 'one!' }; when 2 { say 'two' } }(1) 16:42
camelia rakudo-moar 4b39cd: OUTPUT«one!␤»
jnthn m: { when 1 { say 'one!' }; when 2 { say 'two' } }(2)
camelia rakudo-moar 4b39cd: OUTPUT«two␤»
jnthn Do we want ^^ to keep working?
TimToady why wouldn't it?
jnthn TimToady: It's about whether it counts as a topicalizer block 16:44
TimToady: I'm worrying about:
m: { when 1 { say 'one!' }; when 2 { say 'two' }; say $^a }(2)
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␤»
jnthn We already parsed/accepted then when blocks there before we hit the placeholder
TimToady then it should probably fail as a conflicted signature somehow 16:45
16:45 grettis joined
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)␤»
TimToady well, but we don't know which block the when is aimed at, hmm 16:46
jnthn m: (( say $_; say $^a; })(1)
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)␤»
jnthn huh
TimToady s/(/{/
jnthn oh!
m: { say $_; say $^a; }(1)
camelia rakudo-moar 4b39cd: OUTPUT«(Any)␤1␤»
jnthn Thanks. So the question: does this one complain about conflict too?
TimToady maybe...but if the (1) ain't there, the $_ is legal, but the $^a isn't, go figure 16:48
at some point we give up and declare it erroneous 16:49
jnthn grmbl, you're right
OK, I'll just let that one through. 16:50
dalek kudo/nom: 4372ca2 | moritz++ | src/core/Any.pm:
Re-introduce a deprecated Any.for

no reason to break this particular feature right now
c: c24d79c | (Heiko Jansen)++ | lib/Type/Cool.pod:
Update Cool.pod to fix minor inconsistencies
16:51
c: 82bdd79 | moritz++ | lib/Type/Cool.pod:
Merge pull request #78 from heikojansen/patch-1

Update Cool.pod to fix minor inconsistencies
16:52 fhelmberger left 16:53 vendethiel left 16:54 dakkar left
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.
What are the semantics here for exiting a loop via 'next'?
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:55
TimToady KEEP/UNDO would apply to each iteration of the loop, so would be unsuitable for such a thing 16:57
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.
jnthn: not to mention readability 16:59
17:00 telex left 17:01 espadrine left 17:02 telex joined, eli-se left
moritz m: for 'a' { KEEP say 'keep'; UNDO say 'undo'; LEAVE say 'leave'; next } 17:07
camelia rakudo-moar 71ff41: OUTPUT«leave␤undo␤»
moritz rjbs: seems we regard next as unsuccessful block exit
TimToady in P6 we have little need of an else on a loop, because we don't usually use loops for linear searches
either we use 'first', or we can always just || do {...} on the returned value of the loop 17:08
that is, on the returned list, which will always be true if anything is in it
P5 can't do @a || @b so it has more of a problem there 17:09
dalek ast: 55c98f8 | jnthn++ | S04-statements/when.t:
A bunch of tests for when is/isn't OK.

We leave the given/for/CATCH/CONTROL cases to the many existing tests.
17:10
17:10 vendethiel joined, tinyblak left, ir2ivps4 left
TimToady m: say (first *.is-prime, 4,6,8 orelse 3) 17:11
camelia rakudo-moar 71ff41: OUTPUT«3␤»
17:12 molaf_ left
TimToady m: say (gather for 4,6,8 { if .is-prime { take $_; last } }) || 3 17:13
camelia rakudo-moar 71ff41: OUTPUT«3␤»
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.
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
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␤»
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 :)
[Coke] p6weekly.wordpress.com/2015/04/28/...-glr-work/ - this showed up in the pl6anet feed as "PHA+SGVsbG8gZXZlcnlib2R5ISBJJiM4MjE3O20gYmFjay..." and about a million times that.
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…»
skids grr
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.
camelia rakudo-moar 71ff41: OUTPUT«(timeout)»
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?
first, you need (0..4).pick
second, that's always going to be true
jnthn m: given 'abc' { when /a/ { when /b/ { say 'hmm' } } } 17:16
camelia rakudo-moar 71ff41: OUTPUT«hmm␤»
jnthn Verdict? :)
TimToady well, I guess if the first is fixed, the second is okay
jnthn It's in a spectest, but my patch rejects it 'cus when ain't a topicalizer. :)
TimToady rejects what? both those whens are inside a topicalizer 17:17
jnthn *sigh*
I assumed "directly"
Because otherwise we need to go worrying about things like, what is transparent.
TimToady no, this is why it uses exceptions
jnthn And what isnt.
rjbs TimToady++ # thanks, re: above
jnthn ...it's a static check.
Nothing to do with exceptions. 17:18
TimToady anything that is not a topicalizer is transparent, I'd think
jnthn given foo() { sub bar() { when 1 { } } } # surely this when ain't in a topicalizer block
TimToady well, out to a routine, anyway 17:19
but even that could conceivable have a lexotic definition
jnthn OK, I can live with routine
What could have a lexotic definition? 17:20
TimToady as long as bar isn't called outside the dynamic scope of the given
jnthn But the $_ of the given will never be visible in the block 'cus a routine always gets a fresh one.
visible in bar, I menat. 17:21
17:21 eli-se joined
TimToady true nuff, so I guess in that sense every routine is a topicalizer 17:21
so you can stop there
jnthn OK
TimToady it's a topicalizer with a boring topic :)
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
it is, admittedly, ugly
17:23 b2gills joined, grettis left
raydiak I have constructs like that in places 17:23
jnthn TimToady: Yeah, I just found code that actually *does* set $_ like that.
eww
TimToady imagines a blockless "given 'foo';" 17:24
TimToady has a bad imagination :)
jnthn :P
If we allow that, though, the check is kinda useless
17:25 _mg_ joined
jnthn Because as soon as you put some code in a sub or method, you can use when/default anywhere 17:25
So it'll only outlaw use of it in the mainline.
raydiak always expected 'when' should work more or less anywhere there's a $_ and something to next/last/return out of
TimToady well, so?
why not allow succeeding out of a routine?
I mean, it's a code smell if you assign $_ rather than making it one of the parameters, but still 17:26
jnthn TimToady: I dunno, it feels for the machinery I introduced to do the check we get rather little value. 17:27
m: $_ = 42; when 42 { say 'ok' }
camelia rakudo-moar 4372ca: OUTPUT«ok␤»
jnthn You can even set the $_ in the mainline.
There's nowhere you don't have one.
skids Any thoughts on irclog.perlgeek.de/perl6/2015-04-18#i_10462461 ? 17:28
17:30 nbdsp joined
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 key
17:31 Alina-malina left
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: rt.perl.org/rt3//Public/Bug/Displa...l?id=71368
TimToady seems okay to me 17:32
jnthn OK. 17:33
I'll do so after dinner.
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. :)
jnthn - dinner, bbl
nbdsp I think the .push is the cause. 17:35
TimToady why the extra parens?
17:35 ir2ivps4 joined
TimToady and why not an explicit pair? 17:35
nbdsp For making a list. Are they not needed?
TimToady m: my %h; %h.push: 'foo', 'bar'; say %h.perl 17:36
camelia rakudo-moar 4372ca: OUTPUT«{:foo("bar")}<>␤»
TimToady m: my %h; %h.push: 'foo' => 'bar'; say %h.perl 17:37
camelia rakudo-moar 4372ca: OUTPUT«{:foo("bar")}<>␤»
TimToady m: my %h; %h.push: ('foo', 'bar'); say %h.perl
camelia rakudo-moar 4372ca: OUTPUT«{:foo("bar")}<>␤»
skids nbdsp: try just .lines instead of .slurp.lines?
ShimmerFairy That reminds me; I've been seeing that <> in .perl output lately, what exactly is that for?
17:38 Alina-malina joined
TimToady maybe try an :eager variant? 17:38
in the absence of GLR optimizations
but profile first
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
dunno if that'd help either
skids ShimmerFairy: It is a "decontainerizer" 17:43
ShimmerFairy part of the GLR then, I take it? 17:44
TimToady not really, more just trying to get rid of all the FooClass.new() boilerplate out of .perl 17:45
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
TimToady it's a Zen slice; [] or {} would work as well 17:46
if you put something in it, you'd require the left side to be a hash 17:47
m: say [1,2,3] ~~ Scalar; say [1,2,3]<> ~~ Scalar;
camelia rakudo-moar 4372ca: OUTPUT«False␤False␤»
TimToady hmm 17:48
m: say VAR([1,2,3]) ~~ Scalar; say VAR([1,2,3]<>) ~~ Scalar;
camelia rakudo-moar 4372ca: OUTPUT«True␤False␤»
TimToady m: say VAR([1,2,3]) ~~ Scalar; say VAR([1,2,3]<oops>) ~~ Scalar; 17:49
camelia rakudo-moar 4372ca: OUTPUT«True␤False␤»
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␤␤»
TimToady m: say VAR([1,2,3]) ~~ Scalar; say VAR([1,2,3]<oops>) ~~ Failure;
camelia rakudo-moar 4372ca: OUTPUT«True␤True␤»
japhb Dagnabbit, it looks like panda is screwed up from me on r-j, even with a fresh clone of panda 17:52
Is there something else I need to freshly clone, or is panda just not working on r-j right now?
17:52 konsolebox left 17:53 araujo left
skids japhb: last time I tried panda was broken on r-j. 17:53
(and it was a known issue)
17:54 RabidGravy left
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:54
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
lucasb m: my %h; %h.push: 'a' => 1; say %h 17:56
camelia rakudo-moar 4372ca: OUTPUT«a => 1␤»
lucasb m: my %h; %h.push: a => 1; say %h
camelia rakudo-moar 4372ca: OUTPUT«␤»
lucasb Any rationale why methods don't warn about unexpected named parameters? 17:57
ShimmerFairy Methods have an implicit slurpy hash parameter defined for them. 17:58
17:58 ir2ivps4 left
lucasb ShimmerFairy: Oh, I was expecting something like this. Is it used for something? 17:59
18:00 diana_olhovik left
ShimmerFairy I've had it explained to me a couple times (something involving MMD), but I've forgotten the explanation every time :P . 18:00
lucasb ShimmerFairy: Thanks for telling me! 18:01
m: class A { method m() { say %_ } }; say A.m(:foo, :bar)
camelia rakudo-moar 4372ca: OUTPUT«bar => True, foo => True␤True␤»
raydiak lucasb: design.perl6.org/S12.html#Interface_Consistency talks about it
TimToady see S12:Interface_consistency
synbot6 Link: design.perl6.org/S12.html#Interface_consistency
ShimmerFairy And every time I don't know the explanation, I can't help but think that we really shouldn't be doing it.
lucasb Even with an explicit empty "()" signature...
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
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␤␤»
TimToady and we may have some way in the future of detecting unused parameters 18:03
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:04
TimToady they are options that are typically aimed at a single parent class or subclass 18:05
especially with new, where they initialize only the attributes that are private to that level
18:06 chenryn left
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
afaik
vendethiel TimToady: so [+](@a) will still be equivalent to [+] @a ?
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
+ is a scalar op, so flattens
X, on the other hand, takes lists
vendethiel TimToady: would you mind me quoting these words for the learnx? they seem wise :P
TimToady can't stop people from quoting him... 18:08
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: github.com/nbdsp/profile-report/bl...45954.html What info in profile can help to spot the cause of the problem?
vendethiel you're doing good then ;-)
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)␤»
vendethiel m: say ([(^3).pick(*)] xx 4).lol
eli-se .perl should never return a lol, silly
yoleaux 09:36Z <Ven> eli-se: echo "require-sandbox: True" >> ~/.cabal/config
camelia rakudo-moar 4372ca: OUTPUT«ListIter.new␤»
vendethiel m: say ([(^3).pick(*)] xx 4).lol.perl
camelia rakudo-moar 4372ca: OUTPUT«([2, 0, 1], [1, 0, 2], [0, 1, 2], [0, 2, 1])␤»
b2gills ... where I don't have to itemize 18:11
18:11 tinyblak joined
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
18:11 araujo joined
eli-se yoleaux: no, I hate Cabal 18:12
vendethiel ShimmerFairy: instructions about the call to be done? (in the "meta" sense)
TimToady they're a bit like dynvars that way
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 …»
b2gills ShimmerFairy: you could think of named parameters as calling a slightly different routine ( in some cases that is literally true )
ShimmerFairy I'm also thinking of that business where a Bool named parameter without a default is effectively a tri-state variable... :P
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
TimToady it's probably an xx bug that it loses those parens 18:14
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:16 tinyblak left
FROGGS good evening dear #perl6 18:18
raydiak good morning dear FROGGS :)
FROGGS :o)
nbdsp Could someone point to docs on how to read profile report for determining bottlenecks, please? 18:19
moritz it's list iteration :(
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, araujo left
ShimmerFairy well, I suppose it's debatable as to whether nonexistence is a state or not :P 18:22
18:24 ir2ivps4 joined
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 ␤»
FROGGS m: say "foo bar" ~~ / .+? <|w> /
camelia rakudo-moar 4372ca: OUTPUT«「foo」␤»
18:27 nbdsp left
lucasb m: (1,2,3).rotor # a tiny bug, rotor without args 18:27
camelia rakudo-moar 4372ca: OUTPUT«(timeout)»
18:27 nbdsp joined 18:28 Sqirrel joined
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
backwards ones would break lazyness
18:33 chenryn joined
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:34
18:34 rurban left
raydiak or just fail? 18:35
PerlJam raydiak: I vote fail
moritz fail 18:36
the elems count is an ordinal number (thus always non-negative)
18:36 Rounin joined
moritz it's the step/gap argument that may be <0 18:37
FROGGS m: say "foo bar" ~~ / $7=[\w+] /
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␤␤»
raydiak what about .rotor(1 => -2) ?
18:37 rurban joined
PerlJam raydiak: fail if we've backed up before the beginning. 18:38
moritz aye
timotimo .rotor(0 => 100, (1 => -2) xx *)
raydiak ah, that makes sense...I was just gonna check the sign of the sum of all the steps and gaps
timotimo (trololo) 18:39
dalek kudo/nom: 6b29e3d | (Jeffrey Goff)++ | CREDITS:
Adding myself as the release manager for Parrot directly after Simon.
kudo/nom: 29ead06 | (Will Coleda)++ | CREDITS:
Merge pull request #420 from drforr/nom

Adding myself as the release manager for Parrot directly after Simon.
moritz timotimo: next up: the .rollator method, extra for you :-) 18:40
timotimo ouch
lizmat nbdsp: re irclog.perlgeek.de/perl6/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
druther draw the boundary at routine vs block
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
camelia rakudo-moar 4372ca: OUTPUT«「ABCDEFGHIJKLMNOPQRSTUVWXYZ」 「_」 「abcdefghijklmnopqrstuvwxyz」 「ª」 「²³」 「µ」 「¹º」 「¼½¾」 「ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ」 「ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö」 「øù…»
TimToady and I'm quite certain there's rosettacode that relies on lambdas inside a for modifier 18:43
18:43 zakharyas left
nbdsp lizmat: i tried two variants: 'for eager "file.IO.lines" ' and 'for "file.IO.lines :eager' - no results. 18:43
lizmat I seem to recall that IO.slurp.lines(:eager) was the fastest variant for reading lines 18:44
if it doesn't make a lot of difference, then maybe it *is* the push that is the problem
18:45 chenryn left
TimToady IO.slurp.words.rotor(3) 18:45
18:45 chenryn joined
lizmat ah, I see now, you want words 18:46
dalek pan style="color: #395be5">perl6-examples: 2168bf6 | paultcochrane++ | categories/rosalind/mprt-grondilu.pl:
Use local FASTA files if available

Fall back to file from internet if file isn't available
18:47
pan style="color: #395be5">perl6-examples: d8e51fa | paultcochrane++ | categories/rosalind/ (4 files):
Add input files for mprt example
pan style="color: #395be5">perl6-examples: 8a490d0 | paultcochrane++ | categories/rosalind/ (2 files):
Flattening lists on input to for loops
pan style="color: #395be5">perl6-examples: b62f395 | paultcochrane++ | categories/rosalind/dbpr-grondilu.pl:
Use local .txt input files if available
pan style="color: #395be5">perl6-examples: 9612390 | paultcochrane++ | categories/rosalind/Q5SLP9.txt:
Add input file for dbpr example
18:57 nbdsp left, chenryn left, nbdsp joined
dalek pan style="color: #395be5">perl6-examples: f55f5e4 | (Andrei Osipov)++ | categories/euler/ (2 files):
Problem 59 solution
19:03
pan style="color: #395be5">perl6-examples: 47b40b1 | (Andrei Osipov)++ | categories/euler/prob100-andreoss.pl:
[euler] problem 100
pan style="color: #395be5">perl6-examples: 397742b | (Andrei Osipov)++ | categories/euler/prob100-andreoss.pl:
fixed title
pan style="color: #395be5">perl6-examples: 9d7332b | paultcochrane++ | categories/euler/ (3 files):
Merge pull request #22 from andreoss/andreoss

  [euler] some solutions
19:03 espadrine joined
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:05
19:05 andreoss` left 19:06 lucasb left
lizmat nbdsp: perhaps this can give you some inspiration: gist.github.com/lizmat/e692c9fab1c3b449714f 19:12
dalek pan style="color: #395be5">perl6-examples: f40b232 | paultcochrane++ | categories/euler/prob025-polettix.pl:
Flatten input list to for loop
19:15
pan style="color: #395be5">perl6-examples: 286b09a | paultcochrane++ | categories/euler/ (3 files):
Merge branch 'master' of github.com:perl6/perl6-examples
pan style="color: #395be5">perl6-examples: 010c114 | paultcochrane++ | categories/euler/prob059-andreoss.pl:
[euler] wrap text to within 80 chars
pan style="color: #395be5">perl6-examples: 9164035 | paultcochrane++ | categories/euler/prob (2 files):
Purge trailing whitespace
pan style="color: #395be5">perl6-examples: 37f017e | paultcochrane++ | categories/euler/prob100-andreoss.pl:
Wrap text to within 80 chars

This is consistent with the other examples and makes the text easy to read in all editors.
pan style="color: #395be5">perl6-examples: e6a5495 | paultcochrane++ | categories/euler/prob (2 files):
Add vim coda
pan style="color: #395be5">perl6-examples: 85003a9 | paultcochrane++ | categories/euler/prob059-andreoss.pl:
Make location of cipher.txt input file independent of run location
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
but most loop based assumptions, especially wrt benchmarking, are up for grabs until the dust around the GLR settles
nbdsp: it would help if you could post a few lines from your words file 19:17
19:17 xfix left
lizmat raydiak: are you working on parameter sanity checks in List.rotor? 19:18
nbdsp The line format: <number: from 1 to 50000> <word: normal english words> <letter: one latin letter>: example: '1 aardvark N' 19:19
dalek pan style="color: #395be5">perl6-examples: 219e6a1 | paultcochrane++ | t/categories/euler.t:
[euler] add a test for prob100
19:21
19:21 rurban left 19:22 alini joined 19:23 xinming left
lizmat nbdsp: code seems to work for me, is it any faster for you know? 19:23
19:24 yqt joined, xtreak joined, xinming joined
lizmat I wonder whether the quietly block allows for fine enough grained control over warnings 19:25
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
lizmat something you may want to switch on/ off inside a scope for specific sets of statements, without the need of a scope
jnthn TimToady masak moritz thoughts ? 19:27
nbdsp lizmat: your solution solved the problem. thanks!
lizmat Hash.push has a lot of logic in there that you didn't need
so how fast is it now ?
nbdsp Instead of 8-9 minutes it runs now for less than 30 seconds. 19:28
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:29
lizmat okidoki, I was just testing some patches 19:30
19:30 Sqirrel left 19:31 amaliapomian joined 19:33 eternaleye joined
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:33
raydiak yes precisely whta I was going through, scrolled through all of them... 19:34
lizmat nbdsp: cool!
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:36
19:36 _mg_ left
dalek c: a9ab269 | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
Start Channels
19:37
c: 4331ec1 | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
More supply
c: 1d73e2a | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
More channel
c: 1732101 | (Jonathan Stowe)++ | lib/ (2 files):
Merge branch 'master' of github.com:perl6/doc
lizmat PerlJam: X::OutOfRange is exactly what I'm testing
PerlJam raydiak: do we have tests for the weird .rotor conditions? That's probably easier to do than name the execptions :)
lizmat++
19:38 raiph left
lizmat however failing or throwing inside the gather gives strange effects 19:38
$ 6 '{ (^10).rotor(-1 => 1) }'
Unhandled exception: Elements out of range. Is: -1, should be in 1..Inf
at src/gen/m-CORE.setting:14577 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/./CORE.setting.moarvm:throw:121)
PerlJam lizmat: there are at least 3 conditions that we've talked about today. .rotor(), .rotor(-3), and .rotor(1 => -2)
lizmat looking at all 3 of them 19:39
PerlJam awesome.
lizmat gist.github.com/lizmat/c2e5a958813d4b2d50da 19:40
but it doesn't give the desired effect :-(
PerlJam what's the difference between fail X::Whatever.new() and X::Whatever.new().throw ?
lizmat well, the throw one is a "die" really :-) 19:41
with fail I get: 19:42
$ 6 '{ (^10).rotor(-1 => 1) }'
Unhandled exception: Could not find symbol '&Return'
at src/gen/m-CORE.setting:14576 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/./CORE.setting.moarvm:throw:121)
which is a big WAT for me
PerlJam me too 19:43
almost deserves a new acronym FAALTA (far and away less than awesome)
lizmat think I found it: it nows about X::TypeCheck, but not about X::TypeCheck::Return 19:44
*knows
nope, that's not it... 19:45
19:45 nbdsp left
lizmat updated gist.github.com/lizmat/c2e5a958813d4b2d50da with a stack trace, maybe jnthn can make some sense of it 19:48
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 :-)
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 rindolf left
lizmat m: gather for ^10 { fail } 19:51
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
camelia rakudo-moar 29ead0: OUTPUT«Unhandled exception: ␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:16445 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:sink:32)␤ from sr…»
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/perl6/runtime/CORE.setting.moarvm:die:35)…»
lizmat m: die
camelia rakudo-moar 29ead0: OUTPUT«Died␤ in block <unit> at /tmp/m1LbzMWmJW:1␤␤»
PerlJam Was a call frame optimized away? 19:54
19:56 PZt joined
lizmat don't see a difference between running with --optimize=0 and not 19:56
20:00 cognominal left
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
jvm currently fails with that rather
20:04 xtreak left 20:10 Rounin left
timotimo labster: damn, you're right, i did miss those :< 20:13
20:15 darutoko left
dalek c: 6368d45 | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
earliest example
20:22
jnthn back
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 ?
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'
lizmat where does that live ? 20:26
jnthn japhb: Added the 'use nqp'; thanks! 20:29
lizmat: lives at [email@hidden.address] 20:30
lizmat ok, so too late for a PR :-) 20:31
jnthn lizmat: Yeah but if you want a commit bit on that module just ask :) 20:32
lizmat asks :-)
.oO( but promises nothng :-)
20:33
jnthn lizmat: done :) 20:34
lizmat thanks!
jnthn Has a bunch of open issues; I should find some tuits for it at some point :)
otoh, Rakudo has quite a few more open issues ;) 20:35
12 to go until we lose a page of RTs, though :)
dalek c: 5cd9864 | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
Need to await on the reader thread to get all output
20:39
20:46 domidumont left 20:48 cursork left 20:49 colomon left 20:54 larion joined
bartolin m: macro postfix:<!>($n) { quasi { {{{$n}}}+1 } } ; say $_! for 3..5; # RT #116370 20:58
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=116370
camelia rakudo-moar 29ead0: OUTPUT«4␤4␤4␤» 20:59
bartolin ^^ is that the expected output?
vendethiel don't think so 21:00
FROGGS m: macro postfix:<!>($n) { quasi { {{{$n}}}+1 } } ; for 3..5 { say $_! } 21:02
camelia rakudo-moar 29ead0: OUTPUT«4␤4␤4␤»
bartolin at least it's consistent now :) 21:03
FROGGS m: macro postfix:<!>($n) { quasi { {{{$n}}}+1 } } ; say 3!; say 4!; say 5!
camelia rakudo-moar 29ead0: OUTPUT«4␤5␤6␤»
FROGGS masa\Wmacros are weird 21:04
dalek kudo/nom: fa2e089 | lizmat++ | src/Perl6/ (2 files):
Move loading and symbol setup to World
21:08 virtualsue joined 21:09 pippo joined
pippo o/ #perl6 21:09
FROGGS: I was looking at what you wrote: say "foo bar" ~~ / .+? <|w> / 21:10
FROGGS: what does <|w> mean?
FROGGS that's a zero width assertion for word boundaries 21:11
mentioned in S05 21:12
and I just checked if it is implemented yet or not
pippo FROGGS: thank you
FROGGS you're welcome 21:13
pippo :-)
21:13 muraiki left 21:14 skids left, tinyblak joined 21:16 colomon joined 21:17 eli-se left 21:19 tinyblak left
dalek kudo-star-daily: ad9183b | coke++ | log/ (2 files):
today (automated commit)
21:25
21:25 larion left
pippo o/ 21:26
21:26 larion joined, pippo left
timotimo .u | 21:27
yoleaux U+007C VERTICAL LINE [Sm] (|)
timotimo i didn't know this syntax existed
dalek c: a55d1e8 | (Jonathan Stowe)++ | lib/Language/concurrency.pod:
Not tab
timotimo m: say <1 2 3 4>.perl
camelia rakudo-moar fa2e08: OUTPUT«("1", "2", "3", "4")␤»
timotimo m: say <1>.perl 21:28
camelia rakudo-moar fa2e08: OUTPUT«"1"␤»
timotimo m: say <1/2>.perl
camelia rakudo-moar fa2e08: OUTPUT«0.5␤»
timotimo is <1> not supposed to turn into a Str?
21:30 diana_olhovik_ joined
ShimmerFairy m: say <1>.WHAT 21:30
camelia rakudo-moar fa2e08: OUTPUT«(Str)␤»
timotimo er ... 21:31
is <1> not suppose dto turn into an Int?
21:31 virtualsue left
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>
i'm not 100% sure if we were still going for the IntStr thing, as it's kind of hard to have
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 espadrine left
dalek kudo/nom: 20f5f6d | lizmat++ | src/Perl6/ (2 files):
Move the mop up and check code to World
21:36
21:36 Zoffix joined 21:41 amaliapomian left 21:52 FROGGS left, FROGGS joined
masak 'night, #perl6 21:55
21:55 FROGGS left 21:56 Zoffix left
lizmat good night, masak 21:57
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
All 12 subtests passed
What in general causes that kind of error?
Oh I see it: Non-zero wait status: 11 22:03
22:03 mohij left
japhb Missed that the first time. Must be dying after the tests have all run .... 22:03
jnthn maybe some cleanup explosion, though Moar tends to Just Call exit(0) And Be Done... 22:05
('cus the OS can surely clean up faster than we can)
Maybe Inline::Perl5 has some END block where Perl 5 things get cleaned up a bit though. 22:06
22:07 vendethiel left
jnthn 'night, #perl6 22:08
japhb That wouldn't surprise me ...
lizmat good night, jnthn! 22:09
japhb .tell nine_ Please see irclog.perlgeek.de/perl6/2015-04-28#i_10520477 re: test failure during Inline::Perl5 install
yoleaux japhb: I'll pass your message to nine_.
japhb Good night, jnthn!
22:11 RabidGravy left
raydiak has anyone else spent much time thinking about how much a clean grammar looks like a template? 22:12
lizmat I guess not much :-) 22:23
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 kudo/nom: 452504e | lizmat++ | src/Perl6/World.nqp:
s/\$\*W/self/ where possible in World
TimToady I have a button somewhere that reads, "Larry Wall, Honda Mechanic"
I guess I'll need to turn that back in...
lizmat well, maybe you don't need it there anymore ? 22:30
it being the wiper :-)
TimToady hey, it's rained here three times in the last year, at least!
lizmat wow! 22:36
that's not a lot :-( 22:37
22:39 yqt left, diana_olhovik_ left 22:41 telex left
timotimo lizmat: i think i'll measure how many cpu instructions we save by using self instead of $*W there 22:42
22:42 telex joined
dalek kudo/nom: f4ff0a8 | lizmat++ | src/Perl6/ (2 files):
Move import_EXPORTHOW to World
22:42
22:43 dnmfarrell joined
lizmat timotimo: that's not really the reason I'm doing it... 22:43
timotimo but i'm still interested :) 22:44
lizmat well, any gain would be great :-) 22:45
timotimo what's your foremost motivation for that commit?
22:46 diana_olhovik_ joined
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
timotimo ah
fair enough
lizmat so it can be worked on better (by me)
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␤»
raydiak dnmfarrell: a gist might be helpful here 22:55
dnmfarrell raydiak: thanks I'll do that
dalek kudo/nom: 59b8935 | lizmat++ | src/Perl6/ (2 files):
Move add_package_declarator to World
22:56
lizmat and with that, I've changed World enough for today :-)
good night, #perl6!
raydiak 'night Worldhacker lizmat++ 22:57
labster good job lizmat++, night 23:00
dnmfarrell raydiak: gist.github.com/dnmfarrell/47e413f4bd27f2c24eda 23:01
Maybe my code is wrong ...
timotimo yes, of course
you're passing $action as the named parameter "action" in one case, "actions" in the other 23:02
methods don't complain about keyword arguments that they don't have an interest in
so you don't get a warning for that
er, i didn't mean "yes, of course your code is wrong"
23:03 alini left
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
so you are passing :action($action)
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
dnmfarrell raydiak: ok, thanks, that explains the not executing part :)
raydiak the other part is that regen use $/ 23:06
long story short, use method TOP ($/ is copy) and that other problem will go away
^^regexen*
dnmfarrell raydiak: but why does that cause a problem as $/ is not part of the regex statement? 23:07
23:07 muraiki joined
raydiak regexes put the match in $/ implicitly 23:08
dnmfarrell or is that the long story ... :) ?
TimToady raydiak: jnthn++ has already given a talk a couple years ago on using a grammar as a generator
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
dnmfarrell ohhhhh 23:08
raydiak TimToady: thanks, I'll look around for that 23:09
dnmfarrell raydiak: thanks so much, that clears it up
raydiak dnmfarrell: you're quite welcome :)
23:09 skids joined
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:18
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:24
raydiak sometimes wonders if he'd be better off writing books 23:26
23:28 raiph joined 23:32 kaare_ left 23:33 diana_olhovik_ left 23:34 alini joined
muraiki what's a good resource for learning how to make nested hashes in perl6? 23:35
I'm looking at doc.perl6.org/language.html but kind of lost, heh
23:36 BenGoldberg joined
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>;
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…»
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>
camelia rakudo-moar 59b893: OUTPUT«2␤»
muraiki ah
TimToady use {} instead of ()
japhb TimToady beat me to it. :-)
muraiki and he also thought of making it spell out hay :)
TimToady m: my %h = a => { x => 1, y => 2 }, b => { z => 3 }; say %h<a><y> 23:39
camelia rakudo-moar 59b893: OUTPUT«2␤»
TimToady m: my %h = a => { x => 1, y => 2 }, b => { z => 3 }; say %h<a><x>
camelia rakudo-moar 59b893: OUTPUT«1␤»
muraiki should I prefer one form over the other?
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
TimToady well, and whether you use = or := 23:50