»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by lichtkind on 5 March 2010. |
|||
colomon | ah, just activating the :radix[ ] form doesn't make it work. problem is in token circumfix:sym<[ ]>, I think... | 00:00 | |
lue is trying to fix the fractions of radcalc | 00:02 | ||
mberends | jnthn: suspected regex backtracking bug nopaste.snit.ch/20018 | 00:04 | |
jnthn | mberends: Agree. | 00:05 | |
mberends , having found a workaround, goes to sleep | |||
00:06
mberends left
|
|||
lue | hopefully I fixed it, compiling... | 00:06 | |
TimToady | std: .4 | 00:07 | |
p6eval | std 30146: OUTPUT«ok 00:01 107m» | ||
lue | std: :16<.4> | 00:08 | |
p6eval | std 30146: OUTPUT«===SORRY!===Malformed radix number at /tmp/7vyfVF06ni line 1:------> :16⏏<.4>FAILED 00:01 105m» | ||
colomon | I thought it had to be 0.4? | ||
TimToady | metoo | ||
lue | just checking :) | ||
TimToady | probably parsed it as a method call :/ | ||
lue | rakudo: say Int.4 | 00:09 | |
p6eval | rakudo 1cf076: OUTPUT«Confused at line 11, near "say Int.4"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
TimToady | no, it parsed it as a number | ||
std: 4. | 00:10 | ||
p6eval | std 30146: OUTPUT«===SORRY!===Decimal point must be followed by digit at /tmp/jU36jiBhBU line 1:------> 4.⏏<EOL>FAILED 00:01 105m» | ||
TimToady | that's what we disallow | ||
lue | but python allows it! (oh...) | ||
TimToady | so is 4.i (4.)i or (4).i ? | 00:12 | |
p6 will always take it as a method call | 00:13 | ||
sorear | is 1.618 a method call? | 00:14 | |
should it be? | 00:15 | ||
TimToady | why would it be? | ||
sorear | . | ||
TimToady | don't be a fundamentalist | ||
colomon | TimToady++ # p6l | ||
snarkyboojum | enjoyable post from TimToady on the perl 6 mailing list | 00:16 | |
colomon: beat me to it :) | |||
colomon | snarkyboojum: because I used fewer letters. ;) | ||
lue | The tension is unbearable (compiling) | ||
00:16
cls_bsd joined
|
|||
jnthn | TimToady: Wow! | 00:18 | |
TimToady: You...kinda said what I feel but thought I should keep to myself. :-) | 00:19 | ||
TimToady | well, someone has to exercise a little moral authority around here occasionally, and I have about as little as anyone... | ||
lue | >say :16<16D.4> | ||
1.42578125 | |||
.... something went horribly wrong :) | 00:20 | ||
TimToady | :) | ||
colomon | but you still got a fractional answer, lue++ | ||
it's progress. | |||
TimToady | and it's even the right sign | ||
lue | I know! I think I broke the first guy's code though :) | ||
jnthn | It's OK, I temporarily broke parsing 1 + 2 earlier tonight | 00:21 | |
:-) | |||
colomon | And I keep on breaking != | ||
lue | I wrote it so that the computation of the fraction is separate, and then I divide it appropriately and add. | ||
jnthn | > say (('be','pi') >>~<< ('er','vo')).perl | 00:22 | |
["beer", "pivo"] | |||
TimToady | looks like you took it as 1.6D4 | ||
jnthn | > say (('be','pi') >>R~<< ('er','vo')).perl | 00:23 | |
["erbe", "vopi"] | |||
lue | >say :16<16D> | ||
TimToady | yes, almost exactly that | ||
lue | 1 | ||
jnthn | .oO( mmm....vopi! ) |
||
00:23
meppl left
|
|||
jnthn make spectests and hopes he didn't cause collateral damage. | 00:24 | ||
colomon | jnthn++ | ||
lue | gah! Without the fraction, it takes the lefmost digit of the number! | ||
cognominal | in Perl5, is there a low precedence operator of function application like the $ in haskell? | ||
TimToady | actually, 1.6D.4 is what it looks like :) | ||
arnsholt | Is the official #parrot on Freenode? | ||
jnthn | arnsholt: no, it's on magnet | ||
arnsholt | Oh, well. What's one more ircnet? =) | 00:25 | |
lue | I'm going to kill the original code, seems like :D | ||
(emacs pun) | |||
jnthn | lue: If the new code passes more tests, go ahead! :-) | 00:26 | |
lue | rakudo: Q:PIR{$S0="hello"$S1=$S0[5]say $S1} | 00:28 | |
p6eval | rakudo 1cf076: OUTPUT«The opcode 'set_s_s_kic' (set<3>) was not found. Check the type and number of the argumentscurrent instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 972 (compilers/pct/src/PCT/HLLCompiler.pir:538)» | ||
cognominal | s/Perl5/Perl6/ | ||
lue | Ah! Did I do something wrong in testing a snippet of PIR? | 00:29 | |
(belated) hi cognominal o/ | |||
colomon | cognominal: how does it work? | ||
snarkyboojum | lue: I've been having fun with very similar errors lately :) | 00:31 | |
lue | rakudo: Q:PIR{$S0="hello"$S1=substr $S0 3say $S1} | ||
p6eval | rakudo 1cf076: OUTPUT«The opcode 'substr_s_s' (substr<2>) was not found. Check the type and number of the argumentscurrent instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 972 (compilers/pct/src/PCT/HLLCompiler.pir:538)» | ||
jnthn | lue: comma | ||
lue | rakudo: Q:PIR{$S0="hello"$S1=substr $S0, 3say $S1} | ||
p6eval | rakudo 1cf076: OUTPUT«lo» | 00:32 | |
lue | rakudo: Q:PIR{$S0="hello"$S1=substr $S0, 3, 3say $S1} | ||
p6eval | rakudo 1cf076: OUTPUT«lo» | ||
lue | rakudo: Q:PIR{$S0="hello"$S1=substr $S0, 3, 1say $S1} | ||
p6eval | rakudo 1cf076: OUTPUT«l» | ||
jnthn | \o/ | ||
lue | substr(STRING, BEGIN, LENGTH) then | ||
jnthn | Right. | ||
lue | Is it alright if I break your hard work on the :[number] adverbs and have you send just one number, instead of an intpart and fracpart? | 00:35 | |
:) | |||
jnthn | colomon: BTW, if we've got reduce...and hypers...and Z/X/R/S...does that mean we're now parsing all of the hyperops? :-) | 00:36 | |
colomon | I think so. We don't actually do anything with S yet other than parse it. | 00:37 | |
do you have the non-infix hypers parsing? | |||
lue | (Goodbye, old &radcalc code. It'd take too much to modify using one number.) | ||
jnthn | colomon: oh, no... | 00:38 | |
colomon: I think they may be easier though | |||
colomon: Ah well, gotta save something for tomorrow :-) | |||
colomon | :) | ||
jnthn | colomon: It occurs to me that those probably desugar to map? | ||
Well | |||
Maybe | |||
As a first cut :-) | |||
colomon | well, if they're not hyper. | 00:39 | |
jnthn | I guess they ain't meant to be lazy. | ||
colomon | but that's a good first cut. | ||
jnthn | Well | ||
@a>>++ | |||
Maybe not quite that simple | |||
colomon | oooo, right. | ||
jnthn | But maybe | ||
:-) | |||
A first cut can certainly be a thin wrapper around map, anyway. | 00:40 | ||
lue | in PIR, a num is a floating-point, right? | ||
jnthn | yees | ||
colomon: Oh, we have that infixy form of reductions to do too I guess. | 00:41 | ||
colomon | errr... so how do I code infix_prefix_meta_operator:sym<!> in such a way that != is not one, but !== and !=== are? | ||
oh, right, I'd already forgotten that one's existence. :) | 00:42 | ||
jnthn | erm | ||
colomon | <!before '!=' something? | ||
jnthn | <!before '!=' [-<=>]> maybe | 00:43 | |
char class of anything that's not = | |||
colomon | sounds plausible.... | ||
jnthn | rakudo: say '$a != $b' ~~ /'!=' [-<=>]/ | ||
p6eval | rakudo 1cf076: OUTPUT«Confused at line 11, near "say '$a !="current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
lue | rakudo: Q:PIR{$N0=3say $N0} | 00:44 | |
p6eval | rakudo 1cf076: OUTPUT«3» | ||
jnthn | rakudo: say '$a != $b' ~~ /'!=' <-[=]>/ | ||
p6eval | rakudo 1cf076: OUTPUT«!= » | ||
jnthn | rakudo: say '$a !== $b' ~~ /'!=' <-[=]>/ | ||
p6eval | rakudo 1cf076: OUTPUT«» | ||
jnthn | colomon: That one. | ||
<!before '!=' <-[=]>> | |||
cognominal | colomon, in a haskell sin $ 1 + 5 is equivalent to sin(1+5) | ||
jnthn | cognominal: In Perl 6, sin 1 + 5 is also equivalent to sin(1+5) ;-) | 00:45 | |
...wait, isn't it in Perl 5 too? :-) | |||
cognominal | it works on the left side too | ||
colomon | regex assertion not terminated by angle bracket at line 1285, near "[-<=>]> <s" | 00:46 | |
jnthn | colomon: yes, I got it wrong | ||
See update | |||
<!before '!=' <-[=]>> | |||
00:46
arthur-_ left
|
|||
colomon | ah, I see. :) | 00:46 | |
jnthn | Sorry | ||
:-) | |||
Not sure what I was thinking. Probably wasn't. | |||
colomon | no worries. | ||
cognominal | f + g $ 1 + 5 is (f+g) (1+5) # supposing we can add function | ||
colomon | is that f composed with g, or the value of f + the value of g? | 00:47 | |
cognominal | well that means f( 1+5) + g(1+5) according to the addition of functions | 00:48 | |
jnthn | Oh, it distributes the args amonst the functions? | 00:49 | |
sorear | jnthn: Is there anything I need to know before killing return_value_helper? | ||
jnthn | sorear: I...don't even recall what it does. :-) | 00:50 | |
colomon | I think the quick answer is you could pretty easily set up Perl 6 to do that, but it doesn't have an equivalent by default. | ||
cognominal | no, that the definition of function addition | ||
jnthn | sorear: Oh, yes, kill it. | ||
sorear: Before a Parrot Calling Conventions interface, it was a world of pain to not use a hack like that. | 00:51 | ||
sorear: Now it's not. | |||
er, interface => interface change | |||
colomon | rakudo: multi sub infix:<+>(&a, &b) { &a(!@_) + &b(!@_) }; | ||
p6eval | rakudo 1cf076: OUTPUT«Placeholder variable cannot override existing signature at line 11, near ";"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
cognominal | $ is just an operator that the low precedent application of a function to its argument | 00:52 | |
*precedence | |||
colomon | rakudo: multi sub infix:<+>(&a, &b) { sub { &a(!@_) + &b(!@_) }} | ||
p6eval | rakudo 1cf076: OUTPUT«Can not put multi on anonymous routine at line 11, near "}"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
jnthn | ouch! | ||
colomon | std: multi sub infix:<+>(&a, &b) { sub { &a(!@_) + &b(!@_) }} | 00:53 | |
p6eval | std 30146: OUTPUT«ok 00:01 115m» | ||
jnthn | I guess the $*MULTINESS or something is leaking too far | 00:54 | |
colomon | I'm sure jnthn++ can come up with something better anyway... ;) | ||
Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 70 | |||
ok( ?( (1 & 2 | 3) !=3), '& binds tighter than |'); | |||
is the line in question. | |||
sorear | jnthn: Can you breifly explain what life was like before PCC, and how Blizkost worked *at all* then? | 00:55 | |
jnthn | probably sub infix:<+>(&a, &b) { sub (|$c) { &a(|$c) + &b(|$c) } } or some such | 00:56 | |
sorear: There was PCC | |||
00:56
justatheory left
|
|||
jnthn | sorear: There just wasn't a neat interface to it | 00:56 | |
sorear | I... don't really understand PCC | ||
jnthn | sorear: So it was messing around with structures rather than just some vtable calls. | ||
sorear | just a couple magic black boxes :( | ||
jnthn | Well, you *can* treat it as a magic box now, for the most part. Which is a relief. :-) | ||
Essentially it's the thing that deals with moving args from caller to callee, and returns in the other direction. | 00:57 | ||
And those things being passed living in a CallContext data structure (I think that's what it's called now...) | |||
s/data structure/PMC/ | 00:58 | ||
00:59
clintongormley left
01:00
justatheory joined
|
|||
dalek | kudo: 5edcafa | jonathan++ | src/ (3 files): Get parsing of hyperops, including transparency of precedence, implemented. Stub in the various &hyper multis. Implement the very simplest case. |
01:02 | |
snarkyboojum | rakudo: say <1 2 3>.exists(1) | 01:05 | |
p6eval | rakudo 1cf076: OUTPUT«Method 'exists' not found for invocant of class 'Parcel'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
lue | rakudo: Q:PIR{$S0=substr "Oh", 2, 1say $S0} | 01:06 | |
p6eval | rakudo 1cf076: OUTPUT«» | ||
snarkyboojum | rakudo: my @a = <1 2 3>; say @a.exists(1) | ||
p6eval | rakudo 1cf076: OUTPUT«Method 'exists' not found for invocant of class 'Array'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
lue | rakudo: Q:PIR{$S0=substr "Oh", 2, 1say $S0=undef} | ||
p6eval | rakudo 1cf076: OUTPUT«error:imcc:syntax error, unexpected '=', expecting '\n' ('=') in file 'EVAL_1' line 65» | ||
lue | rakudo: Q:PIR{$S0=substr "Oh", 2, 1say $S0==undef} | ||
p6eval | rakudo 1cf076: OUTPUT«error:imcc:syntax error, unexpected RELOP_EQ, expecting '\n' ('==') in file 'EVAL_1' line 65» | ||
jnthn | potešit | ||
oops, wrong window | |||
lue | rakudo: Q:PIR{$S0=substr "Oh", 2, 1if $S0==undef goto failsay "yay"fail:say"boo undef"} | 01:07 | |
p6eval | rakudo 1cf076: OUTPUT«error:imcc:syntax error, unexpected IDENTIFIER ('undef') in file 'EVAL_1' line 65yayboo undef» | ||
lue | rakudo: Q:PIR{$S0=substr "Oh", 2, 1if $S0=="" goto failsay "yay"fail:say"boo undef"} | ||
p6eval | rakudo 1cf076: OUTPUT«boo undef» | ||
lue | Now I can avoid keeping track of the length of the string! \o/ | 01:08 | |
01:10
astrojp left
|
|||
TimToady | there are no infixy reductions | 01:11 | |
jnthn | TimToady: Whatcha call the 1, [+] 2,3,4 thingummy? | 01:12 | |
er | 01:13 | ||
01:13
snarkyboojum left
|
|||
jnthn | 1 [+] 2,3,4 | 01:13 | |
? | |||
TimToady | exactly the same as (1 + 2), 3, 4 | ||
jnthn | Oh. | ||
So it's got nothing to do with reduction ops? | |||
TimToady | and 1 [[[[[+]]]]] 2,3,4 | ||
jnthn | ...phew. :-) | ||
TimToady | only an infix in prefix position is a reduction | 01:14 | |
jnthn | Aye | ||
TimToady | and you have to use [] there to disambiguate | ||
jnthn | OK, good. | ||
Something I'd read earlier today had led me to think otherwise. | |||
lue | why does 1 [+] 2,3,4 not equal 1 + 2 + 3 + 4 ? | ||
jnthn | OK, excellent, so we parse all the hyper ops. :-) | ||
erm | |||
meta-ops | |||
:-) | |||
TimToady | because it doesn't | ||
jnthn | Apart from the few hypers. :-) | ||
01:14
silug joined
|
|||
jnthn | (unary ones) | 01:15 | |
colomon | To be precise there was misinformation on #perl6 about 1 [+] 2, 3, 4; :) | ||
jnthn | colomon: Heh, it wasn't just my brain being mushy then. :-) | ||
colomon | but can hardly cast blame, as I fear I probably say something wrong on the channel at least once a day. ;) | ||
TimToady | S03:4611 | ||
01:16
meppl joined,
snarkyboojum joined
|
|||
TimToady | and S03:4196 (emphasis on "in term position") | 01:17 | |
any other place, [] is only for disambiguation | |||
jnthn | Heh | 01:18 | |
It'll be good for obfuscations. | |||
:-) | |||
TimToady | @a Z[+=] @b vs @a [Z+]= @b | ||
jnthn | Oh. | 01:19 | |
TimToady | or de-obfuscations | ||
mind you, those might end up doing the same thing | |||
just differently :) | |||
but then there * * * which can be written * [*] * | 01:20 | ||
in STD, != is distinguished from the other forms by being longer than ! | 01:21 | ||
so it's simply LTM | |||
colomon | if that only worked for me.... :( | 01:22 | |
TimToady | eventually all the contortions you guys are going through to avoid LTM is going to add up to more than implementing real LTM :) | ||
m6locks | how does blessing work with a class that has another class as an attribute? i'm trying to write a constructor for it but return self.bless(self.CREATE(), :attributeClass) complains about type objects being abstract | 01:23 | |
jnthn | std: pi**time | 01:24 | |
p6eval | std 30146: OUTPUT«ok 00:01 107m» | ||
lue | is :16<3.DEAD_BEEF> legal ? (the underscore in the fractional part) | ||
jnthn | ...Perl 6 supports censorship of some bad things, at least. :-) | ||
TimToady | lue: yes | 01:25 | |
colomon | lue: yes | ||
jnthn | m6locks: That doesn't look immediately wrong | ||
TimToady | $<fracpart> = [ '.' <[ 0..9 a..z A..Z ]>+ [ _ <[ 0..9 a..z A..Z ]>+ ]* ]? | ||
jnthn | m6locks: What do you mean as "another class as an attribute"? | ||
m6locks: There is a bug in master in that area though. | |||
namely... | |||
rakudo: class Foo { has Str $.a }; say Foo.new.a.WHAT # should be Str() | 01:26 | ||
p6eval | rakudo 5edcaf: OUTPUT«Any()» | ||
jnthn | You may be hitting that one. | ||
I'll try and fix it soon. | |||
m6locks | oh, could be | ||
yes, that was my point | |||
TimToady | if you folx are abandoning the intpart/fracpart, it would be easier to parse radix fractions like dec_number does | 01:27 | |
and just pass the whole coeff | |||
and then we can allow :16<.D> without requiring the 0 | 01:28 | ||
01:29
nihiliad left
|
|||
lue | Just one string is what I'm programming, with detection of the "." switching over to fractions. | 01:29 | |
01:32
nihiliad joined
|
|||
colomon | jnthn: we can say infixish(1) in Grammar.pm? | 01:34 | |
TimToady | which presumably tells the infix it's in a meta | 01:35 | |
okay, testing STD patch that just passes the coeff with a . in the middle | 01:36 | ||
jnthn | colomon: Not at the moemnt | 01:37 | |
colomon: I'm not sure what that's needed for. | |||
TimToady: Yes. Is it "just" for error reporting? | |||
colomon | see what TimToady just said. But you used it, yes? | ||
jnthn | I couldnt' see anywhere it affects teh parse. | ||
No | |||
I just called <infixish> | |||
colomon | {} <infixish(1)> | ||
jnthn | Oh? | 01:38 | |
colomon | in token infix_circumfix_meta_operator:sym<« »> | ||
jnthn | oh, damm | ||
copy-pasto | |||
(from STD) | |||
It probably doesn't work. | |||
I only checked the non-unicode ones. :-) | |||
colomon: You can copy the stuff from STD probably though to get $*IN_META and add the parameter to infixish | |||
We support those. | |||
colomon | I'll keep that in mind. Today I'm just trying to puzzle out how to copy your precedence copying trick. :) | 01:39 | |
01:39
TiMBuS left
|
|||
TimToady | it's mostly just for suppressing warnings on [..] and such, which might be mistaken for an attempt to leave out the endpoints of a range | 01:39 | |
since the mathematicians seem inclined to write [1..] | 01:40 | ||
jnthn | Ah, OK. :-) | ||
colomon: Just duplicating <O=.Ocopy('infixish')> should do it | |||
colomon | yes, I thought so. :) | 01:41 | |
except I need to reorder a bit to make it work. | |||
:) | |||
TimToady | it also suppresses Unexpected block in infix position | ||
jnthn | TimToady: OK, thanks. :-) | ||
We can add it later on, then. | |||
TimToady | though I don't know that we currently have any operators beginning with { or ->, but a user might add them | 01:42 | |
STD is extensible, y'see... | |||
rakudo: 42 -> { ... } | 01:43 | ||
p6eval | rakudo 5edcaf: OUTPUT«Confused at line 11, near "42 -> { .."current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
TimToady | std: 42 -> { ... } | ||
p6eval | std 30146: OUTPUT«===SORRY!===Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/fVGRNQesOl line 1:------> 42 ⏏-> { ... } expecting any of: bracketed infix infix or meta-infixFAILED 00:01 109m» | ||
lue | PIR ifs need ==, not =, right? | 01:44 | |
jnthn | rihgt. | ||
lue | sigh... now to go back :) | 01:45 | |
TimToady | std: sub infix:<-\>> {...}; 42 [->] 43 | ||
jnthn | We still need to steal all the two terms in a row good errors. | ||
p6eval | std 30146: OUTPUT«ok 00:01 108m» | ||
jnthn | rakudo: sub infix:<-\>> {...}; 42 -> 43 | ||
p6eval | rakudo 5edcaf: OUTPUT«Confused at line 11, near "42 -> 43"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
jnthn | aw | 01:46 | |
We don't do the bracketed form yet | |||
lue | now I'm compiling (fingers crossed XoX) | ||
jnthn | It's just Xo now | ||
;-) | |||
TimToady | don't recognize that operator | ||
actually, I finally removed that deprecation from STD | |||
std: 1 X+X 2 | 01:47 | ||
p6eval | std 30146: OUTPUT«Undeclared name: 'X' used at line 1ok 00:01 106m» | ||
lue | It was my best attempt at a fingers crossed person (you can do better perhaps?) | 01:48 | |
colomon is really amused by Julie / Julia. | 01:49 | ||
TimToady | ₓ☹ₓ | 01:51 | |
lue | That was a great movie! | ||
colomon++ | |||
jnthn didn't see that one | 01:52 | ||
lue draws a big breath as he types «./perl6 -e "say :16<16D.4>"» into the terminal (minus the french quotes of course) | |||
oh yeah, I broke the adverbs :D | |||
>say radcalc(16,'16D.4') | 01:54 | ||
unrecognized/invalid character: . | 01:55 | ||
current instr.: '&radcalc' pc 11961 (src/builtins/Parcel.pir:78) | |||
called from Sub '_block14' pc 29 (EVAL_1:0) | |||
called from Sub '!UNIT_START' pc 1299 (src/glue/run.pir:23) | |||
called from Sub 'perl6;PCT;HLLCompiler;eval' pc -1 ((unknown file):-1) | |||
called from Sub 'perl6;PCT;HLLCompiler;command_line' pc 1489 (compilers/pct/src/PCT/HLLCompiler.pir:794) | |||
called from Sub 'perl6;Perl6;Compiler;main' pc -1 ((unknown file):-1) | |||
01:56
vamped joined
|
|||
colomon | lue: Having just watched a bit of real Julia Child footage, I'm stunned at how well Meryl Streep has her down. | 01:56 | |
lue | colomon: Look up. What could be causing that? (the string var is named 'number') | 01:57 | |
01:57
justatheory left
|
|||
colomon | hmmmm | 01:57 | |
01:58
Sarten-X left
|
|||
lue | should I paste my &radcalc code so far? | 01:58 | |
colomon | yeah. | 01:59 | |
isn't that message coming from radcalc | |||
lue | oh, that's an error sent by &radcalc itself :P | 02:00 | |
(I should put DON'T PANIC in front of it...) | |||
colomon | :) | ||
02:00
snarkyboojum left
|
|||
m6locks | rakudo: my $a, $b = 1; | 02:00 | |
p6eval | rakudo 5edcaf: OUTPUT«Symbol '$b' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)» | ||
lue | I know! I forget to increment my loop variable before jumping to fractions! (when you see the code, you'll know what I mean) | 02:01 | |
and so it comes across the . twice! | |||
TimToady | std: /\ / | ||
p6eval | std 30146: OUTPUT«===SORRY!===No unspace allowed in regex (for literal # please quote with single quotes, '#') at /tmp/wQe2LopX01 line 1:------> /\⏏ /FAILED 00:01 107m» | ||
TimToady | still slightly LTA... | ||
lue | /\/ever give up, TimToady! :) | 02:02 | |
colomon has completely broken parsing of the Rop, etc. | |||
TimToady | told you it looked kinda like 1.6D.4 :) | ||
colomon | oh, maybe it's the action that is broken, not the parsing. | 02:03 | |
lue | compiling ₓ☹ₓ | 02:04 | |
02:04
snarkyboojum joined
|
|||
lue | I just completely rewrote it TimToady (and IMO it's more efficient (less labels) and readable (comments!)) | 02:05 | |
Juerd | moritz_: /dev/pts is mounted so I don't know what could be wrong. | ||
moritz_: Maybe someone (you?) fixed it? | |||
jnthn | Juerd: I think moritz_++ found a way to fix it. | 02:06 | |
02:06
M_o_C left
|
|||
Juerd | \o/ | 02:06 | |
colomon | lue: but does it pass the tests? ;) | ||
jnthn | sleep() | 02:07 | |
night o/ | |||
colomon | night! | ||
TimToady | o/ | ||
lue | night-i-o o/ | ||
colomon: first it has to work :D | 02:08 | ||
done compiling! and now... | |||
02:08
Sarten-X joined
|
|||
lue | >say radcalc(16,'16D.4') | 02:09 | |
369 | |||
the fraction is just added to the integer *sob* | |||
I'm a moron. I didn't add the result of the fraction, but the numerator. :) | 02:10 | ||
02:13
gfldex joined
|
|||
TimToady | The only way to be a genius is to keep on being a moron until you stop. :) | 02:14 | |
lue | Fixed it, finger crossing time... | 02:15 | |
colomon | TimToady++ | 02:16 | |
lue | OW! I sprained a tendon in my index finger :) | ||
sorear | type with your tongue | 02:18 | |
TimToady | impossible to strain a muscle in your index finger; impossible to strain a tendon in your tongue. tradeoffs... | 02:19 | |
hard to cross your tongue though. | |||
lue | :D :D :D :D :) :) :) :) :) \o/ \o/ \o/ \o/ \o/ \o/ ^.^ ^.^ ^.^ | 02:20 | |
>say radcalc(16,'16D.4') | |||
365.25 | |||
Juerd | TimToady: Only if you're alone | ||
sorear | shifted chars are hard... use your nose for those | ||
TimToady | ooh, a significant number | ||
lue | yes, the number of days in a year :) | ||
02:20
rcsheets joined
|
|||
colomon | approximately. ;) | 02:20 | |
TimToady | give or take a gregorian | ||
rcsheets | There are 143 people in this channel. | 02:21 | |
sorear | rcsheets: no, only about 139 | ||
Juerd | rcsheets: That's not true :) | ||
lue | now to fix adverbs, pass spectests, get a commit bit, and commit | ||
02:21
TimToady sets mode: +vv buubot dalek,
TimToady sets mode: +vv ilogger2 IRSeekBot,
TimToady sets mode: +vv p6eval phenny
|
|||
Juerd | teh botz | 02:21 | |
rcsheets | ok so my definition of person is broken | ||
lue | (or nopaste a patch) | ||
TimToady | looks like there are six bots, unless you're one :) | ||
snarkyboojum | depends how good the bots are | ||
rcsheets | There are 143 IRC users in this channel. | ||
02:21
mauke joined
|
|||
colomon | jnthn++ | 02:21 | |
sorear | wrong again | ||
144 | 02:22 | ||
colomon | > say 3 R* 4 R- 20 | ||
8 | |||
> say 3 R- 4 R* 20 | |||
77 | |||
Juerd | Irssi said there were 143 "nicks". That's pretty accurate. | ||
lue | ...where is the adverb defined? (oh dang it, forgot magnitude O.o) | ||
rcsheets | hmm, nicks | ||
ok, fine | |||
i'll agree with nicks | |||
02:22
icke_ joined
|
|||
colomon | > say 1, 2 RZ~ 'a', 'b' | 02:23 | |
a1b2 | |||
pugssvn | r30147 | lwall++ | [STD] pass single coeff to radcalc to make :16<.BABEFACE> easier | ||
r30147 | more awesomization of the no unspace message | |||
02:23
icke_ left
|
|||
sorear | rcsheets: anyways, what brings you here? | 02:23 | |
rcsheets | necrocow. he's not here. | 02:24 | |
TimToady | would you like a commmit bit? | ||
sorear | who, me? | ||
and to what project? | |||
rcsheets | but he thinks he is here. so... i joined, to see for myself. | ||
TimToady | we hand out pugs repo commit bits like candy | 02:25 | |
TimToady refrains from making joke on "repo man" | |||
lue | rakudo commit bit would be nice, as opposed to nopasting patches :) | 02:26 | |
TimToady | I don't have any of those | ||
lue | (I would love a commit byte :) ) | ||
TimToady | but you can hack on the spec and tests, or even STD | ||
or any of the other projects in the pugs repo | |||
lue | I has a pugs commit bit already, it's just rakudo... | 02:27 | |
(got to go add in magnitude...) | |||
02:29
rcsheets` joined
|
|||
lue | rakudo: Q:PIR{if 3 == 3 say "hey"} | 02:29 | |
p6eval | rakudo 5edcaf: OUTPUT«error:imcc:syntax error, unexpected PARROT_OP, expecting GOTO ('say') in file 'EVAL_1' line 64» | ||
lue | so it has to be a goto... | ||
02:30
necrocow joined
|
|||
rcsheets` | hi necrocow. | 02:30 | |
can you see this? | |||
necrocow | yes | 02:31 | |
02:31
mauke left
|
|||
necrocow | can you see this? | 02:31 | |
rcsheets` | yup. | ||
02:31
rcsheets` left
|
|||
sorear wonders what this is about. | 02:31 | ||
necrocow | ok | ||
looks liek giubson was split until a moment ago | 02:32 | ||
is is true there will be a pure C version of perl6 (like perl5 and before are) | |||
rcsheets | i disagree, but anyway now you can ask #perl6 about perl 6. | ||
lue | rakudo: say :16<A*2**16> | ||
p6eval | rakudo 5edcaf: OUTPUT«655360» | ||
02:32
rcsheets left
|
|||
lue | rakudo: say :16<A*2> | 02:32 | |
p6eval | rakudo 5edcaf: OUTPUT«Malformed radix number at line 11, near "<A*2>"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
lue | rakudo: say :16<A**2> | ||
sorear | necrocow: why? | ||
p6eval | rakudo 5edcaf: OUTPUT«Malformed radix number at line 11, near "<A**2>"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
sorear | necrocow: this language is what you make of it | 02:33 | |
lue | shouldn't A*2 default to A*2**1, and A**2 an ambiguity error? | ||
necrocow | sorear: curious | ||
TimToady | parrot is "pure C" in that sense | ||
necrocow | I've had really bad experiences with parrot | 02:34 | |
02:34
astrojp joined
|
|||
necrocow | TimToady: tha'ts not the same, if Perl 6 is weritten in parrot, it's written in parrot, not straight C | 02:34 | |
so I'm aksing about Perl6 not parrot | |||
lue | TimToady: for magnitude in base conversion, what if someone leaves out the base? The exponent? | ||
colomon | in the spec, both parts of *N**M are required | ||
or at least, in the old spec. | |||
both or neither. | 02:35 | ||
TimToady | Perl 5 isn't written in C either, in that case. it's written in the ppcodes that the P5 interpreter uses | ||
lue | EMISSINGARGUMENTS then? | ||
TimToady | both parts are required in STD too | 02:37 | |
std: :16<FACE*42> | |||
p6eval | std 30147: OUTPUT«===SORRY!===Malformed radix number at /tmp/qMxuFDe1MO line 1:------> :16<FACE*⏏42> expecting radintFAILED 00:01 107m» | ||
TimToady | the error is kinda bogus though | 02:38 | |
lue | I'm going to write in error catchers for &radcalc for that then. | ||
TimToady | in the expecting part | ||
02:39
vamped left
|
|||
TimToady | you never get to radcalc in that case, since it can't find the > | 02:39 | |
if rakudo follows STD there... | |||
colomon | and it does at the moment, at least in this part. | 02:40 | |
necrocow | TimToady: well the actualy 'perl' program was indeed written in C, I've compiled it myself numerous times. What the 'perl' executable runs is another matter | 02:41 | |
TimToady: you seem to be mixing things repeatedly | |||
I just want to know if there will be a striaght 'perl6' written in C, like how '/usr/bin/perl5' is | 02:42 | ||
lue | Just in case you were to use radcalc() :) | ||
necrocow: if someone gets around to it :) | |||
colomon | lue: good point. | ||
lue | (The adverbs are still broken BTW :) ) | 02:43 | |
necrocow | lue: I understand that... it would defiantely help if perl6 first existed :p | ||
s/defiantely/definately/ | |||
lue | It does... as a spec. :D | ||
snarkyboojum | ./perl6 exists on my machine :) | 02:44 | |
necrocow | synlinks don't count :po | ||
or are you using raku or whatever it's called | |||
snarkyboojum | certainly not a symlink | ||
necrocow | rakudo, sorry | ||
snarkyboojum | it's an executable :) | ||
necrocow | but it's not a real perl6 though | ||
TimToady | necrocow: you insist on making distinctions that are relatively meaningless | 02:45 | |
necrocow | huh | ||
snarkyboojum | for that matter I have a perl6.c on my machine too :D | ||
lue | It will be, once it passes the test suite :) | ||
02:45
nihiliad left
|
|||
necrocow | TimToady: you seems to keep making distinctive things to be the same thing which is wrong | 02:45 | |
02:45
nihiliad joined
|
|||
sorear | necrocow: explain to me why it even matters | 02:45 | |
necrocow | TimToady: parrot != perl6, perl6 is (to be?) written in parrot, so what ever parrot is written in is irrevent. Perl5 reads ppcodes, but it is NOT written IN ppcodes, it is written in C | 02:46 | |
those ARE important distinctions | |||
sorear | (also, TimToady is always right :p) | ||
snarkyboojum | the first line of which (perl6.c) is '#include "parrot/parrot.h"' :) | ||
necrocow | I tihnk not :p | ||
so there is perl6 in c code then? | 02:47 | ||
lue | Probably the virtual machine bit upsets him. I'm not a fan of it either (can't wait for self-supporting Rakudo) | ||
sorear | Perl 5 is not written in C, it's written in an unholy custom macro language | ||
colomon | There is certainly C code in Rakudo. | ||
snarkyboojum | colomon: was just about to mention that, but once again beaten to it :) | 02:48 | |
colomon | Perl 6 is a specification, not a particular implementation. | ||
sorear | I don't get what's so special about C | ||
it's just a language | |||
TimToady | and it obviously confuses everyone who uses it | ||
necrocow | sorear: you're write, dispite all the C code, I should have been using javac to build perl5 all these years. How the hell could I have missed that | 02:49 | |
I can't believe I was always using gcc | |||
sorear | necrocow: "unholy custom macro language" != java | ||
necrocow | it's still C ffs | ||
cognominal | The important point is that Perl 6, once bootstrapped, will be mostly written in Perl 6 and the back end will be less relevant to the user of Perl 6. That cannot be said of Perl 5. | ||
sorear | necrocow: if you want a Perl 6 implementation written in Pig Latin, feel free to write one. | ||
Implementation language is an implementation detail | 02:50 | ||
necrocow | I never saw the benefit of building a compiler with another instance of that compiler... that sometimes made it impossible ot build ghc fir instance | ||
sorear | also, you should *never* use gcc to build perl5 | ||
you should always use make | |||
necrocow | I've never been unable to build perl5 from sources | 02:51 | |
sorear | perl6 is also built using make | ||
cognominal | Things like parsing are written using a manual lexer and yacc for Perl 5 while parsing in Perl 6 is done in Perl 6. | ||
necrocow | sorear: huh... I don't use gcc directly, whatever is in the Makefile, which I'm fairly certain uses gcc and such | ||
sorear | *plonk* | ||
lue | Oi! | 02:52 | |
02:52
literal_ is now known as literal
|
|||
necrocow | oh very matuire | 02:52 | |
yeah the whole world needs to know you added someone t oyour ignore list | |||
lue | Erm, who added you to an ignore list? | ||
necrocow | fucking idiot | ||
02:52
necrocow left
|
|||
lue | O WOAH! Language mister! | 02:52 | |
m6locks | O__o | 02:53 | |
sorear | being friendly to idiots is so hard | ||
lue | rakudo: say :16<A*2**2> #would be 40 | ||
p6eval | rakudo 5edcaf: OUTPUT«40» | 02:54 | |
sorear | seriously, what's the point of joining and immediately being confrontational | ||
maybe he's just a troll | |||
lue | Ah well (IMO, an 'Oi!' was appropriate at that point...) | ||
at least he left volunatarily (now, should we block him from joining again...? Good thing I'm not op :) ) | 02:55 | ||
02:57
fda314925 joined
|
|||
lue | And for the record, how could I reply to someone on my ignore list? :) | 02:57 | |
sorear | plonk means I no longer care what you have to say | 02:59 | |
TimToady | actually, historically (Usenet) it's the sound of putting someone in your killfile | 03:02 | |
sorear | yes | ||
TimToady | oddly, I'm acquanted with the chap who invented killfiles :) | ||
sorear | but irssi killlists are broken by design, and I don't use them | ||
lue | Are you with the guy who invented kickbans? | 03:03 | |
sorear is trying to write a replacement in perl6 | |||
colomon | TimToady: is there a convenient list_infix operator which isn't a metaop? I need it for a test case... | ||
sorear | Z | ||
colomon | Hmmm... Z is sort of implicitly a metaop... it's a funky case. | 03:04 | |
At least in theory, Z is just Z, | |||
TimToady | ... | ||
colomon | TimToady: You are a genius. :) | ||
lue | let me guess... in PIR, you can't do $N0 pow $N1, it has to be integers... | ||
colomon | lue: seems unlikely... pow is easier to implement on floats. | 03:05 | |
sorear | depends. Is a FPU available? | ||
colomon | > say 10 R... 1, 3 | ||
13579 | |||
in PIR? yes | 03:06 | ||
lue | here's the line I'm trying: $N1 = base pow exponent | ||
it says it expected a newline when I try make :/ | 03:07 | ||
cognominal | what is R... ? | ||
colomon | it's ... reversed | 03:08 | |
like 4 R- 5 is 5 - 4 = 1 | |||
lue | rakudo: say :16<A*2.5**3.6> | 03:09 | |
p6eval | rakudo 5edcaf: OUTPUT«Malformed radix number at line 11, near "<A*2.5**3."current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
colomon | 10 R... 1, 3 is 1, 3 ... 10 | ||
lue | I'm guessing fractional magnitudes are not allowed? | ||
colomon | lue: right | ||
lue | that makes things easier :) | ||
cognominal | clearly Perl 6 is a agglutinative language :) | ||
I just don't yet know all the morphemes | 03:10 | ||
lue | argh! Still i won't let me do base pow exponent. | ||
colomon | And you can just keep stacking them... it will work as soon as I spectest and check in. | 03:11 | |
you can do stuff like RXR~ | |||
lue | Is there a PIR expert that tells me why it won't let me use pow, insisting there should be a newline? | 03:12 | |
cognominal | is ROXOR possible ? :) | ||
colomon | only if you define your own O metaop. :) | 03:13 | |
pugssvn | r30148 | lwall++ | [STD] give better message on missing ** part | ||
cognominal | I can't figure where that goes is the grammar | ||
colomon | errr, and it would have to be like ROXOR~ or ROXOR+ | ||
cognominal | *in | 03:14 | |
colomon | unless we define a R operator that doesn't need an op to follow it. | ||
it would be consistent with X and Z.... ;) | |||
03:14
xomas left
|
|||
lue | I'm about to cry. Hours of coding stopped by an unruly pow opcode... | 03:14 | |
Tene | sorear: what's wrong with /ignore in irssi? | 03:15 | |
pugssvn | r30149 | colomon++ | [t/spec] Add tests to make sure precedence is properly carried over from op to Rop. | ||
sorear | Tene: it corrupts autolog data | ||
if I'm looking back at my logs in a week, the rage is gone and I've removed the ignore, but the log data is still absent | 03:16 | ||
Tene nods. | |||
'k | |||
colomon | lue: I only see $N2 = pow $N0, $N1 constructions in alpha code.... | ||
lue | ... | ||
..................... | 03:17 | ||
...... | |||
meep | |||
rakudo: Q:PIR{fail} | |||
p6eval | rakudo 5edcaf: OUTPUT«error:imcc:syntax error, unexpected '\n', expecting '(' in file 'EVAL_1' line 64Could not find non-existent sub failcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | 03:18 | |
colomon | oh, nevermind, pir::pow__NNN is operators.pm | ||
lue | rakudo: Q:PIR{$I0=pow 2,3say $I0} | ||
p6eval | rakudo 5edcaf: OUTPUT«eval_ins: op 'pow_i_i_i' not foundcurrent instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 972 (compilers/pct/src/PCT/HLLCompiler.pir:538)» | ||
colomon | NNN means it takes two Nums and returns a Num. | 03:19 | |
hmmm.... | 03:20 | ||
lue | rakudo: Q:PIR{$I0=2 pow 3say $I0} | ||
p6eval | rakudo 5edcaf: OUTPUT«error:imcc:syntax error, unexpected PARROT_OP, expecting '\n' ('pow') in file 'EVAL_1' line 642» | ||
colomon | rakudo: say pir::pow__III(10,3) | ||
p6eval | rakudo 5edcaf: OUTPUT«The opcode 'pow_i_i_i' (pow<3>) was not found. Check the type and number of the argumentscurrent instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 972 (compilers/pct/src/PCT/HLLCompiler.pir:538)» | ||
lue | so they HAVE to be nums? | ||
colomon | maybe? | ||
lue | rakudo: Q:PIR{$I0=pow 2.0,3.0say $I0} | ||
p6eval | rakudo 5edcaf: OUTPUT«eval_ins: op 'pow_i_n_n' not foundcurrent instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 972 (compilers/pct/src/PCT/HLLCompiler.pir:538)» | 03:21 | |
lue | rakudo: Q:PIR{$N0=pow 2.0,3.0say $N0} | ||
p6eval | rakudo 5edcaf: OUTPUT«8» | ||
lue | OK. | ||
03:21
wknight8111 left
|
|||
lue | yes! Compiling... | 03:22 | |
snarkyboojum | rakudo: Q:PIR{$N0=pow 2.0,3say $N0} | ||
p6eval | rakudo 5edcaf: OUTPUT«8» | ||
lue | rakudo: say radcalc(16,'12','.4',3.5,2.2) # radix, int, frac, base, exp | 03:23 | |
p6eval | rakudo 5edcaf: OUTPUT«283.284102145718» | ||
colomon | > say 1, 3, 5 RXR~ 'a'..'d' | ||
1a3a5a1b3b5b1c3c5c1d3d5d | |||
> say 1, 3, 5 X~ 'a'..'d' | |||
1a1b1c1d3a3b3c3d5a5b5c5d | |||
lue | It allows fractional magnitudes thru radcalc directly then :) | ||
Is that legal? | |||
colomon | well, radcalc is just a helper function, I don't know that it's actually spec'd anywhere. | 03:24 | |
lue | ah well. Until you can use pow on integers, I'm not worrying :) | ||
rakudo: say :16<A*2**3> # as a reference to see if my code works | 03:27 | ||
p6eval | rakudo 5edcaf: OUTPUT«80» | ||
03:27
lichtkind left
|
|||
lue | yes! Now to spectest and, if colomon doesn't want to do it, fix the adverbs! \o/ | 03:29 | |
colomon | er... fix the adverbs? | 03:30 | |
(and for sure I'm going to bed as soon as my own spectest run is done.) | |||
lue | Yes. I removed a variable. You just need to pass the number as a string, instead of an int string and a frac string :) | 03:31 | |
It broke the adverbs though :D | |||
:16<>, :2<>, etc. | |||
colomon | oh, you're saying the parsing changed. | ||
or at least, what you use changed. | |||
yes? | |||
lue | yes! I completely rewrote radcalc :) | 03:32 | |
where are the adverbs then? | |||
colomon | but you haven't been able to test the full blow thing because we don't send the right info to you. | ||
hold on, I'll get you a quick patch. | |||
lue | I've been using the radcalc() function call to see if things worked. Is something missing? | 03:33 | |
colomon | once the actions are patched for you, you can run it against S02-literals/radix.t, and check that the 180-some tests we have still work after your change. | 03:34 | |
my $intpart := $<intpart>.Str; | |||
my $fracpart := $<fracpart> ?? $<fracpart>.Str !! "0"; | |||
my $base := $<base> ?? +($<base>[0].Str) !! 0; | |||
my $exp := $<exp> ?? +($<exp>[0].Str) !! 0; | |||
make PAST::Op.new( :name('&radcalc'), :pasttype('call'), | |||
$radix, $intpart, $fracpart, $base, $exp | |||
); | |||
look for that code in Actions.pm | |||
and add | |||
(after the my $fracpart line) | |||
my $intfrac := $intpart ~ '.' ~ $fracpart; | 03:35 | ||
and then in the $radix, $intpart, $fracpart, $base, $exp line, replace $intpart, $fracpart, with $intfrac, | |||
snarkyboojum | lue: you can get pow to work with Rakudo Int()s paste.lisp.org/display/96699 | ||
lue: not sure that's what you were trying to do anyway - but what the hell | 03:36 | ||
colomon | That should make the current parser talk to your version of radcalc so you can run tests on it. | ||
lue | so after all modifications, run make spectest, and then nopaste a patch if all goes well? | 03:37 | |
colomon | don't do a full make spectest (at least at first) just do make t/spec/S02-literals/radix.t | 03:38 | |
that will do a short test that just tests your changes. | |||
If that works out, then do a full spectest. :) | |||
and oh, make sure you have the latest t/spec/S02-literals/radix.t, I fudged it today. | 03:39 | ||
lue | make test gets the latest spectest to rakudo, right? | 03:40 | |
colomon | and then if your code works, we'll have to unfudge some of the tests, including some that have never worked before! :) | ||
lue is running make; make test; make t/spec/more stuff here | |||
I heard make-ing individual tests is bad (oh well) | 03:41 | ||
colomon | lue: TimToady is against it, and it probably is a logical blot on the system, but it works and is very handy. ;) | 03:42 | |
lue intermitently afk and !afk whilst compiling | |||
bah well! I can always re-download the file :) | |||
colomon | bah, strange failures here, going to bed instead of pushing. | 03:44 | |
lue: good luck! | |||
lue | NO BUT WHAT IF i need to make a patch? | 03:45 | |
I guess the unfudgeing/patching can wait 'til tomorrow if nothing else :) | |||
03:47
unobe joined
|
|||
lue | garh, decimals broke again :/ | 03:55 | |
it also doesn't like :16()... | 03:56 | ||
I'll get to that tomorrow. Later! | |||
sorear | lue: make test runs Rakudo-specific tests only | ||
03:56
astrojp left
|
|||
sorear | you want make spectest, which svn clones the pugs repo and runs the P6 spec suite | 03:57 | |
04:00
nihiliad left,
nihiliad joined
04:06
cognomore joined
04:21
meppl left
04:31
dual left
04:50
xomas joined,
xomas left,
xomas joined
05:17
abra joined
05:30
nihiliad left
05:31
ShaneC left
05:41
sorear joined
|
|||
snarkyboojum is wondering how exists could be implemented for Array now that it's not backed by a ResizeablePMCArray (which implements exists_keyed)... | 05:43 | ||
TimToady | bitmap? | ||
what is it implemented with? | 05:44 | ||
snarkyboojum | I don't understand well enough.. perhaps it is :) | 05:47 | |
alpha used to be Array <- List <- ResizeablePMCArray | |||
whereas in masters it's Array <- Seq <- Iterable <- Any <- Mu | 05:49 | ||
05:50
unobe left
|
|||
snarkyboojum | I suspect I'm not making much sense :) | 05:50 | |
TimToady | whether a container is there in the list of pointers seems not to have much to do with derivation | ||
but I'm no expert in the internals | 05:51 | ||
05:52
am0c joined
|
|||
snarkyboojum | and Mu is a P6opaque-ish thing ? No idea :) I was just hoping to port alpha's exists() functionality over to master :) | 05:56 | |
rakudo: @a = <a b c>; say @a.PARROT | 06:03 | ||
p6eval | rakudo 5edcaf: OUTPUT«Symbol '@a' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)» | ||
snarkyboojum | rakudo: my @a = <a b c>; say @a.PARROT | 06:04 | |
p6eval | rakudo 5edcaf: OUTPUT«Array» | ||
sorear | As far as I know the Perl6 type ontology has nothing whatsoever to do with representation | ||
06:05
molaf joined,
eternaleye left
06:08
eternaleye joined
|
|||
snarkyboojum | my lack of understanding is the problem here :) | 06:08 | |
sorear | you think YOU lack understanding? | ||
snarkyboojum | :) most definitely | 06:09 | |
06:09
IllvilJa left
06:16
abra left
|
|||
snarkyboojum | if say @a.PARROT returns 'Array', does that mean it uses an Array PMC? (naivety is bliss :)) | 06:16 | |
sorear | Where is the master list of valid arguments to --target? | 06:18 | |
06:20
cognomore left
|
|||
snarkyboojum | parse, past, post, pir, evalpmc I think | 06:26 | |
from line 32 in parrot/compilers/pct/src/PCT/HLLCompiler.pir :) | 06:28 | ||
afk | |||
06:32
payload joined
06:35
am0c left
|
|||
TimToady | std: /\ / | 06:45 | |
p6eval | std 30149: OUTPUT«===SORRY!===No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes (' ') or use a backslashed form like \x20 at /tmp/GrxIyYMA4y line 1:------> /\⏏ /FAILED 00:01 107m» | 06:46 | |
TimToady | std: /\#/ | ||
p6eval | std 30149: OUTPUT«===SORRY!===No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes ('#') or use a backslashed form like \x23 at /tmp/TinDHTWWpT line 1:------> /\⏏#/FAILED 00:01 105m» | ||
TimToady | std: /\/ | 06:47 | |
p6eval | std 30149: OUTPUT«===SORRY!===No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes ('') or use a backslashed form like \x0a at /tmp/YOmcrtcG2A line 1:------> /\⏏<EOL>FAILED 00:02 105m» | ||
TimToady | std: :16<FACE*2> | 06:48 | |
p6eval | std 30149: OUTPUT«===SORRY!===Base is missing ** exponent part at /tmp/2fnX4fV204 line 1:------> :16<FACE*2⏏>FAILED 00:01 105m» | ||
TimToady | zzz & | 06:49 | |
06:59
molaf left
|
|||
sorear | snarkyboojum: thanks | 07:00 | |
07:01
molaf joined
07:34
abra joined
|
|||
sorear | rakudo: class Bob is Int { }; my Int $a = 0; $a = Bob.new; say $a | 07:37 | |
p6eval | rakudo 5edcaf: OUTPUT«0» | ||
sorear | I wonder how the existance of subclasses of primitive types interacts with the concept of unboxing | 07:38 | |
07:41
mberends joined
|
|||
moritz_ | Int is not a primitive type; int is | 07:52 | |
sorear | oh | 08:03 | |
rakudo: class Bob is int { }; my int $a = 0; $a = Bob.new; say $a | 08:04 | ||
p6eval | rakudo 5edcaf: OUTPUT«Malformed my at line 11, near "int $a = 0"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
08:07
kaare joined
08:08
kaare is now known as Guest14894
08:09
envi^home joined
08:12
jhuni left
08:13
fridim joined
|
|||
moritz_ | but rakudo doesn't knoe about native/primitive types yet | 08:16 | |
08:26
Chillance left
|
|||
moritz_ | phenny: tell pmichaud could you please add a small guide to the nqp-rx README telling people how to update the nqp sources in parrot? it seems to lower the truck number unnecessary as is | 08:32 | |
phenny | moritz_: I'll pass that on when pmichaud is around. | ||
08:32
moritz_ sets mode: +o sorear
|
|||
sorear | ooh. shiny. | 08:34 | |
08:35
Su-Shee joined
|
|||
moritz_ | alpha: say "yes" if "\t" ~~ / <[\t]> /; | 08:35 | |
p6eval | alpha 30e0ed: OUTPUT«yes» | 08:36 | |
moritz_ | rakudo: say "yes" if "\t" ~~ / <[\t]> /; | ||
p6eval | rakudo 5edcaf: ( no output ) | ||
08:43
|Jedai| joined
|
|||
moritz_ | phenny: tell pmichaud I've assigned RT #73698 to you; it's blocking me from running the JSON::Tiny test suite, and I need to port JSON::Tiny to proto regexes for the book... - would be nice if you could take a look in your sparse tuits | 09:06 | |
phenny | moritz_: I'll pass that on when pmichaud is around. | ||
snarkyboojum | rakudo: my @a = [1,,3]; say @a.elems | 09:17 | |
p6eval | rakudo 5edcaf: OUTPUT«1» | 09:18 | |
snarkyboojum | what's happening there? | ||
moritz_ | rakudo: my @a = [1,,3]; say @a.perl | ||
p6eval | rakudo 5edcaf: OUTPUT«[[1, 3]]» | ||
moritz_ | std: [1,,3] | ||
p6eval | std 30149: OUTPUT«===SORRY!===Preceding context expects a term, but found infix , instead at /tmp/83jkkgn6w6 line 1:------> [1,⏏,3]FAILED 00:01 108m» | ||
moritz_ | rakudo: my @a = 1,,3; say @a.elems | ||
p6eval | rakudo 5edcaf: OUTPUT«2» | ||
snarkyboojum | cool.. so rakudo should fail? | ||
moritz_ | aye | ||
snarkyboojum | excellent | ||
09:31
am0c joined
09:35
iblechbot joined
|
|||
moritz_ | phenny: tell jnthn that t/spec/S12-class/attributes.t emits some IMCC syntax errors, probably at compile time (but still runs) and passes all but one test - LHF? | 09:38 | |
phenny | moritz_: I'll pass that on when jnthn is around. | ||
09:38
colomon joined
09:42
unobe joined
09:45
unobe left
|
|||
moritz_ | rakudo: print 2**20 | 09:53 | |
p6eval | rakudo 5edcaf: OUTPUT«1048576» | 09:54 | |
colomon | o/ | 09:56 | |
09:57
M_o_C joined
09:58
M_o_C left
|
|||
moritz_ | it's c\o/lomon! | 10:01 | |
the last test in t/spec/S03-operators/r-metaop.t fails for me | |||
colomon | moritz_: actually should be the last two tests that fail. At least, I think I added the tests but haven't pushed the patch yet. :( | 10:06 | |
or does it fail hard? | 10:07 | ||
is 4 R- 5 R/ 10, -2, "Rop gets the precedence of op"; | |||
is (10 R... 1, 3), (1, 3, 5, 7, 9), "Rop gets list_infix precedence correctly"; | |||
10:08
drbean left
|
|||
colomon | I guess this is a sign the first of those two tests is not sufficient -- I thought it wouldn't work without the patch! | 10:11 | |
moritz_ | test 29, is 4 R- 5 R/ 10, -2, "Rop gets the precedence of op"; works | ||
colomon | nods | 10:12 | |
I just tested it on one of my other machines. | |||
you can ignore the #30 fail, it will do so until I get my patch pushed. | |||
moritz_ | rakudo: say 3 R/ 9 + 5 # should be 8 | ||
p6eval | rakudo 5edcaf: OUTPUT«4.66666666666667» | 10:13 | |
moritz_ | that's something we can put in the test file | ||
colomon | moritz_++ | ||
snarkyboojum | rakudo: my @list = <a b c>; @a[0].say; | ||
p6eval | rakudo 5edcaf: OUTPUT«Symbol '@a' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)» | ||
moritz_ | rakudo: say 9 / 3 + 5 | ||
p6eval | rakudo 5edcaf: OUTPUT«8» | ||
snarkyboojum | rakudo: my @list = <a b c>; @list[0].say; | 10:14 | |
p6eval | rakudo 5edcaf: OUTPUT«a» | ||
snarkyboojum | rakudo: my @list = <a b c>; @list.exists(0); | ||
p6eval | rakudo 5edcaf: OUTPUT«Method 'exists' not found for invocant of class 'Array'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
colomon | moritz_: You unfudged a bunch of tests in radix.t that only work on 64-bit platforms. | 10:15 | |
moritz_ | colomon: I'd like to move S03-operators/foo-metaop.t to S03-metaop/foo.t - what do you think about that? | 10:16 | |
colomon: eh - could you please move them to overflow.t? | |||
colomon | moritz_: on overflow -- will do. | ||
on S03-metaop -- makes sense to me. | 10:17 | ||
10:18
rv2733 joined
|
|||
colomon | give me a sec (before reorg) to get the radix.t patches in. | 10:18 | |
10:19
drbean joined
|
|||
moritz_ will do it after breakfast :-) | 10:19 | ||
colomon is now quietly singing "Overflow" from Porgy and Bess to himself, he just realized. | 10:22 | ||
dalek | kudo: e877b2a | (Solomon Foster)++ | src/Perl6/ (2 files): Move the <infix_prefix_meta_operator> <infixish> into the <infix_prefix_meta_operator> tokens themselves. |
10:28 | |
kudo: 6be8f8c | (Solomon Foster)++ | src/Perl6/Grammar.pm: Proper precedence for !op, Rop, and Sop. jnthn++. |
|||
snarkyboojum | would this work for Array .exists? (I have a feeling is dodgey - but works i.e. passes tests :)) paste.lisp.org/display/96712 | 10:31 | |
moritz_ | rakudo: my @a = (1, 2); say @a[0] ~~ Proxy | 10:32 | |
p6eval | rakudo 5edcaf: OUTPUT«0» | ||
colomon | moritz_: go ahead with the move whenever you're ready. | ||
moritz_ | rakudo: my @a = (Proxy, Proxy); say @a[0] ~~ Proxy | ||
snarkyboojum | my @a = (1, 2); say @a[-1] ~~ Proxy | ||
p6eval | rakudo 5edcaf: OUTPUT«1» | ||
snarkyboojum | my @a = (1, 2); say @a[6] ~~ Proxy | ||
colomon | is non-existence the only reason to return a Proxy? | 10:33 | |
snarkyboojum | dunno | ||
moritz_ | unless you store a Proxy inside it | ||
colomon: will do later on | |||
snarkyboojum | but reading the source of Proxy.pir "A Proxy is used to represent non-existent elements in aggregates." | ||
thought it might work ;) | |||
so I take it - that's a no :) | 10:34 | ||
moritz_ thinks so | |||
snarkyboojum | how else could it be done? | ||
moritz_ | maybe you need to access the RPA under the hood directly | ||
afk | |||
snarkyboojum | I tried, but there's no RPA there anymore in master right? | ||
moritz_ | the items must be stored somewhere | 10:36 | |
snarkyboojum | an Array is a Seq is a Iterable is an Any is a Mu | ||
moritz_: agreed :) but where? | 10:37 | ||
:) | |||
colomon | snarkyboojum: look at postcircumfix:<[ ]> in Array.pir | ||
snarkyboojum | colomon: k | ||
colomon | that's where the Proxy is returned if the element doesn't exist, I think. | 10:38 | |
unless null elem goto have_elem | |||
snarkyboojum | so it just checks if values[n] is null or not in PIR | 10:39 | |
colomon | yeah | ||
snarkyboojum | is that the appropriate check then? | ||
colomon | I mean, I think -- I'm not an expert on this. | ||
but that would be my thought on how to do it. | |||
snarkyboojum | so checking for Proxy is invalid because you could store a Proxy object in the array | 10:40 | |
but if you check for an element and it's null Rakudo gives you back a Proxy object :) | |||
how would you discern the difference? | |||
colomon | I don't think you can if you just look at [ ]'s return value. | 10:41 | |
snarkyboojum | colomon: cheers again then | 10:42 | |
colomon | good luck! | ||
snarkyboojum | colomon: it felt like cheating :) | ||
colomon | afk # going to try to go back to bed, maybe | 10:43 | |
snarkyboojum | ?(bed) ;) | ||
11:08
PZt left,
meppl joined
11:15
dual joined,
snarkyboojum left
11:17
abra left
|
|||
pugssvn | r30150 | moritz++ | [t/spec] re-fudge listquote.t for rakudo | 11:23 | |
r30151 | moritz++ | [t/spec] failing Rop precedence test for colomon++ | |||
r30152 | moritz++ | [t/spec] unfudgea a >>+<< test for rakudo, jnthn++ | |||
r30153 | colomon++ | [t/spec] Move overflowing tests from radix.t to overflow.t. | |||
moritz_ | wow, pugssvn seems slow | 11:24 | |
colomon | it must have just been off, no? | 11:25 | |
It didn't have any reports at all yesterday, as far as I can recall. And someone (you, I suspect) was making changes all day long. | |||
moritz_ | and I tried to resurrect pugssvn | 11:26 | |
another question regarding test file names | |||
currently they are inconsisten | |||
cross-metaop.t vs. r-metaop.t | |||
should we name them cross and reverse, or x and r? | |||
moritz_ votes for the longer names | |||
colomon | cross and reverse, I'd say | 11:27 | |
pugssvn | r30154 | moritz++ | [t/spec] move some meta operator test files to S03-metaops/ | 11:29 | |
r30155 | moritz++ | [t/spec] also move hyper op tests to S03-metaops | 11:32 | ||
11:46
wknight8111 joined
|
|||
jnthn | o/ | 11:46 | |
phenny | jnthn: 09:38Z <moritz_> tell jnthn that t/spec/S12-class/attributes.t emits some IMCC syntax errors, probably at compile time (but still runs) and passes all but one test - LHF? | ||
colomon | \o | ||
jnthn | moritz_: Ouch. I'll have to hunt that one down. Maybe we need to skip something we todo. :-) | ||
morning, colomon | 11:47 | ||
colomon | I got Rop precedence working late last night, checked it in this morning. | ||
jnthn++ for figuring out how to do it. | |||
jnthn | moritz_: I think I worked out the nqp => Parrot update process, btw. I'll give it a try, and if I don't cause epic fail, I'll document that. | 11:48 | |
colomon | moritz_: do you want me to patch t/spectest.data to match your new layout? | 11:51 | |
11:54
clintongormley joined
|
|||
jnthn | colomon++ # nice! | 11:55 | |
colomon | jnthn: if you look in the backlog, you can see a R... example, TimToady++'s idea. | 11:56 | |
11:56
payload left
|
|||
colomon | I think I just successfully patched my != issue by detecting it in the metaop code and switching it to logical ! == internally. | 11:56 | |
jnthn | OK. | 11:59 | |
There's more tha one way to fix it :-) | |||
colomon | obviously a grammar fix would be more elegant, but this way should work, I think. spectesting now. ;) | ||
12:00
Su-Shee left
|
|||
jnthn | colomon: True, it would be. ;-) | 12:04 | |
moritz_ | colomon: yes, pushing... | ||
dalek | kudo: 6a8049b | moritz++ | t/spectest.data: track name changes of test files |
12:06 | |
kudo: 760b272 | moritz++ | docs/running.pod: [docs] fixed a typo in running.pod reported in <bugzilla.redhat.com/show_bug.cgi?id=574547>, gerd++ |
|||
kudo: 547069d | moritz++ | t/spectest.data: more passing test files |
|||
jnthn | \o/ | 12:08 | |
12:09
Su-Shee joined
|
|||
m6locks | rakudo: my Num $a = 5.22; say $a | 12:15 | |
p6eval | rakudo 6be8f8: OUTPUT«Type check failed for assignmentcurrent instr.: '&die' pc 17127 (src/builtins/Junction.pir:399)» | ||
m6locks | rakudo: my $a = 5.22; say $a.WHAT | ||
p6eval | rakudo 6be8f8: OUTPUT«Rat()» | ||
moritz_ | in ideal Perl 6, you'd constrain $a to Numeric, not Num if you want it to hold any number type | 12:16 | |
m6locks | so Num is not a number? | ||
jnthn | Rakudo only supports unideal Perl 6 so far. :-) | ||
m6locks | rakudo: my Numeric $a = 5.22; say $a | ||
jnthn | m6locks: Num = Floating point number | ||
p6eval | rakudo 6be8f8: OUTPUT«Method 'ACCEPTS' not found for non-objectcurrent instr.: '&infix:<=>' pc 16823 (src/builtins/Junction.pir:228)» | ||
moritz_ | the role Numeric is NYI | 12:17 | |
m6locks | aye, well i guess its not supported then | ||
jnthn | m6locks: But 5.22 is not a floating point number in Perl 6, it's a Rat. | ||
m6locks | oh, how do i make it a Num | ||
when assigning a value like that | |||
moritz_ | with scientific notation, 5.22e0 | ||
or 5.22.Num | |||
m6locks | i'm cool wit Rat too, I just need to change all the Nums to Rats | 12:18 | |
12:25
am0c left
12:29
M_o_C joined
|
|||
colomon | aiiiiiiii! | 12:33 | |
jnthn | O_O | ||
colomon: ? :-) | 12:34 | ||
colomon | > say (10 R... 1, 3) | 12:35 | |
Lexical 'self' not found | |||
that worked fine last night... | |||
jnthn | :-/ | 12:36 | |
colomon | hmmm... that may have been before the Rop overhaul. | ||
jnthn makes the latest | |||
colomon | the actions part of it. | ||
oh, hey, good thinking. | |||
jnthn | (latest from git, that is) | 12:37 | |
Will try it once it's built. :-) | |||
colomon | I think it will work with the latest. | ||
so it's a change I've made and haven't pushed. | |||
jnthn | rakudo: say (10 R... 1, 3) | 12:38 | |
p6eval | rakudo 6be8f8: OUTPUT«13579» | ||
colomon | this damn refactor is going to be the death of me. | ||
jnthn | "Tormenting the implementers" | 12:39 | |
:-) | |||
It's OK, I've felt that way about plenty of Rakudo refactors and I'm still alive. They're rarely fatal. :-) | |||
12:43
iblechbot left
|
|||
jnthn | > say (10 R... 1, 3) | 12:44 | |
13579 | |||
colomon: So certainly something you have locally. | |||
colomon | yup. | 12:45 | |
jnthn | colomon: I can glance over the diff if you like. | ||
colomon | > say reverseargs(&infix:<...>, 10, [1, 3]) | ||
Lexical 'self' not found | |||
our multi sub reverseargs(&op, Mu $a, Mu $b) { | |||
&op($b, $a); | |||
} | |||
actually, can you try just that? | 12:46 | ||
it would help pinpoint if the problem is that or something with != in the series operator. | |||
jnthn | > our multi sub reverseargs(&op, Mu $a, Mu $b) { &op($b, $a); } | 12:47 | |
> say reverseargs(&infix:<...>, 10, [1, 3]) | |||
Lexical 'self' not found | |||
That's enough. | |||
The backtrace is...weird. | 12:48 | ||
colomon | that's a huge help, then! | ||
jnthn++ | |||
jnthn | Oh no, maybe it's not | ||
Is ... implemented using gather/take? | |||
colomon | yes | 12:49 | |
jnthn | OK, it's somewhere within that, it appears... | ||
colomon | what backtrace did you get? | 12:50 | |
jnthn | find_lex $P21399, "self" | 12:51 | |
$P21400 = $P21399."succ"() | |||
That's where it's blowing up | |||
oh | 12:52 | ||
$next = { $.succ }; | |||
In operators.pm, in infix:<...>, line 363 | |||
colomon: note: | 12:54 | ||
> say ([1,3] ... 10) | |||
Lexical 'self' not found | |||
colomon | oh. | ||
moritz_ | wrong invocant | 12:55 | |
jnthn | colomon: I don't know why $.succ and $.pred are being used in a sub though | ||
That can never work. | |||
oh, wait, it's assining a closure... | |||
colomon | that's supposed to be defining a closure | ||
jnthn | But still... | 12:56 | |
It's a closure, not an anonymous method. | |||
Is it just menat to be .succ and .pred? | |||
moritz_ thinks so | |||
colomon | I think maybe it is. | ||
moritz_ spectests without that dollar | |||
colomon | Oh, it's never been called before because there is infix:<...>($lhs, $rhs) | ||
jnthn | colomon: here you go... | 12:57 | |
> our multi sub reverseargs(&op, Mu \$a, Mu \$b) { &op($b, $a); } | |||
> say reverseargs(&infix:<...>, 10, (1,3)) | |||
13579 | |||
colomon | so what we're seeing here is something utterly bizarre. | ||
jnthn | Well, no, it's just that passing an array means you pass a single item, whereas actually what you really have is a parcel | ||
Also, the missing \s meant that context was being enforced by reverseargs | |||
colomon | if there is a single item there (the array), shouldn't it call infix:<...>($lhs, $rhs) ? | 12:58 | |
jnthn | So the the things had already been put into item context by the time we called &infix:<...> so it dispatched differently. | ||
(@lhs is copy, $rhs) is narrower than ($lhs, $rhs) | |||
colomon | rebuilding with \s to see what happens. | 12:59 | |
jnthn | Anyway, I think the \s are what's missing. | ||
13:06
bbkr left
|
|||
colomon | > say 10 R... 1, 3 | 13:13 | |
13579 | |||
I'd say you're right. :) | |||
13:22
masak joined
|
|||
colomon | o/ | 13:22 | |
masak | oh hai, #perl6 | ||
13:24
M_o_C left
|
|||
moritz_ | \o/ it's masak | 13:26 | |
masak | \o/ | ||
13:26
bbkr joined
|
|||
moritz_ | colomon: in radix.t I get a passed TODO, test 78 - I assume on 32 bit that fails? | 13:27 | |
masak enjoys TimToady's "blue sky" email :) | 13:29 | ||
13:29
justatheory joined
|
|||
masak | it's a bit harsh against p6l perhaps, but it's true. | 13:30 | |
13:31
fridim left
|
|||
colomon | moritz_: yes. | 13:31 | |
masak | jnthn: will you help me dust off my awful Russian too? :) | 13:34 | |
he's been standing in a corner for years, collecting all that dust. | |||
13:35
astrojp joined
|
|||
masak | rakudo: "foo:" ~~ / (\S+) ':' / and say "matched $0" | 13:36 | |
p6eval | rakudo 6a8049: ( no output ) | ||
masak | I think that's the (known) 'backtracking inside of capture parens' bug | 13:37 | |
13:40
MOAR-f00li5h left
|
|||
masak | std: 1 [+] [+] 2, 3, 4 | 13:40 | |
13:40
f00li5h joined
|
|||
p6eval | std 30155: OUTPUT«ok 00:01 109m» | 13:40 | |
13:40
f00li5h left,
f00li5h joined,
iblechbot joined
|
|||
masak | yeah, seems I was wrong about the semantics of '1 [+] 2, 3, 4' yesterday. | 13:40 | |
in my defense, it's quite a cute semantics :P | 13:41 | ||
13:41
muixirt joined
|
|||
masak | std: <-> { [[[<=>]]] } | 13:42 | |
p6eval | std 30155: OUTPUT«===SORRY!===Can't reduce with <=> because structural infix operators are diffy and not chaining at /tmp/QT5tXWtCvt line 1:------> <-> { [[[<=>]]]⏏ } expecting prefix_circumfix_meta_operator__S_257reduceFAILED 00:02 107m» | ||
moritz_ | so that's parsed as infix:<[+]> listop:<[+]> ? | 13:43 | |
masak | oh. :) diffy. | ||
bbkr | rakudo: class X { }; class { is X; } #s12 anon class segfaults :( | ||
p6eval | rakudo 6a8049: OUTPUT«Invalid namespace key in set_pmc_keyedcurrent instr.: 'perl6;ClassHOW;new' pc 3749 (src/metamodel/ClassHOW.pir:27)» | ||
masak | bbkr: yes. not yet implemented. | ||
bbkr | thanks | ||
13:46
abra joined
|
|||
colomon | )P"" | 13:47 | |
dalek | kudo: d296602 | (Solomon Foster)++ | src/ (2 files): Reorganization of !op, Rop, Xop, and Zop in preparation for a refactor. |
13:48 | |
kudo: 2067a57 | (Solomon Foster)++ | src/core/metaops.pm: Switch Mu $a to Mu \$a in the notresults and reverseargs functions, as per jnthn++'s advice. |
|||
masak | colomon++ | ||
13:50
synth left,
[synth] left,
synth joined,
[synth] joined
|
|||
moritz_ | rakudo: say [] ~~ [1] | 13:50 | |
p6eval | rakudo 6a8049: OUTPUT«0» | ||
moritz_ | who fixed that? | ||
pugssvn | r30156 | moritz++ | [t/spec] a tiny unfudge for rakudo | 13:51 | |
colomon | is anyone else getting intermittent test failures again? | 13:52 | |
moritz_ | I get an intermittent pasisng TODO in uc.t | ||
and S04-statements/for.t fails reproducible | 13:53 | ||
masak | twitter.com/arafatkamaal/status/10809395431 # strange/funny realization by someone | ||
colomon | I've gotten crashes in uc.t as well. | ||
m6locks | haven't built today | ||
colomon | I'm also getting sometimes failures in S06-signature/named-parameters.t and a consistent failure in S03-operators/precedence.t. | 13:54 | |
If no else is seeing that last one (yet), it may be my fault. Though I really don't know how... | 13:55 | ||
moritz_ | precedence.t is fine here. | 13:56 | |
colomon | have you pulled yet? ;) | ||
moritz_ | no | ||
colomon | that makes it sound more like it might be my fault. :( | ||
moritz_ pulls and re-tests | 13:57 | ||
13:57
justatheory left
|
|||
bbkr | hmm, why this example: "'class X {}; my $x = X; for 1..10000000 { if $_ % 2 {$x .= HOW} else {$x .= WHAT}; }'" is eating the memory? if I call CLASS.HOW.WHAT.HOW.WHAT.HOW.WHAT... it should be constant amount of memory used, because WHAT and HOW methods return the same objects, isn't it? | 13:58 | |
moritz_ | bbkr: even if not, it shouldn't leak memory,because no references to the original objects are being kept | 13:59 | |
bbkr | should i fill rakudobug? | 14:00 | |
moritz_ | so either something is keeping references internally, or parrot's GC is too lazy | ||
bbkr: yes, please | |||
colomon | no | ||
it's happening because for eagerly gets the list to process on. | |||
so it tries to build the 10000000 item list before it starts the loop. | 14:01 | ||
moritz_ | oh | ||
and for can't be lazy until we have sink context, right? | |||
colomon | That's a separate issue, I think. | 14:02 | |
(But then, I admit I don't understand the implementation.) | |||
moritz_ | colomon: with your latest changes, test 20 of precedence.t fails | ||
colomon | moritz_: yeah, that's what I've been seeing too. | ||
moritz_ | nqp: fail('foo') | ||
p6eval | nqp: OUTPUT«Could not find non-existent sub failcurrent instr.: '_block11' pc 0 (EVAL_1:5)» | ||
moritz_ | nqp: fail 'foo' | ||
p6eval | nqp: OUTPUT«Confused at line 1, near "fail 'foo'"current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
colomon | can the brain trust take a look at that one? I don't have a clue, but it must have happened in one of the last two commits.... | 14:03 | |
bbkr | colomon: you're right. it used memory for building list; | 14:04 | |
colomon | as for "for", "map" lets you lazily evaluate its inputs but still eagerly evaluate its results. I don't know why "for" should be any different. But pmichaud actually changed it so "for" eagerly evaluated its inputs, and I'm sure he must have had a good reason. | 14:05 | |
14:05
dalek left
|
|||
colomon | afk # loading boxes of books into the minivan... | 14:05 | |
14:12
dalek joined
|
|||
colomon | why no t/spec/S03-metaops/cross.t? | 14:14 | |
masak | std: 64 R... 1, 2, 4 | ||
p6eval | std 30156: OUTPUT«ok 00:01 108m» | 14:15 | |
colomon | rakudo: say 64 R... 1, 2, 4 | ||
p6eval | rakudo 6a8049: OUTPUT«1248163264» | ||
masak | \o/ | ||
jnthn | masak: You should give your Russian vodka. That'll make everything just fine. | 14:16 | |
masak: Apparently it increases fluency. | |||
;-) | |||
Or at least percieved fluency. | 14:17 | ||
masak | I've actually felt my fluency increase from alcohol. | ||
in that particular case, it was Mandarin. | |||
jnthn | I'm still trying to work out if it's just perception or if it really actually helps. | 14:18 | |
arnsholt | I agree. A bit of alcohol does help you loosen up a bit, I think | ||
14:18
Su-Shee left
|
|||
jnthn | It may just be that you fear getting it a tad wrong less. | 14:18 | |
And Just Say Stuff. And it's mostly good enough. | 14:19 | ||
arnsholt | Without any actual empirical basis, I think it's related to the loss of inhibition that comes with alcohol | ||
masak | jnthn: yeah. | ||
jnthn | Of course, I guess this only works up to a point. | ||
:-) | |||
arnsholt | Yeah, eventually the loss of brain catches up with you =) | ||
masak | aye. inhibition is a necessary part of communication to some extent. :) | ||
colomon | I've heard trad musicians say the same thing about drink increasing fluency... | 14:21 | |
masak | aww, I missed tonight's troll. :/ | ||
who would have thought that a person called 'necrocow' would be so hostile? :P | |||
jnthn | masak: Maybe you'll get to C him again. | 14:22 | |
masak | apparently he was very familiar with what '*plonk*' means, at least. I wasn't. | ||
jnthn: :) | |||
necrocow! come back and tell us more about compilers! :) | 14:23 | ||
pugssvn | r30157 | colomon++ | Move cross.t to S03-metaops too. | ||
colomon | Yes, and he can spend more time telling TimToady how Perl 5 works. | ||
jnthn | Clearly writing compilers in a language that we can all be more productive in is the wrong way to do it. | ||
:-) | 14:24 | ||
arnsholt | The troll is always right, you know =) | 14:25 | |
colomon | masak: as for knowing what *plonk* means, apparently you don't spend much time behaving in a fashion to get yourself kicked out of chats... | 14:26 | |
jnthn | lol...searching Google for "plonk irc" to try and get insight is amusing. | 14:27 | |
arnsholt | nqp: my @a = (); say @a.WHAT; | 14:29 | |
p6eval | nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 1, near " (); say @"current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
arnsholt | nqp: my @a := (); say @a.WHAT; | ||
p6eval | nqp: OUTPUT«Confused at line 1, near "say @a.WHA"current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
jnthn | no listops, use parens with say | 14:30 | |
arnsholt | nqp: my @a := (); say(@a.WHAT); | ||
p6eval | nqp: OUTPUT«Method 'WHAT' not found for invocant of class 'ResizablePMCArray'current instr.: '_block11' pc 0 (EVAL_1:6)» | ||
arnsholt | Not what I intended, but it did tell me what I wanted ^^ | 14:31 | |
masak | colomon: no, to be honest I haven't (and wouldn't consider trying). I guess I used to be more of a groupie on #perl6, before I found my slots of productivity. but never outright maladjusted. | ||
arnsholt | nqp: my @a := (); @a.push(1); say(@a); | 14:32 | |
p6eval | nqp: OUTPUT«1» | ||
arnsholt | nqp: my @a := (); @a.push: 1; say(@a); | ||
p6eval | nqp: OUTPUT«1» | ||
14:36
mdxi_ joined
|
|||
arnsholt | nqp: my @a; sub b($x) { @a.push: $x; }; sub a() { @a := (); b("foo"); say(@a); } | 14:36 | |
p6eval | nqp: ( no output ) | ||
arnsholt | nqp: my @a; sub b($x) { @a.push: $x; }; sub a() { @a := (); b("foo"); say(@a); } a(); | ||
p6eval | nqp: OUTPUT«Confused at line 1, near "sub a() { "current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
arnsholt | nqp: my @a; sub b($x) { @a.push: $x; }; sub a() { @a := (); b("foo"); say(@a); }; a(); | ||
p6eval | nqp: OUTPUT«1» | ||
arnsholt | nqp: my @a := (); @a.push: 1; @a.push: 2; say(@a); | ||
p6eval | nqp: OUTPUT«2» | ||
mathw | Hello | 14:39 | |
arnsholt | nqp: my @a; sub b($x) { @a.push: $x; }; sub a() { @a := (); b("foo"); }; a(); say(@a); | ||
p6eval | nqp: OUTPUT«1» | ||
masak | mathw! | ||
mathw | masak! | ||
colomon | o/ | ||
14:40
christine joined
|
|||
mathw | guess what masak | 14:40 | |
I still can't use the Esperanto direct object properly | |||
masak | mathw: it's only been, what, a month or two? | 14:41 | |
mathw | true | ||
masak | are you expecting a miracle? :P | ||
mathw | not really | ||
arnsholt | nqp: my @a := (); @a.push: 1; @a.push: 2; say(|@a); | ||
p6eval | nqp: OUTPUT«12» | ||
mathw | I just get embarrassed when I forget to even think abou tit | ||
masak | that's the only really heavy point of Esperanto grammar. it takes time. | ||
trust me, in seven-eight years it'll be second nature to you :P | 14:42 | ||
mathw | hopefully | ||
14:42
wknight8111 left
|
|||
mathw | how are my named enums coming along? :) | 14:42 | |
masak | mathw: I'm free this afternoon, wanna help me finish them up? :) | 14:43 | |
mathw | I'd love to | ||
masak | \o/ | ||
mathw | although I'm not sure if you can expect much in the way of 'help' | ||
masak pushes the branch of the progress so far | |||
jnthn is around to offer moral (and if needed technical) support for named enums too :-) | |||
mathw | \o/ | ||
masak | hold on, gotta rebase and stuff. | 14:44 | |
colomon | come on, spectest, faster, faster! | ||
masak | mathw: github.com/rakudo/rakudo/tree/named-enums | 14:45 | |
mathw | ooh fancy you | ||
a branch in rakudo's own repo :P | |||
masak | mathw: pull that and build, and then try something like 'enum A <b c d>' | ||
mathw: it's only for today, until we make this work :) | 14:46 | ||
mathw builds | |||
masak too | |||
14:47
dalek left
14:50
dalek joined
|
|||
mathw | masak: it accepts "enum A <b c d>" but not anything I might try to do with it after that | 14:53 | |
which bits of code are we going to be concerned with | 14:54 | ||
masak | what's the error message? | ||
mathw | ./perl6 -e "enum A <b c d>; say A::b.WHAT;" | ||
Null PMC access in invoke() | |||
current instr.: '_block14' pc 29 (EVAL_1:0) | |||
called from Sub '!UNIT_START' pc 1299 (src/glue/run.pir:23) | |||
called from Sub 'perl6;PCT;HLLCompiler;eval' pc -1 ((unknown file):-1) | |||
dalek | kudo: a61c40c | (Solomon Foster)++ | src/Perl6/Actions.pm: infix_prefix_meta_operator refactor! |
||
mathw | called from Sub 'perl6;PCT;HLLCompiler;command_line' pc 1489 (compilers/pct/src/PCT/HLLCompiler.pir:794) | ||
called from Sub 'perl6;Perl6;Compiler;main' pc -1 ((unknown file):-1) | |||
masak | hm. | 14:55 | |
my build isn't finished quite yet. | |||
but take a look at the partial commit with 'git show' in the meantime. | |||
14:55
am0c joined
|
|||
jnthn files NPMCA Rakudo bug | 14:56 | ||
oh, wait.. | |||
:-) | |||
moritz_ | did you mean: masakbug? :-) | ||
arnsholt | nqp: my @paths; sub choose(*@x) { my $v := @x.shift; @paths.push: "dummy"; return $v; }; sub blob() { say(choose("a", "b", "c")); }; blob(); | ||
p6eval | nqp: OUTPUT«a» | ||
arnsholt | ARG! | ||
masak | aaah. the Rakudo build ran much smoother after I killed Firefox :) | ||
I thought that might be it. | 14:57 | ||
mathw | masak: my git-fu fails at this task | ||
jnthn | masak: Yeah, it sucks how firefox gets like that when you have 5 or 6 tabs open. ;-0 | ||
masak | mathw: just typing 'git show' should be enough. | ||
jnthn: no, that's my two other browsers. :) | 14:58 | ||
mathw | no, git show declares that I merged branch 'master' | ||
moritz_ | git show HEAD~2 # try this one | ||
masak | mathw: oh, did you pull the named-enums branch into master? :/ | 14:59 | |
mathw | I didn't try to | ||
I don't grok git branching, really | |||
masak | I know the feeling. | ||
mathw | but my git thinks I'm on that branch | ||
masak | it's ok. you'll probably need to back out somehow when you decide you're done with this experiment. but that's all. | 15:00 | |
perhaps a 'git pull --force origin master' will be enough. | |||
mathw | bah | 15:01 | |
mathw starts again | |||
I really need to learn how to use git properly one day | |||
jnthn | Same :) | 15:02 | |
With time, I see to screw it up less though. :-) | |||
15:03
tylerni7 joined
|
|||
masak | mathw: starting again would be 'git checkout -b named-enums origin/named-enums'. | 15:03 | |
mathw | Why is it that I only ever seem to have one USB cable? | 15:04 | |
Almost every gadget I own came with one | |||
yet I can find only one | |||
back shortly... | 15:05 | ||
colomon | 28401 passing tests here, BTW. | 15:10 | |
moritz_ | wow | 15:11 | |
masak | \o/ | 15:12 | |
jnthn tries to remember what the peak was with alpha | 15:14 | ||
moritz_ | 35k? | ||
pugssvn | r30158 | moritz++ | [t/spec] now that complex and Rat literals are gone, remove them from S02-literals/numeric.t; this makes the test file rather pointless, but maybe some brave sould will add tests for <2+3i> or so in future | 15:17 | |
m6locks | rat is gone? | 15:18 | |
i just switched all my nums to rat :D | |||
oh well | 15:19 | ||
jnthn | m6locks: No, not in that sense. | 15:20 | |
masak | mathw: I'll be back in a while too. need to pull the ethernet cord while Firefox boots back up. | ||
jnthn | moritz_: I don't think we were passing 35k? | ||
15:20
masak left
|
|||
colomon | m6locks: it used to be that, say 3 / 4 was processed as one number by the grammar. | 15:21 | |
moritz_ | actually only 3/4 (without the spaces) | ||
colomon | m6locks: now it's just the integer 3 divided by the integer 4, which creates the Rat. | ||
m6locks | oh ok | ||
moritz_ | so 1/2 ** 4 was parsed as (1/2) ** 4, not as 1/(2**4) | ||
colomon | and 1/7/7/7/7 was just a nightmare. | ||
moritz_ | jnthn: you're right, it was only 32.7k :-) | 15:22 | |
m6locks | rakudo: say (5.42).WHAT | ||
p6eval | rakudo a61c40: OUTPUT«Rat()» | ||
colomon | no way, we've got 7/8ths of the tests back now?! | ||
jnthn | 4.3k-ish to go then. | ||
We've still got a bunch of S05-mass/*.t | |||
moritz_ | hash slices | 15:24 | |
jnthn | Oh. Those. | 15:25 | |
Yes. | |||
mathw | \o/ | 15:26 | |
mathw has masak's partial commit, but no masak | |||
moritz_ | currently I'm inclined to remove the fatal 'Use of type object as a value' in the vtables in Mu | ||
jnthn | moritz_: Maybe it should be demoted to a warning. | 15:27 | |
moritz_ | IMHO failing hard on something that's supposed to fail softly is wronger than not failing at all | ||
arnsholt | nqp: say("{3}".WHAT) | 15:29 | |
p6eval | nqp: OUTPUT«Method 'WHAT' not found for invocant of class 'String'current instr.: '_block11' pc 0 (EVAL_1:6)» | ||
moritz_ | jnthn: warning is good, yes | ||
15:31
wallberg joined
|
|||
jnthn | arnsholt: don't expect NQP to handle .WHAT too well in general. | 15:31 | |
15:38
masak joined
|
|||
masak | mathw: back again :) | 15:39 | |
mathw: while I was offline, I did some further experiments with the patch. | |||
mathw | ahah | ||
well I've got the thing up on my screen now | |||
although it's still tryin gto compile it :) | |||
masak | mathw: have a look at src/glue/enumeration.pm | 15:40 | |
there's a sub there with a few things commented out. | |||
that's the one we want to get right for named enums to work. | |||
jnthn++ for all the help so far. | |||
mathw | I've got a sub with one line commented out... | 15:41 | |
masak | ok. | ||
I put a 'say' statement at the top, and it actually gets called. | 15:42 | ||
right now I'm rebuilding with an added argument: the scope in which the enum is to be installed. | 15:43 | ||
it's in that area that my knowledge is a bit weak. | |||
mathw | hmm | 15:44 | |
my build's blowing up now | |||
masak | apparently, the thing to send in on the Actions side is PAST::Op.new( :pirop('get_namespace P') ) | ||
mathw | ah I know why | ||
arnsholt | I think I'm trying to be to clever for my own good ^^ | 15:45 | |
masak | jnthn: it's now a fact. the PAST::Op.new( :pirop('get_namespace P') ) argument is the one that causes the CREATE_NAMED_ENUMERATION to blow up. :/ | 15:46 | |
arnsholt | jnthn: Yeah, I sort of guessed. But it does give me the type of the object, even if it's not quite what it's supposed to do =) | ||
jnthn | masak: What do you do with it? :-) | ||
Or is it merely passing it that causes that? | |||
masak | jnthn: the latter. | ||
mathw | oooh dear | 15:47 | |
core dump on build | |||
jnthn | What's the signature? | ||
masak | jnthn: want me to push a state where it blows up? | ||
jnthn | Can do | 15:48 | |
masak | jnthn: github.com/rakudo/rakudo/commit/d26...27bc0023f2 | ||
arnsholt | nqp: my $s := sub { return "foo" }; my $a := $s(); say $a; | 15:49 | |
p6eval | nqp: OUTPUT«Routine declaration requires a signature at line 1, near "{ return \""current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
arnsholt | nqp: my $s := sub() { return "foo" }; my $a := $s(); say $a; | 15:50 | |
p6eval | nqp: OUTPUT«Confused at line 1, near "say $a;"current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
arnsholt | nqp: my $s := -> { return "foo" }; my $a := $s(); say $a; | ||
p6eval | nqp: OUTPUT«Missing block at line 1, near "-> { retur"current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
arnsholt | nqp: my $s := -> { return "foo"; }; my $a := $s(); say $a; | ||
p6eval | nqp: OUTPUT«Missing block at line 1, near "-> { retur"current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
arnsholt | nqp: my $s := -> $x { return "x: " ~ $x; }; my $a := $s("foo"); say $a; | 15:51 | |
p6eval | nqp: OUTPUT«Confused at line 1, near "say $a;"current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)» | ||
arnsholt | nqp: my $s := -> $x { return "x: " ~ $x; }; my $a := $s("foo"); say($a); | ||
p6eval | nqp: OUTPUT«No exception handler and no messagecurrent instr.: '_block15' pc 51 (EVAL_1:0)» | ||
arnsholt | Anyone more experienced than me have any suggestions on how to do this? | 15:52 | |
masak | arnsholt: in Perl 6, that's actually correct. | ||
arnsholt | That's good at least | ||
masak | arnsholt: a pointy block isn't "advanced" enough to return from. | 15:53 | |
only subs, methods and submethods are. | |||
arnsholt | nqp: my $s := -> $x { say("Alive: " ~ $x); }; $s("foo"); say("Alive"); | 15:54 | |
p6eval | nqp: OUTPUT«Alive: fooAlive» | ||
arnsholt | nqp: my $s := -> $x { say("Alive: " ~ $x); }; my $a := $s("foo"); say("Alive: " ~ $a); | ||
p6eval | nqp: OUTPUT«Alive: fooAlive: 1» | ||
arnsholt | masak: Thanks! | ||
masak | no problem. :) | ||
arnsholt | I don't really need the return value, but I do need an anonymous sub and then invoke it | 15:55 | |
mathw | okay, I think I'm finally in roughly the same place as masak | ||
masak | jnthn: any thoughts? | ||
arnsholt | Hang on, I may actually want a return value | ||
mathw | arnsholt: use sub {} then | ||
masak | arnsholt: 'return value' and 'returning early' are different things. | ||
arnsholt | Oooooh, right | 15:56 | |
nqp: my $s := -> $x { say("Alive: " ~ $x); undef }; my $a := $s("foo"); say("Alive: " ~ $a); | |||
p6eval | nqp: OUTPUT«Alive: fooNull PMC access in get_string()current instr.: '_block11' pc 0 (EVAL_1:5)» | ||
mathw | yes, pointy blocks can't catch return exceptions, but subs can | ||
masak | nqpbug! :) | ||
arnsholt | I think I'll go with a sub (if I can get it to work), as I'm gonna stick some inline PIR and stuff in there as well | 15:57 | |
jnthn | masak: You're taking it as a scalar which should be fine... | ||
masak | jnthn: this is where I got stuck during the hackathon. it looks like it should work. | ||
and we want to do something very much like this. | |||
jnthn | Aye. | ||
arnsholt | nqp: my $s := sub () { say "Hello!"; return "pong"; }; my $a := $s(); say($a); | 15:58 | |
p6eval | nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1664 (src/Regex/Cursor-builtins.pir:179)» | ||
jnthn | masak: I'm curious what it's trying to invoke. | ||
masak | yeah. no idea. | 15:59 | |
possibly the sub itself, but then again maybe not. | |||
jnthn | Yeah, put passing an extra param shouldn't make the sub unfindable... | 16:00 | |
*but | |||
arnsholt | nqp: my $s := sub($x) { say "Hello!"; return "pong"; }; my $a := $s(); say($a); | ||
p6eval | nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1664 (src/Regex/Cursor-builtins.pir:179)» | ||
jnthn | masak: Maybe I should grab the branch... | ||
16:00
dual left
|
|||
masak | jnthn: I think we'll need the help, to be honest... :) | 16:00 | |
mathw | I have simply no idea | 16:01 | |
at the moment I get this | |||
./perl6 -e "enum A <a b c d>" | |||
Not enough positional parameters passed; got 2 but expected 3 | |||
current instr.: 'CREATE_NAMED_ENUMERATION' pc 307701 (src/gen/core.pir:20547) | |||
arnsholt | Bah. I don't think NQP likes me | ||
masak | mathw: aye, me too. | ||
mathw | thus, your last commit is an attempt to get that third paramet | ||
+er | |||
arnsholt | nqp: my $s := sub foo($x) { say "Hello!"; return "pong"; }; my $a := $s(); say($a); | ||
p6eval | nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1664 (src/Regex/Cursor-builtins.pir:179)» | ||
masak | it's also a bit mystifying that it worked previously, when we only had two arguments and still three parameters. | 16:02 | |
I mean, when we did that, the sub got successfully called. | |||
right now, I'm trying to add a fourth parameter to see if three arguments can call that sub :) | 16:03 | ||
mathw | I'm trying to comprehend what's going on in that action method | 16:04 | |
arnsholt | nqp: my $s := sub foo ( ) { say "Hello!"; return "pong"; }; my $a := $s(); say($a); | ||
p6eval | nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1664 (src/Regex/Cursor-builtins.pir:179)» | ||
masak | mathw: maybe I can help with that. | ||
mathw: the outermost 'if' checks if we got a name when parsing. | |||
mathw: the 'else' clause of that 'if' actually works :) | 16:05 | ||
mathw: (and it just calls a sub that returns an EnumMap) | |||
16:05
iblechbot left
|
|||
mathw | I assume something else knows what to do with that | 16:05 | |
masak | mathw: well, it's a real Perl 6 object. | ||
jnthn | nqp: my $s := sub foo ( ) { say("Hello!"); return "pong"; }; my $a := $s(); say($a); | 16:06 | |
p6eval | nqp: OUTPUT«Hello!pong» | ||
jnthn | arnsholt: ^ | ||
masak | rakudo: say (enum <a b c d>).values.perl | ||
p6eval | rakudo a61c40: OUTPUT«MapIterator.new()» | ||
masak | (grrr) | ||
rakudo: say (enum <a b c d>).values | |||
p6eval | rakudo a61c40: OUTPUT«0123» | ||
masak | rakudo: say (enum <a b c d>).keys | ||
p6eval | rakudo a61c40: OUTPUT«abcd» | ||
arnsholt | jnthn: Duh. Parens around the say >.< | ||
masak | rakudo: say (enum <a b c d>).WHAT | ||
p6eval | rakudo a61c40: OUTPUT«EnumMap()» | ||
mathw | ah of course | ||
jnthn | rakudo: say (enum <a b c d>).kv | ||
p6eval | rakudo a61c40: OUTPUT«d3a0b1c2» | ||
mathw | so what's the named enum maker trying to do | ||
it does some dancing around to get the EnumMap | 16:07 | ||
which I don't really understand | |||
masak | mathw: right. it starts by getting the EnumMap to get the names of the keys. | ||
mathw: then it does something to add those keys to a namespace, like A::a, A::b, etc. | |||
jnthn | moritz_: If you're able to build Parrot with ICU, you may find that some of the S05-mass/*.t actually work. | 16:08 | |
masak | mathw: finally, it installs a piece of code to be executed at loading of the script. | ||
jnthn | moritz_: I think pmichaud++ did add back \c[...] | ||
masak | mathw: that's the call to CREATE_NAMED_ENUMERATION. that's the one that's failing right now, in some way. | ||
16:08
rv2733 left
|
|||
mathw | I don't understand where @BLOCK comes from | 16:09 | |
masak | mathw: note the 'our @BLOCK'. | 16:10 | |
mathw: that means it's defined elsewhere and we simply get access to it from this method. | |||
mathw | yes, I know that | ||
but what is it | 16:11 | ||
masak | no idea. :) | ||
it's defined at the top of Actions.pm. | |||
I guess it holds all the blocks that are eventually serialized to PIR. | |||
or something. | |||
jnthn | masak: building | 16:12 | |
masak | nope, the combination of three arguments and four parameters didn't help :) | 16:13 | |
so everything points to PAST::Op.new( :pirop('get_namespace P') ) causing the error in some way. | |||
16:14
pmurias joined
|
|||
mathw | what is get_namespace P intended to do? | 16:14 | |
masak | get the current namespace, the one we want to install A into. | 16:15 | |
Trashlord | hey guys | ||
masak | Trashlord: hi! o/ | 16:16 | |
pmurias | hi | ||
Trashlord | how's it going? | ||
mathw | I'll let jnthn worry about if that's right | ||
masak | Trashlord: we're trying to get named enums working :) | 16:17 | |
mathw examines CREATE_NAMED_ENUMERATION | |||
Trashlord | ahg | ||
-g | |||
mathw | so you pass the name of the enum, the EnumMap and the scope to install it into | ||
masak | Trashlord: no, it's really more 'ahg' right now :P | ||
mathw | however that is eventually achieved :) | ||
Trashlord | haha | 16:18 | |
masak | mathw: it seems that installing is achieved through hash accesses. | ||
mathw | then you go over each value, mix EnumMixin into it | ||
masak | which is very nice. a namespace is a bit like a Hash. | ||
mathw | which is an empty role | ||
or is possibly defined elsewhere | |||
masak | no, it's defined above. | ||
and it's empty right now. | |||
(because I wanted to get this to work first) | |||
mathw | then you stick it into the outer scope under the key name | 16:19 | |
or, when it's not commented out and wrong, that is | |||
masak | nod. | ||
mathw | and then you install the enumeration itself | ||
and presumably that class will also be filled out | |||
masak | aye. | ||
mathw | what needs to go in those | 16:20 | |
masak | I'm not 100% sure yet. | ||
but S12 goes into enough detail. | |||
std: Enumeration | |||
p6eval | std 30158: OUTPUT«Undeclared name: 'Enumeration' used at line 1ok 00:01 107m» | 16:21 | |
lue | ohai masak, mathw, Trashlord, and friends o/ | 16:22 | |
masak | lue: \o | 16:23 | |
lue | Now to fix the adverb form of base conversion :) | ||
Trashlord | sup | ||
masak | lue: planning to attack RT again today? I liked the way you found a closeable yesterday :) | ||
lue | masak: did you see my stupendous results with the radcalc function? | ||
masak | lue: no, I must have missed that. | 16:24 | |
lue | I will, in addition to fixing the :16<> type base conversions. (when I has permissions to close bugs that is...) | ||
masak | lue: until you have permission, just task someone who does with closing the ticket. they'll often happily oblige :) | 16:26 | |
16:26
hercynium left
|
|||
lue | Alright (still trying to find the failure in the adverbs...) | 16:27 | |
16:28
Psyche^ joined
|
|||
mathw is reading S12 and getting an idea of what needs to go in EnumMixin | 16:28 | ||
although I need to check on what the anon enum creator's doing | 16:29 | ||
masak | mathw: it's in src/glue/enum.pir. it just builds an EnumMap. | 16:30 | |
16:30
Patterner left,
Psyche^ is now known as Patterner
|
|||
lue | what do $< [name here] > mean/do (including the angle brackets) ? | 16:30 | |
mathw | rakudo: my $e = enum <a b c>; a.WHAT.say; | 16:31 | |
p6eval | rakudo a61c40: OUTPUT«Could not find non-existent sub &acurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
masak | lue: it's short for $/< [name here] > | ||
mathw | doh | ||
masak | lue: that's a hash lookup into $/. | ||
mathw | wake up | ||
masak | mathw: right. an anon enum doesn't install anything. | ||
mathw: it's literally just an EnumMap object. | |||
mathw | yeah | 16:32 | |
anyway, what I'm thinking about is, once things do install | |||
S12 says that if you define an enum Day <Mon Tue> etc, then Mon.WHAT should say 'Day' | |||
jnthn | back, sorry | ||
phone | |||
masak | jnthn: it's ok. we held back all brilliant ideas for how to solve this until you were back. :P | 16:33 | |
lue | And what does $/ hold, I wonder... | ||
mathw | lue: the current match object | ||
jnthn | masak: Hmm. It makes it to CREATE_NAMED_ENUMERATION but may be dying in signature binding. :-/ | 16:34 | |
masak | lue: may I recommend S05 as reading at this point? | ||
jnthn: sounds very reasonable. | |||
jnthn | rakudo: pir::get_namespace__P() | ||
p6eval | rakudo a61c40: ( no output ) | ||
jnthn | rakudo: my $x = pir::get_namespace__P(); say $x; | ||
p6eval | rakudo a61c40: OUTPUT«perl6» | ||
lue | (I broke radcalc in coding radcalc I believe, back to look (stupid PIR...)) :) | ||
jnthn | rakudo: my $x = pir::get_namespace__P(); say $x<IO>; | ||
p6eval | rakudo a61c40: OUTPUT«2» | ||
jnthn | rakudo: my $x = pir::get_namespace__P(); $x<&lol> = sub { say "rofl" }; lol; | 16:36 | |
p6eval | rakudo a61c40: OUTPUT«Cannot assign to readonly valuecurrent instr.: '&die' pc 17127 (src/builtins/Junction.pir:399)» | ||
lue | rakudo: Q:PIR{if 1==1 and 2==2 goto winsay "boo"win:say "yay"} | ||
p6eval | rakudo a61c40: OUTPUT«error:imcc:syntax error, unexpected PARROT_OP, expecting GOTO ('and') in file 'EVAL_1' line 64booyay» | ||
mathw | masak: what I'm thinking is that I don't think using a mixin role can achieve S12's semantics for the enum values | ||
lue | sigh, I guess you can't do that either :/ | ||
mathw | err | ||
keys | |||
jnthn | rakudo: my $x = CREATE_HASH_LOW_LEVEL(pir::get_namespace__P()); $x<&lol> = sub { say "rofl" }; lol; | ||
p6eval | rakudo a61c40: OUTPUT«Invalid namespace key in set_pmc_keyedcurrent instr.: 'perl6;Proxy;!STORE' pc 14414 (src/builtins/Associative.pir:22)» | ||
masak | mathw: ok. | ||
mathw | err | ||
I've confused myself now | |||
16:37
yves joined
|
|||
jnthn | rakudo: my $x = CREATE_HASH_LOW_LEVEL(pir::get_namespace__P()); say $x<IO>; | 16:37 | |
p6eval | rakudo a61c40: OUTPUT«2» | ||
jnthn | rakudo: my $x = CREATE_HASH_LOW_LEVEL(pir::get_namespace__P()); say $x<lolnotexisting>; | ||
p6eval | rakudo a61c40: OUTPUT«» | ||
jnthn | Hmm. | ||
mathw | masak: the thing that makes me think this is that enum Day <Mon>; Mon.What eq "Day"; Mon ~~ Int; Mon.perl eq "Day::Mon"; Mon.key eq "Mon"; | 16:38 | |
I'm mostly just guessing, but I think it might be necessary to construct a new type at this point | 16:39 | ||
jnthn | masak: Hmm. Treating Parrot namespaces as hashes is...not working out quite as I hoped it may. | 16:40 | |
masak | jnthn: what do you propose we do? | ||
m6locks | rakudo: my @eSa = 1.08635005541779435134e02, 6.57024977031928170135e00; | 16:41 | |
p6eval | rakudo a61c40: OUTPUT«Multiple Dispatch: No suitable candidate found for 'multiply_float', with signature 'PNP->P'current instr.: 'perl6;Perl6;Actions;_block6075' pc 227527 (src/gen/perl6-actions.pir:12321)» | ||
jnthn | Burn an effigy of Parrot for not coping with subclasses of String, maybe. | ||
lue | I know what I did rong :) [compiling...] | ||
mathw | port Rakudo to the .NET DLR :P | ||
m6locks | what's with that multiple dispatch | ||
jnthn | mathw: Oh boy can I not wait to start on the .Net backend. | ||
mathw: But Rakudo * first. | |||
TimToady | if parrot would just give us compact arrays of native ints, we could do the rest of strings ourselves | ||
m6locks | i want my numbers accurate ;___; | 16:42 | |
mathw | TimToady: I loved your message on p6l. | ||
jnthn | TimToady: Apart from the bit of code I just discovered...will only work if passed a *Parrot* string. | ||
*sigh* | |||
masak: This means that writing this stuff in Perl 6 is going to be...tricky...until I can work out some solution. | 16:43 | ||
masak | jnthn: no wonder it felt tricky! :P | ||
jnthn | masak: Sorry. :-( | ||
masak: I...didn't expect the NameSpace PMC to contain...this... :-/ | |||
masak | jnthn: don't be. it was my idea to try to implement named enums. | ||
m6locks | rakudo: my @eSa = 108.635005541779435134, 6.57024977031928170135; | ||
p6eval | rakudo a61c40: OUTPUT«PAST::Compiler can't compile node of type BigIntcurrent instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)» | ||
masak | jnthn: I still would really like to see us implement large parts of the enum spec for R*. | 16:44 | |
jnthn | masak: Me too. | ||
masak: I'm afraid you've just hit on something I'm actually going to have to think about though. :-( | |||
masak | mathw: seems your best option for Form.pm in the short term is to do what I do: run off alpha for the time being. | ||
jnthn | Rather than having an instant answer for. | ||
masak | jnthn: it's ok. | 16:45 | |
jnthn | mathw: What bits of named enums are you using? | ||
mathw: Are you essentially just using them as constants? | |||
mathw | jnthn: yes | ||
jnthn | Or do you rely on .pick and all that fancy? | ||
masak: Maybe we could as a stop gap literally compile enums to something like: | 16:46 | ||
enum A <a b c>; => module A { constant a = 1; constant b = 2; constant c = 3; } | |||
Or some such | |||
masak | jnthn: that would be better than nothing, methinks. | ||
jnthn | Yeah | ||
Just build up a PAST tree that does it. | 16:47 | ||
lue | colomon told me to run make [spectest file here] to run certain spectests :) | ||
masak tries that | |||
jnthn | It's Not Good and very temporary | ||
colomon | alpha: my @a; say (1, 2, 3) >>+>> @a | ||
jnthn | But it's better than nothing. | ||
mathw | it would cover my use case :) | ||
jnthn | And should unblock mathw++ | ||
lue | (for the record, this is the only method that's worked for me) | ||
masak | aye. | ||
p6eval | alpha 30e0ed: OUTPUT«Use of uninitialized valueUse of uninitialized valueUse of uninitialized value123» | ||
jnthn | colomon: Wow! | ||
colomon | that's alpha. | 16:48 | |
jnthn | colomon: Er. I think alpha had that wrong. ;-) | ||
Plz to doing better in alpha. :-) | |||
colomon | what should it do, though? | ||
jnthn | Oh, for empty? | ||
Oh hmm | |||
colomon | (I've got the guts of hyper torn up at the moment...) | ||
jnthn | There isn't a last element to use I guess. :-/ | ||
jnthn checks So3 | 16:49 | ||
lue | I guess I should add support for things like :10('0b1092') #despite it being marked todo in the spectest | 16:50 | |
jnthn | colomon: Hmm...I don't see a clear answer in the spectests akshually. | 16:51 | |
mathw | S03 is also fuzzy on it | ||
it talks about too-short on the pointy end, not empty | 16:52 | ||
jnthn | Yeah | ||
You can't duplicate a non-existent last element. :-) | |||
mathw | and the too-short extension case is clearly nonapplicable to the empty list | ||
thus I propose that this should cause the compiler to replace one work-related file on the user's computer with a lolcat | 16:53 | ||
lue | rakudo: say :16<'0o10'> # should be 8 | ||
p6eval | rakudo a61c40: OUTPUT«Malformed radix number at line 11, near "<'0o10'> #"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
jnthn | mathw: Well, if TimToady++ will spec it that way, wfm. | ||
;-) | |||
mathw | :P | 16:54 | |
jnthn | colomon: Maybe alpha's response isn't so insane after all in some senses, but we really only want such a warning once, if at all. :-) | ||
masak | hm. if I do decide to go to NPW on Iceland, I'll submit a talk and call it "Perl 6: Prince of Parsia" :) | 16:55 | |
jnthn | oh my. | ||
masak | or, 'Parsea", p'haps. | ||
then I can lecture with a towel wound around my head! :D | |||
mathw | \o/ | 16:56 | |
man | |||
jnthn | :-D | ||
mathw | I wonder if I can get a grant to go, on the grounds that missing such a sight would be the end of my ability to enjoy life | ||
mathw writes to the NHS | 16:57 | ||
masak | mathw: there'll probably be photos... | ||
16:57
diakopter joined
|
|||
jnthn | probably. ;-) | 16:57 | |
mathw | masak: but I have to see it in 3D super-HD with a free-roaming viewpoint | ||
lue | mathw: Try the IMU. They were able to swindle some cash with Hypercalculus, last I hear. | ||
16:58
Lorn_ left
17:00
dual joined
|
|||
lue working on RT while figuring out how to complete the radcalc function | 17:03 | ||
rakudo: sub x{};sub x{1};say x | |||
p6eval | rakudo a61c40: OUTPUT«Null PMC access in type()current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
lue | rakudo: sub x{};sub x{1};say x; say "It didn't die, just warned us!" | 17:04 | |
p6eval | rakudo a61c40: OUTPUT«Null PMC access in type()current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
lue | rakudo: class A { my $.x = 7; say $.x } | ||
p6eval | rakudo a61c40: OUTPUT«Lexical 'self' not foundcurrent instr.: 'perl6;A;_block45' pc 303 (EVAL_1:136)» | ||
lue | hey, it doesn't cause a parrot segfault anymore (it seems), so would #57882 be considered closed? | 17:06 | |
masak looks | |||
colomon | > say (1..5) >>+>> 1 | 17:07 | |
23456 | |||
> say (1..5) >>+>> (1,2) | |||
24567 | |||
17:07
Maddingu1 joined
|
|||
masak | lue: seems the segfault is only half of it. | 17:08 | |
lue: I don't remember if this was ever discussed on p6l, and if so what the conclusion was. | |||
masak tries to dig up a p6l thread | |||
lue | alright, just checking (due to my sometimes very literal nature. The bug sent in was a segfault, not a failure in general. :) ) | ||
moritz_ | if it was discussed on p6l, there was likely no conclusion :-) | ||
lue | Would it be wise for me to join p6l? #prediction: yes | 17:09 | |
moritz_ doesn't feel wise enough to assess wisdom | |||
std: /<foo::bar>/ | 17:10 | ||
p6eval | std 30158: OUTPUT«ok 00:01 108m» | ||
moritz_ | rakudo doesn't parse this => lots of fallout in regex tests | 17:11 | |
lots of other regex tests blow up because rakudo doesn't allow named regexes outside a grammar | |||
masak | lue: here: www.mail-archive.com/perl6-language...29047.html | 17:12 | |
lue: would also be interesting to hear what jnthn has to say about it. | |||
colomon | rakudo: say &infix:<+>() | ||
p6eval | rakudo a61c40: OUTPUT«No applicable candidates found to dispatch to for 'infix:<+>'. Available candidates are::(!whatever_dispatch_helper , !whatever_dispatch_helper ):(Int $a, Int $b):(Rat $a, Rat $b):(Rat $a, Int $b):(Int $a, Rat $b):(Complex $a, Complex $b):(!whatever_dispatch_helper , | ||
..Any $rh… | |||
moritz_ | colomon: we need those for [+] of 0-item list, right? | 17:13 | |
lue | rakudo: jnthn.say(jnthn.thoughts) | 17:14 | |
p6eval | rakudo a61c40: OUTPUT«Could not find non-existent sub &jnthncurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
colomon | moritz_: right | ||
lue | I'll leave it open then :) | 17:15 | |
17:17
p6eval left,
p6eval joined
|
|||
diakopter | perlito: say 'O HAI' | 17:18 | |
p6eval | perlito: OUTPUT«O HAI» | ||
diakopter | (it's the perl5 backend) | 17:19 | |
masak | \o/ | ||
diakopter++ | |||
fglock++ | 17:20 | ||
perlito: say [+] 1..5 | |||
p6eval | perlito: ( no output ) | ||
moritz_ | diakopter: if you patched p6eval, please commit the changes into the pugs repo | ||
perlito: class A { has $.x; method foo { say $.x } }; A.new(x => 3).foo | 17:21 | ||
p6eval | perlito: ( no output ) | ||
pugssvn | r30159 | diakopter++ | [p6eval] and stuff | ||
moritz_ | diakopter++ | 17:22 | |
diakopter | hrm, it needs a custom munger sub | ||
diakopter goes to fix | |||
17:24
nihiliad joined
|
|||
lue | rakudo: $/<a><b>; say "Alive!" | 17:25 | |
p6eval | rakudo a61c40: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class ''current instr.: '!postcircumfix:<{ }>' pc 13740 (src/builtins/Code.pir:120)» | ||
lue | Huh? | ||
diakopter | I think < > is treated the same as { } | 17:26 | |
lue | rakudo: if 5 > my $a = 4 { say $a } | 17:28 | |
p6eval | rakudo a61c40: OUTPUT«Use of type object as value in numeric contextcurrent instr.: 'perl6;Perl6Exception;throw' pc 14682 (src/builtins/Seq.pir:77)» | ||
masak | right. postfix <> delegates to postfix {} | ||
rakudo: if 5 > (my $a = 4) { say $a } | 17:29 | ||
p6eval | rakudo a61c40: OUTPUT«4» | ||
17:30
p6eval left,
p6eval joined
|
|||
lue | Should that bug be closed, or is the problem no parens? (62472) | 17:32 | |
masak looks | 17:33 | ||
it can be closed when it has a better error. | 17:34 | ||
in my view, it doesn't yet. | |||
moritz_ | std: if 5 > my $a = 4 { say $a } | ||
p6eval | std 30159: OUTPUT«ok 00:01 108m» | ||
masak | it's *syntactically* correct :) | ||
moritz_ | rakudo: warn('foo') | 17:37 | |
p6eval | rakudo a61c40: OUTPUT«foo» | ||
mathw is lured away by the prospect of sausages | |||
lue | DON'T PANIC! But do you really need to declare a variable in an if's conditional? Seems pretty faulty... | ||
17:37
p6eval left,
p6eval joined
|
|||
lue | there's your error | 17:37 | |
diakopter | oh, no, I just restarted it | ||
oh, nm | |||
17:37
envi^home left
|
|||
mathw | lue: you'll inevitably find somebody who does | 17:38 | |
masak | lue: I think I discovered that ticket while actually writing some actual code. but no, it's not always a Good Thing to do... :) | ||
17:38
nihiliad left
|
|||
mathw | Most of the time I'm fairly sure it's a bad idea though | 17:38 | |
17:38
nihiliad joined
|
|||
mathw | That doesn't mean there isn't a good use for it | 17:38 | |
lue | that, IMO, should be illegal in the spec. This would guarantee a result, and that's pretty... interesting. (convice me otherwise) | 17:39 | |
moritz_ | it's specced what it should do. | ||
there's nothing unclear about it | |||
the variable is visible in the rest of the current lexical scope | |||
and the declaration returns the variable | 17:40 | ||
and the precedence of the item assignment operator is also specced | |||
lue | Well then, maybe a warning? I don't forsee this as a common task... | ||
moritz_ | why a warning? it's not like the code looks harmless, but does something unpredictable | ||
mathw | if you add a warning ,anybody who does use it has to put up with a warning, so you're effectively forbidding it | 17:41 | |
lue | Eh, I just don't like it :) | ||
mathw | you either have it or you don't | ||
moritz_ | if you write a declaration inside an if-statement, you do it deliberately. That's not a typo :-) | ||
mathw | well, you're forbidding it or encouraging the ignoring of warnings which is a Bad Thing | ||
masak | I can easily give the rationale for a declaration in a while condition. | ||
lue | Alright! You convinced me otherwise on warnings/errors | ||
but I still don't see why you'd want to do it that way :) | 17:42 | ||
17:42
p6eval left,
p6eval joined
|
|||
lue | (I bet I will once I need to use it...) | 17:42 | |
diakopter | ahah. | ||
perlitobug | |||
it doesn't like empty statements | 17:43 | ||
17:44
p6eval left,
p6eval joined,
p6eval left
17:45
p6eval joined
|
|||
masak removes the named-enums branch on github | 17:45 | ||
jnthn | masak: (class vars) can probably be made to work, just a pain. | ||
17:45
p6eval left,
p6eval joined
|
|||
masak | jnthn: cool! | 17:45 | |
jnthn | Well | 17:47 | |
Less of a pain than other things that need doing. :-) | |||
diakopter | perlito: class A { has $.x; method foo { return $.x } }; my $a := A.new(x => 5); say $a.foo | 17:50 | |
p6eval | perlito: OUTPUT«5» | ||
moritz_ | perlito: class A { has $.x; method foo { return $.x } }; my $a = A.new(x => 5); say $a.foo | 17:51 | |
p6eval | perlito: OUTPUT«*** Error in assignment operation: infix<=> not implemented; use infix<:=> instead at /home/p6eval/Perlito/lib5/MiniPerl6/Grammar.pm line 39.» | ||
moritz_ | yikes | ||
just like nqp | |||
diakopter | perlito: class A { has $.x; method foo { return $.x } }; say A.new(x => 5).foo | ||
p6eval | perlito: OUTPUT«Can't call method "foo" without a package or object reference at (eval 3) line 16.A=HASH(0x825df0)» | ||
moritz_ | perlito: class A { has $.x; method foo { return $.x } }; say (A.new(x => 5)).foo | ||
p6eval | perlito: OUTPUT«5» | ||
diakopter | (but aliasing to $a first, works) | ||
oh | |||
moritz_ | parsing issue | ||
diakopter | nice | ||
moritz_ | kp6 had that too | 17:52 | |
diakopter | nice, to you, I mean | ||
ok, here, I hacked in something that recognizes if the eval input starts with a class | |||
o wait, hang on | 17:53 | ||
easier solution | |||
moritz_ | why? | ||
diakopter | b/c perlito requires a Main class | ||
17:54
p6eval left,
p6eval joined
|
|||
diakopter | perlito: class A { has $.x; method foo { return $.x } }; class Main { say (A.new(x => 5)).foo } | 17:54 | |
p6eval | perlito: OUTPUT«5» | ||
moritz_ | rakudo: Q:PIR{ $P0 = get_hll_global '&warn'$P0("foo") } | 17:55 | |
p6eval | rakudo a61c40: OUTPUT«foo» | ||
moritz_ | rakudo: Q:PIR{ get_hll_global $P0, '&warn'$P0("foo") } | ||
diakopter | ok. if you don't define any classes, it's wrapped in 'class Main {' . $inp . '}' but if you define your own class, you must explicitly write out your own Main class, too. | ||
p6eval | rakudo a61c40: OUTPUT«foo» | ||
17:55
abra left
|
|||
moritz_ wonders what went wrong locally | 17:56 | ||
jnthn | masak: Any luck with the neamed enums hack? | ||
pugssvn | r30160 | diakopter++ | [p6eval] helper wrapper for perlito, for convenience | ||
masak | jnthn: no, I looked at it and didn't see how to create the PAST structure. | ||
17:58
ChanServ sets mode: +o diakopter,
diakopter was kicked by diakopter (MEDDLING))
|
|||
moritz_ | rakudo: say Q:PIR{ get_hll_global $P0, '&warn'$P0("foo") %r = 3 } | 17:58 | |
p6eval | rakudo a61c40: OUTPUT«fooNull PMC access in set_integer_native()current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
moritz_ | rakudo: say Q:PIR{ get_hll_global $P0, '&warn'$P0("foo") %r = box 3 } | ||
jnthn | masak: PAST::Stmts node, and then loop over the hash thingies and make a PAST::Op.new( :pasttype('bind'), PAST::Var.new( :name($enum_element_name) :namespace($enum_name) :scope('package') ), PAST::Val.new( :value($enum_value) )) | ||
p6eval | rakudo a61c40: OUTPUT«foo3» | ||
jnthn | Or some such | ||
masak | jnthn: oh! ok. | 17:59 | |
jnthn | Yes, it's a sick hack. | ||
:-) | |||
masak | jnthn: I'll try it while making supper. | ||
jnthn | Yeah | ||
I'm going out for a wander, and I'll either come back having found supper and eaten it, or with stuff to cook. :-) | |||
Adventure! | 18:00 | ||
;-) | |||
lue | bye jnthn o/ | ||
colomon | o/ | ||
jnthn | back later :) | ||
masak | o/ | 18:02 | |
lue | (I just need to add in support for things like :2<0x98> and then unfudged radix.t ought to work :) ) | 18:03 | |
(and I need to unfudge radix.t) | |||
masak | go lue! \o/ | 18:05 | |
colomon | \o/ | 18:07 | |
lue | just went to get some noms (lunch noms) now back to actually do what I said | 18:08 | |
18:12
PZt joined
18:14
jaldhar left
|
|||
masak | & # noms | 18:15 | |
18:15
masak left
|
|||
lue | rakudo: Q:PIR{$I0=1 and 0if $I0 = 1 goto failsay "yay"fail:say "darn"} | 18:17 | |
p6eval | rakudo a61c40: OUTPUT«error:imcc:syntax error, unexpected PARROT_OP, expecting '\n' ('and') in file 'EVAL_1' line 64error:imcc:syntax error, unexpected '=' ('=') in file 'EVAL_1' line 65yaydarn» | ||
18:17
abra joined
|
|||
lue | rakudo: Q:PIR{$I0=1if $I0 = 1 and 2=2 goto winsay "fail"win:say "win"} | 18:19 | |
rakudo: Q:PIR{$I0=1if $I0 == 1 and 2==2 goto winsay "fail"win:say "win"} | 18:20 | ||
p6eval | rakudo a61c40: ( no output ) | 18:21 | |
rakudo a61c40: OUTPUT«error:imcc:syntax error, unexpected PARROT_OP, expecting GOTO ('and') in file 'EVAL_1' line 65failwin» | |||
moritz_ | lue: PIR does not support infix operators | ||
lue | sigh :) | 18:25 | |
The more I do this, the more I'd love to port this to P6 afterwards :) | |||
moritz_ | why not do it Perl 6 straight away | 18:28 | |
lue | Because the method was set up for me in pir, and I don't know how in P6 :D | 18:30 | |
So I'll do it in PIR first, then study up on P6, and then port it :) | 18:31 | ||
18:31
jaldhar joined
18:38
jaldhar left,
jaldhar joined
|
|||
lue | OK! Time to compile... | 18:39 | |
18:40
synth left,
[synth] left
18:41
synth joined,
synth left
18:43
synth joined
18:44
synth left,
sorear left
18:45
sorear joined
|
|||
dalek | kudo: 9780625 | (Solomon Foster)++ | src/core/metaops.pm: Rework hyper so that it properly handles cases with differing numbers of elements on each side. |
18:46 | |
lue | rakudo: Q:PIR{$S0=substr "hello there",5say $S0} | 18:47 | |
p6eval | rakudo a61c40: OUTPUT« there» | ||
18:47
nihiliad left
|
|||
lue | just out of curiosity, can you tell rakudo (make) to compile for a different CPU chip? Ex. On an intel machine, tell it to compile for PPC | 18:51 | |
moritz_ | nope | ||
18:51
abra left,
nihiliad joined
|
|||
moritz_ | however the generated parrot byte code is platform independent | 18:51 | |
18:52
Psyche^ joined,
snarkyboojum joined
|
|||
moritz_ | (in theory - no idea how well it works in practice) | 18:52 | |
18:54
snarkyboojum left
18:55
Patterner left,
Psyche^ is now known as Patterner
18:56
ruudhaya joined
|
|||
lue | YYYEEEESS! All of radcalc is programmed in, now to spectest (with fudged radix.t) :) | 18:56 | |
18:56
ruudhaya left
|
|||
dalek | kudo: 0d10ff6 | moritz++ | src/core/IO.pm: enable printf() again |
18:58 | |
kudo: 3c9f65b | moritz++ | src/core/operators.pm: small fix in series operator |
|||
19:00
rv2733 joined
|
|||
lue | misc.rakudo returned Dubious... | 19:02 | |
(S03-operators) | |||
rakudo: say :16<2_F_A_C_E_D> | 19:10 | ||
p6eval | rakudo a61c40: OUTPUT«3124461» | ||
lue | bah! I left in an endless loop scenario (thank you spectest) | 19:11 | |
*sob* why do fractions fail me now? | 19:24 | ||
19:27
pmurias left
|
|||
lue | TWO periods? :16<16D.4> is sent to radcalc as 16D..4 ! | 19:34 | |
problem with the adverbs *grumble* | 19:42 | ||
(First big thing I've ever worked on in Rakudo :) ) | |||
19:43
snarkyboojum joined
19:44
nobyx joined
|
|||
jnthn back | 19:44 | ||
lue++ # persistence! | 19:46 | ||
lue | I can't tell Actions.pm to C<say> things so I find out where the double . comes in :( | 19:49 | |
I'm guessing it's in $<fracpart>, but I'm not sure :) | 19:50 | ||
19:52
iblechbot joined
|
|||
jnthn | lue: pir::say($thing); # will work | 19:52 | |
lue | in Actions.pm? | 19:53 | |
jnthn | Yes | ||
lue | It started failing around when I added in support for things like :16<0o17>. I'm trying to get all of S02-literals/radix.t to pass :) | 19:55 | |
colomon | moritz_++ # fixing my wee series bug | 19:57 | |
19:57
Maddingu1 is now known as Maddingue
|
|||
lue | Either I fix it Actions.pm (the correct way) or program a workaround in radcalc (the cheat way). I would prefer Actions.pm | 19:58 | |
19:58
molaf left
|
|||
jnthn | lue: Yes, fixes are preferable to workarounds. :-) | 19:58 | |
They save pain and wtfs later. :-) | |||
lue | (aliens to Earth say WTZ :) ) | 20:00 | |
colomon | I thought it would be WTB? | 20:01 | |
20:01
snarkyboojum left
|
|||
lue | What The Zark | 20:03 | |
froody. The extra dot is a result of it being with $<fracpart> | |||
if it's always like that, then I can remove the dot we force in ( ~ "." ~ ) | 20:04 | ||
colomon | lue: can you paste the grammar you're using from fracpart now? | 20:05 | |
lue | the whole thing that sends off to radcalc (in Actions.pm)? | 20:06 | |
colomon | no, the bit you've changed in Grammar.pm | 20:07 | |
Or both parts, maybe! | |||
oh, I see. yeah, take out the extra ~ "." ~ in Actions.pm. | 20:08 | ||
That was my mistake, apologies. | |||
20:09
jaldhar left
|
|||
lue | SINCE WHEN DID I NEED TO CHANGE GRAMMAR.PM? /o\ | 20:09 | |
...sorry :) | |||
colomon | I thought you were changing it this morning. | 20:11 | |
It does need to be changed a bit eventually, but that's a low priority thing. | 20:12 | ||
20:12
clintongormley left
|
|||
lue | there we go. fractions work again. (and another run of (fudged) radix.t) | 20:13 | |
all pass! now to unfudge (let's see if that's easy) | 20:14 | ||
20:15
Guest14894 left
|
|||
lue | unfudging is just removing all the #?rakudo stuff, right? | 20:19 | |
20:20
jaldhar joined
|
|||
jnthn | lue: yes | 20:20 | |
lue | alright! | 20:21 | |
sorear | hello jnthn | 20:22 | |
pugssvn | r30161 | lue++ | [t/spec] unfudged radix.t for rakudo | 20:23 | |
lue | Test fails at :60[12,3,64] and stuff like that. I'll leave that for someone else. I'm done :) | 20:28 | |
How do I create a patch, again? | |||
colomon | lue: commit your changes locally, then use git patch. | 20:29 | |
lue | git commit ? | ||
colomon | git commit, yes. | 20:31 | |
git commit -a | |||
Is the easiest way to commit all your changes at once. | |||
jnthn | sorear: on phone, moment :-) | 20:32 | |
lue | then git patch, and nopaste said patch! | 20:33 | |
erm, git patch doesn't work :( | 20:34 | ||
colomon | should have left a file in the directory, with a name something like 0001 - your commit message | 20:37 | |
but you might need something like | |||
git patch -1 | |||
lue | 'patch is not a git-command' :( | ||
and no 0001 file :( | 20:38 | ||
colomon | sorry, it's git format-patch | ||
git format-patch -1 | |||
will do it, I think. | 20:39 | ||
lue | there it is! | ||
colomon | \o/ | 20:40 | |
lue | now to nopaste! | 20:43 | |
20:44
dukeleto joined
|
|||
lue | bah, paste failed. Try Again... | 20:48 | |
OK... something's wrong with nopaste :( | 20:49 | ||
colomon | use gist.github.com | ||
nopaste hasn't worked the last three times I tried it. | 20:50 | ||
:( | |||
jnthn | back | 20:51 | |
colomon | o/ | ||
jnthn | sorear: oh hai | ||
lue | gist.github.com/339561 there it is | ||
you will notice I'm much more liberal with comments than most :) | 20:52 | ||
arnsholt | Anyone in here familiar with Parrot's continuations? | 20:53 | |
jnthn | arnsholt: mumble | ||
arnsholt: I think I've understood how they work at some point before now. :) | 20:54 | ||
arnsholt | Heh | ||
In that case, if you could take a look at this: nopaste.snit.ch/20025 | |||
Each time I call fail() in blob() choose() should backtrack and choose the next element in the list passed to it | 20:55 | ||
bkeeler | Afternoon folks | ||
lue | afternoon! | ||
arnsholt | Which it does, on the -inside-, but for some reason the return value is always the same | ||
lue | (has anyone looked at my patch? :) ) | ||
arnsholt | Is there something wrong with my code, or is it an actual bug? | 20:56 | |
colomon | lue: I started looking at it, then got distracted thinking of noms. | ||
jnthn | lue: DON'T PANIC! Someone will look at your patch | ||
lue | just checking :) | ||
arnsholt | Those dastardly noms, always getting in the way =) | ||
jnthn | arnsholt: Huh....I have to use my brain... :-) | 20:57 | |
jnthn tries to work out what the code does | |||
arnsholt | It's supposed to be a non-deterministic searc (I'm fiddling around with doing Prolog for Parrot) | 20:58 | |
21:01
payload joined
|
|||
colomon | Did I say this shortly ago? Unobe has a patch to make @a[*-1] work (which it does) but it blows up a bunch of spectests. | 21:01 | |
arnsholt | jnthn: It's adapted from a Scheme source if you'd find that easier to digest | 21:02 | |
jnthn | arnsholt: Probably not :-) | 21:03 | |
So essentially it does: | |||
say chosen | |||
.return (chosen) | |||
And that's what populates city in | |||
city = 'choose'("la", "ny", "bos") | |||
say city | |||
> | |||
arnsholt | Yah | ||
jnthn | ? | ||
grr, keybarod! | |||
...that looks very weird. | |||
lue | Happens to me too, jnthn. Especially things are being sent to IRC :) | 21:04 | |
colomon | lue: that is some well-commented code there. | ||
arnsholt | The key is the bit above | ||
jnthn | It has the right value and returns it...but then the thing it returns to gets a different value. :-/ | ||
arnsholt | Yeah. I just had an idea | ||
I'm gonna try and remove the .tailcall | |||
lue | I developed the habit when beginning my Python NES emulator :) | ||
jnthn | oh. | ||
arnsholt: Tail calls do *certainly* have bugs. | |||
We work around one of them in Rakudo. | 21:05 | ||
sorear | Why do tail calls have bugs? | ||
arnsholt | No joy, unfortunately | ||
jnthn | sorear: The one that bites me is, if you do a call into PIR from C, and that bit of PIR does a tailcall, the return value handling gets messed up and you get a null back instead of what the thing that was tail called to returns. IIRC. | 21:06 | |
Probably not the case for arnsholt++ | 21:07 | ||
But wouldn't surprise me if more bugs were lurking. :-/ | |||
arnsholt | Yeah. But I get the same result without the tailcall | ||
jnthn | arnsholt: Aww. It does look odd. May be worth trying to get it down to a smaller example (though what you have is quite small) and ask some Parrot folks. | 21:08 | |
sorear | any hope of working TCO in R*? | ||
lue | rakudo: my $num = 12345; printf "%d is %d digits long", $num, sub($s, @args is rw) { @args[2] = $s.elems }, 0; | ||
jnthn | TCO = ? | ||
p6eval | rakudo 0d10ff: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)» | ||
colomon | tail call opt, I assume. | ||
arnsholt | jnthn: Yeah, I've got some names from the people in #parrot, so right now I'm just waiting for them to show up | ||
jnthn | Oh | ||
sorear | tail call optimization, where anything evaluated in a returning context automatically becomes a tailcall | ||
jnthn | For R*? No. | 21:09 | |
Very unlikely. | |||
21:09
smash_ joined
|
|||
smash_ | hello everyone | 21:09 | |
moritz_: ping | |||
jnthn | We've enough stuff to make *work*, let alone optimize. :-) | ||
sorear | it lets you write loops recursively without blowing the stack, and is mandated by r5rs | ||
arnsholt | So I figured I could ask in here as well, see if anyone were familiar with the continuations | ||
jnthn | sorear: Yeah, I understand the concept, just didn't recognize the acronym. :-) | 21:10 | |
sorear: I liked doing that in ML. Write recursive, get iterative memory usage. :-) | |||
We may be able to do it in Perl 6 but it probably screws up CALLER | |||
So it's a bit harder to know when you can do it, I guess. | 21:11 | ||
arnsholt | Hmm. That's one for TimToady methinks | ||
sorear | CALLER needs to be rethought anyways in the long run | 21:12 | |
since INLINING will screw it up | |||
and that's a slightly important long-run optimization | |||
lue | rakudo: ... | 21:14 | |
jnthn | sorear: Aye | ||
p6eval | rakudo 0d10ff: ( no output ) | ||
21:15
hudnix joined
|
|||
lue | rakudo: ??? "Hello"; say "<<just a warning" | 21:15 | |
p6eval | rakudo 0d10ff: OUTPUT«Stub code executed<<just a warning» | ||
lue | rakudo: !!! "Hello"; say "<<just an error" | 21:16 | |
p6eval | rakudo 0d10ff: OUTPUT«Stub code executedcurrent instr.: '&die' pc 17127 (src/builtins/Junction.pir:399)» | ||
lue | jnthn: remember ... !!! ??? ? Would that be implementable in the new rakudo now ? | 21:17 | |
colomon | rakudo: say (1, 2, 3) >>~>> 'a' | 21:18 | |
p6eval | rakudo 0d10ff: OUTPUT«1a2a3a» | ||
21:22
rgrau` joined
|
|||
jnthn | lue: I thought you just tried it out? :-) | 21:22 | |
colomon: Nice! :-) | |||
colomon | rakudo: say (1, 2, 3) >>~>> () | 21:23 | |
p6eval | rakudo 0d10ff: OUTPUT«No applicable candidates found to dispatch to for 'infix:<~>'. Available candidates are::(Any $a, Any $b)current instr.: '_block27127' pc 304349 (src/gen/core.pir:19496)» | ||
lue | the arguments aren't accepted though :( | ||
colomon | jnthn: I figured the [op] approach made sense here. But that's easy to change if people feel that is the wrong approach. | ||
lue | rakudo: say "foofoofoo".subst("foo", "bar", :x(1..2)) | 21:24 | |
p6eval | rakudo 0d10ff: OUTPUT«barbarfoo» | ||
lue | rakudo: say "foofoofoo".subst("foo", "bar", :x(5..6)) | ||
p6eval | rakudo 0d10ff: OUTPUT«barbarfoo» | ||
jnthn | colomon: ooh, good point | ||
colomon: Yes, let's try that, until it's discovered to have issues, or the spec goes another way. | 21:25 | ||
colomon: Maybe I'll take a look at ++<<@a and @a>>++ this evening. | |||
21:25
Chillance joined
|
|||
lue | rakudo: my $a = $b; my $b | 21:26 | |
p6eval | rakudo 0d10ff: ( no output ) | ||
lue | rakudo: my $a = $b; | ||
p6eval | rakudo 0d10ff: OUTPUT«Symbol '$b' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)» | ||
lue | that's still a problem :) | ||
rakudo: class A { my $.b; method x { $!b = "b" } }; A.new.x | 21:29 | ||
p6eval | rakudo 0d10ff: OUTPUT«No such attribute '$!b'current instr.: 'perl6;A;x' pc 398 (EVAL_1:173)» | ||
jnthn | s/my/has/ | 21:30 | |
lue | just killing bugs on RT :) | 21:31 | |
rakudo: class A { has $.b; method x { $!b = "b" } }; A.new.x | |||
p6eval | rakudo 0d10ff: ( no output ) | ||
moritz_ | smash_: pong | 21:33 | |
smash_ | moritz_: greetings, is it me of only registed users can see the copenhagen annouce in rakudo.org ? | 21:34 | |
lue | rakudo: class A does Int {} | ||
p6eval | rakudo 0d10ff: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''current instr.: 'perl6;ClassHOW;add_composable' pc 4039 (src/metamodel/ClassHOW.pir:186)» | ||
jnthn | smash_: I don't see it while not logged in. | 21:35 | |
21:35
wknight8111 joined
|
|||
smash_ | jnthn: yeap, me neither | 21:35 | |
moritz_ | smash_: I seem to have broken something... | ||
lue | afk | 21:36 | |
moritz_ | but I have no idea what :( | ||
21:37
jhuni joined
|
|||
smash_ | moritz_: sorry can't help you, i don't have any privileges there | 21:38 | |
moritz_ | and I don't see any options to make it public or so | 21:39 | |
I can try to re-post | |||
if that helps... | |||
21:39
molaf joined
21:40
alester joined
|
|||
jnthn | rakudo: my @a = 1,2,3; @a>>++; say @a; | 21:41 | |
p6eval | rakudo 0d10ff: OUTPUT«Method 'isa' not found for invocant of class 'Undef'current instr.: 'perl6;Perl6;Actions;_block5849' pc 225685 (src/gen/perl6-actions.pir:0)» | ||
moritz_ | I created another announcement node on rakudo.org | ||
that doesn't show up eitehr | |||
and now both show up... wtf? | 21:42 | ||
colomon | woah, lue actually made each error message start with DON'T PANIC! :) | 21:43 | |
smash_ | moritz_: yeao, seeing two annouces now | ||
moritz_ | better than none I think | ||
jnthn | colomon: Yeah! :-) | ||
smash_ | moritz_: yes, better | ||
jnthn | rakudo: my @a = { a => 1}, { a => 2}, { a => 3}; say @a>><a>; | 21:44 | |
p6eval | rakudo 0d10ff: OUTPUT«123» | ||
jnthn | wow! | ||
moritz_ | w00t | ||
colomon | wow, I don't think I knew what was even possible in the spec! | ||
jnthn | ...I accidentally the win when I implemented parallel dispatch, evidently. | ||
It's rather cool. :-) | 21:45 | ||
Well, it's only syntactic sugar for .postcircumfix:<{ }>('a') | |||
So by the time postfixish sees it, it's just a method call. | |||
So the standard parallel dispatch path works. :-) | 21:46 | ||
It is quite a cool discovery though. :-) | |||
moritz_ wonders if we have tests for that... | |||
dalek | kudo: 70dd723 | (David Romano)++ | src/core/Array.pm: [src/core] indentation fix |
||
kudo: af16e57 | (David Romano)++ | src/core/operators.pm: [src/core] Define ne in terms of !eq |
|||
21:48
Enlik joined
|
|||
jnthn | moritz_: I suspect not. :-) | 21:48 | |
Hmm | |||
Guess it works for {..} and [...] postcircumfixes too just automatically. :-) | |||
21:49
Enlik left,
Enlik joined
|
|||
moritz_ | hm, lue has unfudge radix.t without patching rakudo - right? | 21:52 | |
colomon | I'm testing his patch right now. | ||
so if he committed changes to radix.t, then yes. | 21:53 | ||
moritz_ | he did | ||
jnthn | Talk about confidence in patch acceptance. :-) | ||
21:54
snarkyboojum joined
|
|||
colomon | I'm going to run out to pick up noms (spicy beef with peanuts, woo-hoo) while the test runs, so even if it works I'll be a bit slow to push. | 21:55 | |
jnthn | colomon: Ooh, sounds nice. :-) | ||
jnthn had beef with curry and veg tonight :-) | |||
21:56
Enlik left
|
|||
colomon | from this place, it's usually heavenly. | 21:56 | |
pugssvn | r30162 | moritz++ | [t/spec] fudge S04-statement-modifiers/while.t for rakudo | ||
r30163 | moritz++ | [t/spec] test parallel dispatch on postcircumfix operators | |||
21:56
Enlik joined,
payload left
21:57
Enlik left,
Enlik joined
21:58
pugssvn left
|
|||
moritz_ thinks that pugssvn-- behaves very weirdly | 22:02 | ||
22:02
pugssvn joined
|
|||
moritz_ | I just regenerated the locales on feather3 in the hope that it helps... | 22:03 | |
lue | I wanted to test an unfudged radix.t against my patch, and didn't feel like a simple cp when I'd upload it anyway :) | ||
moritz_ | lue: you can test it locally unfudged without committing | ||
lue: commiting tests that fail for everybody else is considered rather rude here. Plesae don't do that again | 22:04 | ||
lue | colomon: you know me! I'm going to start each message with DON'T PANIC! (you can change if you're really against it) | ||
mortiz_ alright :/ | |||
22:05
eternaleye left
|
|||
sorear | pcc_hackathon isn't merged yet :( | 22:05 | |
22:06
nobyx left
|
|||
pugssvn | r30164 | moritz++ | [t/spec] test that .HOW is readonly | 22:06 | |
jnthn | sorear: I think merging it would also make Rakudo fail to build. | ||
sorear: I asked on list for a patch to fix up Rakudo. | 22:07 | ||
lue | I'll work on improving bits of radix conversion in a while (including a port over to P6) :) | ||
sorear | jnthn: a feature I need for Blizkost (slurpy return signatures in Parrot_pcc_invoke_sub_from_c_args) is only available in the branch | 22:09 | |
jnthn | sorear: Aww. :-( | ||
sorear | it's ok, #parrot thinks I should be writing an entire C library to wrap libperl.so, then wrapping that with the NCI, then writing a binding layer in PIR | 22:10 | |
jnthn | ... | ||
That...wasn't the plan I'd had in mind for Blizkost. | 22:11 | ||
And sounds like a chunk more work. | |||
sorear | Because, according to chromatic, the NCI code generator is the only thing that should be making PCC calls | ||
jnthn | er, wtf? | 22:12 | |
sorear | I probably just failed to communicate again | ||
jnthn | I thought the whole reason for having a unified model for PCC and the pain we all went through to move to one was so there _was_ an interface to do those things. | ||
Perhaps. | 22:13 | ||
Rakudo relies plenty of the ability to work with the PCC interface, for its multi dispatcher and signature binder, and I've never heard complaints about those along the same lines. | |||
pugssvn | r30165 | moritz++ | [t/spec] in Test::Util, use Test; in order to have sub skip() available | 22:14 | |
jnthn | moritz_++ # That allows the tests that use Test::Util to have a chance of working again, I guess? | 22:15 | |
moritz_ | jnthn: currently these tests emit | ||
ok 1 - # SKIP test died: Not enough positional parameters passed; got 2 but expected 4 | |||
jnthn | Oh. :-/ | 22:16 | |
moritz_ | oh, it relies on $^a and $^b which seems not relieable | 22:17 | |
next problem: | |||
rakudo: say $*EXECUTABLE_NAME | |||
p6eval | rakudo 0d10ff: ( no output ) | ||
moritz_ | alpha: say $*EXECUTABLE_NAME | ||
p6eval | alpha 30e0ed: OUTPUT«../rakudo-alpha/perl6» | 22:18 | |
jnthn | Probably just NYI. | 22:19 | |
moritz_ | aye | ||
jnthn | Should be an easy "copy from alpha" job. | ||
moritz_ | it's in src/builtins/globals.pir in alpha | 22:21 | |
and in master @*INC is set up in src/Perl6/Compiler.pir | |||
what would you prefer? globals.pir? | |||
jnthn | But it where e.g. $*PROGRAMENAME is set up | 22:22 | |
moritz_ | it's not, in master | ||
jnthn | Don't think we have a globals.pir in master | ||
moritz_ | rakudo: say $*PROGRAMNAME | ||
jnthn | oh, I though mberends++ did that. | ||
p6eval | rakudo 70dd72: ( no output ) | ||
jnthn | oh. | ||
rakudo: say $*OS | |||
p6eval | rakudo 70dd72: OUTPUT«linux» | ||
moritz_ | rakudo: say %*ENV.perl | ||
p6eval | rakudo 70dd72: OUTPUT«Method 'key' not found for invocant of class 'String'current instr.: 'perl6;EnumMap;_block14104' pc 408062 (src/gen/core.pir:58659)» | ||
jnthn | :-/ | ||
22:23
eternaleye joined
|
|||
sorear | rakudo: say ::GLOBAL.keys.perl | 22:23 | |
p6eval | rakudo 70dd72: OUTPUT«Null PMC access in find_method('keys')current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
sorear | what's the correct syntax for dumping all $*? | ||
moritz_ | src/cheats/setup-io.pm probably | ||
jnthn | rakudo: say $*PROGRAM_NAME | 22:24 | |
p6eval | rakudo 70dd72: OUTPUT«/tmp/sQndXSIIeZ» | ||
jnthn | ah | ||
Underscore :-) | |||
moritz_: src/glue/run.pir | |||
lue is off to correct some of his errors in fixing radix conversion | 22:26 | ||
22:26
IllvilJa joined
|
|||
lue | colomon: did you upload the patch yet? I'm off to correct my eagerness in unfudgeing radix.t :) | 22:27 | |
moritz_ | jnthn: trying to add $EXECUTABLE_NAME in run.pir... | 22:28 | |
jnthn | +1 | 22:29 | |
pugssvn | r30166 | moritz++ | [Test::Util] simplify code a bit | 22:32 | |
jnthn | > my @a = 1,2,3; @a>>++; say @a; | 22:36 | |
234 | |||
> my @a = 1,2,3; ++<<@a; say @a; | |||
234 | |||
moritz_ | now say @a>>++ | 22:37 | |
and say ++<<@a | |||
jnthn | cheeky :-P | ||
> my @a = 1,2,3; say @a>>++; | |||
123 | |||
> my @a = 1,2,3; say ++<<@a; | |||
234 | |||
moritz_ impressed | |||
pugssvn | r30167 | moritz++ | [Test::Util] further simplification; now runs on Rakudo | ||
dalek | kudo: 12b6d27 | moritz++ | src/glue/run.pir: re-instatiate $*EXECUTABLE_NAME |
||
moritz_ | anyway, bed time | 22:38 | |
jnthn | :-) | ||
moritz_ | 'night | ||
jnthn | moritz_++ | ||
night o/ | |||
lue | night o/ | ||
jnthn spectests | 22:39 | ||
22:41
huf left,
huf joined
|
|||
jnthn | Anyone know if the S03-operators\precedence.rakudo test fail is an existing one? | 22:51 | |
jnthn is sure he's heard about it before... | |||
lue | rebooting to try and get things working again. back in a bit! | 22:53 | |
23:03
diakopter joined,
iblechbot left
23:04
Enlik left
|
|||
jnthn | .oO( /kick diakopter ABSENCE ) |
23:04 | |
dalek | kudo: 92745eb | jonathan++ | src/ (3 files): First cut of prefix and postfix hyper-operators. Parsing should all be fine, implementation probably needs tweaking for nested arrays. |
23:06 | |
23:06
rgrau` left
|
|||
diakopter | jnthn: ;P | 23:07 | |
rakudo: say [+]++[+] 1 | 23:21 | ||
p6eval | rakudo 12b6d2: OUTPUT«2» | ||
jnthn | std: say [+]++[+] 1 | 23:22 | |
p6eval | std 30167: OUTPUT«===SORRY!===Prefix requires an argument at /tmp/EHGW94kCDp line 1:------> say [+]++[+⏏] 1FAILED 00:01 108m» | ||
jnthn | Hm. | ||
:-/ | |||
diakopter | std fail? | ||
jnthn | Or rakudo fail :-) | ||
diakopter | oh, no. yeah. | 23:23 | |
jnthn | I'm not sure what it'd mean if it did work. | ||
diakopter | seems like it parsed it entirely right-associative, with which I don't see a problem | ||
er, prefix. | |||
jnthn starts to see what it means :-) | 23:24 | ||
[+](++([+]1)) | |||
Which...gives 2. :-) | |||
diakopter | rakudo: say [+](++([+]1)) | 23:25 | |
jnthn | Well, that's just an obfuscator's dream. :-) | ||
p6eval | rakudo 12b6d2: OUTPUT«2» | ||
jnthn | I'm not sure why STD doesn't like it. | ||
diakopter | rakudo: say +[+]++[+]+1++ | 23:26 | |
p6eval | rakudo 12b6d2: OUTPUT«2» | ||
diakopter | std: say +[+]++[+]+1++ | ||
p6eval | std 30167: OUTPUT«===SORRY!===Prefix requires an argument at /tmp/RlYzOf8ZvO line 1:------> say +[+]++[+⏏]+1++FAILED 00:01 108m» | ||
23:26
kst joined
|
|||
diakopter | mebbe std doesn't like nested reductions (without parens or other brackets) in general | 23:27 | |
std: say +[+]++([+]+1++) | |||
p6eval | std 30167: OUTPUT«ok 00:01 106m» | ||
diakopter | std: say +[+]++ [+]+1++ # o_O | 23:28 | |
p6eval | std 30167: OUTPUT«ok 00:01 106m» | ||
23:30
crythias joined
23:31
wallberg left
|
|||
diakopter | ö_ö | 23:31 | |
rakudo: say +[+] ++ [+]+1++ | 23:32 | ||
p6eval | rakudo 12b6d2: OUTPUT«2» | ||
diakopter | jnthn: O_O | ||
jnthn | :-/ | ||
diakopter | std: say ++ 4 | ||
p6eval | std 30167: OUTPUT«ok 00:01 106m» | ||
diakopter | std: say 4 ++ | ||
p6eval | std 30167: OUTPUT«===SORRY!===Postfix found where infix expected (omit whitespace?) at /tmp/GTTMNkVqnY line 1:------> say 4 ⏏++ expecting any of: bracketed infix infix infix or meta-infixFAILED 00:01 107m» | ||
jnthn | rakudo: say ++4 | 23:33 | |
p6eval | rakudo 12b6d2: OUTPUT«Cannot assign to readonly valuecurrent instr.: '&die' pc 17140 (src/builtins/Junction.pir:399)» | ||
jnthn | rakudo: say 1++ | ||
p6eval | rakudo 12b6d2: OUTPUT«Cannot assign to readonly valuecurrent instr.: '&die' pc 17140 (src/builtins/Junction.pir:399)» | ||
jnthn | ...how on earth you're getting away with it above, I've no idea. :-) | ||
diakopter | where'd the intervening ++ go, then | ||
yeah | |||
jnthn | Well, --target=parse is your friend if you want to see what Rakudo's parsing it as. :-) | ||
diakopter | and ... I didn't realize whitespace was allowed between prefix... | ||
jnthn | Yes | 23:34 | |
Even between the << bit in a hyper one. | |||
diakopter | ok, so it's pre-not-quite-fixed | ||
jnthn | std: my @a; say ++<< @a; | ||
p6eval | std 30167: OUTPUT«ok 00:01 106m» | ||
jnthn | :-) | ||
preclose | |||
diakopter | prenear | ||
jnthn | preish | 23:35 | |
oh noes, $*LEFTSIGIL gets tweaked inside EXPR. :-/ | |||
diakopter | std: my @a; say -<< @a; | ||
p6eval | std 30167: OUTPUT«ok 00:01 106m» | ||
23:35
lue joined
|
|||
jnthn | rakudo: my @a = 1,2,3; say (-<< @a).perl | 23:36 | |
p6eval | rakudo 12b6d2: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)» | ||
diakopter | dunno what prefix - does | ||
jnthn | rakudo: my @a = 1,2,3; my @b = -<< @a; say @b; | ||
p6eval | rakudo 12b6d2: OUTPUT«Confused at line 11, near "my @b = -<"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
diakopter | rakudo: my @a = 1,2,3; my @b = -<< @a; say @b; | 23:37 | |
p6eval | rakudo 12b6d2: OUTPUT«Confused at line 11, near "my @b = -<"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
jnthn | negation | ||
diakopter | rakudo: my @a = 1,2,3; my @b = +<< @a; say @b; | ||
p6eval | rakudo 12b6d2: OUTPUT«Confused at line 11, near "my @b = +<"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
diakopter | rakudo: my @a = 1,2,3; my @b = !<< @a; say @b; | ||
p6eval | rakudo 12b6d2: OUTPUT«Confused at line 11, near "my @b = !<"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
jnthn | oh | ||
23:37
JimmyHoff left
|
|||
jnthn | wonder if the bot is up to date | 23:37 | |
rakudo: my @a = 1,2,3; say ++<<@a; # know this one works locally | |||
p6eval | rakudo 12b6d2: OUTPUT«Confused at line 11, near "say ++<<@a"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
jnthn | ah | ||
ETOOSOON. | |||
lue | colomon: ping | ||
colomon | pong | 23:38 | |
just looking at the test results from your patch | |||
diakopter | pugs: my @a = 1,2,3; say ++<<@a; | ||
p6eval | pugs: OUTPUT«<Error><Error><Error>» | ||
jnthn | Wow! | ||
diakopter | pugs: my @a = 1,2,3; say -<<@a; | ||
p6eval | pugs: OUTPUT«-1-2-3» | ||
lue | I'm off to correct my eagerness in unfudgeing all of radix.t :/ | 23:39 | |
diakopter | "and that's when she travelled forward in time..." | ||
colomon | at least one of the tests, you're right and the test is wrong. | 23:40 | |
jnthn | That puts a new slant on test fail. | ||
lue | I am? | ||
colomon | is(:8('0b1110'), 0o14, ':8(0b1110) converts from decimal'); | ||
should be Oo16 for the answer, I believe. | 23:41 | ||
1110 bin is 14 decimal, not 14 octal | |||
diakopter | yeah but | ||
colomon | actually all those answers are wrong in that section. | ||
diakopter | it's supposed to use the string value of the number | ||
no | |||
it's spec | 23:42 | ||
colomon | diakopter: can you be more specific about what the spec says? | ||
lue | I plan on porting radcalc o'er to P6 when it's a good time to do so (it would be less code than PIR :) ) | 23:43 | |
colomon | the :16() tests definitely assume the inner base overrides the radix. | ||
lue | rakudo: say :16(0b110) # 6 | ||
p6eval | rakudo 12b6d2: OUTPUT«6» | ||
diakopter | I don't know. when I implemented them in sprixel, I understood it. but I have no certainty that radix.t hasn't been changed since then. | 23:44 | |
lue | One thing I left out is the :60[34,59,2] type stuff :/ | ||
jnthn | oh no! | ||
I...just pushed a patch that included something it wasn't meant to. :-/ | |||
diakopter | o dears | 23:45 | |
lue | rakudo: say :60[59] # should be 59 | ||
p6eval | rakudo 12b6d2: OUTPUT«Malformed radix number at line 11, near "[59] # sho"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | ||
lue | perl6: say :60[59] # should be 59 | ||
p6eval | pugs: OUTPUT«59» | ||
..rakudo 12b6d2: OUTPUT«Malformed radix number at line 11, near "[59] # sho"current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)» | |||
..elf 30167: OUTPUT«Unknown rule: rad_numberIt needs to be added to ast_handlers. at ./elf_h line 2850» | |||
lue | colomon: considering you're testing my patch, would it be aggravating to you if I started switching over to P6 code? | 23:46 | |
dalek | kudo: 53707fb | jonathan++ | src/Perl6/Grammar.pm: Start to scatter various $*LEFTSIGIL bits around, in prep for item assignment. This covers all cases in STD apart from those in EXPR. |
23:47 | |
lue | (it'd take a while, but...) | ||
jnthn | The above patch accidentally also enables the check for item assignment. I'm spectesting now to see if there's fallout. | ||
No point undoing it if it works. | |||
Tene | or if it can be made to work. | 23:48 | |
colomon | lue: if you do that, let me work on getting the fudging correct for radix.t. | ||
jnthn | Tene: I didn't realize that I'd also saved the bit that checked it - I'd wanted to make sure adding the various assignments to $*LEFTSIGIL hadn't broken anything. :-) | ||
Tene nods. | 23:49 | ||
jnthn | And then was prepping to spectest that as the next step. :-) | ||
.oO( I accidentally the item assignment. ) |
|||
lue | will do colomon | ||
jnthn | rakudo: my $a = 1, 2, 3; say $a; | 23:50 | |
p6eval | rakudo 92745e: OUTPUT«1 2 3» | ||
jnthn | That's what's wrong and what the item assignment changes should fix. | ||
diakopter | colomon: ... nor if radix.t was changed, whether it was changed correctly | ||
jnthn | lol | 23:51 | |
> my $a = 1, 2, 3; say $a; | |||
1 | |||
\o/ | |||
Let's see what it makes of the test suite. :-) | |||
colomon | lue: your patch looks solid -- at least, the test failures are not at all your fault. lue++ | 23:53 | |
sorear | jnthn: RTLD_GLOBAL is in. | ||
jnthn | sorear++ | 23:54 | |
\o/ | |||
diakopter | rakudo should rebuild in 6 minutes.. | ||
should start rebuilding I mean | |||
23:54
dual left
|
|||
sorear | I was about to say | 23:54 | |
colomon | eval('2«1.1*:2<10>**:2<10>»') ????!? | 23:55 | |
23:55
dual joined
|
|||
lue | 6 minutes? That would not only be fast, but quite serendipitous | 23:55 | |
jnthn | colomon: huh?! | 23:56 | |
:-) | |||
colomon | std: 2«1.1*:2<10>**:2<10>» | ||
sorear | 6 minute rebuilds for rakudo would be extremely awesome | ||
p6eval | std 30167: OUTPUT«ok 00:01 105m» | ||
lue | It's a french quote test :) (I know...) | ||
(I didn't do it!) | 23:57 | ||
23:57
justatheory joined
|
|||
lue | .sub '&radcalc' in pir would be multi method radcalc( in p6, correct? | 23:57 | |
23:59
diakopter left
|