Camelia, the Perl 6 bug

IRC log for #parrot, 2011-08-03

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:02 cotto_work http://wingolog.org/archives/2011/08/02/a-clos​er-look-at-crankshaft-v8s-optimizing-compiler
00:05 benabik left #parrot
00:15 wknight-phone joined #parrot
00:19 wknight-phone left #parrot
00:38 whiteknight joined #parrot
00:39 whiteknight good evening, #parrot
00:39 Felipe good evening!
00:47 dafrito left #parrot
00:49 whiteknight benabik: ping
00:49 whiteknight soh_cah_toa: ping
00:51 dalek nqp: 4e5bf5f | pmichaud++ | src/PAST/NQP.pir:
00:51 dalek nqp: Add :pasttype<xor_nqp>, which allows the return value for two true
00:51 dalek nqp: values in an xor expression to be specified as one of the children.
00:51 dalek nqp: This can likely be immediately added to Parrot's PCT as a replacement
00:51 dalek nqp: for :pasttype<xor>, but since nom/nqp will need this long before the
00:51 dalek nqp: next Parrot supported release we'll keep a copy here too.
00:51 dalek nqp: review: https://github.com/perl6/nqp/commit/4e5bf5f690
00:56 dalek parrot: 2098ab5 | Whiteknight++ | src/packfile/api.c:
00:56 dalek parrot: Some extra checks in Parrot_pf_subs_by_flag. This should help to eliminate or reduce issues seen by benabik++
00:56 dalek parrot: review: https://github.com/parrot/parrot/commit/2098ab50c3
00:57 whiteknight msg benabik I just pushed a potential fix to master for your packfile issues. I don't have your test case here, so let me know if it helps you
00:57 aloha OK. I'll deliver the message.
01:01 Kulag left #parrot
01:02 darbelo_ joined #parrot
01:02 darbelo left #parrot
01:06 GeJ left #parrot
01:06 GeJ joined #parrot
01:08 darbelo_ left #parrot
01:09 woosley joined #parrot
01:16 rdesfo joined #parrot
01:17 dalek rakudo/nom: cefbda4 | pmichaud++ | / (3 files):
01:17 dalek rakudo/nom: Some infix:<xor> improvements -- two true values passed to xor or ^^
01:17 dalek rakudo/nom: now result in Nil instead of a segfault-inducing Parrot Undef.
01:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cefbda4b12
01:19 dalek rakudo/nom: 6834ff0 | pmichaud++ | NOMMAP.markdown:
01:19 dalek rakudo/nom: Update NOMMAP.
01:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6834ff033c
01:27 theory left #parrot
01:27 whiteknight left #parrot
01:28 rdesfo left #parrot
01:34 daniel-s joined #parrot
01:41 Kulag joined #parrot
01:50 Drossel joined #parrot
01:51 Kulag left #parrot
01:59 woosley left #parrot
02:16 Kulag joined #parrot
02:16 Drossel left #parrot
02:38 kurahaupo left #parrot
02:38 rdesfo joined #parrot
02:41 rdesfo left #parrot
02:58 theory joined #parrot
03:09 theory left #parrot
03:42 kurahaupo joined #parrot
03:58 theory joined #parrot
04:14 SHODAN joined #parrot
04:42 rdesfo joined #parrot
04:42 rdesfo left #parrot
04:42 theory left #parrot
04:50 SHODAN left #parrot
05:11 woosley joined #parrot
05:12 SHODAN joined #parrot
05:31 theory joined #parrot
05:36 cotto ~~
05:41 theory left #parrot
05:44 theory joined #parrot
05:46 theory left #parrot
05:46 theory joined #parrot
05:47 theory left #parrot
05:57 Kulag left #parrot
05:57 Kulag joined #parrot
06:01 daniel-s left #parrot
06:06 Drossel joined #parrot
06:08 Kulag left #parrot
06:18 aloha left #parrot
06:19 bacek_at_work left #parrot
06:25 cotto seen soh_cah_toa
06:31 bacek_at_work joined #parrot
06:37 aloha joined #parrot
06:44 cotto seen aloha
06:44 aloha aloha was last seen in #perl6 6 mins 42 seconds ago joining the channel.
06:47 dalek tracwiki: v3 | cotto++ | HBDBPlanning
06:47 dalek tracwiki: add a description of this page's purpose, remove some unneeded bits from the original timeline
06:47 dalek tracwiki: http://trac.parrot.org/parrot/wiki/HB​DBPlanning?version=3&amp;action=diff
06:49 cotto msg soh_cah_toa I've started to look at how to rework your GSoC schedule to accommodate imcc--'s bugs.  Please take a look at http://trac.parrot.org/parrot/wiki/HBDBPlanning and let's find some time to discuss the project.
06:49 aloha OK. I'll deliver the message.
07:00 Drossel left #parrot
07:01 Kulag joined #parrot
07:01 dalek parrot: 1ecc900 | cotto++ | docs/dev/profiling.pod:
07:01 dalek parrot: add a bunch of stub sections to the profiling document
07:01 dalek parrot: review: https://github.com/parrot/parrot/commit/1ecc9004ca
07:02 mj41 joined #parrot
07:04 Kulag left #parrot
07:05 Kulag joined #parrot
07:13 Kulag left #parrot
07:16 Kulag joined #parrot
07:17 dafrito joined #parrot
07:21 Drossel joined #parrot
07:22 Kulag left #parrot
07:23 bubaflub left #parrot
07:27 Drossel left #parrot
07:31 fperrad joined #parrot
07:45 mls joined #parrot
07:45 mls morning!
07:46 mls Is there a reason why the die(INT, INT) opcode doesn't attach a continuation to the exception?
07:46 mls The other forms of die() attach it.
08:05 Kulag joined #parrot
08:12 Kulag left #parrot
08:26 Kulag joined #parrot
08:46 woosley left #parrot
08:48 woosley joined #parrot
08:58 woosley1 joined #parrot
08:58 woosley1 left #parrot
09:00 woosley left #parrot
09:05 jjore left #parrot
09:28 bubaflub joined #parrot
09:51 preflex_ joined #parrot
09:55 preflex left #parrot
09:57 mls left #parrot
10:03 ambs joined #parrot
10:04 lucian joined #parrot
10:41 dafrito Is it okay/common to use PIR labels solely for readability purposes?
10:42 dafrito I'd imagine they'd just get optimized away, but I'm wondering if it'll be like, offensive to people to see them ;)
10:43 kurahaupo left #parrot
10:44 kurahaupo joined #parrot
10:47 cosimo joined #parrot
10:51 jjore joined #parrot
11:10 moritz dafrito: why not use comments for readability?
11:16 Felipe morning
11:31 dafrito moritz, I do, but it looks clearer to me to also have the labels.
11:31 moritz anyway, it wouldn't offend me in any way
11:31 dafrito I use a label followed by a comment, which indicates to me "This comment describes what this block is doing" whereas only the comment wouldn't really accomplish the same
11:33 dafrito moritz, thanks for your response :)
11:33 Coke left #parrot
11:33 Coke joined #parrot
11:34 moritz I also tend do avoid writing too much in PIR :-)
11:35 cosimo left #parrot
11:36 dafrito moritz, haha, yeah, it's a bit untenable. I'm trying to fix a bug in lua, and decided to do some refactorings along the way
11:40 lucian left #parrot
11:48 dalek rakudo/nom-exceptions: 8ea619d | moritz++ | NOMMAP.markdown:
11:48 dalek rakudo/nom-exceptions: note a segfault in NOMMAP
11:48 dalek rakudo/nom-exceptions: review: https://github.com/rakudo/rakudo/commit/8ea619d7c3
11:48 dalek rakudo/nom-exceptions: 69e9988 | moritz++ | src/core/Exception.pm:
11:48 dalek rakudo/nom-exceptions: extract payload from parrot excetions, if available
11:48 dalek rakudo/nom-exceptions: review: https://github.com/rakudo/rakudo/commit/69e9988adb
11:48 dalek rakudo/nom-exceptions: 0c51f85 | moritz++ | src/core/Exception.pm:
11:48 dalek rakudo/nom-exceptions: in Exception, make sure we have a parrot exception before throwing
11:48 dalek rakudo/nom-exceptions: review: https://github.com/rakudo/rakudo/commit/0c51f85bbd
12:06 contingencyplan left #parrot
12:20 kurahaupo left #parrot
12:29 whiteknight joined #parrot
12:29 whiteknight good morning, #parrot
12:30 tadzik good morning whiteknight
12:35 dalek rakudo/nom: 967ab7a | tadzik++ | src/Perl6/Actions.pm:
12:35 dalek rakudo/nom: Use $/.from ~ ",' ~ $/.to as a POD block id when adding them to $=POD
12:35 dalek rakudo/nom:
12:35 dalek rakudo/nom: The previous approach didn't work for two identical POD blocks existing
12:35 dalek rakudo/nom: in the document, and caused a failure in t/pod/07-tables.t
12:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/967ab7a168
12:35 dalek rakudo/podparser: e028411 | jonathan++ | src/ (4 files):
12:35 dalek rakudo/podparser: Register Capture type so we can use it in the binder.
12:35 dalek rakudo/podparser: review: https://github.com/rakudo/rakudo/commit/e0284114e1
12:35 dalek rakudo/podparser: 3588736 | jonathan++ | src/core/Capture.pm:
12:35 dalek rakudo/podparser: Fix a thinko.
12:35 dalek rakudo/podparser: review: https://github.com/rakudo/rakudo/commit/358873603f
12:35 dalek rakudo/podparser: 0bc9883 | jonathan++ | src/ (2 files):
12:35 dalek rakudo/podparser: Make |$c work again in signatures; $c becomes a Capture with the current unbound stuff in it.
12:35 dalek rakudo/podparser: review: https://github.com/rakudo/rakudo/commit/0bc9883a45
12:36 dalek rakudo/podparser: d74aaa8 | tadzik++ | / (19 files):
12:36 dalek rakudo/podparser: Merge branch 'nom' into podparser
12:36 dalek rakudo/podparser: review: https://github.com/rakudo/rakudo/commit/d74aaa8c6a
12:48 whiteknight Interesting blog post about V8: http://wingolog.org/archives/2011/08/02/a-clos​er-look-at-crankshaft-v8s-optimizing-compiler
12:53 bubaflub ~
12:53 moritz heh, I posted that in #perl6 a few hours ago :-)
12:55 atrodo And cotto posted it last night too
12:58 whiteknight oh, fun
13:19 dafrito left #parrot
13:24 daniel-s joined #parrot
13:35 ambs left #parrot
13:50 smash joined #parrot
13:51 smash hello everyone
13:52 whiteknight good morning, smash
15:06 dalek parrot/whiteknight/load_bytecode: 63a9db0 | Whiteknight++ | src/p (2 files):
15:06 dalek parrot/whiteknight/load_bytecode: Add a tag cache to PackfileView, to keep track of what initializations have been performed on it. Add two methods to access this cache. The load_bytecode_s automatically marks a packfile as having been initialized with 'load'
15:06 dalek parrot/whiteknight/load_bytecode: review: https://github.com/parrot/parrot/commit/63a9db0857
15:07 SHODAN left #parrot
15:14 davidfetter joined #parrot
15:39 daniel-s left #parrot
15:49 JimmyZ joined #parrot
15:54 ambs joined #parrot
15:55 lucian joined #parrot
16:04 JimmyZ left #parrot
16:11 sri left #parrot
16:12 _sri joined #parrot
16:15 whiteknight msg benabik we should probably get together sometime soon for a meeting. let me know when you are available
16:15 aloha OK. I'll deliver the message.
16:18 dmalcolm joined #parrot
16:21 particle1 left #parrot
16:30 theory joined #parrot
16:36 dalek parrot/whiteknight/load_bytecode: a4a4895 | Whiteknight++ | src/packfile/api.c:
16:36 dalek parrot/whiteknight/load_bytecode: load_bytecode_s should update the various caches before running do_sub_pragmas, to avoid recursion. Cache PackfileView objects by full path name, not short name, so the two load_bytecode variants are talking the same language
16:36 dalek parrot/whiteknight/load_bytecode: review: https://github.com/parrot/parrot/commit/a4a4895247
16:44 mj41 left #parrot
16:46 dafrito joined #parrot
16:46 whiteknight msg NotFound can we add load_bytecode_p_s to Winxed as a builtin?
16:46 aloha OK. I'll deliver the message.
16:54 particle joined #parrot
16:57 athomason joined #parrot
17:11 NotFound whiteknight: there is a litlle problem: there is no way to distinguish builtins by its return type.
17:11 NotFound load_packfile can be a good name?
17:14 whiteknight yeah, that would be fine for me
17:15 cotto_work ~~
17:17 NotFound $ winxed -e 'var pf=load_packfile("Test/More.pbc"); say(pf);'
17:17 NotFound /home/julian/runparrot/lib/3.6​.0-devel/library/Test/More.pbc
17:17 NotFound Like this?
17:17 whiteknight NotFound++
17:17 NotFound I enjoy features so easy to implement :)
17:20 dalek winxed: 5c9c9b9 | NotFound++ | winxedst1.winxed:
17:20 dalek winxed: add builtin load_packfile to stage 1:
17:20 dalek winxed: Calls the load_bytecode p_s variant as suggested by whiteknight++
17:20 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/5c9c9b958c
17:21 dalek winxed: 7dac8ec | NotFound++ | pir/winxed_compiler.pir:
17:21 dalek winxed: update installable compiler
17:21 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/7dac8ecc52
17:22 whiteknight I want to get the whiteknight/load_bytecode branch merged into master today or tomorrow. It adds the necessary caching features that will make the new op more usable and compelling
17:22 NotFound Good
17:22 dukeleto does anybody know what the equivalent of "on stack replacement" is for register-based vm's ? http://wingolog.org/archives/2011​/06/20/on-stack-replacement-in-v8
17:22 dukeleto whiteknight: +1 to merging that branch sooner rather than later
17:23 NotFound I'm going to test and commit an update to the winxed snapshot
17:24 preflex joined #parrot
17:25 preflex_ left #parrot
17:27 benabik joined #parrot
17:31 benabik ~~
17:40 NotFound dukeleto: I think javscript jitters talks its own language, unaccesible for the rest of mortals.
17:43 dukeleto NotFound: yes, they have their own language, but so do we :) They are doing lots of cool stuff that we would benefit from understanding
17:43 kurahaupo joined #parrot
17:44 M_o_C joined #parrot
17:45 dalek parrot: cd7297c | NotFound++ | ext/winxed/compiler.pir:
17:45 dalek parrot: update winxed snapshot to 1.1.devel 7dac8ecc52:
17:45 dalek parrot: __NAMESPACE__ and __CLASS__ predefined constants
17:45 dalek parrot: load_packfile builtin
17:45 dalek parrot: review: https://github.com/parrot/parrot/commit/cd7297c85a
17:47 whiteknight NotFound++
17:48 dalek winxed: dacea8e | NotFound++ | NEWS:
17:48 dalek winxed: forgot to update NEWS in 7dac8ecc52
17:48 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/dacea8e6b8
17:48 dalek parrot/whiteknight/load_bytecode: ce51d7f | Whiteknight++ | / (15 files):
17:48 dalek parrot/whiteknight/load_bytecode: Fix conflict in merge from master
17:48 dalek parrot/whiteknight/load_bytecode: review: https://github.com/parrot/parrot/commit/ce51d7f5fb
17:49 jnthn__ dukeleto: Suspect the answer is tied to how Parrot JITs and what register frames look like at that point, but at first glance the easiest analagy would seem to be with combining the register space allocation for two functions - but being able to do so dynamically. I only skimmed it, though.
17:49 NotFound dukeleto: even better, we have a bunch of own languages ;)
17:50 dukeleto jnthn__: that sounds about right. Glad to hear your opinion :)
17:51 bubaflub morning dukeleto
17:51 benabik whiteknight: G'afternoon
17:52 whiteknight hello benabik. how are you doing today?
17:52 dukeleto bubaflub: wazzup
17:52 bubaflub dukeleto: not a whole lot.  trying to get $dayjob to get me out to Pittsburgh for PPW
17:52 dukeleto bubaflub: how is the new house?
17:53 bubaflub dukeleto: nice.  to get my couch in i had to take out part of the door.  that was fun.
17:53 dukeleto bubaflub: that looks like it will be fun, but I already have a bunch of travel planned around that time, so I will skip.
17:53 benabik whiteknight: A little frustrated.  It's a bit more work than I had expected to get newPOST to generate bytecode.  I'm trying to figure out what it isn't generating that it needs to.
17:53 dukeleto bubaflub: i see you have already starting reverse engineering your house...
17:53 dukeleto benabik: keep on truckin'. We believe in you.
17:54 bubaflub dukeleto: yup.  a bunch of new bookshelves to assemble, got my office setup.
17:54 bubaflub dukeleto: bummer.  i think there will be some other parroteers there
17:54 preflex_ joined #parrot
17:54 benabik whiteknight: My problems with PackfileView are centered around me generating invalid bytecode.  Changing it to write out to a file gets parrot to output "Attempting to do sub operation on non-Sub."
17:55 whiteknight ouch
17:58 preflex left #parrot
17:59 hercynium joined #parrot
18:01 whiteknight benabik: are you generating invalid bytecode because of mistakes in your code, or because of problems with the packfile pmcs?
18:01 whiteknight that is, something you need to fix, or something we need to fix?
18:01 benabik I think it's my/bacek's code.
18:01 benabik Just having problems tracking down what the error is, exactly.
18:03 whiteknight okay, what is the non-sub you are trying to treat like a sub?
18:04 benabik whiteknight: I'm attempting to generate just an empty main sub.
18:04 whiteknight and that's failing?
18:04 benabik Yup.
18:05 benabik nqp_pct:t/compilers/pct/newpost.t
18:09 Coke left #parrot
18:09 Coke joined #parrot
18:09 whiteknight bacek had an example test somewhere for using the packfile pmcs to create a simple toy function
18:10 whiteknight Add some debugging statements in the places that make the method calls to the packfile pmcs. Then when you try to build the toy sub, it will print out the sequence of method calls it's using, and you can compare
18:11 dalek Heuristic branch merge: pushed 23 commits to Rosella/new_load_bytecode by Whiteknight
18:11 cotto_work ./examples/pir/make_hello_pbc.pir
18:11 whiteknight yeah, that's the one
18:12 preflex joined #parrot
18:16 preflex_ left #parrot
18:20 benabik I think I'm not figuring out the index of the sub in the constant table properly.
18:23 mikehh left #parrot
18:24 dalek parrot/NotFound/nci_as_string: 9dd2908 | NotFound++ | / (2 files):
18:24 dalek parrot/NotFound/nci_as_string: a better test for as_string method and ByteBuffer get_pointer vtable
18:24 dalek parrot/NotFound/nci_as_string: review: https://github.com/parrot/parrot/commit/9dd2908842
18:24 whiteknight that would be a big problem
18:25 benabik Huh.  Now it runs when output, but is invalid when accessed directly.
18:28 whiteknight so that's something, right?
18:28 benabik Yes!
18:29 whiteknight it's possible the packfile pmc reading methods are wrong, but the writing methods are correct
18:29 whiteknight or, wait. How are you outputting it?
18:30 benabik $filehandle.print(~$packfile)
18:30 whiteknight and $packfile is a Packfile PMC?
18:30 benabik Yes.
18:30 jsut_ joined #parrot
18:30 benabik Those are named by their types.
18:30 whiteknight But if you do $packfile.view()... you get invalid accesses?
18:30 benabik Yes.
18:31 benabik Well, now I get "Null or invalid PackFile"
18:31 whiteknight can you nopaste me that code so I can see it?
18:32 benabik Well, I'm not using PF directly, I'm generating POST nodes that generate it, so "that code" is a decent chunk of PBCCompiler.
18:32 whiteknight Can I just see the part where you create and use the View?
18:34 benabik https://github.com/parrot/parrot/blob/nqp_pc​t/compilers/pct/src/POST/PBCCompiler.pm#L62
18:34 benabik Called from the previously commented out code here: https://github.com/parrot/parrot/blob/​nqp_pct/t/compilers/pct/newpost.t#L37
18:35 jsut left #parrot
18:35 whiteknight okay, and what's the error you get from that?
18:38 benabik https://gist.github.com/1123441
18:39 benabik Maybe get_string does some bit of assembly of the packfile?
18:40 whiteknight no, I copied that code for .view()
18:40 whiteknight Are you setting the main sub in your packfile pmc?
18:41 whiteknight PackfileConstantTable.set_main()
18:41 benabik It's setting it on the byte code segment, I think...
18:41 benabik %context<bytecode>.main_sub($idx)
18:42 benabik Does it need to be set on the constant table instead?
18:42 * benabik is getting the idea that the Packfile PMCs got some revision after bacek stopped working on PIRate.
18:42 whiteknight try this:
18:42 whiteknight actually, I don't have a code example
18:43 whiteknight but yes, try to call PackfileConstantTable.set_main($idx)
18:44 benabik s/<bytecode>.main_sub/<constants>.main_sub/ away...
18:44 whiteknight no, I think you want both
18:44 benabik Both?
18:44 whiteknight both
18:44 benabik "fun"
18:45 whiteknight actually, don't do that either
18:45 whiteknight fire up gdb and set a breakpoint on Parrot_pf_get_packfile_main_sub
18:45 whiteknight we need to find out what part of that is null and causing the exception to trigger
18:45 whiteknight if (pf == NULL || pf->cur_cs == NULL || pf->cur_cs->const_table == NULL)
18:45 whiteknight Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNEXPECTED_NULL,
18:45 whiteknight "Null or invalid PackFile");
18:46 whiteknight so we need to figure out what is null: pf, pf->cur_cs, or pf->cur_cs->const_table
18:47 benabik Earlier it was pf->cur_cs, IIRC.  But I can check again.
18:48 whiteknight hmm... that's probably true
18:48 whiteknight in PackfileDirectory.get_pointer, I don't see any place where pf->cur_cs would be set
18:48 whiteknight that probably gets set on packfile load
18:49 benabik Yes, it's cur_cs
18:49 benabik So the serialization isn't doing magic, it's the load that does the magic.  :-)
18:49 whiteknight okay, so that's the issue. Packfile.get_pointer isn't setting up pf->cur_cs. That probably gets set when load from file
18:49 benabik magic--
18:50 benabik karma magic
18:50 aloha magic has karma of -2.
18:50 whiteknight let me figure out what code is required, and jam it wherever it's needed
18:50 benabik whiteknight++ # helping me (ab)use the Packfile PMCs.
18:53 whiteknight man, I've never traced through this code before. It's a rat's nest
18:55 whiteknight okay, found it
18:55 whiteknight src/packfile/segments.c:make_code_pointers()
18:56 whiteknight And we are *not* going to copy that logic into Packfile PMC
18:57 whiteknight it looks to me like this would be susceptible to an ordering bug. If there was a constantTable segment in the directory before the first bytecode segment, blamo
18:57 benabik That seems to be designed to set current segment into packfile.  But if we already have a Packfile PMC with all it's segments, we can set it more directly.
18:58 whiteknight right. We just need to get ahold of the first bytecode segment, and set that
18:58 benabik And, yes, that would get very bad if there wasn't a bytecode segment first.
18:59 whiteknight for now, let's just assume that through luck or some kind of amazing confident planning, that isn't an issue
18:59 benabik My guess is that everything is set to generate PBCs in the right order.
19:01 M_o_C left #parrot
19:02 nopaste "whiteknight" at 192.168.1.3 pasted "patch for benabik++" (22 lines) at http://nopaste.snit.ch/67144
19:02 whiteknight try that
19:04 benabik Uhm.  corrupt patch at line 23?
19:04 benabik I can apply by hand.
19:04 whiteknight just jam it in there
19:06 benabik src/pmc/packfiledirectory.c: In function ‘Parrot_PackfileDirectory_get_pointer’:
19:06 benabik src/pmc/packfiledirectory.c:136: error: ‘PMC’ has no member named ‘type’
19:06 benabik src/pmc/packfiledirectory.c:136: warning: switch missing default case
19:07 benabik Are these `set`s supposed to be `pfseg`?
19:07 benabik *seg
19:07 benabik Well, it compiles that way, so I'm guessing gyes.
19:09 whiteknight ah yes, switch the "seg" in the new code to "pfseg"
19:09 whiteknight sorry about that
19:10 benabik Hm.  const_table didn't get set.
19:11 whiteknight okay, so the ConstantTable is probably coming through the pipe before the Bytecode segment
19:11 benabik Yeah.
19:11 whiteknight this is going to get ugly
19:12 benabik I would think that we should just save pointers as we loop and then set them afterwards.
19:12 * benabik is writing that.
19:14 nopaste "whiteknight" at 192.168.1.3 pasted "new get_pointer for benabik++" (39 lines) at http://nopaste.snit.ch/67145
19:14 whiteknight let's see if we can fail a little bit less hard
19:14 benabik Similar to my idea, but not identical.  But you finished first.  :-D
19:16 benabik whiteknight: You left the seg->type in there, just FYI.
19:16 whiteknight damnfartcrap
19:17 whiteknight as should become painfully obvious, I'm not actually trying to compile the crap code I'm spitting out
19:17 benabik Typical Linus method.  I approve.
19:18 whiteknight If I pretend hard enough that I don't need an automated syntax checker, it might become true one day
19:19 benabik Parrot_Sub_invoke, sub.c:461, pc = sub->seg->base.data + sub->start_offs
19:19 benabik sub->seg == 0
19:19 whiteknight lolwat?
19:20 benabik Sounds like the PBC loader is doing a variety of fixups...
19:21 benabik Although that might be me not setting something…
19:21 benabik I don't see anything in my Sub init hash that sets the bytecode segment.
19:23 whiteknight holycrap
19:23 whiteknight src/pmc/sub.pmc: VTABLE_init: attrs->seg = INTERP->code;
19:23 benabik Subs are assumed to be attached to the current bytecode segment?
19:24 whiteknight yes, it's assumed to be attached to the global current bytecode segment
19:24 whiteknight AND, because we need more crap, it's only set during VTABLE_init and there's no interface to change it
19:24 benabik Oh, fun?
19:24 whiteknight srsly
19:25 benabik Sounds like PBC loading could seriously use a refactor.
19:25 whiteknight yes
19:25 whiteknight I've been working on the subsystem interface for exactly that reason: I want to get the interface cleaned up and stabilized so we can start murding the underlying logic with a flamethrower
19:26 benabik I don't know why INTERP->code would be NULL at any point...
19:26 whiteknight Right. That's what I don't understand. Where is that null coming from?
19:26 benabik Sometimes I think your version of parrot is a pile of ashes.
19:26 benabik Although I hear ashes make very nice fertilizer.
19:27 whiteknight what's happening here is that the packfile loading code performs a huge amount of magic, and the Packfile PMCs are relying on that magic happening during load to skip steps
19:28 benabik :-/
19:28 whiteknight how are you creating Subs?
19:28 whiteknight or, how do you add them to the constTable?
19:29 benabik pir::push($constanttable, pir::new('Sub', %sub))
19:29 benabik Where %sub is a hash with a lot of stuff in it.
19:29 contingencyplan joined #parrot
19:29 whiteknight ah.
19:30 whiteknight VTABLE_init_pmc does not call VTABLE_init and does not set attrs->seg
19:30 whiteknight awesome-pawesome
19:30 benabik Muliple init functions FTW.
19:30 whiteknight not that it would matter, we wouldn't want the behavior in VTABLE_init anyway
19:31 whiteknight so in this case, clear breakage is sparing us from subtle and hard-to-find bugs
19:31 whiteknight when you are creating a packfile, do you create more than one bytecode or constantTable segment?
19:34 benabik Nope.
19:35 whiteknight okay, so we can probably cheat a little ourselves. Once we have found pointers to both a PackFile_Bytecode and PackFile_ConstTable segments, we can loop over thawed PMCs and update Subs
19:35 particle left #parrot
19:35 benabik fun.
19:40 particle joined #parrot
19:41 nopaste "whiteknight" at 192.168.1.3 pasted "new routine for benabik++" (15 lines) at http://nopaste.snit.ch/67149
19:42 whiteknight add that function in above the pmclass declaration. Then, down in the get_pointer vtable, add this:
19:42 whiteknight if (pf->cur_cs && pf->cur_cs->const_table)
19:42 whiteknight attach_subs_to_segment(INTERP, pf);
19:42 benabik I was about to say…  Should I just guess where that goes?  ;-)
19:43 whiteknight we're all guessing today
19:43 benabik Above the pmclass declaration?
19:43 benabik Ah, I see it.
19:45 dalek rakudo/nom: 21977e8 | jonathan++ | src/binder/types. (2 files):
19:45 dalek rakudo/nom: Add a way to store Nil in preperation for handling it in more cases.
19:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/21977e881e
19:45 dalek rakudo/nom: 07c976f | jonathan++ | src/binder/ (3 files):
19:45 dalek rakudo/nom: Transform a segfault into an exception (moritz++ for reporting).
19:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/07c976f46d
19:45 dalek rakudo/nom: 1519560 | jonathan++ | NOMMAP.markdown:
19:45 dalek rakudo/nom: Remove one completed goal from NOMMAP, as well as one that's kinda too vague to be useful.
19:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/15195609ed
19:47 benabik whiteknight: Parrot_Sub_attributes undeclared…  Missing a header?
19:48 whiteknight #include "pmc/pmc_sub.h"
19:53 benabik Uhm.  sub->seg still null?
19:57 whiteknight damnit
19:57 whiteknight wtf?
19:57 whiteknight where is that problem happening
19:57 mikehh joined #parrot
19:57 whiteknight ?
19:59 benabik I inserted a printf into attach_subs_… and it doesn't seem to have been called.  :-(
20:01 benabik Wait...
20:01 benabik It may be using the old lib parrot.  Stupid dyld.
20:01 benabik libparrot!  stupid Lion autocorrect
20:07 benabik Hm.  KERN_INVALID_ADDRESS at address 0, called from runops_fast_core
20:09 whiteknight lolfail
20:14 benabik I'm guessing that this route still needs some work…  I'm going to work on the old 'generate a PBC file' method for a bit.
20:16 whiteknight yeah, do that
20:17 benabik It's fragile and hides errors, but it "works".
20:17 whiteknight working is overrated
20:17 benabik whiteknight++ thanks for your help
20:17 whiteknight no problem. I'll play with it a little more tonight
20:17 benabik And that little glimpse into your hell.  Many thanks for refactoring these things.
20:18 whiteknight don't thank me until the part you need is fixed
20:19 benabik Thanks for being willing to refactor these things?
20:21 whiteknight don't thank me until I'm willing to refactor the part you need :)
20:21 whiteknight but seriously, some of this code is capital-T Terrible
20:23 whiteknight saving interp->code, setting it to a new value and then initializing a sub which blindly copies attrs->seg = interp->code is terrible
20:25 whiteknight maybe we can add a workaround to VTABLE_init_pmc
20:26 whiteknight whatever. I'm signing off now. I'll be on later tonight
20:26 whiteknight later
20:26 whiteknight left #parrot
20:28 kurahaupo left #parrot
20:39 dalek rakudo/nom: 8443d11 | jonathan++ | src/core/ (2 files):
20:39 dalek rakudo/nom: Implement eqv for Enum (and thus Pair).
20:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8443d11710
20:39 dalek rakudo/nom: 40f4264 | jonathan++ | src/core/Pair.pm:
20:39 dalek rakudo/nom: Assignable .key and .value for Pair.
20:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/40f4264cec
20:39 dalek rakudo/nom: e9ee086 | jonathan++ | src/core/Enum.pm:
20:39 dalek rakudo/nom: Enum.invert (inherited by Pair).
20:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e9ee086e48
20:39 dalek rakudo/nom: c048df8 | jonathan++ | t/spectest.data:
20:39 dalek rakudo/nom: Add a passing test file.
20:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c048df8f8b
20:44 dalek rakudo/nom: 0cd9e76 | pmichaud++ | src/core/Bool.pm:
20:44 dalek rakudo/nom: Add some enum-like methods to Bool.
20:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0cd9e76cb2
20:48 kurahaupo joined #parrot
20:55 benabik I created output!
20:57 cotto_work benabik: let's see!
20:58 benabik Uhm.  Hm.
20:58 bubaflub benabik++
20:59 benabik It just says "foo"
20:59 bubaflub close enough
20:59 benabik But it's generated from a tree:  File->Sub->Op->String
20:59 benabik Granted, I was kinda trying to get return to work...
21:01 benabik I think return is working, but getting the return value isn't…  Hm.
21:05 benabik Hm.  Maybe I can use the new load_bytecode__ps instead of just load_bytecode__s.
21:12 benabik Return might be working, but calling the sub isn't.  That's fun.
21:21 fperrad left #parrot
21:30 dalek parrot/nqp_pct: 7c2f280 | benabik++ | compilers/pct/src/POST/PBCCompiler.pm:
21:30 dalek parrot/nqp_pct: [POST] Let me turn on debugging externally
21:30 dalek parrot/nqp_pct:
21:30 dalek parrot/nqp_pct: Having to re-bootstrap just to turn on debugging was a pain.
21:30 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/7c2f2805c3
21:30 dalek parrot/nqp_pct: 2098ab5 | Whiteknight++ | src/packfile/api.c:
21:30 dalek parrot/nqp_pct: Some extra checks in Parrot_pf_subs_by_flag. This should help to eliminate or reduce issues seen by benabik++
21:30 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/2098ab50c3
21:30 dalek parrot/nqp_pct: 1ecc900 | cotto++ | docs/dev/profiling.pod:
21:30 dalek parrot/nqp_pct: add a bunch of stub sections to the profiling document
21:30 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/1ecc9004ca
21:30 dalek parrot/nqp_pct: cd7297c | NotFound++ | ext/winxed/compiler.pir:
21:30 dalek parrot/nqp_pct: update winxed snapshot to 1.1.devel 7dac8ecc52:
21:30 dalek parrot/nqp_pct: __NAMESPACE__ and __CLASS__ predefined constants
21:30 dalek parrot/nqp_pct: load_packfile builtin
21:30 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/cd7297c85a
21:30 dalek parrot/nqp_pct: cd2119b | benabik++ | / (31 files):
21:30 dalek parrot/nqp_pct: Merge branch 'master' into nqp_pct
21:30 dalek parrot/nqp_pct:
21:31 dalek parrot/nqp_pct: Pull in whiteknight++'s extra error checking for Packfile.view
21:31 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/cd2119b44f
21:31 dalek parrot/nqp_pct: 58bb0ce | benabik++ | compilers/pct/src/POST/PBCCompiler.pm:
21:31 dalek parrot/nqp_pct: POST::PBCCompiler - generate sub index properly
21:31 dalek parrot/nqp_pct:
21:31 dalek parrot/nqp_pct: The most recently added index is (length - 1), not length.  Oops.
21:31 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/58bb0ce97e
21:31 dalek parrot/nqp_pct: b3352ba | benabik++ | compilers/pct/src/POST/PBCCompiler.pm:
21:31 dalek parrot/nqp_pct: POST::PBCCompler - Add get_or_create_*
21:31 dalek parrot/nqp_pct:
21:31 dalek parrot/nqp_pct: The PackfileConstantTable apparently had different functions for
21:31 dalek parrot/nqp_pct: different types.  Now it just has one name and acts based on the type
21:31 dalek parrot/nqp_pct: of thing.  Since NQP stores everything as a PMC we need different
21:31 dalek parrot/nqp_pct: functions.  The find_caller_lex bit may be a bit strange, but it makes
21:31 dalek parrot/nqp_pct: the conversion faster.
21:31 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/b3352ba359
21:31 dalek parrot/nqp_pct: 82ea945 | benabik++ | compilers/pct/src/POST/PBCCompiler.pm:
21:31 dalek parrot/nqp_pct: POST::PBCCompiler.pbc - use PackfileView
21:31 dalek parrot/nqp_pct:
21:31 dalek parrot/nqp_pct: The part in the other methods that's failing is the setup in
21:31 dalek parrot/nqp_pct: Packfile.view.  So let's use load_bytecode__ps to get a Packfile PMC
21:31 dalek parrot/nqp_pct: and work with that.
21:31 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/82ea94532a
21:32 ambs left #parrot
21:39 dalek parrot/nqp_pct: 2267de1 | benabik++ | compilers/pct/src/POST/PBCCompiler.pir:
21:39 dalek parrot/nqp_pct: Re-bootstrap POST::PBCCompiler
21:39 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/2267de1e12
21:39 dalek parrot/nqp_pct: b1ae9ad | benabik++ | t/compilers/pct/newpost.t:
21:39 dalek parrot/nqp_pct: [PCT] Add return test for newPOST
21:39 dalek parrot/nqp_pct:
21:39 dalek parrot/nqp_pct: It's TODO'd as it doesn't seem to work yet.  And based on the fact
21:39 dalek parrot/nqp_pct: that I never see the "foo" outputted, the function isn't getting
21:39 dalek parrot/nqp_pct: called.  But decompiling and running /tmp/temp.pbc shows it seems to
21:39 dalek parrot/nqp_pct: be compiling properly.
21:39 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/b1ae9ad778
21:39 benabik That last commit is the one generating bytecode that does output.  But since the output isn't shown during the test, I'm suspicious that it's getting run at all.
21:49 Patterner left #parrot
21:49 Psyche^ joined #parrot
21:49 Psyche^ is now known as Patterner
22:04 cotto_work seen soh_cah_toa
22:04 aloha soh_cah_toa was last seen in #parrot 1 days 22 hours ago saying "whatever though, i gotta go eat".
22:11 dalek rakudo/nom: 9a99a12 | pmichaud++ | src/core/Numeric.pm:
22:11 dalek rakudo/nom: Add infix:<+&>(Any, Any) (and related bitwise ops).
22:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9a99a124db
22:11 dalek rakudo/nom: 120d3be | pmichaud++ | src/core/ (6 files):
22:11 dalek rakudo/nom: Make sure .Numeric is properly multied.
22:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/120d3be93c
22:11 dalek rakudo/nom: f72544a | pmichaud++ | src/core/metaops.pm:
22:11 dalek rakudo/nom: Fix triangle metaops on empty lists (TimToady++).
22:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f72544ab58
22:15 dalek rakudo/nom: f5ab8d0 | jonathan++ | src/Perl6/Metamodel/ (2 files):
22:15 dalek rakudo/nom: Allow overriding of postcircumfix:<( )>.
22:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f5ab8d0c55
22:15 dalek rakudo/nom: bc30e74 | jonathan++ | src/core/Capture.pm:
22:15 dalek rakudo/nom: Cheating |$c in argument lists (only puts in positional bit...will fix that up shortly).
22:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bc30e745fb
22:15 dalek rakudo/nom: d9a6cfa | jonathan++ | t/spectest.data:
22:15 dalek rakudo/nom: We now pass S13-overloading/typecasting-long.t.
22:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d9a6cfa697
22:15 dalek rakudo/nom: 275e3db | jonathan++ | src/core/Junction.pm:
22:15 dalek rakudo/nom: Implement junction invocation.
22:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/275e3dbe89
22:15 dalek rakudo/nom: d097bdc | jonathan++ | src/core/Any.pm:
22:15 dalek rakudo/nom: Any.[all|any|n?one]
22:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d097bdc8aa
22:36 hercynium left #parrot
22:48 dmalcolm left #parrot
22:55 particle left #parrot
22:55 whiteknight joined #parrot
22:55 particle joined #parrot
22:56 dalek rakudo/nom: 057f236 | jonathan++ | src/Perl6/Metamodel/AttributeContainer.pm:
22:56 dalek rakudo/nom: Fix bug where .^attributes could make multiple entries for an attribute in the result list.
22:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/057f236405
22:56 dalek rakudo/nom: 402f330 | jonathan++ | src/core/Attribute.pm:
22:56 dalek rakudo/nom: Some missing methods on Attribute.
22:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/402f33061e
22:56 dalek rakudo/nom: 80467f3 | jonathan++ | src/ (3 files):
22:56 dalek rakudo/nom: Some missing decontainerizations in Attribute methods and a naming fix to bring us in line with spec and tests.
22:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/80467f33d8
22:56 dalek rakudo/nom: 538d581 | jonathan++ | t/spectest.data:
22:56 dalek rakudo/nom: Run S12-introspection/attributes.t.
22:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/538d581e7b
23:01 whiteknight good evening, #parrot
23:03 NotFound whiteknight: I think I've identified the other pmc that needs as_string: Ptr
23:03 whiteknight I figured it was going to be Ptr or PtrBuf
23:04 whiteknight PtrBuf has a size parameter, but we would need a way to calculate that
23:04 NotFound Ptr is what StructView uses for pointers, so I think that for consistency will be the appropiate choice for 'p' returns.
23:04 whiteknight okay
23:05 whiteknight is it goint to be possible to detect length of a string with an arbitrary encoding?
23:06 NotFound Arbitrary, no, but we are treating cases when the values are normal C strings
23:07 NotFound We may need another similar method for wide strings, with its own complications.
23:08 NotFound Different wchar_t types depending on platforms, big or liitle endian....
23:11 whiteknight blah
23:11 whiteknight I think what we need to do, in the long run, is to specify that kind of encoding information on the NCI PMC itself
23:11 smash left #parrot
23:12 whiteknight nci = dlfunc ..., nci.return_string_as("utf8"), nci.pass_string_args_as("ascii")
23:13 whiteknight Then the nci pmc can keep state information, and perform encodings as necessary
23:13 NotFound I thought about that, but I think it will be better to discuss such design having working bindings with practical usages.
23:13 whiteknight yes, we can do that now too. But in the long-term we need a better system
23:13 whiteknight we can start to think about it now
23:13 dalek rakudo/nom: 9fdde9e | pmichaud++ | src/core/Enumeration.pm:
23:13 dalek rakudo/nom: Roles apparently can't quite handle 'multi method' yet, so set
23:13 dalek rakudo/nom: Enumeration.Numeric back to an ordinary method for now.
23:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9fdde9e46a
23:14 NotFound I hope the libxml2 bindings I'm working on will open a lot of usages.
23:15 benabik Huh...
23:17 benabik Does load_bytecode try to keep you from reloading the same file twice?
23:18 NotFound benabik: yes
23:18 whiteknight left #parrot
23:18 benabik Well that would do it.  Bah.  Alrighty then.  Updated tests after dinner and a movie.
23:18 whiteknight joined #parrot
23:19 dalek rakudo/nom: 3b56d34 | jonathan++ | src/core/IO.pm:
23:19 dalek rakudo/nom: Implement get and close subs.
23:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3b56d34f58
23:19 dalek rakudo/nom: 0db8c6f | jonathan++ | t/spectest.data:
23:19 dalek rakudo/nom: 3 more passing IO test files giving about 50 more passing tests.
23:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0db8c6f9c2
23:19 whiteknight ...stoopid mouse
23:21 whiteknight benabik: ping
23:21 NotFound afk
23:26 bubaflub whiteknight: ping
23:27 whiteknight pong
23:27 bubaflub i'm including GMP documentation in my own Winxed classes as POD - is there some kind of attribution that i need to give to those folks?
23:27 bubaflub i sent an email asking that question to gmp-discuss but haven't received anything back yet
23:27 bubaflub and while i'm there, what kind of license file do i need?
23:28 sorear what license are the GMP docs?
23:28 whiteknight You can give a shout-out to the GMP folks, but you aren't including their code in your repo, so you don't need formal attribution
23:28 * sorear wonders if bubaflub knows about the Debian GFDL fiasco
23:28 bubaflub sorear: i do not; i'm all ears.
23:29 whiteknight bubaflub: I suggest you use the artistic 2.0 license, which is what Parrot uses. That allows maximum portability with Parrot
23:29 bubaflub whiteknight: great.  do i need a LICENSE file with those contents, or just a shout-out somewhere in the README
23:29 whiteknight and if you do that, you can just copy a LICENSE file from another project that uses one, like Rosella or PLA
23:29 bubaflub whiteknight: great.  works for me.
23:30 whiteknight In your readme, say something like "contributors are listed in CREDITS. For license information, see LICENSE"
23:30 whiteknight etc
23:30 dalek rakudo/nom: a207490 | pmichaud++ | / (2 files):
23:30 dalek rakudo/nom: Add prefix:<+^>(Any), winning us the S03-operators/bit.t tests.
23:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a207490190
23:33 bubaflub sorear and whiteknight: it appears that the GMP docs are GNU Free Document License
23:33 rblackwe left #parrot
23:33 whiteknight that only matters if you actually include GMP docs in your repo
23:33 whiteknight or in your release tarballs
23:33 rblackwe joined #parrot
23:34 whiteknight attribution is used for the same reason citations are in college papers: to prevent plagiarism. If you aren't trying to pass off somebody else's work as your own, you don't need attribution
23:35 bubaflub whiteknight: but i am including lots of snippets of their docs inline with my code...
23:35 dalek parrot: ae00b64 | Whiteknight++ | /:
23:35 dalek parrot: Merge branch 'whiteknight/load_bytecode'
23:35 dalek parrot: review: https://github.com/parrot/parrot/commit/ae00b64a36
23:35 sorear it might be useful to have a link to the master copy
23:35 dalek parrot: 770a61c | Whiteknight++ | src/p (2 files):
23:35 dalek parrot: Merge branch 'whiteknight/load_bytecode'
23:35 dalek parrot: review: https://github.com/parrot/parrot/commit/770a61c65a
23:35 whiteknight oh, okay. Then you definitely need some kind of note
23:35 sorear so that 10 years from now when somebody looks at your old docs, they can find a more recent version
23:35 whiteknight "Hey, I didn't write this, I'm not pretending I did. Here's who really did it, and those people are awesome"
23:36 lucian left #parrot
23:38 bubaflub gotcha
23:47 dalek rakudo/nom: de65682 | jonathan++ | src/core/IO.pm:
23:47 dalek rakudo/nom: Implement slurp.
23:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/de65682c7b
23:47 dalek rakudo/nom: 6d942a8 | jonathan++ | t/spectest.data:
23:47 dalek rakudo/nom: Two more passing test files.
23:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6d942a8370

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

Parrot | source cross referenced