»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
masak oh, I've kvetched about that before, it seems: rt.perl.org/Ticket/Display.html?id=62086 00:00
00:01 lue left
jnthn masak: Why can't it be caught with a CATCH? 00:01
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.
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␤»
masak this one doesn't throw, it just fails (as I'd prefer it always to)
jnthn Yes, it fails before it reaches the goal, so we've left the regex before trying the goal. 00:08
masak ah, you have to try the goal. I see. 00:09
m: grammar G { regex TOP { a ~ c <foo> }; regex foo { b } }; say ?G.parse("abc"); say ?G.parse("abbc")
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␤␤»
masak a-ha.
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␤»
masak ok, here I *could* catch it. weird.
jnthn In all the cases we use it for in the Perl 6 grammar, it'd be useless if it didn't throw, fwiw.
masak adds that to the ticket
jnthn Of course, I guess we could have a default FAILGOAL that just fails and override it with one that throws. 00:11
Sleep, maybe... :) 00:12
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
and not just "we need to convey an error message here, so throwing an exception feels right"
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.
or rather, what precise thing is it that makes a parse failure so severe that it promotes from "falsy" to "die"? 00:15
right now, from what I can see, the need to attach an error message. 00:16
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.
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:18
jnthn Then don't use ~ 00:19
masak I suppose.
jnthn Time for some rest...'night 00:21
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
but it's definitely eluding me
m: (5,2,6,7).classify({ $_ < (*/4 * 10) }) # ballistic programming 00:33
camelia ( no output )
masak ab5tract: this seems to work: 00:34
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
camelia rakudo-moar 20aa85: OUTPUT«Hash[Any,Any].new(3 => [[1, -1]], 2 => [[1, 1], [2, 3]], 0 => [[-1, -1]], 1 => [[-1, 1]])␤»
ab5tract ah, nice :) 00:35
masak 'night, #perl6 00:37
ab5tract o/ masak
00:40 novice777 joined 00:53 ajr joined 00:54 ajr is now known as Guest77530 00:55 Guest77530 is now known as ajr_
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:57
00:58 tinyblak joined
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
so one is "1\n1\n".chars, the other is "1 1".chars
m: "1\n1\n".lines.chars
camelia ( no output )
jercos erm
m: say "1\n1\n".lines.chars
camelia rakudo-moar 20aa85: OUTPUT«3␤»
01:01 ggherdov left, mephinet left 01:02 mephinet- joined, ajr_ left 01:05 ggherdov joined 01:08 ajr_ joined 01:09 lue joined
raydiak m: say slurp.chars 01:10
camelia rakudo-moar 20aa85: OUTPUT«1134␤»
raydiak m: say lines.join("\n").chars
camelia rakudo-moar 20aa85: OUTPUT«1133␤»
01:10 yeahnoob joined
raydiak m: say slurp.substr(*-1,1).perl 01:11
camelia rakudo-moar 20aa85: OUTPUT«"\n"␤»
raydiak m: say +lines 01:14
camelia rakudo-moar 20aa85: OUTPUT«20␤»
psch m: say +"1\n2\n\n\n\n\n".lines 01:15
camelia rakudo-moar 20aa85: OUTPUT«6␤»
psch ah, misunderstood the docs
raydiak wait thats not right
psch "without trailing new line characters" refers to the lines, not the file
raydiak ah I see
m: say "\n".lines 01:16
camelia rakudo-moar 20aa85: OUTPUT«␤»
raydiak m: say "\n".lines.Numeric
camelia rakudo-moar 20aa85: OUTPUT«1␤»
raydiak m: say "n".lines.Numeric
camelia rakudo-moar 20aa85: OUTPUT«1␤»
raydiak m: say "n\n".lines.Numeric
camelia rakudo-moar 20aa85: OUTPUT«1␤»
raydiak m: say "n\n\n".lines.Numeric 01:17
camelia rakudo-moar 20aa85: OUTPUT«2␤»
raydiak so it chomps off only the last newline of the whole input
01:18 dayangkun joined
psch jercos++ explanation was spot on i think 01:18
"1\n1\n".lines is 3 chars because chars does (the equivalent of) .join(" ")
and .lines does .split("\n") (or .comb(/ ^^ \N*/), as the docs say) 01:19
that split is probably not quite equivalent to the comb... :)
.slurp leaves all the \n in place, and each counts as one char 01:20
01:23 ajr_ left, ajr_ joined 01:28 ajr_ left 01:31 lue left 01:33 tinyblak left, tinyblak joined 01:35 lue joined
BenGoldberg m: "\ntrailingtext".lines.Numeric 01:38
camelia ( no output )
BenGoldberg m: "\ntrailingtext".lines.Numeric.say
camelia rakudo-moar 20aa85: OUTPUT«2␤»
01:45 dwarring left 01:56 davido_ left, davido_ joined 01:57 rhr_ joined 01:58 itz_ joined, cxreg2 joined 01:59 pecastro_ joined, ingy1 joined, Shozan joined 02:05 araujo_ joined 02:06 rhr left, ingy left, araujo left, itz left, cxreg left, SHODAN left, pecastro left, vukcrni left, tadzik left, camelia left, vukcrni joined 02:07 camelia joined 02:08 ChanServ sets mode: +v camelia 02:21 tinyblak_ joined 02:24 chenryn joined 02:25 tinyblak left 02:42 novice777 left
dalek kudo-star-daily: 2d7ed39 | coke++ | log/ (9 files):
today (automated commit)
03:07
[Coke] release tomorrow. Please look over the changelog 03:12
03:13 chenryn left 03:18 Patterner joined
dalek kudo/nom: 2e44436 | (Geoffrey Broadwell)++ | src/core/Failure.pm:
Add die(Failure:D) and die(Failure:U) multis
03:20
03:22 Psyche^ left
dalek kudo/nom: 5f89979 | (Geoffrey Broadwell)++ | docs/ChangeLog:
Add a ChangeLog entry for die(Failure) change
03:24
03:29 chenryn joined 03:37 BenGoldberg left 03:49 muraiki_ left 03:53 yeahnoob left 03:54 noganex_ joined 03:55 yeahnoob joined 03:56 yeahnoob left, yeahnoob joined, yeahnoob left, noganex left 03:57 yeahnoob joined, yeahnoob left, yeahnoob joined, yeahnoob left 03:58 yeahnoob joined, yeahnoob left 03:59 yeahnoob joined 04:00 tadzik joined 04:06 leont left 04:09 chenryn left 04:12 yeahnoob left 04:13 chenryn joined 04:14 anaeem1_ joined, anaeem1_ left 04:15 anaeem1_ joined 04:18 anaeem1_ left, anaeem1_ joined 04:19 Mouq joined
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:23
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:24
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:27
04:28 Mouq left 04:31 yeahnoob joined 04:43 PZt left 04:44 chenryn left 04:47 chenryn joined 04:53 chenryn left 04:56 mr-foobar left 04:59 adu left 05:38 yeahnoob left 05:46 chenryn joined, tinyblak_ left 05:47 tinyblak joined 05:48 anaeem1__ joined 05:50 anaeem1__ left, yeahnoob joined 05:51 yeahnoob left, yeahnoob joined 05:52 anaeem1_ left 05:53 anaeem1_ joined 05:59 mvuets joined 06:08 tinyblak_ joined, mvuets left 06:11 tinyblak left 06:19 yeahnoob left 06:28 [Sno] left, anaeem1_ left 06:31 anaeem1 joined 06:33 anaeem___ joined 06:36 anaeem1 left, yeahnoob joined, yeahnoob left 06:37 yeahnoob joined 06:38 anaeem___ left 06:40 anaeem1_ joined, rindolf joined 06:42 rurban joined 06:43 bjz joined 06:44 |Tux| joined 06:46 TuxCM left 06:47 bjz left 06:48 bjz joined 06:52 booly-yam-6137 joined 06:53 bjz left 06:59 kaleem joined 07:06 booly-yam-6137 left 07:08 telex left 07:10 telex joined, xfix joined 07:12 bjz joined 07:13 Rounin joined 07:22 tinyblak_ left 07:23 tinyblak joined 07:25 Sqirrel left 07:27 abraxxa1 joined, abraxxa1 left 07:29 darutoko joined
TimToady is sad he had to use EVAL in rosettacode.org/wiki/Dice_game_prob...ies#Perl_6 07:30
but xx doesn't seem to make parcels correctly yet
07:30 tinyblak_ joined
xfix Then it should be fixed to not require EVAL. 07:31
07:34 tinyblak left
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␤»
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␤»
TimToady m: say ({1..4} xx 3)».().perl 07:37
camelia rakudo-moar 5f8997: OUTPUT«(1..4, 1..4, 1..4)␤»
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␤»
TimToady ah well, maybe tomorrow 07:39
but we need to make sure we can do X on arbitrary numbers of lists 07:40
07:40 tinyblak_ left, tinyblak joined
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␤»
TimToady there it works
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␤»
TimToady ooh, there it does too
though the .() workaround is almost as bad as EVAL 07:46
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␤»
TimToady I guess there's another way
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␤»
TimToady oh, cool, that's much better
fixed 07:54
m: say [X+] |((1...4) xx 3) 07:57
camelia rakudo-moar 5f8997: OUTPUT«30␤»
TimToady m: say [X+] |((1...4,) xx 3)
camelia rakudo-moar 5f8997: OUTPUT«30␤»
TimToady nope gotta be a Parcel 07:58
we'll probably have to revisit this when parcels go away
08:00 [Sno] joined, yeahnoob left 08:05 xprime left, pecastro_ left 08:06 tinyblak_ joined 08:07 zakharyas joined 08:08 tinyblak left 08:09 prime joined 08:11 FROGGS joined 08:13 yeahnoob joined 08:15 chenryn left, chenryn joined 08:18 kjs__ joined
bartolin good morning, #perl6 08:21
I tried the new parrot version (7.0.0) and had clean spectests on debian 7 and freebsd 10.1 08:22
also stage parse went down from 114 to 106
rurban++
08:22 booly-yam-6137 joined
bartolin maybe it's time for a parrot bump after the next compiler release? 08:23
08:23 Shozan is now known as SHODAN 08:27 Kristien joined
rurban bartolin: But I just found a serious optimizer regression in parrot. probably pushing a 7.0.1 08:30
08:30 kjs__ left
rurban github.com/parrot/parrot/issues/1186 and github.com/parrot/parrot/issues/1187 seem to be critical 08:30
With cc -O3 nasty bugs turned up 08:31
08:31 rindolf left
bartolin rurban: oh. thanks for the note! I'll try again with 7.0.1 then 08:33
rurban But the parrot perfomance is up by ~15%, yes 08:36
08:37 denis_boyun_ joined 08:42 yeahnoob left
Kristien Should I use Parrot or MoarVM? 08:46
lizmat Kristien: yes 08:51
:-)
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
lizmat simply for the fact that a build on Moar takes < 1 minute, and the spectest on Moar takes ~ 200 seconds
compared to parrot (build time ~ 2.5 minutes, spectest ~ 8 minutes) 08:53
Kristien I'll install all of them. :P
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
Kristien nice
I need MoarVM or JVM so I can play with Proc::Async 08:54
not yet supported on Parrot
moritz rakudo-moar is generally moar fun to play with 08:59
shorter startup time, less memory used
Kristien OK 09:00
09:01 yeahnoob joined 09:02 yeahnoob left, yeahnoob joined, yeahnoob left 09:03 yeahnoob joined, yeahnoob left
dalek kudo/nom: a8e384c | lizmat++ | src/core/ (2 files):
Revert "Make EnumMap a first class citizen, skids++"

