Parrot 0.6.3 "Beautiful Parrot" Released | parrotcode.org/ | 5/649/88 new/open/stalled tix | logged in irclog.perlgeek.de/parrot/today
Set by moderator on 26 June 2008.
pmichaud the thread that talks about PCC changes is at groups.google.com/group/perl.perl6....38aa856be9 00:00
see also the May 28 Perl 6 Design meeting notes 00:01
00:04 Zaba joined
pmichaud jonathan: still around? 00:05
purl nope.
00:09 AndyA joined
tewk pmichaud: Are there tests written, If you write the tests I'll make the changes. 00:13
afk, I'll reread the above. 00:14
00:17 Ademan joined 00:22 buildbot joined
pmichaud no tests written yet. 00:23
00:58 Zaba_ joined 01:10 contingencyplan joined
jonathan pmichaud: Sort of. :-) 01:11
About to head to bed in a moment.
01:14 Theory joined 01:15 paco joined
jonathan pmichaud: Guess now you're gone - sorry I missed the message earlier. Wanted to get off the computer for a bit before sleeping...trying to sleep + head full of closures/lexicals is probably a bad combination. If you're about tomorrow, I should be about a fair bit too... 01:22
jonathan afk
cotto_home literal still around? 01:37
dalek r29313 | jkeenan++ | parallel:
: Consolidate multiple test files per configuration step into a single file.
diff: www.parrotvm.org/svn/parrot/revision?rev=29313
r29314 | jkeenan++ | parallel:
: Consolidate multiple test files per configuration step into a single file.
diff: www.parrotvm.org/svn/parrot/revision?rev=29314
r29315 | jkeenan++ | parallel:
: Update MANIFEST.
diff: www.parrotvm.org/svn/parrot/revision?rev=29315
r29316 | jkeenan++ | parallel: 01:44
: Consolidate multiple test files per configuration step into a single file.
diff: www.parrotvm.org/svn/parrot/revision?rev=29316
01:47 silug joined
spinclad pmichaud: (backlogging some) re nopaste.snit.ch/13564: i don't understand why on the second call of bar you don't get a redeclaration of &foo error. given this, is there a case of replacing one closure with another? 01:51
dalek r29317 | cotto++ | trunk:
: [codingstd] wrapping more macro args, this time without breaking the build
diff: www.parrotvm.org/svn/parrot/revision?rev=29317
pmichaud spinclad: perhaps this should result in a redeclaration of &foo -- I don't know.
I haven't seen anything in the spec that indicates it would be an error. 01:52
spinclad istr that, without multi or proto, redecl is an error. will look for it. 01:53
pmichaud well, I don't know if that technically counts as a redecl
yes, without multi or 'is instead', redeclaration is an error.
(S06) 01:54
spinclad question would be, does a dynamic redecl count, or only static? (dynamic: same code text, different bindings.) 01:56
i don't recall it coming up in spec or discussion before.
pmichaud I don't know.
dalek r29318 | cotto++ | trunk: 01:57
: [codingstd] allow stringification in macros
diff: www.parrotvm.org/svn/parrot/revision?rev=29318
r29319 | jkeenan++ | parallel: 02:03
: Consolidate multiple test files per configuration step into a single file.
diff: www.parrotvm.org/svn/parrot/revision?rev=29319
r29320 | jkeenan++ | parallel: 02:04
: Renumber t/steps/inter_lex-03.t to -02.t to maintain sequence pending further refactoring.
diff: www.parrotvm.org/svn/parrot/revision?rev=29320
02:07 peepsalot joined
dalek r29321 | jkeenan++ | parallel: 02:14
: Renumber test. Consolidate two files into one. Two tests not yet passing, probably due to difficulty of testing interactive configuration steps.
diff: www.parrotvm.org/svn/parrot/revision?rev=29321
r29322 | cotto++ | trunk: 02:22
: [codingstd] wrap more macro args. now down to 192 c_macro_arg failures.
diff: www.parrotvm.org/svn/parrot/revision?rev=29322
02:43 confound joined
dalek r29323 | jkeenan++ | trunk: 03:13
: For consistency, call: $conf->steps->[-1].
diff: www.parrotvm.org/svn/parrot/revision?rev=29323
03:27 tjh joined 03:46 cotto_home joined 03:50 silug joined 04:13 cotto_work joined 04:17 Andy joined
cotto_home 1.625-1.558 04:46
purl 0.0669999999999999
cotto_home (1.625-1.558)/1.558
purl 0.0430038510911425
cotto_home (1.625-1.5)/1.5
purl 0.0833333333333333
dalek r29324 | cotto++ | trunk: 05:02
: [codingstd] refactor some macros to make coding standards easier to test
diff: www.parrotvm.org/svn/parrot/revision?rev=29324
TimToady sigh, there are already too many things named "capture" without using that to mean "closing over" as well... 05:10
05:21 Psyche^ joined 05:22 bgeron_ joined
cotto_home captcha? 05:34
purl captcha is probably an acronym for "completely automated public Turing test to tell computers and humans apart", it is a type of challenge-response test en.wikipedia.org/wiki/Captcha
TimToady and we only barely get away with the Capture type by capitalizing it... 05:39
but there's also regex captures
Zaba_ I wonder what did I miss in rakudo 05:50
I was absent for 2 weeks
05:50 silug joined
spinclad some good stuff -- lexical variables are in good shape, many more tests pass, some very busy days. TimToady's STD grammar parses itself now too. 05:58
Zaba_ that sounds quite good
:>
spinclad check pmichaud's and jonathan's weblogs for highlights, i don't remember it all 06:00
06:03 Zaba joined
cotto_home bad movies and coding go surprisingly well together 06:09
dalek r29325 | cotto++ | trunk: 06:14
: [codingstd] wrap more macro args (weeeeee!!!!!)
diff: www.parrotvm.org/svn/parrot/revision?rev=29325
Zaba spectest_regressing seemingly still takes a lot of time to run 06:28
cotto_home is there any reason not to delete a macro that's defined but never used in the code? 06:30
in this case, VOIDPTR_ASSIGN in include/parrot/parrot.h
Zaba hum 06:34
what's &?BLOCK? 06:35
Auzon The object for your current block. 06:41
You can use it for recursion on anonymous subs in P6
Zaba aha
07:13 Ademan joined
dalek r29326 | cotto++ | trunk: 07:24
: [codingstd] Wrap more macro args. This leaves 94 test failures (with a
: slightly smarter c_macro_args.t), but the rest of the macros will require some
: refactoring.
diff: www.parrotvm.org/svn/parrot/revision?rev=29326
r29327 | cotto++ | trunk: 07:30
: [codingstd] make c_macro_args.t smarter about some macros whose arguments can't
: be wrapped
diff: www.parrotvm.org/svn/parrot/revision?rev=29327
r29328 | cotto++ | trunk: 07:36
: [codingstd] fix trailing whitespace in t/codingstd/c_macro_args.t
: The irony of this is not lost on me.
diff: www.parrotvm.org/svn/parrot/revision?rev=29328
07:46 iblechbot joined
cotto_home juerd? 07:53
purl i heard juerd was root or at juerd.nl/ or mailto:juerd@juerd.nl
07:54 silug joined 08:14 barney joined
dalek r29329 | fperrad++ | trunk: 08:28
: [docs]
: disassemble.c was renamed pbc_disassemble.c since r29309
diff: www.parrotvm.org/svn/parrot/revision?rev=29329 08:29
08:33 Zaba_ joined
barney I think that rakudo doesn't parse heredocs yet. Is that right? 09:18
cognominal it was lasttime i checked 09:31
i meant it was parsing heredocs 09:32
_not_ parsing!
dalek r29330 | bernhard++ | trunk: 09:38
: [Rakudo] Add or update some Copyright or SVN-Id lines
diff: www.parrotvm.org/svn/parrot/revision?rev=29330
barney Yes, I see heredocs in STD.pm, but not in languages/perl6/src/parser/grammar.pg
cognominal BooK: je suis en train de cataloguer tous les bouquins que j'ai .On verra s'il refait surface.. 09:44
icfpcontest.org/
je crois qu'on peut concourir en Perl 09:45
10:03 Whiteknight joined 10:15 silug joined
barney cognominal: Bonne chance pour le conteste ICPF 10:22
cognominal non, je ne participe pas tant que je n'ai pas Perl 6 and wrong channel btw 10:24
dalek r29331 | bernhard++ | trunk: 10:25
: [Pipp PCT] Add some notes regarding literal strings in PHP.
diff: www.parrotvm.org/svn/parrot/revision?rev=29331
r29332 | fperrad++ | trunk: 10:40
: [Pipp] fix tests on win32
diff: www.parrotvm.org/svn/parrot/revision?rev=29332
10:48 Whiteknight joined
barney now gets '__bitwise_and' for empty strings 11:00
NotFound barney: In pipp? 11:01
barney Yes 11:02
dalek r29333 | bernhard++ | trunk: 11:03
: [Pipp PCT] Remove unneeded code, 'peek_brackets'.
: Simplify quote_expression.pir by getting rid of some unneeded options
: and by knowing that start and stop are either single or double quotes.
diff: www.parrotvm.org/svn/parrot/revision?rev=29333
NotFound barney: I think the problem is caused by the CONST_STRING dependance of __LINE__, because a lot of CONST_STRING "" are used inside init blocks, and those are generated without correct #line 11:05
barney NotFound: could you add that hint, or patch, to rt.perl.org/rt3//Ticket/Display.html?id=55842 ? 11:06
In a way it's funny. In r29331 I only added POD and got a different behavior. 11:08
NotFound I'm working now in a variant of a previous attempt to add a function specific for const empty string, it can solve all this issues... but the CONST_STRING general problem remains.
barney NotFound++ 11:09
NotFound barney: and sometimes only by rebuliding with no changes gives different results.
barney Strange, the phase of the moon doesn't change that fast :=) 11:10
NotFound Maye the tides... 11:11
barney or gravitational waves
NotFound That will be great, bulding a gravitational wave detector at no cost X-) 11:14
barney: RT#56868 11:20
dalek r29334 | bernhard++ | trunk: 11:24
: [Pipp PCT] PHP literals need not tests for whitespace, AFAIK.
diff: www.parrotvm.org/svn/parrot/revision?rev=29334
barney NotFound: I get a segfault with ../../parrot ../../languages/pipp/pipp.pbc --variant=pct ../../languages/pipp/t/php/arithmetics_6.php 11:32
jonathan morning^Wafternoon
barney after applying your patch and rebuildign, no 'make realclean'
NotFound barney: realclean required 11:33
Or maybe a make clean in pipp directory is enough, don't know. 11:34
11:40 Whiteknight joined
barney All tests successful. for Pipp, after 'make realclean' in Parrot root 11:41
11:42 ruoso joined
NotFound barney: good :) 11:42
Rakudo test and spectest_regression also pass. 11:50
barney NotFound: When I first saw that problem, I was thinking of a hash collision. 12:05
NotFound barney: me also. 12:06
12:06 kid51 joined
barney Did you look into parrot_hash_put ? 12:07
NotFound I looked and it seems correct.
A check in CONST_STRING can be helpful, but it can slow down too much a lot of things. 12:08
barney I'm confused by another thing. Does parrot_hash_exists() in hash.c make sense? It only checks whether there is a bucket. 12:13
NotFound ack says that parrot_hash_exists is never used. 12:15
12:15 silug joined
barney And it calls parrot_hash_get_bucket(), which seems to do the right thing 12:16
NotFound You can fill a ticket proposin his deletion, to hear opinions. 12:18
This code is in default.pmc: return !!parrot_hash_get_bucket(interp, pmc->vtable->isa_hash, 12:20
Writing such things is a big no-no to me X-) 12:21
I see very few places where get_bucket is used only to check existence, don't justify a specific function, except maybe for clarity. 12:23
dalek r29335 | jkeenan++ | parallel: 12:28
: [t] For consistency, call: ->steps->[-1].
diff: www.parrotvm.org/svn/parrot/revision?rev=29335
r29336 | jkeenan++ | trunk:
: [t] For consistency, call: ->steps->[-1].
diff: www.parrotvm.org/svn/parrot/revision?rev=29336
barney ascii_compute_hash() seems to return the seed for empty strings, which is fine 12:33
12:35 rurban joined
dalek r29337 | bernhard++ | trunk: 12:38
: [C] Delete obsolete TODO comment.
diff: www.parrotvm.org/svn/parrot/revision?rev=29337
barney NotFound: IMHO, replacing !!parrot_hash_get_bucket() with parrot_hash_exists() would be a good thing 12:40
NotFound: I'll fire up gdb when I see the 'empty String' error again 12:42
NotFound barney: rethinking about that, I think the same. In addition to clarity, it avoids exposing the hash bucket thing when is not required nor useful.
12:43 itz joined
dalek r29338 | jkeenan++ | parallel: 12:43
: Consolidate multiple test files per configuration step into a single file.
diff: www.parrotvm.org/svn/parrot/revision?rev=29338
r29339 | bernhard++ | trunk: 12:45
: [codingstd] remove trailing spaces
diff: www.parrotvm.org/svn/parrot/revision?rev=29339
r29340 | bernhard++ | trunk: 12:49
: [distro] Let SVN ignore the generated file pbc_disassemble.
diff: www.parrotvm.org/svn/parrot/revision?rev=29340
barney NotFound: The naming is also funny. I thought a bucket was the container, containing potentially many key-value pairs 12:52
purl okay, barney.
barney ?naming
NotFound A bucket item or something will be a better name. 12:53
barney item, entry or slot 12:54
13:01 uniejo joined
dalek r29341 | jkeenan++ | parallel: 13:03
: Consolidate multiple test files per configuration step into a single file.
diff: www.parrotvm.org/svn/parrot/revision?rev=29341
13:07 Zaba joined
dalek r29342 | julianalbo++ | trunk: 13:08
: Replaces parrot_hash_get_bucket with parrot_hash_exists in several places
diff: www.parrotvm.org/svn/parrot/revision?rev=29342
barney NotFound++ 13:11
dalek r29343 | jkeenan++ | parallel: 13:17
: Consolidate multiple test files per configuration step into a single file.
diff: www.parrotvm.org/svn/parrot/revision?rev=29343
13:30 Zaba_ joined 13:34 Zaba joined
dalek r29344 | fperrad++ | trunk: 13:47
: [Pipp] get_resource_type()
diff: www.parrotvm.org/svn/parrot/revision?rev=29344
r29345 | bernhard++ | trunk: 13:57
: [Pipp] Add test for stringification of PhpBoolean.
diff: www.parrotvm.org/svn/parrot/revision?rev=29345
r29346 | jonathan++ | pdd25cx: 14:01
: [core] Fix build of pdd25cx branch on Win32.
diff: www.parrotvm.org/svn/parrot/revision?rev=29346
14:01 jhorwitz joined 14:12 Zaba_ joined 14:16 silug joined
jonathan pmichaud: ping 14:26
14:30 Zaba joined
pmichaud jonathan: pong 14:31
jonathan pmichaud: Which instructions were you using that got replaced by local_branch and local_return?
pmichaud TimToady: (multiple meanings of 'capture') I'm going to switch the conversation to start using 'snapshot' instead. 14:32
jonathan: bsr/ret
jonathan OK, I thought so. IMCC handles some branch instructions explicitly.
pmichaud yes
jonathan I'm having a dig to see if I can coerce it into doing the Right Thing.
pmichaud jonathan++
jonathan If nothing else comes out of this, at least I have fixed the branch build on Win32. 14:33
pmichaud I did think about the possible register allocation issues with respect to the other parts of PGE that use it
but the other parts of PGE already do :unique_reg so I figured it wasn't an issue.
However, I didn't realize that :unique_reg doesn't help with $I0
(which sounds like a _huge_ bug to me) 14:34
and if we can't fix the register allocator for l_b/l_r then it means we'll have to do similar things in all subs that are currently making use of bsr/ret 14:35
NotFound Can you take a look at RT#56868 ?
pmichaud jonathan: can you preview a reply I'm about to send to make sure it's clear? 14:39
(I'll nopaste it)
jonathan Damm. The easy attempt to fix IMCC up didn't help things. 14:40
pmichaud: sure
NotFound: Who is "you" referring to in that sentence?
nopaste "pmichaud" at 76.183.97.54 pasted "explanation of clone and closures" (38 lines) at nopaste.snit.ch/13567
NotFound jonathan: Those that were alive in the channel at the moment, that is, you and pmichaud 14:41
Ups, recursive X-)
jonathan pmichaud: Well the short answer and code that follows make complete sense. Now for the long answer... :-) 14:42
pmichaud NotFound: is this change going to make a significant improvement in performance? 14:43
jonathan pmichaud: OK, what you just wrote makes sense to me.
pmichaud jonathan: the long answer I'm writing makes complete sense also (to me). But it's somewhat involved, so I'll have to make sure I'm clearly defining my terms.
the long answer I have also resolves chromatic's get_x and set_x example. 14:44
jonathan pmichaud: Right. And the real problem is that there's a lot of cases where it feels to me like different terms for the same thing are being thrown about.
pmichaud not only that, but parrot has conflated too many items together
for example, newclosure == snapshot + clone
taking a closure (snapshot) is always a part of invoke
etc.
those are bad conflations -- my new proposal will give separate terms for each action 14:45
jonathan I had snapshot = clone in my mind.
pmichaud okay, well, we should fix that then
what should we call the operation whereby an inner closure is bound to the lexicals of its outer sub?
'capture' is probably bad. 14:46
14:46 Theory joined
jonathan Taking a snapshot of the current lexical environment = taking a closure = what cloning a closure in Parrot does. 14:46
pmichaud I'd prefer to call cloning a closure "cloning a closure" :-)
NotFound pmichaud: maybe, but the main reason is to simplify the code and the preprocessing of CONST_STRING, and avoiding several current bugs related to CONST_STRING.
pmichaud i.e., we already have a name for that: clone
jonathan Right. 14:47
NotFound Mainly, letting pipp pass test consistently.
pmichaud NotFound: to me it doesn't simplify the code, because I end up with some string constants that say "CONST_STRING" but for some reason empty string is different
i.e., I'd be asking myself: Why not just use CONST_STRING(INTERP, "") ? 14:48
jonathan But I think it's good to be clear that the operation of taking a clone is how we implement the semantics of taking a closure, or a snapshot if that word is preferred. 14:49
dalek r29347 | fperrad++ | trunk:
: [Lua]
: - introduce a memoize cache in LuaRegex compiler
pmichaud I need a good name for the operation that I've been calling 'capture'.
dalek diff: www.parrotvm.org/svn/parrot/revision?rev=29347
jonathan If that makes any sense.
Yeah.
Associate?
purl hmmm... Associate is developing perl course work, and is having trouble finding something appropriate for beginners.
pmichaud well, it's really a bind of sorts.
jonathan Associate the inner's lexical scope with that of the outer? 14:50
NotFound The empty string is different, it does not need to care about charset and encoding.
jonathan Hmm. I agree with you capture isn't the best name. It's too overloaded.
pmichaud NotFound: thus my question -- does this give us a significant performance improvement?
NotFound: because if it doesn't, it seems that we're making the code less understandable for no substantial improvement 14:51
14:52 Zaba_ joined
NotFound pmichaud: Don't know, I will try to make some measurement. 14:53
pmichaud one could always treat empty string as a special case in the CONST_STRING function, too.
...but that doesn't seem to be much benefit either 14:54
jonathan pmichaud: A thing I'm curious about in what you're about to propose.
NotFound But is a macro, and is processed in pmc to c process.
jonathan my $x = 42; if 1 { if 1 { say $x } } 14:55
Oh, no...bad example...
pmichaud :-
:-)
jonathan OK, there may be no example...if so, that's a good thing. :-) 14:56
14:56 Senak1 joined, Senak1 left
pmichaud ...although what I'm about to propose (to solve the case chromatic gives) _will_ essentially require that every sub have a list of its inner closures 14:56
so my proposal will have two parts -- what I want to see happen short term, and what we might do long-run to address chromatic's example 14:57
short term doesn't require maintaining the list of inner closures
jonathan OK, I'm struggling to construct an example where we have to have a sub knowing its inner closures.
pmichaud in what sense? 14:58
do you mean deeply nested inner closures, or immediately inner?
nopaste "barney" at 84.154.20.211 pasted "strings not found in constant table" (19 lines) at nopaste.snit.ch/13568 15:00
jonathan OK, so suppose whenever we are about to (a) take a reference to an inner closure or (b) invoke an inner closure, we always call .capture on that closure (can't think of a better name right now), which sets its outer scope to be the current one. Make sense?
barney I'm just debugging the const string issue with gdb. Right now I'm confused, as the same string seems to be made twice
jonathan So before we do the clone or the invoke, we do a capture?
pmichaud the problem is that we may be doing those from a context other than the outer?
s/\\?/./
jonathan OK, in that case .capture is a no-op. 15:01
pmichaud -> $x { sub foo() { say $x; } if 1 { return &foo; } }
jonathan OK, so let's take that case.
pmichaud We can't wait for the &foo step to do the capture, because we're not in the outer context.
jonathan Ah. 15:02
pmichaud so, we'd have to chase up the caller chain to find the appropriate context in which to perform the capture. And that's where I think we start to run into difficulties.
jonathan Yes.
pmichaud here's what I want to do for for chromatic's case 15:04
jonathan Can you explain what you propose for the case you just wrote above first?
While I've got that problem in my head. :-)
pmichaud sure
as soon as we enter the -> $x { ... } block, we bind all of its inner closures
(bind == capture)
this would be 'foo' and the immediate block of the if 15:05
jonathan OK, and that can be done by the compiler knowing what the inners are?
15:05 integral joined
jonathan Rather than the outer having to know its inners? 15:05
pmichaud yes, the compiler knows all of the inners already
jonathan OK.
pmichaud (by definition of lexical scope)
jonathan Right. So, understand how this one will work. Go for chromatic's one. 15:06
pmichaud okay, chromatic's case is
{ my $x; sub set_x { $x = shift; } sub get_x { return $x; } }
*but* 15:07
someone can call set_x/get_x without the above outer closure having been invoked first
jonathan OK, understand the code. 15:08
pmichaud currently parrot attempts to handle this by an "autoclosure" -- i.e., when set_x is invoked, it detects that it hasn't had a capture yet so it immediately invokes its outer sub to get a lexical environment and then captures that
Bad. 15:09
jonathan Right. I does a "fake" invocation that builds a lexical environment, but doesn't run the code.
s/I/It/ 15:10
pmichaud part of the problem is that even though we've "solved" the problem for set_x, the get_x sub isn't bound to that same lexical environment
jonathan Right. Because get_x realizes it has no outer, and goes and does a fake invocation of its own. 15:11
pmichaud so, what I want to do is separate "create lexical environment" from "invoke" 15:12
i.e., make it possible to create a lexical environment without doing an invoke
we have this already via the 'fake' invocation
but
since we don't run the code, we don't get the benefit of doing capture on all of the inner subs
sorry, inner closures
so, what I want to do is... 15:13
when we invoke set_x (and perhaps take a reference to it), it detects that it has no outer lexical environment, so it tells its outer sub to create one 15:14
and the act of creating a lexical environment automatically binds all inner closures to that lexical environment
but the "automatically binds" means we have to have a list of the inner closures
jonathan *nod*
Makes sense. 15:16
jonathan wonders if Perl 5 handles it the same kinda way 15:17
pmichaud although, I wonder....
15:17 Zaba joined
pmichaud I wonder if it is actually possible to lazily capture the inner closures 15:17
right now the autoclosure always invokes its outer sub to build a lexpad 15:18
shouldn't that be "invoke the outer sub if it doesn't already have a lexpad"?
spinclad another case: { my $x = 1; sub get_x { return $x; } } # if this block is never entered, but get_x is still seen as defined, what does this mean?
# when get_x is called later
pmichaud spinclad: excellent example
I think that Perl 5 returns an undefined value
jonathan The only way to get that to give 1 in Perl 6 that I can think of is to have my $x ::= 1; 15:19
pmichaud module Foo { my $x = 1; sub get_x is export { return $x; } } 15:20
jonathan I think that's different?
pmichaud how so?
jonathan Because when you "use" module, does the body not get executed? 15:21
pmichaud I wasn't saying "use module"
jonathan OK
pmichaud I mean place that wherever we had the { my $x = 1; ... } earlier
jonathan But by the time we have done so - and this got hold of get_x - the my $x =1 would have run.
pmichaud there's an implied BEGIN on the body of modules and classes 15:22
jonathan Right.
But the original example - where we haven't got that - we'd just have get_x returning undef.
pmichaud right.
jonathan OK, I think we're agreeing here. 15:23
pmichaud so, what do you think of 15:18 <pmichaud> shouldn't that be "invoke the outer sub if it doesn't already have a lexpad"?
jonathan I sorta thought that's what the code already did...let me check. 15:24
pmichaud oh, I see
the "already have a lexpad" part is in the sub's invoke
ok
no, wait, that can't be right. 15:26
invoking a sub always gives it a new lexpad
jonathan Just staring at the code to be sure of what it really does do...
pmichaud I think that right now autoclosures always result in a new lexpad, instead of reusing a previous one
oh, no, I see 15:27
line 103, closure.pmc
jonathan Right, that's the bit I'm looking at too. 15:28
That seems to make sure if there is a lexpad from a previous invocation, we get it. 15:29
So in chromatic's example, get and set end up referring to the same thing. 15:30
pmichaud ouch, I think I can come up with an example that screws up even the simple version of what I'm proposing
15:31 Ademan_ joined, kid51 joined
barney NotFound: Can you look at line 645 of string.c. Shouldn't the third argument be 'buffer' ? 15:31
pmichaud (writing) 15:32
oh, maybe not 15:35
NotFound barney: On the curren version or in my patch? 15:36
barney In SVN HEAD
pmichaud no, I think that hash_put requires a STRING argument 15:37
or something that has a header 15:38
15:38 uniejo joined 15:40 chromatic joined
chromatic barney: looks like a bug in src/string.c to me. Good catch. 15:40
jonathan pmichaud: I think maybe best is to collect together all of these various examples that we are tossing around. 15:41
That demonstrate various things.
pmichaud well, that's what I was going to do in my long message 15:42
jonathan (things = use cases)
OK, good.
pmichaud show how the approach would handle each of the use cases
(which is why it would take a few hours to develop)
jonathan OK. (case analysis)++
pmichaud but when we're done we could potentially use it as a new pdd20
since the existing pdd20 is obviously not what is implemented
barney Yes, if you can't find it with a certain key, put it there with the same key 15:43
jonathan remembers doing proofs on lock-free data structure safety using case analysis...
Yes, it'll certainly be wanting an update.
pmichaud anyway, do we have a good name for the 'capture' operation yet? ;-) 15:44
chromatic I can explain how Perl 5 handles the situations I posted. 15:45
pmichaud that would be helpful
jonathan pmichaud: Everything I've named in Parrot, Allison has found reason to give a different name. I'm really not a good person to ask for names. :-) 15:46
pmichaud jonathan: I just need a name that makes sense to whoever is implementing it. If allison wants to change the name later, that's fine with me.
jonathan (And she found good reasons to give them different names too - just to be clear...)
NotFound barney: I'm testing with that change.
pmichaud (I've had the same experience, btw. :-)
chromatic NotFound, me too.
NotFound But my cpu is faster :P 15:47
jonathan pmichaud: I wonder who the likely implementers are... ;-)
NotFound Just a joke, is 5 year old portable.
jonathan pmichaud: I'd go for a name that has "outer" in it somewhere though.
pmichaud jonathan: I just need a name that makes sense to me, you, chromatic, and rgrjr for purposes of discussion, and that we'd be comfortable living with if it existed long-term 15:48
NotFound coretest pass
jonathan "set_outer" will be confusing because we use that already
pmichaud right
jonathan (for dynamically setting the otuer sub)
pmichaud although I don't think anyone is actually using that yet
jonathan set_outer_context is long but clear.
pmichaud set_outer_ctx ?
jonathan pmichaud: Yeah, I implemented it to unblock implementation of eval, which now exists but doesn't handle lexicals yet so doesn't use it. 15:49
set_outer_ctx works for me - and ctx is a common abbreviation in Parrot for context.
pmichaud let's go with that for now.
NotFound pipp test pass! 15:50
jonathan ok
pmichaud chromatic: are you writing up an explanation of p5 for email or just busy with something else?
15:50 Zaba joined
pmichaud I don't think I need a super-detailed explanation -- just enough to get the key features 15:50
chromatic I'll write one now. 15:51
I had to take a few minutes to question the Perl 6 code first.
pmichaud one good result of all of this is that I'm getting a much better picture of lexicals :-)
(or, at least I think I am)
jonathan Same. I think. :-)
pmichaud one question I do have.... 15:52
with for 1..10 -> $x { sub foo() { ... } }
is that a redeclaration error or not?
i.e., do we treat 'sub foo' as being a redeclaration for each iteration of the loop? 15:53
jonathan No, I don't think so, because it's not being redeclared. 15:54
The name foo always is attached to the same body.
I think declarations are seen from a static, compile time point of view.
pmichaud fair enough -- was just curious. 15:55
jonathan Don't take me as authoritative, but it's my understanding. :-)
pmichaud although chromatic just asked if it's actually valid Perl 6 on the m/l :-) 15:56
(I hadn't read that before writing my question on irc)
jonathan In dev.perl.org/perl6/doc/design/syn/S..._a_closure it uses "my sub" 15:57
But I thought that just declared the scope of the symbol "bar"
oh, the answer's right there 15:58
"In particular, named subroutines in any scope do not consider themselves closures unless you take a reference to them."
Note: in any scope
NotFound It's the third time this sentence is quote in two days ;)
jonathan It seems to answer many questions. ;-) 15:59
pmichaud and raise many others. 16:00
like, what about 16:01
my $foo = { sub bar() { ... } }; 16:02
is bar() a closure?
s/'()'//
jonathan I tink we can safely say that this would do newclosure on the block since we're taking a reference to it. 16:03
NotFound pmichaud: I think that scope isa 'any'
jonathan But bar - hmm. 16:04
pmichaud newclosure on the block -- sure, no problem.
NotFound pmichaud: sounds like the name of a pop band.
pmichaud egads, another lightning talk. "Perl Bands" 16:05
newclosures on the block
jonathan NotFound: Surely a rap band? :-) 16:07
OK, I need to go to some other $reallife stuff for a while.
pmichaud okay, thanks jonathan
NotFound jonathan: that can be a rapture, not a closure.
dalek r29348 | bernhard++ | trunk: 16:08
: #55842: [BUG] empty .const .String broken
: The cause was probably a bug in the function const_string().
: If a string can't be found in the constant table, create a STRING
: structure and use the lookup key for storing it.
diff: www.parrotvm.org/svn/parrot/revision?rev=29348
NotFound barney++
jonathan pmichaud: Thanks for all the time/effort you're putting in too. This has turned out to be a lot trickier than I'd expected. 16:09
pmichaud well, I don't know if I'm unintentionally making things more difficult by asking questions that aren't really valid 16:10
I do know that until the patches you and chromatic did, I couldn't get simple lexical blocks to work
like at all.
jonathan Aye. We need something that works "generally" though. ;-) 16:11
jonathan quickly disappears for a bit
pmichaud chromatic++ (explanation on mailing list)
chromatic and not ugly
barney, we probably need a const cast on that... I'm testing it now. 16:12
pmichaud haven't read it yet, but I'm getting the impression that the fact that we're currently making all :outer flagged subs into Closure PMCs isn't the right thing to do
perhaps :outer flagged subs should remain subs, and we convert them to closures when we take a reference
or otherwise clone them
chromatic That sounds better. 16:13
But we do need some sort of compile-time scope bindings for named subs.
barney chromatic: I tried Parrot_const_cast( char *, buffer ), but got error 16:14
pmichaud sure, which is also why I think should be a Sub thing and not a Closure thing
purl okay, pmichaud.
NotFound Let that part to me, is my speciality ;)
TimToady which?
purl which is why I asked about an alternative method :)
pmichaud sure, which?
purl sure, which is what makes it funny! or why I think should be a Sub thing and not a Closure thing
NotFound what? 16:15
dalek r29349 | jkeenan++ | parallel:
: Consolidate multiple tests per configuration step into a single file. Create Parrot::Configure::Test::rerun_defaults_for_testing() for cases where we need to reset the defaults to conduct multiple tests per file.
diff: www.parrotvm.org/svn/parrot/revision?rev=29349
chromatic barney, you probably missed adding DECL_CONST_CAST; to the top of the function.
pmichaud anyway, I've already warned Paula and the kids that I'll be focusing on this issue for much of the day :-)
I'd like to get something new in place for shortly after the release so I don't have to deal with it any longer. 16:16
NotFound Other good name for a band: "Paula and the kids"
16:16 silug joined
chromatic Maybe pmichaud could play the tambourine. 16:17
pmichaud bongos.
barney Probably the argument key in parrot_hash_put should be a (const void *).
dalek r29350 | chromatic++ | trunk:
: [src] Removed a compilation warning from 29348, when caching a constant string
: in the hash.
diff: www.parrotvm.org/svn/parrot/revision?rev=29350
kid51 Can anyone comment on the question in my last post to rt.perl.org/rt3/Ticket/Display.html?id=43310 concerning a possible misspelling? 16:18
pmichaud chromatic: any thoughts about my pdd25cx message, other than "The register allocator sucks"? 16:19
NotFound kid51: looks clearly like a typo, but I don't have a windows environment available to test it. 16:20
pmichaud I agree w/NotFound -- looks like a typo, but I can't test. 16:21
kid51 thx 16:24
NotFound barney: is safer to cast the const string usage, the other way can fool the optimizer when using the function with PMC.
16:25 teknomunk joined
dalek r29351 | jkeenan++ | parallel: 16:32
: Consolidate multiple test files per configuration step into a single file.
diff: www.parrotvm.org/svn/parrot/revision?rev=29351
chromatic pmichaud, no thoughts on the allocator besides "I thought we were using the simple, naive, non-quadratic allocator."
NotFound We have base64 encoding functions in lua and pipp. Will be good to have some support in core, or in a dynpmc? 17:01
dalek r29352 | jkeenan++ | trunk:
: Correct spelling error as per
: rt.perl.org/rt3/Ticket/Display.html?id=43310:
: -lncuses --> -lncurses.
diff: www.parrotvm.org/svn/parrot/revision?rev=29352
r29353 | jkeenan++ | parallel: 17:03
: Correct spelling error (already done in trunk).
17:03 uniejo joined
dalek diff: www.parrotvm.org/svn/parrot/revision?rev=29353 17:03
17:16 uniejo joined 17:19 uniejo joined
dalek r29354 | jkeenan++ | parallel: 17:20
: Consolidate multiple test files per configuration step into a single file.
diff: www.parrotvm.org/svn/parrot/revision?rev=29354
spinclad perl6: $gen = -> ($n) { sub get_n_1 { return $n; }; return &get_n }; my &g1 = gen(1); my &g2 = gen(2); say g1; say g2; # will one closure step on the other? 17:40
polyglotbot OUTPUT[Statement not terminated properly at line 1, near "= -> ($n) "␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤called from Sub 'parrot;Perl6::Grammar;eat_terminator' pc 22126 (src/gen_grammar.pir:2813)␤called from Sub
..'parrot;Perl6::Grammar;statementlist' pc 21139 (src/gen_grammar.pir:2450)␤called fr...
spinclad perl6: my &gen = -> ($n) { sub get_n_1 { return $n; }; return &get_n }; my &g1 = gen(1); my &g2 = gen(2); say g1; say g2; # will one closure step on the other? 17:41
polyglotbot OUTPUT[Statement not terminated properly at line 1, near "= -> ($n) "␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤called from Sub 'parrot;Perl6::Grammar;eat_terminator' pc 22126 (src/gen_grammar.pir:2813)␤called from Sub
..'parrot;Perl6::Grammar;statementlist' pc 21139 (src/gen_grammar.pir:2450)␤called fr...
spinclad perl6: sub gen ($n) { sub get_n_1 { return $n; }; return &get_n }; my &g1 = gen(1); my &g2 = gen(2); say g1; say g2; # will one closure step on the other?
polyglotbot OUTPUT[invoke() not implemented in class 'Undef'␤current instr.: '_block11' pc 93 (EVAL_14:29)␤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806 (src/PCT/HLLCompiler.pir:481)␤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1088 (src/PCT/HLLCompiler.pir:610)␤called from Sub
..'parrot;PCT::HLLCompiler;command_line' pc 1267 (src/PCT/HLLCom...
spinclad perl6: sub gen ($n) { sub get_n { return $n; }; return &get_n }; my &g1 = gen(1); my &g2 = gen(2); say g1; say g2; # will one closure step on the other?
polyglotbot OUTPUT[␤␤]
spinclad perl6: sub gen ($n) { sub get_n { return $n; }; return &get_n }; gen(1)(); gen(2)(); # will one closure step on the other? 17:43
polyglotbot RESULT[undef]
spinclad perl6: sub gen ($n) { sub get_n { return $n; }; return &get_n }; say gen(1)(); say gen(2)()
polyglotbot OUTPUT[␤␤]
spinclad expected: OUTPUT[1␤2␤] 17:44
NotFound perl6: sub gen ($n) { sub get_n { return $n; }; return &get_n }; say gen(1)(); say gen(2)(); 17:45
polyglotbot OUTPUT[␤␤]
NotFound perl6: sub gen ($n) { sub get_n { return $n; }; return &get_n }; say gen(1)(); 17:46
polyglotbot OUTPUT[␤]
Patterner perl6: sub gen ($n) { sub get_n { return $n; }; return &get_n }; say gen(1)->();
polyglotbot OUTPUT[Statement not terminated properly at line 1, near "->();"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤called from Sub 'parrot;Perl6::Grammar;eat_terminator' pc 22126 (src/gen_grammar.pir:2813)␤called from Sub 'parrot;Perl6::Grammar;statementlist' pc
..21139 (src/gen_grammar.pir:2450)␤called from Su...
Patterner oops
NotFound perl6: sub gen ($n) { sub get_n { return $n; }; return &get_n }; my $s = gen(1); $s(); 17:49
polyglotbot RESULT[undef]
NotFound perl6: sub gen ($n) { sub get_n { return $n; }; return &get_n }; my $s = gen(1); say $s(); 17:50
polyglotbot OUTPUT[␤]
17:53 Zaba joined
dalek r29355 | julianalbo++ | trunk: 17:53
: Fixed const cast in const string hash for C++ compliance
diff: www.parrotvm.org/svn/parrot/revision?rev=29355
spinclad looks to me that either get_n is declared (closed? not even closed?) at BUILD time before $n is bound, or $n is just lost from the closing. 17:54
Patterner what does Deparse gen(1) say? 18:05
18:29 silug joined 18:30 Theory joined 18:41 purl joined 18:43 Whiteknight joined
Whiteknight pmichaud, ping 18:43
nopaste?
clunker3 pasta.test-smoke.org/ or paste.husk.org/ or nopaste.snit.ch:8001/ or rafb.net/paste or poundperl.pastebin.com/ or paste.scsys.co.uk/
purl nopaste is at nopaste.snit.ch/ (ask TonyC for new channels) or rafb.net/paste or paste.husk.org/ or poundperl.pastebin.com/ or paste.scsys.co.uk/ or don't bother me while I'm eating or App::Nopaste or tools/dev/nopaste.pl
nopaste "Whiteknight" at 72.92.19.181 pasted "better multi consistency without any C coding" (23 lines) at nopaste.snit.ch/13572 18:46
Whiteknight message pmichaud Check out nopaste.snit.ch/13572, removing one line seems to solve our problem. Does get_hll_namespace return a class pmc? 18:47
purl Message for pmichaud stored.
18:48 Zaba_ joined
dalek r29356 | julianalbo++ | trunk: 18:52
: Avoid hierarchy loops in class add_parent
diff: www.parrotvm.org/svn/parrot/revision?rev=29356
18:55 Zaba joined
Whiteknight karma Whiteknight 19:02
purl whiteknight has karma of 180
dalek r29357 | Whiteknight++ | gsoc_pdd09: 19:10
: [gsoc_pdd09] update to trunk r29355
diff: www.parrotvm.org/svn/parrot/revision?rev=29357
spinclad Whiteknight: re nopaste.snit.ch/13572, it seems to be using the previous $P1 (from newclass ['ABC';'Bar']), ignoring get_hll_namespace's $P0. 19:18
Whiteknight yeah, it's a typo 19:19
it works still if you replace that $P1 with $P0
spinclad $P2 = new $P0?
ok
Whiteknight yes, that works for me 19:20
19:26 Zaba_ joined 19:39 Zaba joined 19:51 rdice joined 20:08 Limbic_Region joined
dalek r29358 | julianalbo++ | trunk: 20:12
: Problem in RT#44811 was already fixed, unskipping the test
diff: www.parrotvm.org/svn/parrot/revision?rev=29358
20:31 silug joined 20:48 ruoso joined 20:50 Zaba_ joined 20:52 Theory joined
pmichaud (namespace) the nopaste still doesn't demonstrate creating a class from a namespace. 20:52
dalek r29359 | rgrjr++ | trunk: 21:02
: * t/op/lexicals-2.t (added), MANIFEST:
: + Add three more lexical tests, pursuant to RT#56398. The second is
: "todo", with resolution pending a new closure creation design.
diff: www.parrotvm.org/svn/parrot/revision?rev=29359
21:04 Zaba joined 21:17 Andy joined, Zaba joined
dalek r29360 | rgrjr++ | trunk: 21:26
: Install correct SVN metadata.
diff: www.parrotvm.org/svn/parrot/revision?rev=29360
r29361 | rgrjr++ | trunk: 21:29
: [CORE] Make Emacs coda read-only in generated files (part of #37664).
diff: www.parrotvm.org/svn/parrot/revision?rev=29361
r29362 | rgrjr++ | trunk: 21:41
: [CORE] Add "taking a continuation promotes RetCs", todo for RT#56458.
diff: www.parrotvm.org/svn/parrot/revision?rev=29362
22:10 Zaba_ joined 22:26 cognominal joined 22:30 kid51 joined 22:36 cognominal joined 22:44 silug joined
jonathan I seriously want to punch everybody responsible for IE6. 22:57
jonathan has *finally*, after hours of frustration, ironed out a bunch of IE6 CSS bugs. 22:58
NotFound jonathan: Still with the png issue?
jonathan NotFound: No, we just serve up transparent GIFs.
These were layout issues.
Some of them bizzare.
Not to mention oddities over what you can patch up in-page that was in an imported CSS file, and what you can't. 22:59
(Or there was some bug lurking deeper...)
Anyway, all solved now. Just in time for its deployment.
jonathan will be happy to have this project off his plate
23:28 Zaba joined
dalek r29363 | jkeenan++ | parallel: 23:39
: Consolidate multiple test files per configuration step into a single file.
diff: www.parrotvm.org/svn/parrot/revision?rev=29363
23:40 Whiteknight joined
jonathan sleeps 23:45
23:46 slightlyoff joined 23:47 slightlyoff left 23:49 Andy joined 23:54 Zaba_ joined