Parrot 4.3.0 "In Which..." | parrot.org | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 18 April 2012.
00:01 whiteknight joined
whiteknight good evening, #parrot 00:15
msg cotto kid51 made a great argument for using parrot.org, which I can't remember in it's entirety. We can talk about alternate options if you feel strongly 00:16
aloha OK. I'll deliver the message.
cotto ~~ 00:22
whiteknight, possibly something along the lines of it being a single place where people can look?
whiteknight I don't remember
kid51 can be very persuasive when he wants to be
blah, I've got a test in NQP that's hanging and I don't know why 00:24
Coke (single place) we HAVE that, it's called "planet parrot". ;) 00:35
cotto indeed 00:37
00:41 benabik joined
benabik ~~ 00:42
whiteknight hello benabik
Coke IMO, if we have a feed that supports tags like "GSOC", perfect, we can use a pre-existing blog. if It's a new blog that is just for GSOC, also works. 00:45
whiteknight I'm not arguing the point. If people really want to use any blogs and funnel them through planet parrot, that's fine
Coke you heard it here, students. 00:46
01:08 Khisanth joined
dalek sella: 21bc6c9 | Whiteknight++ | README.md:
Update README. We aren't going to keep an explicit list of stable libs here
01:26
sella: 16ca37b | Whiteknight++ | src/json/ (8 files):
[Json] re-add Json.
sella: 959d515 | Whiteknight++ | t/date/TimeSpan.t:
[Date] Add in a stub test file for Date.TimeSpan
whiteknight msg alvin I just pushed my remaining Rosella commits. The Rosella build should be fixed now. Have fun with it! 01:28
aloha OK. I'll deliver the message.
01:52 bacek__ joined 02:03 bluescreen joined 02:13 bacek joined
alvis msg Whiteknight pulled it and Rosella builds fine now (though there's still a problem with BoxMullerNormal.t. I probably need to visit with you about how to fix that for 32 bit boxes). 03:16
aloha OK. I'll deliver the message.
dalek rrot: 1d5965c | petdance++ | src/pmc/orderedhashiterator.pmc:
flag unused interps
04:41
rrot: 4c75c02 | petdance++ | src/pmc/pmclist.pmc:
localize variables to inner blocks, and remove unused vars
kudo/nom: 1a7e4df | moritz++ | docs/announce/2012.04.1:
[announce] wording fix from pmichaud++
05:43
06:21 fperrad joined 07:00 brrt joined
brrt morning parrot 07:03
07:42 Khisanth joined
moritz the morning parrot catches the worm 07:48
08:31 lucian joined 08:49 Khisanth joined 09:49 schm00ster joined 10:08 Jacky joined 10:12 fperrad joined
dalek p: a04da69 | (Arne SkjƦrholt)++ | src/6model/reprs/CArray.c:
Make sure initial child_objs in CArray is zeroed out.
10:47
10:48 bacek_ joined 11:08 jashwanth joined
Infinoid japhb: pong 11:52
11:56 mtk joined 12:05 jashwanth joined 12:32 bluescreen joined 12:33 whiteknight joined
whiteknight good morning, #parrot 12:34
tadzik good afternoon whiteknight 12:35
whiteknight hello tadzik. How are you doing? 12:37
12:40 brrt joined
tadzik whiteknight: pretty well. I was at the Perl 6 hackathon this weekend in Oslo, which was absolutely awesome. Now I'm back to studying/working routine 12:43
how are you these days?
whiteknight I am doing well. Slowly getting over a cold. 12:44
tadzik so how do you feel about gsoc this year? 12:45
whiteknight mostly hopeful 12:46
12:49 brambles joined
whiteknight it seems like we didn't get a lot of student interest this year like we did in year passed. Of course, we also don't seem to have as many mentors with available free time, so I guess it evens out 12:50
tadzik aye
whiteknight I suspect strongly that Parrot won't be in GSOC next year, since it seems like they have a policy of revolving old orgs out to get new orgs involved
that's just a hunch, assuming they continue the same trend next year 12:51
dalek sella: 87e8ec4 | Whiteknight++ | / (2 files):
[Random] A few small tweaks and fixes for MersenneTwister, hopefully these help make it work better on 32-bit
12:52
12:58 JimmyZ joined 13:02 PacoAir joined 13:33 jashwanth joined
brrt whiteknight: keep up the pressure :-p 13:37
whiteknight what pressure?
brrt last year of gsoc for parrot 13:39
to be fair, i was hesitant at first, because a blog post of your hand scared me off a bit :-) 13:40
tadzik more like: scared you on ;) 13:43
brrt at the end, yes 13:46
Coke huh. autofudge is running, not emitting any output, and I don't have any perl6 processes running. 14:14
I think this means /fudge/ is hanging.
argh, and autounfudge doesn't respond well when you kill fudge 14:15
argh, wrong channel. 14:16
whiteknight brrt: Which post? 14:22
brrt whiteknight: i'll find it 14:24
whiteknight.github.com/2011/04/11/g...osals.html this one 14:29
now that i read it again, it actually contains a lot of good tips
14:38 bluescreen joined
whiteknight brrt: My goal with that post was to weed out some of the slackers and help answer some common questions 14:43
14:50 benabik joined
benabik Good morning, #parrot 14:51
whiteknight hello benabik 14:54
brrt whiteknight: i realize that :-) 15:00
whiteknight brrt: You would be absolutely amazed at some of the applications we've received in previous years 15:01
some of them are not even worth the effort to laugh at them
brrt i've never seen any but my own :-) can't really compare 15:02
whiteknight One guy posted a copy of our proposal template, with no changes except a new title 15:03
and his name signed at the bottom
one guy proposed to do some kind of web application in ruby or python, I don't remember which. He had never heard of Parrot and didn't know what it was
brrt how... is that? 15:05
as a sidenote, i don't think GSoC has ever just accepted 'a web application' ever 15:06
15:14 jsut_ joined
dalek nxed: 719fd1e | NotFound++ | winxedst (2 files):
minimal refactor and cleanup of variable declarations
15:17
whiteknight obviously I didn't work on benabik's lexical requests for winxed last night 15:20
benabik whiteknight: I tried looking into it myself. Variables are a tricky section of the parser.
whiteknight it looks like NotFound++ is cleaning it up a little
benabik Oh. Apparently so. 15:21
NotFound Not much yet.
benabik I finished up all the PCT.Node types last night and pushed the result to parrot/parrot.
But all the compilers depend on dynamic lexicals.
whiteknight benabik: okay, I promise to stare at it tonight 15:22
NotFound Do you have some short pir example of dynamic lexicals usage? Maybe winxed needs some more support for that. 15:23
benabik NotFound: Real-world examples, or just a 'how do you do it' example? 15:24
whiteknight NotFound: yeah, that's what I'm going to add it tonight
benabik All the real-world examples I know of are in PCT.HLLCompiler and friends.
NotFound whiteknight: I mean, in the other side than we talked about. Declaring the use of a lexical defined elsewhere. 15:25
benabik: yeah, that's why I said "short" ;)
benabik NotFound: The concept is simple. One example: The sub that handles compiling a block adds the block to the dynlex '@*BLOCKS' and then starts visiting the children. Any child that parses a variable declaration adds it to '@*BLOCKS'[0].symtable(). 15:28
whiteknight benabik: I wonder if the same behavior could be replicated with a global stack 15:30
NotFound benabik: yes, but I'd like an example to see clearly the PIR involved in each side.
benabik whiteknight: My current plan for PACT is to use object attributes instead, although that complicates things slightly by needing to create a new compiler object for each usage.
whiteknight: There are other ways to do it, but for PCT I want to keep the behavior as-is so it doesn't break anything that relies on the current. 15:31
NotFound benabik: BTW I don't think the current way of having a single compiler object for each HLL is satisfying. 15:32
benabik NotFound: The current PACT plan is that the HLL has a 'StageRunner' that has a list of stages to create and run. 15:33
NotFound: Is there something in particular you think needs to be addressed?
NotFound And that's an internal detail. The compreg opcode should be able to return whatever the HLL wants to. 15:34
whiteknight In many cases, I suspect it should be a CompilerFactory, not a raw Compiler
NotFound Is just the implementation internal what forces it to be a single object.
whiteknight because you want the ability to not share state
benabik whiteknight: That is, in fact, basically my plan.
whiteknight benabik: awesome then
NotFound benabik: for example, set compilation options in the object, without affecting further compilations unless we deliberately reuse the same object. 15:35
benabik NotFound: I think all the 'standard' compiler functions are one-off. But I see your point. 15:36
NotFound: Non-realistic example: gist.github.com/2490722 15:39
NotFound benabik: thanks 15:40
And yes, winxed can provide a way to generate the find_dynamic_lex and store_dynamic_lex appropiately. 15:41
But maybe is better to start with pirop usages, and develop a way later with real use cases. 15:43
whiteknight I never really liked the idea of a dynamic lexical. I haven't really seen a use case that I thought wouldn't be better served by passing extra parameters or using global stacks 15:44
NotFound whiteknight: me neither, but if we want winxed to be a generic parrot low level language we should support all features. 15:46
whiteknight yes, true
benabik It's somewhat nice in that it can behave like a stack without explicit management. It's automatically "popped" when the sub exits. 15:50
I didn't include that in my example, but it is actually fairly elegant.
whiteknight yeah, I know what you mean. Maybe I just need more time to come to grips with it 15:55
I think there are good uses for it inside a library, but as part of a public API it seems like a disaster waiting to happen 15:56
benabik PCT basically uses it 'internally', it's just that portions of it occasionally get overridden by users. 15:57
whiteknight jashwanth++ #first blog post 15:59
16:03 bluescreen joined
NotFound Ok, reality check done. We just need a way to set the lex name, the other pieces can be done with pir ops. 16:05
benabik Right. 16:06
NotFound Correction: we don't need anything, basic usage can be done right now :) 16:08
benabik Oh?
NotFound gist.github.com/2490975 16:09
benabik You can .lex in Winxed? 16:10
I didn't expect that. But since it looks like an op, I guess I shouldn't have been surprised.
NotFound benabik: yes, pirops does some special case for things that start with a dot. 16:11
Not a recommended usage, but it helps in some cases, at least for proof of concepts.
whiteknight aloha karma jashwanth 16:12
aloha whiteknight: jashwanth has karma of 3.
whiteknight jashwanth++
aloha karma jashwanth
aloha whiteknight: jashwanth has karma of 4.
jashwanth aloha karma whiteknight
aloha jashwanth: whiteknight has karma of 2685.
whiteknight karma leo 16:13
aloha leo has karma of 0.
whiteknight karma chromatic
aloha chromatic has karma of 163.
whiteknight hmmm, I guess all the old karma records got wiped out
I probably knew that
jashwanth u have the highest
whiteknight karma c
aloha c has karma of 709.
whiteknight karma g 16:14
aloha g has karma of 574.
atrodo c is way too high
whiteknight c--
atrodo karma svn
aloha svn has karma of -21.
whiteknight heh
atrodo karma cvs
aloha cvs has karma of 0.
atrodo cvs--
benabik Poor C++, always having its karma stolen by its younger brother.
whiteknight karma (c++)
aloha (c++) has karma of 0.
whiteknight karma c++
aloha c++ has karma of -1.
whiteknight heh
jashwanth haha
whiteknight karma jnthn 16:15
aloha jnthn has karma of 2597.
jashwanth whiteknight++
whiteknight Yeah, I really don't know who would have the highest at this point. I know leo's karma used to be over 7k
jashwanth karma leo
aloha leo has karma of 0.
jashwanth oh 16:16
atrodo purl reports leo's current karma as 1888
whiteknight yeah, I think purl crashed at one point and lost everything 16:17
or switched machines
jashwanth oh
karma dukeleto
aloha dukeleto has karma of 1147.
whiteknight purl used to be our karma bot. Now aloha does it
atrodo and it is good
whiteknight :)
jashwanth when does dukeleto come here generally 16:18
NotFound Now that I look carefuly at that example, I'm surprised that it works. Do lexicals have changed since I first introduced closures in winxed? Looks like volatile should be unnecesary right now.
Oh, forget it, I was thinking about the using part, not the defining one. 16:19
benabik: yes, I think you can use this trick as a first step. 16:21
benabik NotFound: Looks that way, yes.
I'm working on HLLCompiler to see.
whiteknight Notfound: What is volatile? 16:22
16:24 dmalcolm joined
NotFound whiteknight: forcing a lexical to be get/set from the lexpad in any usage, rather than getting it at the start of the closure and using the register. 16:24
benabik Basically the same thing it is in C. :-)
Although most people haven't encountered it there either. 16:25
NotFound You need it if you use operator = rather than operator =:
benabik =: is assign and = is set, right? 16:26
NotFound benabik: yeah
whiteknight NotFound: oh, so a volatile is like a .lex?
NotFound That usually means: if you don't want speed ;)
whiteknight: no, it just change code generation for lexicals. 16:27
benabik Does winxed DTRT for a try without catch? 16:28
(i.e. generate a handler that ignores the exception)
NotFound benabik: If I remember well, the parser rquires a catch.
benabik NotFound: I'll trust your memory. :-)
NotFound And I prefer it that way, is less error prone. 16:29
benabik I'm find either way. 16:30
*fine
The nice thing about writing this in winxed instead of NQP is that if I hit something that's too spagetti code, I can just use labels and gotos and sort it out later. 16:42
NotFound benabik: be careful with that, goto lacks checks, you can jump in and out of loops, try blocks... usually for no good. 16:44
benabik NotFound: Oh, I know. 16:45
NotFound: I'm attempting to only duplicate the original behavior, so if I goto some strange place in winxed, it's because the original is doing it in PIR. :-D 16:46
whiteknight What I would really like to see is an easy syntax for creating continuations from labels 16:47
NotFound Yes, in appropiately indented winxed it will be easy to see the strangenest.
whiteknight I don't know what it would look like
benabik Perhaps if you use a label name as an expression, you get a continuation? 16:48
Perhaps too magical.
NotFound whiteknight: do you have some use cases? 16:49
whiteknight NotFound: not yet
but if Parrot is CPS, we need good easy ways to make and use continuations 16:50
NotFound Perhaps it can be done with blocks better that with explicit labels.
16:50 contingencyplan joined
whiteknight label_foo: var c = var(label_foo) 16:50
NotFound Mmmm... a continue operator may be acceptable, or too confusing? 16:51
var c = continue label_foo; 16:52
Or: var c = continue { continuation_goes_here } 16:53
Or both. 16:54
cotto ~~ 16:59
17:03 PacoAir joined
whiteknight the first one seems better to me 17:04
benabik Do I have to use a variable between get_class and new in Winxed? Or is there some way to do `new get_class(expr)` ?
whiteknight I think you need a variable 17:05
unless you create an inline
NotFound You can use the 'new' method of Class.
whiteknight oh, that too 17:06
get_class(expr).new(...)
but then you'd need to manually call the constructor
NotFound Calling a winxed constructor for a class got from elsewhere is tricky, anyway. 17:09
whiteknight github.com/Whiteknight/Rosella/blo...winxed#L62
it's not terribly bad 17:10
benabik PCT classes don't use winxed constructors anyway. They use the new method on the metaclass. 17:11
Or something like that.
It's slightly difficult to use from Winxed. `use PCT.Node; Node.new( ... )`
whiteknight yeah, that is obnoxious 17:12
I would wrap that kind of crap up in a function get_node() { using PCT.Node; return Node; } Then do a PCT.get_node().new() 17:13
but that's just me
NotFound An automated way to create a metaclass for a winxed class that DTRT may be nice.
benabik `goto foo; if(1) { foo: }` fails with "Method 'getlabel' not found for invocant of class 'Winxed;Compiler;RootNamespace'" (or Winxed;Compiler;NamespaceStatement if in a namespace block) 17:15
.oO( Doctor, doctor, it hurts when I use goto. )
17:16
NotFound benabik: winxed current, or parrot snapshot?
benabik Uhm.
Parrot snapshot.
NotFound benabik: should be fixed. Let me check...
Yeah, fixed in current. 17:18
benabik Fair enough.
NotFound $ winxed -e 'goto foo;'
__eval__:1: No such label near foo
In your example, foo is not in scope. 17:19
benabik So jumping into if statements is verboten?
NotFound Labels have block scope so no, you can't jump into it. 17:20
benabik Hm. Alright. 17:21
I guess some spagetti code is difficult to duplicate. :-D
Technically the original is "in an if statement, jump to an exception handler
NotFound You'll need more jumps to do that thing.
benabik I'll just use the EH to make the condition in the if true. Simple enough. 17:23
There's no actual requirement that I duplicate the logic 100% accurately.
NotFound benabik: maybe is better to make the common part an inline and use it.
Or an anon function. With winxed you can use higher level ways without enlarging the code so much as in pir. 17:25
benabik NotFound: I don't think that would be clearer. Everything is very close together and the if is just checking the result of the try block anyway. 17:26
So setting the result to null in the handler is fairly clear.
NotFound Yeah, I mean in general.
17:26 lucian__ joined 17:27 brrt joined
benabik Ugh. Named arguments are kinda ugly. Have no better suggestions for syntax at the moment though. 17:28
whiteknight I was thinking foo(bar named 'bar') 17:29
and on the parameter side, could be the same thing, plus a type identifier
benabik Still strikes me as very verbose. 17:30
whiteknight foo ('bar' : bar) like hash syntax?
benabik But easier to scan, I'll admit.
Rakudo, NQP, and PIR use hash syntax and it works pretty well. 17:31
The fun part is that sometimes you also need options on it, like optional.
NotFound Hash syntax in pir? 17:33
whiteknight well, you can do 'foo' => $P0 in PIR 17:34
benabik Which is basically perl's hash syntax, although PIR doesn't use it for hashes.
NotFound Ah, yeah. But you can't use such tricks in winxed without interfering with expresion syntax. 17:35
whiteknight right, that's why the : operator might work 17:36
benabik Might be slightly exciting with ?: syntax. 17:38
whiteknight I don't think so. All cases I can think of parse unambiguously 17:42
'foo' : x ? y : z 17:43
x ? 'foo' : 'bar' : baz
both of those should parse unambiguously
NotFound whiteknight: Maybe for the parser, but harder for the human rader. 17:57
benabik `get_results '0', $P0`? What's the 0 for? 17:59
whiteknight NotFound: Yes, it's hard for the human reader, but most people won't write like that
benabik: I think it's the flags 18:00
the parser can do the right thing, even if the programmer does a silly thing
I can already write things like var f = x ? y : z ? a ? b : c : d and I'm sure the reader will be plenty confused 18:04
18:04 jsut joined
NotFound whiteknight: the hard part is trying to guess the frequency of confusing uses. 18:05
whiteknight true 18:06
benabik 'handler: ; get_param '0', $P0 ; pop_eh` in PIR should be the same as `try {} catch (p0) {}` in Winxed, right? 18:07
Manual calls to PCC are confusing.
Coke benabik: you could write it in winxed and generate the PIR and compare, ma? 18:08
whiteknight benabik: The '0' is a string of comma-separated integer flags 18:09
which is one of the reasons why PCC is teh major suxxors
benabik Coke: Winxed uses the .get_results macro... This is more that I'm more confused by the get_param call than the winxed.
whiteknight so the zero there means it's a non-constant PMC, I think
without flags
benabik Shouldn't it be a FIA instead?
whiteknight I think it splits the string into an FIA 18:10
I need to double-check. That's the way it used to be, for sure
benabik Oy.
whiteknight for every PCC call, Parrot sends an email to a guy named frank, and he dispatches the call manually 18:11
benabik Oh, this is fun. It's optionally pushing an exception handler. 18:39
whiteknight great 18:40
benabik If I goto out of a try, the handler will still be active, right? 18:46
benabik is being "clever" 18:47
Nevermine, more complex than that. 18:48
I'll just rethrow if I'm not "supposed" to be in the handler. 18:49
whiteknight this is sounding wonderful 18:50
benabik Does rethrowing an exception goof the backtrace?
whiteknight it appends the two backtraces
or, stores them in an array
benabik Hm.
whiteknight so you can only see the original one, if that's all you want
benabik Huh? 18:51
whiteknight var bt = e.backtrace_strings()
bt[0] is the original backtrace
bt[1] and beyond are backtraces from rethrows
benabik Will the default backtrace printer show them all, or just [0]?
whiteknight all, I think 18:52
benabik Nope. Even better. It only shows the most recent.
whiteknight great
that seems wrong. I wonder why that is
benabik So I do have to play tricks with it if I want to sometimes catch things. 18:53
whiteknight what code are you working on that only sometimes catches exceptions? 18:54
benabik PCT.HLLCompiler.command_line
It doesn't push an EH if there is no backtrace method or if the user passes --ll-exception 18:55
whiteknight Have two different functions, go to the one with the handler if you need a handler
benabik That might be more sane than my goto plan... 18:57
whiteknight I know you're looking for a direct port, but seriously...
benabik :-D
whiteknight The human mind starts to do weird things when you force it to program in assembly 18:58
it's not natural
benabik It does make some sense in the absence of a transparent rethrow.
That said, it would be nice if Parrot did have a transparent rethrow.
Coke (assembly) young people these days. sheesh.
whiteknight we can try to make rethrow more transparent, I've never heard anything like a concensus about what we want it to do
aloha (parrot/parrot) Issues opened : 757 (Fix ICU config issues on MSVC reported by Mark Solinski) by gerdr : github.com/parrot/parrot/issues/757 18:59
Coke remembers discussion transparent rethrow with allison, as "rethrow" doesn't do what I'd expect from the label on teh tin.
NotFound I think there were consensus about drafting a proposal about that. Then none of us wrote it ;)
whiteknight I had a bug ticket that said we wanted the backtrace of the rethrow to be included with the exception, so I did that. Then people say we don't want that.
benabik Hm. There is a rethrow op separate from throw... 19:00
whiteknight We could include backtraces in two places, like the "original" backtrace which probably does what you want and "additional" backtraces if there have been rethrows
Coke benabik: it doesn't do what you think! ;)
(but try it)
benabik Okay, yes.
whiteknight Exceptions are a mess. I guess I'll have to go tackle them after 6model and namespace
benabik throw appears to replace the backtrace and rethrow appends it.
NotFound Note that currently a completely transparent rethrow is not possible inside a winxed handler, because it does a finalize.
So if you resume, funny things may happen. 19:01
benabik Exceptions are a mess. 19:02
benabik recalls the whole 'die' is resumable bit.
dalek rrot: e77d9c4 | (Gerhard R)++ | config/auto/icu.pm:
Fix ICU config issues on MSVC reported by Mark Solinski
19:03
rrot: 97b7de5 | petdance++ | config/auto/icu.pm:
Merge pull request #757 from gerdr/gerdr/msvc-icu-fix

