»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
dalek odel: f0f4a57 | diakopter++ | lua/compiler/ (4 files):
more DNST->LST renaming
00:04
sorear grr. eval_dies_ok has stopped working for no clear reason 00:19
it crashes before it even gets to &eval; fetching the lexical &no-control in Test is NREing now that mainlines are being run
jnthn sorear: Seems like a day for bizzare bugs... :S 00:20
jnthn decides its time for some rest 00:22
*it's
night &
dalek ecza: 8cfcd18 | sorear++ | lib/Builtins.cs:
Fix warning in compiling Builtins
00:26
diakopter looks forward to the niecza Halloween release 00:27
dalek ecza: 81deb74 | sorear++ | lib/Kernel.cs:
Fix just-in-time sub compilation to not overwrite parts of the protopad
ecza: 122ac5d | sorear++ | lib/ (2 files):
Run mainlines of modules at BEGIN time
sorear _now_ BEGIN semantics should be properly in.
diakopter o_O
evalbot rebuild niecza 00:28
p6eval NOT OK (maybe a rebuild is already in progress?)
sorear except for a couple corner cases like class Foo is ::(<A B>.pick) { ... }
*a few
diakopter niecza: BEGIN { BEGIN { say 4 } } 00:29
p6eval niecza v10-254-g122ac5d: OUTPUT«4␤»
sorear also BEGIN still doesn't return a value.
122ac5d will be the release, if it can pass reboot and spectest 00:30
(except I still need to write the ann)
[Coke] survived Halloween! 00:42
sorear 3 files failed. 01:04
[Coke] /install/bin/perl6 foo1.p6 02:16
PARROT VM: Could not initialize new interpreter
PackFile_Header_validate: This Parrot cannot read bytecode files with version 11.0.
er, ./install/...
[Coke] tries a fresh co of parrot. 02:19
[Coke] was just me. 03:00
dalek ast: f926610 | sorear++ | S02-magicals/progname.t:
[S02-magicals/progname] Make both tests equally forgiving
03:15
ecza: 86d2c1d | sorear++ | t/spectest.data:
Disable two incidentally broken test files
03:16
sorear [Coke]: 89960a0 "alpha sort test listing." # careful trying to maintain a sort, even within ASCII sort order is strongly influenced by LC_ALL 03:27
at various times I've committed spectest.data files that are sorted according to LC_ALL=C and LC_ALL=en_US 03:28
I guess LC_COLLATE
dalek odel: 9e66595 | diakopter++ | lua/compiler/ (5 files):
first cut at emitting Lua. generates functions with more than 200 locals. will have to workaround by storing all locals in a table. <sigh>
03:37
dalek ecza: 7f133f9 | sorear++ | docs/announce.v11:
Add v11 announce
03:56
sorear looking-over requested.
diakopter looks good to me 03:58
[Coke] +1 04:06
japhb sorear, announce looks good to me too. 04:26
dalek odel: 3fbbe7d | diakopter++ | lua/compiler/ (2 files):
NQPSetting.lua actually compiles. only things I know of remaining: while loops that don't use labels, and try/finally (try/catch already done).
04:29
diakopter heh, a 24,000 line lua file compiles and runs in 0.053s 04:30
that's annoying; I can't have more than 200 "local"s in the same function, but I can have 783 named closures declared in a function (that are accessible and scoped just like locals) 04:33
aww, I can't gist the whole file ;) 04:35
413 Request Entity Too Large
sorear diakopter: lua is designed that way 04:36
unification of concepts: "We don't need a deserializer, we can just make the normal parser/interpreter fast on huge files"
diakopter I'm using luajit, btw 04:37
diakopter 'night 04:39
sorear 'night
dalek ecza: 60f5921 | sorear++ | src/NieczaFrontendSTD.pm6:
One more tiny fix to get bootstrap working again
04:45
dalek ecza: e1b9adf | sorear++ | FETCH_URL:
Update bootstrap for v11
05:02
sorear mail sent.
sorear What sort of niecza backend would people most like to see next? 05:42
TiMBuS llvm :3 05:51
or did i misinterpret what you meant by backend 05:53
sorear TiMBuS: that is the sort of thing I look for 06:03
hrm, I should spend time this month trying to figure out why the niecza parser is so slowww 06:04
TiMBuS well in that case, i vote llvm again. its fast, allows jitting, doesnt need mono. with a lot of effort could even make native binaries from perl6 06:08
TiMBuS ignoring how huge they would be 06:09
sorear -> sleep 06:38
japhb phenny, tell sorear Perhaps one of the command-line capable JS engines. Would be nice to see how well Niecza's design fits into that type of VM, and whether the way that JS VMs are tunes can work well with the kind of generated code Niecza would throw at it. 06:48
phenny japhb: I'll pass that on when sorear is around.
moritz \o 06:49
moritz nom: class A { method m() is is_hidden_from_backtrace { } }; A.new.m; say 'alive' 07:14
p6eval nom ee1a1c: OUTPUT«===SORRY!===␤No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Attribute $attr, Any $rw)␤:(Attribute $attr, Any $readonly)␤:(Routine $r, Any $rw)␤:(Routine $r, Any $default)␤:(Routine $r, Any $info, Any $inlinable)␤:(Param…
moritz nom: say Method ~~ Routine 07:15
p6eval nom ee1a1c: OUTPUT«Bool::True␤»
moritz nom: class A { method m() is hidden_from_backtrace { } }; A.new.m; say 'alive' 07:17
p6eval nom ee1a1c: OUTPUT«alive␤»
dalek kudo/nom: 8780040 | moritz++ | src/core/ (2 files):
throw the first typed exception from within the setting
07:19
grondilu perl6: my $foo; sub test { say $bar and test for (my $bar = $foo++) ?? () !! ^2 }; test(); 07:55
p6eval rakudo ee1a1c: OUTPUT«0␤1␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected " and"␤ expecting "::"␤ Variable "$bar" requires predeclaration or explicit package name␤ at /tmp/gaJOa5hlgD line 1, column 29␤»
..niecza v11: OUTPUT«===SORRY!===␤␤Variable $bar is not predeclared at /tmp/23sUQOtOje line 1:␤------> my $foo; sub test { say ⏏$bar and test for (my $bar = $foo++) ?? ␤␤Potential difficulties:␤ $bar is declared but not used at /tmp/23sUQOtOje line 1:…
moritz known rakudobug 07:56
grondilu perl6: my $foo; sub test { my $bar = $foo++; say $bar and test for $bar ?? () !! ^2 }; test();
p6eval niecza v11: OUTPUT«Any()␤Any()␤»
..pugs b927740: OUTPUT«0␤0␤»
..rakudo ee1a1c: OUTPUT«0␤1␤»
grondilu perl6: my $foo; sub test { { my $bar = $foo++; say $bar and test } for $bar ?? () !! ^2 }; test(); 07:57
p6eval rakudo ee1a1c: OUTPUT«===SORRY!===␤Symbol '$bar' not predeclared in test (/tmp/6NGeuYLE_r:1)␤»
..niecza v11: OUTPUT«===SORRY!===␤␤Variable $bar is not predeclared at /tmp/q1B1mx8h9q line 1:␤------> $bar = $foo++; say $bar and test } for ⏏$bar ?? () !! ^2 }; test();␤␤␤Unhandled Exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.sett…
..pugs b927740: OUTPUT«*** Undeclared variable: ("$bar",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0x7f294e4e03b1>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0x7f294e4e1eb1>}),("@_",PELexical {pe_type = (mkType "Array"), pe_prot…
grondilu perl6: my $foo; sub test { my $bar = $foo++; { say $bar and test } for $bar ?? () !! ^2 }; test();
p6eval rakudo ee1a1c: OUTPUT«0␤0␤»
..pugs b927740, niecza v11: ( no output )
grondilu perl6: my $foo; sub test { my $bar = $foo++; for $bar ?? () !! ^2 { say $bar and test } ; test(); 07:58
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected end of input␤ expecting ";" or "}"␤ at /tmp/TSGYTxhNmD line 2, column 1␤»
..niecza v11: OUTPUT«===SORRY!===␤␤Unable to parse block at /tmp/Y12WfuY3QW line 1:␤------> my $foo; sub test {⏏ my $bar = $foo++; for $bar ?? () !! ^2 ␤Couldn't find final '}'; gave up at /tmp/Y12WfuY3QW line 1 (EOF):␤------> () !! ^2 { say $bar …
..rakudo 878004: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 1␤»
grondilu perl6: my $foo; sub test { my $bar = $foo++; for $bar ?? () !! ^2 { say $bar and test } } ; test();
p6eval niecza v11: OUTPUT«Any()␤Any()␤»
..pugs b927740, rakudo 878004: OUTPUT«0␤0␤»
grondilu perl6: my $foo; sub test { my $bar = $foo++; say $bar and test for $bar ?? () !!^2 }; test(); 07:59
p6eval niecza v11: OUTPUT«Any()␤Any()␤»
..pugs b927740: OUTPUT«0␤0␤»
..rakudo 878004: OUTPUT«===SORRY!===␤Cannot negate ^ because it is not iffy enough at line 1, near "2 }; test("␤»
grondilu perl6: my $foo; sub test { my $bar = $foo++; say $bar and test for $bar ?? () !! ^2 }; test();
p6eval niecza v11: OUTPUT«Any()␤Any()␤»
..pugs b927740: OUTPUT«0␤0␤»
..rakudo 878004: OUTPUT«0␤1␤»
grondilu isn't 'foo and bar for @array' supposed to be the same as 'for @array { foo and bar }' ?
moritz grondilu: it's hard for me to see what your point is among all the p6eval output above 08:01
grondilu it's something I come up with trying to implement the sudoku algorithm on rosetta.org. On rakudo 'do_this and do_that for @array' does NOT behave as { do_this and do_that } for @array' 08:03
nom: my $foo; sub test { my $bar = $foo++; say $bar and test for $bar ?? () !! ^2 }; test(); # with no {} 08:04
p6eval nom 878004: OUTPUT«0␤1␤»
grondilu nom: my $foo; sub test { my $bar = $foo++; { say $bar and test } for $bar ?? () !! ^2 }; test(); # with {}
p6eval nom 878004: OUTPUT«0␤0␤»
grondilu see ?
moritz nom: my $foo; sub test { my $bar = $foo++; (say $bar and test) for $bar ?? () !! ^2 }; test(); 08:05
p6eval nom 878004: OUTPUT«0␤1␤»
moritz nom: my $foo; my $bar = $foo++; (say $bar and test) for $bar ?? () !! ^2
p6eval nom 878004: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&test' called (line 1)␤»
moritz nom: my $foo; sub test { my $bar = $foo++; do { say $bar and test } for $bar ?? () !! ^2 }; test(); 08:06
p6eval nom 878004: OUTPUT«===SORRY!===␤Unsupported use of do...for; in Perl 6 please use repeat...for at line 1, near "}; test();"␤»
moritz nom: my $foo; sub test { my $bar = $foo++; repeat { say $bar and test } for $bar ?? () !! ^2 }; test(); 08:07
p6eval nom 878004: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&repeat' called (line 1)␤»
moritz meh
sorry, I'm not yet awake enough to comment on it
the code has too many interdependencies for my sleepy brain :-) 08:08
grondilu no worries, feel free to look at it when you have time
grondilu there is definitely something wrong anyway, at least since pugs and rakudo give a different output 08:09
perl6: my $foo; sub test { my $bar = $foo++; say $bar and test for $bar ?? () !! ^2 }; test(); # with no {}
p6eval niecza v11: OUTPUT«Any()␤Any()␤»
..pugs b927740: OUTPUT«0␤0␤»
..rakudo 878004: OUTPUT«0␤1␤»
grondilu ^ as you can see here
moritz what would you expect? 08:12
grondilu 0 0
moritz right, if $bar is 1, then the for-loop shouldn't run 08:13
so, rakudobug
grondilu the verbose explanation, and how this is related to the sudoku algorithm: pastebin.com/7bnjmjAu 08:14
masak morgn, #perl6 08:43
sorear++ # bugfix
moritz good m\w+n, masak
masak :)
geekosaur "mrfl" 08:46
masak geekosaur: sounds like a typical pre-coffee sound... :)
geekosaur exactly :) 08:47
masak sorear++ # release
moritz: did you submit the above rakudobug? 08:48
shall I?
moritz masak: I didn't. Please do.
masak submits rakudobug
moritz nom: my $foo; sub test { my $bar = $foo++; say "bar: $bar" repeat { say $bar and test } for $bar ?? () !! ^2 }; test(); 08:49
p6eval nom 878004: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 1␤»
moritz nom: my $foo; sub test { my $bar = $foo++; say "bar: $bar"; say $bar and test for $bar ?? () !! ^2 }; test(); 08:50
p6eval nom 878004: OUTPUT«bar: 0␤0␤bar: 1␤1␤bar: 2␤»
moritz nom: do { } for 1
p6eval nom 878004: OUTPUT«===SORRY!===␤Unsupported use of do...for; in Perl 6 please use repeat...for at line 1, near ""␤»
moritz nom: repeat { } for 1
p6eval nom 878004: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&repeat' called (line 1)␤»
moritz masak: care to submit that one too?
std: repeate { } for 1
p6eval std be1f10e: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'repeate' used at line 1␤Check failed␤FAILED 00:01 120m␤»
moritz std: repeat { } for 1
p6eval std be1f10e: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'repeat' used at line 1␤Check failed␤FAILED 00:01 120m␤»
moritz it seems that 'repeat { } for ...' isn't supposed to work, but then the error message shouldn't recommend it 08:51
std: do { } for 1
p6eval std be1f10e: OUTPUT«===SORRY!===␤Unsupported use of do...for; in Perl 6 please use repeat...for at /tmp/_Qqd8qDiST line 1 (EOF):␤------> do { } for 1⏏<EOL>␤Parse failed␤FAILED 00:01 120m␤»
masak submits rakudobug
moritz oh, and stdbug too
moritz submits STDbug
masak moritz++
moritz TimToady: github.com/perl6/std/issues/1 08:54
tadzik good morning 08:56
masak morning, tadzik! \o/ 08:57
masak laughs at the suggestion in www.perlmonks.org/index.pl?node_id=542341 that it's males that are the "XY problem" 09:23
tadzik ( ° ー°) 09:28
masak unless you're a bird, then males are the ZZ problem. 09:29
(yes, in birds it's males that are the homogametic sex) 09:30
tadzik . o O ( I wish I was a bird, 'cus if I were a bird... ) 09:33
masak :) 09:38
huf hmm? dont leave me hanging like that tadzik 09:46
masak huf: bwong.com/lj/IWishIWere.htm 09:48
huf ahhh 09:49
masak (Da Vinci's Notebook)++
tadzik :P 09:51
masak recently I've come across lots of things that are "Schwarzian" in nature -- that is, do some computation (like sorting, say) on a list of "secondary" values, but the final result should be the "primary" values. 09:56
this seems like a recurring pattern in some sense. 09:57
for example, sometimes I'm more interested in the keys of an array, and sometimes more in the values. 09:58
for the latter case I can use .grep and .first, but not so easily for the former case.
TiMBuS masak, i often wish perl (5) had a way to foreach over a list but also give me the index 10:21
huf i wish it had for my ($k, $v) (%hash) { ... } 10:22
or something like that
TiMBuS yeah
huf and yeah, same would be nice with arrays, altho how that'd work...
also how it'd work with sorting the hash before iterating.. *shrug*
masak I guess utility subs would go a long way. 10:23
TiMBuS huf, in p6 its easy wnough for arrays
masak but in Perl 6 we solved the iteration things nicely.
TiMBuS wait, its easy for all of that!
huf :)
masak rakudo: for <a b c>.kv -> $k, $v { say "$k: $v" } 10:24
p6eval rakudo 878004: OUTPUT«0: a␤1: b␤2: c␤»
huf still i wish p5 stole those features back :)
TiMBuS me too
huf of course, it feels a bit too fundamental to be easily backported
TiMBuS alternate wish: i wish rakudo was "ready"
TiMBuS ducks
huf :)
masak I guess what I'm saying is I wish there were grep :kv and first :key and things like that :)
TiMBuS: we all do :)
flussence
.oO( in hindsight maybe I shouldn't have picked a regex-heavy module to maintain... )
10:28
masak Woodi: the perils of not explicitly declaring your variables: blog.meloncard.com/post/12175941935...our-launch
corresponding HN thread: news.ycombinator.com/item?id=3179505 10:29
kboga good morning all 10:37
masak kboga: mornin' 10:38
kboga uhm, here is a quick hack to unbreak the rakudo build with optimizer on level 3: pastebin.com/z669WzH7
it seems like some spectest fail tho 10:39
kboga (that is using the nqp reprapi2 branch and rakudo reprapi2 branch) 10:40
ah, the spectests seem to fail because i got debug output in the optimizer left (removing that) 10:41
jnthn morning, #perl6 10:43
kboga hi jnthn, i think i found the reason why the build on reprapi2 is broken 10:44
jnthn kboga: just saw the patch
Thanks!
kboga np :)
jnthn kboga: I suspect your patch actually points at a more general issue, but it pretty much tells me exactly where to look for it. :)
kboga yea, its just a quick hack, i figured that in some cases the $!inline_info attribute was never set 10:46
dalek p/reprapi2: 42c18a2 | jnthn++ | src/6model/reprs/P6opaque.c:
Add missing initialization logic. Thanks to kboga++ for the hint that led me to this issue.
12:39
fsergot Hi! 12:44
bbkr1 hello
jnthn yay, reprapi2 branches of nqp and Rakudo are now both in shape :) 12:46
21 files changed, 908 insertions(+), 930 deletions(-) 12:47
...22 lines more is a small price for the underpinnings of compact structs etc :)
bbkr1 another Segmentation fault happened for me in Buf code, but this one is a hard case to track down :( 12:48
jnthn bbkr1: Ah, maybe you've run into the issue that is why the Parrot ticket is still open... 12:49
bbkr1: Where's the segfault?
grr, Parrot build fails here 12:50
alarm.c
src/alarm.c(22) : fatal error C1083: Cannot open include file: 'sys/time.h': No
such file or directory
:(
bbkr1 I cannot find it yet. It happens for me in MongoDB driver, which has tons of Buf opeartions and socket communication.
jnthn bbkr1: I meant, do you have a gdb backtrace? 12:51
bbkr1 how do I obtain one?
jnthn hm 12:54
iirc
gdb perl6
r yourscript.p6
wait for it to crash
then
bt
moritz: ping
bbkr1 checking it now...
[Coke] yawns. 12:55
[Coke] apologizes to jnthn for not testing the parrot build on win32 for the green_threads merge. 12:56
(not that I said I'd do it, but I/m one of the few obvious candidates ;)
jnthn [Coke]: Yeah, it looks like that 12:57
There's no easy fix that I can see either
[Coke] we're fixing it now. Please hold. Your HLL is important to us, and all bugs will be answers in the ordered they are received. 12:58
bbkr1 jnthn: bbkr.org/~bbkr/segfault/mongo_segfault_backtrace - does it look familiar to the already known segfault issue?
jnthn [Coke]: Created an issue: github.com/parrot/parrot/issues/189 13:00
jnthn bbkr1: No, that looks new. 13:00
OK, this is kinda a mess. 13:01
bbkr1 jnthn: how can I help to track it down? any way to make backtrace more verbose? I can also create devel account with code that causes bug if you want to analyze it. 13:06
dalek p: a743c97 | jnthn++ | src/ (9 files):
Toss clone from the REPR API; it's just implementable in terms of the more primitive allocate and copy_to.
13:10
nqp: e4e4bb4 | jnthn++ | src/6model/ (8 files):
nqp: Add gc_cleanup to REPR API; none of the current reprs need it, but bigint will. Not yet called.
jnthn heuristic merge detection fail ;) 13:11
jnthn moritz, mls: Bad news. The green threads branch of Parrot won't build on my platform and the fix doesn't look easy at all. I've reverted a couple of Parrot revision bumps to get things back to a working state. 13:11
dalek kudo/nom: 6daf5d1 | jnthn++ | tools/build/NQP_REVISION:
Bump to NQP revision that provides reprapi2.
13:54
kudo/nom: 95135c3 | jnthn++ | / (9 files):
Merge reprapi2 into nom.
kudo/nom: 666f399 | jnthn++ | src/core/Num.pm:
After the repr updates, we correctly have native num attrs initialized to NaN. However, Num.new() seems to be expected to give back zero, so add an explicit new that makes this happen. Means we regress no spectests now after reprapi2.
moritz \o 15:19
jnthn: pong
jnthn moritz: see backlog, but basically, I had to take us back a few Parrot revisions. 15:25
moritz ok
jnthn moritz: There's a Parrot ticket to track the issue.
moritz: I'm doing a bit on my talk at the moment, but will update bigint branch for reprapi2 later today. 15:26
dalek kudo/nom: 0f941b3 | moritz++ | src/core/Exception.pm:
hide Exception.throw and .rethrow from backtrace
15:27
[Coke] jnthn: the temporary fix from whiteknight will basically avoid the issue; I'm sure parrot could use an actual windows developer to do it right. 15:31
(not that I am suggesting you have spare time. ;)
moritz just discovered a case where TDD fails 15:36
when it takes longer to compile rakudo than to write down the first version of thing you wanted to write :-) 15:37
TimToady sorear: pseudo assigment to a 'my' acts as an assignment only if the signature can be turned into a parcel of lvalues without loss of information; anything signature-y leaves it as a binding (I believe this is how rakudo has done it historically) 15:44
masak moritz: TDD is very dependent on short test runs. 15:46
moritz: that's why I try to develop ourside of CORE when I write things for CORE, for example.
flussence nom: 'abc'.indent(4) 15:49
p6eval nom 666f39: OUTPUT«Method 'indent' not found for invocant of class 'Str'␤ in block <anon> at /tmp/x4Y_skY1GM:1␤ in <anon> at /tmp/x4Y_skY1GM:1␤»
flussence nom: Str.^add_method('indent', method (Int $a) { say ' ' x $a ~ self }); say 'abc'.indent(4) 15:50
p6eval nom 666f39: OUTPUT« abc␤Bool::True␤»
flussence that looks a *lot* easier for messing around than the whole "use MONKEY_TYPING" thing
flussence how can I add multi methods that way? Or does it "know" somehow? 15:51
masak flussence: it's too easy to add methods that way. probably shouldn't work without MONKEY_TYPING 15:52
flussence it feels very javascripty... 15:53
jnthn flussence: Be very clever about adding multis that way. 15:54
flussence: If you do, you'll need to .^add_multi_method instead, and you should explicitly declared the invocant type. 15:55
And then call .^compose
flussence: You really should use augment if it's enough
flussence invocant is that thing with the colon in the signature, right?
moritz right 15:56
the object that the method is being called on
jnthn masak: You're only getting that if you make every use of .HOW and .^ forbidden without use MONKEY_TYPING.
masak: I don't want that.
And I suspect most people don't
moritz called "reciver" in the languages that tink of method calls as messages
"receiver"
jnthn masak: And no, saying "we'll only allow the introspecty ones" doesn't fly. We don't know them all in advance and the MOP is under no obligation to give you copies of stuff. 15:57
masak *nod* 15:57
ok, then it sounds like the restriction will have to be cultural. 15:58
jnthn I think if you argue that you need a pragma to do meta-model operations, then we can just as easily argue you need one to write macros or do other things that change the syntax.
masak in some sense, MOP usage is "just as bad" (as in powerful, potentially damaging, anti-social) as MONKEY_TYPING
jnthn Well, in a sense it's more dangerous. 15:59
Take the multi example above.
There are 3 things you have to know to get right.
masak aye. 16:00
masak oh well. with great power comes great responsibility :) 16:02
people will probably create wild and wonderful things with the MOP in this way.
but I don't consider it one jot more social to Str.^add_method than to augment Str.
moritz and probably also wild and not-so-wonderful things :-) 16:03
jnthn masak: No, it's no more social. 16:03
flussence masak: in this case .indent's a spec function, so I'm just doing it for my own experimentation. hopefully nobody will need to care what way it's written :) 16:03
(this could be an interesting way to make a module autoload functions on first use...) 16:04
masak flussence: making it in your non-module code is more than fine.
flussence: that's why we're talking about "social" vs "anti-social", because the danger is in when the code is shared. 16:05
flussence oh, I know all about the problems of screwing with other people's modules from Javascript doing it :)
jnthn
.oO( I knew being socialble was dangerous... )
16:06
*sociable
flussence (I'll say nothing about this ruby thing people talk about since I've never really used it)
jnthn moritz: I guess since you committed a moment ago, I can assume current HEAD builds fine for you? 16:08
moritz jnthn: yes 16:09
(the chain of logic doesn't hold, I had tested the commit earlier and forgot to push, and didn't re-test, but it does build for me :-) 16:10
jnthn ;)
Great
That was a slightly fiddly set of refactors. 16:11
jnthn will do a blog post explaining them today, if he gets time
masak \o/ jnthn++
wow, 'my' classes rock. 16:12
felher yeah, jnthn++ :) 16:17
masak perl6: say 1i; say i 16:33
p6eval niecza v11: OUTPUT«0+1i␤0+1i␤»
..pugs b927740: OUTPUT«0 + 1i␤*** No such subroutine: "&i"␤ at /tmp/pisCFJQz2y line 1, column 13 - line 2, column 1␤»
..rakudo 0f941b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&i' called (line 1)␤»
jnthn std: i 16:34
masak who's right? Niecza, or Pugs&Rakudo?
p6eval std be1f10e: OUTPUT«ok 00:01 118m␤»
masak Niecza, apparently :)
jnthn wonders what std parses that as
masak though I'm just reading things on HN that makes me thing '1i' is good and 'i' is slightly dangerous. 16:34
maybe we should be thinking about disallowing 'i'.
masak I was reading this: news.ycombinator.com/item?id=3179628 16:35
now, this isn't an *immediate* problem in Perl because we have sigils.
but we also have 'constant' declarations, and soon maybe those weird backspace thingies :) 16:36
std: constant foo = 42; { constant foo = 5 }
p6eval std be1f10e: OUTPUT«ok 00:01 121m␤»
masak std: class A {}; { constant A = 5 } 16:37
p6eval std be1f10e: OUTPUT«ok 00:01 121m␤»
masak "all is fair if you do it in an inner scope"?
masak std: constant foo = 42; { constant foo = OUTER::foo - 37; } 16:40
p6eval std be1f10e: OUTPUT«ok 00:01 121m␤»
masak decommutes 17:00
moritz funnily enough, matlab allows a bare i as the complex unit, but its static code analysis tool points out that 1i is much more efficient 17:38
moritz nom: say Bool.pick 17:48
p6eval nom 0f941b: OUTPUT«Bool::True␤»
[Coke] nom: say 1..i.perl 17:49
p6eval nom 0f941b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&i' called (line 1)␤»
dalek odel: b501c7f | diakopter++ | / (3 files):
minor fixes
18:07
odel: b501c7f | diakopter++ | / (3 files):
minor fixes
diakopter sorear: weird, b501c7f got double reported 18:08
moritz double karma for diakopter++ 18:10
masak \o/ 18:52
moritz nom: my %a;␤sub m() { }␤%a<b> = 1; 19:04
p6eval nom 0f941b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&a' called (line 3)␤»
moritz nom: my %a;␤sub m() { };␤%a<b> = 1;
p6eval nom 0f941b: ( no output )
moritz the absence of a ; makes the line after the it misparse 19:05
std: my %a;␤sub m() { }␤%a<b> = 1;
p6eval std be1f10e: OUTPUT«ok 00:01 124m␤»
moritz doesn't need to be called m either
jnthn nom: my @a;␤sub m() { }␤@a<b> = 1; 19:08
p6eval nom 0f941b: OUTPUT«Method 'at_key' not found for invocant of class 'Array'␤ in method postcircumfix:<{ }> at src/gen/CORE.setting:1031␤ in block <anon> at /tmp/NsOQobq6hu:3␤ in <anon> at /tmp/NsOQobq6hu:1␤»
jnthn Yeah...% is an infix. Must be some oddity there. 19:09
fieldsa how to slurp in ISO-8599-1? I have set :raw but that doesn't help, I get UTF-8 encoding input error 19:20
moritz fieldsa: you need to .read and then decode the result as latin-1 19:21
(at least that should work in current rakudo)
fieldsa thanks, will try that.
moritz nom: say $*IN.read(2**30).decode('ISO-8859-1').substr(0, 20)
p6eval nom 0f941b: OUTPUT«Failed allocation of 1073741824 bytes␤Parrot VM: PANIC: Out of mem!␤C file src/gc/gc_gms.c, line 1823␤Parrot file (not available), line (not available)␤␤We highly suggest you notify the Parrot team if you have not been working on␤Parrot. Use parrotbug (located in par…
moritz nom: say $*IN.read(1024).decode('ISO-8859-1').substr(0, 20) 19:22
p6eval nom 0f941b: OUTPUT«Land der Berge, Land␤»
dalek kudo/nom: 0f582d8 | jnthn++ | src/core/metaops.pm:
Couple of small optimizations to meat-ops.
kudo/nom: 0f582d8 | jnthn++ | src/core/metaops.pm:
Couple of small optimizations to meat-ops.
19:23
flussence double word score!
jnthn ...huh, I only did one commit
oh darn, I typo'd it too
cognominal___ provocation against vegan programmers. 19:25
tadzik question for time ninjas: in how many hours is #phasers? 19:35
I never know with this DST 19:36
diakopter lol meat-ops 19:40
moritz tadzik: erm, it's tomorrow 19:43
tadzik: it's 18:30 in my time zone, which is probably the same as yours
japhb jnthn, why is it an optimization to change 'if @l[$i]' to 'if @l[$i].gimme(1)'? 19:52
tadzik moritz: I know it's tomorrow :) I'm just wondering whether I have a chance to attend it in the next 4 months, or is it just in the middle of my lectures. Is it ~20:52 on your clock now? 19:53
masak been a long time since we had a semicolon-at-the-end-of-a-line parsing bug. moritz++
tadzik: yes.
moritz tadzik: yes
jnthn japhb: We know that it's a List 19:54
tadzik okay, to it's just in the middle of my lecture, just like before the DST :)
I'll pre-report and stumble in the 15 minute break on 19:00 then
jnthn japhb: List.Bool isn't one of the cheap boolification cases and all it does in .Bool for list is call .gimme(1)
jnthn japhb: If you're doing that in a tight loop, then you save a method dispatch every time around. 19:55
masak obviously meat-ops are a perfect match for spaghetti code.
jnthn :P 19:56
colomon just discovered two ancient, embarrassing bugs in his $work code, which only came to light because of a instigating bug in someone else's code.
japhb jnthn, also, it feels like METAOP_CROSS is overgeneralized, by which I mean it was coded to handle the general case, with no fast paths for common simpler cases. For example, in my code, replacing '@A X~ @B' with 'fcc(@A, @B)' where fcc is: 'sub fcc (@a, @b) { gather { for @a -> $a { for @b -> $b { take $a ~ $b } } } }' resulted in a *big* speedup when generating my Str.Numeric() stress test strings. 19:57
jnthn, ah, OK, so you're essentially just manually inlining the .gimme(1), since that's all that happens anyway. 19:58
jnthn japhb: Yeah, I've been looking at why it's slow.
japhb: It seems that we reify the same list over and over again too.
japhb perl6: say 0XF00D; 20:00
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected "XF00D"␤ expecting "x", octal digit, "o", "b", fraction, exponent, term postfix, operator, ":" or ","␤ at /tmp/VUm1rt5rSr line 1, column 6␤»
..rakudo 0f582d: OUTPUT«===SORRY!===␤Confused at line 1, near "say 0XF00D"␤»
..niecza v11: OUTPUT«===SORRY!===␤␤Whitespace is required between alphanumeric tokens at /tmp/TEXjb1vTiI line 1:␤------> say 0⏏XF00D;␤␤Whitespace is required between alphanumeric tokens at /tmp/TEXjb1vTiI line 1:␤------> say 0X⏏F00D;…
japhb std: say 0XF00D; 20:01
p6eval std be1f10e: OUTPUT«===SORRY!===␤Whitespace is required between alphanumeric tokens at /tmp/DkD5vviz3L line 1:␤------> say 0⏏XF00D;␤Whitespace is required between alphanumeric tokens at /tmp/DkD5vviz3L line 1:␤------> say 0X⏏F00D;␤…
japhb ENOPHENNY
TimToady, since recent Perl 5 supports 0B, 0O, 0D, 0X in addition to 0b, 0o, 0d, 0x, do you have an objection to supporting that in Perl 6 as well? 20:02
masak "it's ugly"? :P 20:03
masak ...and somewhat visually non-distinctive... 20:03
japhb masak, I'm not saying recommend it. I'm saying DTRT when you try to use Str.Numeric() on an uppercase radix-notated int. 20:04
(I don't disagree with you, BTW, I just think the DWIM argument is stronger in this case.)
benabik nom: say 0xF00D 20:06
p6eval nom 0f582d: OUTPUT«61453␤»
japhb BTW, is there a non-historical reason that std: is not part of perl6: ?
moritz yes
it only parses
the other compilers try to compile and run the code
so in case of success, std will always differ 20:07
japhb moritz, I only ask because I often see people get mixed failures with the compilers, and then ask STD who parsed it correctly.
japhb
.oO( Maybe include STD whenever on or more of the others parsefail?)
20:08
jnthn brb, dinner
japhb *one or more
moritz std: $x 20:25
moritz std: $x 20:28
www.perlmonks.org/?node_id=935178 people are complaining that we don't catch post-declared variables
jnthn oh 20:29
Really should fix that one.
moritz I guess it shouldn't be too hard these days, should it?
jnthn no 20:30
dalek kudo/nom: 9fc3eb2 | jnthn++ | src/core/IO.pm:
A couple of IO performance improvements. .say for @some_list_of_strings now runs in under half the time, and we shave a little bit off the spectest runtime too.
20:33
p6eval std be1f10e: OUTPUT«===SORRY!===␤Variable $x is not predeclared at /tmp/kwZrqpiH7P line 1:␤------> <BOL>⏏$x␤Check failed␤FAILED 00:01 119m␤» 20:33
std be1f10e: OUTPUT«===SORRY!===␤Variable $x is not predeclared at /tmp/3WJ6M1h7Nq line 1:␤------> <BOL>⏏$x␤Check failed␤FAILED 00:01 119m␤»
dalek kudo/nom: 9fc3eb2 | jnthn++ | src/core/IO.pm:
A couple of IO performance improvements. .say for @some_list_of_strings now runs in under half the time, and we shave a little bit off the spectest runtime too.
diakopter 5 minute p6eval delay? 20:34
moritz woah.
moritz something is very wrong with that box 20:34
tadzik dalek!
moritz or the programs running on it
diakopter poor, poor host04
jnthn quickly gets more coding done while it's 2-for-1 on karma 20:35
diakopter maybe someone's DOSing p6eval 20:36
moritz nope
moritz load average is pretty low 20:38
moritz nqp: say($<foo>) 20:43
dalek odel: 0496bb8 | diakopter++ | lua/runtime/Try.lua:
add try/finally emulation; untested.
20:44
odel: 0496bb8 | diakopter++ | lua/runtime/Try.lua:
add try/finally emulation; untested.
tadzik jnthn: 4 in 1, dalek counts #perl6 AND #parrot :) 20:45
I noticed that when I wanted to have my 666 karma, and it jumped from 665 to 667 :(
moritz tadzik: need a -- ? :-)
p6eval nqp: OUTPUT«Symbol '$/' not predeclared in <anonymous>␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 154 (compilers/pct/src/PCT/HLLCompiler.pir:111)␤» 20:46
tadzik moritz: it's too late already :P 20:47
moritz finds that he doesn't understand lexicals handling well enough to catch undeclared variables 20:49
jnthn It probably wants a .is_declared in SymbolTable 20:56
Which goes looking through the blocks.
japhb: ah, I was wrong. In Xop way over 50% of the time is spent in this line: if $i >= $n { my @x = @v; take $rop(|@x); } 20:58
tadzik ftr: make install 653.33s user 9.07s system 110% cpu 10:00.30 total 21:00
timing spectest now
dalek kudo/nom: f71cff1 | jnthn++ | src/core/GatherIter.pm:
Avoid a more expensive ! in GatherIter; remove some Q:PIR.
21:15
kudo/nom: cb63745 | jnthn++ | src/core/metaops.pm:
When crossing two lists, we don't need to shove the op through METAOP_REDUCE; it's a binary op already. Just use it.
dalek kudo/nom: f71cff1 | jnthn++ | src/core/GatherIter.pm:
Avoid a more expensive ! in GatherIter; remove some Q:PIR.
21:15
kudo/nom: cb63745 | jnthn++ | src/core/metaops.pm:
When crossing two lists, we don't need to shove the op through METAOP_REDUCE; it's a binary op already. Just use it.
jnthn With those patches, "my @a = 'AA'..'ZZ'; my @b = 1..100; .say for @a X~ @b;" now runs in half the time it used to. 21:16
(er, "those" includes the IO ones I did earlier)
Plus I have a real world worked example for my optimization talk :) 21:17
moritz nom: grammar A { token TOP { foo } }; A.parse('foo').print 21:21
p6eval nom 9fc3eb: OUTPUT«foo»
dalek ast: 261cff6 | moritz++ | S16-io/say.t:
test Match.print
21:24
ast: 261cff6 | moritz++ | S16-io/say.t:
test Match.print
moritz nom: say Mu ~ Mu 21:28
p6eval nom 9fc3eb: OUTPUT«No applicable candidates found to dispatch to for 'infix:<~>'. Available candidates are:␤:(Any $x)␤:(Str $a, Str $b)␤:(Buf $a, Buf $b)␤:(Any $a, Any $b)␤␤ in block <anon> at /tmp/VjE0GuoD_F:1␤ in <anon> at /tmp/VjE0GuoD_F:1␤»
dalek ast: 0b7f0f0 | moritz++ | S04-statements/for.t:
test for RT #60780, odd sized list and two iteration variables
21:29
ast: 0b7f0f0 | moritz++ | S04-statements/for.t:
test for RT #60780, odd sized list and two iteration variables
dalek odel: 37485f2 | diakopter++ | lua/compiler/ (4 files):
implement while/until/repeat_while/repeat_until without using labels/gotos :/
21:56
odel: 37485f2 | diakopter++ | lua/compiler/ (4 files):
implement while/until/repeat_while/repeat_until without using labels/gotos :/
donaldh perl6: Str.^attributes 22:22
p6eval rakudo cb6374: ( no output )
..pugs b927740: OUTPUT«*** No such method in class Class: "&attributes"␤ at /tmp/OUhywkhuFI line 1, column 1 - line 2, column 1␤»
..niecza v11: OUTPUT«␤Unhandled Exception: Unable to resolve method attributes in class ClassHOW␤ at /tmp/Mo0v8KCnuL line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2223 (ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2224 (module-CORE @ 58) ␤ at /home/p…
japhb jnthn++ # optimizing 22:29
jnthn, how does the time for that test compare to using the fcc() sub that I posted earlier rather than X~ ?
(I would think it would be totally dominated by the IO) 22:30
jnthn japhb: Didn't try that yet; have been trying to get some slides done for upcoming workshops ;)
japhb Oh, well don't let me stop you then. ;-)
BTW, I tried doing various lower-level nqp:: variants of fcc(), rather than the pure-Perl 6 code I posted earlier, but most of them actually slowed it down. The only one that was a win was replacing '$a ~ $b' by the appropriate nested nqp:: ops, and then only by about 5% or so. Rakudo++ for not forcing every optimization task to be about writing horrendous strings of ultra-low-level code! 22:33
diakopter one definition of insanity is continuing to try to define insanity the same way, and failing. 22:57
cognominal___ I thought Perl 6 was about to take Perl insanity to another level, the same way but another level. 22:59
masak 'night, #perl6 23:07
tadzik 'night
jnthn Sleep time for me...gotta $dayjob tomorrow morning. 23:09
tadzik g'night as well
jnthn Didn't get the bigint stuff updated for the new repr api :( But at least my optimization talk is getting there... :)
tadzik I can't sleep, I have to keep dividing animal food
optimizing, they say
jnthn ;)
night o/
tadzik o/ 23:10