Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-22

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 masak oh, I've kvetched about that before, it seems: https://rt.perl.org/Ticket/Display.html?id=62086
00:01 jnthn masak: Why can't it be caught with a CATCH?
00:06 jnthn masak: Also, you're free to override FAILGOAL...
00:06 masak I don't rightly know why it can't be. I'm having trouble reproducing the error in golfed code.
00:07 masak m: grammar G { regex TOP { a ~ c <foo> }; regex foo { b } }; say ?G.parse("abc"); say ?G.parse("adc")
00:07 camelia rakudo-moar 20aa85: OUTPUT«True␤False␤»
00:07 masak this one doesn't throw, it just fails (as I'd prefer it always to)
00:08 jnthn Yes, it fails before it reaches the goal, so we've left the regex before trying the goal.
00:09 masak ah, you have to try the goal. I see.
00:09 masak m: grammar G { regex TOP { a ~ c <foo> }; regex foo { b } }; say ?G.parse("abc"); say ?G.parse("abbc")
00:09 camelia rakudo-moar 20aa85: OUTPUT«True␤Unable to parse expression in TOP; couldn't find final c ␤  in regex TOP at /tmp/_jZibASXNg:1␤  in method parse at src/gen/m-CORE.setting:14714␤  in block <unit> at /tmp/_jZibASXNg:1␤␤»
00:09 masak a-ha.
00:10 masak m: grammar G { regex TOP { a ~ c <foo> }; regex foo { b } }; say ?G.parse("abbc"); CATCH { when X::AdHoc { say "caught" } }
00:10 camelia rakudo-moar 20aa85: OUTPUT«caught␤»
00:10 masak ok, here I *could* catch it. weird.
00:10 jnthn In all the cases we use it for in the Perl 6 grammar, it'd be useless if it didn't throw, fwiw.
00:10 * masak adds that to the ticket
00:11 jnthn Of course, I guess we could have a default FAILGOAL that just fails and override it with one that throws.
00:12 jnthn Sleep, maybe... :)
00:13 masak if all outcomes of a grammar return a failed Match object *except* for FAILGOAL, then I'd like there to be a good theoretical explanation for FAILGOAL behaving differently.
00:13 masak and not just "we need to convey an error message here, so throwing an exception feels right"
00:14 jnthn panic is another example
00:14 masak categorically, it's still just a failed match. it feels like with the current setup, we're committing a category error.
00:15 masak or rather, what precise thing is it that makes a parse failure so severe that it promotes from "falsy" to "die"?
00:16 masak right now, from what I can see, the need to attach an error message.
00:17 jnthn That, and also wanting to give up at that point because there's no sane way to proceed and you'd never want something further up to try another path.
00:17 masak oh, right. control flow.
00:18 masak still, a use case I mention in earlier parts of that ticket is "I just want to parse something in order to find out whether it's valid or not". having to deal with three-valued logic in that case is just... cruft.
00:19 jnthn Then don't use ~
00:19 masak I suppose.
00:21 jnthn Time for some rest...'night
00:28 ab5tract hmmm.. i have a strong feeling that it's very easy to write $coordinates.classify( ... )  where the mapper returns coordinates the keyed on fractional sections (quadrants being an obvious example)
00:28 ab5tract but it's definitely eluding me
00:33 ab5tract m: (5,2,6,7).classify({ $_ < (*/4 * 10) }) # ballistic programming
00:33 camelia rakudo-moar 20aa85: ( no output )
00:34 masak ab5tract: this seems to work:
00:34 masak m: my @coords = [1, 1], [2, 3], [-1, 1], [-1, -1], [1, -1]; say @coords.classify(-> $c { floor(atan2($c[0], $c[1]) / pi * 2) + 2 }).perl
00:34 camelia rakudo-moar 20aa85: OUTPUT«Hash[Any,Any].new(3 => [[1, -1]], 2 => [[1, 1], [2, 3]], 0 => [[-1, -1]], 1 => [[-1, 1]])␤»
00:35 ab5tract ah, nice :)
00:37 masak 'night, #perl6
00:37 ab5tract o/ masak
00:40 novice777 joined #perl6
00:53 ajr joined #perl6
00:57 novice777 Why extra char counts in lines.chars vs slurp.chars ? bash: echo 1 >>1;  echo 1 >>1; perl6 -e 'say slurp.chars' 1; perl6 -e 'say lines.chars' 1 # 4 and 3
00:58 tinyblak joined #perl6
01:00 jercos novice777: .chars on a list of strings seems to cast to Str, which in turn seems to join the array on spaces.
01:00 jercos so one is "1\n1\n".chars, the other is "1 1".chars
01:00 jercos m: "1\n1\n".lines.chars
01:00 camelia rakudo-moar 20aa85: ( no output )
01:00 jercos erm
01:00 jercos m: say "1\n1\n".lines.chars
01:00 camelia rakudo-moar 20aa85: OUTPUT«3␤»
01:02 mephinet- joined #perl6
01:05 ggherdov joined #perl6
01:08 ajr_ joined #perl6
01:09 lue joined #perl6
01:10 raydiak m: say slurp.chars
01:10 camelia rakudo-moar 20aa85: OUTPUT«1134␤»
01:10 raydiak m: say lines.join("\n").chars
01:10 camelia rakudo-moar 20aa85: OUTPUT«1133␤»
01:10 yeahnoob joined #perl6
01:11 raydiak m: say slurp.substr(*-1,1).perl
01:11 camelia rakudo-moar 20aa85: OUTPUT«"\n"␤»
01:14 raydiak m: say +lines
01:14 camelia rakudo-moar 20aa85: OUTPUT«20␤»
01:15 psch m: say +"1\n2\n\n\n\n\n".lines
01:15 camelia rakudo-moar 20aa85: OUTPUT«6␤»
01:15 psch ah, misunderstood the docs
01:15 raydiak wait thats not right
01:15 psch "without trailing new line characters" refers to the lines, not the file
01:15 raydiak ah I see
01:16 raydiak m: say "\n".lines
01:16 camelia rakudo-moar 20aa85: OUTPUT«␤»
01:16 raydiak m: say "\n".lines.Numeric
01:16 camelia rakudo-moar 20aa85: OUTPUT«1␤»
01:16 raydiak m: say "n".lines.Numeric
01:16 camelia rakudo-moar 20aa85: OUTPUT«1␤»
01:16 raydiak m: say "n\n".lines.Numeric
01:16 camelia rakudo-moar 20aa85: OUTPUT«1␤»
01:17 raydiak m: say "n\n\n".lines.Numeric
01:17 camelia rakudo-moar 20aa85: OUTPUT«2␤»
01:17 raydiak so it chomps off only the last newline of the whole input
01:18 dayangkun joined #perl6
01:18 psch jercos++ explanation was spot on i think
01:18 psch "1\n1\n".lines is 3 chars because chars does (the equivalent of) .join(" ")
01:19 psch and .lines does .split("\n") (or .comb(/ ^^ \N*/), as the docs say)
01:19 psch that split is probably not quite equivalent to the comb... :)
01:20 psch .slurp leaves all the \n in place, and each counts as one char
01:23 ajr_ joined #perl6
01:33 tinyblak joined #perl6
01:35 lue joined #perl6
01:38 BenGoldberg m: "\ntrailingtext".lines.Numeric
01:38 camelia rakudo-moar 20aa85: ( no output )
01:38 BenGoldberg m: "\ntrailingtext".lines.Numeric.say
01:38 camelia rakudo-moar 20aa85: OUTPUT«2␤»
01:56 davido_ joined #perl6
01:57 rhr_ joined #perl6
01:58 itz_ joined #perl6
01:58 cxreg2 joined #perl6
01:59 pecastro_ joined #perl6
01:59 ingy1 joined #perl6
01:59 Shozan joined #perl6
02:05 araujo_ joined #perl6
02:06 vukcrni joined #perl6
02:07 camelia joined #perl6
02:21 tinyblak_ joined #perl6
02:24 chenryn joined #perl6
03:07 dalek rakudo-star-daily: 2d7ed39 | coke++ | log/ (9 files):
03:07 dalek rakudo-star-daily: today (automated commit)
03:07 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/2d7ed39b48
03:12 [Coke] release tomorrow. Please look over the changelog
03:18 Patterner joined #perl6
03:20 dalek rakudo/nom: 2e44436 | (Geoffrey Broadwell)++ | src/core/Failure.pm:
03:20 dalek rakudo/nom: Add die(Failure:D) and die(Failure:U) multis
03:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2e44436f31
03:24 dalek rakudo/nom: 5f89979 | (Geoffrey Broadwell)++ | docs/ChangeLog:
03:24 dalek rakudo/nom: Add a ChangeLog entry for die(Failure) change
03:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5f89979ee5
03:29 chenryn joined #perl6
03:54 noganex_ joined #perl6
03:55 yeahnoob joined #perl6
03:56 yeahnoob joined #perl6
03:57 yeahnoob joined #perl6
03:57 yeahnoob joined #perl6
03:58 yeahnoob joined #perl6
03:59 yeahnoob joined #perl6
04:00 tadzik joined #perl6
04:13 chenryn joined #perl6
04:14 anaeem1_ joined #perl6
04:15 anaeem1_ joined #perl6
04:18 anaeem1_ joined #perl6
04:19 Mouq joined #perl6
04:23 Mouq masak/jnthn/TimToady: I've thought about this before: how much overhead would it be to have the Match object itself contain the failure?
04:24 Mouq The semantic consequences of that would have to be figured out, but one possibilitiy is to specify whether of not the exception gets thrown by default can be specified by a ":fatal" regex adverb or some such
04:27 Mouq The failure could also have a "highwater" in it by default, which would be useful for simple debugging without having to pull out one of the debugging modules right away. "Why the *** didn't this parse?! well, I'll just set the regex to fatal/die with the match's exception."
04:31 yeahnoob joined #perl6
04:47 chenryn joined #perl6
05:46 chenryn joined #perl6
05:47 tinyblak joined #perl6
05:48 anaeem1__ joined #perl6
05:50 yeahnoob joined #perl6
05:51 yeahnoob joined #perl6
05:53 anaeem1_ joined #perl6
05:59 mvuets joined #perl6
06:08 tinyblak_ joined #perl6
06:31 anaeem1 joined #perl6
06:33 anaeem___ joined #perl6
06:36 yeahnoob joined #perl6
06:37 yeahnoob joined #perl6
06:40 anaeem1_ joined #perl6
06:40 rindolf joined #perl6
06:42 rurban joined #perl6
06:43 bjz joined #perl6
06:44 |Tux| joined #perl6
06:48 bjz joined #perl6
06:52 booly-yam-6137 joined #perl6
06:59 kaleem joined #perl6
07:10 telex joined #perl6
07:10 xfix joined #perl6
07:12 bjz joined #perl6
07:13 Rounin joined #perl6
07:23 tinyblak joined #perl6
07:27 abraxxa1 joined #perl6
07:29 darutoko joined #perl6
07:30 * TimToady is sad he had to use EVAL in http://rosettacode.org/wiki/Dice_game_probabilities#Perl_6
07:30 TimToady but xx doesn't seem to make parcels correctly yet
07:30 tinyblak_ joined #perl6
07:31 xfix Then it should be fixed to not require EVAL.
07:34 TimToady m: say ((1..4) xx 3).perl
07:34 camelia rakudo-moar 5f8997: OUTPUT«(1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4).list␤»
07:36 TimToady m: say ((1..4) xx 3).tree.perl
07:36 camelia rakudo-moar 5f8997: OUTPUT«(1; 2; 3; 4; 1; 2; 3; 4; 1; 2; 3; 4).item␤»
07:37 TimToady m: say ({1..4} xx 3)».().perl
07:37 camelia rakudo-moar 5f8997: OUTPUT«(1..4, 1..4, 1..4)␤»
07:38 TimToady m: say [X+] ({1..4} xx 3)».()
07:38 camelia rakudo-moar 5f8997: OUTPUT«1 2 3 4 1 2 3 4 1 2 3 4␤»
07:39 TimToady ah well, maybe tomorrow
07:40 TimToady but we need to make sure we can do X on arbitrary numbers of lists
07:40 tinyblak joined #perl6
07:44 TimToady m: say [X+] 1..4, 1..4, 1..4
07:44 camelia rakudo-moar 5f8997: OUTPUT«3 4 5 6 4 5 6 7 5 6 7 8 6 7 8 9 4 5 6 7 5 6 7 8 6 7 8 9 7 8 9 10 5 6 7 8 6 7 8 9 7 8 9 10 8 9 10 11 6 7 8 9 7 8 9 10 8 9 10 11 9 10 11 12␤»
07:44 TimToady there it works
07:45 TimToady m: say [X+] |({1..4} xx 3)».()
07:45 camelia rakudo-moar 5f8997: OUTPUT«3 4 5 6 4 5 6 7 5 6 7 8 6 7 8 9 4 5 6 7 5 6 7 8 6 7 8 9 7 8 9 10 5 6 7 8 6 7 8 9 7 8 9 10 8 9 10 11 6 7 8 9 7 8 9 10 8 9 10 11 9 10 11 12␤»
07:45 TimToady ooh, there it does too
07:46 TimToady though the .() workaround is almost as bad as EVAL
07:50 TimToady m: say [X+] |((1..4).Parcel xx 3)
07:50 camelia rakudo-moar 5f8997: OUTPUT«3 4 5 6 4 5 6 7 5 6 7 8 6 7 8 9 4 5 6 7 5 6 7 8 6 7 8 9 7 8 9 10 5 6 7 8 6 7 8 9 7 8 9 10 8 9 10 11 6 7 8 9 7 8 9 10 8 9 10 11 9 10 11 12␤»
07:50 TimToady I guess there's another way
07:51 TimToady m: say [X+] |((1..4,) xx 3)
07:51 camelia rakudo-moar 5f8997: OUTPUT«3 4 5 6 4 5 6 7 5 6 7 8 6 7 8 9 4 5 6 7 5 6 7 8 6 7 8 9 7 8 9 10 5 6 7 8 6 7 8 9 7 8 9 10 8 9 10 11 6 7 8 9 7 8 9 10 8 9 10 11 9 10 11 12␤»
07:51 TimToady oh, cool, that's much better
07:54 TimToady fixed
07:57 TimToady m: say [X+] |((1...4) xx 3)
07:57 camelia rakudo-moar 5f8997: OUTPUT«30␤»
07:57 TimToady m: say [X+] |((1...4,) xx 3)
07:57 camelia rakudo-moar 5f8997: OUTPUT«30␤»
07:58 TimToady nope gotta be a Parcel
07:58 TimToady we'll probably have to revisit this when parcels go away
08:00 [Sno] joined #perl6
08:06 tinyblak_ joined #perl6
08:07 zakharyas joined #perl6
08:09 prime joined #perl6
08:11 FROGGS joined #perl6
08:13 yeahnoob joined #perl6
08:15 chenryn joined #perl6
08:18 kjs__ joined #perl6
08:21 bartolin good morning, #perl6
08:22 bartolin I tried the new parrot version (7.0.0) and had clean spectests on debian 7 and freebsd 10.1
08:22 bartolin also stage parse went down from 114 to 106
08:22 bartolin rurban++
08:22 booly-yam-6137 joined #perl6
08:23 bartolin maybe it's time for a parrot bump after the next compiler release?
08:27 Kristien joined #perl6
08:30 rurban bartolin: But I just found a serious optimizer regression in parrot. probably pushing a 7.0.1
08:30 rurban https://github.com/parrot/parrot/issues/1186 and https://github.com/parrot/parrot/issues/1187 seem to be critical
08:31 rurban With cc -O3 nasty bugs turned up
08:33 bartolin rurban: oh. thanks for the note! I'll try again with 7.0.1 then
08:36 rurban But the parrot perfomance is up by ~15%, yes
08:37 denis_boyun_ joined #perl6
08:46 Kristien Should I use Parrot or MoarVM?
08:51 lizmat Kristien: yes
08:51 lizmat :-)
08:52 lizmat for me, when developing core features, there is no competition: MoarVM
08:52 FROGGS Kristien: you can install both (or trice, with JVM)... and then pick what you like most
08:52 lizmat simply for the fact that a build on Moar takes < 1 minute, and the spectest on Moar takes ~ 200 seconds
08:53 lizmat compared to parrot (build time ~ 2.5 minutes, spectest ~ 8 minutes)
08:53 Kristien I'll install all of them. :P
08:53 FROGGS you'll get a perl6-p, perl6-m and perl6-j..., and perl6 would point to the the backend that's supplied as the first to --backends= when you run configure
08:53 Kristien nice
08:54 Kristien I need MoarVM or JVM so I can play with Proc::Async
08:54 Kristien not yet supported on Parrot
08:59 moritz rakudo-moar is generally moar fun to play with
08:59 moritz shorter startup time, less memory used
09:00 Kristien OK
09:01 yeahnoob joined #perl6
09:02 yeahnoob joined #perl6
09:03 yeahnoob joined #perl6
09:03 dalek rakudo/nom: a8e384c | lizmat++ | src/core/ (2 files):
09:03 dalek rakudo/nom: Revert "Make EnumMap a first class citizen, skids++"
09:03 dalek rakudo/nom:
09:03 dalek rakudo/nom: Push this unfinished fuctionality to the next release, so that we can make sure
09:03 dalek rakudo/nom: that EnumMaps stay immutable.
09:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a8e384cfa1
09:03 dalek rakudo/nom: 62ffab6 | lizmat++ | / (4 files):
09:03 dalek rakudo/nom: Revert "Introduce Rangeint: simple integer ranges like ^10"
09:03 dalek rakudo/nom:
09:03 dalek rakudo/nom: This feature needs more thought, and possibly reimplementation after the GLR
09:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/62ffab662b
09:04 yeahnoob joined #perl6
09:04 yeahnoob joined #perl6
09:09 kjs__ joined #perl6
09:10 dalek rakudo/nom: 4cb196f | lizmat++ | docs/ChangeLog:
09:10 dalek rakudo/nom: Add some more Changelog entries
09:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4cb196f698
09:10 lizmat wrt to naming this release: Brussels (as in Bruxelles) was already used in #42
09:11 lizmat although technically not a PM group, we *will* see a lot of Perl Mongers at next week's FOSDEM
09:12 lizmat so maybe naming the release FOSDEM would be an idea?
09:12 lizmat .oO( talk about your Conference Driven Development :-)
09:16 jnthn mornig, #perl6
09:16 jnthn uh, morning
09:17 booly-yam-6137_ joined #perl6
09:19 lizmat jnthn o/
09:23 dalek rakudo/nom: 23c9634 | jnthn++ | docs/ChangeLog:
09:23 dalek rakudo/nom: Another few ChangeLog entries.
09:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/23c9634f13
09:23 Kristien OK installed all Rakudo backends
09:24 Otterpocket joined #perl6
09:28 lizmat afk for a few hours
09:28 molaf_ joined #perl6
09:30 brrt joined #perl6
09:36 dakkar joined #perl6
09:36 Kristien m: class B { has Array @!x; method new { my @x = 1, 2; self.bless(:@x); }; method f { say @!x; } }; B.new.f
09:36 camelia rakudo-moar 62ffab: OUTPUT«␤»
09:36 Kristien I expected 1, 2 as output TBH
09:42 donaldh joined #perl6
09:44 fhelmberger joined #perl6
09:47 timotimo are the "many cpu and memory improvements" really rakudo-specific? (i don't know what it refers to, so i'm just blindly assuming it's mostly moarvm and nqp-j improvements?)
09:48 masak good antenoon, #perl6
09:50 jnthn timotimo: lizmat++ did various optimization patches this month, iirc
09:50 Kristien why does bless not raise an error when it can't assign private attributes?
09:50 timotimo oh! right, that was all this month!
09:50 timotimo yays :)
09:50 timotimo lizmat++
09:50 jnthn Kristien: First, has Array @!x would mean an array of arrays; the @ already means array
09:51 Kristien Right. :P
09:52 jnthn The second bit is that all methods don't complain about unknown named arguments (for rationale, see "Interface consistency" section of S12 in the spec, which explains it)
09:53 jnthn And you already guessed that bless is not the way to initialize privates. :)
09:53 jnthn m: class B { has Array @!x = 1, 2; method f { say @!x; } }; B.new.f
09:53 camelia rakudo-moar 62ffab: OUTPUT«Type check failed in assignment to '@!x'; expected 'Array' but got 'Int'␤  in method REIFY at src/gen/m-CORE.setting:9935␤  in method reify at src/gen/m-CORE.setting:8543␤  in method gimme at src/gen/m-CORE.setting:9024␤  in method sink at src/gen/…»
09:53 jnthn m: class B { has @!x = 1, 2; method f { say @!x; } }; B.new.f
09:53 camelia rakudo-moar 62ffab: OUTPUT«1 2␤»
09:53 jnthn There's one way
09:54 jnthn m: class B { has @!x; submethod BUILD() { @!x = 1, 2 }; method f { say @!x; } }; B.new.f
09:54 camelia rakudo-moar 62ffab: OUTPUT«1 2␤»
09:54 jnthn And another.
09:54 Kristien Oh OK.
09:54 Kristien Now it works, thanks.
10:04 nwc10 good UGT orthodoxy, masak
10:05 timotimo have a happy release, everyone :)
10:10 Kristien yay, my first Perl 6 program
10:10 Kristien https://gist.github.com/rightfold/064abbbd0aa5ae25e816
10:12 abraxxa Kristien++ #nice
10:13 brrt that's actually pretty nice, yes :-)
10:13 pecastro joined #perl6
10:16 jnthn Cool!
10:18 abraxxa shouldn't it be named .pl6?
10:20 araujo joined #perl6
10:21 FROGGS abraxxa: that's a matter of taste
10:30 brrt (some progress on rakudo-on-fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1184549)
10:30 brrt i typically use p6
10:30 brrt .p6
10:31 * jnthn tends to do .p6 also
10:31 Kristien I use #! :P
10:31 tadzik I'm a pl person
10:31 tadzik (huehuehue)
10:32 Kristien (saturationsaturationsaturation)
10:35 LLamaRider joined #perl6
10:36 virtualsue joined #perl6
10:43 DarkLoord joined #perl6
10:43 DarkLoord left #perl6
10:44 jmark joined #perl6
10:50 xfix joined #perl6
10:52 FROGGS tadzik: :D
10:53 Ulti m: my @l = 1,2,3; @l Zmin= @l.reverse; say @l;
10:53 camelia rakudo-moar 23c963: OUTPUT«1 2 1␤»
10:53 Ulti Zmin= <--- such operator
10:54 jnthn o.O
10:54 jnthn Such meta.
10:54 Ulti yeah very meta, I was surprised that worked out :3
10:57 panchiniak joined #perl6
11:00 bbkr joined #perl6
11:06 jmark joined #perl6
11:07 jmark left #perl6
11:07 jmark joined #perl6
11:14 jmark p6: say 3;
11:14 camelia rakudo-{parrot,moar} 23c963: OUTPUT«3␤»
11:15 jmark p6: say "This is a newbies test!";
11:15 camelia rakudo-{parrot,moar} 23c963: OUTPUT«This is a newbies test!␤»
11:18 tadzik hello jmark :)
11:21 jmark hi
11:28 panchiniak left #perl6
11:33 booly-yam-6137_ joined #perl6
11:36 gcole joined #perl6
11:40 denis_boyun_ joined #perl6
11:41 lizmat I don't know if this has come up before, but I think in P6 we abuse the range operator for two purposes:
11:42 lizmat as a, what I would call a "looper"   1..42  for instance
11:42 lizmat this is most of the usage in most code
11:42 lizmat and the other is indicating a range of (Real) values,
11:43 jnthn The end-points don't have to be numeric either :)
11:43 lizmat indeed
11:43 jnthn I don't tend to feel it's an abuse of it, though
11:43 lizmat from an optimizations point of view, we cannot know if a .. is going to be used as a looper
11:43 lizmat or as a range
11:44 El_Che what did you guys do to Ovid?
11:44 El_Che on twitter:
11:44 El_Che I strongly recommend *NOT* programming in Perl 6. Do it long enough and you won't want to go back to Perl 5.
11:44 lizmat :-)
11:44 lizmat been there, done that  :-)
11:45 lizmat jnthn: so I was thinking, maybe we should have a different op for ranges (as opposed to loopers)
11:45 jnthn lizmat: True, though we *already* have an optimization that deconstructs it into a while loop
11:45 lizmat yeah, but having a phaser breaks that already
11:45 lizmat my Rangeint opt would give us about 17% for the non-optimized cases
11:46 jnthn That's a fixable problem, though
11:46 lizmat and it could be more than that if we could get rid of needing to account for exclusion at the end points
11:46 lizmat std: 0 >< 3.14  # would that make for a nice range operator ?
11:46 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse quote words at /tmp/7fc12Xh_qZ line 1:â�¤------> [32m0 >[33mâ��[31m< 3.14  # would that make for a nice ran[0mâ�¤Couldn't find final '>'; gave up at /tmp/7fc12Xh_qZ line 1 (EOF):â�¤------> [32mld that make for…»
11:47 Kristien Why does Grammar.match return Any instead of Nil? The documentation says it returns either Match or Nil
11:47 Kristien Grammar.parse*
11:47 lizmat std: "a" >< "z"
11:47 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse quote words at /tmp/qL5LDWScp5 line 1:�------> [32m"a" >[33m�[31m< "z"[0m�Couldn't find final '>'; gave up at /tmp/qL5LDWScp5 line 1 (EOF):�------> [32m"a" >< "z"[33m�[31m<EOL>[0m�Parse failed…»
11:47 jnthn lizmat: I think we can optimize it well enough the way it is, with some more effort.
11:48 lizmat I know we can, but that doesn't solve the conceptual mix  :-(
11:48 jnthn I don't really see it as one.
11:48 jnthn Or, it's never bothered me. We already took two things away from Range's responsibility in the past.
11:48 lizmat ah?  what ?
11:48 JimmyZ http://irclog.perlgeek.de/perl6/2015-01-20#i_9972868 # anyone saw this one?
11:49 jnthn Relative to Perl 5, it doesn't do the flip-flop thing any more (broken out into ff)
11:49 lizmat JimmyZ: how do you see the different codegens ?
11:49 lizmat ah, yes
11:49 JimmyZ lizmat: moar --dump
11:50 JimmyZ and search say op
11:50 jnthn And also ... exists partly to do a bunch of the more complex cases.
11:50 lizmat yeah, and I get that
11:50 jnthn JimmyZ: You'll see it easily enough with --target=optimize too
11:51 lizmat in any case, I thought I'd mention my idea here and see what TimToady / masak / moritz / you would have to say about it
11:52 JimmyZ I think this one is reall a good one to be optimized :)
11:52 JimmyZ not sure how nqp  gens it
11:53 jnthn It's a curious one 'cus the returns annotation is marked up correctly
11:53 jnthn multi sub infix:<~>(str $a, str $b) returns str { nqp::concat($a, $b) }
11:56 dalek Heuristic branch merge: pushed 38 commits to rakudo/newio by lizmat
11:57 rindolf joined #perl6
11:58 masak jmark: welcome :)
12:12 brrt joined #perl6
12:16 regreg joined #perl6
12:17 abraxxa the file extension might make a difference on windows
12:17 abraxxa so standardizing on one is a good idea
12:21 xfix [12:42] <lizmat> and the other is indicating a range of (Real) values,
12:21 xfix It's abused similarly in Ruby.
12:21 Ulti El_Che I agree with that tweet a lot, Perl5 gets really annoying if you've spent a couple of days in Perl6 mindspace
12:22 Ulti though tbf to Perl 5 the same is true when you start Perl6 and things feel different for no reason
12:22 xfix irb(main):009:0> (3..5.6).cover?(5.5)
12:22 xfix => true
12:25 xfix (or alternatively, (3..5.6) === 5.5, which works like 3..5.6 ~~ 5.5 in Perl 6)
12:26 xfix (I mean, 5.5 ~~ 3..5.6)
12:27 rurban joined #perl6
12:32 Kristien joined #perl6
12:38 Rounin joined #perl6
12:47 gcole joined #perl6
12:50 leont joined #perl6
12:57 tinyblak joined #perl6
13:09 lizmat is there a reason why we don't have a "sub" version of "subst" and "match" ?
13:10 kaleem joined #perl6
13:11 lizmat or 'trans'
13:12 lizmat trans is at least specced
13:15 tadzik well, we have ops :)
13:15 timotimo yo TZK!
13:15 tadzik yo!
13:15 timotimo how are you :)
13:15 tadzik pretty well :)
13:15 timotimo glad to hear it
13:16 tadzik more of a gamer than a programmer recently, but trying to get back in shape :P
13:16 timotimo are yo uswimming in tuits? :D
13:16 tadzik well, I gave some away but I still have plenty :)
13:16 timotimo and then you gamed some away, too :)
13:16 tadzik heheh
13:16 tadzik I use them to promote Perl more than to motivate myself :P
13:18 timotimo that sounds totally acceptable :)
13:24 Kristien joined #perl6
13:30 tinyblak_ joined #perl6
13:33 masak tadzik: shouldn't say "gamer"; it's called "hand-eye coordinator" :P
13:33 masak or "senior hand-eye coordination consultant"
13:34 timotimo :D
13:34 tadzik heheh
13:35 tadzik reactive executive
13:36 psch hi #perl6 \o
13:37 psch &rand is such a delightfully chaotic composer
13:39 psch oh, but rand is a term, not a sub
13:39 jnthn "The &rand band! No 2 concerts are ever the same!"
13:39 psch "Pick and the rand band"
13:39 jnthn So relax. It's already better than Nickleback. :P
13:40 timotimo flip a nickle
13:40 psch tbh, i rather liked their song for some time
13:40 timotimo "their song"? :)
13:40 jnthn :D
13:41 psch timotimo: yes, Nickleback is rather uninventive.  similarly as formulaic as Modern Talking
13:41 psch although it's obviously exaggerated for comedic effect :)
13:42 tadzik I like this one: https://www.youtube.com/watch?v=dQw4w9WgXcQ
13:42 psch also, being inventive and not going with what works and what you know is actually pretty hard in general, maybe especially so with music
13:42 lizmat jnthn: nqp::iseq is documented as returning "non-zero" if the parameters are the same
13:42 lizmat jnthn: however, in practice, I see only 1 and 0
13:42 jnthn tadzik: AAARRGGHH!
13:42 tadzik shh, don't ruin it for others :P
13:43 timotimo oh yeah, modern talking!
13:43 lizmat AAARGGGH
13:43 timotimo such a good band
13:43 timotimo tadzik: The uploader has not made this video available in your country.
13:43 tadzik timotimo: ...I don't believe you :o
13:44 timotimo tadzik: https://www.youtube.com/watch?v=5tsLNIHj8xE - this one is better
13:44 * itz_ recommends Arcade Fire for music
13:44 Rounin_ joined #perl6
13:44 moritz the German Internet is full of copyright nazis
13:44 lizmat jnthn: I see an opt in .chomp that could benefit from the 1/0 behaviour of iseq_i
13:44 timotimo hiyo itz
13:44 tadzik ooh, a new one
13:44 timotimo lizmat: multiplication?
13:44 lizmat no, the check for CR if an LF is found
13:44 jnthn lizmat: I'd be reluctant to rely on it
13:44 timotimo ah
13:44 lizmat jnthn: ok, too bad then
13:45 breinbaas joined #perl6
13:50 donaldh jnthn: is there any reason for block lex values to be initialized separately from coderefs ?
13:50 donaldh jnthn: I'm wondering if I can move to annotations as part of exploring lazy init. (on JVM)
13:51 jnthn donaldh: Ordering dependency I think
13:51 jnthn donaldh: We need the coderefs to hand to the deserializer
13:52 jnthn donaldh: But the block lex values depend on deserialization having taken place
13:52 jnthn donaldh: Maybe annotations are lazy enough, though.
13:52 donaldh If I stored everything in annotations then I could be lazy about stitchup after deserialization.
13:53 rurban1 joined #perl6
13:53 jnthn True
13:53 jnthn And for blocks we never call we never bother doing the stitchup
13:53 donaldh zactly
13:54 timotimo is that what moarvm recently got when we introduced VMNull to differentiate between initialized and stores a null value?
13:54 timotimo "recently"
13:54 jnthn timotimo: Well, introducing it made that easier to implement at least.
13:54 donaldh Would be a huge win on constant table size too because the joined block lex value strings are all unique.
13:54 jnthn Yes.
13:56 donaldh First step: store teh blv data in annotations.
13:56 timotimo boulevard data?
13:56 * donaldh thinks that bit looks easy enough
13:57 JimmyZ .oO(port spesh to JVM so we can remove more nqp::ops ...)
13:57 zakharyas joined #perl6
13:58 jnthn JimmyZ: JVM's spesh is called invoke dynamic... :)
13:58 timotimo indeed
13:58 jnthn Combined with all the awesome stuff its JIT does
13:59 JimmyZ will it move nqp::ops like hllize?
13:59 JimmyZ *remove
14:00 * JimmyZ knows nothing about that..
14:02 yeahnoob joined #perl6
14:03 jnthn Not at present, but we could arrange for it.
14:04 * jnthn puts his course writing aside for a bit to do the MoarVM relesae
14:04 Rounin joined #perl6
14:04 masak ooh, release day today? yipee!
14:06 masak AAARGGGH
14:06 timotimo that sounds like a release blocker
14:07 * masak .oO( Rickleback )
14:10 _4d47 joined #perl6
14:27 Kristien joined #perl6
14:47 * donaldh falls into the nqp staging hole
14:47 fhelmberger_ joined #perl6
14:50 * moritz puts a *round* manhole cover over it
14:50 moritz oops, maybe I should have helped donaldh out first
14:52 brrt joined #perl6
14:52 * donaldh carefully primes the nqp staging hole trap for himself
14:52 fhelmberger joined #perl6
15:07 Kristien joined #perl6
15:09 lizmat $ 6 'use test; ok 1'
15:09 lizmat ok 1 -
15:09 lizmat case insensitive file systems  :-(
15:10 lizmat $ 6 'use test; use Test'
15:10 lizmat ===SORRY!===
15:10 lizmat Merging GLOBAL symbols failed: duplicate definition of symbol Test
15:10 lizmat *sigh*
15:12 nwc10 leont: do you have an opinion on the quality of the C++ in llvm? at least, one that you'd want to share :-)
15:13 xfix Which is why Perl 5 has the following code in strict and warnings.
15:13 xfix unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) { my (undef, $f, $l) = caller; die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n"); }
15:13 xfix It's specifically to detect stuff like `use Strict`.
15:14 itz_ I always found it ironic C and C++ compilers had warnings when compiling themself
15:14 brrt for context, let's suppose we'd want to argue for more JIT work on MoarVM.
15:15 moritz brrt: are there successful projects out there using LLVM JIT?
15:15 brrt certainly
15:15 lizmat xfix: I was thinking of keeping the inode of the file loaded
15:15 brrt moritz: just stumbled on http://dev.stephendiehl.com/numpile/
15:15 brrt last year saw apple's 'FTL' javascript compiler
15:16 brrt which was equal aspects huge hack and great success, depending on whom you ask
15:17 brrt rust is built upon llvm, although I wouldn't necessarily say it is a *great* success
15:18 brrt (that is, it took too long even on *my* computer to compile it from source)
15:20 brrt of course, if LLVM doubles our memory footprint, it's hardly an option
15:20 telex joined #perl6
15:25 Woodi joined #perl6
15:25 dalek rakudo/newio: 90c62d3 | lizmat++ | src/core/IO.pm:
15:25 dalek rakudo/newio: Introduce fast TRANSPOSE sub
15:25 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/90c62d3542
15:25 dalek rakudo/newio: a9f8e45 | lizmat++ | src/core/CompUnitRepo/Local/File.pm:
15:25 dalek rakudo/newio: Faster module -> path translation when loading
15:25 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/a9f8e45fb4
15:28 kurahaupo1 joined #perl6
15:38 raiph joined #perl6
15:39 hoelzro o/ #perl6
15:39 masak \o
15:40 psch o/
15:40 FROGGS o\
15:41 moritz |o"
15:42 _4d47 joined #perl6
15:42 FROGGS O.o
15:58 dalek specs/newio: 47aab48 | lizmat++ | S16-io.pod:
15:58 dalek specs/newio: Spec path.i (for unique path identifier)
15:58 dalek specs/newio: review: https://github.com/perl6/specs/commit/47aab48c38
16:02 rurban joined #perl6
16:09 rurban1 joined #perl6
16:09 * donaldh deftly side-steps the nqp staging trap while whistling along to Nickleback
16:11 skids joined #perl6
16:12 dalek nqp: 81e37a1 | moritz++ | tools/build/MOAR_REVISION:
16:12 dalek nqp: bump MOAR_REVISION to 2015.01
16:12 dalek nqp:
16:12 dalek nqp: because we can!
16:12 dalek nqp: review: https://github.com/perl6/nqp/commit/81e37a1e9f
16:14 jnthn .oO( This is how your remind me, of how compiler bootstraps )
16:23 sjn \o
16:23 jnthn o/ sjn
16:24 * sjn found a buglet in rakudobrew :-|
16:25 * jnthn senses trouble brewing...
16:25 moritz troublebrew!
16:25 sjn nah, it's just that the Makefile was missing a rule for "m-clean"
16:26 sjn running Configure.pl again solved it
16:27 sjn (given, I haven't built something with rakudobrew in a good while)
16:28 sjn btw, if any of you are planning on being in Oslo in two weeks, arnsholt will be having a NativeCall workshop for Oslo.pm then :)
16:32 jmark joined #perl6
16:34 jmark_ joined #perl6
16:35 jmark joined #perl6
16:36 jnthn sjn: Sadly not...my only time in Norway in the near future is a short trip to Trondheim.
16:39 mr-foobar joined #perl6
16:40 jmark joined #perl6
16:48 CurtisOvidPoe If I have ‘sub foo( :$field = ‘default’ )’, how do I prevent someone from calling ‘foo( feild => $some_val )’ and silently doing the wrong thing?
16:49 psch m: sub foo( :$field = 'default' ) { say "got $field" }; foo(feild => 'something else')
16:49 camelia rakudo-moar 23c963: OUTPUT«Unexpected named parameter 'feild' passed␤  in sub foo at /tmp/ZbjPqYNrAc:1␤  in block <unit> at /tmp/ZbjPqYNrAc:1␤␤»
16:49 psch CurtisOvidPoe: i suspect you're talking about a method instead of a sub?
16:49 CurtisOvidPoe Yeah, I’m going by memory here :)
16:50 psch CurtisOvidPoe: you can declare :$field as mandatory with a postfix:<!>
16:50 psch m: class Foo { method bar(:$field! = "default) { say "got $field" } }; Foo.bar(feild => "baz")
16:50 camelia rakudo-moar 23c963: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot put default on required parameter $field�at /tmp/AKLEEp3bck:1�------> [32msay "got $field" } }; Foo.bar(feild => "[33m�[31mbaz")[0m�Missing block�at /tmp/AKLEEp3bck:1�------> [32msay "got $field" } }…»
16:50 jnthn That's not the issue
16:50 jnthn http://design.perl6.org/S12.html#Interface_Consistency
16:50 psch ah
16:50 psch also it doesn't even work
16:50 psch requireds don't do default apparently :)
16:50 jnthn It's that methods accept unknown named parameters
16:51 jnthn psch: If it's required, when would you ever have it use the default? :)
16:51 psch jnthn: yes, i hadn't thought about it that much :)
16:51 jnthn ;)
16:51 CurtisOvidPoe So I have no way of preventing someone passing the wrong named arguments rather than falling back to the old Perl 5 way of manually checking?
16:52 jnthn CurtisOvidPoe: That section tells you how to opt out of the interface consistency thing too
16:52 CurtisOvidPoe Ah, I shouldn’t have skimmed it then :)
16:52 jnthn A *lot* of people find this surprising, even if it makes sense from an extensibility perspective...
16:53 CurtisOvidPoe So I have to mark the class “is hidden” to make this work?
16:53 jnthn *nod*
16:53 psch m: class Foo is hidden { method bar(:$field = "default) { say "got $field" } }; Foo.bar(feild => "baz")
16:53 camelia rakudo-moar 23c963: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/6aq9n7ndBr�Missing block�at /tmp/6aq9n7ndBr:1�------> [32msay "got $field" } }; Foo.bar(feild => "[33m�[31mbaz")[0m�»
16:54 jnthn CurtisOvidPoe: Did you get chance to try out the claim-prototype branch yet?
16:55 CurtisOvidPoe Not yet. I saw some discussion of it, but that was it. Is this the case where the consuming class can “claim foo() { … }”
16:55 psch ah, missing "
16:55 jnthn Not there
16:55 jnthn It works in roles
16:56 jnthn The case in your ticket where it didn't complain when you re-ordered the roles now complains about conflict at compile time.
16:56 jnthn And it's possible to put "claim method ..." in a role that wants to resolve a conflict or deliberately hide the behavior from another role it brings in.
16:56 CurtisOvidPoe Does it handle the case of conflicting methods in roles but I need both methods? (this can happen if there is heavy-consumption of 3rd-party roles and is resolved via aliasing the methods)
16:57 CurtisOvidPoe Sweet news about the “complains about conflict” :)
16:57 jnthn Well, you can put what you want in the claim method, so if the answer is "both methods" you can just call both (in whatever order makes sense)
16:57 jnthn (Qualifying them with the role name.)
16:58 CurtisOvidPoe Ah, OK.
16:58 CurtisOvidPoe By the way, where do I find documentation on the “is hidden” trait? I’ve been looking for it.
16:59 jnthn http://doc.perl6.org/routine-trait.html seems to be a broken link :(
17:00 jnthn moritz: Dunno if you know anything about ^^
17:00 jnthn But that's the place it should be documented, anyways...
17:02 jnthn May also fall under "dusty language corners we didn't get to with the docs yet"
17:04 CurtisOvidPoe The internet archive says it never existed.
17:05 CurtisOvidPoe So what does “is hidden” do?
17:06 masak m: class Base { method foo { say "Base" } }; class Deriv is Base { method foo { say "Deriv"; nextsame } }; Deriv.new.foo
17:06 camelia rakudo-moar 23c963: OUTPUT«Deriv␤Base␤»
17:06 masak m: class Base is hidden { method foo { say "Base" } }; class Deriv is Base { method foo { say "Deriv"; nextsame } }; Deriv.new.foo
17:06 camelia rakudo-moar 23c963: OUTPUT«Deriv␤»
17:06 masak CurtisOvidPoe: ^^
17:06 jnthn It means that the method in the class can not be deferred to using nextsame and friends
17:06 jnthn Which is the reason that *%_ is added in the first place.
17:07 jnthn So it also suppresses the generation of the catch-all-unknown-names arg.
17:07 masak m: class A { method foo { say "A" } }; class B is A is hidden { method foo { say "B" } }; class C is B { method foo { say "C" } }; C.new.foo
17:07 camelia rakudo-moar 23c963: OUTPUT«C␤»
17:07 masak seems 'is hidden' hides not just the class, but that entire ancestry path.
17:08 masak (which seems sane.)
17:08 jnthn masak: You didn't do a nextsame anywhere?
17:08 masak oh dang.
17:08 CurtisOvidPoe I think I understand the rational, but that seems to make things worse. If it’s internal code and someone misspells a key, I can fix it. But if I’m supplying public code, I don’t want to deal with bug reports from people who misspell arguments.
17:08 booly-yam-6137_ joined #perl6
17:08 masak m: class A { method foo { say "A" } }; class B is A is hidden { method foo { say "B" } }; class C is B { method foo { say "C"; nextsame } }; C.new.foo
17:08 camelia rakudo-moar 23c963: OUTPUT«C␤A␤»
17:09 masak jnthn++
17:09 masak ok, only the middle class hides itself. ancestors are still visible to `nextsame`.
17:09 CurtisOvidPoe Or am I just totally misunderstanding all of this?
17:09 jnthn CurtisOvidPoe: Well, if you can see the rational and the downsides, I guess you understand it's a trade-off...
17:10 masak I wonder if 'is hidden' can coexist fully with C3 MRO semantics? my guess is 'yes', but it doesn't feel immediate.
17:10 jnthn It is one that gets questioned a lot.
17:10 masak especially in the past few days.
17:10 CurtisOvidPoe I think it sounds like a kludge for inheritance which, if so, is another nail in the coffin I would love to build for inheritance.
17:10 jnthn s/days/years/ :P
17:11 masak I think ultimately it's because nameds are optional. if we changed that (which we're not gonna), then we could be stricter.
17:11 CurtisOvidPoe If I had the skill and the time, I though it would be lovely to build another sister language to Perl called “Cor” and it would *not* have inheritance.
17:11 CurtisOvidPoe Amd it *would* get ignored :)
17:11 masak why "Cor"? is there a pun in there I'm not getting?
17:12 CurtisOvidPoe It sounds like “Core”, but to me, it’s short for “Corinna”, a woman about whom Ovid penned many love poems.
17:12 masak ooh
17:12 * masak .oO( as long as it's not short for "Cortana"... )
17:13 CurtisOvidPoe There’s actually speculation that she might be an alias for the wife from his first marriage. It was an arranged marriage, she didn’t love him, and the marriage ended. Some speculate that he actually was foolish enough to fall in love with his wife and hence wrote so many poems to “Corinna”.
17:13 masak haha, n00b
17:14 CurtisOvidPoe Heh
17:14 CurtisOvidPoe The modern geek’s rebuttal to classical history.
17:14 masak falling in love with your wife! classical rookie mistake!
17:14 masak :P
17:14 CurtisOvidPoe Every time I read about some famous historical figure making a mistake, I’ll have to write “haha, n00b” :)
17:15 masak the older the history, the more they were n00bs, by definition.
17:15 CurtisOvidPoe Napoleon: n00b. Alexander the Great: n00b. Hitler: n00b.
17:15 Kristien joined #perl6
17:15 masak sure makes history more compact.
17:16 CurtisOvidPoe Might get more people reading about it.
17:17 masak I'm currently going through "Everything wrong with [some movie]"-type videos on YouTube. all movies contain dozens of mistakes of various sizes, and they call them out. I'd read a history book that was structured like that.
17:17 masak "really, Napoleon -- really?"
17:17 masak *ding*
17:18 masak (the ding +1s a sin counter in the top left)
17:18 Kristien morning
17:18 masak Kristien! \o/
17:18 CurtisOvidPoe Evening!
17:18 zakharyas joined #perl6
17:18 masak good UGT/nwc10 morning! :)
17:21 vendethiel masak: I stopped watching these because they made me far too cynical ;-)
17:22 Kristien "say $*TZ;" prints "morning" on my machine
17:22 vendethiel suspension if disbelief is a good thing
17:24 rmgk joined #perl6
17:25 masak m: say $*TZ
17:25 camelia rakudo-moar 23c963: OUTPUT«3600␤»
17:27 tgt joined #perl6
17:28 masak vendethiel: the older I get, the more I notice how movies re-use a small number of well-tried stories. actually analyzing them from that perspective gives the movies extra depth (for me).
17:28 masak vendethiel: same reason I enjoy TV Tropes.
17:29 vendethiel I think cinemasins becamse far too nitpicky in the last months :)
17:29 Kristien vendethiel: I have a shortcut for suspension: control+Z
17:29 leont nwc10: don't know much in particular about llvm
17:30 Kristien LLVM is fun.
17:30 rmgk joined #perl6
17:31 Kristien (Apart from the horrible inconsistent, exceptionless, RTTI-less, RAII-less API.)
17:31 vendethiel Kristien: why'd you want RTTI :P?
17:32 Kristien for downcasting
17:32 Kristien I never use static_cast for that because it's too dangerous.
17:32 Kristien LLVM has its own crippled RTTI instead of having the compiler generate it.
17:34 donaldh do we really represent local timezone as a number?
17:35 jnthn m: say $*TZ.WHAT
17:35 camelia rakudo-moar 23c963: OUTPUT«(Int)␤»
17:35 jnthn ...apparently
17:35 donaldh but a TZ is a different concept from the current calculated offset from UTC in seconds
17:36 Kristien Noda Time is a great library to look at when it comes to time.
17:37 Kristien (The .NET library.)
17:38 Kristien I've been porting it to PHP.
17:38 TimToady a port of rakudo to .NET should go in GSoC ideas, if it isn't already
17:39 rmgk joined #perl6
17:42 Kristien There should for example be different types for datetimes that contain timezones and those that don't, because they cannot be used in the same way
17:42 Kristien Various APIs get this horribly wrong, such as Python's.
17:43 rmgk_ joined #perl6
17:43 vendethiel TimToady: I havn't seen that many people interested in a clr backend :p
17:46 njmurphy joined #perl6
17:48 TimToady hangin' out with the avant-garde crowd mostly, eh?
17:49 vendethiel is the jvm avant-garde?
17:49 vendethiel well, the clr sure gained some attention since the open source wave
17:49 vendethiel .oO( I have no idea, actually. I guess I just don't talk to CLR people )
17:51 Kristien CLR is still very much a Windows thing
17:51 TimToady jvm is more like...feudal...or samarai these days, given its relationship to the *other* Larry
17:52 Kristien Larry Gosling
17:52 TimToady my beard itches
17:52 jnthn There's a lot of people using that Windows thing... ;)
17:52 Kristien My beard never itche… wait I have no beard.
17:52 * jnthn sometimes has folks ask about a Rakudo.Net
17:53 TimToady what's your story?
17:53 jnthn "Not yet" :)
17:53 jnthn Well, I used to point them to Niecza
17:53 TimToady certainly an excellent proof-of-concept
17:54 Kristien Is there an ECMAScript implementation of Perl 6?
17:54 TimToady only nqp, so far
17:54 vendethiel jnthn: I wonder why you know .net folks :P
17:55 vendethiel Kristien: also, it's only a backend
17:55 TimToady npq on js was pmurias++'s GSoC last year
17:55 vendethiel .oO( nqp will be this year's GSoC )
17:55 jnthn vendethiel: Spent a bunch of years living in Sweden, where there's a lot of that. ;)
17:56 vendethiel jnthn: also,$job, right :)
17:56 jnthn Yes :)
17:56 jnthn Well, $job is the thing that ended up with me being here :)
17:56 vendethiel oh, there's so many of you guys?
17:56 vendethiel (dozens, I guess)
17:57 Kristien a BEAM backend would be interesting
17:57 jnthn At my $dayjob there ain't quite dozens of us yet.
17:57 vendethiel Kristien: not sure, the languages doesn't really fit BEAM
17:57 Kristien hence
17:57 vendethiel -s
17:57 vendethiel .oO( but Perl6 is many languages )
17:58 jnthn Anyway, adding a backend is a decent bit of work.
17:58 vendethiel how'd you know? *g*
17:58 jnthn Can't imagine! :P
17:58 vendethiel "decent bit of work" that's the euphemism of the day, rally
17:58 jnthn Probably the CLR ain't so bad to do in so far as it's rather like the JVM :)
17:58 TimToady not to be confused with a bit of decent work
17:59 Kristien Well you have to worry about generics when you target the CLR.
17:59 jnthn The JVM port was decidedly indecent work at times... :P
17:59 jnthn Kristien: No you don't :) You might choose to worry about them if it gets you better code-gen, though... :)
17:59 Kristien Why not?
18:00 vendethiel .oO( reifed generics are a misfeature! :P )
18:00 Kristien well arguably F# could've had a much more advanced type system if generics weren't reified :P
18:01 jnthn Having worked in C# and Java, I'm rather glad of the reified generics.
18:01 dalek nqp/blv_annotations: b448059 | donaldh++ | src/vm/jvm/ (15 files):
18:01 dalek nqp/blv_annotations: Add block lex values to the CodeRefAnnotation
18:01 dalek nqp/blv_annotations:
18:01 dalek nqp/blv_annotations: This unfortunately blows the classfile size for Rakudo CORE.setting
18:01 dalek nqp/blv_annotations: review: https://github.com/perl6/nqp/commit/b448059169
18:01 jnthn However, I'd agree it's not a very general mechanism if you're implementing something beyond C#'s generics. :)
18:02 TimToady .oO(premature reification is the hobgoblin of small evil)
18:02 vendethiel jnthn: well, I've said it before, I dislike it because it breaks parametricity
18:03 * donaldh plows throught some indecent work on the JVM
18:03 jnthn donaldh++
18:03 donaldh *through
18:03 lizmat Would it make sense to have .IO.e return self on existence, and Nil on non-existence?
18:04 lizmat that would allow chaining like $foo.IO.e.f
18:04 Rounin joined #perl6
18:04 * TimToady wonders what the blockers for a Go engine backend would be, whatever they call it...
18:04 nwc10 donaldh++
18:04 Kristien TimToady: what's a Go engine?
18:04 jnthn donaldh: What specifically does it blow, ooc?
18:04 TimToady whatever it is that GoLang uses
18:04 Kristien Go's compiler compiles to machine code.
18:04 donaldh jnthn: overall classfile size
18:04 jnthn Darn!
18:05 Kristien You could generate Go code but then you'd have one problem: Go doesn't support dynamic linking.
18:05 TimToady yes, but is there any way to hook into it at a lower level than text; if so, I mean that API
18:05 jnthn The annotations are bigger than the code we generated?
18:05 Kristien You could use the Go runtime library
18:05 Kristien from C
18:05 donaldh But it should be okay when I remove the blv constants and the init code
18:05 jnthn Ah, OK
18:06 donaldh I've got the annotations, now I'll use them :)
18:06 jnthn :)
18:06 TimToady but as the next big gorilla, it would be useful to subvert Google from the inside
18:06 Kristien The only real gain would be to have green threads.
18:06 * jnthn away for a bit
18:06 Kristien But they are rather trivial to implement.
18:07 donaldh recreation&
18:07 Kristien Making them fast may be an issue.
18:07 TimToady but we might have to wait for the next big gorilla corporation to be founded by someone who grew up programming Perl 6
18:07 Kristien You simply need a thread pool and post fiber resuming tasks on them.
18:07 Kristien and pause fibers on channel operations
18:08 anaeem1_ joined #perl6
18:08 vendethiel TimToady: this is 2000's talk "java and perl" talk all over again :P
18:08 Kristien I've implemented that and it works great.
18:08 Kristien You could even use the C call stack if you use Boost.Coroutine.
18:08 TimToady well, at least Go ain't C++
18:09 tony-o_ lol
18:09 Kristien Here's a VM with green threads that I once implemented: https://github.com/rightfold/styx/blob/master/virtual-machine/src/vm.cpp
18:10 Kristien It has one race condition I still have to fix, by using a proper thread pool library instead of a queue and a bunch of threads.
18:11 Kristien Green threads are good. You don't have to clutter your APIs with futures or callbacks for achieving the optimisation called async I/O.
18:12 Kristien Or rather, the optimisation enabled by it.
18:15 raydiak good morning #perl6
18:17 anaeem1_ joined #perl6
18:18 perltricks joined #perl6
18:20 perltricks Hey y'all I made svg icon of Camelia https://github.com/sillymoose/Perl-Icons/blob/master/Icons/Perl6_Camelia.svg
18:20 Kristien nice
18:20 perltricks Might make a nice icon for web menus etc. With Larry's permission of course :)
18:21 TimToady use for icons and such is already granted
18:21 perltricks TimToady: Great, thanks!
18:22 skids I can't find twigiled form of adverbs ( like :$!a ) specced, but they work and I assume they should, so I'm going to spec them unless someone hollers.
18:22 TimToady though seems to missing her smile on my computer
18:22 perltricks TimToady: ohhh you're right
18:23 Kristien Is there some roadmap or estimate on when Perl 6 will be ready for production?
18:23 TimToady and the middles of the spots
18:23 Kristien so that there's a stable implementation, no more breaking changes and sufficient documentation
18:24 TimToady we're aiming for this year
18:24 Kristien neat.
18:25 Kristien I have one tool in mind that I want to use Perl 6 for.
18:26 muraiki joined #perl6
18:28 anaeem1_ joined #perl6
18:29 TimToady skids: I'd suggest adding a paragraph to the Twigils section that already talks about interpolation vs twigils
18:30 TimToady there are examples of :$!a in S6 and S12 already, at least
18:31 TimToady but we should express the policy that twigils are transparent to that too
18:31 Hor|zon joined #perl6
18:31 skids TimToady++ will do.
18:32 FROGGS joined #perl6
18:33 FROGGS_ joined #perl6
18:35 perltricks TimToady: Ok, logo updated with extra detail https://github.com/sillymoose/Perl-Icons/blob/master/Icons/Perl6_Camelia.svg
18:36 TimToady huh, still doesn't show up here
18:37 perltricks TimToady: perhaps try browser refresh with clearing the cache
18:39 TimToady still missing the upper inner spots
18:40 anaeem1 joined #perl6
18:41 skids Actually that paragraph is in a big section about interpolation so it would be a sidetrack.  There's a good place to put it under adverbs.
18:42 TimToady nodnod
18:44 dalek specs: d7abe41 | skids++ | S02-bits.pod:
18:44 dalek specs: Explicitly spec sigiled form of adverb with twigil
18:44 dalek specs: review: https://github.com/perl6/specs/commit/d7abe41432
18:45 kaare_ joined #perl6
18:45 TimToady perltricks: in addition to the upper spots missing, I think the antennae and legs looks just a bit spindly; would it be possible to fatten them up by 30% or so?
18:46 TimToady we wouldn't people to think she was going all anorexic...
18:47 jluis_ joined #perl6
18:48 perltricks TimToady: Sure let me work on that
18:48 TimToady but by and large you've done a good job of keeping the asymetries, which is the main thing
18:48 TimToady *mm
18:48 Kristien > Note that the compiler is allowed to parallelize and short-circuit autothreading (and Junction behavior in general), so it is usually an error to autothread junctions over code with side effects.
18:48 Kristien Does this mean it is allowed to optimise any(…, True, …) to any(True) and all(…, False, …) to all(False)?
18:49 raiph joined #perl6
18:49 TimToady I think so
18:50 psch raiph: are you looking to keep the SO answer more up-to-date?
18:51 psch raiph: 'cause one thing i'd appreciate is if there was no 't' in my last name :)
18:51 * TimToady either
18:51 [Coke] I will start working on the release post $dayjob.
18:52 TimToady .oO(he has a $dayjob doing release posts?)
18:52 darutoko joined #perl6
18:53 psch raiph: on the more on-topic hand, the [B candidate works as well now iirc
18:53 raiph psch: fixed your name, sorry about that
18:55 psch thanks raiph++
18:58 vendethiel ermm... I think our unique shouldn't be called unique.
18:58 vendethiel m: (1, 2, 1).unique.say
18:58 camelia rakudo-moar 23c963: OUTPUT«1 2␤»
18:58 vendethiel should probably be "distinct". when did programming change "unique"'s meaning?
18:58 masak +1
18:59 denis_boyun_ joined #perl6
19:00 vendethiel lizmat++ # weekly
19:01 vendethiel "mixins will be 10x faster" wow -- really?
19:01 hobbs someone bought a Blendtec
19:01 vendethiel .oO( I can guess lizmat wrote the weekly because there's no ++ after her name *g* )
19:03 anaeem1_ joined #perl6
19:07 perltricks TimToady: I've updated the icon with the inner spots and thicker antennae. You may have to refresh browser cache to see the diff: https://github.com/sillymoose/Perl-Icons/blob/master/Icons/Perl6_Camelia.svg
19:14 TimToady that's better, thanks
19:17 TimToady but surely unique merely means "like something oneish" if you want to go all etymological
19:17 TimToady in any case, if you are distinct from all your compatriots, you are unique already
19:18 skids r: "aa" ~~ m/@<foo>=((a)(a))/
19:18 camelia rakudo-moar 23c963: OUTPUT«===SORRY!===␤QAST::Block with cuid cuid_1_1421954289.05715 has not appeared␤»
19:18 camelia ..rakudo-parrot 23c963: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1421954288.08727␤»
19:19 skids same for %<..> and similar error on rakudo-j.  So something high level not right.
19:19 TimToady proscriptivists tend to ignore the fact that "like nothing else" is a very mushy concept once you start scratching away the surface meaning
19:20 TimToady so it's perfectly okay in my language to qualify the work 'unique'
19:20 masak kaare_: submit rakudobug?
19:20 masak er, skids*
19:20 psch i think there is one for @<foo> already
19:20 TimToady All animals are created unique, but some are uniquer than others.
19:20 skids I'll look for an RT in a bit.
19:22 TimToady the only advantage to .distinct is that it expands to "make all these values distinct" rather than "make each value unique", which is not enough distinction to warrant shifting away from the Unix 'uniq' meme
19:23 Sqirrel joined #perl6
19:24 TimToady we're still only trying to break the things that need breaking, except, of course, for all the places where we are trying to achieve a larger degree of uniqueness. :P
19:25 kjs__ joined #perl6
19:28 dalek Inline-Perl5: 6aa0ca8 | (Stefan Seifert)++ | / (2 files):
19:28 dalek Inline-Perl5: Support AUTLOAD of P5 objects when calling their methods
19:28 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/6aa0ca877c
19:28 TimToady of course, all that being said, Unix's uniq is really a squish, go figure...
19:29 nine Conference driven development again. Even before the conference starts :)
19:29 TimToady so maybe changing it to distinct would be a good thing for *that* reason
19:30 TimToady but not because unique has any kind of a unique meaning
19:30 nine use Inline::Perl5; use XML::XPath:from<Perl5>; my $xp = XML::XPath.new('xml-xpath.xml'); my $nodeset = $xp.find('//baz/@qux');
19:30 nine ^^^ that's literally the whole slide on using XML::XPath via Inline::Perl5. This seems so simple that it's hardly worth talking about...
19:30 TimToady otoh, distinct is 2 more characters to type...
19:31 moritz but not the obscure q key :-)
19:31 TimToady yeah, distinct is easier to type really
19:31 TimToady at least on qwerty
19:32 gfldex joined #perl6
19:33 * TimToady wonders if there's a good short anglo-saxon term for unique/distinct
19:33 TimToady sole, only, alone sez my wife
19:34 TimToady onely, allone... :)
19:34 FROGGS_ lone
19:35 raiph psch: I just brew'd fresh Jakudo; ran original CRC example with s/(B)/([B)/; I get an error:
19:35 raiph java.lang.ClassCastException: org.perl6.nqp.sixmodel.reprs.VMArrayInstance_u8 cannot be cast to org.perl6.nqp.sixmodel.reprs.JavaObjectWrapper in block <unit> at java.pl:5
19:37 TimToady distinct probably works better as a function name than as a method name
19:38 TimToady dedup would be more operational
19:38 jdv79 trim?  but maybe not close enough.
19:38 TimToady already used
19:38 TimToady m: say "  stuff and nonsense\n\n".trim
19:38 camelia rakudo-moar 23c963: OUTPUT«stuff and nonsense␤»
19:39 TimToady besides, has connotations of "only around the edges"
19:40 adu joined #perl6
19:40 TimToady well, unique also reads well as a function
19:40 TimToady and really drives home the not like any other in the whole dataset
19:41 TimToady dedup could easily mean squish
19:41 jdv79 lop would be shorter but same connotation as trim i guess
19:41 TimToady lop doesn't imply uniqueness
19:42 jdv79 getting below 5 or 6 letters is hard
19:42 TimToady even distinct could mean "make each value distinct from the previous one", whereas you can't really take "unique" that way, since its claim is global
19:42 TimToady so let's stick with unique
19:43 hoelzro I was playing around with type coercion (ex. MyType('')), and I noticed that if I implement postcircumfix:<( )> for MyType, that method receives a Capture as its single argument, rather than the value being coerced.  Is there a reason for this?
19:43 TimToady in other words, the very semantic you don't like to see misued is precisely what makes this the best word in context
19:44 TimToady unique can never be taken to mean a local squish
19:44 TimToady *misused
19:45 TimToady it's a uniquely good word for removing all duplicates from a large universe of things
19:46 TimToady it's a power word, which is of course why people misuse it all the time :)
19:48 TimToady and why other people think it's important to fight over :)
19:49 TimToady nobody fights over the meaning of 'distinct' :)
19:52 TimToady If you put a quarter into a linguist, you'll get none.
19:53 TimToady If you put a quarter into a linguist, you'll get no quarter.  # perhaps clearer
19:54 * TimToady wonders how "quarter" became a synonym for "mercy"...
19:57 jnthn nine: Showing people that stuff is simple is probably a good thing. ;)
19:57 raydiak ls
19:57 anaeem1_ joined #perl6
19:57 flussence . ..
19:57 raydiak oh no where'd it all go!?
19:58 TimToady ah, they don't really know how quarter came to mean that
19:58 flussence someone set LS_OPTIONS wrong :)
19:59 raydiak heh nice trick, that would freak me out
19:59 * flussence wonders if there's actually an inverse -a option, and why anyone would want it...
20:03 flussence bah, panda/bootstrap.pl is hanging and I didn't notice until now because I'd been using rebootstrap.pl...
20:04 flussence oh, maybe because I have that system-installed rakudo sitting around...
20:04 flussence there we go, it just didn't like perl6-p...
20:05 _4d47 joined #perl6
20:06 Kristien joined #perl6
20:06 TimToady maybe it just turned the non-directory filenames into the background color
20:06 flussence that's... creative :)
20:07 PerlJam TimToady: the explanation of "quarter" as in housing rather than death makes sense to me.
20:07 Kristien hola
20:07 geekosaur language doesn't always make sense though
20:08 TimToady PerlJam: problem is, lots of etymologies that make sense turn out to be not quite true
20:08 PerlJam geekosaur: It does too make sense!  Just its own kind of sense that might not be related to the sense of others. :)
20:08 PerlJam TimToady: true.
20:09 PerlJam perhaps after a few hundred more years people will be wondering about the etymology of "lock, stock and barrel" or "soup to nuts" and there will be all manner of interesting explanations that "make sense" but aren't close to true.
20:11 brrt joined #perl6
20:11 TimToady yes, people will swallow those explanations lock, stock, and sinker.
20:11 b2gills m: class A { method test (:$field, *% [] ){ } }; A.test(:feild); #CurtisOvidPoe
20:11 camelia rakudo-moar 23c963: OUTPUT«Unexpected named parameter 'feild' passed in sub-signature␤  in method test at /tmp/LghS525onV:1␤  in block <unit> at /tmp/LghS525onV:1␤␤»
20:11 TimToady or was that hook, line, and barrel...
20:12 PerlJam ... and Perl 6 will be there to help people straighten things out  ;)
20:12 TimToady at least, hopefully in a few hundred years we'll have convinced people to use the series comma
20:12 CurtisOvidPoe What did I just miss? Why is the *% [] necessary?
20:13 Kristien pl6: say "hi"
20:13 Kristien Is the bot broken?
20:13 b2gills *% captures pairs that aren't in the sig, [] is a subsignature that means it should be empty
20:13 Kristien ah works with m:
20:13 Kristien ohh p6 not pl6 my bad
20:13 andreoss joined #perl6
20:14 PerlJam CurtisOvidPoe!  I meant to ask you something the other day.  perhaps multiple somethings.  Would you advocate that "claim" be needed for a class to override a method gotten from a role?
20:15 TimToady m: class A { method test (:$field, *% where :not ){ } }; A.test(:feild);
20:15 camelia rakudo-moar 23c963: ( no output )
20:15 TimToady hmm
20:15 CurtisOvidPoe @b2gills: thanks for that explanation. That something I would definitely like a “short” way of handling.
20:15 CurtisOvidPoe @PerlJam: I haven’t seen that branch yet, so it’s hard to say. What is the exact syntax?
20:16 TimToady m: class A { method test (:$field, *% where die("testing") ){ } }; A.test(:feild);
20:16 camelia rakudo-moar 23c963: OUTPUT«testing␤  in method ACCEPTS at src/gen/m-CORE.setting:3281␤  in method test at /tmp/s3zoMUvaoh:1␤  in block <unit> at /tmp/s3zoMUvaoh:1␤␤»
20:16 TimToady m: class A { method test (:$field, *% where { die("testing $_") } ){ } }; A.test(:feild);
20:16 PerlJam CurtisOvidPoe: Well, it currently only applies for roles, but it's like this:   role A { method m {} }; role B does A { claim method m {} }   # I think
20:16 camelia rakudo-moar 23c963: OUTPUT«testing feild        True␤  in method test at /tmp/xbb3E9PWVX:1␤  in block <unit> at /tmp/xbb3E9PWVX:1␤␤»
20:16 anaeem1_ joined #perl6
20:16 TimToady I guess it wheres each value
20:17 TimToady m: class A { method test (:$field, *% where { die($_.WHAT) } ){ } }; A.test(:feild);
20:17 camelia rakudo-moar 23c963: OUTPUT«use of uninitialized value $self of type Hash in string context  in method test at /tmp/56CDVNELyI:1␤␤Error while creating error string: No exception handler located for warn␤»
20:17 TimToady no, it's testing the hash
20:17 TimToady m: say { :feild } ~~ :not
20:17 camelia rakudo-moar 23c963: OUTPUT«True␤»
20:17 TimToady m: say { :feild } ~~ :so
20:17 camelia rakudo-moar 23c963: OUTPUT«True␤»
20:17 TimToady hmm
20:17 b2gills I like that Larry apparently has conversations with himself on irc
20:18 TimToady m: say { :feild } ~~ *.not
20:18 camelia rakudo-moar 23c963: OUTPUT«False␤»
20:18 jnthn PerlJam: Yes, that's how it works.
20:18 TimToady I guess you can't use a pair matcher against a hash like that
20:18 lizmat TimToady: re quarter -> mercy
20:18 lizmat 6 (quarters) rooms or lodgings, especially those allocated to servicemen or to staff in domestic service: they lived in RAF married quarters.
20:18 PerlJam good, at least my memory isn't failing (too much :)
20:18 CurtisOvidPoe OK, that’s what I was afraid of. jnthn mentioned that earlier and I had a concern he addressed, but I’m not sure it really works. Let me try something.
20:19 TimToady m: class A { method test (:$field, *% where *.not ){ } }; A.test(:feild);
20:19 camelia rakudo-moar 23c963: OUTPUT«Constraint type check failed for parameter '<anon>'␤  in method test at /tmp/YA9dOyXPf5:1␤  in block <unit> at /tmp/YA9dOyXPf5:1␤␤»
20:19 FROGGS_ m: class A { method test (:$field, *% where *.not ){ } }; A.test(:field);
20:19 camelia rakudo-moar 23c963: ( no output )
20:19 CurtisOvidPoe Is there a way I can run the “claim” branch from IRC or do I need to download and compile it?
20:19 TimToady I guess thtat's not as good a message
20:19 lizmat TimToady: so "no quarter" could be interpreted as "not taking any prisoners"
20:19 TimToady yes, that's one explanation
20:20 jnthn CurtisOvidPoe: You'll have to do it locally
20:20 TimToady but etymologists have learned to be skeptical over the years
20:20 jnthn CurtisOvidPoe: Do you use rakudobrew, or do you build directly?
20:21 CurtisOvidPoe I’ve been building directly.
20:21 Kristien m: say (1..10).WHAT
20:21 camelia rakudo-moar 23c963: OUTPUT«(Range)␤»
20:22 dalek rakudo/newio: e8c9d5e | lizmat++ | src/core/IO (4 files):
20:22 dalek rakudo/newio: Implement .IO.i  (for unique path ID)
20:22 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/e8c9d5e544
20:22 jnthn CurtisOvidPoe: Ok, then just git checkout claim-prototype, then the usual Configure/make
20:22 CurtisOvidPoe Let’s say I have two third-party roles I want to use: “This” and “That”. Each provides a “verify” method that I desperately need. How do I get access to both without them conflicting? jnthn explained it to me earlier, something about fully-qualified names, but without seeing the syntax, I’m not sure I get it.
20:22 CurtisOvidPoe Do I need to do manual dispatching inside of my own “claim verify() {…}”?
20:23 CurtisOvidPoe Hmm, but then I’m guessing we might have signature problems.
20:23 jnthn role Tother does This does That { claim method verify(|c) { self.This::verify(|c); self.That::verify(|c) }
20:23 TimToady if the sigs differ you could do claim proto verify and then write multies
20:24 Ovid_ joined #perl6
20:24 TimToady or that, if you want to call them serially
20:24 CurtisOvidPoe TimToady: sorry, had to restart the client. I missed what you said.
20:24 TimToady if the sigs differ you could do claim proto verify and then write multies
20:24 jnthn role Tother does This does That { claim method verify(|c) { self.This::verify(|c); self.That::verify(|c) }
20:24 jnthn (Untested, but should work.)
20:25 CurtisOvidPoe And if they have the same signature and I need to call them separately?
20:25 TimToady you need to distinguish them by name then
20:25 jnthn That was what my one just showed?
20:25 TimToady depends on whether you want to rename one or both of them
20:26 TimToady you could claim verify to redirect to one, and then verify-that-other-thing to redirect to the other
20:26 Kristien m: say 1 !&& 2;
20:26 camelia rakudo-moar 23c963: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UbX_MndHn3�Cannot negate && because it is not iffy enough�at /tmp/UbX_MndHn3:1�------> [32msay 1 !&&[33m�[31m 2;[0m�»
20:26 TimToady or you could rename them both, and just ... the verify claim
20:26 Kristien No NAND. :(
20:26 [Sno] joined #perl6
20:27 TimToady m: say 1 !+& 2
20:27 camelia rakudo-moar 23c963: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/qdAyNeKoFm�Cannot negate +& because it is not iffy enough�at /tmp/qdAyNeKoFm:1�------> [32msay 1 !+&[33m�[31m 2[0m�»
20:27 TimToady m: say 1 !?& 2
20:27 camelia rakudo-moar 23c963: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Z6HecURMAH�Cannot negate ?& because it is not iffy enough�at /tmp/Z6HecURMAH:1�------> [32msay 1 !?&[33m�[31m 2[0m�»
20:27 moritz ?& is not iffy enough? :-)
20:27 TimToady oh come on, ?& returns a boolean
20:27 moritz std: 1 !?& 2
20:27 camelia std f9b7f55: OUTPUT«ok 00:00 136m␤»
20:27 TimToady you can't get iffier then ?&
20:27 moritz so
20:27 TimToady just missing a :iffy somewhere
20:28 CurtisOvidPoe So I claim verify to override one, and then I have a separate method to call the other with a fully-qualified name?
20:28 TimToady though really anything that returns Bool should be considered iffy
20:28 raiph joined #perl6
20:28 TimToady well, your claim also needs a fully-qualified name
20:28 PerlJam CurtisOvidPoe: it's not a requirement, but you can do it that way
20:28 TimToady on the redirect
20:29 CurtisOvidPoe OK, thanks.
20:29 TimToady at least, I'd expect it to require full qualification, or you might just get infinite recursion
20:30 PerlJam Sounds like an easy warning to spot though
20:30 PerlJam (maybe0
20:30 skids r: "aa" ~~ m/$<fie>=((a)(a))/; :fie(@<fie>).say; :@<fie>.say; # 2 cheers for methodical testing
20:30 camelia rakudo-{parrot,moar} 23c963: OUTPUT«fie => 「a」 「a」␤fie => 「aa」␤ 0 => 「a」␤ 1 => 「a」␤»
20:32 CurtisOvidPoe By the way, thanks to everyone for your help with my silly questions. I am pretty much finished with my Brussels presentation. As from bonus slides, I’ll be focusing almost exclusively on how subs call each other in a safer manner. It’s a great limited scope to show how Perl 6 makes life safer.
20:33 CurtisOvidPoe Are all files guaranteed to be UTF-8? Can I change the encoding of a source file? Or globally?
20:34 CurtisOvidPoe By “files” I mean “Perl 6 programs and modules”
20:35 CurtisOvidPoe PerlJam: I think that might be hard to spot because of allowing recursion.
20:37 FROGGS_ CurtisOvidPoe: perl6 accepts: --encoding=[mode]    specify string encoding mode
20:37 FROGGS_ there is no global option
20:37 japhb joined #perl6
20:37 CurtisOvidPoe FROGGS_: does that impact the data  you’re working with, or also the source code?
20:38 FROGGS_ ohh, that affects *only* the source code
20:38 FROGGS_ (and string literals in the source, of course)
20:39 FROGGS_ in case you were talking about open(), slurp() and friends, pass :enc<...>
20:39 gtodd how does "interning" work ? :-D ...
20:39 gtodd or .. well ...
20:39 moritz with magic!
20:40 gtodd does it make things more efficient by locality or making them stand still til they get their work done or ...
20:40 hobbs gtodd: you give the strings jobs, but you don't pay them.
20:40 CurtisOvidPoe FROGGS_: No, I was just wondering about the source code. Thanks :)
20:40 FROGGS_ k :o)
20:40 gtodd it sound like it makes applications BEHAVE or they have to stay after school
20:41 gtodd "magic"  is close enough :-)
20:42 CurtisOvidPoe m: for 1..3 { say $^a }
20:42 camelia rakudo-moar 23c963: OUTPUT«1␤2␤3␤»
20:42 CurtisOvidPoe m: for 1..3 { say $^a; say ^b; say ^c }
20:42 camelia rakudo-moar 23c963: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7C3agJ5pnRâ�¤Undeclared routines:â�¤    b used at line 1â�¤    c used at line 1â�¤â�¤Â»
20:42 gtodd as long as there is a small yet diverse and geographically dispersed group that understands how they work :-)
20:42 FROGGS_ there was a way to get the hands on a method, and then call it on an invocant of another type, right?
20:43 FROGGS_ m: for 1..3 { say $^a; say $^b; say $^c }
20:43 camelia rakudo-moar 23c963: OUTPUT«1␤2␤3␤»
20:44 CurtisOvidPoe Sheesh. I forgot the dollar signs. How silly.
20:44 CurtisOvidPoe m: for 1..3 { say $^a }; for 1..3 { say $^a; say $^b; say $^c }
20:44 camelia rakudo-moar 23c963: OUTPUT«1␤2␤3␤1␤2␤3␤»
20:45 CurtisOvidPoe So why are those two loops looking so different but behaving the same way?
20:45 CurtisOvidPoe m: for 1..3 { say $^a; say $^b }
20:45 camelia rakudo-moar 23c963: OUTPUT«1␤2␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/3dBekhTY2G:1␤␤»
20:45 CurtisOvidPoe The parameters slurp?
20:45 FROGGS_ m: for 1..3 { say "$^a $^b $^c" }
20:45 camelia rakudo-moar 23c963: OUTPUT«1 2 3␤»
20:45 andreoss also ... is much slower than ..
20:45 CurtisOvidPoe m: for 1..4 { say $^a; say $^b; say $^c }
20:45 camelia rakudo-moar 23c963: OUTPUT«1␤2␤3␤Too few positionals passed; expected 3 arguments but got 1␤  in block <unit> at /tmp/ahAfuI1RPT:1␤␤»
20:45 CurtisOvidPoe for 1..4 { say $^a; say $^b; }
20:46 CurtisOvidPoe m: for 1..4 { say $^a; say $^b; }
20:46 camelia rakudo-moar 23c963: OUTPUT«1␤2␤3␤4␤»
20:46 CurtisOvidPoe (I can’t type!)
20:46 FROGGS_ m: for 1..3 { say "hello; "say $^a }; for 1..3 { say "hello"; say $^a; say $^b; say $^c }
20:46 camelia rakudo-moar 23c963: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/63mXJLTr4gâ�¤Two terms in a rowâ�¤at /tmp/63mXJLTr4g:1â�¤------> [32mfor 1..3 { say "hello; "[33mâ��[31msay $^a }; for 1..3 { say "hello"; say $[0mâ�¤    expecting any of:â�¤        infix stoppe…»
20:46 jnthn CurtisOvidPoe: You're saying the block takes 3 args, so it gets things 3 at a time
20:46 CurtisOvidPoe Now I understand it :)
20:46 FROGGS_ m: for 1..3 { say "hello"; say $^a }; for 1..3 { say "hello"; say $^a; say $^b; say $^c }
20:46 camelia rakudo-moar 23c963: OUTPUT«hello␤1␤hello␤2␤hello␤3␤hello␤1␤2␤3␤»
20:46 jnthn Most often used in for %h.kv -> $key, $value { ... }
20:46 CurtisOvidPoe I should be trying this on the command line rather than here :)
20:46 jnthn If you write a proper sig you can do stuff like
20:47 jnthn for @stuff -> $a, $b = '<missing>' { }
20:47 jnthn To cope with unevenness
20:47 FROGGS_ for an uneven sized array
20:47 FROGGS_ aye
20:47 skids .oO(or unthreevenness)
20:47 FROGGS_ jnthn: can you answer that question? --> there was a way to get the hands on a method, and then call it on an invocant of another type, right?
20:47 jnthn FROGGS_: It confused me...the type has to be a subtype... :)
20:48 jnthn But yeah, .^find_method
20:48 FROGGS_ :/
20:48 CurtisOvidPoe That’s trivial in Perl 5: my $meth = $object1->can(‘method’); $object2->$meth
20:48 CurtisOvidPoe I assume it’s similar?
20:48 jnthn The invocant is type-constrained to the thing it's declared in.
20:48 FROGGS_ P5 does not care :o)
20:48 CurtisOvidPoe What if they both have “does SomeRole”?
20:48 FROGGS_ (and does not know)
20:48 jnthn my $meth = $object.^lookup('method'); $object2.$meth();
20:48 andreoss left #perl6
20:48 kjs__ joined #perl6
20:49 CurtisOvidPoe More to the point: if the method is from a role and objects from different inheritance heiraches do that role, does the above work?
20:49 FROGGS_ I guess, I should just put my type ignorant method into a sub
20:49 CurtisOvidPoe “hierarchies”
20:50 FROGGS_ CurtisOvidPoe: then you just can do: self.Rolename::foo()
20:50 jnthn when you write class A { method m() { } } then it takes A (the enclosing type) as the expected invocant type
20:51 jnthn So if you pass in any subclasses of that type, it works.
20:51 moritz and if the method is in a role, any class or role doing that role is OK
20:51 jnthn Uh
20:51 jnthn You need to be a bit careful there though
20:52 jnthn Because pulling a method directly out of a role gives you a generic method.
20:53 FROGGS_ btw, it would be nice if CStructs could inherit from other CStructs
20:53 FROGGS_ that's what I am facing right now
20:53 jnthn They...can't already?
20:54 jnthn m: class A is repr('CStruct') { }; class B is A is repr('CStruct') { }
20:54 camelia rakudo-moar 23c963: ( no output )
20:54 moritz FROGGS_: do you want inheritance or inlining?
20:56 moritz IWBN to have   class Point is repr('CStruct') { has num $.y; has num $.y }; class Line is repr('CStruct') { has Point $.start is inlined; has Point $.end is inlined }
20:57 skids m: role A { method foo (Mu $self:) { $self.WHAT.say }; }; class B does A { }; class C does A { }; B.new.foo(); my $meth = C.^find_method("foo"); $meth(B.new); # CurtisOvidPoe
20:57 camelia rakudo-moar 23c963: OUTPUT«(B)␤(B)␤»
20:57 FROGGS_ jnthn: my problem very well might be that I've put the attributes in seperate classes, so it results in: CStruct representation does not support multiple inheritance
20:57 CurtisOvidPoe I was mainly just curious, but it seems very dangerous :)
20:58 FROGGS_ moritz: I just want to inherit methods
20:58 skids Not something I would write without feeling rather dirty.
20:58 PerlJam skids: how specced is "find_method"?  :)
20:58 moritz FROGGS_: put them in role?
20:58 skids I dunno.
20:59 moritz nearly all of the MOP is underspecced
20:59 PerlJam FROGGS_: does delegation work?
20:59 FROGGS_ moritz: the problem is that the method that I'd need to put in a role returns type A, so A can't do that role
20:59 PerlJam FROGGS_: ie.  has your CStructs and delegate the methods appropriately
21:00 FROGGS_ PerlJam: hmmm, that'd open another can of worms, and even more typing :o)
21:01 moritz FROGGS_: unless it returnes ::?CLASS, or whatever it's called
21:01 moritz *returns
21:01 skids moritz: It appears in example context in S12-objects
21:01 FROGGS_ ::?CLASS would be B for B.my-method then, but it needs to stay A
21:02 moritz hrmpf
21:02 FROGGS_ :P
21:02 FROGGS_ it is all about nice looking code in the end
21:03 bjz joined #perl6
21:03 FROGGS_ I'll just put that method in both places...
21:04 skids m: $~MAIN.WHICH.say; $~MAIN.WHICH.say; # manwich puns gladly accepted.
21:04 camelia rakudo-moar 23c963: OUTPUT«Slang|55746784␤Slang|55746832␤»
21:04 PerlJam FROGGS_: use a macro  :)
21:04 FROGGS_ *g*
21:08 moritz m: class A { method x() { 'A' } }; class B is A { submethod x() { 'B' } }; say B.x; say B.^find_method('x').()
21:08 camelia rakudo-moar 23c963: OUTPUT«B␤Too few positionals passed; expected 1 argument but got 0␤  in method x at /tmp/dT7kg8nNEZ:1␤  in block <unit> at /tmp/dT7kg8nNEZ:1␤␤»
21:08 moritz m: class A { method x() { 'A' } }; class B is A { submethod x() { 'B' } }; say B.x; say B.^find_method('x').(B)
21:08 camelia rakudo-moar 23c963: OUTPUT«B␤A␤»
21:08 moritz jnthn: ^^ is that a bug in find_method?
21:09 moritz it seems B's method cache is populated correctly, but find_method tries all the mro first
21:11 timotimo wow, i caught up with backlog
21:12 TimToady lucky you
21:14 jnthn moritz: Hm, looks like.
21:14 virtualsue joined #perl6
21:14 jnthn Funny, was just looking at the RT about .^can not doing the right thing with submethods...
21:14 timotimo TimToady: well, i surely skipped a few years worth
21:15 moritz jnthn: I'm now spectesting reversing the order of the submethod lookup / MRO walking
21:15 jnthn moritz: OK :)
21:15 nine What's the difference between ('a' => 'b').hash and {'a' => 'b'}?
21:15 jnthn moritz: And I'll try out my .^can fix. :)
21:16 jnthn nine: Latter is an item and won't flatten.
21:16 moritz nine: {} won't flatten in list context
21:16 * TimToady is (uniquely!) not allowed to either burn out or skip backlogs
21:17 jnthn Are you sure you didn't mean distinctly? :P
21:17 nine I'm passing a %hash to a method and it seems to arrive as ().hash
21:17 nine That's...irritating
21:17 TimToady in my case 'unique' and 'distinct' are not mutually exclusive
21:17 dalek roast: 317910a | usev6++ | / (4 files):
21:17 dalek roast: Unfudge passing tests for RT #122497, add test for golfed code from said ticket
21:17 dalek roast: review: https://github.com/perl6/roast/commit/317910afbd
21:17 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122497
21:18 dalek rakudo/nom: 01aac1e | moritz++ | src/Perl6/Metamodel/MROBasedMethodDispatch.nqp:
21:18 dalek rakudo/nom: Fix .^find_method in the presence of submethods
21:18 dalek rakudo/nom:
21:18 dalek rakudo/nom: Previous this code:
21:18 dalek rakudo/nom:
21:18 dalek rakudo/nom: class A { method x() { 'A' } };
21:18 dalek rakudo/nom: class B is A { submethod x() { 'B' } };
21:18 mst TimToady is the ultimate union type
21:18 dalek rakudo/nom: say B.x; say B.^find_method('x').(B)
21:18 dalek rakudo/nom:
21:18 dalek rakudo/nom: printed B\nA\n, because the MRO was walked before submethods were considered.
21:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/01aac1e128
21:18 TimToady mst: however, I'm not allowed to go on strike
21:18 moritz jnthn: fwiw I was reading the code in order to document it :-)
21:19 TimToady kinda like an air traffic controller that way...
21:19 mst that's definitely a better metaphor for community cat herding than the one I was coming up with ;)
21:20 TimToady nine: then pass $%hash, or bind it into $hash
21:20 telex joined #perl6
21:20 virtualsue_ joined #perl6
21:21 * jnthn has an RT#123621 fix also
21:21 * synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123621
21:21 kjs__ joined #perl6
21:22 masak \o/
21:23 dalek doc: e425746 | moritz++ | lib/Type/Metamodel/MROBasedMethodDispatch.pod:
21:23 dalek doc: document find_method
21:23 dalek doc: review: https://github.com/perl6/doc/commit/e425746ff4
21:23 * TimToady is more like the part of the FAA that looks at the black boxes *after* the accident
21:24 p6basicbot joined #perl6
21:25 p6basicbot joined #perl6
21:25 nine Hi bot!
21:25 p6basicbot Hullo nine!
21:26 nine bot who are you?
21:26 p6basicbot I'm the first Perl 6 bot based on Bot::BaisBot!
21:26 masak Hi bot!
21:26 nine bot quit
21:26 p6basicbot Hullo masak!
21:26 masak \o/
21:26 jnthn :)
21:26 nine :)
21:26 moritz ++
21:26 masak nine: source url?
21:26 moritz that was a short visit :(
21:26 masak I already love this bot :>
21:27 nine Code's on https://gist.github.com/niner/cf796b4c1ef70474cad5
21:27 timotimo nine's new nickname: rrrrrrrrr
21:27 TimToady niner?
21:28 nine "say" is not a very fortunate choice of method name in a Perl 6 world, but other than that it's pretty straight forward :)
21:28 timotimo "nine r"
21:28 TimToady you don't say
21:28 masak this is amazing
21:28 hobbs nine: I know this is a ridiculous thing to ask, but I hope you fix that "BaisBot" factoid :)
21:29 nine hobbs: darn *g*
21:29 * masak .oO( based on Blaise Pascalbot! )
21:29 * hobbs can't turn off the proofreader-vision
21:29 nine hobbs: fixed :)
21:30 moritz ... and here I wanted to ask the bot if it's conscious, in the sense of being self-aware of its own self-awareness
21:30 * geekosaur notes that he initially misread it as BeisBol...
21:30 * masak .oO( based on the Bayesian Conspiracy bot! )
21:30 geekosaur (well, BeiisBot presumably punning on...)
21:30 nine moritz: that would have been too much bragging for half an hour of coding ;)
21:30 * TimToady spent far too many cycles trying to figure out how BaisBot was supposed to be pronounced
21:31 dalek rakudo/nom: 98db032 | jnthn++ | src/Perl6/Metamodel/ClassHOW.nqp:
21:31 dalek rakudo/nom: Make .^can aware of submethods.
21:31 dalek rakudo/nom:
21:31 dalek rakudo/nom: Fixes RT#123621.
21:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/98db032bb9
21:31 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123621
21:31 japhb .oO( self.reply($%statement, "Yes, {%statement<who>}!") if %statement<body> eq 'Are you conscious, in the sense of being self-aware of your own self-awareness?';  )
21:31 dalek roast: 7a8ff9e | jnthn++ | S12-introspection/can.t:
21:31 dalek roast: Test .^can interaction with submethods.
21:31 dalek roast: review: https://github.com/perl6/roast/commit/7a8ff9e82b
21:32 TimToady from the ridiculous to the sublime to the ridiculous to the sublime...
21:32 hobbs I read it as sort-of-French
21:32 TimToady english needs an xx * that doesn't involve latin
21:33 TimToady I guess 'and so on' works
21:33 moritz TimToady: "on and on"
21:34 japhb .oO( The nameless troll who won't shut up: the on and on anon )
21:34 hobbs TimToady: it's good enough for german
21:34 masak TimToady: in "Science and Sanity", Korzybsky starts out by defining eight-or-so new comma-like character clusters, all meaning variants of "and so on". one of the reasons I've never gotten that far into the book.
21:35 masak ...which is a pity, because I do want to learn about non-Arestotelian thinking.
21:35 japhb Sorta like an extension to Victor Borge's phonetic punctuation?
21:35 TimToady Everything should have a beginning, a middle, and a...squirrel!
21:36 masak japhb: it's sort of doing it the opposite way. it commandeers punctuation digraphs for meanings that the book will need often.
21:36 japhb Wow, the squirrel interrupted you in the middle of an *article*
21:36 masak japhb: kind of like user-defined operators.
21:37 japhb Well, if people can invent words ....
21:37 TimToady language mechanism was just emptying it's pipeline, I was already distracted
21:37 TimToady *its
21:37 TimToady can we just make the ' optional before any s?
21:38 moritz ye's
21:38 TimToady Can't we just make the ' optional?
21:38 masak 'sure
21:38 TimToady Cant we just make the ' optional?
21:38 TimToady what I meant to type, sigh
21:38 TimToady durn output pipeline...
21:39 * TimToady would so like to thank whoever invented wanna instead of wan'o
21:40 * moritz looks forward to explaining why sauce' is a valid string literal, but 'noodles' isn't :-)
21:40 TimToady wait, this isn't #engrish?
21:40 TimToady sorry...
21:40 moritz erm wait
21:40 moritz why  noodles'  isnt't
21:41 * moritz should really sleep
21:42 Kristien '  isnt' is a string literal!
21:42 masak was Highlander (1986) ever a good movie? if it was, then it hasn't really stood the test of time...
21:42 dalek roast: 7253b8f | skids++ | S02-literals/adverbs.t:
21:42 dalek roast: Add tests for twigiled adverb forms
21:42 dalek roast: review: https://github.com/perl6/roast/commit/7253b8f196
21:42 TimToady there can only be one good movie
21:43 masak ;)
21:46 moritz masak: my parents wouldn't let me watch it when it was new, so I can't really tell :-)
21:46 raydiak until I dig around in the morass of syn html generation, I figured just making a little stylesheet would be a nice start...how is this looking? http://p6design.cyberuniverses.com/S02.html
21:46 raydiak the index page works too, but none of the other pages exist on that static testbed
21:47 masak moritz: I'd say your parents did you a favor... :P
21:47 moritz raydiak: I'm not sure I like the half-surrounded headings, but otherwise it looks nice
21:48 gfldex raydiak: please dont do "font-size: 14px;"
21:48 raydiak that's not from the part I wrote
21:48 raydiak font-size, I mean
21:48 gfldex you can forward the blame if you like
21:49 raydiak I guess I should probably rewrite the whole stylesheet from scratch instead of selectively overriding parts of it
21:50 timotimo raydiak: could the links to test files be less jump-out-at-you-ish?
21:51 skids masak: It was as good and as popular as terminator ("Why the heck did I like this so much as a teen?").  The sequels, however, entirely different story.
21:51 masak skids: understood.
21:51 japhb masak: Highlander was originally awesomely bad.  Nowadays only someone who saw it the first time would probably still call it that.
21:52 japhb But then again, go back and watch Conan or 007 movies from that time period ...
21:52 raydiak moritz: yeah I wasn't sure, thought I'd see what others thought...will think of something else to do there
21:52 raydiak timotimo: yes, will do, thanks
21:52 masak japhb: "awesomely bad" kinda sums it up, yes.
21:55 * skids can pretty much watch Starship Troopers, Die Hard, and 5th Element over and over without consequence for some reason.
21:55 timotimo you mean you don't learn anything from these movies?
21:56 skids Somehow they still veg me out and I enjoy them.
21:56 japhb In college I had a friend who had seen Princess Bride many dozens of times.  Never seemed to wear thin for him.
21:56 anaeem1_ joined #perl6
21:56 hobbs Flash Gordon and Highlander both should be watched for the Queen factor
21:56 * gtodd wants to do elementwise comparison of arrays ....   perl6 metaoperators should make it easy!!! :-D wheeee ...
21:57 japhb .oO( Flash, aaa-aaahhhh, Defender of the Universe! )
21:57 japhb .oO( What do you mean, "Flash Gordon approaching"?! )
21:57 gtodd m: m: my @a = 1,2,3,4,5; my @b = 6,7,10,22,21; say "errm check if each ordered element of @a is greater than the one in @b"
21:57 camelia rakudo-moar 23c963: OUTPUT«errm check if each ordered element of @a is greater than the one in @b␤»
21:58 masak japhb: .oO( "Flash, I love you! But we only have 24 hours to save the Earth!" )
21:58 timotimo i really ought to finally watch Flash Gordon some time soon
21:58 timotimo i've listened to the song more often than enough :P
21:59 TimToady be sure to count how many different colors people bleed
22:00 regreg joined #perl6
22:00 gfldex it's one colour because all the blood is made by he same company
22:01 moritz timotimo: you haven't missed much :-)
22:01 timotimo each kind of alien has a different color of blood?
22:01 moritz timotimo: if you want to what you really old movie with good music, what "The Local Hero"
22:01 TimToady m: my @a = 1,2,3,4,5; my @b = 6,7,10,22,21; say all @a Z< @b
22:01 camelia rakudo-moar 23c963: OUTPUT«all(True, True, True, True, True)␤»
22:01 moritz s/what/watch/
22:02 japhb masak:  :-)
22:02 japhb This whole conversation just reminds me that Marcy and I haven't watched Red Sonja in a while ....
22:03 gtodd m: my @a = 1,2,3,4,5; my @b = 6,7,10,22,21;   say "ok" if [<] [@a X @b] ;
22:03 camelia rakudo-moar 23c963: OUTPUT«ok␤»
22:03 gtodd I am not comparing things correctly there :-|
22:03 mvuets joined #perl6
22:03 TimToady um, no
22:04 TimToady did you see my effort above?
22:04 gtodd I want to be sure 1 is less than 5 ..... 4 ... 22
22:04 gtodd TimToady: oops yes thanks ... you didn't see  my mental thankyou :-)
22:05 gtodd TimToady: I leaped to self analysis of my braino
22:05 gtodd ahah it's the *all*
22:05 gfldex m: my @a; say so all @a;
22:05 camelia rakudo-moar 23c963: OUTPUT«True␤»
22:05 gtodd I did not know about it ... or well enough about it
22:05 gtodd perfect :-)
22:07 gfldex m: my @a; say so @a; say so all @a; # am i rightfully confused?
22:07 camelia rakudo-moar 23c963: OUTPUT«False␤True␤»
22:07 * gtodd loves it when my errors are due to lack of information and knowledge instead of brute misunderstanding ....
22:07 TimToady all means "does not contain a false value"
22:07 gfldex tyvm, i'm a little less confused now
22:07 TimToady any means "does contain a true value"
22:08 gtodd because that means (paraphrasing Jim Carey) "I've got a *chance*!!"
22:08 TimToady m: say any
22:08 camelia rakudo-moar 23c963: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/y74wei4O59â�¤The 'any' listop may not be called without arguments (please use () or whitespace to clarify)â�¤at /tmp/y74wei4O59:1â�¤------> [32msay any[33mâ��[31m<EOL>[0mâ�¤    expecting any of:…»
22:08 TimToady m: say any ()
22:08 gtodd nice
22:08 camelia rakudo-moar 23c963: OUTPUT«any()␤»
22:08 TimToady say so any()
22:08 TimToady m: say so any()
22:08 camelia rakudo-moar 23c963: OUTPUT«False␤»
22:08 * gtodd is learning any and all perl6 from the master
22:08 gtodd one of the masters
22:08 gtodd ;-)
22:09 japhb grandmaster?
22:09 gtodd I was fixated on my use of X instead of Z
22:09 TimToady none is "does not contain a true value"
22:09 japhb .oO( Grandmaster Flash )
22:09 TimToady we don't have anything for "contains a false value"
22:10 moritz !all()
22:10 gtodd I like how it's possible to throw in those terms ...in a sort of written English sentence kind of  way ....
22:10 moritz not quite though (for the empty list)
22:11 masak the empty list doesn't contain a false value.
22:11 japhb What masak said.  Took me a minute to think clearly there.
22:11 masak vacuous truths are generally safe :)
22:12 japhb Well, I meant, that we're happy with the output of !all() when we want something for "contains a false value"
22:12 gtodd there's got to be a way to return how many  times (a count) False appears in a list
22:13 japhb gtodd: +(@list.grep(!*))
22:13 japhb Actually, probably can lose outer parens
22:13 masak japhb: yes, me too. `!all()` is correct because `all()` is vacuously true, because all the elements of an empty list are truthy.
22:13 gtodd :-) but as another one of those words would be nice :-) "any all none ... "
22:14 gtodd hmm not_all is one character longer than !all()
22:14 japhb gtodd: It would need parens in the same situations.
22:14 japhb So compare not_all() and !all()
22:14 gtodd right
22:15 masak I dunno, I find it quite adequate that it can be spelled !all()
22:15 geekosaur ¬∀
22:15 gtodd :-D
22:16 raydiak H2s and smartlinks adjusted; I'll fix the px complaint when I fix the rest of the layout
22:16 raydiak moritz: is that better, or should I get rid of the lines altogether?
22:16 gtodd errm so metaoperators are types of hyperoperators .... or
22:18 gtodd hmm and Z< is like a umm cross-reduction operator ... I suppose these don't need names
22:19 TimToady no, X is cross, Z is zip
22:20 gtodd oh right
22:20 TimToady and hyper is a type of metaoperator, not the other way 'round
22:20 gtodd doh
22:20 gtodd any and all manner of error
22:21 gtodd here ...
22:21 TimToady and [] won't flatten in a list, don't forget that one :)
22:22 TimToady (referring to [<] [@a X @b])
22:22 TimToady so your [<] only had one argument
22:22 TimToady m: say [<] "anything"
22:22 camelia rakudo-moar 23c963: OUTPUT«True␤»
22:22 TimToady notice it doesn't even try the comparison
22:23 TimToady m: say [<] "any", "thing"
22:23 camelia rakudo-moar 23c963: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: *%_)␤  in method Real at src/gen/m-CORE.setting:4236␤  in sub infix:<<> at src/gen/m-CORE.setting:4746␤  in sub  at src/gen/m-CORE.setting:20260␤  in block <unit> at /tmp/Hd3HaIp9ur:1…»
22:23 TimToady or that would happen
22:23 gtodd ok ... that is what happens there ... I was going to wait til after GLR to totally memorize flattening but ... :-)
22:23 TimToady you don't have to memorize what how [] flattens, because it never does :)
22:24 TimToady it's like $item that way
22:24 gtodd check , check ,
22:24 TimToady m: my $array := [3, 1, 4, 1, 5, 9]; say [<] $array
22:24 camelia rakudo-moar 23c963: OUTPUT«True␤»
22:24 TimToady same thing
22:25 gtodd it's starting to stick
22:25 gtodd nice
22:25 gtodd I was going to say ... everyone go show off perl6 operators here:   http://stackoverflow.com/q/28099387/2019415  ... but it might be unseemly :-\
22:27 TimToady but that's what it's asking for explicitly...
22:27 gtodd maybe I will add some later with some links to synopses, docs, advents, learnxinyminutes ... mortiz's p5top6 ...
22:29 gtodd it is me ... :-)  I was cautiously trying operator overloading in perl5 and well ... errm then played for a minute in the perl6 repl and almost got the same results
22:31 gtodd I note that #perl6 is not a repl extension ... ;-)
22:44 rurban joined #perl6
22:50 adu joined #perl6
22:55 gcole joined #perl6
22:56 booly-yam-6137__ joined #perl6
22:58 vendethiel gtodd: but /w camelia is
23:00 kjs__ joined #perl6
23:00 brrt joined #perl6
23:04 dalek nqp/6pe: 1968550 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/Serialization (2 files):
23:04 dalek nqp/6pe: Port basic parametrics serialization bits to JVM.
23:04 dalek nqp/6pe:
23:04 dalek nqp/6pe: With this, rakudo/6pe-mop builds on JVM.
23:04 dalek nqp/6pe: review: https://github.com/perl6/nqp/commit/196855090a
23:09 vendethiel jnthn++
23:09 vendethiel #saving the jvm soldier :P
23:10 BenGoldberg joined #perl6
23:11 BenGoldberg joined #perl6
23:15 jnthn Guess I better port 6pe to nqp-p, too...
23:45 jnthn More tomorrow... 'night
23:45 TimToady o/
23:46 masak 'night, jnthn
23:56 muraiki_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo