»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by moritz on 3 May 2013. |
|||
sorear | um. ok. | 00:00 | |
TimToady | r: say q; | ||
camelia | rakudo 37c762: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀C␀␀␀o␀␀␀u␀␀␀l␀␀␀d␀␀␀n␀␀␀'␀␀␀t␀␀␀ ␀␀␀fxE2 | ||
diakopter | r: q.chars | ||
camelia | rakudo 37c762: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀C␀␀␀o␀␀␀u␀␀␀l␀␀␀d␀␀␀n␀␀␀'␀␀␀t␀␀␀ ␀␀␀fxE2 | ||
sorear | it's a sorry message. | ||
TimToady | something tells me the quote nibbler is emitting UTF-32 | ||
sorear | you have a syntax error. | ||
r: sub bob($x) { say $x.perl }; bob q | 00:01 | ||
camelia | rakudo 37c762: OUTPUT«""» | ||
sorear | r: say eval('q').perl | ||
camelia | rakudo 37c762: OUTPUT«""» | ||
sorear | rn: say q.foo. | ||
camelia | rakudo 37c762, niecza v24-42-g69a3432: OUTPUT«foo» | ||
sorear | rn: say q'foo | ||
camelia | rakudo 37c762: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀C␀␀␀o␀␀␀u␀␀␀l␀␀␀d␀␀␀n␀␀␀'␀␀␀t␀␀␀ ␀␀␀fxE2 | ||
..niecza v24-42-g69a3432: OUTPUT«===SORRY!===Undeclared routine: 'q'foo' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37)  at /ho… | |||
TimToady | r: say eval("q\0").perl | ||
camelia | rakudo 37c762: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀C␀␀␀o␀␀␀u␀␀␀l␀␀␀d␀␀␀n␀␀␀'␀␀␀t␀␀␀ ␀␀␀fxE2 | ||
sorear | seems to be a problem more generally with unterminated quotes | 00:02 | |
TimToady | yes, the quote nibbler | ||
but it's also treating bare q as if there a '' after it | |||
r: s// | 00:03 | ||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Null regex not allowedat /tmp/Z_f4cWG7C5:1------> s/⏏/Malformed replacement part; couldn't find final $stopat /tmp/Z_f4cWG7C5:1------> s//⏏<EOL> expecting any of: statement list … | ||
TimToady | hah | ||
r: s/foo/ | |||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Malformed replacement part; couldn't find final $stopat /tmp/YlzEITAi1w:1------> s/foo/⏏<EOL> expecting any of: statement list prefix or term prefix or meta-prefix infix stopper… | ||
sorear | r: s | ||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Null regex not allowedat /tmp/OuHiP8bqr2:1------> s⏏<EOL> expecting any of: statement list prefix or term prefix or meta-prefix» | ||
sorear | r: tr | ||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Undeclared routine: tr used at line 1» | ||
TimToady | bare s is doing the s'' trick, I guess | ||
sorear | r: s' | 00:04 | |
camelia | rakudo 37c762: OUTPUT«===SORRY!===Confusedat /tmp/dmvHHdi6PW:1------> s'⏏<EOL> expecting any of: statement list prefix or term prefix or meta-prefix» | ||
sorear | but s doesn't/shouldn't be using the quote nibbler at all | ||
TimToady | I don't mean '' literally, just that somehow it returns a null stirng | ||
sorear | regexes aren't strings | ||
r: tr' | |||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Two terms in a rowat /tmp/bsdcaydyTt:1------> tr⏏' expecting any of: argument list postfix infix stopper infix or meta-infix statement end statement modifier … | ||
sorear | umm. | ||
TimToady | tr() '' is what it's thinking | 00:05 | |
r: m | |||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Null regex not allowedat /tmp/gcTXEPreuE:1------> m⏏<EOL> expecting any of: statement list prefix or term prefix or meta-prefix» | ||
TimToady wonders if rakudo is cheating on regex and doing a two-pass algo somehow | 00:06 | ||
but maybe it switches to regex grammar after finding the opener | 00:07 | ||
the opener finder could be shared with quotes and regex | |||
00:08
thou left
|
|||
TimToady | apparently tr doesn't use the same one though, or backtracks out to do tr as a sub instead | 00:08 | |
r: tr//bar/ | |||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Two terms in a rowat /tmp/KLjvqh8NUE:1------> tr//bar/⏏<EOL> expecting any of: argument list postfix infix stopper infix or meta-infix» | ||
TimToady | r: tr/foo/bar/ | ||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Two terms in a rowat /tmp/9nXfyVD1qo:1------> tr/foo/bar/⏏<EOL> expecting any of: argument list postfix infix stopper infix or meta-infix» | ||
TimToady | that's just borken parsing, I guess | 00:09 | |
r: tr/foo/bar/; | |||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Bogus statementat /tmp/EF0Uf9C8Kl:1------> tr/foo/bar/⏏; expecting any of: argument list postfix infix stopper infix or meta-infix prefix or term prefix or meta-… | ||
diakopter is in the enviable? position of having followed this parser rabbit hole a few times before while braindead fuzzing, but unfortunately doesn't remember where it leads still | |||
TimToady | I guess rakudo doesn't really attempt to parse tr/// yet | ||
diakopter | r: my \tr::tr = tr::tr/tr::tr!tr::eval!!::-7' | 00:13 | |
camelia | rakudo 37c762: OUTPUT«===SORRY!===Method 'ast' not found for invocant of class 'NQPMu'» | ||
diakopter | rakudo: you're an NQPMu | 00:14 | |
camelia | rakudo 37c762: OUTPUT«===SORRY!===Undeclared name: NQPMu used at line 1Undeclared routines: an used at line 1 you're used at line 1» | ||
TimToady | .oO("This is the Cosmic All. What are you doing here?!?") |
00:15 | |
(message from Dungeon Definition Language if you ended up in the room that contains all other rooms) | |||
diakopter | .oO("why do you look so much like me^W I do?") |
||
00:16
berekuk left
00:18
grondilu_ joined
|
|||
TimToady | Why are you so much taller than him? <-- normal English, and why it's 'than me', not 'than I' | 00:19 | |
00:20
jercos_ joined
|
|||
TimToady | "People who are taller than I should duck" <- bogus | 00:20 | |
00:21
rom1504 joined
|
|||
TimToady | "People who are taller than me should duck." <- perfectly fine | 00:21 | |
00:21
drbean joined
|
|||
sorear | than me, than I am - both fie | 00:22 | |
00:23
jercos_ is now known as jercos
|
|||
labster | "Ducks who are taller than me are mutants." | 00:23 | |
diakopter apologizes to #perl6 for tormenting TimToady with an allusion to a knock-down,throw-down on Sunday | 00:24 | ||
er | 00:25 | ||
knock-around,throw-back? | |||
labster | I got 500 blog hits yesterday? Oh, I see, someone posted it on /r/programming | ||
diakopter | knock-along,throw-behind? | ||
labster | anyone want to answer this question: www.reddit.com/r/programming/commen...to_perl_6/ TBH finding easy-level docs is something I struggle with too. | 00:26 | |
diakopter | "pull requests welcome?" | 00:27 | |
diakopter quacks | |||
cognominal | I think the nqp::clone is useless here. What do you think? github.com/perl6/nqp/blob/master/s....nqp#L1334 | 00:30 | |
[Coke] | I for one would love it if nqp had a tcl like uplevel. For probably the only one, though. | ||
cognominal | it seems to have been pasted from another zone that did a pop so the clone there was justified. | 00:31 | |
btw, I duck | 00:40 | ||
being taller than TimToady | |||
TimToady | I just grouse | ||
(from a sign in a low doorway in an English castle: Duck, or grouse.) | 00:42 | ||
cognominal | each time I consult a dictionnary to understand TimToady, I see how he exploits language polysemy | ||
* how much | 00:43 | ||
how, I don't know | |||
TimToady | well, I didn't make that one up. | 00:44 | |
but yes, if there's any way to misunderstand something intentionally, I'll usually do so :) | 00:46 | ||
cognominal | That made work difficult for people who had to translate programming Perl | ||
linguistic puns rarely survive translation. | 00:47 | ||
translate "traduttore traduttore" in French or English | 00:48 | ||
oops | |||
I meant Traduttore, traditore | |||
TimToady | that will traduce a traditional translator | ||
cognominal | :) | 00:49 | |
[Coke] leaves his traduce in the upright and locked position. | 00:54 | ||
00:54
stevan_ joined
01:07
anuby joined
|
|||
cognominal | removing the nqp::clone did not break anything so I submit a pull request : github.com/perl6/nqp/pull/97 | 01:17 | |
01:18
FROGGS_ joined
01:19
Patterner left
01:21
MrMeek joined
01:22
FROGGS left
01:25
MrMeek-afk left
01:30
stevan_ left
01:32
stevan_ joined
01:34
gdey_ joined,
gdey_ left
|
|||
[Coke] | Do we have any docs on kcachegrind specificaly on rakudo --profile output? | 01:35 | |
01:38
gdey left
|
|||
[Coke] | ah. step 1: turn off cycle detection. | 01:38 | |
anyone know what '3 is ? | 01:41 | ||
(it's one of the highest cost functions - 0x<something>:'3 | 01:42 | ||
flussence | those are usually anonymous function things... | ||
colomon | n: my @var = <a b ab c>; my $aref = \@var; say 'a0' ~~ m/$aref[0]/ | 01:43 | |
camelia | niecza v24-42-g69a3432: OUTPUT«Potential difficulties: Apparent subscript will be treated as regex at /tmp/_TqEMWffQt line 1:------> >; my $aref = \@var; say 'a0' ~~ m/$aref⏏[0]/False» | ||
flussence | (if you've got the address there, gdb *might* produce useful info on it...) | 01:44 | |
[Coke] | flussence: I'm not in gdb, though? | 01:47 | |
01:48
gcole left
|
|||
colomon | r: my @var = <a b ab c>; my $aref = \@var; say 'a0' ~~ m/$aref[0]/ | 01:48 | |
camelia | rakudo 37c762: OUTPUT«Potential difficulties: Apparent subscript will be treated as regex at /tmp/UVYJQD_Dm5:1 ------> >; my $aref = \@var; say 'a0' ~~ m/$aref⏏[0]/False» | ||
flussence | oh, um, not much else I can think of that'd be useful then | ||
01:49
kbenson left,
skids left
|
|||
colomon | nr: my @var = <a b ab c>; my $aref = \@var; say 'a b ab c0' ~~ m/$aref[0]/ | 01:50 | |
camelia | rakudo 37c762: OUTPUT«Potential difficulties: Apparent subscript will be treated as regex at /tmp/e9H1oMM9Eu:1 ------> aref = \@var; say 'a b ab c0' ~~ m/$aref⏏[0]/「a b ab c0」» | ||
..niecza v24-42-g69a3432: OUTPUT«Potential difficulties: Apparent subscript will be treated as regex at /tmp/CaRuBey9D9 line 1:------> aref = \@var; say 'a b ab c0' ~~ m/$aref⏏[0]/False» | |||
[Coke] | so, infix:<<> is listed as the highest # for Self in this profile. No clue which of those it is. caller list is a bunch of "1", "reify'1", "gimme'1", with no source. *sadface* | 01:58 | |
02:02
hypolin joined
|
|||
[Coke] | (adding CORE.setting via the kcachegrind menu has no effect) | 02:02 | |
TimToady | nr: my @var = <a b ab c>; my $aref = \@var; say $aref.Str | 02:03 | |
camelia | rakudo 37c762: OUTPUT«a b ab c» | ||
..niecza v24-42-g69a3432: OUTPUT«Capture()<instance>» | |||
TimToady | nr: my @var = <a b ab c>; my $aref = @var; say $aref.Str | ||
camelia | rakudo 37c762, niecza v24-42-g69a3432: OUTPUT«a b ab c» | ||
TimToady | colomon: that's the difference | ||
the \ doesn't make a ref like in P5, and they disagree on how to stringify a Capture | 02:04 | ||
[Coke] | if I drill down a bit, I can see time in my code spends a lot of time in eager, even though I'm not calling eager directly. (part of for loops) | 02:05 | |
02:05
lustlife joined
|
|||
colomon | TimToady++ | 02:05 | |
TimToady: do you have thoughts on what Set.ACCEPTS should do? | 02:11 | ||
02:11
census left
02:16
kurahaupo left
02:21
kurahaupo joined
02:26
lue left
|
|||
flussence | colomon: does that do anything currently? my naive guess if I read code using it, having never used any Set stuff, would be «$lhs subset-of $set» | 02:27 | |
(which seems like a reasonably useful default to me, but again I've never used it...) | 02:28 | ||
colomon | flussence: doesn't do anything in Niecza, dunno about Rakudo | 02:29 | |
grondilu_ | Will we ever simulate a biological organism in Perl6? phys.org/news/2013-05-digital-life-...ource.html | ||
02:29
grondilu_ is now known as grondilu
|
|||
colomon | subset was my instinctive notion as well. | 02:29 | |
02:30
grondilu is now known as Guest91983
|
|||
colomon | but it doesn't seem very consistent with Hash's behavior. | 02:30 | |
(Which I didn't know when I first thought subset.) | |||
quietfanatic | I would assume Set.ACCEPTS would test for element-hood rather than subset-hood | ||
or I guess it could do both depending on the argument | 02:31 | ||
sorear | if I were reading code like given $set { ... when set(2,5) { ... } ... } - I think the least surprising behavior would be exact, order-and-duplicate insensitive comparison (of the key set for hashes) | 02:33 | |
colomon | Set's subset behavior is to promote Scalars to a set containing the scalar. | ||
sorear | Set.ACCEPTS shouldn't test element-hood because we already have any-junctions for that. | ||
02:33
japhb_ left
|
|||
flussence | good point | 02:33 | |
colomon | and if you want to do Set subset, there already are a slew of subset operators. | 02:34 | |
sorear | so I'm thinking something like Set($lhs) === self | 02:35 | |
colomon | === doesn't actually do that, does it? | 02:37 | |
infix:<eqv> is supposed to, but that's NYI in Niecza. | 02:38 | ||
but yeah, quibbles aside that seems the natural extension of the Hash behavior | 02:39 | ||
02:42
xenoterracide joined
|
|||
sorear | colomon: for immutable types like Set, === and eqv are supposed to be the same | 02:43 | |
02:43
Targen left
|
|||
colomon | sorear: ah | 02:43 | |
02:50
leprevost joined
02:54
skids joined
|
|||
xenoterracide | privatepaste.com/6efc3e03bc why would I have done this this way? | 03:00 | |
oops | 03:01 | ||
wrong channel | |||
03:01
mikemol left
03:07
Pleiades` left
03:09
mikemol joined
03:15
Pleiades` joined,
thou joined
03:17
leprevost left
|
|||
[Coke] | #perl6++ | 03:32 | |
03:43
preflex_ joined
03:45
preflex left,
preflex_ is now known as preflex
|
|||
sorear | any reason in particular? | 03:54 | |
[Coke] | when my perl6 is broke, y'all help me fix it with a minimum of snark and vinegar. | 04:01 | |
04:19
Guest91983 left
04:21
lue joined
04:32
berekuk joined
04:34
berekuk left
04:51
dmol joined
|
|||
Util | Coke: New band name: Minimum Vinegar | 04:53 | |
05:02
frdmn left
|
|||
moritz | pmichaud: indeed I have | 05:07 | |
labster: you now have a commit bit. Welcome to the team! | |||
05:07
Psyche^ joined,
Psyche^ is now known as Patterner
05:10
theEXA joined,
theEXA left
05:18
satyavvd joined
05:30
skids left
05:55
frdmn joined
06:04
skids joined
06:12
FROGGS_ left
06:23
Timbus|Away joined,
dmol left
06:24
Timbus|Away is now known as Timbus
06:30
FROGGS joined
|
|||
TimToady | prn: my @pascal := [1], -> @p { [0, @p Z+ @p, 0] } ... *; .say for @pascal[2,4...*]; | 06:40 | |
diakopter | rpn | 06:41 | |
camelia | rakudo 37c762, niecza v24-42-g69a3432: OUTPUT«(timeout)» | ||
..pugs: OUTPUT«***  Unexpected ";" at /tmp/xgTCTmr8JB line 1, column 52» | |||
diakopter | oh heh. | ||
TimToady | prn: my @pascal := [1], -> @p { [0, @p Z+ @p, 0] } ... *; .say for @pascal; | 06:42 | |
camelia | niecza v24-42-g69a3432: OUTPUT«(timeout)11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 11 7 21 35 35 21 7 11 8 28 56 70 56 28 8 11 9 36 84 126 126 84 36 9 11 10 45 120 210 252 210 120 45 10 11 11 55 165 330 462 462 330 165 55 11 11 12 66 220 495 792 924 792 495 220 66 … | 06:43 | |
..rakudo 37c762: OUTPUT«(timeout)11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 11 7 21 35 35 21 7 11 8 28 56 70 56 28 8 11 9 36 84 126 126 84 36 9 11 10 45 120 210 252 210 120 45 10 11 11 55 165 330 462 462 330 165 55 11 11 12 66 220 495 792 924 792 495 220 66 12 11 13… | |||
..pugs: OUTPUT«***  Unexpected ";" at /tmp/2h84mJCKSA line 1, column 52» | |||
06:43
thou left
|
|||
TimToady expected @pascal[2,4...*] to hand the lazy subscript when embedded in a lazy list | 06:44 | ||
GlitchMr | rpn: 2 2 + say | 06:47 | |
camelia | rakudo 37c762: OUTPUT«===SORRY!===Two terms in a rowat /tmp/0FTwjtHp1t:1------> 2 ⏏2 + say expecting any of: postfix infix stopper infix or meta-infix statement end statement modifier statement m… | ||
..pugs: OUTPUT«***  Unexpected "2" expecting operator at /tmp/VL3Ilh1CiZ line 1, column 3» | |||
..niecza v24-42-g69a3432: OUTPUT«===SORRY!===Two terms in a row at /tmp/p2PQM3Lb3n line 1:------> 2 ⏏2 + sayParse failed» | |||
06:50
domidumont joined
|
|||
TimToady | makes it harder to write rosettacode.org/wiki/Catalan_number...gle#Perl_6 without lazy subscripting | 06:52 | |
labster | moritz: thanks! | 06:56 | |
.oO ( You are now a member of Team Rakudo. Here's your commit bit and jersey ) | |||
06:58
sqirrel joined
|
|||
TimToady | on RC we're now in 7th place, 4 ahead of Ruby, and 6 behind D | 06:58 | |
moritz | TimToady++ | ||
TimToady | well, the competition is fun, but flushing out bugs and missing features is the real point... | 06:59 | |
FROGGS | morning | 07:00 | |
sorear | o/ | ||
TimToady | it's AM here too, barely :) | ||
sorear | inded. | 07:01 | |
labster | Oh, it is morning now. Good morning! | ||
lizmat | morning #perl6 | 07:02 | |
yoleaux | 7 May 2013 14:16Z <pmichaud> lizmat: (Hash2.new multimethod fail) the problem appears to be that Rakudo's Hash.new method isn't declared 'multi'. | ||
07:02
quietfanatic left
|
|||
sorear | o/ | 07:07 | |
07:07
kaleem joined
07:10
Khisanth joined
07:22
domidumont left
07:23
domidumont joined,
kivutar joined
|
|||
FROGGS | if I can do this: | 07:27 | |
nr: package Foo { { our @x }; say @Foo::x.WHAT } | |||
camelia | rakudo 37c762: OUTPUT«(Any)» | ||
..niecza v24-42-g69a3432: OUTPUT«(Array)» | |||
FROGGS | shoudn't be x reported here? | ||
nr: package Foo { { our @x }; say Foo:: } | |||
camelia | niecza v24-42-g69a3432: OUTPUT«Stash.new(...)» | ||
..rakudo 37c762: OUTPUT«().hash» | |||
FROGGS | nr: package Foo { { our @x }; say Foo.WHO } # test | ||
camelia | niecza v24-42-g69a3432: OUTPUT«Stash.new(...)» | ||
..rakudo 37c762: OUTPUT«().hash» | |||
moritz | nr: package Foo { { our @x }; say Foo::.keys } | 07:29 | |
camelia | niecza v24-42-g69a3432: OUTPUT«0» | ||
..rakudo 37c762: OUTPUT«» | |||
moritz | nr: package Foo { { our @x }; say Foo.WHO.keys } | ||
camelia | niecza v24-42-g69a3432: OUTPUT«0» | ||
..rakudo 37c762: OUTPUT«» | |||
07:30
zamolxes_ is now known as zamolxes
|
|||
FROGGS | I mean, that rakudo doesnt do it is clear to me... but I just want to confirm that I should see it theoretically | 07:30 | |
moritz | yes, it should | ||
07:31
arlinius left
|
|||
FROGGS | k, thanks | 07:31 | |
07:40
daxim joined
07:44
census joined
|
|||
daxim | xkcd.com/1209/ # title says encoding, but that's a font construction or rendering problem. rmunroe, I am disappoint. | 07:46 | |
I am informed that a skywriter is an airplane writing with smoke, not pulling a banner as I imagined, and thus there is no font as such. still not an encoding problem | 07:53 | ||
07:59
domidumont left
|
|||
lizmat | on the rakudo/parrot performance bit: I noticed that at least on OS X, "1 while 1" on Perl 5 uses only 1 core 100% | 08:01 | |
whereas rakudo/parrot switches between 2 cores continuously | |||
(effectively doing about 50% on 2 cores on average) | 08:02 | ||
moritz | wouldn't it finish much earlier if it used more cores? :-) | ||
lizmat | while discussing this at the Amsterdam.pm meeting | ||
it was suggested that this might be an indication of some bad CPU pipelining | |||
and that that would also badly affect performance | 08:03 | ||
so I was wondering whether we see this also on rakudo/jvm | |||
if we don't, we can forget about it, as it is apparently a parrot issue | 08:04 | ||
08:04
fhelmberger joined
|
|||
lizmat | if we do, then maybe we should have this somehow in the back of our minds | 08:04 | |
timotimo | at least on linux and windows you can restrict a process to a subset of your cores. you could just try running the parrot/perl6 process once without restriction and once with and run a simple benchmark and see if there's any benefit | 08:05 | |
i would think: almost no benefit at all | |||
sorear | maybe it makes lots of blocking syscalls | 08:06 | |
moritz | like malloc? | ||
sorear | page faults maybe. does 1 while 1 still leak memory? | ||
lizmat | doesn't seem to leak memory... | ||
lizmat checks | |||
08:06
kresike joined
|
|||
kresike | hello all you happy perl6 people | 08:06 | |
moritz | sorear: doesn't seem to leak, no | 08:07 | |
sorear | sleep& | ||
08:08
Chillance joined
|
|||
lizmat | running for a few minutes now, steady at 182.8 MB real memory | 08:09 | |
morning kresike! | |||
08:11
berekuk joined
|
|||
kresike | lizmat, o/ | 08:11 | |
timotimo | .o(am i in the wrong to think that that's actually a lot?) | ||
08:17
estrabd_ left
08:25
kurahaupo left,
sqirrel left
08:35
rhr left
08:37
rhr joined
|
|||
lizmat | timotimo: perl5 runs at 1.2MB real memory for the same code | 08:41 | |
nwc10 | timotimo: seems a lot. Does it include all of Rakudo in memory too? | ||
lizmat | those long startup times must come from somewhere :-) | 08:42 | |
nwc10 | long startup times - you ain't seen nothin' yet :-/ | 08:45 | |
08:46
berekuk left
|
|||
jnthn | morning, #perl6 | 08:48 | |
nwc10 | jnthn: morning | 08:49 | |
I was going to report a bug/regression/wibble in nqp-jvm, but sort of there isn't | |||
a) it hasn't regressed on t/nqp/67-container.t because that is a new test | 08:50 | ||
b) it does correctly now report when it can't open a file (which it didn't seem to on the older revision I checked) | |||
c) t/nqp/24-module.t didn't even run before. | |||
However, it's output is Less Than Awesome: | 08:51 | ||
[nicholas@dromedary-001 nqp]$ ./nqp t/nqp/24-module.t | |||
1..3 | |||
ok 1 | |||
ok 3 | |||
Gah. its output. No '. Brainfart. | |||
jnthn | Yeah. I fixed what I thought was the problem there. Which fixed my *actual* blocker over in the Rakudo work, but still got that test wrong. I ain't sure why. | ||
You should find t/qregex and t/p5regex fail much less now also. | 08:52 | ||
timotimo | i wonder if jakudo will run at less than 180 MB of real memory usage for something as simple as "1 while 1" | 08:53 | |
my intuition says it should be doable, but no word on wether it will happen "on its own" | |||
nwc10 | timotimo: it might well make Parrot's memory drop too. (Yes, this is optimism, but) | 08:54 | |
given the different (and better?) toolchain for debugging, it may well let people find ways to optimise memory | 08:55 | ||
IIRC pmichaud had said that there are things that he thought that the compiler hangs on to long after it it no longer access them | |||
jnthn | Also, a bunch of speed/memory trade-offs have gone the "speed" way. | 08:56 | |
lizmat | juerd at the Amsterdam.pm (jokingly) suggested that "1 while 1" should be reduced by Perl 6 to "sleep *" | ||
which would put Perl 6 at the top of the most efficient implementation of "1 while 1" :-) | 08:57 | ||
moritz | or more generally, side-effect-free infinite loops in sink context :-) | 08:58 | |
nwc10 | that's kind of like tweaking the C compiler to recongnise SPEC benchmarks and output "different" code | ||
or what I'm told that car manufacturers do to get the best official mileage figures, to the extent of programming the car to recognise the test cycle | 08:59 | ||
tadzik | seen LylePerl | ||
yoleaux: seen LylePerl? | |||
gah | |||
labster | .seen LylePerl | ||
yoleaux | I haven't seen LylePerl around. | ||
tadzik | oh, thanks labster | ||
nwc10 | .seen yoleaux | 09:00 | |
yoleaux | I'm right here. | ||
lizmat | r: sleep * | 09:01 | |
camelia | rakudo 37c762: OUTPUT«Cannot call 'Numeric'; none of these signatures match::(Mu:U \v: Mu *%_) in method Numeric at src/gen/CORE.setting:865 in sub infix:<==> at src/gen/CORE.setting:3008 in sub infix:<==> at src/gen/CORE.setting:3006 in method ACCEPTS at src/gen/CORE.setting:2… | ||
lizmat | r: sleep Inf | ||
tadzik | . o O ( timeout ) | 09:02 | |
camelia | rakudo 37c762: OUTPUT«(timeout)» | ||
labster | (this might take a while) | ||
nwc10 | nqp-jvm running 1 while 1 | 09:03 | |
23226 nicholas 20 0 7765m 97m 9.9m S 100.1 0.4 0:12.10 java | |||
09:03
daxim left,
daxim_ joined
09:04
d4l3k_ joined
|
|||
nwc10 | nqp on parrot running 1 while 1 | 09:04 | |
23593 nicholas 20 0 178m 40m 5108 R 99.8 0.2 0:05.69 nqp | |||
jnthn | .oO( now somebody tell me what the numbers mean... :) ) |
||
labster | Well, I started writing the follow up blog post, and it turned into two posts. Incidentally, that File::Spec post got 500 hits off of reddit, which well, surprised me. | ||
nwc10 | bigger figure is "VIRT", smaller is "RES" | ||
-smallest is "SHR" | 09:05 | ||
arnsholt | What're the corresponding JVM numbers? | ||
09:05
berekuk joined
|
|||
nwc10 | you mean NQP-JVM (which I pasted first), or write-the-code-as-Java? | 09:05 | |
labster | blog.brentlaabs.com/2013/05/how-to-...erl-6.html < practical details on how to set up your own branch of rakudo and test it | ||
arnsholt | Oh derp. Missed it above the join notices. Sorry | ||
labster | blog.brentlaabs.com/2013/05/impleme...akudo.html < me demonstrating how bad I am at programming, and how much I like the sound of myself typing. | 09:06 | |
nwc10 | no problem. wasn't sure if you had, or you were asking the other question | ||
lizmat | labster++ for blog post! | ||
moritz | labster++ | 09:08 | |
we should add that blog to planetsix | |||
or whatever is going to replace planetsix | |||
labster | it's on the planeteria one already. But the rendering of <code> in a paragraph is awful. | 09:09 | |
09:09
cognominal__ joined
09:10
betterwo1ld joined,
smash_ joined
09:11
sciurius1 joined,
s0rear joined
09:12
ingyfoo joined
|
|||
labster | also labster-- for writing too much in the second post. I just can't bring myself to do enough editing in a blog post. | 09:12 | |
09:12
tadzik1 joined,
_jaldhar joined,
woolfy1 joined
09:13
BooK_ joined,
huf__ joined
09:14
Util_ joined,
kshannon_ joined
09:15
d4l3k_ is now known as dalek,
GlitchMr joined
|
|||
GlitchMr | r: q.what? | 09:16 | |
lizmat | r: 1 | 09:18 | |
FROGGS | camelia is gone | ||
lizmat wonders whether she killed Camelia with "sleep Inf" | |||
jnthn | No, netsplit. | ||
lizmat | ah *phew* | 09:19 | |
09:19
cooper- joined
09:20
mtk joined
09:21
cognominal left,
woolfy left,
cooper_ left,
hugme joined,
ChanServ sets mode: +v hugme
|
|||
masak | antenoon, #perl6 | 09:26 | |
moritz | an, ma<tab> | ||
masak | an, ma<tab> | ||
lizmat | masak! | ||
jnthn | o/ masak | 09:27 | |
09:27
sizz_ joined,
domidumont joined
09:28
daxim_ is now known as daxim
09:33
camelia joined
09:34
ChanServ sets mode: +v camelia
|
|||
lizmat | rL q.what? | 09:36 | |
09:36
bonsaikitten left
|
|||
lizmat | r: q.what? | 09:36 | |
camelia | rakudo 37c762: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀C␀␀␀o␀␀␀u␀␀␀l␀␀␀d␀␀␀n␀␀␀'␀␀␀t␀␀␀ ␀␀␀fxE2 | ||
09:37
bonsaikitten joined
|
|||
jnthn | ... | 09:38 | |
lizmat | just repeating what GlitchMr was doing before Camelia went AWOL | ||
jnthn | .oO( Encoded strings considered not so great after all... ) |
||
GlitchMr | r: 'qwerty | 09:39 | |
camelia | rakudo 37c762: OUTPUT«===SORRY!===Unable to parse expression in single quotes; couldn't find final "'"at /tmp/8q1qI8XzUU:1------> 'qwerty⏏<EOL> expecting any of: statement list prefix or term prefix or meta-prefix … | ||
GlitchMr | r: q<<qwerty> > | ||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Couldn't find terminator >>at /tmp/FxHrhWY8Gv:1------> q<<qwerty> >⏏<EOL> expecting any of: statement list prefix or term prefix or meta-prefix» | ||
GlitchMr | r: q<<qwerty | ||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Couldn't find terminator >>at /tmp/00CQdNTq8B:1------> q<<qwerty⏏<EOL> expecting any of: statement list prefix or term prefix or meta-prefix» | ||
GlitchMr | huh? | ||
r: q!qwerty | |||
camelia | rakudo 37c762: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀C␀␀␀o␀␀␀u␀␀␀l␀␀␀d␀␀␀n␀␀␀'␀␀␀t␀␀␀ ␀␀␀fxE2 | ||
masak | GlitchMr: why do you say "huh?"? what's surprising? | 09:40 | |
looks perfectly legit to me. | |||
jnthn | masak: That it only fucks up some of the errors when they seem like cases of the same thing. | ||
GlitchMr | r: q<qwert | 09:41 | |
camelia | rakudo 37c762: OUTPUT«===SORRY!===Couldn't find terminator >at /tmp/PL_lROjfkC:1------> q<qwert⏏<EOL> expecting any of: statement list prefix or term prefix or meta-prefix» | ||
GlitchMr | r: qw!abc | ||
camelia | rakudo 37c762: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀C␀␀␀o␀␀␀u␀␀␀l␀␀␀d␀␀␀n␀␀␀'␀␀␀t␀␀␀ ␀␀␀fxE2 | ||
GlitchMr | r: qw'abc | ||
camelia | rakudo 37c762: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀C␀␀␀o␀␀␀u␀␀␀l␀␀␀d␀␀␀n␀␀␀'␀␀␀t␀␀␀ ␀␀␀fxE2 | ||
masak | hm -- better collect the cases where it fails, and try to find what sets them apart... | ||
GlitchMr | ok, so it's quotelike keyword with delimiter that isn't a paren. | ||
jnthn | afaict, some string operations in Parrot, when they get strings that are of different encodings, do the Wrong Thing and/or mislabel the encoding of the produced string. | 09:42 | |
lizmat | r: sub so-q { True }; say so-q | 09:43 | |
camelia | rakudo 37c762: OUTPUT«False» | ||
lizmat | just another in the category "why do we allow - as a identifier character: | 09:44 | |
" | |||
GlitchMr | Because "-" looks nicely. | 09:46 | |
09:46
berekuk left
|
|||
lizmat | so what was the reasoning behind allowing "-" as an identifier? Making it easier for beginners? Or people coming over from XSLT ? | 09:47 | |
GlitchMr | I like "-". | ||
lizmat | *identifier character | ||
lizmat too | |||
GlitchMr | The - character looks more nicely than _. | ||
$some-variable is better than $some_variable. | 09:48 | ||
lizmat | but that doesn't mean it brings a world of hurt because "-" is also an operator | ||
GlitchMr | This is parsing problem. | ||
Perl 6 is for humans, not parsers. | |||
jnthn | lizmat: Perl 6 gives you a *lot* of incentives to put whitespace around your infixes anyway, not just this one. | 09:49 | |
GlitchMr | Besides, "-" isn't that hard to parse. | ||
There are things that are worse than that. | |||
lizmat | r: my $a=5; say $a-1 | ||
camelia | rakudo 37c762: OUTPUT«4» | ||
lizmat | here no spaces are needed | 09:50 | |
GlitchMr | I would say it's a bug. | ||
masak | GlitchMr: of course not. | ||
jnthn | lizmat: I said incentive, not demand. | ||
lizmat | jnthn: indeed | ||
masak | GlitchMr: try to not sound so cock-sure about things you don't know ;) | 09:51 | |
GlitchMr | But perhaps I mistake \w. | ||
lizmat | r: my $a=5; my $a-i=6; say $a-i | ||
camelia | rakudo 37c762: OUTPUT«6» | ||
masak | indeed. | ||
the parsing rules here are fairly unambiguous. | |||
lizmat | r: my $a=5; my $a-i=6; say $a-1 | ||
camelia | rakudo 37c762: OUTPUT«4» | ||
masak | r: my $a--b = 5 | ||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Preceding context expects a term, but found infix = insteadat /tmp/9ApiLogr1Y:1------> my $a--b =⏏ 5» | ||
jnthn | It's the same rule that means you can't write | ||
r: my $1a; | 09:52 | ||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Cannot declare a numeric variableat /tmp/y68p3sZsiB:1------> my $1⏏a;» | ||
GlitchMr | r: my \b = 42; my $a = 50; my $a-b = 1; say $a-b; | ||
camelia | rakudo 37c762: OUTPUT«1» | ||
nwc10 can't work out how to compile `1 while 1` from NQP to a Java bytecode file that runs as the main program | |||
GlitchMr | r: my \b = 42; my $a = 50; my $a-b = 1; say $a-b(); | ||
camelia | rakudo 37c762: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Int' in block at /tmp/Qj2URe5PWM:1» | ||
GlitchMr | r: my \b = 42; my $a = 50; my $a-b = 1; say $a-(b); | ||
camelia | rakudo 37c762: OUTPUT«8» | ||
09:52
census left
|
|||
jnthn | nwc10: --target=classfile --javaclass=Foo --output=Foo.class | 09:52 | |
GlitchMr | r: my $A-004 = 'Hello, world!' | 09:53 | |
camelia | rakudo 37c762: OUTPUT«Potential difficulties: Leading 0 does not indicate octal in Perl 6; please use 0o04 if you mean that at /tmp/hsFYwBSQGN:1 ------> my $A-004⏏ = 'Hello, world!' Leading 0 does not indicate octal in Perl 6; please use 0o04 if you me… | ||
nwc10 | Exception in thread "main" java.lang.NoClassDefFoundError: org/perl6/nqp/runtime/CompilationUnit | ||
... | |||
... 13 more | |||
lizmat | GlitchMr: must be alpha around "-" | ||
jnthn | nwc10: Did you just try to run it with java Foo ? | 09:54 | |
nwc10 | yep | ||
how did you guess? Was about to say that | |||
jnthn | nwc10: You need the various classpath flags as well, like the ones nqp.sh passes. | ||
FROGGS | r: my $a=5; my $a-1=6; say $a-1 | ||
camelia | rakudo 37c762: OUTPUT«Potential difficulties: Redeclaration of symbol $a at /tmp/HSff8T7qyr:1 ------> my $a=5; my $a⏏-1=6; say $a-1Cannot modify an immutable value in block at /tmp/HSff8T7qyr:1» | ||
FROGGS | k | ||
lizmat | r: my $_-_=6; say $_-_ | ||
camelia | rakudo 37c762: OUTPUT«6» | ||
jnthn | nwc10: I just recognize the error ;) | ||
GlitchMr | r: __halt_compiler(); | 09:55 | |
camelia | rakudo 37c762: OUTPUT«===SORRY!===Undeclared name: __halt_compiler used at line 1» | ||
nwc10 | aha. | ||
GlitchMr | r: <?php __halt_compiler(); | ||
camelia | rakudo 37c762: OUTPUT«===SORRY!===Unable to parse expression in quote words; couldn't find final '>'at /tmp/RzN9_UZUnB:1------> <?php __halt_compiler();⏏<EOL> expecting any of: statement list prefix or term prefix or me… | ||
nwc10 | Righto, so compiled `1 while 1` without needing to load the compiler: | ||
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | |||
10356 nicholas 20 0 7765m 69m 9.9m S 100.1 0.3 0:14.19 java | |||
FROGGS | GlitchMr: you are doing strange things... O.o | ||
nwc10 | contrast with running it as -e, so NQP compiler loaded: | ||
10572 nicholas 20 0 7765m 100m 9.9m S 100.1 0.4 0:09.21 java | |||
GlitchMr | r: ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. | 09:56 | |
camelia | rakudo 37c762: OUTPUT«===SORRY!===Preceding context expects a term, but found infix > insteadat /tmp/H5nGo5t_8i:1------> ++++++++++[>⏏+++++++>++++++++++>+++>+<<<<-]>++.>+.+++» | ||
GlitchMr | std: ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. | ||
camelia | std b33d8e0: OUTPUT«===SORRY!===Preceding context expects a term, but found infix > instead at /tmp/3YmOyLgBeW line 1:------> ++++++++++[⏏>+++++++>++++++++++>+++>+<<<<-]>++.>+.++Parse failedFAILED 00:00 43m» | ||
lizmat | nwc10: so 31MB for NQP ? | ||
nwc10 | it looks like that | ||
GlitchMr | r: ,+[-.,+] | 09:57 | |
camelia | rakudo 37c762: OUTPUT«===SORRY!===Preceding context expects a term, but found infix , insteadat /tmp/r82XyaEANJ:1------> ,⏏+[-.,+]» | ||
GlitchMr | r: (aBA@?>=<;:9876543210/.-,JH)('&%$#"!~}|{zy\J6utsrqponmlkjihgJ%dcba`_^]\[ZYXWVUTSRQPONMLKJIHGF('C%$$^K~<;4987654321a/.-,\*) | 09:58 | |
camelia | rakudo 37c762: OUTPUT«===SORRY!===Two terms in a rowat /tmp/mTmydytEMV:1------> (aBA⏏@?>=<;:9876543210/.-,JH)('&%$#"!~}|{zy\J expecting any of: argument list postfix infix stopper infix or meta-infix sta… | ||
GlitchMr | ok | 09:59 | |
10:01
arlinius joined
|
|||
FROGGS | lizmat: I cant confirm that `1 while 1 ` uses more than one core | 10:04 | |
not as a perl6 on-liner, not as a nqp one-liner, not in the repl | 10:05 | ||
one* | |||
yeah, and nqp takes 35MiB ram when rakudo takes 215MiB | 10:07 | ||
10:07
anuby left
|
|||
jnthn | A Java program that just contains while (true) { } weighs in at 10MB - and that's when you already compiled it, so there's no compiler in memory. | 10:11 | |
nwc10 | is that after the JIT has figured out that there's a hot loop, and used more RAM to optimise it? :-) | 10:12 | |
FROGGS | jnthn: do you wanna know what perl5 takes? | ||
348kiB | |||
feels like there are centuries between 5 and 6 when there are just decades | 10:13 | ||
jnthn | FROGGS: Now load Moose, RegExp::Grammars, File::Spec, etc etc. ;) | ||
FROGGS | no, not installed :P | ||
(moose) | 10:14 | ||
nwc10 | perl 1 takes 420K | ||
FROGGS | nwc10: you have a running perl1 ? | 10:15 | |
10:15
vardan joined
|
|||
nwc10 | I built one | 10:15 | |
FROGGS | are you going to backport moose? | ||
(joke) | |||
nwc10 | would be tricky with OO | 10:16 | |
perl 4 on the same machine (and also i386) is 516K | 10:17 | ||
I don't think that I have an i386 perl 5 handy | |||
FROGGS | okay, perl -MMoose -MRegexp::Grammars -MFile::Spec -e '1 while 1' takes already 13MiB | 10:18 | |
ohh what the, my remmina (a remote desktop client) needs 221MiB just for the try icon O.o | 10:19 | ||
nwc10 | I remember when emacs was big. | ||
10:24
vardan left
10:25
vardan joined
|
|||
vardan | Hi | 10:25 | |
FROGGS | hi vardan | 10:26 | |
10:28
fhelmberger left
|
|||
vardan | Could you please help me to build rakudo under Red Hat linux | 10:29 | |
FROGGS | hmm, should be fairly easy | 10:30 | |
what do you wanna do? install/build rakudo star (the one with modules) or the compiler only? | 10:31 | ||
vardan | I need build | ||
FROGGS | build what? | ||
moritz | vardan: there are build instructions both on the rakudo website and in the rakudo source tree | 10:32 | |
vardan: did you follow them? | |||
vardan | build perl 6 | ||
masak | vardan: well, if you have git, you can simply go to github.com/rakudo/rakudo and then follow the instructions in INSTALL.txt | 10:33 | |
vardan | No, but I'll now | ||
tanks for support | |||
FROGGS | you are welcome | ||
vardan: what is your native language ooc? | 10:34 | ||
masak | we're here to help, so keep the questions coming ;) | ||
10:37
vardan left
|
|||
masak | or leave without warning, that's OK too. | 10:41 | |
FROGGS | -.- | 10:42 | |
lunch& | |||
10:43
donaldh joined
|
|||
GlitchMr | r: say ~/regexp/ | 10:55 | |
camelia | rakudo 37c762: OUTPUT«» | ||
GlitchMr | rn: my $regexp = /abc/; 'dabce' ~~ / d $regexp e / # I know, you should use <$regexp> | 10:56 | |
camelia | rakudo 37c762, niecza v24-42-g69a3432: ( no output ) | ||
GlitchMr | rn: my $regexp = /abc/; say 'dabce' ~~ / d $regexp e / ?? True !! False # I know, you should use <$regexp> | ||
camelia | rakudo 37c762, niecza v24-42-g69a3432: OUTPUT«True» | ||
GlitchMr | rn: my $regexp = /abc/; say 'dabce' ~~ / d <$regexp> e / ?? True !! False # I know, you should use <$regexp> | ||
masak | GlitchMr: so... why don't you use <$regexp>...? | ||
camelia | rakudo 37c762, niecza v24-42-g69a3432: OUTPUT«True» | ||
GlitchMr | I was wondering what would happen if I would forget to. | 10:57 | |
I have noticed that in specs that it should be stringified instead (why). | |||
masak | GlitchMr: because of a known insecurity in Perl 5. | 11:02 | |
GlitchMr: see "two-level interpolation is problematic" in www.perl6.org/archive/doc/design/apo/A05.html | 11:04 | ||
11:13
spider-mario joined
11:20
fhelmberger joined
11:27
Khisanth left
11:31
satyavvd left
11:33
huf__ is now known as huf
11:37
sqirrel joined
11:40
Khisanth joined
11:45
Khisanth left
11:49
sqirrel left
11:52
arlinius left
11:53
saxx joined
11:59
Khisanth joined
12:10
_jaldhar left
12:13
Khisanth left
12:17
bluescreen10 joined
12:18
skids left
|
|||
Util_ | TimToady++ # for RC 7th place | 12:21 | |
cognominal__ | Util_? | 12:27 | |
12:27
Khisanth joined
|
|||
Util_ | cognominal__: irclog.perlgeek.de/perl6/2013-05-08#i_7033535 | 12:28 | |
cognominal__: RC == RosettaCode.org | 12:29 | ||
cognominal__ | ok, thx | ||
nice to have a big presence in Rosetta Code and Rosalind. | 12:30 | ||
12:31
rindolf joined
12:34
krunen joined
|
|||
cognominal__ | I notice that NFA code is very modular. We probably could adapt it to get a version that match 2 bits characters to match codons. The slowing down for and-ing to get chars would be offsetted by a better use of cache. That would be a big win to show off in rosalind | 12:34 | |
I forgot what is the Perl 6 operator for bit and-ing | 12:35 | ||
12:35
krunen left
|
|||
jnthn | +& | 12:36 | |
masak | mnemonic: "math and" :) | ||
cognominal__ | masak++ jnthn++ | 12:37 | |
Util_ | cognominal__: S03 says +& is "numeric bitwise and", ~& is "buffer bitwise and". | ||
lizmat | but anything with buffer is NYI in rakudo, right? | 12:38 | |
masak | r: say "foo".encode("utf-8").^name | ||
jnthn | Rakudo has some basic Buf support. | ||
camelia | rakudo 37c762: OUTPUT«Buf» | ||
jnthn | It's not perfect, but it certainly exists. | ||
lizmat | ah, ok | 12:40 | |
small question: in rakudo's README it says "perl Configure.pl --gen-parrot --gen-nqp" | |||
in labster++ blog post, he says: "perl Configure.pl --gen-parrot" | 12:41 | ||
the latter also seems to fetch nqp as expected? | |||
maybe the README is a bit overcomplete ? | |||
or is there a good reason to always say "--gen-nqp" as well ? | |||
if so, maybe labster would need to correct his blog post? | 12:42 | ||
blogpost: blog.brentlaabs.com/2013/05/how-to-...erl-6.html | |||
12:42
kivutar left
|
|||
cognominal__ | Will Perl 6 provide support to add unicode subscripts or superscripts at the end of an identifier? en.wikipedia.org/wiki/Unicode_subsc...perscripts | 12:42 | |
lizmat | .u upper | 12:43 | |
yoleaux | U+0374 GREEK NUMERAL SIGN [Lm] (xCDxB4) | ||
U+05C4 HEBREW MARK UPPER DOT [Mn] (◌ׄ) | |||
U+2196 NORTH WEST ARROW [So] (↖) | |||
12:43
kivutar joined
|
|||
cognominal__ | there is an unicode uperscripts and subscripts block | 12:44 | |
masak | lizmat: I dunno, I always --gen-parrot and skip the other flag. | ||
lizmat: I *suspect* that the one implies the other. | |||
cognominal__ | Next, people will ask for matrices :) | ||
masak | but I'm not good at reading Makefile. | ||
12:44
krunen joined
12:45
tadzik1 is now known as tadzik
|
|||
lizmat | me neither, but if --gen-parrot implies --gen-nqp, then it wouldn't be necessary in the README | 12:45 | |
masak | correct. | 12:47 | |
jnthn | --gen-parrot implies --gen-nqp iirc | 12:48 | |
lizmat | ok, let me then make that my first pull request :-) | 12:49 | |
cognominal__ | lizmat++ | 12:50 | |
jnthn | We'll need to revisit this lot at some point soon anyways. | ||
12:50
cognominal__ is now known as cognominal
|
|||
lizmat | yup, with --gen-jvm I guess ? | 12:50 | |
jnthn | Initially it'll be perl ConfigureJVM.pl, but I suspect at YAPC::NA we can discuss what we actually want. | 12:51 | |
Even if very basic JVM support of some kind is in the next compiler release, we'll be a bit off a Star that can do JVM, which is when we really want to have something nicer in place. | 12:52 | ||
12:55
jac50 joined
|
|||
lizmat | r: class Dog:auth<cpan:JRANDOM>:ver<1.2.1> { }; say Dog.HOW.WHAT | 12:55 | |
camelia | rakudo 37c762: OUTPUT«(Perl6::Metamodel::ClassHOW)» | ||
tadzik | r: say Q.WHO | 12:56 | |
camelia | rakudo 37c762: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀C␀␀␀o␀␀␀u␀␀␀l␀␀␀d␀␀␀n␀␀␀'␀␀␀t␀␀␀ ␀␀␀fxE2 | ||
tadzik | wat | ||
lizmat | I assume if we want tosupport the auth, ver and name data, I would need to hack that into Perl6::Metamodel::ClassHOW, right? | ||
12:56
smash_ is now known as smash
|
|||
tadzik | lizmat: you may want to see how Perl6::Metamodel::Documentation works | 12:56 | |
this may be a similar thing | |||
btw, PLPW schedule is online :) | 12:57 | ||
criticism welcome | |||
lizmat | tadzik: src/Perl6/Metamodel/Documenting.nqp ? | 12:58 | |
tadzik | lizmat: sounds about right | ||
jnthn | tadzik: I don't see it? | ||
tadzik | jnthn: not on act.yapc.eu/plpw2013/schedule ? | 12:59 | |
jnthn | tadzik: yeahbut I don't see a link to it | ||
lizmat | there is no link to it | ||
:-) | |||
tadzik | curious | ||
jnthn | oh, that page says "The schedule is not ready to be seen." | ||
lizmat | "The schedule is not ready to be seen." | ||
tadzik | LIES | ||
hrm | |||
lizmat | jnthn beats me every time | ||
tadzik | show_schedule = 0 | ||
jnthn | tadzik: I'd like to criticise the schedule for not being avaiable :P | ||
tadzik | show_schedule = 0 | ||
well, that could explain it... | 13:00 | ||
13:01
ajr joined,
ajr is now known as Guest13405
|
|||
tadzik | and of course my university wifi blocks svn | 13:02 | |
13:02
kivutar left,
Guest13405 is now known as ajr_
|
|||
nwc10 | tadzik: even DAV over https? | 13:02 | |
tadzik | surely I'm not supposed to do anything but watching youtube here | ||
nwc10: that I didn't try | |||
nwc10 | ah OK | ||
it's just that I remember a (reasonable) grumble from a colleague at a job years ago about how the world seems to be reinventing wheels. At that point, re-implementing TCP-based protocols atop HTTP | 13:03 | ||
mostly driven by an arms-race to the one up on firewalls | 13:04 | ||
13:05
kivutar joined
|
|||
jnthn | Yes, to say it's an application protocol, an awful lot chose to use HTTP as a transport... | 13:06 | |
.oO( SOAP = Screwing Other Application Protocol ) |
|||
13:07
SmokeMachine left
13:08
SmokeMachine joined
|
|||
tadzik | lizmat, jnthn: the schedule should be online now | 13:12 | |
lizmat | indeed, it is | ||
jnthn | yay, I don't have to speak early in th emorning \o/ | ||
13:17
kaleem left
|
|||
lizmat | pull request posted (my 1st!) :-) | 13:19 | |
dalek | kudo/nom: 782dec0 | (Elizabeth Mattijsen)++ | README: Remove --gen-nqp from config instructions It appears that --gen-nqp is implied in --gen-parrot. |
13:21 | |
kudo/nom: fe70494 | (Tobias Leich)++ | README: Merge pull request #136 from lizmat/nom Remove --gen-nqp from config instructions |
|||
lizmat | FROGGS++ | 13:22 | |
back to the drawing board for some more serious stuff | |||
FROGGS | well, I just clicked that shiny button :o) | ||
have fun | |||
lizmat | I will, that's why I'm doing this ;-) | 13:23 | |
13:23
MrMeek-afk joined,
MrMeek left,
PacoAir joined
13:27
gcole joined
13:33
FROGGS left,
daniel-s joined
13:43
kaleem joined
13:48
skids joined
|
|||
lizmat | is there a quick way to get changes to e.g. src/core/Hash.pm to be seen by rakudo? | 13:49 | |
13:49
arlinius joined
|
|||
jnthn | lizmat: Typically you can try things out with augment or similar tricks in a seprate file. | 13:50 | |
lizmat | I tried that yesterday: in that particular case the method I tried to supply another multi for, was not specified as multi | 13:51 | |
diakopter | lizmat: is the spreadsheet misbehaving for you too? | ||
lizmat | diakopter: checking | ||
jnthn | lizmat: Well, in that case you're kinda out of luck and just need to edit the real thing :) | 13:52 | |
diakopter | I had to shift-reload a few times to makeit appear | ||
lizmat | seems ok | ||
jnthn: indeed…. but do I have to do a "make" after that? | |||
seems so… :-( | |||
jnthn | Yes. | 13:53 | |
13:54
kbenson joined
|
|||
PerlJam | lizmat: What were you adding to Hash? Could you use a derived class as a proxy for testing purposes? | 13:55 | |
lizmat | I'm trying to get Hash.new to complain about extraneous named parameters, like Niecza | 13:56 | |
n: my Hash $h .= new( a => 1 ); $h | |||
camelia | niecza v24-42-g69a3432: OUTPUT«Unhandled exception: Excess arguments to Hash.new, unused named a at /home/p6eval/niecza/lib/CORE.setting line 0 (Hash.new @ 1)  at /tmp/Vjgpj3D_bJ line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4329 (ANON @ 3)  at /home/p6eval… | ||
14:02
markov left,
stevan__ joined
|
|||
[Coke] notes that you don't need the 1 in #?pugs 1 skip 'reason' (but can see pedagogically why you'd specify it) | 14:02 | ||
(from brent laabs article) | 14:03 | ||
lizmat: if you need a multi for testing that isn't already multi, then I'd make it multi, do the slow rebuild, and then still do your iterative testing with augment. | 14:04 | ||
14:04
stevan_ left
|
|||
lizmat | [Coke]: ack, will keep that in mind in the future | 14:04 | |
14:04
ajr_ left
14:05
FROGGS joined
|
|||
lizmat | meanwhile, my first test worked ;=-) | 14:05 | |
$ mp6 -e 'my Hash $h .= new( a => 1 )' | |||
Named parameters found | |||
no on to refinement | |||
14:06
kaleem left
|
|||
lizmat | *now | 14:06 | |
diakopter | lizmat: it's not always clear whether "ack" means "I acknowledge", "augh!," or some combination/superposition/ambiguity :) | ||
lizmat | when I say "ack" I mean I acknowledge | ||
would 'k' be better ? | |||
hoelzro | ack means the grep alternative! ;) | ||
masak | I think 'ACK' (all-caps) is fairly unambiguous. | 14:07 | |
diakopter | well yes, even in "augh" there's very much an "I acknowledge" | ||
so my question was poor | |||
alester | Whenever someone says "ack" it clicks my IRC client. | 14:08 | |
[Coke] | clearly augh! should be spelled ARGLEBARGLE. | ||
diakopter | s/question/idle musing/ :/ | ||
14:08
ajr joined
|
|||
lizmat | alester: why would "ack" click your IRC client? | 14:08 | |
14:09
ajr is now known as Guest33036
|
|||
alester | Because I have my IRC client set to look for mentions of "ack" and "alester" and "petdance" and a few other things. | 14:09 | |
lizmat is opposing the urge to say "ack" a lot of times :-) | |||
alester | Knock yourself out, lizmat | 14:10 | |
14:10
kivutar left
|
|||
lizmat | k | 14:10 | |
diakopter | smack back tack slack pack rack lack thwack wrack stack plack | ||
14:10
kivutar joined
|
|||
lizmat | and not a single " ack " in that | 14:11 | |
[Coke] | Ash perl durbatulûk, ash nazg gimbatul; Ash perl thrakatulûk agh burzum-ishi krimpatul. | ||
dammit. missed one. | |||
masak | why's it suddenly so cold in here? | 14:12 | |
lizmat | not sure, masack | ||
masak | I see whack you did there. | ||
diakopter | eack | 14:13 | |
PerlJam | It's funny how memes get started sometimes. | ||
(other times, it's not so funny ;) | |||
diakopter looks in the infrared clog to see whether the zero-width space made it in there | 14:14 | ||
it did! | 14:15 | ||
alester: smack back tack slack pack rack lack thwack wrack stack plack | 14:16 | ||
or does it just click max once per line | |||
masak | that probably just turned into one... right. | ||
alester | diakopter: It only clicked that once because of "alester" | 14:17 | |
diakopter | d'oh | ||
lizmat suspect alester is using ack to match ack | |||
suspects | |||
diakopter | is anyone looking for a somewhat mundane but easy and incredibly helpful task for Perl 6 [sortof programming, sortof not] | 14:26 | |
don't say anything if you are, and are willing to devote 100% of your life to it | 14:27 | ||
awesome! | |||
FROGGS | diakopter: there is a perl6-most-wanted | ||
maybe there is something for you? | 14:28 | ||
diakopter | hrm | ||
14:34
FROGGS_ joined
|
|||
diakopter | FROGGS_: I was asking for help, not volunteering. I'm already about 99**99**99**99**99 percent overcommitted | 14:35 | |
masak | I'd like to remind everyone that exponentiation is right-associative. | 14:37 | |
14:37
FROGGS left
|
|||
masak | not that it matters in this case :P | 14:37 | |
diakopter | it matters :P | 14:38 | |
lizmat | jnthn: when looking at Hash.pm, I see these 2 multi methods: | ||
multi method delete( @keys) { @keys.map({ self.delete($^key) }) } | |||
multi method delete(*@keys) { @keys.map({ self.delete($^key) }) } | |||
wouldn't the *@keys version be enough? | |||
colomon | rn: sub foo(*@a) { say @a.perl; }; foo(1,2,3); foo([1,2,3]) | 14:39 | |
camelia | niecza v24-42-g69a3432: OUTPUT«(1, 2, 3).list([1, 2, 3], ).list» | ||
..rakudo fe7049: OUTPUT«Array.new(1, 2, 3)Array.new([1, 2, 3])» | |||
diakopter | masak: | ||
rn: say 4**4**4 == (4**4)**4 | |||
camelia | rakudo fe7049, niecza v24-42-g69a3432: OUTPUT«False» | ||
colomon | lizmat: not the same | ||
masak | diakopter: oh, of course. | ||
it matters because exponentiation is not commutative. | 14:40 | ||
14:40
frdmn left
|
|||
lizmat | so, now I got this: $ mp6 -e 'my Hash $h .= new( b => 2, a => 1 ); say $h' | 14:41 | |
Excess arguments to Hash.new, unused named a, b | |||
should I add a spectest for it also, before I put in a pull request? | |||
jnthn | lizmat: Wait, should we not, like, use them? | 14:42 | |
lizmat | well, perhaps: | ||
jnthn | I mean, if I do Hash.new(a => 1, b => 2) it's fairly clear what I want, I think... :) | ||
lizmat | but it was my impression that named parameters in these cases are "reserved" for additional flags | ||
if we allow this, then we can never add a flag to the creation of a hash | 14:43 | ||
masak | correct. | ||
colomon | rn: sub foo(*@a) { say @a.perl; }; foo(1,2,3); foo([1,2,3], :excess-named("blue")) | ||
jnthn | True. But I don't like that we're special-casing the new method of hash to complain when nothing else does. | ||
camelia | niecza v24-42-g69a3432: OUTPUT«(1, 2, 3).listUnhandled exception: Excess arguments to foo, unused named excess-named at /tmp/qVKm3sXQ1d line 0 (foo @ 1)  at /tmp/qVKm3sXQ1d line 1 (mainline @ 6)  at /home/p6eval/niecza/lib/CORE.setting line 4329 (ANON @ 3)  at /home/p6eval/niec… | ||
..rakudo fe7049: OUTPUT«Array.new(1, 2, 3)Unexpected named parameter 'excess-named' passed in sub foo at /tmp/DaKMGCrk7C:1 in block at /tmp/DaKMGCrk7C:1» | |||
jnthn | In fact, doing so is openly hostile to the whole interface consistency thing. | 14:44 | |
Now nobody can subclass Hash, write a new that takes extra named args, and nextsame to the candidate in Hash.new. | |||
lizmat | well, if we would accept the named parameters as key/value pairs | 14:46 | |
jnthn | Well, yeah, adding an error for when we get named parameters is the worst of both worlds, I suspect. | ||
lizmat | then in that case those named args would wind up in the hash with "nextsame" | ||
I was inspired by niecza | |||
:-) | |||
personally, I think a subclassed "new" would need to eat its own parameters, wouldn't it? | 14:47 | ||
jnthn | Yeah but Niecza doesn't give that error because Hash.new is doing anything special. | ||
It does it 'cus it doesn't implement the interface consistency bit of S12, afaik. | |||
lizmat | because you can't know whether that parameter hasn't got a meaning in a superclass | ||
FROGGS_ | diakopter: ahh, sorry, got you wrong | 14:48 | |
lizmat | jnthn: so you would rather have "Hash.new(a => 1, b => 2) " to Just Work ? | ||
lizmat is not trying to be hostile, but to avoid pitfalls for migrating Perl 5 programmers | 14:49 | ||
jnthn | lizmat: I think we should either do that or just have the same behavior as any other new method (which is ignore extra names) | ||
Of course, we may decide that isn't a good idea for new methods in general :) | |||
(pitfalls) Hash.new(...) is not the most idiomatic of ways to make a hash in 5 or 6. :) | 14:50 | ||
lizmat | it is in a way, if you're coming from Bag and Set | ||
jnthn | Hm, true. | ||
Well, maybve true | |||
I'd probably write set(...) over Set.new(...) | 14:51 | ||
moritz | fwiw, I want all core types to be constructable via .new | ||
because otherwise subclassing is hard | |||
jnthn | moritz: I agree fully with that. | ||
moritz: It's just to what degree constructors are special by type. | |||
r: say Int.new(42) | |||
camelia | rakudo fe7049: OUTPUT«Default constructor for 'Int' only takes named arguments in method new at src/gen/CORE.setting:731 in method new at src/gen/CORE.setting:726 in block at /tmp/ATpEkSEd3_:1» | 14:52 | |
jnthn | Hm, that one ain't :) | ||
moritz | if you want to subclass Int, should be able to say my class FooInt is Int { } and have FooInt.new(42) creae a FooInt for you | ||
14:53
thou joined
|
|||
lizmat | rn: my $h= hash( a => 1, b => 2, :lc); say $h | 14:54 | |
camelia | niecza v24-42-g69a3432: OUTPUT«{"a" => 1, "b" => 2, "lc" => Bool::True}» | ||
..rakudo fe7049: OUTPUT«("a" => 1, "b" => 2, "lc" => Bool::True).hash» | |||
jnthn | lizmat: I'm all for trying to remove traps people may fall in to, fwiw, I just wary about patching one case of a more general problem. | ||
lizmat | I understand | ||
if anything, I see this as a nice exercise in my committing patches to rakudo workflow | 14:55 | ||
but indeed, I see this as a more general problem as well | 14:56 | ||
would be nice if you could specify with "nextsame" which keys to remove from the named parameters, e.g. | 14:57 | ||
jnthn | lizmat: callsame(...) lets you control exactly what is passed. | ||
PerlJam | isn't that nextwith? | ||
lizmat | so you wouldn't have to go through creating a clone of the named parameters without the ones you don't want to pass on | ||
jnthn | no, wait | ||
nextwith | |||
grr :) | 14:58 | ||
14:58
fhelmberger left
|
|||
jnthn | PerlJam++ | 14:58 | |
lizmat | indeed: nextsame is parameterless at the moment, afaik | ||
PerlJam | r: my class MyHash is Hash { }; my MyHash $h .= new; $h.WHAT; | 14:59 | |
camelia | rakudo fe7049: OUTPUT«Type check failed in assignment to '$h'; expected 'MyHash' but got 'Hash' in method dispatch:<.=> at src/gen/CORE.setting:1057 in block at /tmp/_8QbUTvVZI:1» | ||
PerlJam | r: my class MyArray is Array { }; my MyArray $a .= new; $a.WHAT; | ||
camelia | rakudo fe7049: OUTPUT«Cannot look up attributes in a type objectcurrent instr.: 'gimme' pc 285305 (src/gen/CORE.setting.pir:125270) (src/gen/CORE.setting:6051)called from Sub 'sink' pc 294412 (src/gen/CORE.setting.pir:128913) (src/gen/CORE.setting:6359)called from Sub 'MAIN' pc 381 (… | ||
PerlJam | Hmm. | ||
r: my class MyInt is Int { }; my MyInt $i .= new; $i.WHAT | 15:00 | ||
camelia | rakudo fe7049: ( no output ) | ||
PerlJam | r: my class MyInt is Int { }; my MyInt $i .= new; say $i.WHAT | ||
camelia | rakudo fe7049: OUTPUT«(MyInt)» | ||
PerlJam | ah, well, at least that one did as I expected :) | ||
lizmat | I guess nextsame and friends are still in need of a refactor, as I see pir:: code in there | 15:02 | |
15:02
ajr joined,
Guest33036 left
|
|||
lizmat | or will jnthn's jvm code merge show us that? | 15:02 | |
15:03
ajr is now known as Guest77541
|
|||
jnthn | jvm-support already got rid of some of the PIR there, iirc | 15:03 | |
lizmat | anyway, I think Hash.new is special in the sense that it creates hashes | 15:04 | |
whereas other .new just use hashes | |||
and as such may warrant a special handling | |||
15:05
census joined
15:06
saxx left
15:08
shinobicl joined
15:12
Ayiko left
|
|||
PerlJam | lizmat: maybe. You're just looking for a place to pin "other behavior" onto a hash, right? (out-of-hash-band data) | 15:14 | |
masak | it could be hurtful for someone who subclasses Hash, and expects to be able to pass named parameters into it. | 15:15 | |
lizmat | PerlJam: not really | ||
well, as long as the subclass "eats" its named parameters, there shouldn't be a problem | 15:16 | ||
masak | actually, to be it's *not* clear that `Hash.new( a => 1, b => 2 )` wants to populate the hash -- though the names of the named parameters certainly lean towards that conclusion. | ||
but I have internalized the rules for passing parameters, so I guess I'm a bit biased. | |||
TimToady | we don't have an "eating" mechanism yet, though we've thought about it | ||
lizmat | to me, the most sense would make it if you could specify the keys to be removed from the named parameters with "nextsame" | 15:17 | |
something like "nextsame :remove('lc')" | 15:18 | ||
TimToady | building is not done with nextsame | ||
it's the BUILD submethods that would remove args | |||
15:18
markov joined
|
|||
TimToady | but then, removing is wrong too | 15:18 | |
what you really want is an "I've been used" flag, and a check that everything was used at least once | 15:19 | ||
lizmat | true | ||
TimToady | but a parent/child class could use the same argument | ||
lizmat | the most important thing is not to be silent about spelling errors in named parameters | ||
TimToady | when we start making closing/finalizing decisions and CHECK time, we can do more checks staticly | 15:20 | |
rather than slowing down construction every time | |||
lizmat | because that reduces the trust in the language | ||
I don't think it can always be at CHECK time | 15:21 | ||
TimToady | no, but it might be a 95% solution | ||
15:21
xinming left
|
|||
TimToady | I know, let's add a last access time to every value :) | 15:22 | |
lizmat | hehe… at least it won't go to disk | ||
15:22
xinming joined
|
|||
jnthn | TimToady: Think is that it relies on people writing "use oo ..." pragma, which I dunno how much will happen. :) | 15:23 | |
*Thing | |||
TimToady | if the defaults are right, it'll happen by default :) | 15:24 | |
jnthn | True, we could default differently :) | ||
TimToady | the default is for classes to close/finalize | ||
unless something requests them to stay open | |||
jnthn | Oh? | ||
TimToady | it's been that way for donkey's years | 15:25 | |
jnthn | S12: "Classes are open and non-final by default" | ||
lizmat | and then there's "use soft" ? | ||
jnthn | Though it goes on to say " but may easily be closed or finalized not by themselves but by the entire application, provided nobody issued an explicit compile-time request that the class stay open or non-final." | ||
TimToady | Hmm, I think the oo pragma is probably contradicting other parts of the spec... | 15:26 | |
moritz | lizmat: iirc 'use soft' is about compile-time lookup of subroutines | ||
jnthn | use soft's practical upshot is mostly about .wrap. | ||
lizmat | yup, indeed | ||
jnthn | I'm not sure what "by the entire app" means here | ||
lizmat | anything between "main" and "exit" ? | 15:27 | |
jnthn | I mean, if somebody is pre-compiling a module, in that case the module is the "top level" thing, so can it consider any classes that are mentioned closed? | ||
TimToady | it's not being executed though | ||
no, module precompilation is not CHECK time in my head | 15:28 | ||
why p5 has a UNITCHECK too | |||
jnthn | CHECK happens before the optimizer runs | ||
And the optimizer had better run before we spit out the compiled code. | |||
That's how I've had it, anyways... | |||
TimToady | but in any case CHECK can know whether it's just precompiling or not | ||
lizmat has to go afk for a few hours | 15:29 | ||
15:29
kivutar left
15:31
kresike left
|
|||
TimToady | ah, S12:2187 says the optimizer is allowed to assume oo when it thinks it can get away with it | 15:31 | |
so the oo is not required, in fact | |||
15:32
daxim left
|
|||
jnthn wonders how to know if we can get away with it ;) | 15:33 | ||
moritz | we just *think* we can get away with it, always | 15:34 | |
then we have met the requirement :-) | |||
jnthn | # I think this will be fine | 15:35 | |
return YesOptimizeAllTheThings; | |||
moritz | exactly | ||
TimToady | You can always get away with cheating until you're caught. :) | ||
jnthn | There's already an RT where I got caught somewhere in the optimizer :) | ||
(Does a multi inlining that a sufficiently nasty big of mixing in can invalidate...) | 15:36 | ||
TimToady | so how does it currently check to see if MAIN should be run? | ||
jnthn | (Aaprt from if you did it at compile time it's too late...) | ||
15:37
SamuraiJack joined
|
|||
jnthn | if !$*W.is_precompilation_mode && +@*MODULES == 0 && $unit.symbol('&MAIN') { | 15:37 | |
Where @*MODULES is the stack of modules we're in the process of loading. | 15:38 | ||
So if it's empty, we're in the top level. | |||
TimToady | presumably CHECK can se the same thing (except for the need for &MAIN) | ||
*see | |||
precomp is not allowed to make app-wide assumptions unless they can be backed out | 15:39 | ||
jnthn | Right, but at the moment the optimizer tends to only influence things in the compilation unit being compiled, not any others loaded. | 15:40 | |
TimToady | just sayin' we hope to do better than that someday, and the specs are tilted that way | ||
jnthn | I mean, it can inline stuff *from* another compilation unit. | ||
I've generally thought much beyond that will boil down to JIT-time things, though. | |||
Which is what I've mostly seen the "use oo" related stuff as useful for aiding. | 15:41 | ||
So it feels like an odd peg to hang named-arg-use checking on. :) | |||
TimToady | the main place where you have to be careful is with super-apps that do application-like plugins | 15:42 | |
since you never know what might be plugged in next | |||
so you can't make assumptions about what the next plug-in will ned | |||
*eed | |||
however, a sane approach might be to treat those as separate interpreters, at the cost of some duplication, so each can optimize separately | 15:43 | ||
that would be a memory vs speed tradeoff again | |||
TimToady wonders how hard it would be to set up the named arg pairs with a bit that flips when it's been fetched | 15:46 | ||
then the end of BUILDALL could just scan for False bits | |||
15:46
ingyfoo is now known as ingy
|
|||
jnthn | At the moment, *%args is just a hash | 15:46 | |
moritz | TimToady: in most settings that aren't the perl 5 VM, sneaking an extra bit in isn't easy | 15:47 | |
jnthn | And it's hard to track things with a call into a user-defined BUILD. | 15:48 | |
moritz | especially if we expect to compile higher-level-ish stuff like javascript | ||
TimToady | which is why you'd attach it to FETCH or some such | ||
15:48
ingy left,
ingy joined
|
|||
moritz | *compile to | 15:48 | |
and then you call foreign code, and all your guess about what has been used are off | 15:49 | ||
*guesses | |||
TimToady | something still has to look at the value if it's going to get into the foreign code | 15:50 | |
at worst, it just marks things read that it shouldn't | |||
which is no worse than we do now | 15:51 | ||
here's another approach | 15:53 | ||
define a bitmap in the Capture where each arg knows its original position, and the binder sets the correct used bit | |||
or maybe with bits inverted, so you can check the result against 0 | 15:54 | ||
I guess the problem there is that you'd have to store a position where before we just had a bit | 15:58 | ||
or lookup the name again | |||
TimToady wants a hash whose fetcher steals unused low pointer bits... | 15:59 | ||
GC, what's that? :) | |||
lizmat: anyway, it's a tough problem, and one we've been thinking about for a long time now... | 16:00 | ||
here's another heavyhanded approach; keep the original array, and a copy; delete from the copy, and fallback to the original if you're already deleted the copy | 16:01 | ||
the copy should be empty by the end of BUILDALL | 16:02 | ||
jnthn | TimToady: The tricky bit I don't quite see yet is how calling a user-defined BUILD will mark things as used. | ||
Short of introspection, which is usual a bad sign. :) | 16:03 | ||
TimToady | well, the most obvious place to do it is in the value fetcher; since named args are weird anyway, they could use a separate type from normal hashes | 16:08 | |
the hard problem is knowing where to store the resulting "I've been used" bit | 16:09 | ||
could also attach to key lookup instead of value lookup | 16:10 | ||
would have the same result from the standpoint of arg checking | |||
and if it's a different type, it could mixin storage as needed on VMs that don't allow normal hashes extra bits | 16:11 | ||
TimToady wonders, in a related vein, where the performance crossover between using a hash and a linear list of named args is... | 16:13 | ||
16:13
Guest77541 left
|
|||
TimToady would not be surprised if a linear list was usually faster | 16:13 | ||
(see Oberon) | |||
jnthn | I've been a little tempated to do that for the JVM port. | ||
It doesn't actually build a hash each time though | 16:14 | ||
TimToady | still, you have to hash the key | ||
jnthn | It always passes named things positional-ish, and the names are associated with a callsite object. | ||
Yeah. | |||
So anyway, names don't get passed per call. We only go building up a hash if it's a flattening thing. | |||
16:14
ajr joined
|
|||
TimToady | though hash keys can also be precomputed with sufficiently advance magic | 16:14 | |
16:15
ajr is now known as Guest50162
|
|||
[Coke] | So, given my blind fumbling with --profile yesterday, any pointers on making my rakudo code go fasterE? | 16:16 | |
16:18
Guest50162 is now known as ajr_
16:19
xinming left
|
|||
[Coke] hurls gist.github.com/coke/5541613 for some ugly sample code. | 16:20 | ||
jnthn | [Coke]: Unpackability to tie-break a multi-dispatch is not very highly optimized yet, but otoh shouldn't be too bad. | 16:24 | |
[Coke] | pretty sure that combine code was on RC. ;) | 16:27 | |
16:28
zby_home_ joined
|
|||
[Coke] | I was tempted briefly to harcode the combinatorics for 2-3... oh. I could hard code the positions of the combinatorics once and then iterate by array position... | 16:28 | |
er, *calculate them once. | 16:29 | ||
16:32
ajr_ left
16:35
shinobicl left
|
|||
[Coke] | urk. too much javascript? I just wrote "function ..." | 16:36 | |
16:45
donaldh left
|
|||
[Coke] | Ok. instead of combining things directly, if I cache combinations of the few positional combinations I have to make, it shaves 7s off a 19s runtime. | 16:47 | |
16:47
gdey joined
|
|||
TimToady | [Coke]: see also rosettacode.org/wiki/Deal_cards_for...ell#Perl_6 if you want to use Unicode card glyphs | 16:52 | |
16:55
bluescreen10 left
|
|||
TimToady | but yeah, this is why I decided combinations should be built-in, because it's hard to code efficiently in a high-level language, so we want some grotty low-level code to do it, in lieu of the ability to write grotty low-level code in Perl 6 eventually | 16:55 | |
16:55
bluescreen10 joined
|
|||
TimToady | .oO( the C subset of Perl 6 :) |
16:56 | |
integer combinations might be faster done in Buf types these days | 16:57 | ||
16:57
djanatyn joined
|
|||
TimToady | and integer combinations are a reordering slice away from combinations of anything else | 17:01 | |
a combine routine might also be faster using => lists to avoid copying | 17:05 | ||
17:05
dmol joined
|
|||
[Coke] | TimToady: I can't even cut and paste whatever those images are into this channel to see what they are. | 17:12 | |
(I get a board of what might be card backs.) | |||
probably due to a pasteo of constant CardBlock = '🂠'.ord; | 17:13 | ||
TimToady | you're probably just getting rectangles from missing glyphs, which happen to resemble card backs :) | 17:24 | |
the real card back (used there in that line you quoted) has a filled rectangle inside the outer rectangle | 17:25 | ||
17:30
ajr joined,
ajr is now known as Guest82908
|
|||
diakopter | TimToady: I need a font for "Perl 6" for the yapc t-shirt, or do you want just the insect | 17:33 | |
17:34
domidumont left
|
|||
[Coke] | Source Code Pro! | 17:39 | |
arnsholt | A simple sans-serif like Helvetica perhaps? | 17:40 | |
jnthn | Comic Sans! | 17:41 | |
[Coke] | ... I'll allow it. | ||
diakopter | O_O | 17:42 | |
masak | almost feels appropriate Ö= | ||
:) | |||
17:42
Guest82908 is now known as ajr_
|
|||
jnthn | Oh no, I should stop making jokes like this...first we got #masakism, now we get comic sans on a conf t-shirt :P | 17:43 | |
timotimo | is that the polish perl workshop t-shirt? | 17:44 | |
flussence | .oO( I've always been fond of Inconsolata at large pt-sizes... ) |
||
timotimo | also, i would recommend "Comic Jens" as a free-er alternative to comic sans | ||
[Coke] | .. that sounds like a font in search of a problem. | 17:45 | |
geekosaur thinks it just souns like a font problem | 17:47 | ||
or problem font | |||
diakopter | Comic Sans is *sans* what?! I mean, serifs would just look silly. | ||
jnthn | .oO( I shot the serif... ) |
||
17:49
berekuk joined
|
|||
timotimo | being sans is a lifestyle choice. | 17:49 | |
diakopter | TimToady: oh, and I need a 1-bit color version of Camelia. white printing on blue shirt. | 17:50 | |
unless anyone else has any bright ideas for something perl6-y to put on the shirt | |||
geekosaur | .oO { that's sansible } | 17:51 | |
FROGGS_ | that was the shirt of the german perl workshop this year: i.imgur.com/29xRJPC.gif | 17:52 | |
17:52
FROGGS_ is now known as FROGGS
|
|||
FROGGS | diakopter: what about "$*Perl6" ? | 17:53 | |
and camelia a the bottom | 17:54 | ||
timotimo | "look, we still have sigils!" | 17:55 | |
FROGGS | and you could even in smaller letter under the camelie: .WHERE = 'Austin'\n.WHO = ... | 17:59 | |
diakopter | there isn't much space already | 18:01 | |
the letters would just be dots | |||
we're talking like 1.5" x 3" total real estate | |||
TimToady | you want a level Camelia or an angled one? white-on-blue will take some work | 18:02 | |
diakopter | well, do you even want Camelia? | 18:03 | |
it's a very small space | |||
TimToady | you're the one said you wanted Camelia! | ||
masak | FROGGS: looks like they drove a stake through the onion's chest. | 18:04 | |
diakopter | the hot potato is in your court | ||
TimToady tends to just let hot potatoes land on the floor | 18:05 | ||
masak | so *that's* why Perl has hashes! | 18:06 | |
:P | 18:07 | ||
geekosaur | that'd be more why it has globs, and why those are represented with splats... | 18:14 | |
diakopter | TimToady: I guess in white-on-navy the P and 6 in Camelia would be pretty distinct | 18:17 | |
timotimo | FROGGS: i may not bethe typical target-audience-member, but i prefer more graphics, less text TBH | 18:18 | |
to me, the specific date range - for instance - is way too much for a tshirt i would enjoy wearing | 18:19 | ||
18:22
donaldh joined
|
|||
TimToady | diakopter: hard part is getting the outline in white, if you don't want to reverse light/dark | 18:24 | |
18:24
SmokeMachine left
18:25
SmokeMachine joined,
donaldh_ joined,
donaldh left,
donaldh_ is now known as donaldh
|
|||
diakopter | I need something to submit by next Sunday | 18:31 | |
*this Sunday | 18:32 | ||
FROGGS | masak: should be the (famous) berlins tv-tower | ||
berlin* | 18:33 | ||
masak | oh, ok. | ||
FROGGS | timotimo: same for me but I got outvoted :o( | ||
dalek | p/rak-jvm-support: 591cd61 | (Donald Hunter)++ | / (6 files): Switched readlineintfh to use JLine ConsoleReader |
18:36 | |
p/rak-jvm-support: cb93f41 | (Donald Hunter)++ | tools/build/Makefile-JVM.in: Fixed whitespace typo in install target. |
|||
p/rak-jvm-support: 211d54c | (Donald Hunter)++ | tools/build/install-jvm-runner.pl: Fixed runner generator to include jline jar. |
|||
p/rak-jvm-support: f99d3db | jnthn++ | / (7 files): Merge branch 'repl' of github.com/donaldh/nqp into rak-jvm-support |
|||
jnthn | aww, it lost a commit | 18:37 | |
There was one more. | |||
FROGGS | (Donald Hunter)++ # here we go | 18:38 | |
jnthn | no, it was by me :P | 18:39 | |
diakopter | github.com/perl6/nqp/commit/a5942d...8793d6c99f | 18:40 | |
donaldh | jnthn: There's a matching pull request for rakudo/jvm-support | ||
yoleaux | 7 May 2013 23:27Z <jnthn> donaldh: thanks for the PR; I need to tweak it a bit before I can apply it, as it seems spaces instead of tabs got into the Makefile and the .bat needs updating as well as the .sh runner. Otherwise seems fine...will get to it tomorrow | ||
dalek | kudo/jvm-support: 9c60c91 | (Donald Hunter)++ | tools/build/Makefile-JVM.in: Add jline jar and missing cleanups. |
||
kudo/jvm-support: f513db4 | (Donald Hunter)++ | / (2 files): Fixes for --with-nqp=... removed hardcoded install-jvm |
|||
jnthn | donaldh: Noticed you caught the tab/space thing yourself :) | 18:41 | |
donaldh | Yep | ||
Grr. Eclipse being too clever. | |||
18:42
grondilu joined,
frdmn joined
|
|||
grondilu | rn: say my Int $ = "4"; | 18:42 | |
camelia | rakudo fe7049: OUTPUT«Type check failed in assignment to '$'; expected 'Int' but got 'Str' in block at /tmp/jDWygnMVVc:1» | ||
..niecza v24-42-g69a3432: OUTPUT«Unhandled exception: Nominal type check failed for scalar store; got Str, needed Int or subtype at /tmp/e70sRrtMhM line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4329 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4330 … | |||
grondilu | shouldn't a conversion be made automatically? | 18:43 | |
jnthn | No | ||
It's a type constraint. | |||
grondilu | :/ | 18:44 | |
18:44
japhb_ joined
|
|||
FROGGS | ohh | 18:44 | |
[Coke] | r: say my Int $ = "4".Int; | ||
camelia | rakudo fe7049: OUTPUT«4» | ||
FROGGS | jnthn++ | ||
grondilu | But if I want to read an integer from stdin, then I have to do: my Int $ = get.Int; That's annoying. | 18:45 | |
masak | grondilu: you don't expect a conversion to be made automatically when you try to assign an Employee object to a variable typed as Subscription. so why with Str and Int? | ||
timotimo | grondilu: try +get | 18:46 | |
grondilu | rn: say my Int $ = +"4"; | ||
camelia | rakudo fe7049, niecza v24-42-g69a3432: OUTPUT«4» | ||
grondilu | timotimo: good idea. It's much less bothersome. | ||
also, get xx $someInt is not parsed correctly. Rakudo complains about the function xx not existing. I have to write get() xx $someInt. Shouldn't get xx $someInt be parsed as such? | 18:49 | ||
masak | heh, I remember submitting tickets and being generally noisy to make prefix:<+> produce the narrowest type possible, so that typing it Int there would work :) | ||
18:49
thou left
|
|||
masak | grondilu: no, because 'get' is a listop. | 18:50 | |
grondilu: and so the parser expects a term, not an infix. | |||
timotimo | right, compare with get 1024 which would be get(1024) | 18:51 | |
masak | put differently, 'get xx $someInt' is short for 'get( xx $someInt )' | ||
18:53
donaldh left
|
|||
FROGGS | if there was a xx prefix it will do the wrong thing silently | 18:53 | |
masak | r: sub prefix:<xx>($) { "the wrong thing silently" }; say xx 42 | 18:55 | |
camelia | rakudo fe7049: OUTPUT«the wrong thing silently» | ||
18:57
s0rear is now known as sorear
19:02
kst` joined
|
|||
TimToady | diakopter: first whack at white-on-blue Camelia: wall.org/~larry/cameliawb.png | 19:06 | |
diakopter | like | 19:07 | |
TimToady | don't know if trying for shading would help at all | ||
diakopter | but.. it's purple | ||
TimToady | it's "blue 2" to LibreDraw | 19:08 | |
lizmat | not a color you would expect with Chromakey | ||
diakopter | I didn't *think* I was colorblind... | ||
I'd send you a screenshot, but ..... *giggle* | 19:09 | ||
TimToady | anyway, you'd probably want that part transparent for actual printing | ||
19:10
donaldh joined
|
|||
lizmat | rn: my $s= set( a => 1, b => 0 ); say $s | 19:10 | |
camelia | rakudo fe7049: OUTPUT«2 unexpected named parameters passed (a, b) in sub set at src/gen/CORE.setting:13063 in block at /tmp/I_EuAWUac3:1» | ||
..niecza v24-42-g69a3432: OUTPUT«Unhandled exception: Excess arguments to set, unused named a, b at /home/p6eval/niecza/lib/CORE.setting line 0 (set @ 1)  at /tmp/cHLsGLCQ34 line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4329 (ANON @ 3)  at /home/p6eval/niecza… | |||
lizmat | it wasn't me, I didn't do it | 19:11 | |
[Coke] | is it me, or does that image have 3 colors? | ||
diakopter | O_O | ||
oh yes, there's a black arc | 19:12 | ||
well, and a gray TM | |||
lizmat | rn: my $s= Set.new( a => 1, b => 0 ); say $s | 19:14 | |
camelia | rakudo fe7049: OUTPUT«set()» | ||
..niecza v24-42-g69a3432: OUTPUT«Unhandled exception: Excess arguments to Set.new, unused named a, b at /home/p6eval/niecza/lib/CORE.setting line 0 (Set.new @ 1)  at /tmp/t83smByPIU line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4329 (ANON @ 3)  at /home/p6eva… | |||
lizmat | I'm not sure I understand the difference between set() and Set.new :-( | ||
moritz | wow, mysql does funny things | 19:19 | |
SELECT DATE('2012-06-14') - DATE('2005-02-26'); | |||
70388 | 19:20 | ||
r: say 20120614 - 20050226 | |||
camelia | rakudo fe7049: OUTPUT«70388» | ||
diakopter | moritz: try DATEDIFF('2012-06-14 23:59:59', '2005-02-26'); | 19:22 | |
moritz | diakopter: I found that too; was just curious what it actually did | ||
lizmat always used TO_DAYS() | |||
grondilu | rn: my Bag $bag .= new: <foo foo bar>; for $bag.keys X $bag.keys -> $a, $b { say $a, $b } | 19:23 | |
lizmat | if I remember correctly | ||
camelia | rakudo fe7049: ( no output ) | ||
..niecza v24-42-g69a3432: OUTPUT«foofoofoobarbarfoobarbar» | |||
TimToady | new version really in 2 colors | ||
19:23
donaldh left
|
|||
grondilu | should I report this bug? | 19:24 | |
moritz | r: my Bag $bag .= new: <foo foo bar>; say $bag.keys.perl | 19:25 | |
camelia | rakudo fe7049: OUTPUT«("foo", "bar").list» | ||
moritz | grondilu: yes please | ||
grondilu does it | 19:26 | ||
PerlJam | moritz: but why were you asking mysql about dates when you have a perfectly good Perl 6 compiler you could ask? ;) | ||
lizmat | rn: my $s= set( ( a => 1, b => 0 ) ); say $s | ||
camelia | rakudo fe7049, niecza v24-42-g69a3432: OUTPUT«set(a, b)» | ||
moritz | PerlJam: because the IR Clogs use mysql as a backend, not Perl 6 :-) | ||
PerlJam: but I did cross-check with rakudo's Date :-) | 19:27 | ||
TimToady | diakopter: anyway, original is in .odg, so can export in any convenient format; lemme know if you want it tilted | 19:28 | |
PerlJam | That's my primary usage of Rakudo I think. I tend to run little snippets ... sometimes I'm testing Perl 6 stuff, but many times I'm actually using the REPL for it's computing ability in one way or another. | 19:29 | |
dalek | p/rak-jvm-support: 199e8b6 | jnthn++ | / (2 files): Prepare for some extra :decl(...) possibilities. These will cover things that today require code generation or are not available at NQP level, but probably should be. It will allow Perl 6's custom lexpad type to be eliminated in favor of the shared NQP one, as well as simplifying code generation for certain constructs and giving us a freer hand in how we compile time. Mostly, this just documents the new things. |
||
lizmat feels stupid for not being able to find where set() is specced | 19:32 | ||
S02:1419 ? | 19:33 | ||
TimToady | yes | 19:34 | |
lizmat | S32/Containers:1102 states: "A C<Set> responds to hash operators as if it were a C<Hash of True>." | 19:35 | |
somehow that doesn't feel right with including "b" in the set with this: | 19:36 | ||
my $s= set( ( a => 1, b => 0 ) ); say $s | |||
set(a, b) | |||
I would have expected: set(a) | |||
PerlJam | r: my $s = set( a => 1, b => Nil ); say $a; | 19:37 | |
camelia | rakudo fe7049: OUTPUT«===SORRY!===Variable '$a' is not declaredat /tmp/YCgWYxN6hs:1------> my $s = set( a => 1, b => Nil ); say $a⏏; expecting any of: postfix» | ||
PerlJam | r: my $s = set( a => 1, b => Nil ); say $s; | ||
camelia | rakudo fe7049: OUTPUT«2 unexpected named parameters passed (a, b) in sub set at src/gen/CORE.setting:13063 in block at /tmp/sEn4GBfuEl:1» | ||
PerlJam | r: my $s = set( (a => 1, b => Nil) ); say $s; | ||
camelia | rakudo fe7049: OUTPUT«set(a, b)» | ||
PerlJam | r: my $s = set( (a => 1, b => ) ); say $s; | ||
camelia | rakudo fe7049: OUTPUT«===SORRY!===Preceding context expects a term, but found infix => insteadat /tmp/C4lmoSdnVs:1------> my $s = set( (a => 1, b => ⏏) ); say $s;» | ||
PerlJam | r: my $s = set( (a => 1, b => False ) ); say $s; | ||
camelia | rakudo fe7049: OUTPUT«set(a, b)» | ||
PerlJam fails at using the bot today | |||
moritz | r: say set( 'a', 'b') | ||
camelia | rakudo fe7049: OUTPUT«set(a, b)» | ||
TimToady | it's assuming that anything with keys came from another set, where you'd never get a False value becuase they're autodeleting | ||
19:38
donaldh joined
|
|||
TimToady | nr: my $s = set( set(1,2) ); say $s.perl | 19:38 | |
camelia | rakudo fe7049, niecza v24-42-g69a3432: OUTPUT«set("1", "2")» | ||
19:39
SamuraiJack left
|
|||
TimToady | but that should probably not flatten there | 19:39 | |
lizmat | rn: my %h= ( a => 1, b => 0 ); my $s= set(%h); say $s | ||
camelia | rakudo fe7049, niecza v24-42-g69a3432: OUTPUT«set(a, b)» | ||
TimToady | nr: my $s = set( set(1,2).item ); say $s.perl | ||
camelia | rakudo fe7049, niecza v24-42-g69a3432: OUTPUT«set("1", "2")» | ||
TimToady | that should *definitely* not flatten with .item | ||
so I'd say it should be ripping out the whole pair/hash recognition thing in any case | 19:40 | ||
otherwise we can't have a set of sets | 19:41 | ||
moritz | so sets don't make the assumptions that elements are strings? | ||
TimToady | shouldn't | ||
19:42
thou joined
|
|||
TimToady | nr: my $s = set(1,2); say set($s).perl | 19:42 | |
camelia | rakudo fe7049, niecza v24-42-g69a3432: OUTPUT«set("1", "2")» | ||
lizmat | S32/Containers:1112 "Regardless of their behavior as hashes, Sets and Bags do not flatten in list context." I assume? | ||
TimToady | yes | 19:43 | |
for that reason | |||
so current implementations are a bit spec-rotted :) | |||
lizmat | but what would "keys" give on the outer set() of sets? | 19:44 | |
TimToady | it would give the inner set as the key | ||
moritz | a list of sets | ||
lizmat | duh, of course | ||
and the value would be True? | 19:45 | ||
TimToady doesn't recall whether anyone has bothered to implement object-keyed hashes yet... | |||
lizmat is pretty that hasn't happened yet | |||
*sure | |||
moritz | TimToady: rakudo does them, iirc | ||
TimToady | .oO(sure pretty?) |
||
jnthn | r: my %h{Any}; %h{2} = 'two'; say %h.keys[0].WHAT | 19:46 | |
camelia | rakudo fe7049: OUTPUT«(Int)» | ||
moritz | r: my %h{Any}; %h{1} = 2; say %h.keys[0].^name | ||
camelia | rakudo fe7049: OUTPUT«Int» | ||
moritz | oh, jnthn++ was faster | ||
jnthn bovvad :P | |||
I think the Set code may have been borrowed from Niecza, which iirc doesn't do object-keyd hashes. | 19:47 | ||
lizmat | r: my %h= ( set(<a b>) => 1 ); say %h | ||
camelia | rakudo fe7049: OUTPUT«("a b" => 1).hash» | ||
jnthn | So it may not be too hard to update them to use them in Rakudo. | ||
lizmat | is this an artefact of the gist ? | ||
jnthn | lizmat: No, string keys are the default. | 19:48 | |
r: my %h{Mu} = ( set(<a b>) => 1 ); say %h | |||
camelia | rakudo fe7049: OUTPUT«(set("a", "b") => 1).hash» | ||
TimToady | sets need to be taught to default to Any instead | ||
or Mu | |||
if you want junctions as set elements :) | |||
that seems likely to lead to a world of hurt, however... | 19:49 | ||
jnthn | May just be chaning "has %!elems;" to has %!elems{Any}; | ||
*changing | |||
TimToady | too easy, hasta be harder | ||
jnthn | yeah, that probably hits bootstrap issues :P | ||
TimToady | vicarious suffering, and all that | 19:50 | |
jnthn is in the middle of de-Parroting another chunk of Rakudo at the moment, but could look at it in a bit if nobody beats him to it :) | |||
TimToady should eat lunch an hour ago instead of blue-printing Camelia | |||
lizmat | Tardis is out of order :-( | 19:51 | |
arnsholt | jnthn: Now that $dayjob is less crazy, I'm wondering: How much of my semi-completed 6modelisation work of NQP/Parrot has been done by you in the meantime? | ||
tadzik grins at YE2013 tag cloud | 19:54 | ||
"perl perl5 perl6 perl7" | |||
donaldh | jnthn: Any thoughts about source level debugging in nqp/jvm, i.e. what pieces are missing and whether it's an approachable piece of work? | ||
masak , just for fun, tries spectesting a ' has %!elems{Any};' change | |||
lizmat | jnthn: vm/parrot/guts/bind.c lines 1036 through 1061 seem to be in violation of S12 (just like my proposal to fix Hash.new) | ||
masak | tadzik: good news is no-one is all excited about perl4 any more :P | ||
lizmat | willing to cut it out for you and spectest that | ||
masak | let the spectesting begin! | 19:55 | |
tadzik | masak: well, "Submit talk", here I come :P | ||
moritz | experimental new design for irclog.perlgeek.de/perl6/ | 19:56 | |
please tell me if it makes sense to you, and if you like it | |||
tadzik | did we just click it all at once? | ||
19:56
ck2 joined
|
|||
tadzik | doesn't load here :) | 19:56 | |
jnthn | lizmat: I...don't think it is. | ||
lizmat: What bit of S12? | 19:57 | ||
tadzik | moritz: the darker the more active? | ||
lizmat | jnthn: me is checking the exact location | ||
jnthn | arnsholt: Not loads; I've mostly been working on the things we need for Rakudo. I did much of the HLL related changes, though... | ||
masak | tadzik: I dare you to submit a perl4 talk! :D | 19:58 | |
jnthn | donaldh: The most immediately obvious missing piece is getting the line numbers stored. | ||
donaldh | In the generated .class es | ||
moritz | tadzik: yes. (At least that was the idea; I now think I accidentally reveresed the colors :-) | ||
jnthn | donaldh: Yes. | 19:59 | |
donaldh: I'm guessing asm must have a way to do that side of things. | |||
donaldh | jnthn: Yep, I think so. | ||
jnthn | donaldh: The other piece is getting the QAST -> JAST phase to stash the info somewhere. | ||
lizmat | jnthn: irclog.perlgeek.de/perl6/2013-05-08#i_7035348 | ||
arnsholt | jnthn: Cool. I'll probably start off trying to get more of that in place then. I've seen some talk of list speedups. Is that QRPA (or something similar to that) being created for nqp::list instead of RPA? | ||
moritz | yes, at least for $!storage in List (iirc) | 20:00 | |
jnthn | donaldh: Once that's in I guess the backtrace printing can be updated to include the info too... :) | ||
lizmat: I'm not sure I see the issue. I was saying that Rakudo got things right. | 20:01 | ||
donaldh | jnthn: yep I wondered if there was still QAST transform work to be done. I'll take a look at it. | ||
jnthn | donaldh: lemme give you a few pointers... | ||
lizmat | r: my $s= set( a => 1); say $s | 20:02 | |
camelia | rakudo fe7049: OUTPUT«Unexpected named parameter 'a' passed in sub set at src/gen/CORE.setting:13063 in block at /tmp/y28aZn06vw:1» | ||
tadzik | masak: I'm considering submitting "Perl Workshop for Dummies" | ||
donaldh | jnthn: much appreciated | ||
tadzik | but I'll probably wait to see how it turns out on plpw | ||
masak | tadzik: sounds nice :) | ||
lizmat | jnthn: I would expect that to fail silently | ||
tadzik | act.yapc.eu/plpw2013/talk/4813 that one | ||
lizmat | jnthn: or am I missing something here? | 20:03 | |
jnthn | lizmat: moment, lemme look the things up for donaldh++ first... :) | 20:04 | |
lizmat | okidoki! | ||
jnthn needs more pairs of hands to type on more keyboards... | |||
masak | tadzik: s/Do'h/D'oh/ | 20:05 | |
jnthn | donaldh: The QAST nodes sometimes have a .node set. You can see some places it's used around github.com/perl6/nqp/blob/master/s...r.nqp#L618 | ||
20:05
ck2 left
|
|||
lizmat | masak: duh! | 20:05 | |
tadzik | masak: Do'h. Fixed | ||
jnthn | donaldh: The way it's done here is that PIRT::Node got a .node method also. YOu could instead just have a JAST::Annotation however | ||
masak | tadzik: ;) | 20:06 | |
20:06
bluescreen100 joined
|
|||
masak | or should I say "he'h". | 20:06 | |
20:06
bluescreen10 left
|
|||
tadzik | h'eh | 20:06 | |
moritz | h'e'h | ||
jnthn | donaldh: github.com/perl6/nqp/blob/master/s...T.nqp#L287 shows how $!node can be used in order to obtain a line number. | ||
TimToady suddenly feels like he's in a fantasy novel... | 20:07 | ||
moritz | r: sub h'e'h() { say "d'o'h" }; h'e'h | ||
camelia | rakudo fe7049: OUTPUT«d'o'h» | ||
jnthn | donaldh: It does a little work to try and avoid duplicate generations. | ||
TimToady | P'erl 6 | ||
jnthn | donaldh: er, repetitions of the same line number, I mean. | ||
20:07
rindolf left
|
|||
donaldh | jnthn: Yep, I'll check to see if asm already covers that case. | 20:08 | |
jnthn | donaldh: Anyway, the critical pieces are that QAST nodes may have a .node (not all of 'em, by any means) and that HLL::Compiler.lineof can use that to produce a line number. :) | ||
donaldh: There's only one file per compilation unit so that's easy to handle :) | 20:09 | ||
donaldh | jnthn: Great, that gives me an idea of where to start :-) | ||
20:10
bruges joined
|
|||
jnthn | lizmat: iiuc, the confusion may be that the rules for methods and subs are different. | 20:10 | |
lizmat: Methods that are not in an "is hidden" class get an extra *%_ parameter by default. | |||
lizmat | jnthn: that might well be | ||
jnthn | lizmat: Subs do not. | ||
lizmat: That code path in the binder is not hit for methods because thee is a *%_ which noms all the left-over nameds. | 20:11 | ||
*there | |||
lizmat: It's there for subs, blocks, etc. | |||
Or methods marked "is hidden" | |||
er, methods *in classes* marked "is hidden", I meant. | |||
lizmat | so, that's why set() complains, and Set.new is silent | 20:12 | |
jnthn | *nod* | ||
lizmat | feels like an implementation artefact to me :-( | ||
but if that's the way it is supposed to be, I'll stop nagging :-) | |||
jnthn | lizmat: Well, I'm only saying "the current implementation's handling of leftover nameds matches the spec as far as I know", not "set and Set.new are doing the right things" :) | 20:14 | |
lizmat | fair enough :-) | ||
I'll make an issue for it, so (Any) can think / respond to it | 20:15 | ||
I guess there aren't that many builtins that take named parameters | 20:16 | ||
20:27
dmol left
20:30
donaldh left
|
|||
[Coke] | irclog.perlgeek.de/perl6/ is hanging for me, btw. | 20:34 | |
lizmat | ditto | 20:35 | |
working again now | 20:41 | ||
20:43
zby_home_ left
|
|||
lizmat will sleep a night before starting a new issue& | 20:47 | ||
masak | 'night, lizmat | 20:51 | |
[Coke] | irclog.perlgeek.de/perl6/ is still hanging for me. | ||
20:59
bluescreen100 left
21:12
SmokeMachine left
21:18
SmokeMachine joined
21:32
skids left
21:41
PacoAir left
|
|||
labster | ^ That URL takes a long time to load. But I do like the calendar view. | 21:54 | |
labster clicks a random log from 2005 | |||
"I think File::Spec's behavior could accomplished with Roles" | 21:55 | ||
masak | 'night, #perl6 | ||
labster | o.O | ||
night masak | |||
21:56
kurahaupo joined
22:03
lustlife left
|
|||
dalek | p/rak-jvm-support: c088706 | jnthn++ | src/vm/parrot/pmc/nqplex (2 files): Start updating NQPLexPad/NQPLexInfo. This gives them the ability to handle containers; state vars still to come. |
22:14 | |
p/rak-jvm-support: c6a5294 | jnthn++ | src/vm/parrot/QAST/Compiler.nqp: Compile QAST::Var decl static/contvar/statevar. |
|||
p/rak-jvm-support: c088706 | jnthn++ | src/vm/parrot/pmc/nqplex (2 files): Start updating NQPLexPad/NQPLexInfo. This gives them the ability to handle containers; state vars still to come. |
|||
nqp/rak-jvm-support: c6a5294 | jnthn++ | src/vm/parrot/QAST/Compiler.nqp: | |||
jnthn | huh, why'd it report 'em twice... | ||
timotimo | (and then stop in the middle) | 22:16 | |
22:37
ajr_ left
22:49
gdey left
22:55
itz_ joined
|
|||
jnthn | Almost there with getting rid of the Perl6LexPad/Perl6LexInfo PMCs completely. Should be able to get that bit out of the way tomorrow and move on to the next challenge in the porting. :) | 22:59 | |
23:02
skids joined
|
|||
labster | sounds great | 23:02 | |
23:05
jac50 left
23:09
arlinius left
|
|||
[Coke] | jnthn++ | 23:11 | |
jnthn | 'night o/ | 23:19 | |
[Coke] | rakudo makes me write better code because if I did it the wrong way it woudl be waaaay too slow. :P | 23:26 | |
23:35
spider-mario left
23:36
MrMeek-afk left
23:40
MrMeek joined
23:56
thou left
|