»ö« 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.
japhb In Rakudo's src/core/Bool.pm, why are prefix:<!> and prefix:<not> defined in terms of *both* nqp::p6bool() and ternary (returning 0 and 1) instead of just ternary (returning Bool::False and Bool::True directly)? 03:00
And is there any performance difference between spelling it Bool::False/Bool::True versus just False/True? 03:03
sorear japhb: yes, I think 03:38
unless rakudo constant folds it, which it probably should eventually
last I checked, rakudo always compiles Foo::Bar into a runtime hash lookup
TimToady at a guess, the first thing might be a bootstrapping issue, or it might be a fossil 05:23
moritz \o 06:19
sorear o/ 06:24
moritz fwiw True and Bool::True now generate identical lookup paths 06:27
though Bool is special-cased in the grammar as a temporary cheat 06:28
dalek ast: ba26d03 | moritz++ | S04-phasers/pre-post.t:
remove outdated DBCish PRE/POST tests

also fudges for rakudo
06:58
japhb sorear, TimToady, moritz: Thanks for the info. Up for next round of tuits: seeing if I can knock off the top few items in this profile trace. 07:45
fsergot o/ 09:47
moritz \o 10:26
std: PRE $_ > 5
ranguard moritz: redirects are live, Ask pointed out I hadn't kept the old redirects, if you find you are getting quite a few 404's the redirects to impliment are here: github.com/perlorg/perlweb/blob/29...tredirects (replacing /perl6/ with /archive where relevant :)
p6eval std 1ad3292: OUTPUT«ok 00:01 111m␤»
moritz ranguard: ok, thanks
ranguard morning btw :)
moritz and good morning to you too :-9
rakudo: sub a($x) { PRE $x > 5; $x ** 2 }; say a 10; say a 4 10:27
p6eval rakudo eccc61: OUTPUT«100␤Precondition failed␤ in sub a at /tmp/kFf4qYcDV3:1␤ in block <anon> at /tmp/kFf4qYcDV3:1␤␤»
moritz jnthn: any idea why moritz.faui2k3.org/tmp/pre-post-typ...ions.patch segfaults when running a PRE block, indendently of whether the precondition fails or not? 10:52
moritz it segfaults in Parrot_oo_get_class 10:53
and also with --ll-exception
moritz rakudo: sub a() { PRE 2 }; say a 10:58
p6eval rakudo eccc61: OUTPUT«Nil␤»
moritz oh, one thing I'm doing wrong is class X::Phaser::PrePost not inheriting from X::Base 11:03
masak good postnoon, #perl6 11:20
dalek kudo/nom: 5264177 | moritz++ | t/spectest.data:
run pre-post.t
12:04
moritz hm, fixed the inheritance issue, and still segfaults :( 12:38
oh, it segfaults during the compilation 12:41
moritz but it doesn't segfault inside the changed code 13:04
masak spooky segfault at a distance. 13:05
you wrote such exquisitely beautiful code that some unrelated code felt jealous and went on strike.
timotimo no segfault in the changed code? sign of smashed stack/heap state?
moritz yes, but I only touched fairly high-level code 13:06
timotimo hm :| 13:07
moritz moritz.faui2k3.org/tmp/pre-post-typ...ions.patch is the patch 13:09
and it segfaults with --target=pir , but not with -c 13:10
so it must be during codegen
but it gets to the return PAST::Var.new(:name('Nil'), :scope('lexical_6model')); 13:11
Teratogen what the 13:27
masak as seen on Twitter: "I caught my mate drinking brake fluid. He said 'Don't worry, I can stop whenever I like.'" 13:58
autopun interwoven with clich?. 14:00
shinobicl___ hi... i have this derived class that works as i expect.... but it only have one issue: 14:04
nom: class D is Date { has Int $.x is rw; method new(:$year!, :$month!, :$day!, :$x!) { say "values: $year, $month, $day, $x"; my $D = callwith(year=>$year, month=>$month, day=>$day); $D.x = $x; return $D; }; method perl { say "D.new($.year, $.month, $.day, $.x)"; }; }; my $var = D.new(year=>2012, month=>12, day=>2, x=>99); say $var.^attributes; say $var.perl; say $var.get-daycount();
p6eval rakudo 526417: OUTPUT«values: 2012, 12, 2, 99␤$!x $!year $!month $!day $!daycount␤D.new(2012, 12, 2, 99)␤True␤56263␤»
shinobicl___ the issue is that i want D to be inmmutable. But i don't know how to remove the "is rw" from x and still makeit work
jnthn Good morning :) 14:09
Just droping by for a moment...
moritz: The issue is that find_symbol returns the actual symbol, not a PAST node to look it up.
moritz: Need a self.get_ref(...) around the find_symbol to make it work 14:10
lichtkind moin 14:12
jnthn disappears again 14:15
gfldex shinobicl___: class A { has $!x; }; my $a = A.new(:x(10)); $a.x = 11; 14:15
and you should be careful about anything being inmutable that is not a constant 14:17
shinobicl___ my priority is that it should be inmutable. moritzs suggested that if the base clase is inmutable, i should try to make the derived one inmutable too. 14:19
kmp Hi guys. Could I ask if there are any known Radoku test failures at the moment? I was just having a look around the source, built it and saw that the 01-load test failed for me. 14:21
lumi__ shinobicl___: I think you're meant to write your own submethod BUILD() and not method new 14:22
gfldex kmp: Rakudo as in git pull? 14:24
kmp Yeah. Should I be surprised at a failing test? 14:25
gfldex make test should work 14:26
i'm building right now, can tell you in a few minutes if it works for me
kmp Good stuff. Thanks.
gfldex kmp: This is perl6 version 2012.02-183-g5264177 built on parrot 4.1.0 revision RELEASE_4_1_0-105-gd923903 14:35
fails at t/02-embed/01-load.t ............... No subtests run
i would not worry tho
kmp Yep, that's the one. I'll keep on exploring. Thanks. 14:45
masak gfldex: you can't pass non-public attributes to the default .new 15:11
also, having things be immutable-but-not constant is perfectly fine; the main thing is that the clas upholds an invariant of some sort. 15:13
immutable types can even have hidden moving parts, if it serves them. for caching purposes, for example. 15:14
of course, you should never be able to tell from the outside.
kmp quit 15:29
masak quiet day today. 16:03
felher indeed it is. 16:10
moritz \o 16:18
felher o/ 16:20
TimToady blames jnthn for taking good care of himself... :) 16:30
dalek kudo/nom: d1505ae | moritz++ | src/ (2 files):
Typed exceptions from PRE/POST failures

  jnthn++ for the help
16:45
masak .oO( jnthn is relaxing, breathing Good Air... ) 16:56
moritz evalbot rebuild nom 16:57
p6eval NOT OK (maybe a rebuild is already in progress?)
masak evalbot rebuild secret robot army bent on destroying the world 16:58
p6eval OK (started asynchronously)
dalek Rebuild of secret complete.
masak o.O
benabik Now the secret is out. Careful, masak, they'll be after you first for revealing them. 16:59
masak at least the bots are named, reassuringly, p6eval and... dalek. O.O
dalek albot: 07d32e8 | moritz++ | evalbot.pl:
be a wee bit stricter in checking compiler names for rebuild
17:01
dalek albot: 4f8355b | moritz++ | evalbot.pl:
fix regression
17:03
benabik dalek: Where is the Doctor? 17:03
moritz who?
SCNR
r: sub a($x) { PRE $x > 0; say $x.sqrt }; a 9; a -9 17:04
p6eval rakudo d1505a: OUTPUT«3␤Precondition ' $x > 0' failed␤ in sub a at /tmp/2279kWnNQ4:1␤ in block <anon> at /tmp/2279kWnNQ4:1␤␤»
moritz r: sub a($x) { PRE { $x > 0 }; say $x.sqrt }; a 9; a -9 17:05
benabik Doctor Who's on first?
p6eval rakudo d1505a: OUTPUT«3␤Precondition ' { $x > 0 }' failed␤ in sub a at /tmp/CN2Pz3OkVy:1␤ in block <anon> at /tmp/CN2Pz3OkVy:1␤␤»
moritz r: sub a($x) { PRE { $x > 0 }; say $x.sqrt }; try a -9; say $!.perl
p6eval rakudo d1505a: OUTPUT«X::Phaser::PrePost.new(what => "Precondition", condition => " \{ \$x > 0 }")␤»
dalek ast: efa9610 | moritz++ | S32-exceptions/misc.t:
typed exceptions for PRE/POST failures
17:21
masak moritz: that's just so cool. it prints the code. 17:49
moritz: did you notice, however, that there's a stray space in the beginning of the code string?
moritz masak: it's not stray, but neither is it pretty
it comes verbatimly from the <blorst> rule that is used to parse the text after the PRE 17:50
masak I can see how it occurs. but that's an explanation, not a good reaso... right.
maybe apply a .trim somewhere? 17:51
moritz I think I should, yes 17:52
I also think that I should pass the phaser name to the exception object, and do the PRE -> precondition translation inside the error message, not inside Perl6::World
masak nod. 17:53
masak has been discovering this weekend exactly what can and can't be done in modern webapps without a mouse
as far as I can see, there's no way to sign out of Gmail in Chrome without a mouse.
moritz wow
masak also as far as I can see, there's no way to give a github issue a label, save for pressing Tab 34 times. :) but I'm less sure about that one.
moritz I think I'd use some browser extension like hit-a-hint for mouseless browsing 17:54
arnsholt_ masak: If you're mouseless, an extension like vimium might be in order (if you can install it without a mouse =)
moritz ah yes, vimperator and the likes 17:55
I don't have it installed because my wife wants to use my browser too :-)
arnsholt_ =D
masak moritz: www.siftsoft.com/ claims to be a port of Hit-a-Hint. I'll try it out. 17:56
masak it works! \o/ 17:59
moritz++ arnsholt_++
tadzik 'evening humans 18:01
moritz \o tadzik 18:02
masak tadzik: good evening, carbon-based life form. 18:03
dalek kudo/nom: 924712d | moritz++ | src/ (2 files):
move PRE/POST error message logic to the error class; trim condition text
18:04
ast: 9831233 | moritz++ | S32-exceptions/misc.t:
track phaser error changes in rakudo
moritz evalbot rebuild nom
p6eval OK (started asynchronously)
moritz masak: that commit should make you even more happy :-) 18:05
I wonder if there are other places where it would help to include the original source code in the error message 18:06
masak this is the first time I see the throws_like assertion. it does indeed make me happy. :) 18:07
moritz++
moritz erm, I meant the rakudo commit :-)
moritz fwiw throws_like is currently defined in that test file; once I get more feedback about it, I'll move it to Test.pm and S24 18:09
dalek Rebuild of nom complete. 18:10
moritz it is very useful, but it seems to be on a different level than the other Test.pm functions 18:11
moritz in particular it runs several TAP tests per call to the test function 18:11
I wonder if it should go into Test::Util instead of Test 18:12
masak probably. 18:26
[Coke] yawns 18:32
[Coke] gist.github.com/1476841#file_perl6_pass_rates 18:45
both niecza and pugs are now passing less tests- I wassume this is because someone removed passing tests from the suite. 18:46
moritz yes, I removed some that were part of deprecated features 19:03
dalek ast: 2608abd | jonathan++ | S (2 files):
Merge branch 'master' of github.com:/perl6/roast
20:22
ast: b4d5c62 | jonathan++ | S04-phasers/pre-post.t:
Toss outdated TODO comment.
jnthn I can't see anything in the spec that indicates that POST phasers run in the opposite order to PRE phasers. The tests don't expect it either; a comment in the tests says the spec seems to indicate otherwise, yet I can't find where the spec indicates at all 20:50
dalek kudo/nom: 8f4a063 | jonathan++ | src/ (2 files):
POST block gets $_ set to the result.
21:06
ast: 2339d22 | jonathan++ | S04-phasers/pre-post.t:
Unfudge a test for Rakudo.
moritz reverse order? 21:09
is there anything wrong with running them in the order that they appear? 21:10
jnthn moritz: Like END blocks do
moritz: Not that is immediately clear to me.
moritz a POST is more like a LEAVE than an END
jnthn LEAVE also has LIFO semantics, iirc 21:11
moritz hm
dalek kudo/nom: 1968b89 | jonathan++ | src/ops/perl6.ops:
If one POST fails, don't run any more. The spectest for this still fails as it expects POST to run in declaration order, not reverse order.
21:15
jnthn At least, we implement LEAVE with those semantics.
moritz I don't really see the use case for multiple POST phasers in the same block, so I can't comment on the desired semantics 21:16
I mean when you write POST foo; POST bar; you can juste write POST foo and bar;
jnthn OK 21:19
Well, once it's decided, it should just be a case of changing the tests or changing an unshift to a push :) 21:20
jnthn heads to the part of town that's rumored to have proper beer o/ 21:27
masak yes, END and LEAVE and POST have LIFO semantics. it feels somehow right/consistent that they all do. 21:56
'night, #perl6 21:57
japhb Anyone around that can walk me through Rakudo's gimme/reify/REIFY code? 22:00
sorear goood * #perl6 23:07