Fix ICU config issues on MSVC reported by Mark Solinski
aloha (parrot/parrot) Issues closed : 757 (Fix ICU config issues on MSVC reported by Mark Solinski) by gerdr : github.com/parrot/parrot/issues/757 19:04
whiteknight Besides the fact that all the ops are misnamed, the subsystem is terrible
We need three basic ops: throw_p_i takes an exception and a flag that says whether it's resumable, rethrow_p, and exit_i 19:07
and exit
exit_i should not be resumable or circumventable
benabik Mmmm...
whiteknight Everything else can be built on top of those 19:08
maybe throw_p_p_i for an explicit resume continuation
in case you want to "resume" to someplace else
so an average call would be something like throw(new Exception("Crap!"), null, true) 19:09
in C#, the syntax is throw new Exception("Message") so we're not too far from that 19:10
and they don't have resumable exceptions
NotFound Forget flags. Two functions, two ops. 19:12
whiteknight what do you mean? 19:13
19:14 PacoAir joined
NotFound throw resumable and throw no resumable are two different beasts. One op for each. 19:14
whiteknight okay, so throw_resumable_p_p and throw_p?
Coke isn't resumable a property of the exception itself?
not the way in which it was thrown?
NotFound I think is property of the code after throw.
whiteknight sort of, but the throw op will generate a resume continuation if one is needed but not provided 19:15
benabik You you need a special op to throw exceptions to use the current continuation.
NotFound It may expect to be reachable after throw, or not.
benabik I'd say `op throw(exception, continuation)` and `op throw_cc(exception)`. "Non-resumable" continuations are `throw(ex, null)`. 19:16
NotFound And the exception is not know by the op or the following code. Is somehing pointed to by a register.
benabik Something pointed to by a register? 19:17
NotFound flags to select functionality lead to confusion and lots of "if"
benabik: throw $P0
Nothing says if $P0 content is resumable or not.
It may sometimes be and sometimes no. 19:18
19:18 PacoAir joined 19:19 PacoAir joined
NotFound If I have: ' non_rsumable_throw | some_op ' tools can assume that some_op is non reachable code unless there is a label before some_op, for example. 19:20
whiteknight yes, that could be very important information for JIT and analysis tools 19:21
NotFound With a too generic op, we may need to add annotations to restore the discarded information. 19:23
Doable, but not very smart. 19:24
benabik throw ex = non-resumable, add backtrace. throw ex, cont = throw with explicit resume continuation. throw_cc ex = throw with resume here. rethrow ex = throw exception with no alterations. (IMHO) 19:25
dalek p: c2ae263 | moritz++ | VERSION:
bump VERSION to 2012.04.1
19:26
benabik Technically, in that, everything can be implemented in terms of rethrow. :-D
whiteknight I like throwcc, it has nice symmetry with other PCC ops 19:27
NotFound benabik: yeah, and malloc, free and realloc can all be implemented only with realloc.
benabik whiteknight: That's the _point_ of CPS.
whiteknight I know. I wish these kinds of things had been decided upon years ago
benabik Technically throwcc is "callcc eh"
(speaking generically of CPS, not specifically of Parrot) 19:28
NotFound throwcc can be generated, can't it?
whiteknight the hardest part of it is finding the handler
benabik Well, in most theoretical CPS models, the exception continuation is passed along with the return continuation. It's not really special in anyway. 19:29
NotFound benabik: that models allow resumable exceptions?
benabik NotFound: Sure. Add a continuation to the exception. 19:30
NotFound: I suppose you could make `throwcc ex` just `throw ex, label ; label:` 19:31
whiteknight resumable exceptions are so mind-boggling
NotFound Thinking about it, the explicit continuation solves the problem. The code after throw is not reachable unless there is some way to set a continuation point on it.
whiteknight we don't even really support finally { } yet, and we've got resumable exceptions
benabik NotFound: But the same argument can be made with all *cc ops. Using an explicit *cc just saves the VM from building a continuation since it just uses the current state. 19:32
In CPS, finally is basically a new exception handler that tail calls the original one.
NotFound benabik: but is different opcode, so the non cc variant can make the assumption. 19:33
benabik NotFound: Yes. You have the explicit one for full control and the implicit one for efficiency of VM.
NotFound And for the non resumable one, we can just set a continuation that goes to hell. 19:34
Or treat null that way.
benabik Right.
I'd treat null that way, honestly. Same thing for tailcall from the first function. 19:35
`call null` == `halt` 19:36
Although we may want to treat some versions of that differently for error handling.
dalek kudo/nom: 3447164 | moritz++ | tools/build/NQP_REVISION:
bump NQP revision to 2012.04.1
whiteknight one thing is for certain: We absolutely do not leverage CPS well 19:42
benabik No.
The indirect control of continuations is part of that. Most control-flow techniques in Parrot use hidden continuations. 19:43
"control exceptions" feel like a poor version of CPS. 19:44
19:44 benabik_ joined 19:50 benabik__ joined
whiteknight exactly. And the continuations being hidden is more than an inconvenience. In some cases it's a very real impediment to things like concurrency, GC, JIT, optimizability, etc 19:51
moritz 4444 19:54
sorry, hanging connectiong 19:55
whiteknight CPS should really be one of the strengths of Parrot that we can point to and say "see this? Can your VM do this? I think not", but we're just not at the level yet where we can call it a feature 19:59
right now it's just an implementation detail, we need to clean it up
benabik +1 20:00
moritz and IMHO it should be the compiler toolkits, and not the assembly language, that hold up the pretense of "normal" control flow
whiteknight that's it exactly! Nobody should care what the PIR looks like, because the PIR will be generated by the compiler toolkits 20:01
benabik That's how I feel about our compiler backends, too. One of our theoretical strengths is that we have registers, just like real machines. But we use none of the accumulated knowledge of compiling for register machines.
whiteknight benabik: another good point. It's like we have all the ingredients, and just haven't baked them into a delicious cake yet 20:02
benabik Although "accumulated knowledge of register machines" and "continuation passing style" seem kind of odd.
But that's why I'll ramble on about CFGs and CPS and the like. I often feel we're half-way there. 20:03
whiteknight Definitely. If we can de-magic PCC and make better use of continuations, that's most of it. Then we just need to add a JIT which keeps getting easier to do because PCC has less magic to worry about 20:04
M0 can take us most of the way, but if we clean up PCC first, M0 has an easier job to do 20:05
much easier
benabik Good compiling framework, better CPS, better MOP, and better primitive types. That's basically my wish list for Parrot. 20:08
nine whiteknight: I think my random failure has got something to do with write barriers on shared PMCs.
whiteknight nine: Good to narrow it down 20:09
moritz benabik: so, what's left of parrot that isn't on the wishlist? the GC?
whiteknight benabik: that's very close to my wishlist too
benabik moritz: Details.
moritz: And a concurrent GC would be nice too. ;-) 20:10
moritz :-)
benabik I don't quite want to say "everything we have is wrong", it's more "we're almost there" for everything. :-D
whiteknight We're definitely much closer than we've ever been, but our developer resources are not spectacularly high right now 20:11
benabik Yeah. :-/
whiteknight our cps system has existed in almost it's current form, unscathed, for many years. It's pretty good. It could be a lot better 20:17
And most of the improvements are opcode-level interface improvements, being more explicit and using fewer hidden variables
dalek kudo/nom: f61253e | masak++ | docs/release_guide.pod:
[docs/release_guide.pod] volunteered for July
20:21
Heuristic branch merge: pushed 51 commits to rakudo by masak
kudo/nom: 7ad3711 | masak++ | docs/release_guide.pod:
[docs/release_guide.pod] volunteered tadzik++ for May
kudo/nom: efbc48c | duff++ | docs/release_guide.pod:
[docs/release_guide.pod] claim June release
20:23
kudo/nom: 5a65af3 | moritz++ | docs/release_guide.pod:
add 2012.04 release to release_guide.pod
20:25
kudo/nom: 4ec5106 | moritz++ | VERSION:
[release] bump VERSION to 2012.04.1
kudo/nom: 6bee9b6 | duff++ | docs/release_guide.pod:
[docs/release_guide.pod] claim birthday month release too
20:27
NotFound Looks like imcc doesn't like .lex with bizarre names 20:35
Maybe no, it can be my fault. 20:36
benabik I think it accepts whatever you give it. Has to be quoted though.
NotFound It fails with a lex name that contains a escaped " 20:39
benabik NotFound: While this sounds like a horrible idea as I type it, it might be useful to be able to pass labels to pirops. Then I could play with push_eh and pop_eh myself instead of strange goto constructs.
imcc--
NotFound benabik: you can. Just prefix with : 20:40
benabik NotFound: Oh.
NotFound++
20:41 lucian__ joined 20:51 ilbot2 joined
moderator Parrot 4.3.0 "In Which..." | parrot.org | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
21:09 dmalcolm joined 21:13 PacoAir joined
NotFound Looks like the .lex directive does not unescape and does not accept encoding qualified strings 21:15
Uh, no, it does unescape unless qualified... 21:17
That's it. 21:18
22:25 kid51 joined
dalek nxed: 36ef19f | NotFound++ | winxedst2.winxed:
variable modifiers test implementation with lexname modifier
22:54
nxed: fbc4fed | NotFound++ | winxedst (2 files):
rename a parameter for clarity
22:59
nxed: 0d5a0e2 | NotFound++ | winxedst1.winxed:
backport some changes in lexicals to stage 1
23:14
23:18 whiteknight joined
whiteknight good evening, #parrot 23:32
NotFound whiteknight: lexical modifier for variables done. 23:33
whiteknight NotFound: yes, I'm looking at the commit now
NotFound++
NotFound That part of the compiler is still ugly, is better that I take care of it myself. 23:34
whiteknight okay, that's fine too. I'm always willing to help 23:35
So what's the syntax, var f:[lexical("f")]; ?
NotFound whiteknight: yes, or just [lexical] if using the same name. 23:36
whiteknight: I've discovered an imcc bug while on it.
whiteknight one of many
NotFound The .lex directive doesn't unescape the string if it has no encoding specifier. 23:37
So if you try to do [lexical("\\"")] it will fail.
whiteknight oh great 23:38
next time you see IMCC, tell it I hate it
NotFound I've done it just in case. 23:39
dalek nxed: 818ad4c | NotFound++ | winxedst (2 files):
clean a bit the lexical handling code in local function
23:40
NotFound Other than this problem, bizarre lexical names works fine. 23:44
dalek nxed: b219381 | NotFound++ | NEWS:
some news for 1.8
23:50
cotto just another reason why PIR should be generated and not written 23:55
compilers are much better than humans at putting up with stupid stuff 23:56