Push this unfinished fuctionality to the next release, so that we can make sure that EnumMaps stay immutable.
09:03
kudo/nom: 62ffab6 | lizmat++ | / (4 files):
Revert "Introduce Rangeint: simple integer ranges like ^10"

This feature needs more thought, and possibly reimplementation after the GLR
09:04 yeahnoob joined, yeahnoob left, yeahnoob joined 09:09 kjs__ joined
dalek kudo/nom: 4cb196f | lizmat++ | docs/ChangeLog:
Add some more Changelog entries
09:10
lizmat wrt to naming this release: Brussels (as in Bruxelles) was already used in #42
although technically not a PM group, we *will* see a lot of Perl Mongers at next week's FOSDEM 09:11
so maybe naming the release FOSDEM would be an idea? 09:12
.oO( talk about your Conference Driven Development :-)
jnthn mornig, #perl6 09:16
uh, morning
09:17 booly-yam-6137_ joined 09:18 booly-yam-6137 left
lizmat jnthn o/ 09:19
dalek kudo/nom: 23c9634 | jnthn++ | docs/ChangeLog:
Another few ChangeLog entries.
09:23
Kristien OK installed all Rakudo backends
09:23 denis_boyun_ left 09:24 Otterpocket joined
lizmat afk for a few hours 09:28
09:28 molaf_ joined, Rounin left 09:30 brrt joined 09:31 molaf__ left 09:36 dakkar joined
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«␤»
Kristien I expected 1, 2 as output TBH
09:42 donaldh joined 09:44 fhelmberger joined
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:47
09:48 xfix left
masak good antenoon, #perl6 09:48
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?
timotimo oh! right, that was all this month!
yays :)
lizmat++
jnthn Kristien: First, has Array @!x would mean an array of arrays; the @ already means array
Kristien Right. :P 09:51
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:52
And you already guessed that bless is not the way to initialize privates. :) 09:53
m: class B { has Array @!x = 1, 2; method f { say @!x; } }; B.new.f
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/…»
jnthn m: class B { has @!x = 1, 2; method f { say @!x; } }; B.new.f
camelia rakudo-moar 62ffab: OUTPUT«1 2␤»
jnthn There's one way
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␤»
jnthn And another.
Kristien Oh OK.
Now it works, thanks.
nwc10 good UGT orthodoxy, masak 10:04
timotimo have a happy release, everyone :) 10:05
Kristien yay, my first Perl 6 program 10:10
gist.github.com/rightfold/064abbbd0aa5ae25e816
abraxxa Kristien++ #nice 10:12
brrt that's actually pretty nice, yes :-) 10:13
10:13 pecastro joined
jnthn Cool! 10:16
abraxxa shouldn't it be named .pl6? 10:18
10:19 araujo_ left 10:20 yeahnoob left, araujo joined
FROGGS abraxxa: that's a matter of taste 10:21
brrt (some progress on rakudo-on-fedora: bugzilla.redhat.com/show_bug.cgi?id=1184549) 10:30
i typically use p6
.p6
jnthn tends to do .p6 also 10:31
Kristien I use #! :P
tadzik I'm a pl person
(huehuehue)
Kristien (saturationsaturationsaturation) 10:32
10:35 LLamaRider joined 10:36 virtualsue joined 10:43 DarkLoord joined, DarkLoord left 10:44 jmark joined 10:50 xfix joined
FROGGS tadzik: :D 10:52
Ulti m: my @l = 1,2,3; @l Zmin= @l.reverse; say @l; 10:53
camelia rakudo-moar 23c963: OUTPUT«1 2 1␤»
Ulti Zmin= <--- such operator
jnthn o.O 10:54
Such meta.
Ulti yeah very meta, I was surprised that worked out :3
10:57 panchiniak joined 10:58 booly-yam-6137_ left 11:00 bbkr joined 11:02 jmark left 11:03 spider-mario left 11:04 LLamaRider left 11:06 jmark joined 11:07 jmark left, jmark joined 11:13 bbkr left
jmark p6: say 3; 11:14
camelia rakudo-{parrot,moar} 23c963: OUTPUT«3␤»
jmark p6: say "This is a newbies test!"; 11:15
camelia rakudo-{parrot,moar} 23c963: OUTPUT«This is a newbies test!␤»
11:17 brrt left
tadzik hello jmark :) 11:18
jmark hi 11:21
11:28 panchiniak left 11:33 booly-yam-6137_ joined 11:36 gcole joined 11:40 denis_boyun_ joined
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:41
as a, what I would call a "looper" 1..42 for instance 11:42
this is most of the usage in most code
and the other is indicating a range of (Real) values,
jnthn The end-points don't have to be numeric either :) 11:43
lizmat indeed
jnthn I don't tend to feel it's an abuse of it, though
lizmat from an optimizations point of view, we cannot know if a .. is going to be used as a looper
or as a range
El_Che what did you guys do to Ovid? 11:44
on twitter:
I strongly recommend *NOT* programming in Perl 6. Do it long enough and you won't want to go back to Perl 5.
lizmat :-)
been there, done that :-)
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
lizmat yeah, but having a phaser breaks that already
my Rangeint opt would give us about 17% for the non-optimized cases
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
std: 0 >< 3.14 # would that make for a nice range operator ?
camelia std f9b7f55: OUTPUT«===SORRY!===␤Unable to parse quote words at /tmp/7fc12Xh_qZ line 1:␤------> 0 >⏏< 3.14 # would that make for a nice ran␤Couldn't find final '>'; gave up at /tmp/7fc12Xh_qZ line 1 (EOF):␤------> ld that make for…»
Kristien Why does Grammar.match return Any instead of Nil? The documentation says it returns either Match or Nil 11:47
Grammar.parse*
lizmat std: "a" >< "z"
camelia std f9b7f55: OUTPUT«===SORRY!===␤Unable to parse quote words at /tmp/qL5LDWScp5 line 1:␤------> "a" >⏏< "z"␤Couldn't find final '>'; gave up at /tmp/qL5LDWScp5 line 1 (EOF):␤------> "a" >< "z"⏏<EOL>␤Parse failed…»
jnthn lizmat: I think we can optimize it well enough the way it is, with some more effort.
lizmat I know we can, but that doesn't solve the conceptual mix :-( 11:48
jnthn I don't really see it as one.
Or, it's never bothered me. We already took two things away from Range's responsibility in the past.
lizmat ah? what ?
JimmyZ irclog.perlgeek.de/perl6/2015-01-20#i_9972868 # anyone saw this one?
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 ?
ah, yes
JimmyZ lizmat: moar --dump
11:49 Kristien left
JimmyZ and search say op 11:50
jnthn And also ... exists partly to do a bunch of the more complex cases.
lizmat yeah, and I get that
jnthn JimmyZ: You'll see it easily enough with --target=optimize too
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:51
JimmyZ I think this one is reall a good one to be optimized :) 11:52
not sure how nqp gens it
jnthn It's a curious one 'cus the returns annotation is marked up correctly 11:53
multi sub infix:<~>(str $a, str $b) returns str { nqp::concat($a, $b) }
11:53 rurban left
dalek Heuristic branch merge: pushed 38 commits to rakudo/newio by lizmat 11:56
11:57 rindolf joined
masak jmark: welcome :) 11:58
12:07 chenryn left 12:12 brrt joined 12:16 regreg joined
abraxxa the file extension might make a difference on windows 12:17
so standardizing on one is a good idea
xfix [12:42] <lizmat> and the other is indicating a range of (Real) values, 12:21
It's abused similarly in Ruby.
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
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)
=> true
12:24 kaleem left
xfix (or alternatively, (3..5.6) === 5.5, which works like 3..5.6 ~~ 5.5 in Perl 6) 12:25
(I mean, 5.5 ~~ 3..5.6) 12:26
12:27 rurban joined 12:28 kaare_ left 12:32 Kristien joined, Kristien left 12:38 Rounin joined 12:41 gcole left 12:47 gcole joined 12:50 leont joined 12:54 anaeem1_ left 12:55 abraxxa left, breinbaas left 12:56 tinyblak_ left 12:57 tinyblak joined 13:01 tinyblak left
lizmat is there a reason why we don't have a "sub" version of "subst" and "match" ? 13:09
13:10 kaleem joined
lizmat or 'trans' 13:11
trans is at least specced 13:12
13:14 dayangkun left
tadzik well, we have ops :) 13:15
timotimo yo TZK!
tadzik yo!
timotimo how are you :)
tadzik pretty well :)
timotimo glad to hear it
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
tadzik well, I gave some away but I still have plenty :)
timotimo and then you gamed some away, too :)
tadzik heheh
I use them to promote Perl more than to motivate myself :P
13:17 skids left
timotimo that sounds totally acceptable :) 13:18
13:24 Kristien joined 13:30 tinyblak_ joined
masak tadzik: shouldn't say "gamer"; it's called "hand-eye coordinator" :P 13:33
or "senior hand-eye coordination consultant"
timotimo :D 13:34
tadzik heheh
reactive executive 13:35
psch hi #perl6 \o 13:36
&rand is such a delightfully chaotic composer 13:37
oh, but rand is a term, not a sub 13:39
jnthn "The &rand band! No 2 concerts are ever the same!"
psch "Pick and the rand band"
jnthn So relax. It's already better than Nickleback. :P 13:40
timotimo flip a nickle
psch tbh, i rather liked their song for some time
timotimo "their song"? :)
jnthn :D
psch timotimo: yes, Nickleback is rather uninventive. similarly as formulaic as Modern Talking 13:41
although it's obviously exaggerated for comedic effect :)
tadzik I like this one: 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
lizmat jnthn: nqp::iseq is documented as returning "non-zero" if the parameters are the same
jnthn: however, in practice, I see only 1 and 0
jnthn tadzik: AAARRGGHH!
tadzik shh, don't ruin it for others :P
timotimo oh yeah, modern talking! 13:43
lizmat AAARGGGH
timotimo such a good band
tadzik: The uploader has not made this video available in your country.
tadzik timotimo: ...I don't believe you :o
timotimo tadzik: www.youtube.com/watch?v=5tsLNIHj8xE - this one is better 13:44
itz_ recommends Arcade Fire for music
13:44 Rounin_ joined
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
timotimo hiyo itz
tadzik ooh, a new one
timotimo lizmat: multiplication?
lizmat no, the check for CR if an LF is found
jnthn lizmat: I'd be reluctant to rely on it
timotimo ah
lizmat jnthn: ok, too bad then
13:45 breinbaas joined, Rounin left 13:46 Rounin_ is now known as Rounin
donaldh jnthn: is there any reason for block lex values to be initialized separately from coderefs ? 13:50
13:50 Kristien left
donaldh jnthn: I'm wondering if I can move to annotations as part of exploring lazy init. (on JVM) 13:50
jnthn donaldh: Ordering dependency I think 13:51
donaldh: We need the coderefs to hand to the deserializer
donaldh: But the block lex values depend on deserialization having taken place 13:52
donaldh: Maybe annotations are lazy enough, though.
donaldh If I stored everything in annotations then I could be lazy about stitchup after deserialization.
13:53 rurban1 joined
jnthn True 13:53
And for blocks we never call we never bother doing the stitchup
donaldh zactly
timotimo is that what moarvm recently got when we introduced VMNull to differentiate between initialized and stores a null value? 13:54
"recently"
jnthn timotimo: Well, introducing it made that easier to implement at least.
donaldh Would be a huge win on constant table size too because the joined block lex value strings are all unique.
jnthn Yes.
donaldh First step: store teh blv data in annotations. 13:56
timotimo boulevard data?
donaldh thinks that bit looks easy enough
13:57 zakharyas left
JimmyZ
.oO(port spesh to JVM so we can remove more nqp::ops ...)
13:57
13:57 zakharyas joined, Rounin left
jnthn JimmyZ: JVM's spesh is called invoke dynamic... :) 13:58
timotimo indeed
jnthn Combined with all the awesome stuff its JIT does
JimmyZ will it move nqp::ops like hllize? 13:59
*remove
JimmyZ knows nothing about that.. 14:00
14:01 brrt left 14:02 yeahnoob joined
jnthn Not at present, but we could arrange for it. 14:03
jnthn puts his course writing aside for a bit to do the MoarVM relesae 14:04
14:04 Rounin joined
masak ooh, release day today? yipee! 14:04
AAARGGGH 14:06
timotimo that sounds like a release blocker
masak .oO( Rickleback ) 14:07
14:10 _4d47 joined 14:23 Otterpocket left 14:27 Kristien joined 14:29 rurban left 14:38 tinyblak_ left
donaldh falls into the nqp staging hole 14:47
14:47 fhelmberger_ joined
moritz puts a *round* manhole cover over it 14:50
oops, maybe I should have helped donaldh out first
14:51 fhelmberger left 14:52 brrt joined
donaldh carefully primes the nqp staging hole trap for himself 14:52
14:52 fhelmberger_ left, fhelmberger joined 15:02 Kristien left 15:04 Rounin left 15:07 Kristien joined
lizmat $ 6 'use test; ok 1' 15:09
ok 1 -
case insensitive file systems :-(
$ 6 'use test; use Test' 15:10
===SORRY!===
Merging GLOBAL symbols failed: duplicate definition of symbol Test
*sigh*
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:12
xfix Which is why Perl 5 has the following code in strict and warnings. 15:13
unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) { my (undef, $f, $l) = caller; die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n"); }
It's specifically to detect stuff like `use Strict`.
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:14 kurahaupo1 left
moritz brrt: are there successful projects out there using LLVM JIT? 15:15
brrt certainly
lizmat xfix: I was thinking of keeping the inode of the file loaded
brrt moritz: just stumbled on dev.stephendiehl.com/numpile/
last year saw apple's 'FTL' javascript compiler
which was equal aspects huge hack and great success, depending on whom you ask 15:16
rust is built upon llvm, although I wouldn't necessarily say it is a *great* success 15:17
(that is, it took too long even on *my* computer to compile it from source) 15:18
15:19 telex left
brrt of course, if LLVM doubles our memory footprint, it's hardly an option 15:20
15:20 rurban1 left, telex joined 15:25 Woodi left, Woodi joined
dalek kudo/newio: 90c62d3 | lizmat++ | src/core/IO.pm:
Introduce fast TRANSPOSE sub
15:25
kudo/newio: a9f8e45 | lizmat++ | src/core/CompUnitRepo/Local/File.pm:
Faster module -> path translation when loading
15:27 _4d47 left 15:28 kurahaupo1 joined 15:38 raiph joined
hoelzro o/ #perl6 15:39
masak \o
psch o/ 15:40
FROGGS o\
moritz |o" 15:41
15:42 _4d47 joined
FROGGS O.o 15:42
15:47 Kristien left 15:54 yeahnoob left
dalek ecs/newio: 47aab48 | lizmat++ | S16-io.pod:
Spec path.i (for unique path identifier)
15:58
16:00 booly-yam-6137_ left 16:02 rurban joined 16:09 rurban1 joined
donaldh deftly side-steps the nqp staging trap while whistling along to Nickleback 16:09
16:11 skids joined
dalek p: 81e37a1 | moritz++ | tools/build/MOAR_REVISION:
bump MOAR_REVISION to 2015.01

because we can!
16:12
jnthn
.oO( This is how your remind me, of how compiler bootstraps )
16:14
16:18 jmark left
sjn \o 16:23
jnthn o/ sjn
sjn found a buglet in rakudobrew :-| 16:24
jnthn senses trouble brewing... 16:25
moritz troublebrew!
sjn nah, it's just that the Makefile was missing a rule for "m-clean"
running Configure.pl again solved it 16:26
(given, I haven't built something with rakudobrew in a good while) 16:27
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:28
16:29 kaleem left 16:32 jmark joined 16:34 jmark_ joined, jmark left, jmark_ left 16:35 jmark joined
jnthn sjn: Sadly not...my only time in Norway in the near future is a short trip to Trondheim. 16:36
16:36 _4d47 left 16:38 brrt left 16:39 mr-foobar joined, zakharyas left 16:40 jmark left, jmark joined
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:48
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␤␤»
psch CurtisOvidPoe: i suspect you're talking about a method instead of a sub?
CurtisOvidPoe Yeah, I’m going by memory here :)
psch CurtisOvidPoe: you can declare :$field as mandatory with a postfix:<!> 16:50
m: class Foo { method bar(:$field! = "default) { say "got $field" } }; Foo.bar(feild => "baz")
camelia rakudo-moar 23c963: OUTPUT«===SORRY!===␤Cannot put default on required parameter $field␤at /tmp/AKLEEp3bck:1␤------> say "got $field" } }; Foo.bar(feild => "⏏baz")␤Missing block␤at /tmp/AKLEEp3bck:1␤------> say "got $field" } }…»
jnthn That's not the issue
design.perl6.org/S12.html#Interface_Consistency
psch ah
also it doesn't even work
requireds don't do default apparently :)
jnthn It's that methods accept unknown named parameters
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 :)
jnthn ;)
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?
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 :)
jnthn A *lot* of people find this surprising, even if it makes sense from an extensibility perspective...
CurtisOvidPoe So I have to mark the class “is hidden” to make this work? 16:53
jnthn *nod*
psch m: class Foo is hidden { method bar(:$field = "default) { say "got $field" } }; Foo.bar(feild => "baz")
camelia rakudo-moar 23c963: OUTPUT«===SORRY!=== Error while compiling /tmp/6aq9n7ndBr␤Missing block␤at /tmp/6aq9n7ndBr:1␤------> say "got $field" } }; Foo.bar(feild => "⏏baz")␤»
jnthn CurtisOvidPoe: Did you get chance to try out the claim-prototype branch yet? 16:54
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 "
jnthn Not there
It works in roles
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
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.
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)
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)
(Qualifying them with the role name.)
CurtisOvidPoe Ah, OK. 16:58
By the way, where do I find documentation on the “is hidden” trait? I’ve been looking for it.
jnthn doc.perl6.org/routine-trait.html seems to be a broken link :( 16:59
moritz: Dunno if you know anything about ^^ 17:00
But that's the place it should be documented, anyways...
May also fall under "dusty language corners we didn't get to with the docs yet" 17:02
CurtisOvidPoe The internet archive says it never existed. 17:04
So what does “is hidden” do? 17:05
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␤»
masak m: class Base is hidden { method foo { say "Base" } }; class Deriv is Base { method foo { say "Deriv"; nextsame } }; Deriv.new.foo
camelia rakudo-moar 23c963: OUTPUT«Deriv␤»
masak CurtisOvidPoe: ^^
jnthn It means that the method in the class can not be deferred to using nextsame and friends
Which is the reason that *%_ is added in the first place.
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
camelia rakudo-moar 23c963: OUTPUT«C␤»
masak seems 'is hidden' hides not just the class, but that entire ancestry path.
(which seems sane.) 17:08
jnthn masak: You didn't do a nextsame anywhere?
masak oh dang.
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
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␤»
masak jnthn++ 17:09
ok, only the middle class hides itself. ancestors are still visible to `nextsame`.
CurtisOvidPoe Or am I just totally misunderstanding all of this?
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.
jnthn It is one that gets questioned a lot.
masak especially in the past few days.
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.
jnthn s/days/years/ :P
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.
Amd it *would* get ignored :)
masak why "Cor"? is there a pun in there I'm not getting?
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
masak .oO( as long as it's not short for "Cortana"... )
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
CurtisOvidPoe Heh 17:14
The modern geek’s rebuttal to classical history.
masak falling in love with your wife! classical rookie mistake!
:P
CurtisOvidPoe Every time I read about some famous historical figure making a mistake, I’ll have to write “haha, n00b” :)
17:15 FROGGS left
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
masak sure makes history more compact. 17:15
CurtisOvidPoe Might get more people reading about it. 17:16
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
"really, Napoleon -- really?"
*ding*
(the ding +1s a sin counter in the top left) 17:18
Kristien morning
masak Kristien! \o/
CurtisOvidPoe Evening!
17:18 zakharyas joined
masak good UGT/nwc10 morning! :) 17:18
vendethiel masak: I stopped watching these because they made me far too cynical ;-) 17:22
Kristien "say $*TZ;" prints "morning" on my machine
vendethiel suspension if disbelief is a good thing
17:22 rmgk left 17:24 rmgk joined
masak m: say $*TZ 17:25
camelia rakudo-moar 23c963: OUTPUT«3600␤»
17:27 tgt joined
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
vendethiel: same reason I enjoy TV Tropes.
Kristien vendethiel: I have a shortcut for suspension: control+Z 17:29
vendethiel I think cinemasins becamse far too nitpicky in the last months :)
17:29 rmgk left
leont nwc10: don't know much in particular about llvm 17:29
Kristien LLVM is fun. 17:30
17:30 rmgk joined
Kristien (Apart from the horrible inconsistent, exceptionless, RTTI-less, RAII-less API.) 17:31
vendethiel Kristien: why'd you want RTTI :P?
Kristien for downcasting 17:32
I never use static_cast for that because it's too dangerous.
LLVM has its own crippled RTTI instead of having the compiler generate it.
donaldh do we really represent local timezone as a number? 17:34
jnthn m: say $*TZ.WHAT 17:35
camelia rakudo-moar 23c963: OUTPUT«(Int)␤»
jnthn ...apparently
donaldh but a TZ is a different concept from the current calculated offset from UTC in seconds
Kristien Noda Time is a great library to look at when it comes to time. 17:36
17:36 rmgk left
Kristien (The .NET library.) 17:37
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
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
Various APIs get this horribly wrong, such as Python's.
17:43 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk
vendethiel TimToady: I havn't seen that many people interested in a clr backend :p 17:43
17:44 kjs__ left 17:46 njmurphy joined
TimToady hangin' out with the avant-garde crowd mostly, eh? 17:48
vendethiel is the jvm avant-garde? 17:49
well, the clr sure gained some attention since the open source wave
.oO( I have no idea, actually. I guess I just don't talk to CLR people )
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 denis_boyun_ left
Kristien Larry Gosling 17:52
TimToady my beard itches
jnthn There's a lot of people using that Windows thing... ;)
Kristien My beard never itche… wait I have no beard.
jnthn sometimes has folks ask about a Rakudo.Net
TimToady what's your story? 17:53
jnthn "Not yet" :)
Well, I used to point them to Niecza
TimToady certainly an excellent proof-of-concept
Kristien Is there an ECMAScript implementation of Perl 6? 17:54
TimToady only nqp, so far
vendethiel jnthn: I wonder why you know .net folks :P
Kristien: also, it's only a backend 17:55
17:55 dakkar left
TimToady npq on js was pmurias++'s GSoC last year 17:55
vendethiel
.oO( nqp will be this year's GSoC )
jnthn vendethiel: Spent a bunch of years living in Sweden, where there's a lot of that. ;)
vendethiel jnthn: also,$job, right :) 17:56
jnthn Yes :)
Well, $job is the thing that ended up with me being here :)
vendethiel oh, there's so many of you guys?
(dozens, I guess)
Kristien a BEAM backend would be interesting 17:57
jnthn At my $dayjob there ain't quite dozens of us yet.
17:57 pecastro left
vendethiel Kristien: not sure, the languages doesn't really fit BEAM 17:57
Kristien hence
vendethiel -s
.oO( but Perl6 is many languages )
jnthn Anyway, adding a backend is a decent bit of work. 17:58
vendethiel how'd you know? *g*
jnthn Can't imagine! :P
vendethiel "decent bit of work" that's the euphemism of the day, rally
jnthn Probably the CLR ain't so bad to do in so far as it's rather like the JVM :)
TimToady not to be confused with a bit of decent work
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
Kristien: No you don't :) You might choose to worry about them if it gets you better code-gen, though... :)
Kristien Why not?
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
jnthn Having worked in C# and Java, I'm rather glad of the reified generics. 18:01
dalek p/blv_annotations: b448059 | donaldh++ | src/vm/jvm/ (15 files):
Add block lex values to the CodeRefAnnotation

This unfortunately blows the classfile size for Rakudo CORE.setting
18:01 virtualsue left
jnthn However, I'd agree it's not a very general mechanism if you're implementing something beyond C#'s generics. :) 18:01
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
donaldh plows throught some indecent work on the JVM 18:03
jnthn donaldh++
donaldh *through
lizmat Would it make sense to have .IO.e return self on existence, and Nil on non-existence?
that would allow chaining like $foo.IO.e.f 18:04
18:04 Rounin joined
TimToady wonders what the blockers for a Go engine backend would be, whatever they call it... 18:04
nwc10 donaldh++
Kristien TimToady: what's a Go engine?
jnthn donaldh: What specifically does it blow, ooc?
TimToady whatever it is that GoLang uses
Kristien Go's compiler compiles to machine code.
donaldh jnthn: overall classfile size
jnthn Darn!
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
jnthn The annotations are bigger than the code we generated?
18:05 rurban1 left
Kristien You could use the Go runtime library 18:05
from C
donaldh But it should be okay when I remove the blv constants and the init code
jnthn Ah, OK 18:06
donaldh I've got the annotations, now I'll use them :)
jnthn :)
TimToady but as the next big gorilla, it would be useful to subvert Google from the inside
Kristien The only real gain would be to have green threads.
jnthn away for a bit
Kristien But they are rather trivial to implement.
donaldh recreation& 18:07
Kristien Making them fast may be an issue.
18:07 donaldh left
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.
and pause fibers on channel operations
18:08 anaeem1_ joined
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.
You could even use the C call stack if you use Boost.Coroutine.
TimToady well, at least Go ain't C++
tony-o_ lol 18:09
Kristien Here's a VM with green threads that I once implemented: github.com/rightfold/styx/blob/mas...src/vm.cpp
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:10
18:11 anaeem1_ left
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:11
Or rather, the optimisation enabled by it. 18:12
18:13 Hor|zon_ left
raydiak good morning #perl6 18:15
18:17 anaeem1_ joined 18:18 perltricks joined 18:19 anaeem1_ left
perltricks Hey y'all I made svg icon of Camelia github.com/sillymoose/Perl-Icons/b...amelia.svg 18:20
Kristien nice
perltricks Might make a nice icon for web menus etc. With Larry's permission of course :)
TimToady use for icons and such is already granted 18:21
perltricks TimToady: Great, thanks!
18:21 muraiki left
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
perltricks TimToady: ohhh you're right
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
Kristien so that there's a stable implementation, no more breaking changes and sufficient documentation
TimToady we're aiming for this year 18:24
Kristien neat.
I have one tool in mind that I want to use Perl 6 for. 18:25
18:26 muraiki joined 18:28 anaeem1_ joined
TimToady skids: I'd suggest adding a paragraph to the Twigils section that already talks about interpolation vs twigils 18:29
there are examples of :$!a in S6 and S12 already, at least 18:30
but we should express the policy that twigils are transparent to that too 18:31
18:31 Hor|zon joined
skids TimToady++ will do. 18:31
18:32 FROGGS joined 18:33 FROGGS_ joined
perltricks TimToady: Ok, logo updated with extra detail github.com/sillymoose/Perl-Icons/b...amelia.svg 18:35
TimToady huh, still doesn't show up here 18:36
18:37 FROGGS left
perltricks TimToady: perhaps try browser refresh with clearing the cache 18:37
18:37 anaeem1_ left
TimToady still missing the upper inner spots 18:39
18:40 raiph left, anaeem1 joined
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:41
TimToady nodnod 18:42
dalek ecs: d7abe41 | skids++ | S02-bits.pod:
Explicitly spec sigiled form of adverb with twigil
18:44
18:45 kaare_ joined
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:45
we wouldn't people to think she was going all anorexic... 18:46
18:47 jluis_ joined
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
*mm
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.
Does this mean it is allowed to optimise any(…, True, …) to any(True) and all(…, False, …) to all(False)?
18:49 raiph joined
TimToady I think so 18:49
18:49 njmurphy left 18:50 Kristien left
psch raiph: are you looking to keep the SO answer more up-to-date? 18:50
raiph: 'cause one thing i'd appreciate is if there was no 't' in my last name :) 18:51
TimToady either
[Coke] I will start working on the release post $dayjob.
TimToady
.oO(he has a $dayjob doing release posts?)
18:52
18:52 darutoko left, darutoko joined
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
psch thanks raiph++ 18:55
vendethiel ermm... I think our unique shouldn't be called unique. 18:58
m: (1, 2, 1).unique.say
camelia rakudo-moar 23c963: OUTPUT«1 2␤»
vendethiel should probably be "distinct". when did programming change "unique"'s meaning?
masak +1
18:59 rurban left, denis_boyun_ joined
vendethiel lizmat++ # weekly 19:00
19:00 anaeem1 left
vendethiel "mixins will be 10x faster" wow -- really? 19:01
hobbs someone bought a Blendtec
vendethiel
.oO( I can guess lizmat wrote the weekly because there's no ++ after her name *g* )
19:02 [Sno] left 19:03 anaeem1_ joined 19:05 rindolf left 19:07 anaeem1_ left
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: github.com/sillymoose/Perl-Icons/b...amelia.svg 19:07
19:09 fhelmberger left
TimToady that's better, thanks 19:14
but surely unique merely means "like something oneish" if you want to go all etymological 19:17
in any case, if you are distinct from all your compatriots, you are unique already
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␤»
..rakudo-parrot 23c963: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1421954288.08727␤»
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
so it's perfectly okay in my language to qualify the work 'unique' 19:20
masak kaare_: submit rakudobug?
er, skids*
psch i think there is one for @<foo> already
TimToady All animals are created unique, but some are uniquer than others.
skids I'll look for an RT in a bit.
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:22
19:23 perltricks left, Sqirrel joined
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:24
19:25 kjs__ joined
dalek line-Perl5: 6aa0ca8 | (Stefan Seifert)++ | / (2 files):
Support AUTLOAD of P5 objects when calling their methods
19:28
TimToady of course, all that being said, Unix's uniq is really a squish, go figure...
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
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');
^^^ that's literally the whole slide on using XML::XPath via Inline::Perl5. This seems so simple that it's hardly worth talking about...
TimToady otoh, distinct is 2 more characters to type...
moritz but not the obscure q key :-) 19:31
TimToady yeah, distinct is easier to type really
at least on qwerty
19:32 gfldex joined
TimToady wonders if there's a good short anglo-saxon term for unique/distinct 19:33
sole, only, alone sez my wife
onely, allone... :) 19:34
FROGGS_ lone
raiph psch: I just brew'd fresh Jakudo; ran original CRC example with s/(B)/([B)/; I get an error: 19:35
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
TimToady distinct probably works better as a function name than as a method name 19:37
dedup would be more operational 19:38
jdv79 trim? but maybe not close enough.
TimToady already used
m: say " stuff and nonsense\n\n".trim
camelia rakudo-moar 23c963: OUTPUT«stuff and nonsense␤»
TimToady besides, has connotations of "only around the edges" 19:39
19:39 Rounin left 19:40 adu joined
TimToady well, unique also reads well as a function 19:40
and really drives home the not like any other in the whole dataset
dedup could easily mean squish 19:41
jdv79 lop would be shorter but same connotation as trim i guess
TimToady lop doesn't imply uniqueness
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
so let's stick with unique
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
unique can never be taken to mean a local squish 19:44
*misused
it's a uniquely good word for removing all duplicates from a large universe of things 19:45
it's a power word, which is of course why people misuse it all the time :) 19:46
19:46 raiph left
TimToady and why other people think it's important to fight over :) 19:48
nobody fights over the meaning of 'distinct' :) 19:49
If you put a quarter into a linguist, you'll get none. 19:52
If you put a quarter into a linguist, you'll get no quarter. # perhaps clearer 19:53
TimToady wonders how "quarter" became a synonym for "mercy"... 19:54
jnthn nine: Showing people that stuff is simple is probably a good thing. ;) 19:57
raydiak ls
19:57 anaeem1_ joined
flussence . .. 19:57
raydiak oh no where'd it all go!?
TimToady ah, they don't really know how quarter came to mean that 19:58
flussence someone set LS_OPTIONS wrong :)
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:02 anaeem1_ left
flussence bah, panda/bootstrap.pl is hanging and I didn't notice until now because I'd been using rebootstrap.pl... 20:03
oh, maybe because I have that system-installed rakudo sitting around... 20:04
there we go, it just didn't like perl6-p...
20:05 _4d47 joined 20:06 Kristien joined
TimToady maybe it just turned the non-directory filenames into the background color 20:06
flussence that's... creative :)
PerlJam TimToady: the explanation of "quarter" as in housing rather than death makes sense to me. 20:07
Kristien hola
geekosaur language doesn't always make sense though
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. :)
TimToady: true.
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:09
20:10 zakharyas left 20:11 brrt joined
TimToady yes, people will swallow those explanations lock, stock, and sinker. 20:11
b2gills m: class A { method test (:$field, *% [] ){ } }; A.test(:feild); #CurtisOvidPoe
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␤␤»
TimToady or was that hook, line, and barrel...
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
CurtisOvidPoe What did I just miss? Why is the *% [] necessary?
Kristien pl6: say "hi" 20:13
Is the bot broken?
b2gills *% captures pairs that aren't in the sig, [] is a subsignature that means it should be empty
Kristien ah works with m:
ohh p6 not pl6 my bad
20:13 andreoss joined
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:14
TimToady m: class A { method test (:$field, *% where :not ){ } }; A.test(:feild); 20:15
camelia ( no output )
TimToady hmm
CurtisOvidPoe @b2gills: thanks for that explanation. That something I would definitely like a “short” way of handling.
@PerlJam: I haven’t seen that branch yet, so it’s hard to say. What is the exact syntax?
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␤␤»
TimToady m: class A { method test (:$field, *% where { die("testing $_") } ){ } }; A.test(:feild);
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
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
TimToady I guess it wheres each value 20:16
20:16 tully-the-geek left
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␤»
TimToady no, it's testing the hash
m: say { :feild } ~~ :not
camelia rakudo-moar 23c963: OUTPUT«True␤»
TimToady m: say { :feild } ~~ :so
camelia rakudo-moar 23c963: OUTPUT«True␤»
TimToady hmm
b2gills I like that Larry apparently has conversations with himself on irc
TimToady m: say { :feild } ~~ *.not 20:18
camelia rakudo-moar 23c963: OUTPUT«False␤»
jnthn PerlJam: Yes, that's how it works.
TimToady I guess you can't use a pair matcher against a hash like that
lizmat TimToady: re quarter -> mercy
6 (quarters) rooms or lodgings, especially those allocated to servicemen or to staff in domestic service: they lived in RAF married quarters.
PerlJam good, at least my memory isn't failing (too much :)
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.
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␤␤»
FROGGS_ m: class A { method test (:$field, *% where *.not ){ } }; A.test(:field);
camelia ( no output )
CurtisOvidPoe Is there a way I can run the “claim” branch from IRC or do I need to download and compile it?
TimToady I guess thtat's not as good a message
lizmat TimToady: so "no quarter" could be interpreted as "not taking any prisoners"
TimToady yes, that's one explanation
jnthn CurtisOvidPoe: You'll have to do it locally 20:20
TimToady but etymologists have learned to be skeptical over the years
jnthn CurtisOvidPoe: Do you use rakudobrew, or do you build directly?
CurtisOvidPoe I’ve been building directly. 20:21
Kristien m: say (1..10).WHAT
camelia rakudo-moar 23c963: OUTPUT«(Range)␤»
dalek kudo/newio: e8c9d5e | lizmat++ | src/core/IO (4 files):
Implement .IO.i (for unique path ID)
20:22
jnthn CurtisOvidPoe: Ok, then just git checkout claim-prototype, then the usual Configure/make
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.
Do I need to do manual dispatching inside of my own “claim verify() {…}”?
Hmm, but then I’m guessing we might have signature problems. 20:23
20:23 CurtisOvidPoe left
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, Ovid_ is now known as CurtisOvidPoe
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.
TimToady if the sigs differ you could do claim proto verify and then write multies
jnthn role Tother does This does That { claim method verify(|c) { self.This::verify(|c); self.That::verify(|c) }
(Untested, but should work.)
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
jnthn That was what my one just showed?
TimToady depends on whether you want to rename one or both of them
20:26 darutoko left
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;
camelia rakudo-moar 23c963: OUTPUT«===SORRY!=== Error while compiling /tmp/UbX_MndHn3␤Cannot negate && because it is not iffy enough␤at /tmp/UbX_MndHn3:1␤------> say 1 !&&⏏ 2;␤»
TimToady or you could rename them both, and just ... the verify claim
Kristien No NAND. :(
20:26 [Sno] joined
TimToady m: say 1 !+& 2 20:27
camelia rakudo-moar 23c963: OUTPUT«===SORRY!=== Error while compiling /tmp/qdAyNeKoFm␤Cannot negate +& because it is not iffy enough␤at /tmp/qdAyNeKoFm:1␤------> say 1 !+&⏏ 2␤»
TimToady m: say 1 !?& 2
camelia rakudo-moar 23c963: OUTPUT«===SORRY!=== Error while compiling /tmp/Z6HecURMAH␤Cannot negate ?& because it is not iffy enough␤at /tmp/Z6HecURMAH:1␤------> say 1 !?&⏏ 2␤»
moritz ?& is not iffy enough? :-)
TimToady oh come on, ?& returns a boolean
moritz std: 1 !?& 2
camelia std f9b7f55: OUTPUT«ok 00:00 136m␤»
TimToady you can't get iffier then ?&
moritz so
TimToady just missing a :iffy somewhere
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
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
TimToady on the redirect
CurtisOvidPoe OK, thanks. 20:29
TimToady at least, I'd expect it to require full qualification, or you might just get infinite recursion
20:29 _4d47 left
PerlJam Sounds like an easy warning to spot though 20:30
(maybe0
skids r: "aa" ~~ m/$<fie>=((a)(a))/; :fie(@<fie>).say; :@<fie>.say; # 2 cheers for methodical testing
camelia rakudo-{parrot,moar} 23c963: OUTPUT«fie => 「a」 「a」␤fie => 「aa」␤ 0 => 「a」␤ 1 => 「a」␤»
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:32
Are all files guaranteed to be UTF-8? Can I change the encoding of a source file? Or globally? 20:33
By “files” I mean “Perl 6 programs and modules” 20:34
PerlJam: I think that might be hard to spot because of allowing recursion. 20:35
FROGGS_ CurtisOvidPoe: perl6 accepts: --encoding=[mode] specify string encoding mode 20:37
there is no global option
20:37 japhb joined
CurtisOvidPoe FROGGS_: does that impact the data you’re working with, or also the source code? 20:37
FROGGS_ ohh, that affects *only* the source code 20:38
(and string literals in the source, of course)
in case you were talking about open(), slurp() and friends, pass :enc<...> 20:39
gtodd how does "interning" work ? :-D ...
or .. well ...
moritz with magic!
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.
CurtisOvidPoe FROGGS_: No, I was just wondering about the source code. Thanks :)
FROGGS_ k :o)
gtodd it sound like it makes applications BEHAVE or they have to stay after school
"magic" is close enough :-) 20:41
CurtisOvidPoe m: for 1..3 { say $^a } 20:42
camelia rakudo-moar 23c963: OUTPUT«1␤2␤3␤»
CurtisOvidPoe m: for 1..3 { say $^a; say ^b; say ^c }
camelia rakudo-moar 23c963: OUTPUT«===SORRY!=== Error while compiling /tmp/7C3agJ5pnR␤Undeclared routines:␤ b used at line 1␤ c used at line 1␤␤»
gtodd as long as there is a small yet diverse and geographically dispersed group that understands how they work :-)
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 bjz left
FROGGS_ m: for 1..3 { say $^a; say $^b; say $^c } 20:43
camelia rakudo-moar 23c963: OUTPUT«1␤2␤3␤»
CurtisOvidPoe Sheesh. I forgot the dollar signs. How silly. 20:44
m: for 1..3 { say $^a }; for 1..3 { say $^a; say $^b; say $^c }
camelia rakudo-moar 23c963: OUTPUT«1␤2␤3␤1␤2␤3␤»
20:45 kjs__ left
CurtisOvidPoe So why are those two loops looking so different but behaving the same way? 20:45
m: for 1..3 { say $^a; say $^b }
camelia rakudo-moar 23c963: OUTPUT«1␤2␤Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/3dBekhTY2G:1␤␤»
CurtisOvidPoe The parameters slurp?
FROGGS_ m: for 1..3 { say "$^a $^b $^c" }
camelia rakudo-moar 23c963: OUTPUT«1 2 3␤»
andreoss also ... is much slower than ..
CurtisOvidPoe m: for 1..4 { say $^a; say $^b; say $^c }
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 gcole left
CurtisOvidPoe for 1..4 { say $^a; say $^b; } 20:46
m: for 1..4 { say $^a; say $^b; }
camelia rakudo-moar 23c963: OUTPUT«1␤2␤3␤4␤»
CurtisOvidPoe (I can’t type!)
FROGGS_ m: for 1..3 { say "hello; "say $^a }; for 1..3 { say "hello"; say $^a; say $^b; say $^c }
camelia rakudo-moar 23c963: OUTPUT«===SORRY!=== Error while compiling /tmp/63mXJLTr4g␤Two terms in a row␤at /tmp/63mXJLTr4g:1␤------> for 1..3 { say "hello; "⏏say $^a }; for 1..3 { say "hello"; say $␤ expecting any of:␤ infix stoppe…»
jnthn CurtisOvidPoe: You're saying the block takes 3 args, so it gets things 3 at a time
CurtisOvidPoe Now I understand it :)
FROGGS_ m: for 1..3 { say "hello"; say $^a }; for 1..3 { say "hello"; say $^a; say $^b; say $^c }
camelia rakudo-moar 23c963: OUTPUT«hello␤1␤hello␤2␤hello␤3␤hello␤1␤2␤3␤»
jnthn Most often used in for %h.kv -> $key, $value { ... }
CurtisOvidPoe I should be trying this on the command line rather than here :)
jnthn If you write a proper sig you can do stuff like
for @stuff -> $a, $b = '<missing>' { } 20:47
To cope with unevenness
FROGGS_ for an uneven sized array
aye
skids
.oO(or unthreevenness)
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?
jnthn FROGGS_: It confused me...the type has to be a subtype... :)
FROGGS_ :/ 20:48
jnthn But yeah, .^find_method
CurtisOvidPoe That’s trivial in Perl 5: my $meth = $object1->can(‘method’); $object2->$meth
I assume it’s similar?
jnthn The invocant is type-constrained to the thing it's declared in.
FROGGS_ P5 does not care :o)
CurtisOvidPoe What if they both have “does SomeRole”?
FROGGS_ (and does not know)
jnthn my $meth = $object.^lookup('method'); $object2.$meth();
20:48 andreoss left, kjs__ joined
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
CurtisOvidPoe “hierarchies”
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
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
jnthn Uh
You need to be a bit careful there though
Because pulling a method directly out of a role gives you a generic method. 20:52
FROGGS_ btw, it would be nice if CStructs could inherit from other CStructs 20:53
that's what I am facing right now
jnthn They...can't already?
m: class A is repr('CStruct') { }; class B is A is repr('CStruct') { } 20:54
camelia ( no output )
moritz FROGGS_: do you want inheritance or inlining?
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:56
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)␤»
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
CurtisOvidPoe I was mainly just curious, but it seems very dangerous :)
FROGGS_ moritz: I just want to inherit methods 20:58
skids Not something I would write without feeling rather dirty.
PerlJam skids: how specced is "find_method"? :)
moritz FROGGS_: put them in role?
skids I dunno.
moritz nearly all of the MOP is underspecced 20:59
PerlJam FROGGS_: does delegation work?
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
PerlJam FROGGS_: ie. has your CStructs and delegate the methods appropriately
FROGGS_ PerlJam: hmmm, that'd open another can of worms, and even more typing :o) 21:00
moritz FROGGS_: unless it returnes ::?CLASS, or whatever it's called 21:01
*returns
skids moritz: It appears in example context in S12-objects
FROGGS_ ::?CLASS would be B for B.my-method then, but it needs to stay A
moritz hrmpf 21:02
FROGGS_ :P
it is all about nice looking code in the end
21:03 bjz joined
FROGGS_ I'll just put that method in both places... 21:03
skids m: $~MAIN.WHICH.say; $~MAIN.WHICH.say; # manwich puns gladly accepted. 21:04
camelia rakudo-moar 23c963: OUTPUT«Slang|55746784␤Slang|55746832␤»
PerlJam FROGGS_: use a macro :)
FROGGS_ *g*
21:05 tgt left
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␤␤»
moritz m: class A { method x() { 'A' } }; class B is A { submethod x() { 'B' } }; say B.x; say B.^find_method('x').(B)
camelia rakudo-moar 23c963: OUTPUT«B␤A␤»
moritz jnthn: ^^ is that a bug in find_method?
it seems B's method cache is populated correctly, but find_method tries all the mro first 21:09
21:09 kjs__ left
timotimo wow, i caught up with backlog 21:11
TimToady lucky you 21:12
jnthn moritz: Hm, looks like. 21:14
21:14 virtualsue joined
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:14 bjz left
moritz jnthn: I'm now spectesting reversing the order of the submethod lookup / MRO walking 21:15
jnthn moritz: OK :)
nine What's the difference between ('a' => 'b').hash and {'a' => 'b'}?
jnthn moritz: And I'll try out my .^can fix. :)
nine: Latter is an item and won't flatten. 21:16
moritz nine: {} won't flatten in list context
TimToady is (uniquely!) not allowed to either burn out or skip backlogs
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
That's...irritating
21:17 leont left
TimToady in my case 'unique' and 'distinct' are not mutually exclusive 21:17
dalek ast: 317910a | usev6++ | / (4 files):
Unfudge passing tests for RT #122497, add test for golfed code from said ticket
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122497
dalek kudo/nom: 01aac1e | moritz++ | src/Perl6/Metamodel/MROBasedMethodDispatch.nqp:
Fix .^find_method in the presence of submethods

