Camelia, the Perl 6 bug

IRC log for #parrot, 2012-04-25

Parrot | source cross referenced

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 whiteknight joined #parrot
00:15 whiteknight good evening, #parrot
00:16 whiteknight 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.
00:22 cotto ~~
00:22 cotto whiteknight, possibly something along the lines of it being a single place where people can look?
00:22 whiteknight I don't remember
00:22 whiteknight kid51 can be very persuasive when he wants to be
00:24 whiteknight blah, I've got a test in NQP that's hanging and I don't know why
00:35 Coke (single place) we HAVE that, it's called "planet parrot". ;)
00:37 cotto indeed
00:41 benabik joined #parrot
00:42 benabik ~~
00:42 whiteknight hello benabik
00:45 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
00:46 Coke you heard it here, students.
01:08 Khisanth joined #parrot
01:26 dalek Rosella: 21bc6c9 | Whiteknight++ | README.md:
01:26 dalek Rosella: Update README. We aren't going to keep an explicit list of stable libs here
01:26 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/21bc6c9e9e
01:26 dalek Rosella: 16ca37b | Whiteknight++ | src/json/ (8 files):
01:26 dalek Rosella: [Json] re-add Json.
01:26 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/16ca37b759
01:26 dalek Rosella: 959d515 | Whiteknight++ | t/date/TimeSpan.t:
01:26 dalek Rosella: [Date] Add in a stub test file for Date.TimeSpan
01:26 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/959d5154ac
01:28 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 #parrot
02:03 bluescreen joined #parrot
02:13 bacek joined #parrot
03:16 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.
04:41 dalek parrot: 1d5965c | petdance++ | src/pmc/orderedhashiterator.pmc:
04:41 dalek parrot: flag unused interps
04:41 dalek parrot: review: https://github.com/parrot/parrot/commit/1d5965c897
04:41 dalek parrot: 4c75c02 | petdance++ | src/pmc/pmclist.pmc:
04:41 dalek parrot: localize variables to inner blocks, and remove unused vars
04:41 dalek parrot: review: https://github.com/parrot/parrot/commit/4c75c028c3
05:43 dalek rakudo/nom: 1a7e4df | moritz++ | docs/announce/2012.04.1:
05:43 dalek rakudo/nom: [announce] wording fix from pmichaud++
05:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1a7e4df89c
06:21 fperrad joined #parrot
07:00 brrt joined #parrot
07:03 brrt morning parrot
07:42 Khisanth joined #parrot
07:48 moritz the morning parrot catches the worm
08:31 lucian joined #parrot
08:49 Khisanth joined #parrot
09:49 schm00ster joined #parrot
10:08 Jacky joined #parrot
10:12 fperrad joined #parrot
10:47 dalek nqp: a04da69 | (Arne Skjærholt)++ | src/6model/reprs/CArray.c:
10:47 dalek nqp: Make sure initial child_objs in CArray is zeroed out.
10:47 dalek nqp: review: https://github.com/perl6/nqp/commit/a04da690b8
10:48 bacek_ joined #parrot
11:08 jashwanth joined #parrot
11:52 Infinoid japhb: pong
11:56 mtk joined #parrot
12:05 jashwanth joined #parrot
12:32 bluescreen joined #parrot
12:33 whiteknight joined #parrot
12:34 whiteknight good morning, #parrot
12:35 tadzik good afternoon whiteknight
12:37 whiteknight hello tadzik. How are you doing?
12:40 brrt joined #parrot
12:43 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 tadzik how are you these days?
12:44 whiteknight I am doing well. Slowly getting over a cold.
12:45 tadzik so how do you feel about gsoc this year?
12:46 whiteknight mostly hopeful
12:49 brambles joined #parrot
12:50 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
12:50 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
12:51 whiteknight that's just a hunch, assuming they continue the same trend next year
12:52 dalek Rosella: 87e8ec4 | Whiteknight++ | / (2 files):
12:52 dalek Rosella: [Random] A few small tweaks and fixes for MersenneTwister, hopefully these help make it work better on 32-bit
12:52 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/87e8ec4223
12:58 JimmyZ joined #parrot
13:02 PacoAir joined #parrot
13:33 jashwanth joined #parrot
13:37 brrt whiteknight: keep up the pressure :-p
13:37 whiteknight what pressure?
13:39 brrt last year of gsoc for parrot
13:40 brrt to be fair, i was hesitant at first, because a blog post of your hand scared me off a bit :-)
13:43 tadzik more like: scared you on ;)
13:46 brrt at the end, yes
14:14 Coke huh. autofudge is running, not emitting any output, and I don't have any perl6 processes running.
14:14 Coke I think this means /fudge/ is hanging.
14:15 Coke argh, and autounfudge doesn't respond well when you kill fudge
14:16 Coke argh, wrong channel.
14:22 whiteknight brrt: Which post?
14:24 brrt whiteknight: i'll find it
14:29 brrt http://whiteknight.github.com/​2011/04/11/gsoc_proposals.html this one
14:29 brrt now that i read it again, it actually contains a lot of good tips
14:38 bluescreen joined #parrot
14:43 whiteknight brrt: My goal with that post was to weed out some of the slackers and help answer some common questions
14:50 benabik joined #parrot
14:51 benabik Good morning, #parrot
14:54 whiteknight hello benabik
15:00 brrt whiteknight: i realize that :-)
15:01 whiteknight brrt: You would be absolutely amazed at some of the applications we've received in previous years
15:01 whiteknight some of them are not even worth the effort to laugh at them
15:02 brrt i've never seen any but my own :-) can't really compare
15:03 whiteknight One guy posted a copy of our proposal template, with no changes except a new title
15:03 whiteknight and his name signed at the bottom
15:03 whiteknight 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
15:05 brrt how... is that?
15:06 brrt as a sidenote, i don't think GSoC has ever just accepted 'a web application' ever
15:14 jsut_ joined #parrot
15:17 dalek winxed: 719fd1e | NotFound++ | winxedst (2 files):
15:17 dalek winxed: minimal refactor and cleanup of variable declarations
15:17 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/719fd1e5ed
15:20 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.
15:20 whiteknight it looks like NotFound++ is cleaning it up a little
15:21 benabik Oh.  Apparently so.
15:21 NotFound Not much yet.
15:21 benabik I finished up all the PCT.Node types last night and pushed the result to parrot/parrot.
15:21 benabik But all the compilers depend on dynamic lexicals.
15:22 whiteknight benabik: okay, I promise to stare at it tonight
15:23 NotFound Do you have some short pir example of dynamic lexicals usage? Maybe winxed needs some more support for that.
15:24 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
15:24 benabik All the real-world examples I know of are in PCT.HLLCompiler and friends.
15:25 NotFound whiteknight: I mean, in the other side than we talked about. Declaring the use of a lexical defined elsewhere.
15:25 NotFound benabik: yeah, that's why I said "short" ;)
15:28 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:30 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.
15:30 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.
15:31 benabik 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:32 NotFound benabik: BTW I don't think the current way of having a single compiler object for each HLL is satisfying.
15:33 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 benabik NotFound: Is there something in particular you think needs to be addressed?
15:34 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
15:34 NotFound Is just the implementation internal what forces it to be a single object.
15:34 whiteknight because you want the ability to not share state
15:34 benabik whiteknight: That is, in fact, basically my plan.
15:34 whiteknight benabik: awesome then
15:35 NotFound benabik: for example, set compilation options in the object, without affecting further compilations unless we deliberately reuse the same object.
15:36 benabik NotFound: I think all the 'standard' compiler functions are one-off.  But I see your point.
15:39 benabik NotFound: Non-realistic example: https://gist.github.com/2490722
15:40 NotFound benabik: thanks
15:41 NotFound And yes, winxed can provide a way to generate the find_dynamic_lex and store_dynamic_lex appropiately.
15:43 NotFound But maybe is better to start with pirop usages, and develop a way later with real use cases.
15:44 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:46 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
15:50 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 benabik I didn't include that in my example, but it is actually fairly elegant.
15:55 whiteknight yeah, I know what you mean. Maybe I just need more time to come to grips with it
15:56 whiteknight 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:57 benabik PCT basically uses it 'internally', it's just that portions of it occasionally get overridden by users.
15:59 whiteknight jashwanth++ #first blog post
16:03 bluescreen joined #parrot
16:05 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:06 benabik Right.
16:08 NotFound Correction: we don't need anything, basic usage can be done right now :)
16:08 benabik Oh?
16:09 NotFound https://gist.github.com/2490975
16:10 benabik You can .lex in Winxed?
16:10 benabik I didn't expect that.  But since it looks like an op, I guess I shouldn't have been surprised.
16:11 NotFound benabik: yes, pirops does some special case for things that start with a dot.
16:11 NotFound Not a recommended usage, but it helps in some cases, at least for proof of concepts.
16:12 whiteknight aloha karma jashwanth
16:12 aloha whiteknight: jashwanth has karma of 3.
16:12 whiteknight jashwanth++
16:12 whiteknight aloha karma jashwanth
16:12 aloha whiteknight: jashwanth has karma of 4.
16:12 jashwanth aloha karma whiteknight
16:12 aloha jashwanth: whiteknight has karma of 2685.
16:13 whiteknight karma leo
16:13 aloha leo has karma of 0.
16:13 whiteknight karma chromatic
16:13 aloha chromatic has karma of 163.
16:13 whiteknight hmmm, I guess all the old karma records got wiped out
16:13 whiteknight I probably knew that
16:13 jashwanth u have the highest
16:13 whiteknight karma c
16:13 aloha c has karma of 709.
16:14 whiteknight karma g
16:14 aloha g has karma of 574.
16:14 atrodo c is way too high
16:14 whiteknight c--
16:14 atrodo karma svn
16:14 aloha svn has karma of -21.
16:14 whiteknight heh
16:14 atrodo karma cvs
16:14 aloha cvs has karma of 0.
16:14 atrodo cvs--
16:14 benabik Poor C++, always having its karma stolen by its younger brother.
16:14 whiteknight karma (c++)
16:14 aloha (c++) has karma of 0.
16:14 whiteknight karma c++
16:14 aloha c++ has karma of -1.
16:14 whiteknight heh
16:14 jashwanth haha
16:15 whiteknight karma jnthn
16:15 aloha jnthn has karma of 2597.
16:15 jashwanth whiteknight++
16:15 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
16:15 jashwanth karma leo
16:15 aloha leo has karma of 0.
16:16 jashwanth oh
16:16 atrodo purl reports leo's current karma as 1888
16:17 whiteknight yeah, I think purl crashed at one point and lost everything
16:17 whiteknight or switched machines
16:17 jashwanth oh
16:17 jashwanth karma dukeleto
16:17 aloha dukeleto has karma of 1147.
16:17 whiteknight purl used to be our karma bot. Now aloha does it
16:17 atrodo and it is good
16:17 whiteknight :)
16:18 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.
16:19 NotFound Oh, forget it, I was thinking about the using part, not the defining one.
16:21 NotFound benabik: yes, I think you can use this trick as a first step.
16:21 benabik NotFound: Looks that way, yes.
16:21 benabik I'm working on HLLCompiler to see.
16:22 whiteknight Notfound: What is volatile?
16:24 dmalcolm joined #parrot
16:24 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.  :-)
16:25 benabik Although most people haven't encountered it there either.
16:25 NotFound You need it if you use operator = rather than operator =:
16:26 benabik =: is assign and = is set, right?
16:26 NotFound benabik: yeah
16:26 whiteknight NotFound: oh, so a volatile is like a .lex?
16:26 NotFound That usually means: if you don't want speed ;)
16:27 NotFound whiteknight: no, it just change code generation for lexicals.
16:28 benabik Does winxed DTRT for a try without catch?
16:28 benabik (i.e. generate a handler that ignores the exception)
16:28 NotFound benabik: If I remember well, the parser rquires a catch.
16:28 benabik NotFound: I'll trust your memory.  :-)
16:29 NotFound And I prefer it that way, is less error prone.
16:30 benabik I'm find either way.
16:30 benabik *fine
16:42 benabik 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:44 NotFound benabik: be careful with that, goto lacks checks, you can jump in and out of loops, try blocks... usually for no good.
16:45 benabik NotFound: Oh, I know.
16:46 benabik 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:47 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.
16:47 whiteknight I don't know what it would look like
16:48 benabik Perhaps if you use a label name as an expression, you get a continuation?
16:48 benabik Perhaps too magical.
16:49 NotFound whiteknight: do you have some use cases?
16:49 whiteknight NotFound: not yet
16:50 whiteknight 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 #parrot
16:50 whiteknight label_foo: var c = var(label_foo)
16:51 NotFound Mmmm... a continue operator may be acceptable, or too confusing?
16:52 NotFound var c = continue label_foo;
16:53 NotFound Or: var c = continue {  continuation_goes_here }
16:54 NotFound Or both.
16:59 cotto ~~
17:03 PacoAir joined #parrot
17:04 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)` ?
17:05 whiteknight I think you need a variable
17:05 whiteknight unless you create an inline
17:05 NotFound You can use the 'new' method of Class.
17:06 whiteknight oh, that too
17:06 whiteknight get_class(expr).new(...)
17:06 whiteknight but then you'd need to manually call the constructor
17:09 NotFound Calling a winxed constructor for a class got from elsewhere is tricky, anyway.
17:09 whiteknight https://github.com/Whiteknight/Rosella/​blob/master/src/core/Rosella.winxed#L62
17:10 whiteknight it's not terribly bad
17:11 benabik PCT classes don't use winxed constructors anyway.  They use the new method on the metaclass.
17:11 benabik Or something like that.
17:11 benabik It's slightly difficult to use from Winxed.  `use PCT.Node; Node.new( ... )`
17:12 whiteknight yeah, that is obnoxious
17:13 whiteknight 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 whiteknight but that's just me
17:13 NotFound An automated way to create a metaclass for a winxed class that DTRT may be nice.
17:15 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:16 benabik .oO( Doctor, doctor, it hurts when I use goto. )
17:16 NotFound benabik: winxed current, or parrot snapshot?
17:16 benabik Uhm.
17:16 benabik Parrot snapshot.
17:16 NotFound benabik: should be fixed. Let me check...
17:18 NotFound Yeah, fixed in current.
17:18 benabik Fair enough.
17:18 NotFound $ winxed -e 'goto foo;'
17:18 NotFound __eval__:1: No such label near foo
17:19 NotFound In your example, foo is not in scope.
17:19 benabik So jumping into if statements is verboten?
17:20 NotFound Labels have block scope so no, you can't jump into it.
17:21 benabik Hm.  Alright.
17:21 benabik I guess some spagetti code is difficult to duplicate.  :-D
17:21 benabik Technically the original is "in an if statement, jump to an exception handler
17:21 NotFound You'll need more jumps to do that thing.
17:23 benabik I'll just use the EH to make the condition in the if true.  Simple enough.
17:23 benabik There's no actual requirement that I duplicate the logic 100% accurately.
17:23 NotFound benabik: maybe is better to make the common part an inline and use it.
17:25 NotFound Or an anon function. With winxed you can use higher level ways without enlarging the code so much as in pir.
17:26 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 benabik So setting the result to null in the handler is fairly clear.
17:26 NotFound Yeah, I mean in general.
17:26 lucian__ joined #parrot
17:27 brrt joined #parrot
17:28 benabik Ugh.  Named arguments are kinda ugly.  Have no better suggestions for syntax at the moment though.
17:29 whiteknight I was thinking foo(bar named 'bar')
17:29 whiteknight and on the parameter side, could be the same thing, plus a type identifier
17:30 benabik Still strikes me as very verbose.
17:30 whiteknight foo ('bar' : bar) like hash syntax?
17:30 benabik But easier to scan, I'll admit.
17:31 benabik Rakudo, NQP, and PIR use hash syntax and it works pretty well.
17:31 benabik The fun part is that sometimes you also need options on it, like optional.
17:33 NotFound Hash syntax in pir?
17:34 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.
17:35 NotFound Ah, yeah. But you can't use such tricks in winxed without interfering with expresion syntax.
17:36 whiteknight right, that's why the : operator might work
17:38 benabik Might be slightly exciting with ?: syntax.
17:42 whiteknight I don't think so. All cases I can think of parse unambiguously
17:43 whiteknight 'foo' : x ? y : z
17:43 whiteknight x ? 'foo' : 'bar' : baz
17:43 whiteknight both of those should parse unambiguously
17:57 NotFound whiteknight: Maybe for the parser, but harder for the human rader.
17:59 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
18:00 whiteknight benabik: I think it's the flags
18:00 whiteknight the parser can do the right thing, even if the programmer does a silly thing
18:04 whiteknight 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 jsut joined #parrot
18:05 NotFound whiteknight: the hard part is trying to guess the frequency of confusing uses.
18:06 whiteknight true
18:07 benabik 'handler: ; get_param '0', $P0 ; pop_eh` in PIR should be the same as `try {} catch (p0) {}` in Winxed, right?
18:07 benabik Manual calls to PCC are confusing.
18:08 Coke benabik: you could write it in winxed and generate the PIR and compare, ma?
18:09 whiteknight benabik: The '0' is a string of comma-separated integer flags
18:09 whiteknight which is one of the reasons why PCC is teh major suxxors
18:09 benabik Coke: Winxed uses the .get_results macro...  This is more that I'm more confused by the get_param call than the winxed.
18:09 whiteknight so the zero there means it's a non-constant PMC, I think
18:09 whiteknight without flags
18:09 benabik Shouldn't it be a FIA instead?
18:10 whiteknight I think it splits the string into an FIA
18:10 whiteknight I need to double-check. That's the way it used to be, for sure
18:10 benabik Oy.
18:11 whiteknight for every PCC call, Parrot sends an email to a guy named frank, and he dispatches the call manually
18:39 benabik Oh, this is fun.  It's optionally pushing an exception handler.
18:40 whiteknight great
18:46 benabik If I goto out of a try, the handler will still be active, right?
18:47 * benabik is being "clever"
18:48 benabik Nevermine, more complex than that.
18:49 benabik I'll just rethrow if I'm not "supposed" to be in the handler.
18:50 whiteknight this is sounding wonderful
18:50 benabik Does rethrowing an exception goof the backtrace?
18:50 whiteknight it appends the two backtraces
18:50 whiteknight or, stores them in an array
18:50 benabik Hm.
18:50 whiteknight so you can only see the original one, if that's all you want
18:51 benabik Huh?
18:51 whiteknight var bt = e.backtrace_strings()
18:51 whiteknight bt[0] is the original backtrace
18:51 whiteknight bt[1] and beyond are backtraces from rethrows
18:51 benabik Will the default backtrace printer show them all, or just [0]?
18:52 whiteknight all, I think
18:52 benabik Nope.  Even better.  It only shows the most recent.
18:52 whiteknight great
18:52 whiteknight that seems wrong. I wonder why that is
18:53 benabik So I do have to play tricks with it if I want to sometimes catch things.
18:54 whiteknight what code are you working on that only sometimes catches exceptions?
18:54 benabik PCT.HLLCompiler.command_line
18:55 benabik 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
18:57 benabik That might be more sane than my goto plan...
18:57 whiteknight I know you're looking for a direct port, but seriously...
18:57 benabik :-D
18:58 whiteknight The human mind starts to do weird things when you force it to program in assembly
18:58 whiteknight it's not natural
18:58 benabik It does make some sense in the absence of a transparent rethrow.
18:58 benabik That said, it would be nice if Parrot did have a transparent rethrow.
18:58 Coke (assembly) young people these days. sheesh.
18:58 whiteknight we can try to make rethrow more transparent, I've never heard anything like a concensus about what we want it to do
18:59 aloha (parrot/parrot) Issues opened : 757 (Fix ICU config issues on MSVC reported by Mark Solinski) by gerdr : https://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.
18:59 NotFound I think there were consensus about drafting a proposal about that. Then none of us wrote it ;)
18:59 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.
19:00 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
19:00 Coke benabik: it doesn't do what you think! ;)
19:00 Coke (but try it)
19:00 benabik Okay, yes.
19:00 whiteknight Exceptions are a mess. I guess I'll have to go tackle them after 6model and namespace
19:00 benabik throw appears to replace the backtrace and rethrow appends it.
19:00 NotFound Note that currently a completely transparent rethrow is not possible inside a winxed handler, because it does a finalize.
19:01 NotFound So if you resume, funny things may happen.
19:02 benabik Exceptions are a mess.
19:02 * benabik recalls the whole 'die' is resumable bit.
19:03 dalek parrot: e77d9c4 | (Gerhard R)++ | config/auto/icu.pm:
19:03 dalek parrot: Fix ICU config issues on MSVC reported by Mark Solinski
19:03 dalek parrot: review: https://github.com/parrot/parrot/commit/e77d9c42da
19:03 dalek parrot: 97b7de5 | petdance++ | config/auto/icu.pm:
19:03 dalek parrot: Merge pull request #757 from gerdr/gerdr/msvc-icu-fix
19:03 dalek parrot:
19:03 dalek parrot: Fix ICU config issues on MSVC reported by Mark Solinski
19:03 dalek parrot: review: https://github.com/parrot/parrot/commit/97b7de57d6
19:04 aloha (parrot/parrot) Issues closed : 757 (Fix ICU config issues on MSVC reported by Mark Solinski) by gerdr : https://github.com/parrot/parrot/issues/757
19:04 whiteknight Besides the fact that all the ops are misnamed, the subsystem is terrible
19:07 whiteknight 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 whiteknight and exit
19:07 whiteknight exit_i should not be resumable or circumventable
19:07 benabik Mmmm...
19:08 whiteknight Everything else can be built on top of those
19:08 whiteknight maybe throw_p_p_i for an explicit resume continuation
19:08 whiteknight in case you want to "resume" to someplace else
19:09 whiteknight so an average call would be something like throw(new Exception("Crap!"), null, true)
19:10 whiteknight in C#, the syntax is throw new Exception("Message") so we're not too far from that
19:10 whiteknight and they don't have resumable exceptions
19:12 NotFound Forget flags. Two functions, two ops.
19:13 whiteknight what do you mean?
19:14 PacoAir joined #parrot
19:14 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?
19:14 Coke isn't resumable a property of the exception itself?
19:14 Coke not the way in which it was thrown?
19:14 NotFound I think is property of the code after throw.
19:15 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.
19:15 NotFound It may expect to be reachable after throw, or not.
19:16 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.
19:17 benabik Something pointed to by a register?
19:17 NotFound flags to select functionality lead to confusion and lots of "if"
19:17 NotFound benabik: throw $P0
19:17 NotFound Nothing says if $P0 content is resumable or not.
19:18 NotFound It may sometimes be and sometimes no.
19:18 PacoAir joined #parrot
19:19 PacoAir joined #parrot
19:20 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:21 whiteknight yes, that could be very important information for JIT and analysis tools
19:23 NotFound With a too generic op, we may need to add annotations to restore the discarded information.
19:24 NotFound Doable, but not very smart.
19:25 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:26 dalek nqp: c2ae263 | moritz++ | VERSION:
19:26 dalek nqp: bump VERSION to 2012.04.1
19:26 dalek nqp: review: https://github.com/perl6/nqp/commit/c2ae2631d9
19:26 benabik Technically, in that, everything can be implemented in terms of rethrow.  :-D
19:27 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.
19:27 benabik whiteknight: That's the _point_ of CPS.
19:27 whiteknight I know. I wish these kinds of things had been decided upon years ago
19:27 benabik Technically throwcc is "callcc eh"
19:28 benabik (speaking generically of CPS, not specifically of Parrot)
19:28 NotFound throwcc can be generated, can't it?
19:28 whiteknight the hardest part of it is finding the handler
19:29 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?
19:30 benabik NotFound: Sure.  Add a continuation to the exception.
19:31 benabik NotFound: I suppose you could make `throwcc ex` just `throw ex, label ; label:`
19:31 whiteknight resumable exceptions are so mind-boggling
19:31 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.
19:31 whiteknight we don't even really support finally { } yet, and we've got resumable exceptions
19:32 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 benabik In CPS, finally is basically a new exception handler that tail calls the original one.
19:33 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.
19:34 NotFound And for the non resumable one, we can just set a continuation that goes to hell.
19:34 NotFound Or treat null that way.
19:34 benabik Right.
19:35 benabik I'd treat null that way, honestly.  Same thing for tailcall from the first function.
19:36 benabik `call null` == `halt`
19:36 benabik Although we may want to treat some versions of that differently for error handling.
19:36 dalek rakudo/nom: 3447164 | moritz++ | tools/build/NQP_REVISION:
19:36 dalek rakudo/nom: bump NQP revision to 2012.04.1
19:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/34471649e5
19:42 whiteknight one thing is for certain: We absolutely do not leverage CPS well
19:42 benabik No.
19:43 benabik The indirect control of continuations is part of that.  Most control-flow techniques in Parrot use hidden continuations.
19:44 benabik "control exceptions" feel like a poor version of CPS.
19:44 benabik_ joined #parrot
19:50 benabik__ joined #parrot
19:51 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:54 moritz 4444
19:55 moritz sorry, hanging connectiong
19:59 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 whiteknight right now it's just an implementation detail, we need to clean it up
20:00 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
20:01 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.
20:02 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.
20:03 benabik But that's why I'll ramble on about CFGs and CPS and the like.  I often feel we're half-way there.
20:04 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:05 whiteknight M0 can take us most of the way, but if we clean up PCC first, M0 has an easier job to do
20:05 whiteknight much easier
20:08 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.
20:09 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?
20:09 whiteknight benabik: that's very close to my wishlist too
20:09 benabik moritz: Details.
20:10 benabik moritz: And a concurrent GC would be nice too.  ;-)
20:10 moritz :-)
20:10 benabik I don't quite want to say "everything we have is wrong", it's more "we're almost there" for everything.  :-D
20:11 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.  :-/
20:17 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 whiteknight And most of the improvements are opcode-level interface improvements, being more explicit and using fewer hidden variables
20:21 dalek rakudo/nom: f61253e | masak++ | docs/release_guide.pod:
20:21 dalek rakudo/nom: [docs/release_guide.pod] volunteered for July
20:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f61253e537
20:21 dalek Heuristic branch merge: pushed 51 commits to rakudo by masak
20:21 dalek rakudo/nom: 7ad3711 | masak++ | docs/release_guide.pod:
20:21 dalek rakudo/nom: [docs/release_guide.pod] volunteered tadzik++ for May
20:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7ad3711990
20:23 dalek rakudo/nom: efbc48c | duff++ | docs/release_guide.pod:
20:23 dalek rakudo/nom: [docs/release_guide.pod] claim June release
20:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/efbc48c622
20:25 dalek rakudo/nom: 5a65af3 | moritz++ | docs/release_guide.pod:
20:25 dalek rakudo/nom: add 2012.04 release to release_guide.pod
20:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5a65af3c1a
20:25 dalek rakudo/nom: 4ec5106 | moritz++ | VERSION:
20:25 dalek rakudo/nom: [release] bump VERSION to 2012.04.1
20:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4ec5106aaa
20:27 dalek rakudo/nom: 6bee9b6 | duff++ | docs/release_guide.pod:
20:27 dalek rakudo/nom: [docs/release_guide.pod] claim birthday month release too
20:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6bee9b610d
20:35 NotFound Looks like imcc doesn't like .lex with bizarre names
20:36 NotFound Maybe no, it can be my fault.
20:36 benabik I think it accepts whatever you give it.  Has to be quoted though.
20:39 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.
20:39 benabik imcc--
20:40 NotFound benabik: you can. Just prefix with :
20:40 benabik NotFound: Oh.
20:40 benabik NotFound++
20:41 lucian__ joined #parrot
20:51 ilbot2 joined #parrot
20:51 Topic for #parrot is now Parrot 4.3.0 "In Which..." | http://parrot.org | Log: http://irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
21:09 dmalcolm joined #parrot
21:13 PacoAir joined #parrot
21:15 NotFound Looks like the .lex directive does not unescape and does not accept encoding qualified strings
21:17 NotFound Uh, no, it does unescape unless qualified...
21:18 NotFound That's it.
22:25 kid51 joined #parrot
22:54 dalek winxed: 36ef19f | NotFound++ | winxedst2.winxed:
22:54 dalek winxed: variable modifiers test implementation with lexname modifier
22:54 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/36ef19fd29
22:59 dalek winxed: fbc4fed | NotFound++ | winxedst (2 files):
22:59 dalek winxed: rename a parameter for clarity
22:59 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/fbc4fed33f
23:14 dalek winxed: 0d5a0e2 | NotFound++ | winxedst1.winxed:
23:14 dalek winxed: backport some changes in lexicals to stage 1
23:14 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/0d5a0e29ab
23:18 whiteknight joined #parrot
23:32 whiteknight good evening, #parrot
23:33 NotFound whiteknight: lexical modifier for variables done.
23:33 whiteknight NotFound: yes, I'm looking at the commit now
23:33 whiteknight NotFound++
23:34 NotFound That part of the compiler is still ugly, is better that I take care of it myself.
23:35 whiteknight okay, that's fine too. I'm always willing to help
23:35 whiteknight So what's the syntax, var f:[lexical("f")]; ?
23:36 NotFound whiteknight: yes, or just [lexical] if using the same name.
23:36 NotFound whiteknight: I've discovered an imcc bug while on it.
23:36 whiteknight one of many
23:37 NotFound The .lex directive doesn't unescape the string if it has no encoding specifier.
23:37 NotFound So if you try to do [lexical("\"")] it will fail.
23:38 whiteknight oh great
23:38 whiteknight next time you see IMCC, tell it I hate it
23:39 NotFound I've done it just in case.
23:40 dalek winxed: 818ad4c | NotFound++ | winxedst (2 files):
23:40 dalek winxed: clean a bit the lexical handling code in local function
23:40 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/818ad4c286
23:44 NotFound Other than this problem, bizarre lexical names works fine.
23:50 dalek winxed: b219381 | NotFound++ | NEWS:
23:50 dalek winxed: some news for 1.8
23:50 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/b219381490
23:55 cotto just another reason why PIR should be generated and not written
23:56 cotto compilers are much better than humans at putting up with stupid stuff

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

Parrot | source cross referenced