»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:10 atweiden left
psch j: sub f($) { }; f Junction 00:13
camelia rakudo-jvm 3b212a: OUTPUT«Nominal type check failed for parameter 'null'␤ in sub f at /tmp/WF97z9OZ4p:1␤ in block <unit> at /tmp/WF97z9OZ4p:1␤␤»
psch i have a patch for that, but i'm not 100% happy with it :/
00:14 spider-mario left
psch on the upside it puts some stuff in that could help with other things 00:15
r: ++4 # like this one
camelia rakudo-jvm 3b212a: OUTPUT«Expected a native int argument for '$a'␤ in block <unit> at /tmp/tmpfile:1␤␤»
..rakudo-moar 3b212a: OUTPUT«Parameter '$a' expected a writable container, but got Int value␤ in block <unit> at /tmp/tmpfile:1␤␤»
00:15 raiph left 00:21 leont left 00:23 skids joined
AlexDaniel m: say $++; say $++; 00:25
00:26 cognominal_ joined, AlexDaniel left 00:28 ilbot3 left, gonz_ left 00:29 camelia joined, ilbot3 joined, cognominal left, gonz_ joined 00:30 erxeto joined
camelia rakudo-moar 3b212a: OUTPUT«0␤0␤» 00:30
00:30 ChanServ sets mode: +v camelia
Hotkeys that was quite the delay 00:32
oh I see
00:32 raiph joined
Hotkeys it died a pingy death 00:32
rip Template::Mustache is still angry when I try to install it 00:42
dalek ast: 1c35e0f | coke++ | S04-statements/gather.t:
used merged ticket id
00:45
00:46 bjz joined, sufrostico left 00:47 BenGoldberg joined
Hotkeys transcription section on the linguistics midterm 00:47
I wrote the first consonant in 'circumstantial' as [k] and not [s] because my brain hates me 00:48
i only now realized it
rip
prof probably thinks I'm illiterate
oops wrong channel
00:48 _dolmen_ left
Hotkeys well 00:48
I hope you guys enjoy my anecdote
gfldex you need to tell your prof not us :-> 00:49
BenGoldberg kirkumstantial?
Hotkeys yeah lol
gfldex, too late now, midterm already submitted
geekosaur neh, just greek :p
(circe...) 00:50
00:50 AndyDee joined
Hotkeys it was because the word before it was courage 00:50
and I guess I automatically wrote k
00:50 bjz_ joined
Hotkeys because that makes sense >_> 00:50
00:51 bjz left
dalek ast: 9c86762 | coke++ | S32-str/comb.t:
fudge more instances of RT #124279
00:55
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124279
00:58 bjz joined, bjz_ left 00:59 AndyDee left 01:06 yeahnoob joined 01:07 rangerprice joined 01:17 raiph left 01:19 tokuhiro_ left
MadcapJake how would i write a function that alternately returns true/false anytime you call it? I'm thinking of JavaScript and writing a generator with a while loop that just yields true and yields false and loops back. 01:21
timotimo m: sub flipper() { return state $foo = not $foo }; say flipper; say flipper; say flipper; 01:22
camelia rakudo-moar 3b212a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3Wdezs1FXx␤Cannot use variable $foo in declaration to initialize itself␤at /tmp/3Wdezs1FXx:1␤------> 3ub flipper() { return state $foo = not $7⏏5foo }; say flipper; say flipper; say fli␤ expect…»
timotimo m: sub flipper() { return state $foo = True; $foo = not $foo }; say flipper; say flipper; say flipper;
camelia rakudo-moar 3b212a: OUTPUT«True␤True␤True␤»
timotimo m: sub flipper() { state $foo = True; $foo = not $foo }; say flipper; say flipper; say flipper;
camelia rakudo-moar 3b212a: OUTPUT«False␤True␤False␤»
timotimo m: sub flipper() { state $foo = True; $foo = not $foo }; say flipper; say flipper; say flipper; say flipper;
camelia rakudo-moar 3b212a: OUTPUT«False␤True␤False␤True␤»
01:23 raiph joined
MadcapJake cool, never used the `state` keyword before. 01:23
01:24 Zoffix joined
psch m: sub flipper() { state $a = False; $a .= not }; say flipper; say flipper # golfed \o/ 01:27
camelia rakudo-moar 3b212a: OUTPUT«True␤False␤»
psch m: sub flipper() { state $a = 0; $a .= not }; say flipper; say flipper # golfederer \o/
camelia rakudo-moar 3b212a: OUTPUT«True␤False␤»
psch ...that's what happens with 90 seconds stage parse and 32 seconds stage jast 01:28
MadcapJake m: sub flipper() { $ = 0; $ .= not }; say flipper; say flipper 01:30
camelia rakudo-moar 3b212a: OUTPUT«True␤False␤»
MadcapJake # golfedererized xD
psch MadcapJake: right! 01:31
m: sub flipper() { $ .= not }; say flipper; say flipper
camelia rakudo-moar 3b212a: OUTPUT«True␤False␤»
MadcapJake lol!
psch and of course, spaces 01:32
m: sub flipper() {$.=not}; say flipper; say flipper
camelia rakudo-moar 3b212a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/o1aSvZtxg0␤Unsupported use of $. variable; in Perl 6 please use the filehandle's .ins method␤at /tmp/o1aSvZtxg0:1␤------> 3sub flipper() {$.7⏏5=not}; say flipper; say flipper␤»
psch :l
m: sub flipper() {$ .=not}; say flipper; say flipper # need that one, apparently
camelia rakudo-moar 3b212a: OUTPUT«True␤False␤»
01:34 Ben_Goldberg joined
psch although only because that perl5 warning is around 01:34
MadcapJake haha wow, that's some serious golf action then :P 01:35
psch don't do this in production, kids!
01:37 BenGoldberg left
MadcapJake i can't seme to get the golfed one to start with a false value the more explicity `state` declarred one can start false though 01:38
woah, super spelling errors in that sentence xO
gotta start reading what I type... 01:39
psch m: sub flipper() {!($ .=not)}; say flipper; say flipper
camelia rakudo-moar 3b212a: OUTPUT«False␤True␤»
psch it's not as golfy anymore
but $ inits as Any, which gets its own negation assigned
so you "can't" (FSVO "can't") start with False
MadcapJake ah i see 01:40
01:42 Skarsnik left, kid51 left
dalek ast: f55436c | coke++ | S32-io/spurt.t:
fudge jvm for RT #126495
01:50
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126495
01:55 Actualeyes joined, dj_goku left 02:06 TEttinger left 02:15 dayangkun joined, tokuhiro_ joined 02:18 rangerprice left 02:20 tokuhiro_ left
ShimmerFairy m: say { 1 => 2 } === { 1 => 2 }; say { 1 => 2 } ~~ { 1 => 2 }; # I feel like at least ~~ should say True 02:27
camelia rakudo-moar 3b212a: OUTPUT«False␤False␤»
02:29 raiph left
psch m: say 1 ~~ { 1 => 2 } 02:30
camelia rakudo-moar 3b212a: OUTPUT«True␤»
psch that's a sneaky exists-key... 02:31
02:33 tokuhirom joined
tokuhirom in this commit github.com/rakudo/rakudo/commit/0c...26a731093b 02:33
psch ShimmerFairy: according to synopses and roast you're right, it's underimplemented
tokuhirom before: split("=", "YYY=", 2) returns 'YYY=', ''
psch ShimmerFairy: the ACCEPTS(Hash:D: Hash $topic) candidate is missing 02:34
ShimmerFairy psch: maybe arguably the one for Map is the one that's missing [too], but I wouldn't know :)
tokuhirom after: split('=', 'YYY=', 2) returns just 'YYY'
ShimmerFairy tokuhirom: seems like a bug to me 02:36
psch ShimmerFairy: i don't see Map anywhere in the list in S03
s/list/table/ 02:37
dalek kudo-star-daily: 6d78ecb | coke++ | log/ (9 files):
today (automated commit)
ShimmerFairy psch: that's probably the design docs not being updated. I believe it used to be called EnumMap or such
psch anyway, i'm talking about "Hash Hash hash mapping equivalent $_ eqv X"
that one's definitely missing
if it should hang from Map or Hash, i wouldn't know
same for the Associate ~~ Hash one i guess 02:38
they're todo NYI in S03-smartmatch/hash-hash.t 02:39
where "they" means "8 tests that test this" 02:40
02:40 tokuhirom left, tokuhirom joined
psch Map isn't in the table either, but that's not an argument against "out of date" 02:41
err, EnumMap
02:42 ][Sno][ joined
ShimmerFairy yeah, I'm not too familiar with what exactly happened in the GMR :) 02:42
02:44 [Sno] left, ilbot3 left 02:46 ilbot3 joined 02:47 ][Sno][ left 02:48 [Sno] joined 02:49 aborazmeh joined, aborazmeh left, aborazmeh joined
dalek ast: 3185bb0 | ShimmerFairy++ | S32-str/split.t:
Add a couple tests for split

Inspired by a bug found by tokuhirom++ . Specifically not SKIPped or TODO'd so the issue is more visible.
02:49
02:52 Oatmeal left
skids reading git logs GMR was: PairMap gone, EnumMap became Map, Enum (not to be confised with enum) merged into Pair which is now shallowly immutable 02:54
dalek kudo/nom: fe5b300 | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/ (2 files):
Move throwing of X::TypeCheck::Binding out of bindOneParam.

Previously we'd fail with "Nominal type check failed for parameter 'null'", in e.g. <sub f($) { }; f Junction>, because we threw the Exception directly. This patch moves the throw *after* actually failing to bind.
02:55
psch r: ++4 # not fixed yet, with that patch
camelia rakudo-moar 3b212a: OUTPUT«Parameter '$a' expected a writable container, but got Int value␤ in block <unit> at /tmp/tmpfile:1␤␤»
..rakudo-jvm 3b212a: OUTPUT«Expected a native int argument for '$a'␤ in block <unit> at /tmp/tmpfile:1␤␤»
psch there's something really different between r-j and r-m wrt IntLexRef i feel
dalek osystem: 4194889 | cygx++ | META.list:
Add Native::LibC

Still work in progress, but I'd like to get some more eyes on this.
psch 'cause that's what i get, currently...
also, horray for git add -p 02:56
"Parameter '$a' expected a writable container, but got IntLexRef value"
just weird :l
but maybe i'm just sleepily confusing decont-neccessities or somesuch...
02:58 Oatmeal joined 03:07 chansen_ joined 03:08 TEttinger joined, olinkl joined, kaare_ joined, SmokeMachine joined 03:10 Spot__ joined 03:14 PotatoGim joined 03:15 zemmihates joined 03:16 tokuhiro_ joined
MadcapJake I finished my english-to-pig-latin command line tool! Now the world can use this to transmit totally secure encrypted english messages. gist.github.com/MadcapJake/2c78ea7585143298c66a 03:17
03:20 tokuhiro_ left 03:23 TEttinger left 03:33 TEttinger joined 03:45 skids left
colomon m: say samecase(“hello”, “ATesT”) 03:49
camelia rakudo-moar fe5b30: OUTPUT«HEllO␤»
colomon m: say samecase(“hello”, “ATes”)
camelia rakudo-moar fe5b30: OUTPUT«HEllo␤»
colomon MadcapJake: I like your script!
m: say samecase(“hello”, “ATeS”) 03:50
camelia rakudo-moar fe5b30: OUTPUT«HElLO␤»
colomon MadcapJake: I think maybe you can replace your case logic using the samecase sub (see above examples)
03:51 llfourn joined
colomon m: say samecase(“itleTay”, “Title”) 03:51
camelia rakudo-moar fe5b30: OUTPUT«Itletay␤»
colomon …. then again, maybe not? 03:52
oh, that’s an I, not a capital i
lowercase L, I mean. :)
afk # bedtime 03:54
04:09 Ben_Goldberg left 04:12 Alina-malina left, khw left
zengargoyle m: given "--phrase" { when any <-p --phrase> { say "phrase" } } 04:19
camelia rakudo-moar fe5b30: OUTPUT«phrase␤»
zengargoyle m: given "-p" { when any <-p --phrase> { say "phrase" } }
camelia rakudo-moar fe5b30: OUTPUT«phrase␤»
zengargoyle wonders if :Letter is ok with <[aeiou]>, could probably use :ignoremark (?) to treat ä as a, etc. then again piglatin vs non-english is ... 04:27
given @*ARGV.shift { when any <-p --phrase> { translate( @*ARGV.join(' ') ) } } 04:29
ShimmerFairy Even better would be sub MAIN(:p($phrase), :f($file)) { ... } :) 04:55
05:00 Calibellus left 05:01 cognominal_ left, cognominal_ joined
MadcapJake colomon: thanks, i've updated the gist. saved three lines and it cuts out some of the ugly casing noise! 05:09
zengargoyle multi sub MAIN( Bool :f(:$file), *@filename where { @filename.so } ) { 05:12
sadly you can't do just $filename due to it being positional. and sadly :f(:$file)) requires ugly --file=filename 05:13
multi sub MAIN( Bool :p(:$phrase), *@text ) { # works nicely with @text.join(' ') though 05:14
05:15 geraud left
zengargoyle you can also do like .match(/^<$vowels>/) and skip the $/==0 check 05:17
05:19 raiph joined 05:21 vendethiel joined 05:25 raiph left
psch MadcapJake: gist.github.com/peschwa/6c3521d3190c51f80eb8 # how i'd write it 05:28
MadcapJake: note that it's not with -f/--file and -p/--path anymore, but just a single argument that gets understood as file if it is one
MadcapJake: also i know a few more builtins :)
MadcapJake sweet! so the `where *.IO.f` is where it checks to see if it's a file, then? 05:29
psch MadcapJake: yeah
05:29 bjz_ joined 05:31 bjz left
MadcapJake your @consonants declaration is really slick! 05:31
what does the `cache` method do?
psch could be slicker if i had a compose key around... :S
cache is the cached result of a Seq 05:32
m: my $a := ^10; say $a.WHAT
camelia rakudo-moar fe5b30: OUTPUT«(Range)␤»
MadcapJake oh ok gotcha
psch m: my $a := 1...10; say $a.WHAT
camelia rakudo-moar fe5b30: OUTPUT«(Seq)␤»
psch m: my $a := 1...10; say $a; say $a
camelia rakudo-moar fe5b30: OUTPUT«(1 2 3 4 5 6 7 8 9 10)␤(1 2 3 4 5 6 7 8 9 10)␤»
psch hm, maybe caches already somewhere..?=
but yeah, its one spot where the GLR feels a bit iffy to me
MadcapJake how so? 05:33
zengargoyle now knows how to use .cache
have had way to many Seq has already been ... lately
psch hm, i can't reproduce it, maybe it went away.. :) 05:34
MadcapJake: i used to stumble across "This Seq has already been iterated and its values consumed" quite a lot
MadcapJake zengargoyle: looking back, good idea using the `^` anchor, that would clean it up a lot
zengargoyle m: .say for <'a' .. 'z'> (-) <a e i o u>
camelia rakudo-moar fe5b30: OUTPUT«'a' => True␤'z' => True␤.. => True␤»
psch m: say (<'a' .. 'z'> (-) <a e i o u>).keys 05:35
camelia rakudo-moar fe5b30: OUTPUT«('a' 'z' ..)␤»
psch oh, the angles
MadcapJake what does that mean for the minus to be wrapped in parentheses?
psch m: say ('a' .. 'z' (-) <a e i o u>).keys
camelia rakudo-moar fe5b30: OUTPUT«Method 'z' not found for invocant of class 'Str'␤ in block <unit> at /tmp/BWpwBpzFWA:1␤␤»
zengargoyle yeah, could have sworn i saw it without keys and thought it worked on lists as well as Set
psch m: say (('a' .. 'z') (-) <a e i o u>).keys
camelia rakudo-moar fe5b30: OUTPUT«(p n k r l c q g b x s j t m y w v h z f d)␤»
psch m: say (('a' .. 'z') (-) <a e i o u>).
camelia rakudo-moar fe5b30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/We9ILcVI9T␤Missing required term after infix␤at /tmp/We9ILcVI9T:1␤------> 3say (('a' .. 'z') (-) <a e i o u>).7⏏5<EOL>␤ expecting any of:␤ dotty method or postfix␤»
psch m: say (('a' .. 'z') (-) <a e i o u>)
camelia rakudo-moar fe5b30: OUTPUT«set(p, n, k, r, l, c, q, g, b, x, s, j, t, m, y, w, v, h, z, f, d)␤»
psch MadcapJake: set operation
MadcapJake: that's why i said "if i had a compose key", 'cause we of course have that in unicodey 05:36
zengargoyle like that probably
psch .u set substraction
yoleaux No characters found
psch .u set
yoleaux U+0088 CHARACTER TABULATION SET [Cc] (<control>)
U+008A LINE TABULATION SET [Cc] (<control>)
U+0093 SET TRANSMIT STATE [Cc] (<control>)
psch .u set minus
yoleaux U+2216 SET MINUS [Sm] (∖)
05:36 telex left
psch there 05:36
(i hope, doesn't render here :) )
MadcapJake oh, and the round parentheses signify a set?
psch m: say ("a".."z") ∖ <a e i o u>
camelia rakudo-moar fe5b30: OUTPUT«set(p, n, k, r, l, c, q, g, b, x, s, j, t, m, y, w, v, h, z, f, d)␤»
psch MadcapJake: no, ("a".."z", "A".."Z") is just a List 05:37
MadcapJake m: say ("a".."z").WHAT
camelia rakudo-moar fe5b30: OUTPUT«(Range)␤»
MadcapJake ok xD
psch m: say ("a".."z", "A".."Z").WHAT
camelia rakudo-moar fe5b30: OUTPUT«(List)␤»
MadcapJake cool that you can just do set operations on a list 05:38
05:38 telex joined
MadcapJake why the call to `keys`? Isn't that just for pairs? 05:38
psch m: set(1,2,3).say
camelia rakudo-moar fe5b30: OUTPUT«set(3, 1, 2)␤»
psch m: set(1,2,3).list.say 05:39
camelia rakudo-moar fe5b30: OUTPUT«(3 => True 1 => True 2 => True)␤»
MadcapJake ohhh, so the `(-)` turns it into a set?
psch ^^^ that's why .keys
yeah, the list gets promoted to a set, and the .keys call gives turns it back into a List
i'd guess in hindsight that the .cache call in that line isn't neccessary.. 05:40
MadcapJake interesting, is there a situation where the value of a set pair would be `False`?
psch m: my $word = "foobar"; $word.comb(/./).rotate(1).say
camelia rakudo-moar fe5b30: OUTPUT«Method 'rotate' not found for invocant of class 'Seq'␤ in block <unit> at /tmp/kQUBA1oRDD:1␤␤»
psch MadcapJake: well, the value means "it's in the set", afair
MadcapJake oh ok, hehe, kind of tautological 05:41
zengargoyle ah, when i saw it without keys it was later .pick()'d to get a value.
so stayed a Set 05:42
MadcapJake That rotated line is really spiffy. Surprisingly readable too! 05:43
psch that line definitely needs the .cache call, as shown above
05:44 dayangkun_ joined
MadcapJake so `comb` returns a seq then 05:44
psch m: my $a = "abc".comb: /./; say $a; say $A
camelia rakudo-moar fe5b30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xnQSEK7GCI␤Variable '$A' is not declared␤at /tmp/xnQSEK7GCI:1␤------> 3my $a = "abc".comb: /./; say $a; say 7⏏5$A␤»
psch m: my $a = "abc".comb: /./; say $a; say $a
camelia rakudo-moar fe5b30: OUTPUT«(a b c)␤(a b c)␤»
05:44 vendethiel left
psch m: my $a = "abc".comb: /./; say $a.WHAT 05:44
camelia rakudo-moar fe5b30: OUTPUT«(Seq)␤»
psch well, it seems like the already consumed stuff got hidden quite well by now 05:45
oh wait, assignment..?
MadcapJake I've got to sit down and figure out what returns a seq and what returns a list. Is there any nice rundown of that on the internet somewhere?
psch m: my $a := "abc".comb: /./; say $a; say $a
camelia rakudo-moar fe5b30: OUTPUT«(a b c)␤(a b c)␤»
psch MadcapJake: in general, Seq is mostly supposed to be transparent i think
05:46 dayangkun left
psch m: my \a := "abc".comb: /./; say a; say a 05:46
camelia rakudo-moar fe5b30: OUTPUT«(a b c)␤(a b c)␤»
psch vOV
no idea where that exception still happens, if it all
MadcapJake well that's good but in what situations are you going to need a `cache` method call? 05:48
zengargoyle m: my $a = "abc".comb.grep: /b/; say @$a; say @$a;
camelia rakudo-moar fe5b30: OUTPUT«(b)␤(b)␤»
zengargoyle i think sometimes it depends on the length of the list and whether it's small enough to be done at once vs turned into a Seq
psch m: my $a := "a".."z".comb; say $a; say $a 05:49
camelia rakudo-moar fe5b30: OUTPUT«Seq objects are not valid endpoints for Ranges␤ in block <unit> at /tmp/Jo67DDU2ZU:1␤␤»
psch m: my $a := ("a".."z").comb; say $a; say $a
camelia rakudo-moar fe5b30: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z)␤(a b c d e f g h i j k l m n o p q r s t u v w x y z)␤»
psch m: my $a := ("a".."z").comb; say $a.elems
camelia rakudo-moar fe5b30: OUTPUT«51␤»
psch m: my $a := ("a".."z").comb; say $a.WHAT
camelia rakudo-moar fe5b30: OUTPUT«(Seq)␤»
psch MadcapJake: there unfortunately i can only say "when it complains that Seq doesn't have the method you want to call" :/ 05:50
m: my $a = ("a".."z").comb(/./); $a.WHAT.say 05:51
camelia rakudo-moar fe5b30: OUTPUT«(Seq)␤»
psch m: my @a = ("a".."z").comb(/./); @a.WHAT.say
camelia rakudo-moar fe5b30: OUTPUT«(Array)␤»
zengargoyle m: my $a = 'abc'.comb; my $b = $a.grep(/b/); say $a; 05:53
camelia rakudo-moar fe5b30: OUTPUT«This Seq has already been iterated, and its values consumed␤ in block <unit> at /tmp/r9YkznBiQM:1␤␤»
zengargoyle BAM
m: my $a = 'abc'.comb.cache; my $b = $a.grep(/b/); say $a;
camelia rakudo-moar fe5b30: OUTPUT«(a b c)␤»
psch ah, so &say doesn't consume a Seq anymore 05:54
that seems a little bit magical, if that's really the cause
i suppose .gist is behind that
zengargoyle all i know is that it hits me when i least expect it. :P
psch m: my $a = "abc".comb; print $a; print $a
camelia rakudo-moar fe5b30: OUTPUT«a b ca b c»
psch m: my $a = "abc".comb; .print for $a; .print for $a
camelia rakudo-moar fe5b30: OUTPUT«abcThis Seq has already been iterated, and its values consumed␤ in block <unit> at /tmp/QE0ohYRYLG:1␤␤»
psch mhm, it's kind of understandable to me why it happens, still a tiny bit inconvenient though 05:55
zengargoyle m: my $a = ('a'..'z').comb; print $a; print $a;
camelia rakudo-moar fe5b30: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y za b c d e f g h i j k l m n o p q r s t u v w x y z»
psch as in, whenever you don't enforce context onto something iterate-y, you still have the Seq 05:56
and if you iterate over a Seq more than once it complains
where "something iterate-y" means "something that could be lazy"
dalek kudo/nom: 52e5dd2 | TimToady++ | src/Perl6/Grammar.nqp:
implement autogen of meta nouns
06:32
ast: 481a9eb | TimToady++ | S03-metaops/ (6 files):
add tests for autogen of metaops
TimToady that turned out to be easier than I expected 06:33
06:43 rarara joined
TimToady though poking the symbol into $*UNIT is probably wrongish, now that I think about it, since a subscope could have overridden the base op, and that should not leak out to outer scopes 06:45
dalek kudo/nom: 2856ed3 | TimToady++ | src/Perl6/Grammar.nqp:
autogen should go into current scope, not unit

Since a meta depends on the current base op, and that can be shadowed inside a scope, we should only install the autogen into the current lexical scope, and let outer scopes do their own autogen with (presumably) different base ops.
06:48
rarara Good morning
TimToady it's not morning for 12 minutes yet :) 06:49
rarara Good *
:)
baest TimToady: in which timezone? 06:51
rarara Also here the sky is still reddish
TimToady baest: PDT, at least till Sunday 06:52
baest :) 06:53
I feel like it's morning here in CET
rarara Idem 06:54
Can somebody explain me the difference between the following two pieces of code? 06:59
my @a=(List(1,2,3), Seq(1,2,3)); for @a -> @b ($c, $d, $e) { say @b.WHAT; }
and my @a=(List(1,2,3), Seq(1,2,3)); for @a -> $b ($c, $d, $e) { say $b.WHAT; }
only the former works
dalek ast: 11681b8 | TimToady++ | S03-metaops/reverse.t:
make sure autogen scopes to current block only
TimToady @ caches the sequence automatically, $ does not 07:02
the error message is a bit LTA though 07:03
07:05 FROGGS joined
rarara Thanks 07:08
07:08 diana_olhovik_ joined
rarara TimToady: wouldn' be better for the subsignature to just consume the Seq? 07:13
in analogy to: my @a=(List(1,2,3), Seq(4,5,6)); my ($c, $d, $e) = @a[1]; say $d;
well, they are not really the same (the assignment doesn't check the correct number of elements) 07:14
TimToady you'd think so, but maybe jnthn++ has a good reason why not 07:15
07:15 adhoc left
TimToady m: my &f = &prefix:<[**]>; say f(2,3,4) 07:18
camelia rakudo-moar 52e5dd: OUTPUT«2417851639229258349412352␤»
TimToady m: my &f = &prefix:<[R**]>; say f(2,3,4)
camelia rakudo-moar 52e5dd: OUTPUT«262144␤»
TimToady m: my &f = &prefix:<[RR**]>; say f(2,3,4)
camelia rakudo-moar 52e5dd: OUTPUT«2417851639229258349412352␤»
TimToady m: my &f = &prefix:<[-«]>; say f(2,3,4) 07:19
camelia rakudo-moar 52e5dd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cIf7c8pHCS␤Undeclared routine:␤ &prefix:<[-«]> used at line 1. Did you mean '&prefix:<~>', '&prefix:<temp>', '&prefix:<->', '&prefix:<so>', '&prefix:<+>'?␤␤»
TimToady m: my &f = &prefix:<-«>; say f(2,3,4)
camelia rakudo-moar 52e5dd: OUTPUT«Too many positionals passed; expected 0 or 1 arguments but got 3␤ in block <unit> at /tmp/TsYjBrT4V6:1␤␤»
TimToady hmm, bug, I guess 07:20
ShimmerFairy Is there a way to make enums not poison their surrounding scope? I'd prefer not seeing a screen of warnings every time, especially since I don't want unqualified enum values in the first place :)
TimToady m: my &f = &prefix:<-«>; say f((2,3,4))
camelia rakudo-moar 52e5dd: OUTPUT«-3␤»
TimToady maybe 'quietly' will work for that? 07:22
07:23 rarara left
TimToady speaking of quietly, bed & 07:23
ShimmerFairy Just tried it, and quietly { } does nothing :/ 07:24
07:30 darutoko joined
[Tux] test 50000 37.186 37.074 07:42
test-t 50000 38.861 38.750
moritz \o 07:45
[ptc] o/ 07:50
07:58 rindolf joined, TimToady left, rarara joined 08:00 TimToady joined 08:05 [Sno] left 08:06 [Sno] joined 08:12 Actualeyes left 08:16 espadrine joined 08:22 ely-se joined 08:26 softmoth left 08:27 pollei left 08:29 MARTIMM joined
mrf good * #perl6 08:37
moritz good morning, mrf 08:39
m: my constant MyEnum = anon enum <A B C>; say MyEnum::A 08:41
camelia rakudo-moar 2856ed: OUTPUT«Cannot call method 'AT-KEY' on a null object␤ in block <unit> at /tmp/pJhlUnV7hk:1␤␤»
moritz m: my constant MyEnum = anon enum <A B C>; say MyEnum.A
camelia rakudo-moar 2856ed: OUTPUT«Method 'A' not found for invocant of class 'Map'␤ in block <unit> at /tmp/BDEEkkhsRV:1␤␤»
moritz m: my constant MyEnum = anon enum MyEnum <A B C>; say MyEnum::A
camelia rakudo-moar 2856ed: OUTPUT«Cannot call method 'AT-KEY' on a null object␤ in block <unit> at /tmp/S1e47506Yj:1␤␤»
moritz :(
MARTIMM Goodmorning to you all 08:47
Found the following after install of the newest rakudo
my Array $a = Buf.new(^10).list
Type check failed in assignment to $a; expected Array but got List
in block <unit> at <unknown file>:1
Previously it was alright 08:48
moritz MARTIMM: well, it's called .list, so returning a List is fine
MARTIMM: Array is a subtype of List, so returning Array was also fine; but it was more like an implementation detail
MARTIMM it is more understandable as it is now. Need to change a lot of code because of this, so just checking. 08:51
is there a way to coerce it from Buf to Array. I can use that for time being 08:52
moritz m: say Buf.new(*^10).Array 08:55
camelia rakudo-moar 2856ed: OUTPUT«This type cannot unbox to a native integer␤ in any at gen/moar/m-Metamodel.nqp:1674␤ in block <unit> at /tmp/j7m0nOsGKe:1␤␤»
moritz m: say Buf.new(*^10).list.Array 08:56
camelia rakudo-moar 2856ed: OUTPUT«This type cannot unbox to a native integer␤ in any at gen/moar/m-Metamodel.nqp:1674␤ in block <unit> at /tmp/8maZQUeRqo:1␤␤»
moritz m: say my @ = Buf.new(*^10).list
camelia rakudo-moar 2856ed: OUTPUT«This type cannot unbox to a native integer␤ in any at gen/moar/m-Metamodel.nqp:1674␤ in block <unit> at /tmp/sEDrfFAOPV:1␤␤»
moritz m: say Buf.new(*^10).list
camelia rakudo-moar 2856ed: OUTPUT«This type cannot unbox to a native integer␤ in any at gen/moar/m-Metamodel.nqp:1674␤ in block <unit> at /tmp/7YrOesoHmF:1␤␤»
moritz eeks
oh
it's the *
m: say Buf.new(^10).list
camelia rakudo-moar 2856ed: OUTPUT«(0 1 2 3 4 5 6 7 8 9)␤»
moritz m: say Buf.new(^10).Array
camelia rakudo-moar 2856ed: OUTPUT«[0 1 2 3 4 5 6 7 8 9]␤»
moritz m: say Buf.new(^10).Array.^name
camelia rakudo-moar 2856ed: OUTPUT«Array␤»
moritz MARTIMM: .Array seems to work fine
08:57 ecocode joined 08:58 RabidGravy joined 09:00 g4 joined, g4 left, g4 joined 09:04 ely-se left, ely-se joined 09:05 duncan_dmg joined
kmel_ m: say 'Hola'; 09:06
camelia rakudo-moar 2856ed: OUTPUT«Hola␤»
RabidGravy yo 09:10
MARTIMM Thanks very much, I've tried it and works
09:13 zakharyas joined
MARTIMM moritz Thanks very much, I've tried it and works(i am an irc neewbe) 09:13
RabidGravy tadzik++ # JSON::Unmarshal all good now
09:15 adhoc joined 09:17 _mg_ joined
RabidGravy who was it the other day was evincing some reluctance to learn git? xkcd.com/1597/ 09:20