The topic for #perl6 is: pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/ Set by TimToady on 25 November 2008. |
|||
rakudo_svn | r33212 | jonathan++ | [rakudo] Add another spectest. | 00:00 | |
jnthn | Hmm. I guess you should be able to do things like "&my_sub does Foo;". | 00:01 | |
TimToady | and rakudo will presumably allow us to attach info to methods better than p5 does | ||
not sure if we can say "call this method, but not really, just return its property..." | 00:02 | ||
jnthn | Should do. We might have a little fun with constant vs non-constant PMCs along the way. :-| | ||
TimToady | in p5 I guess that's a ->can() | ||
jnthn | Oh yes, hmm. How to get a sub props... :-) | ||
&foo.SUB.prop_name | |||
TimToady | well, can certainly fake that up in rakudo like we do for STD currently, if need be | 00:03 | |
jnthn | Sure. | ||
Shouldn't be too hard. | |||
TimToady | &foo.prop_name isn't the problem, it's finding the right &foo to call it on :) | 00:04 | |
jnthn | Ahhh...yes. | ||
OK. | |||
TimToady | my token's lexer is based on some other set of tokens, many of which might come from other grammars, treated as virtual methods | 00:05 | |
that's the thing that STD is very careful to do correctly | 00:06 | ||
jnthn | It's essentially just inheritance and composition, though? | ||
With the overriding etc that comes with it? | |||
TimToady | yes, but the composition is hairy since it has to work the patterns in parallel to preserve LTM | 00:07 | |
RE::sequence::longest has to work rather hard at that | |||
since it has to do cross product of what might match before and what might match after | 00:08 | ||
jnthn | Ouch. | ||
I'm glad you worked out how to do this... :-) | 00:09 | ||
TimToady | it would be very easy to define a lexer with millions of tokens, so the grammar writer needs to be a bit careful | ||
at the moment I've got STD limited to expecting 8299 tokens where a term is expected | 00:10 | ||
but meta-operators tend to multiple that | |||
jnthn | That's why we're not letting those be nested recursively without predeclaring, right? | ||
TimToady | not letting them nest at all, at the moment | 00:11 | |
if you predeclare, it's just an ordinary operator | |||
as far as the lexer is concerned | |||
assuming you declare it infix or some such | 00:12 | ||
jnthn | So you can do [*] and >>*<< but not [>>*<<]? | ||
If that last one even makes sense... | |||
TimToady | you can nest different types | ||
jnthn | Ah, OK. But not many of the same. | ||
TimToady | so [>>*<<] is allowed | ||
00:12
ZuLuuuuuu joined
|
|||
TimToady | but not >>X>>*<<X<< | 00:12 | |
and, in fact, STD accepts [>>*<<] | 00:13 | ||
jnthn | I think I'm glad of that from a language design point of view too. :-) | ||
TimToady | well, LTM basically can't handle left recursion, is all | ||
not if you're going to enumerate all possible token patterns | 00:14 | ||
jnthn | Sure. But I'm not sure there's so many people who could look at >>X>>*<<X<< and be like "oh yeah, it does..." | ||
:-) | |||
TimToady | agree, it's probably a feature | ||
jnthn | So I don't think it's a big loss not being able to nest. | ||
Thanks for all of the answers/explanations. I'm sure I'll be back for more once I start implementing... | 00:16 | ||
TimToady | it's enough that it allows [\>>minmax<<]<< | ||
'k, I may be spottily connect over the next two weeks, given I'm going around the world | |||
*connected | 00:17 | ||
jnthn | That sounds like the tiring kind of fun I like. :-) | ||
Conferences, vacation, boht? | |||
*both | |||
TimToady | Australia, then Amsterdam | ||
jnthn | That's a lot of flying. | ||
TimToady | conferences, bit of sightseeing in Australia | ||
00:17
Exodist left
|
|||
TimToady | I'm in denial | 00:17 | |
and I'm trying to figure out if I lose a day or gain a day in my life that way... | 00:18 | ||
00:18
vixey left
|
|||
jnthn | I would say just think, Australia is probably nice and warm right now. But you're not living in a cold place. :-) | 00:19 | |
TimToady | it'll pretty close to the same | ||
but probably a bit wetter there | |||
jnthn | Oh, I can never figure out timezone stuff too well. | ||
When I travelled across Russia, all the train tickets have Moscow time on them. So I kept my watch on that the whole trip in an effort not to mess things up. | |||
It was successful in that sense, but it menat explaining a few things to confused Russians who asked me the time. :-) | 00:20 | ||
TimToady | must be strange for the sun to rise at 1:00 am... | 00:21 | |
well, far enough north, it does that anyway :) | |||
jnthn | Ah, I was pretty far south at that point in the journey (Vladivostok). | ||
TimToady | but it might explain the cavalier attitude toward time zones | ||
since no amount of daylight savings time can make up for that much swing | 00:22 | ||
jnthn | China is a curiosity, since they have the same time zone across the whole country. | ||
TimToady | China doesn't have that excuse though | ||
jnthn | All the way west in Tibet, it feels a bit odd. | 00:23 | |
TimToady | "We don't care. We don't have to. We're the phone company." | ||
takeoff on an old phone company ad we used to hear | 00:24 | ||
jnthn | Sounds like phone companies. | ||
TimToady | well, the original was "We care. We have to. We're the phone company." | ||
00:24
pcbuetow joined
|
|||
TimToady | anyway, there's a kind of monopoly in China, you might say | 00:25 | |
jnthn | If they're anything like most phone companies I've dealt with, it's a rather uncaring definition of caring... | ||
TimToady | hence the parody | ||
jnthn | Yes. | ||
When the advertising you think will be good, backfires. :-) | 00:26 | ||
TimToady | it doesn't matter how hard you think about how to name your kids; junior highers will find a way to make fun of anything... | ||
jnthn | In the UK, people seemed to take to giving the train companies alternative names. | ||
"Worst Late Western" | 00:27 | ||
jnthn doesn't miss this aspect of UK life at all | |||
TimToady | yeah, we used to fly on Hughes Air Worst | ||
I'm flying to Oz on Untied | |||
jnthn | I flew with them to the Parrot Summit. | 00:28 | |
00:28
ab5tract joined
|
|||
jnthn | I've had better, I've had worse. | 00:28 | |
TimToady | they're a bit on the sardine side | ||
00:29
km2 left
|
|||
jnthn | Is it direct flight down to Oz? | 00:29 | |
TimToady | I believe so | ||
jnthn | Ah, not so bad. | 00:30 | |
Oz from here is a long, long way. | |||
Can't do it direct. At least, not without a touchdown for refueling somewhere. | |||
TimToady | 14h 27m | 00:32 | |
jnthn | Longer than any I've done yet. | ||
TimToady | I guess it's not that much worse than the 11h to Japan | ||
jnthn | I figure once it gets beyond 10 hours, it's just looooong. | ||
TimToady | I vote for suborbital. | 00:34 | |
jnthn | Hey, supersonic wouldn't be so bad... | 00:35 | |
TimToady | well, hypersonic maybe | 00:36 | |
jnthn | That'd be awesome, but if we didn't make supersonic affordable... | ||
TimToady | slow enough to keep a bit of gravity | ||
jnthn | Or economical, anyways... | ||
On Japan, I'm pondering trying to make YAPC::Asia next year, provided there is one. | |||
TimToady | but if the can fly it back and forth 5 times in the same time as the old plane flies once... | 00:37 | |
*they | |||
jnthn | Sure, but I think the problem was more maintenance costs/wear and tear etc... | ||
jnthn has never been to Japan | |||
00:37
pbuetow left
|
|||
TimToady | I guess I've been there five times now | 00:37 | |
00:38
araujo joined
|
|||
jnthn | Worth it? | 00:38 | |
I guess if you've been five times it can't be so bad... :-) | |||
TimToady | I've enjoyed it immensely, but then I'm a crazy japanophile... | 00:40 | |
jnthn | My biggest fear, is that I don't eat fish/sea food. | ||
Which is pretty much everywhre. | |||
But I guess it's possible to get by without eating that. | |||
TimToady | well, neither do I, because I'm allergic to it | ||
jnthn | Ah, OK. | ||
TimToady | it's possible to get by | 00:41 | |
jnthn | I'm not allergic, I've just never been able to find it likable. | ||
I've tried a few times, in various places, and just can't enjoy it at all. | |||
TimToady | alas, I like it... | ||
got any other allergies you'd like to trade? | |||
jnthn | I haven't got much in the way of allergies. Just various pigmentation problems from different sides of the family. | 00:44 | |
My eyesight problem is because I lack sufficient pigment in my retinas, meaning a bunch of the rod and cones are defective, which basically means I see in low resolution. Though in full color. | 00:45 | ||
(Thus why the trains always running late in the UK drove me nuts. I didn't have much choice but to use them...) | |||
TimToady | huh. everything wrong with my eyes has been in front, and hence fixable, fortunately | 00:46 | |
jnthn | Yeah. This one is unfixable. | ||
However, thankfully, it's stable. | |||
00:46
japhb__ left
|
|||
TimToady | well, I probably ought to pretend to work... | 00:46 | |
jnthn | I wear glasses for a minor lens issue (they don't help with the retina one). But more so for the color-change lenses... | ||
Yeah, I guess I ought to pretend to sleep. | 00:47 | ||
jnthn hasn't slept normal hours since the Parrot Summit | |||
TimToady | night | ||
jnthn | night | ||
00:51
japhb joined
00:52
DemoFreak left
|
|||
wayland76 | Btw, re: warmth in Australia, it's not cold any more, but it's not that warm either | 01:06 | |
...although I'm near Melbourne, and people talk about "Melbourne weather" :) | 01:07 | ||
Re: junior higher's mocking names, I know a family who had division of labour in choosing names for their children; the mother would suggest names, and the father tried his best to mock them | 01:10 | ||
When they came up with something less mockable, they used that | |||
01:14
ZuLuuuuuu left
01:20
smallfish joined
01:22
smg left
01:32
PZt left
01:34
kst` joined
01:47
mbtrimpe joined,
mtrimpe left
01:50
mbtrimpe left
01:51
mtrimpe joined,
FurnaceBoy joined
01:54
ab5tract left
|
|||
pugs_svn | r23093 | lwall++ | [t/spec] my() is a function call | 02:02 | |
02:14
ab5tract joined
02:16
PZt joined
|
|||
pmichaud | rakudo is treating ^@a as being prefix:<^> applied to a List. | 02:25 | |
rakudo: say ^(3,3); | 02:26 | ||
p6eval | rakudo 33212: OUTPUT[012012ā¤] | ||
pmichaud | (it's doing it wrongly, but that's what it's dong.) | 02:27 | |
*doing | |||
so, how should we distinguish ^@a from ^(3,3) ? | |||
jnthn | @a is an Array, (3,3) is a List? | ||
lambdabot | Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v | ||
pmichaud | S03 doesn't make any explicit mention of ^@a | 02:29 | |
jnthn | Ah. | ||
I'm not sure what a sensible thing for that to do is anyway. | |||
pmichaud | it does discuss 0..^@a, and it says that ^$n is equivalent to 0..^$n | 02:30 | |
jnthn | Yeah | ||
But ..^ is a separate operator | |||
pmichaud | but it also says that ^(list) produces a multidimensional set of subscripts. | ||
so there's some ambiguity about ^@array | |||
jnthn | Right | ||
Because I'm sure sure that we can (by the spec) say that Array is a subclass of List | 02:31 | ||
pmichaud | I'm pretty certain that the ^@array form will end up meaning 0..^@array -- but I'm curious what the disambiguation will be. | ||
jnthn | If it were, we could go by implication... | ||
02:31
mtrimpe left
|
|||
jnthn | hmm | 02:31 | |
I don't know. | |||
I did have one question for you about something else... | 02:32 | ||
On subid | |||
I guess every PAST::Block will get a subid | |||
pmichaud | yes. | ||
jnthn | But will there be a way to say in the PAST tree "I want to get hold of that block by its subid"? | 02:33 | |
But without ending up duplicately having that block in the tree. | |||
pmichaud | yes, there will be a way to do it. | ||
I don't know what it will be yet. | |||
certainly we'll allow HLL compilers to assign subids that override the default generated one. | 02:34 | ||
jnthn | (Reason: subset types need to have their condition block live in the lexical scope they were declared in, but we want to create them earlier than that to set up the type in the namespace) | ||
So I'd want to put the block in the right lexical scope (and thus in the right place in the PAST tree, but be able to look it up in init code. | |||
So I can create the subtype referencing it. | 02:35 | ||
pmichaud | oh, the loadinit code will still have a 'block' register variable. | ||
that will be initalized with the block's PMC | |||
02:35
jferrero left
|
|||
jnthn | Oh, I can do it that way too I guess... | 02:35 | |
Ah, aye. As a loadinit on the block that is the condition. | |||
Cunning. | |||
Why don't I think of this stuff. | |||
:- | |||
) | |||
pmichaud | yes, the point is that these days are largely taken care of for you | 02:36 | |
s/these days/these types of recordkeeping/ | |||
(can't type .. a little tired tonight.) | |||
jnthn | I wish these days were taken care of for me. Then I could spend them relaxing. | ||
It's tonight where you are too? | |||
Oops. | |||
pmichaud | 20:36 localtime | ||
jnthn | I've slept at the wrong times since the Parrot summit. :-) | ||
pmichaud | I'm very familiar with that :-) | ||
02:37
FurnaceBoy left
|
|||
jnthn | Partly because I don't care about sleeping at the "right times" | 02:38 | |
pmichaud | me neither. | ||
jnthn | Only day I need to be up earlyish is Sunday for church. That's about it. | ||
I'm Rakudo daying tomorrow. | 02:39 | ||
pmichaud | okay, excellent. I should be around much of the day. | ||
jnthn | Plan to mostly look at RT. | ||
pmichaud | However, kids are off from school, so I may get distracted. | ||
yes, I'm wanting to look at RT as well. :-) | |||
jnthn | There's at least one patch from Chris Dolan I want to reivew. | ||
pmichaud | I'll probably do a few PCT things here and there, and maybe work on the HLLCompiler refactor so that we can start moving to .hll | ||
jnthn | Oh, yes, please. | ||
pmichaud | either that or I'll work on p6 builtins. | ||
02:40
Limbic_Region left
|
|||
jnthn | As in, having a Perl 6 prelude? | 02:40 | |
pmichaud | yes. | ||
jnthn | OK | ||
One thing I really want to do | |||
Refactor variable declarator. | |||
Then I can do has $.answer = 42; | |||
pmichaud | don't we need to fix signature first for that? | 02:41 | |
jnthn | Not really | ||
I mean, yes, to get it *really* right we do. | |||
But I'd rather do it a step at a time. | |||
Any objections? | 02:42 | ||
pmichaud | depends on what you mean by "a step at a time" | ||
jnthn | Until I look at it, I won't know exactly. | ||
Probably though, just fixing up the grammar to parse the initialization as in STD.pm | 02:43 | ||
pmichaud | ...that's kinda my point. | ||
jnthn | And then doing that initialization in variable_declarator | ||
OK, so you'll maybe object after I've worked it out? ;-) | |||
pmichaud | I'm trying to find where the initialization occurs now in STD.pm | 02:44 | |
jnthn | I *can* leave this on your plate if you prefer. But I am keen to get "has $.x = 42" style tings working. | ||
oh my, don't say it's changed... | |||
pmichaud | yes, it has. | ||
02:45
slavik joined
|
|||
jnthn | argh | 02:45 | |
What on earth is :dba | 02:46 | ||
pmichaud | "doing business as" | ||
it says how '(' ~ ')' <EXPR> should report back if the match fails | |||
jnthn | Ah, OK | 02:47 | |
pmichaud | anyway, I'm not sure if my $a = 3; parses as assignment or as something else. | ||
jnthn | Looking at this, now I'm really not sure how the initialization is parsed. | ||
slavik | who do I bother about not being able to do %hash = 1..5 | 6..10; | ||
pmichaud | slavik: what are you wanting that to do? | 02:48 | |
that looks like a junction of two ranges. | |||
jnthn | Hopefully give an error. | ||
slavik | rakudo: say (1..5 | 6..10).perl | ||
p6eval | rakudo 33212: OUTPUT[1..any(5, 6)..10ā¤] | ||
slavik | rakudo: say (1..5 Z 6..10).perl | ||
p6eval | rakudo 33212: OUTPUT[elements() not implemented in class 'Range'ā¤current instr.: 'infix:Z' pc 3915 (src/gen_builtins.pir:2519)ā¤] | ||
slavik | right, that | ||
pmichaud | oh, you want infix:<Z>. Send email to rakudobug. | ||
[email@hidden.address] | |||
slavik | pmichaud: zip() doesn't work at all I think | 02:49 | |
pmichaud | one of Jonathan, myself, or our other incredible team of coders will look at it. | ||
slavik | rakudo: say zip(1..5, 6..10) | ||
p6eval | rakudo 33212: OUTPUT[Could not find non-existent sub zipā¤current instr.: '_block11' pc 63 (EVAL_15:23)ā¤] | ||
pmichaud | We might not be able to do much with it because we don't have slices implemented yet. | ||
or captures. | |||
slavik | pmichaud: I have a grammar that produces two arrays, one of keys and other of values ... so I want to stick them into a hash | ||
jnthn | slavik: Infix Z works, I believe. | 02:50 | |
pmichaud | rakudo: say (3,3) Z (1,2); | ||
p6eval | rakudo 33212: OUTPUT[3132ā¤] | ||
pmichaud | that doesn't look right. | ||
jnthn | No? | ||
pmichaud | oh wait, yes it does. | 02:51 | |
jnthn | Why not? | ||
slavik | hmm | ||
pmichaud | rakudo: say ((3,3) Z (1,2)).perl; | ||
p6eval | rakudo 33212: OUTPUT[[3, 1, 3, 2]ā¤] | ||
slavik | maybe I am doing something wrong | ||
pmichaud | rakudo: my %h = <1 2 3 4> Z <a b c d>; say %h.perl; | ||
p6eval | rakudo 33212: OUTPUT[{"1" => "a", "2" => "b", "3" => "c", "4" => "d"}ā¤] | ||
pasteling | "slavik" at 67.100.227.140 pasted "URL grammar" (37 lines, 1.3K) at sial.org/pbot/33362 | ||
pmichaud | yummy. | ||
02:52
smg joined
02:53
ihrd joined
|
|||
pmichaud | that's going to be a bit weird, since the components being zipped are Match objects | 02:53 | |
I'm not sure how the hash composer is going to deal with those. | |||
slavik | it doesn't | ||
I get a {} | |||
how can I coerce them into lists? | |||
@() didn't work | |||
lambdabot | Maybe you meant: . ? @ bf ft id pl rc v wn | ||
pmichaud | they're already lists (of match objects) | ||
slavik | oh ... | 02:54 | |
so $? contains a tree of match objects, not scalars or hashes or lists? | |||
pmichaud | $/, yes | ||
slavik | right, $/ | ||
how can I make it a list of scalars though? | 02:55 | ||
{ %get{$^a} = "$^b" } for $/<resource>[0]<getstr>[0][0] Z $/<resource>[0]<getstr>[0][1]; | |||
that works | |||
pmichaud | can also do prefix:<~> | 02:56 | |
{ %get{~$^a} = ~$^b } for ... | |||
slavik | pmichaud: I want strings there :) | ||
pmichaud | prefix:<~> makes strings. | ||
slavik | oh | ||
right | |||
ihrd | perl6: sub it { for 1..5 { $_ }; }; say it(); | 02:57 | |
p6eval | pugs: No output (you need to produce output to STDOUT) | ||
..elf 23093: OUTPUT[Useless use of a variable in void context at (eval 123) line 4.ā¤ā¤] | |||
..rakudo 33212: OUTPUT[-1ā¤] | |||
jnthn | ihrd: Trust you. :-P | ||
ihrd | hi | ||
pmichaud | rakudo doesn't know return values in for loops yet. | 02:58 | |
jnthn | Maybe, the loop control exception stuff gets in the way? | ||
ihrd | but I understand right, it should return 5? | ||
pmichaud | I'd have to go back an look -- iirc, the return value of a for loop is a list of the results of its body | ||
slavik | pmichaud: like a map? | 02:59 | |
jnthn | O RLY? | ||
That's...nuts. And so Perl 6... | |||
ihrd | (1,2,3,4,5) in that case? | ||
jnthn | OH NOES! It's 4am...I should sleep! | ||
slavik | map works in this what ... | 03:00 | |
jnthn: lieas, 10PM | |||
jnthn | Where's lieas? | ||
slavik | bah | ||
lies* | |||
jnthn | Oh | ||
No, it feels like 4am too :-) | |||
slavik | has timemachine() been implemented yet? | ||
jnthn | Only on OSX. ;-) | 03:01 | |
pmichaud | S04, "Loop statements": The value of a loop statement is the list of values from each iteration. | ||
slavik | jnthn: wrong time machine ;) | 03:02 | |
very limited ... | |||
jnthn | pmichaud: ...is that as ambiguous as I think it is? ;-) | ||
pmichaud | jnthn: not really. | ||
jnthn | The values could be the values produced...or the values iterated over... | ||
pmichaud | 'for' and 'map' are equivalent, essentially. | ||
it's the value returned by each execution of the body | |||
slavik | jnthn: values produced, like map | ||
jnthn | I suspect that's the useful answer and what was meant, yes. | ||
pmichaud | not only that, but .next and .last can specify the value to be returned for the current iteration | 03:03 | |
jnthn | Perl 6 is nuts. :-) | ||
pmichaud | &?BLOCK.next(3); # return a value of 3 for this iteration | ||
thus | |||
03:03
dukeleto_ joined
|
|||
jnthn | Thus why I love working on it. ;-) | 03:03 | |
slavik | pmichaud: wha ... ? | 03:04 | |
pmichaud | sub it { for 1..5 { &?BLOCK.next(3); } }; say it(); # "33333\n" | ||
slavik | I don't get the .last and .next think | ||
jnthn | Nice! | ||
OK, I am now going to sleep. | |||
slavik | and if it was ,last? | ||
jnthn | Probably will be about midday european time. | 03:05 | |
pmichaud | sub it { for 1..5 { &?BLOCK.last(3); } }; say it() # "3\n" | ||
jnthn | night all | ||
slavik | jnthn: night | ||
ihrd | good night jnthn | 03:06 | |
03:08
ab5tract left
|
|||
slavik | pmichaud: so, how can I coerce the list of matches into a list of scalars? | 03:09 | |
rakudo: for 0..7 say $_; | 03:15 | ||
p6eval | rakudo 33212: OUTPUT[Statement not terminated properly at line 1, near "say $_;"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤] | ||
slavik | rakudo: for 0..7 { say $_; } | ||
p6eval | rakudo 33212: OUTPUT[0ā¤1ā¤2ā¤3ā¤4ā¤5ā¤6ā¤7ā¤] | ||
ihrd | excuse me, but I still in some confusion, if I want return only last value from loop, how can I do that? | 03:16 | |
slavik | ihrd: like if it generates a sequence based on previous things? | 03:17 | |
ihrd | slavik: I just do some method in loop, and whant to now last returned value from it | 03:18 | |
slavik | hmm | 03:19 | |
ihrd | right now I use workaround, like | ||
03:19
japhb left
|
|||
slavik | @(for 1..10 { $_ })[-1] | 03:19 | |
lambdabot | Unknown command, try @list | ||
slavik | or something | ||
rakudo: say @(for 1..10 { $_ })[-1]; | |||
p6eval | rakudo 33212: OUTPUT[Statement not terminated properly at line 1, near "@(for 1..1"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤] | ||
slavik | rakudo: say @(for 1..10 { $_; })[-1]; | ||
p6eval | rakudo 33212: OUTPUT[Statement not terminated properly at line 1, near "@(for 1..1"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤] | ||
slavik | rakudo: say for 1..10 { $_; }; | ||
p6eval | rakudo 33212: OUTPUT[Statement not terminated properly at line 1, near "{ $_; };"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤] | 03:20 | |
slavik | rakudo: say (for 1..10 { $_; }); | ||
p6eval | rakudo 33212: OUTPUT[-1ā¤] | ||
slavik | :( | ||
it doesn't work yet | |||
03:20
jhorwitz left
|
|||
ihrd | perl6: my $r; sub some { $^d ** 2 }; sub it { for 1..5 { my $r =some($_) } }; say $r; | 03:21 | |
p6eval | rakudo 33212: OUTPUT[ā¤] | ||
..elf 23093: OUTPUT[Global symbol "$d" requires explicit package name at (eval 127) line 4.ā¤ at ./elf_f line 3861ā¤] | |||
..pugs: No output (you need to produce output to STDOUT) | |||
pmichaud | do placeholder variables work in subs...? | ||
ihrd | perl6: my $r; sub some { $^d ** 2 }; sub it { for 1..5 { my $r =some($_) } }; it(); say $r; | 03:22 | |
p6eval | rakudo 33212: OUTPUT[ā¤] | ||
..pugs: No output (you need to produce output to STDOUT) | |||
..elf 23093: OUTPUT[Global symbol "$d" requires explicit package name at (eval 129) line 4.ā¤ at ./elf_f line 3861ā¤] | |||
ihrd | It worked for my | ||
pmichaud | well.... we can't really tell what some() is returning there. | 03:23 | |
because the $r we're saying isn't the $r we're assigning. | |||
ihrd | perl6: my $r; sub some{ $^d ** 2 }; sub it { for 1..5 { $r =some($_) } }; it(); say $r; | 03:24 | |
p6eval | pugs: No output (you need to produce output to STDOUT) | ||
..elf 23093: OUTPUT[Global symbol "$d" requires explicit package name at (eval 129) line 4.ā¤ at ./elf_f line 3861ā¤] | |||
..rakudo 33212: OUTPUT[25ā¤] | |||
ihrd | yes, excuse me | ||
now right | |||
so this is workaround, how can I do the same in perl6 without $r? | 03:25 | ||
Can I see somehow the last iteration in loop? | 03:27 | ||
something like: for 1..5 { do($_); last(1) if .it_is_last_iteration }? | 03:28 | ||
pmichaud | rakudo doesn't have a last() implemented yet. | 03:30 | |
we're waiting for a couple of fixes to parrot exception handling. | |||
(and a refactor of control blocks in general) | |||
slavik | pmichaud: are exceptions the only way to return errors? | 03:31 | |
or can we return undef | |||
pmichaud | the common way to signal an error is to use fail() | 03:32 | |
that returns a "special undef" that has the exception attached | 03:33 | ||
if anything tries to use that undef, the exception gets thrown | |||
(where "use the undef" means "do something other than check it for truth or definedness") | |||
slavik | ie: sub f { fail(); } if(f == undef) { say "failed" } | ||
or something | 03:34 | ||
pmichaud | if (!f) { say "failed" } | ||
or | |||
if (!f.defined) { say "failed" }; | |||
comparing with == undef is often wrong, because there's not just a single value of undef. | |||
slavik | so, try catch finally aren't necessary ... | ||
pmichaud | only if you want to try/catch exceptions :-) | 03:35 | |
you could do: | |||
{ say f(); CATCH { say 'failed'; } } | |||
and if f() returns a Failure object then the CATCH block gets invoked because we attemped to use the returned Failure | 03:36 | ||
slavik | I see | ||
pmichaud | (except that CATCH isn't working yet in Rakudo. See above note about needing to implement control blocks :-) | ||
slavik | but inside the if statement, it doesn't get used, just looked at, correct? | ||
pmichaud | testing for truth or definedness doesn't count as "used", no. | ||
trying to get an int, num, or str does. | 03:37 | ||
(I'm not sure what else does.) | |||
slavik | hmm | ||
does fail work? | |||
pmichaud | in Rakudo? Yes. | ||
at least I think it works. Need tests. :-) | 03:38 | ||
'try' still needs a bit of work. | |||
ihrd | I know about last in Rakudo, my question about perl6 | ||
excuse me lag :) | 03:39 | ||
slavik: [-1] do not work in perl6 as in perl5 | |||
slavik | pmichaud: if I wanted to have pir bindings for C libraries ... what is the major difficulty in this endeavor ? | ||
ihrd: huh? | 03:40 | ||
ihrd | slavik: in you exapmle should be [*-1] | ||
slavik | oh | ||
ok | |||
pmichaud | oh. Normally we say "Perl 6" when asking about the language. But yes, last(1) would cause the for loop to put a 1 as the last value in its return list. | ||
slavik: I don't know, I'm not too familiar with invoking C from PIR | |||
slavik: I know it can be done and people are doing it, but I haven't done it in years and so I'm not familiar with the details. | 03:41 | ||
ihrd | pimchaud: ok, thank you! but hov can I see that is last iteration? | ||
TimToady | @tell jnthn STD currently just parses initialization as assignment, and delegates any change in meaning of = to the semantic analysis phase | ||
lambdabot | Consider it noted. | ||
pmichaud | TimToady: yay, excellent. | ||
TimToady: that's actually what rakudo does now, so jnthn (and I) are happy to hear this. | |||
03:41
Psyche^ joined
|
|||
TimToady | it just seems like the sane thing to do, though we'll have to be careful with (state $x) += 2 and such | 03:42 | |
pmichaud | TimToady: did you see my comment about ^@a being treated as prefix:<^> on a List ? | ||
TimToady | yes | ||
dunno what to think about that | |||
pmichaud | okay. | ||
TimToady | I want contradictory things, it seems. not the first time... | 03:43 | |
pmichaud | I'm wondering if ^(3,3) is all that important or useful as a shortcut. Maybe a different shortcut. | ||
sometimes I think (language) design is just about resolving our contradictory desires. :-) | |||
TimToady | ^Ā« maybe | ||
rakudo: say ^<<(3,3) | 03:44 | ||
p6eval | rakudo 33212: OUTPUT[Statement not terminated properly at line 1, near "^<<(3,3)"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤] | ||
pmichaud | @tell jnthn (comment on TimToady's note) yay! So it is assignment, which rakudo already does, and you can start working on has $.x = 3; based on that :-) | 03:45 | |
lambdabot | Consider it noted. | ||
pmichaud | yeah, rakudo doesn't understand the hypers yet. | ||
03:45
wayland76 left
|
|||
pmichaud | silly meta_postfix_prefix_inafix_wontfix operator parsing. | 03:46 | |
TimToady | there's only 8299 possible termish tokens currently... | 03:47 | |
03:48
km2 joined
|
|||
TimToady | oops, 8298 really | 03:48 | |
pmichaud | "8299 tokens in term from the Wall... 8299 tokens in term... take one down, meta it around, 16598 tokens in term from the Wall..." | ||
TimToady | much much better | ||
pmichaud | :D | ||
TimToady | forgot the first line is the dba | ||
03:52
ihrd left
03:56
wayland76 joined
|
|||
pmichaud | time for sleep or relaxation here -- see you all tomorrow | 03:57 | |
03:58
Patterner left,
Psyche^ is now known as Patterner
|
|||
TimToady | does that mean you don't relax when you're asleep? | 03:59 | |
slavik | rofl | ||
so, TimToady ... cups | |||
TimToady | Common Unix Printing System | 04:00 | |
slavik | not that one | 04:01 | |
the broken cups ... heh | |||
there should be an easter egg relating to it | 04:02 | ||
04:03
elmex_ joined
04:17
elmex left,
elmex_ is now known as elmex
04:25
stephens left
|
|||
pugs_svn | r23094 | putter++ | [elf_h] Match.pm: Fix string literals with unquoted escapes. | 04:25 | |
r23094 | putter++ | [STD_blue] Triage remaining elf source files. | |||
r23095 | hinrik++ | [util/perl6.vim] add support for directives (=use, =config, =encoding) and verbatim regions | 04:27 | ||
04:47
ab5tract joined
04:48
ab5tract left,
alc joined
04:51
revdiablo joined
04:56
wayland76 left
04:57
slavik left
05:04
xinming joined
05:11
xinming_ left
05:45
apeiron left
05:48
smg left
06:11
Bzek joined
06:45
kst` left,
kst` joined
06:46
ashizawa joined
06:49
wayland76 joined
06:56
aindilis` left,
aindilis` joined
07:05
DemoFreak joined
07:18
smg joined
07:34
Jedai left,
Coleoid__ joined,
Jedai joined
07:35
japhb joined
07:37
pnu left
07:38
pnu joined
07:39
Coleoid left,
Coleoid__ is now known as Coleoid
|
|||
moritz_ | rakudo: say (^(2,3)).perl | 07:48 | |
p6eval | rakudo 33212: OUTPUT[[0, 1, 0, 1, 2]ā¤] | ||
moritz_ | rakudo: say (^(3,3)).perl | ||
p6eval | rakudo 33212: OUTPUT[[0, 1, 2, 0, 1, 2]ā¤] | ||
07:51
justatheory joined
|
|||
wayland76 | rakudo: say .WHAT() | 07:51 | |
p6eval | rakudo 33212: OUTPUT[Failureā¤] | ||
moritz_ | rakudo: say (^(10,3)).perl | ||
p6eval | rakudo 33212: OUTPUT[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2]ā¤] | ||
wayland76 | Well, it was worth a go :) | ||
moritz_ | wayland76: it's not wrong, $_ is undef, which can be an instance of class Failure | 07:52 | |
07:58
pcbuetow left
08:00
justatheory left
08:01
lambdabot joined
08:05
bacek_ left
|
|||
wayland76 | Oh, I agree it's not wrong, I just wanted to see what it would do (I was being silly) | 08:05 | |
rakudo: y0! | 08:06 | ||
p6eval | rakudo 33212: OUTPUT[Statement not terminated properly at line 1, near "!"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤] | ||
wayland76 | rakudo: 0! | ||
p6eval | rakudo 33212: OUTPUT[Statement not terminated properly at line 1, near "!"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤] | ||
wayland76 | No zero-factorial :) | 08:07 | |
moritz_ | postfix:<!> is not part of the language | 08:10 | |
(we had to leave at least one simple example for those who want to show off with defining operators :-) | |||
08:30
iblechbot joined
|
|||
wayland76 | rakudo: sub postfix:<!> { say "Sending mail using postfix... :)"; } | 08:33 | |
p6eval | rakudo 33212: OUTPUT[Statement not terminated properly at line 1, near ":<!> { say"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤] | ||
wayland76 | rakudo: sub postfix:<!>() { say "Sending mail using postfix... :)"; } | 08:34 | |
p6eval | rakudo 33212: OUTPUT[Statement not terminated properly at line 1, near ":<!>() { s"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤] | ||
wayland76 | rakudo: sub postfix:<!>(String a, String b) { say "Sending mail using postfix... :)"; } | ||
p6eval | rakudo 33212: OUTPUT[Statement not terminated properly at line 1, near ":<!>(Strin"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤] | ||
moritz_ | wayland76: rakudo doesn't let you define operators yet | ||
wayland76: and the signature would be ($a), not (String a, ...) or something | 08:35 | ||
wayland76 | Oh, yeah, forgot; I have a project or two that are waiting on operator overloading :) | ||
(ie. so I should've known); thanks :) | 08:36 | ||
moritz_ | STD.pm does parse it correctly, and even parses the defined operator with correct precedence | ||
std: 5! | |||
wayland76 | STD: sub postfix:<!>(String a, String b) { say "Sending mail using postfix... :)"; } | ||
p6eval | std 23095: OUTPUT[############# PARSE FAILED #############ā¤Syntax error at /tmp/JaFLgI1O8t line 1:ā¤------> 5!ā¤ expecting any of:ā¤ POSTā¤ infix or meta-infixā¤ infix stopperā¤ postfixā¤ postfix_prefix_meta_operatorā¤ standard stopperā¤ statement modifier loopā¤ | ||
..terminatorā¤ whitespaceā¤00:0... | |||
wayland76 | STD: sub postfix:<!>($a) { say "Sending mail using postfix... :)"; } | 08:37 | |
moritz_ | wayland76: you still need sigils on your variables (and String isn't a builtin type) | ||
wayland76 | STD: sub postfix:<!>($a) { say "Sending mail using postfix... :)"; } 5! | ||
moritz_ | I think we borked evalbot :) | 08:38 | |
wayland76 | Uh-oh -- now that I know how to do it... :) | ||
08:39
p6eval joined
|
|||
moritz_ | std: sub postfix:<!>($a) { say "Sending mail using postfix... :)"; } 5! | 08:39 | |
p6eval | std 23095: OUTPUT[############# PARSE FAILED #############ā¤Syntax error at /tmp/A43rmv7nyt line 1:ā¤------> y "Sending mail using postfix... :)"; } 5!ā¤ expecting any of:ā¤ infix or meta-infixā¤ infix stopperā¤ standard stopperā¤ statement modifier loopā¤ terminatorā¤00:12 | ||
moritz_ | ah no, it's just case sensitive | ||
p6eval | ..156mā¤] | ||
moritz_ | std: sub postfix:<!>($a) { say "Sending mail using postfix... :)" }; 5! | ||
wayland76 | Ok :) | 08:40 | |
p6eval | std 23095: OUTPUT[00:12 156mā¤] | ||
moritz_ | and there need to be a ; after } unless it's followed be a newline | ||
wayland76 | Ok :) | ||
DemoFreak | rafl: gm ;) | 08:49 | |
rafl | DemoFreak: moin! | 08:53 | |
08:55
schmalbe joined
09:01
justatheory joined
09:10
ejs joined
09:11
revdiablo left
09:13
kane_ left
09:19
dukeleto_ left
09:21
justatheory left,
kane_ joined
09:44
smallfish left
09:47
smg left
10:21
alc left
10:55
apeiron joined
10:59
drbean joined
11:17
smg joined
11:23
smg left
11:25
ashizawa left,
ashizawa joined,
cookys joined,
lisppaste3 joined,
rafl joined
11:51
kanru left
11:52
kanru joined
12:05
vixey joined
12:15
drbean_ joined
12:28
drbean left
12:33
meppl joined
12:34
dalek left,
dalek joined,
alech left
|
|||
pugs_svn | r23096 | jnthn++ | [t/spec] Unfudge complex autoviv test for Rakudo. | 12:36 | |
rakudo_svn | r33214 | jonathan++ | [rakudo] Complex multis for various ops should coerce their maybe-not-Complex argument so we don't run into Parrot MMD errors. Do it by introducing .Complex method on Any and calling that. | 12:40 | |
12:54
smg joined,
sri_kraih_ joined
12:55
Bzek left
13:03
Bzek joined
13:04
d4l3k_ joined,
wolv joined,
jnthn_ joined
|
|||
pugs_svn | r23097 | jnthn++ | [t/spec] Tests for declaring and doing roles in namespaces. | 13:04 | |
13:05
pmichaud_ joined,
wolverian left,
PerlPilot joined,
wolv is now known as wolverian,
dalek left,
pmichaud left,
PerlJam left,
d4l3k_ is now known as dalek,
jnthn left
|
|||
rakudo_svn | r33215 | jonathan++ | [rakudo] Fix declaration and doing of roles in multi-jointed namespaces. Patch partly courtesy of Chris Dolan. | 13:10 | |
r33216 | jonathan++ | [rakudo] Add namespaced roles test file. | |||
13:12
sri_kraih left,
jnthn_ left
13:26
StephenPollei joined
13:32
ruoso joined
|
|||
ruoso | Hello! | 13:35 | |
lambdabot | ruoso: You have 1 new message. '/msg lambdabot @messages' to read it. | ||
rakudo_svn | r33217 | jonathan++ | [rakudo] Fix bug in enum code generation. When adding a vtable method, you need to mark it anon too, otherwise it'll also appear as a normal method. | 13:40 | |
ruoso | @tell pmurias git clone [email@hidden.address] | 13:49 | |
lambdabot | Consider it noted. | ||
ruoso | @tell pmurias but I didn't start anything yet there... I'm quite convinced we can do a lot of things without it, like most of the boostrapping of ClassHOW and Object... | 13:51 | |
lambdabot | Consider it noted. | ||
13:55
jonathan_ joined,
jonathan_ is now known as jnthn
|
|||
jnthn | rakudo: eval { class A { has $.x } }; say A.new(x=>5).x | 13:55 | |
p6eval | rakudo 33217: OUTPUT[5ā¤Null PMC access in find_method()ā¤current instr.: 'parrot;Perl6;Compiler;main' pc 138837 (src/gen_actions.pir:14613)ā¤] | ||
jnthn | Hmm. But it doesn't do that in the REPL... | ||
But with -e it does. Oddness. | 13:56 | ||
13:58
schmalbe left
|
|||
rakudo_svn | r33218 | jonathan++ | [rakudo] Add a missing null check in !clone_attr. | 14:00 | |
r33219 | bernhard++ | [codingstd] remove a trailing space | |||
14:22
PerlPilot is now known as PerlJam
14:25
pmichaud_ left,
pmichaud joined
14:27
PerlJam left,
PerlJam joined
14:32
ejs left,
ejs joined
14:38
masak joined
14:42
ashizawa left
|
|||
pugs_svn | r23098 | jnthn++ | [t/spec] Eliminate useless/wrong use of eval. | 14:57 | |
14:57
ejs left
14:58
smg left
|
|||
rakudo_svn | r33220 | jonathan++ | [rakudo] Should check the parameter passed to eval is a string, in line with S29. | 15:00 | |
15:09
ejs joined
15:11
adc_penner joined
|
|||
pugs_svn | r23099 | ruoso++ | [mildew] simplify lexical-sub test a little bit... | 15:12 | |
rakudo_svn | r33221 | jonathan++ | [rakudo] Call panic on sub-nodes of EXPR nodes, which end up being PGE::Match rather than Perl6::Grammar. This means we show the intended, helpful error. | 15:20 | |
15:20
ejs left
|
|||
rakudo_svn | r33222 | jonathan++ | [rakudo] When we fail a type check on a parameter, report the name of the thing we were calling. | 15:30 | |
15:34
Lorn joined
|
|||
pugs_svn | r23100 | ruoso++ | [mildew] lexical subs working!!!! | 15:39 | |
15:46
jhorwitz joined
15:55
stephens joined
|
|||
pugs_svn | r23101 | ruoso++ | [smop] idconst supports .true, it is only false for 0-sized identifiers... | 16:01 | |
r23101 | ruoso++ | [mildew] a test showing that recursion on lexical subs work! | |||
moritz_ | ruoso: did you see the "man or boy" test? | 16:04 | |
ruoso | moritz_, I don't think so | ||
moritz_ | ruoso: t/spec/integration/man-or-boy.t | 16:05 | |
ruoso: in that file there's a link to wikipedia with background | |||
ruoso: it''s basically a heavy regression test for lexial vars and subs | |||
ruoso | cool | 16:07 | |
I'll take a look | |||
moritz_ | ruoso: you might need to desugar it a bit before it runs on mildew, but if lexical subs work than all the grunt work is already there | 16:08 | |
ruoso | moritz_, yes... mildew still lacks "for", which is the next thing on list btw | 16:09 | |
and comparison tests also | |||
but besides that, I kinda think it would work | |||
16:10
pmurias joined
|
|||
pugs_svn | r23102 | ruoso++ | [mildew] small fix in the way to treat arguments to terms | 16:10 | |
ruoso | moritz_, mildew is kinda coming the other way around if we compare to rakudo, for instance... | ||
pmurias | ruoso: hi | 16:11 | |
lambdabot | pmurias: You have 2 new messages. '/msg lambdabot @messages' to read them. | ||
moritz_ | ruoso: yes, I noticed :-) | ||
ruoso | hi pmurias | ||
pmurias | |||
(touchpad)--- | |||
moritz_ | pmurias++ # keep karma preservation law valid :-) | 16:12 | |
ruoso | btw... mildew pass 30 tests now... of its own test suite, of course... | 16:13 | |
pmurias | that's not much | ||
ruoso | well.. it's 100% | ||
:D | |||
that's a prettier number ;) | |||
masak | statistics++ | 16:14 | |
ruoso | now we just need "for", "map" and "grep" to support ClassHOW.can | 16:17 | |
then we might have the proper ClassHOW.dispatch implemented | |||
pmurias | we could just use "map" instead of those 3 things | ||
ruoso | yeah... it's almost the same thing... | 16:18 | |
but I still would like to have some clarification on the iterator issues | |||
before we implement it | |||
but for some reason I think TimToady is expecting us to TITS and then he will realize if it's a good approach | 16:19 | ||
pmurias | ruoso: re smop5 it would be usefull if we wanted a proper compiletime/runtime mixing | 16:20 | |
rakudo_svn | r33225 | jonathan++ | [rakudo] Refactor .= operator so that it now handles having a container looked up from a keyed access on the LHS. | ||
ruoso | pmurias, indeed... but I think we still have a lot of work to do before we can do that type of mixing | ||
TimToady, do you think you would have clarifications on the iterator issues soon? or are you expecting implementations to experiment and do all the proofs of concept before we have a detailed spec? | 16:23 | ||
pmurias | ruoso: how much things do we need before we can bind a C++ class? | 16:24 | |
ruoso | pmurias, it depends whether you want to callback smop or nto | 16:25 | |
s/nto/not/ | |||
16:25
sri_kraih joined
|
|||
pmurias | i just want to try binding the Ogre game engine ;) | 16:25 | |
ruoso | using foreign objects should be fien | 16:26 | |
fine | |||
you just need a typemap | |||
pmurias | ruoso: why is callbacking smop difficult | ||
? | |||
ruoso | pmurias, because it would probably require longjmp hacks | 16:27 | |
16:29
smg joined,
sri_kraih__ joined
|
|||
ruoso | pmurias, but maybe implementing a longjmp SMOP frame would be a good idea | 16:29 | |
there's probably a way to do it as a generic thing | 16:30 | ||
probably something like setting up a continuation for a C call... | |||
which is a SMOP interpreter | 16:31 | ||
rephrasing... | |||
a "C Coroutine SMOP Interpreter" | |||
so it could interoperate with other interpreters | |||
that's actually a freaking cool idea | 16:33 | ||
and a very important step in the SMOPP5 project, to support XS-Compatibility | |||
pugs_svn | r23103 | jnthn++ | [rakudo] Some tests for .= operator. | 16:34 | |
pmurias | ruoso: how is it supposed to work? | 16:36 | |
16:37
dukeleto joined
|
|||
ruoso | pmurias, the glue code would setup this "c coro interpreter" before calling the actual C code | 16:37 | |
in the middle of the C code, when calling back to SMOP | |||
it would save the current C context inside a new "SMOP continuation", which would be set as the "current continuation" | 16:38 | ||
and it would return to the main SMOP loop, using the context saved before calling the actual C code | |||
16:39
Exodist joined
|
|||
ruoso | then the SMOP code would set a new continuation | 16:39 | |
continue the loop | |||
eventually call setr | |||
and goto | |||
then it would call eval | |||
and it would simply resume the C coroutine | |||
probably returning the value sent in the setr | 16:40 | ||
pmurias | ruoso: you are aware we can only unwind the stack with setjmp/longjmp | ||
ruoso | hmmmm... | 16:41 | |
16:41
sri_kraih_ left
|
|||
ruoso | there should be a way | 16:41 | |
16:44
sri_kraih left
|
|||
ruoso | pmurias, I'm not sure that's entirely true | 16:44 | |
16:45
hercynium joined
|
|||
ruoso | pmurias, isn't it possible to save a state before calling a function, save another state inside the function, longjmp to the outer state and longjmp to the inner state again? | 16:45 | |
as long as the functions that call setjmp don't return | 16:46 | ||
which is the case for the SMOP main loop | |||
pmurias | ruoso: not safely | 16:47 | |
ruoso | why? | ||
pmurias | if you recurse in that function you overwrite the stack | ||
ruoso | hm? | ||
pmurias | setjmp doesn't save the stack it only saves the location of the stack top | 16:49 | |
ruoso | right... that's why you can't return | ||
(without invalidating the saved stack) | 16:50 | ||
pmurias | when i longjump to the outer state and call a function the new function uses the part of the stack used by the inner function | ||
ruoso | you mean that it can't have two stacks with the same root | 16:52 | |
well... I think there are coro implementations in C | 16:53 | ||
they probably already solved all this issues | |||
pmurias | ruoso: it's possible if you reserve space on the stack | 16:55 | |
pmurias has to think it over | 16:57 | ||
16:57
pmurias left,
schmalbe joined
|
|||
ruoso | @tell pmurias www.softpanorama.org/Lang/Cilorama/...in_c.shtml | 16:58 | |
lambdabot | Consider it noted. | ||
ruoso | @tell pmurias better yet: www.xmailserver.org/libpcl.html | 17:04 | |
lambdabot | Consider it noted. | ||
17:07
IRSeekBot left
17:13
renormalist left
17:15
masak left
17:18
d4l3k_ joined,
dalek left,
d4l3k_ is now known as dalek
17:28
[particle] joined
17:32
araujo left,
dukeleto left
17:55
smg left
|
|||
rakudo_svn | r33228 | jonathan++ | [rakudo] Use the Class PMC's new add_vtable_override method. | 18:20 | |
18:27
bacek left
18:28
km3 joined
|
|||
pugs_svn | r23104 | moritz++ | [t/spec] simplify man-or-boy.t | 18:29 | |
18:40
[particle] left
|
|||
rakudo_svn | r33230 | jonathan++ | [rakudo] Make 'my &x = sub { ... }' store the sub lexically. | 18:40 | |
18:40
km2 left
|
|||
TimToady | what's with all the "sub {...}" when bare "{...}" should work just the same? | 18:41 | |
moritz_ | paranoia ;) | ||
18:42
bacek joined
18:46
[particle] joined
18:52
mtrimpe joined
19:08
tewk_ is now known as tewk,
[particle] left
19:09
[particle] joined,
[particle] left
|
|||
rakudo_svn | r33231 | jonathan++ | [rakudo] Bug fix for subs that take parameters with the & sigil; we need to register the symbol after we stripped. | 19:10 | |
19:11
mtrimpe left
19:13
ZuLuuuuuu joined,
kst` is now known as kst
19:14
aindilis` left,
aindilis joined
|
|||
TimToady | hmm, looks like commmitbit is down again :( | 19:20 | |
well, can't look at it now, gotta do a school run... | |||
bbl & | |||
19:21
ZuLuuuuuu left
|
|||
moritz_ | TimToady: it's up again | 19:24 | |
19:26
smg joined
19:33
araujo joined
|
|||
pugs_svn | r23105 | jnthn++ | [t/spec] Just compute the first 10 values of the boy or man test; it's enough to see it works and avoids hitting Parrot's default 1000 recursion levels limit. | 19:46 | |
r23106 | moritz++ | [t/spec] more comments to man-or-boy.t | 19:48 | ||
19:49
pbuetow joined
|
|||
rakudo_svn | r33233 | jonathan++ | [rakudo] A crack at getting is copy to do the right thing. We may need to revisit this again later, as I've still not convinced myself it's going to do the right thing in every case (but didn't work out one where it won't yet). It passes all spectests that already passed and | 19:50 | |
..makes the man or boy example's use of is copy work, though. | |||
r33234 | jonathan++ | [rakudo] Add the man or boy test to spectest. | |||
19:52
mncharity joined
|
|||
pmichaud | TimToady (and others): where do we want the synopsis documents to live in pugs/ ? | 19:54 | |
19:56
pbuetow left
20:07
PZt left
20:09
PZt joined
|
|||
moritz_ | what's wrong with the current location, docs/Perl6/Spec/ ? | 20:12 | |
pmichaud | nothing, just making sure that's where we want them. | 20:21 | |
moritz_ | some brave soul needs to fix smartlinks.pl after that ;) | 20:22 | |
TimToady | we probably want to move to names like S16-io.pod or some such | 20:23 | |
pmichaud | I'll get the S##.pod files into docs/Perl6/Spec | ||
then they can be easily renamed from there. | |||
(or moved to other directories) | |||
TimToady | thanks | ||
pugs_svn | r23107 | putter++ | [misc/elfish/STD_blue] Continued adaptation to current STD.pm/gimme5. | 20:25 | |
r23107 | putter++ | Tweaks for: some hash literal support; foofix:<x> names; slurpy params; classname literals; empty multisigs. One more elf source file works. | |||
pmichaud | ...temporarily disabling pugs-commit mailing list so we don't end up with 100+ commit messages | 20:27 | |
pugs_svn | r23108 | jnthn++ | [t/spec] Couple of tests for lexicals with & sigil. | 20:28 | |
mncharity | TimToady: It looks like I'm getting down to two issues. (a) ./viv ../../misc/elf/elf_h_src/PrimitivesP5.pm burns >3GB on the 150 line file before I have to kill it. (b) The previously mentioned $.m(3) arguments showing up in an unexpected place. (b) I can work around, though it would be nifty if it "just worked". (a) is more painful. Any thoughts? | 20:29 | |
20:29
Exodist left
|
|||
mncharity | bbiab | 20:30 | |
20:30
a-lex joined,
a-lex left
|
|||
pugs_svn | r23109 | pmichaud++ | Creating dirs for synopsis load from perl.org | 20:32 | |
pmichaud | prepare for possible flood of pugs_svn commits | 20:33 | |
unless someone knows how to turn it off briefly | |||
moritz_ | there's nothing wrong with a brief flood ,) | ||
jnthn | Provided we get a nice rainbow afterwards. ;-) | 20:34 | |
20:34
[particle] joined
|
|||
pmichaud crosses fingers, hope he doesn't screw this up. | 20:34 | ||
pugs_svn | r23115 | allison++ | Adding the first two retroactive synopses. | 20:35 | |
r23116 | allison++ | draft of syntax synopsis, after review by p6l | |||
r23117 | larry++ | 2004 edition of rules. :-) | |||
r23118 | larry++ | utf8ified, random cleanup | |||
r23119 | larry++ | Structure is good. | |||
r23120 | larry++ | Added precedence table, random cleanup. | |||
r23121 | larry++ | Forgot utf8ification. | |||
r23122 | larry++ | Utf8ified. | |||
r23123 | larry++ | Random cleanup. | |||
r23124 | larry++ | Documented "=" package. | |||
r23125 | larry++ | Added notes about optimizing closures to mere blocks. | |||
r23126 | larry++ | Incomplete utf8ification of E<> forms. | |||
r23127 | larry++ | Utf8ification. | |||
r23128 | luqui++ | Added the =~ to ~~ operator renaming. | |||
r23129 | larry++ | Changed $=line et al. to $?line. | |||
r23130 | larry++ | Uppercased the compiler variables. | |||
r23131 | larry++ | Added examples of $? variables. | |||
r23132 | larry++ | Recent tweaks to &?SUB and such. | |||
r23133 | larry++ | Forgot to change date and version. | |||
r23134 | larry++ | Clarified whitespace proscription following sigils. | |||
r23135 | larry++ | Changed symref syntax back to ::($str) to not be ambiguous with %foo::{$key}. | |||
r23136 | larry++ | Added ::?CLASS and ::?ROLE forms. | |||
r23137 | larry++ | Changed main default to strict. | |||
r23138 | larry++ | Simplified operator quoting rules by unification with hash subscript syntax. | |||
20:35
pugs_svn left
|
|||
moritz_ | ok, enough flood for now ;) | 20:36 | |
literal | aww | ||
pmichaud | yes, I'm up to revision 23500 on the import already | ||
so we would've been here a while. | |||
TimToady | yowser | ||
pmichaud | I really hope I disabled the mail send properly. :-) | 20:37 | |
pmichaud checks | |||
looks like "yes." | 20:38 | ||
we're now up to 24057. | 20:39 | ||
literal | hm, what's the difference between doc/trunk/design/syn/S*.pod and vim docs/Perl6/Spec/*.pod ? | ||
pmichaud | do we just want them in Spec/, or should we have a special dir for the synopses? | ||
literal: doc/trunk/design/syn/S* is where they were in the original repository | |||
literal: I'll just move them now to their new location. | |||
literal | I see | 20:40 | |
pmichaud | and then drop doc/trunk/design/syn | ||
okay to restart pugs_svn | 20:42 | ||
20:43
pugs_svn joined
|
|||
pugs_svn | r24058 | pmichaud++ | Move synopses to their new home. | 20:43 | |
r24059 | pmichaud++ | remove obsolete doc/* dirs from synopsis migration. | 20:44 | ||
pmichaud | restored email to pugs-commits | 20:46 | |
TimToady: do you want me to re-apply the updates since last Wednesday for you...? | |||
TimToady | if you've got 'em handy | ||
moritz_ | pmichaud: are all synopsis in the pugs repo now? | ||
pmichaud | I can get them handy. :-) | ||
moritz: yes. | |||
literal | where were they before? | 20:48 | |
ruoso entering annoying mode... | |||
TimToady, have you seen my earlier question? | |||
moritz_ | literal: in the svn.perl.org repository | ||
literal | ok | 20:49 | |
TimToady | ruoso: yes, I think there are 4 or 5 levels of laziness/eagerness we need to look at supporting | ||
ruoso | looks complicated | 20:50 | |
TimToady | on one end there's strictly eager that returns you the entire list | ||
pmichaud | TimToady: okay if they go in as one commit instead of three? | ||
TimToady | at the other is strictly lazy that only does the minimal work to return 1 value | ||
pmichaud: sure | |||
but we also want to support mostly-eager, that does everything not known to be infinite | 20:51 | ||
and mostly-lazy, that returns a list of what we know right now without doing any more (significant) work | 20:52 | ||
where 'significant' might also have more than one meaning | |||
pugs_svn | r24060 | pmichaud++ | (re-)apply larry++ commits since repository was archived. | ||
TimToady | my assumption is mostly-lazy will be more efficient than strictly lazy | ||
pmichaud | okay, the synopses are migrated. | 20:53 | |
TimToady | in any case, we need an item context iterate, and more than one list-context iterate | 20:54 | |
which might be a single function with a laziness knob | |||
20:55
masak joined
|
|||
TimToady | beyond that, I suspect which approaches are most efficient and dwimmy may be platform dependent | 20:55 | |
so I'm inclined to bind to mostly lazy and mostly eager by default, with pragmatic control in a lexical scope for other defaults | |||
but I'm also interested in seeing the various platforms participate in the design of this, which is another reason the new S7 is out in the pugs repo | 20:56 | ||
20:57
araujo left
|
|||
pmichaud | excellent, hadn't seen that yet. | 20:58 | |
ruoso | TimToady, so I think we do need an Iterator type | ||
TimToady | oh, and there's hyper in there somewhere as well | ||
pmichaud | ...where is the S7? | ||
TimToady | ain't one yet | ||
20:58
araujo joined
|
|||
pmichaud | ohhhhhh | 20:58 | |
TimToady | it's one of the numbers I stole on the spreadsheet the other day | ||
pmichaud | I misunderstood "is out in the pugs repo" | 20:59 | |
we should put an index into Spec/ | |||
call it S00.pod :-P | |||
TimToady | copy from spreadsheets.google.com/ccc?key=p8p...v7Fsq9u4eA maybe | 21:00 | |
pmichaud | commits to the synopses will now go to pugs-commits list. Should commits to docs/Perl6/Spec/ also go to p6l ? | ||
moritz_ | pmichaud: yes, IMHO | ||
TimToady | yes, IMNSHO | 21:01 | |
pmichaud | 1+infinity == the 'ayes' have it. | ||
ruoso | TimToady, what do you think about the approach in www.perlfoundation.org/perl6/index....p_operator | ||
TimToady | it's surreal... | ||
lambdabot | Title: SMOP map operator / Perl 6 | ||
TimToady | so we need a surreal iterator as well, that goes beyond infinity | ||
ruoso | TimToady, I'm mostly trying to figure out how that is represented in terms of an API | 21:02 | |
considering I'd expect it to be easily re-implemented by the user | 21:03 | ||
21:03
alech joined
|
|||
TimToady | looks relatively sane to have different actual types that depend on the context; at bind time you could call the iterator factory to make the right subtype | 21:05 | |
ruoso | right... that was my plan | 21:06 | |
so we have two parts on that issue | |||
1) the iterator api | |||
which is always lazy | |||
2) the eagerness triggers | |||
TimToady | if we have list iterators that can return multiple values, then for might prefer an iterator that returns N values without having to call item = multiple times | ||
ruoso | we do have list iterators that can return multiple values, aka, map | 21:07 | |
TimToady | how you structure it will depend on how efficient/inefficient the lazy item = is | ||
I think defining everything in terms of item = is likely to be a performance mistake | 21:08 | ||
but maybe not | |||
ruoso | I'm considering that optimizations can be done | ||
if you know then actual implementation type | |||
TimToady | okay, as long as the API is rich enough | ||
pmichaud | at the same time, rich api should not be too constraining | 21:09 | |
TimToady | we can probably afford a fairly rich API since most of this is hidden from the user | ||
ruoso | hidden from "most" users | ||
but available to some | |||
that's my point | |||
and in SMOP, it will be implemented in terms of the API at start... | |||
only optimizers will get it faster, later... | 21:10 | ||
TimToady | sure, but even the API might have some implementation dependencies... | ||
unless we're sure everything can be expressed in terms of everything else. | |||
well, probably too early to worry about that | 21:11 | ||
ruoso | that's an assumption I'm making | ||
SMOP actually needs it | |||
because that's how SMOP is bootstrapping its type system | |||
pmichaud | I think "everything can be expressed in terms of everything else" might limit implementations a bit. But I'll wait for a spec. | ||
TimToady | other platforms will provide other primitives, likely | ||
ruoso | pmichaud, if the interpreter know all the participants, it can optimize away the API use | ||
TimToady | and if a platform doesn't provide a particular degree of laziness, it's just have to collapse one or more levels | 21:12 | |
pmichaud | "interpreter knows all the participants" I find to be unrealistic in many cases. | ||
for on, it sounds like we're assuming an interpreter. :-) | |||
*one | |||
ruoso | s/interpreter/runtime/ | ||
pmichaud, the thing is that, in Perl 6, you can't really know from start if the type is the type | 21:13 | ||
you only know that at very late run time | |||
pmichaud | ruoso: I agree. | ||
ruoso | and that applies to very basic language operations | ||
because there are no basic language operations... | |||
everything is dispatched as high-level | |||
so foreign objects will be potentially used by otherwise low-level operators | 21:14 | ||
but most of the time, | |||
you'll be dealing with native types | |||
er... | |||
native meaning things in your code base | |||
i.e. p6opaque | |||
pmichaud | as I said, I'll wait for a spec and comment then. | 21:15 | |
ruoso | or a compact int array | ||
pmichaud | okay, pugs commits to docs/Perl6/Spec are now being sent to p6l. | ||
TimToady | I think the best way to develop this api is by bouncing a straw man back and forth a few times | ||
ruoso | the thing is that in SMOP, I start assuming everything is foreign | 21:16 | |
pmichaud | Someone probably needs to subscribe or otherwise whitelist messages coming from [email@hidden.address] | ||
I'm not sure how to do that. | |||
ruoso | so I can have dumb types in SMOP that play the role of high-level types | ||
i.e. "constant identifiers" | |||
pmichaud | I'll bbl. | 21:17 | |
ruoso | that's why an API is so important to me | ||
so I can replace the dumb implementations with the complete ones as the runtime evolves | |||
TimToady, but anyway... is it ok to assume that List assignment should replace its internal storage, leaving the references to the old storage valid? | 21:18 | ||
21:20
PtZ joined
|
|||
ruoso | that question basically means: Is list assignment implemented by the lvalue list itself? or does the runtime replaces the array? | 21:20 | |
ruoso have to leave now... | 21:21 | ||
ruoso will backlog | |||
21:22
ruoso left
|
|||
TimToady | the goal for assignment in general is for it to work as much as possible like Perl 5 does it, within reason | 21:24 | |
there isn't really a "list assignment" exactly. There's assignment to an array, and assignment to a slice. | 21:25 | ||
a slice assignment just sends as many values (copy semantics) to each element that wants them, left to right | 21:26 | ||
if any element of the slice is an entire array or hash, then the rest of the list is treated as a array/hash assignment | |||
with array/hash assignment, the container empties itself, then copies everything in | |||
pmichaud | back (finished putting thanksgiving groceries away) | 21:28 | |
21:28
PZt left
|
|||
pmichaud | TimToady: what you describe sounds like the way rakudo is going. | 21:29 | |
(or, perhaps I should say that my plans for rakudo match what you just said.) | |||
TimToady | note that p5 goes to extra lengths to make sure that ($a,$b) = ($b,$a) works without clobbering the rhs value of $a | 21:31 | |
21:34
schmalbe left
|
|||
TimToady | and, in fact, a strictly lazy implementation cannot do ($a,$b) = ($b,$a) properly at all | 21:37 | |
pmichaud | on this topic, S02-literals/autoref.t has stuff like: | ||
@other[1] = @array; | |||
TimToady | so I think the moslty-eager is the right default for assignment | ||
pmichaud | where it expects @array to become an arrayref. I think that's a list assignment. | ||
TimToady | yeah | 21:38 | |
pmichaud | to do the arrayref, would @other[1] = $@array; work? | ||
TimToady | or item @array | ||
pmichaud | okay | ||
TimToady | or [@array], of course | ||
pmichaud | I'll change the tests, then. | ||
that answers one of my (as yet unanswered) questions on p6l | 21:39 | ||
TimToady | hmm, don't recall seeing that one | ||
pmichaud | I think you might've been shouldering other issues then. | ||
21:40
hercynium left
|
|||
pmichaud | original at groups.google.com/group/perl.perl6....1381d4a2b1 | 21:41 | |
TimToady | always seem to get ADD when I don't need it, and vice versa... | ||
lambdabot | Title: More about arrayref/hashref in spectest suite - perl.perl6.language | Google Gro ..., tinyurl.com/6cmvb9 | ||
moritz_ | rakudo: say [].min | 21:43 | |
p6eval | rakudo 33241: OUTPUT[Use of uninitialized valueā¤ā¤] | ||
masak | bug? :) | 21:44 | |
21:44
Lorn left
|
|||
pmichaud | min of an empty list should be...? | 21:44 | |
masak | Inf? | ||
TimToady | +Inf | 21:45 | |
moritz_ | NaN? undef? FATAL_WARNING? | ||
masak files rakudobug | |||
TimToady | according to S03, if you consider it equiv to [min]() | ||
pmichaud | undef is what it returns now. | 21:46 | |
and .min isn't constrained to be numeric, is it? | |||
TimToady | no, but +Inf isn't constrained to be numeric either, necessarily | 21:47 | |
pmichaud | ah. :-) | ||
Tene | p6eval: [].min | ||
pmichaud | Tene: try 'rakudo' or 'perl6' | 21:48 | |
literal | perl6: [].min | ||
p6eval | pugs: No output (you need to produce output to STDOUT) | ||
..elf 24060: RESULT[undefā¤] | |||
..rakudo 33243: RESULT[undef] | |||
moritz_ | pugs is broken in p6eval atm | ||
pmichaud | it might be nice if p6eval responded to "p6eval:" | 21:49 | |
moritz_ | pmichaud: with a usage message? or with the same as 'perl6:'? | 21:51 | |
pmichaud | I was thinking same as 'perl6' | 21:52 | |
21:52
smg left
|
|||
pmichaud | but usage message could work. | 21:52 | |
21:52
pbuetow joined
|
|||
pugs_svn | r24061 | moritz++ | [evalbot] implement usage message as suggested by pmichaud++ | 21:56 | |
21:57
p6eval left,
p6eval joined
|
|||
moritz_ | p6eval: say "hi" | 21:57 | |
rakudo: say "alive" | 21:58 | ||
p6eval | rakudo 33243: OUTPUT[aliveā¤] | ||
moritz_ wonders why it didn't work... | 22:05 | ||
mncharity | back | 22:07 | |
TimToady: where are we at? | 22:09 | ||
TimToady | mncharity: re (a), currently STD generates a new lexer for every macro, which seems to chew up memory quickly | 22:12 | |
I need to find some way of cutting down unnecessary lexer generation | |||
mncharity | macro? you mean multi infix:<blah> decls? | 22:14 | |
moritz_ | if there'a already a proto for that another multi shouldn't require a new lexer. | 22:15 | |
22:18
Bzek left
|
|||
mncharity | there are 50 multis. but little overlap - almost all are distinct... (don't know what our vocabulary is)... names. | 22:18 | |
wayland76 | Are macros generally better than eval? | ||
moritz_ | is fish better than bycicles? ;-) | ||
masak | yes! | 22:19 | |
(at least in water) | |||
mncharity | So 50 lexers at 3GB is order 100MB per lexer... does that sound plausible? | ||
wayland76 | And certainly tastier :) | ||
Maybe a different question; do macros have less chance of causing runtime errors? | 22:21 | ||
22:21
adc_penner left
|
|||
moritz_ | do fishes contain more plutonium than bycicles? ;-) | 22:23 | |
wayland76: a randomly written macro will likely cause as many errors as feeding random data to eval | 22:24 | ||
mncharity | wayland76: re fish riding bicycles, fish get compiled away at compile time. So you can have abstractions which don't have a runtime performance cost. The compiler can see and optimize. | ||
masak | moritz_: as far as I know, fishes contain no bicycles at all... | 22:25 | |
moritz_ | masak: at least not the small fishes ;) | 22:26 | |
masak | and the large ones are mammals :) | ||
pugs_svn | r24062 | lwall++ | [Spec] get started on the renaming | 22:29 | |
22:29
dukeleto joined
|
|||
wayland76 | Well, I think that pretty much covers everything. Thanks :) | 22:29 | |
Incidentally, on the topic of Iterators, I had a go at implementing tree iterators for Perl6 using the SMOP map interface | 22:30 | ||
mncharity | TimToady: ok, thanks. regards (b), any guidance on whether I should expect to see it fixed in current weeks, or should proceed with working around it? | 22:31 | |
pugs_svn | r24063 | lwall++ | [Spec] more name stuff | ||
wayland76 | Apart from the fact that I needed to pass in a bunch of parameters to determine the iterator type (self-or-descendant, child, following, whatever), it was sufficient to the task | ||
mncharity | fyi, with the 51 multis pruned to 25, it looks like memory usage tops off at 2GB. | 22:32 | |
pugs_svn | r24064 | lwall++ | [Spec] bleah, svn getting confused, and so am I | 22:33 | |
TimToady | mncharity: re (b), .() is parsed as any other postfix, so notionaly is a wrapper around the "name | 22:34 | |
" | |||
masak | TimToady: can I assign the value *-4 to a variable? | 22:38 | |
(I'm trying to figure out how magical Whatever stars in indexes really are) | 22:39 | ||
mncharity | And 12 multis is 1.2GB. So two datapoints and an inequality suggest ~100MB per lexer. so 100MB per 'multi foofix:blah (...){...}'. ah well. I can split the file in half as a temporary hack. | ||
pugs_svn | r24065 | lwall++ | [Spec] more twiddling | ||
r24066 | lwall++ | [Spec] more renaming | 22:44 | ||
22:47
masak left
22:49
mncharity1 joined
|
|||
mncharity1 | sorry about that. non-graceful system go boom. backlogging. | 22:50 | |
TimToady | basically I need to figure out when it's okay to clobber the current grammar in place instead of deriving a new one | 22:51 | |
or find a way of doing lightweight derived languages | |||
22:51
Psyche^ joined
22:54
ruoso joined
|
|||
ruoso | Hello! | 22:55 | |
mncharity1 | TimToady: re lexers, it looks like I'm all set. For elf bootstrap work, I can get by with a halved prelude. | ||
TimToady | okay, though that doesn't help with the (lack of) speed | ||
mncharity1 | hi ruoso :) | 22:56 | |
ruoso | hi mncharity1 | ||
TimToady, so is it sane to think that @a = @b implies creating a third list that is then stored in VAR(@a) ? | |||
mncharity1 | TimToady: re speed, for elf bootstrap work, I can cache. hmm, though... can viv parse STD.pm itself? That's my next step. And it has a bunch of foofix:bar decls I think... checking... | 22:57 | |
TimToady | p5 only creates the 3rd list if there is a shared name, but in the abstract, yes | ||
sure, viv parses STD | |||
22:57
Patterner left,
Psyche^ is now known as Patterner
|
|||
TimToady | and caches lex/STD.pm.store for everything else to use | 22:58 | |
mncharity1: no, it has foofix:sym<> declarations really, which are a lot cheaper | 22:59 | ||
because they don't modify the current grammar on the fly | |||
mncharity1 | mncharity1: re (b) and "parsed as any other postfix", so is token variable's #= methcall branch, with its postcircumfix field, now unused? | ||
ruoso | TimToady, considering how deep the lazyness can go, I'd say it's pretty hard to figure out if you can avoid creating a third list (unless it's the only assignment to that list) | ||
TimToady | but assignment is now defined as eager, I believe | 23:00 | |
or mostly-eager | |||
ruoso | sure... | ||
TimToady | but yes, you'd still have to glare at it pretty hard to determine non-overlap | 23:01 | |
mncharity1 | re foofix:sym<> are a lot cheaper... foofix:sym<xx> is different than foofix:<xx> ? | ||
TimToady | yes | ||
we use different names for talking about the rules that parse an operator than the name of the operator itself | |||
so grammars can distinguish their own operators from what they're parsing | 23:02 | ||
a grammar can parse prefix:sym<++> without changing the meaning of its own prefix:<++> | |||
23:03
Psyche^ joined
|
|||
TimToady | and the foofix:bar shortcut is probably a bit confusing that way, since it's really short for foofix:sym<bar> | 23:03 | |
23:03
mncharity left
|
|||
ruoso | TimToady, so it is sane to think that all the eagerness is evaluated by the interpreter? not by the list object itself and its fellow iterators... | 23:04 | |
(by "interpreter" here I refer to all the infra-structure that is external to the object) | |||
TimToady | I think it's too sane | 23:05 | |
ruoso | is that bad? | ||
mncharity1 | hmm.... so it sounds like svn.pugscode.org/pugs/misc/elf/elf_...tivesP5.pm 's multi prefix:<++> (...) etc can and should be prefix:sym<++> instead, and that will make the performance problem go away? | ||
TimToady | I don't think it will perform well if iterators don't know how to return a "batch" when that's appropriate | ||
ruoso | TimToady, again... I assume that's a job for the optimizers | 23:06 | |
TimToady | mncharity1: only if you write it as a grammar rather than a prelude | ||
and then you'd have to run it through gimme5 currently | |||
if the prelude wants to discuss its own operators then it needs to use the non-:sym form | 23:07 | ||
now, it's certainly *possible* to express a lot of prelude in grammar, after all, half of what's in STD should be in the prelude, conceptually | 23:08 | ||
mncharity1 | re "only if you write it as a grammar"... ah. hmm. or I simply declare it a temporary fudge. gimme5 isn't even being given the elf preludes, it's just getting by on its own. | ||
ok, so that leaves (b). is token variable's methcall branch depreciated? | 23:10 | ||
ruoso | TimToady, but is it sane to assume that the iterators should provide at least the full-blown API? while it's implementation-dependent when that API is actually used? | 23:11 | |
TimToady | no, I think it's probably just broken | 23:13 | |
there should probably be a .[0] in there since $<twigil> is optional | |||
and probably a .text too | 23:14 | ||
ruoso: I don't know which one you mean by "full-blown" | 23:15 | ||
ruoso | TimToady, the API that won't probably perform well... | ||
TimToady | I'd call that one the minimal one, not the full-blown one... | ||
ruoso | ok... agreed.. | 23:16 | |
mncharity1 | ok. my thanks. I'm all set. I'll kludge (a), and deal with (b) as a temporary workaround if I confront it before it gets fixed. | ||
ruoso | TimToady, and the runtime should use the minimal API with every custom iterator | ||
TimToady | certainly if item context is pulling items out one by one, you have to have some mechanism for storing the rest of any that you already know | ||
ruoso | that's what I've been calling "iterator in item context" | 23:17 | |
23:17
Patterner left,
Psyche^ is now known as Patterner
|
|||
ruoso | it would store the capture and iterate in its items, as well as consume several times while an empty capture is returned | 23:18 | |
23:22
smg joined
|
|||
ruoso | that's how map { }, grep { }, map { } can work | 23:23 | |
23:23
pbuetow left
|
|||
TimToady | assuming an empty capture is distinguishable from out-of-data | 23:23 | |
ruoso | sure... out-of-data is an exception, as you said other day | 23:24 | |
TimToady | now considering what happens when someone wants to generate a list of exceptions... | 23:27 | |
ruoso | TimToady, a list of exceptions is still returned inside a capture | ||
TimToady | trew nuff | 23:29 | |
23:29
bacek_ joined
|
|||
TimToady | it's a good thing one of us is smart | 23:29 | |
mncharity1: I believe I have a fix for $.m(), testing... | 23:30 | ||
23:30
dukeleto left
|
|||
pugs_svn | r24067 | lwall++ | [STD] fix parsing of $.meth() to attach postcircumfix as special form | 23:32 | |
23:32
iblechbot left
|
|||
ruoso | TimToady, so I'll proceed with the API in the wiki | 23:33 | |
mncharity1 | TimToady: oh, yay! hmm... now just how late can I be for dinner... | 23:36 | |
TimToady | ruoso: feel free to transcribe that into S07-iterators.pod if you like too | 23:39 | |
and if you're feeling particularly energetic you can write S08-captures.pod while you're there too :) | 23:41 | ||
meppl | good night | 23:47 | |
23:49
meppl left
|
|||
wayland76 | S07++ and S08++ :) | 23:51 | |
23:54
hercynium joined,
vixey left
|
|||
pugs_svn | r24068 | jnthn++ | [t/spec] Unfudge a couple of array passing tests for Rakudo. | 23:54 | |
mncharity1 | almost there... | 23:57 | |
good night all! & | |||
pugs_svn | r24069 | putter++ | [STD_blue] $.meth() works. TimToady++ | ||
r24069 | putter++ | 3 more elf source files work. | |||
23:57
mncharity1 left
|