Previous this code:
class A { method x() { 'A' } }; class B is A { submethod x() { 'B' } }; say B.x; say B.^find_method('x').(B)
printed B\nA\n, because the MRO was walked before submethods were considered.
21:18
mst TimToady is the ultimate union type
TimToady mst: however, I'm not allowed to go on strike
moritz jnthn: fwiw I was reading the code in order to document it :-)
TimToady kinda like an air traffic controller that way... 21:19
21:19 telex left
mst that's definitely a better metaphor for community cat herding than the one I was coming up with ;) 21:19
TimToady nine: then pass $%hash, or bind it into $hash 21:20
21:20 telex joined, virtualsue_ joined
jnthn has an RT#123621 fix also 21:21
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123621
21:21 virtualsue left, virtualsue_ is now known as virtualsue, kjs__ joined
masak \o/ 21:22
dalek c: e425746 | moritz++ | lib/Type/Metamodel/MROBasedMethodDispatch.pod:
document find_method
21:23
TimToady is more like the part of the FAA that looks at the black boxes *after* the accident
21:24 p6basicbot joined, p6basicbot left 21:25 p6basicbot joined
nine Hi bot! 21:25
p6basicbot Hullo nine!
nine bot who are you? 21:26
p6basicbot I'm the first Perl 6 bot based on Bot::BaisBot!
nine bot quit
masak Hi bot!
p6basicbot Hullo masak!
21:26 p6basicbot left
masak \o/ 21:26
jnthn :)
nine :)
moritz ++
masak nine: source url?
moritz that was a short visit :(
masak I already love this bot :>
nine Code's on gist.github.com/niner/cf796b4c1ef70474cad5 21:27
timotimo nine's new nickname: rrrrrrrrr
TimToady niner?
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"
TimToady you don't say
masak this is amazing
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*
masak .oO( based on Blaise Pascalbot! )
hobbs can't turn off the proofreader-vision
nine hobbs: fixed :)
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...
masak .oO( based on the Bayesian Conspiracy bot! )
geekosaur (well, BeiisBot presumably punning on...)
nine moritz: that would have been too much bragging for half an hour of coding ;)
TimToady spent far too many cycles trying to figure out how BaisBot was supposed to be pronounced
dalek kudo/nom: 98db032 | jnthn++ | src/Perl6/Metamodel/ClassHOW.nqp:
Make .^can aware of submethods.

Fixes RT#123621.
21:31
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123621
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?'; )
dalek ast: 7a8ff9e | jnthn++ | S12-introspection/can.t:
Test .^can interaction with submethods.
TimToady from the ridiculous to the sublime to the ridiculous to the sublime... 21:32
hobbs I read it as sort-of-French
TimToady english needs an xx * that doesn't involve latin
I guess 'and so on' works 21:33
moritz TimToady: "on and on"
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
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 kjs__ left
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?
TimToady Everything should have a beginning, a middle, and a...squirrel!
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*
masak japhb: kind of like user-defined operators.
japhb Well, if people can invent words .... 21:37
TimToady language mechanism was just emptying it's pipeline, I was already distracted
*its
can we just make the ' optional before any s?
moritz ye's 21:38
TimToady Can't we just make the ' optional?
21:38 regreg left
masak 'sure 21:38
TimToady Cant we just make the ' optional?
what I meant to type, sigh
durn output pipeline...
21:39 xfix left
TimToady would so like to thank whoever invented wanna instead of wan'o 21:39
moritz looks forward to explaining why sauce' is a valid string literal, but 'noodles' isn't :-) 21:40
TimToady wait, this isn't #engrish?
sorry...
moritz erm wait
why noodles' isnt^H't
moritz should really sleep 21:41
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...
dalek ast: 7253b8f | skids++ | S02-literals/adverbs.t:
Add tests for twigiled adverb forms
21:42 anaeem1_ left
TimToady there can only be one good movie 21:42
masak ;) 21:43
21:43 denis_boyun_ left
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? p6design.cyberuniverses.com/S02.html
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
moritz raydiak: I'm not sure I like the half-surrounded headings, but otherwise it looks nice
gfldex raydiak: please dont do "font-size: 14px;" 21:48
raydiak that's not from the part I wrote
font-size, I mean
gfldex you can forward the blame if you like
raydiak I guess I should probably rewrite the whole stylesheet from scratch instead of selectively overriding parts of it 21:49
21:49 jmark left
timotimo raydiak: could the links to test files be less jump-out-at-you-ish? 21:50
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.
japhb masak: Highlander was originally awesomely bad. Nowadays only someone who saw it the first time would probably still call it that.
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
timotimo: yes, will do, thanks
masak japhb: "awesomely bad" kinda sums it up, yes.
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?
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
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 ...
japhb
.oO( Flash, aaa-aaahhhh, Defender of the Universe! )
21:57
21:57 FROGGS_ left
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"
camelia rakudo-moar 23c963: OUTPUT«errm check if each ordered element of @a is greater than the one in @b␤»
21:57 anaeem1_ left
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
i've listened to the song more often than enough :P
TimToady be sure to count how many different colors people bleed 21:59
22:00 regreg joined
gfldex it's one colour because all the blood is made by he same company 22:00
moritz timotimo: you haven't missed much :-) 22:01
timotimo each kind of alien has a different color of blood?
moritz timotimo: if you want to what you really old movie with good music, what "The Local Hero"
TimToady m: my @a = 1,2,3,4,5; my @b = 6,7,10,22,21; say all @a Z< @b
camelia rakudo-moar 23c963: OUTPUT«all(True, True, True, True, True)␤»
moritz s/what/watch/
japhb masak: :-) 22:02
22:02 skids left
japhb This whole conversation just reminds me that Marcy and I haven't watched Red Sonja in a while .... 22:02
22:02 adu left
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␤»
gtodd I am not comparing things correctly there :-|
22:03 mvuets joined
TimToady um, no 22:04
did you see my effort above?
gtodd I want to be sure 1 is less than 5 ..... 4 ... 22
TimToady: oops yes thanks ... you didn't see my mental thankyou :-)
TimToady: I leaped to self analysis of my braino 22:05
ahah it's the *all*
gfldex m: my @a; say so all @a;
camelia rakudo-moar 23c963: OUTPUT«True␤»
gtodd I did not know about it ... or well enough about it
perfect :-)
gfldex m: my @a; say so @a; say so all @a; # am i rightfully confused? 22:07
camelia rakudo-moar 23c963: OUTPUT«False␤True␤»
gtodd loves it when my errors are due to lack of information and knowledge instead of brute misunderstanding ....
TimToady all means "does not contain a false value"
gfldex tyvm, i'm a little less confused now
TimToady any means "does contain a true value"
gtodd because that means (paraphrasing Jim Carey) "I've got a *chance*!!" 22:08
TimToady m: say any
camelia rakudo-moar 23c963: OUTPUT«===SORRY!=== Error while compiling /tmp/y74wei4O59␤The 'any' listop may not be called without arguments (please use () or whitespace to clarify)␤at /tmp/y74wei4O59:1␤------> say any⏏<EOL>␤ expecting any of:…»
TimToady m: say any ()
camelia rakudo-moar 23c963: OUTPUT«any()␤»
gtodd nice
TimToady say so any()
m: say so any()
camelia rakudo-moar 23c963: OUTPUT«False␤»
gtodd is learning any and all perl6 from the master
one of the masters
;-)
japhb grandmaster? 22:09
gtodd I was fixated on my use of X instead of Z
TimToady none is "does not contain a true value"
japhb
.oO( Grandmaster Flash )
TimToady we don't have anything for "contains a false value"
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 ....
moritz not quite though (for the empty list)
masak the empty list doesn't contain a false value. 22:11
japhb What masak said. Took me a minute to think clearly there.
masak vacuous truths are generally safe :)
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
japhb gtodd: +(@list.grep(!*)) 22:13
Actually, probably can lose outer parens
masak japhb: yes, me too. `!all()` is correct because `all()` is vacuously true, because all the elements of an empty list are truthy.
gtodd :-) but as another one of those words would be nice :-) "any all none ... "
hmm not_all is one character longer than !all() 22:14
japhb gtodd: It would need parens in the same situations.
So compare not_all() and !all()
gtodd right
masak I dunno, I find it quite adequate that it can be spelled !all() 22:15
geekosaur ¬∀
gtodd :-D
raydiak H2s and smartlinks adjusted; I'll fix the px complaint when I fix the rest of the layout 22:16
moritz: is that better, or should I get rid of the lines altogether?
gtodd errm so metaoperators are types of hyperoperators .... or
hmm and Z< is like a umm cross-reduction operator ... I suppose these don't need names 22:18
TimToady no, X is cross, Z is zip 22:19
gtodd oh right 22:20
TimToady and hyper is a type of metaoperator, not the other way 'round
gtodd doh
any and all manner of error
here ... 22:21
TimToady and [] won't flatten in a list, don't forget that one :)
(referring to [<] [@a X @b]) 22:22
so your [<] only had one argument
m: say [<] "anything"
camelia rakudo-moar 23c963: OUTPUT«True␤»
TimToady notice it doesn't even try the comparison
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…»
TimToady or that would happen
gtodd ok ... that is what happens there ... I was going to wait til after GLR to totally memorize flattening but ... :-)
TimToady you don't have to memorize what how [] flattens, because it never does :)
it's like $item that way 22:24
gtodd check , check ,
TimToady m: my $array := [3, 1, 4, 1, 5, 9]; say [<] $array
camelia rakudo-moar 23c963: OUTPUT«True␤»
TimToady same thing
gtodd it's starting to stick 22:25
nice
I was going to say ... everyone go show off perl6 operators here: stackoverflow.com/q/28099387/2019415 ... but it might be unseemly :-\
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 ...
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:29
I note that #perl6 is not a repl extension ... ;-) 22:31
22:41 jluis_ left 22:42 brrt left 22:44 rurban joined 22:48 Kristien left 22:50 adu joined 22:55 booly-yam-6137_ left, gcole joined 22:56 booly-yam-6137__ joined
vendethiel gtodd: but /w camelia is 22:58
23:00 kjs__ joined, brrt joined
dalek p/6pe: 1968550 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/Serialization (2 files):
Port basic parametrics serialization bits to JVM.

With this, rakudo/6pe-mop builds on JVM.
23:04
vendethiel jnthn++ 23:09
#saving the jvm soldier :P
23:10 BenGoldberg joined 23:11 kjs__ left, BenGoldberg left, BenGoldberg joined
jnthn Guess I better port 6pe to nqp-p, too... 23:15
23:15 raiph left 23:22 rurban left 23:35 mvuets left
jnthn More tomorrow... 'night 23:45
TimToady o/
masak 'night, jnthn 23:46
23:50 gfldex left 23:56 muraiki_ joined