Camelia, the Perl 6 bug

IRC log for #parrot, 2010-07-07

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:15 lucian joined #parrot
00:23 dduncan joined #parrot
00:31 eternaleye joined #parrot
00:40 eternaleye_ joined #parrot
00:41 dduncan left #parrot
00:45 simcop2387 joined #parrot
00:54 dalek parrot: r48019 | mikehh++ | branches/html_cleanup/MANIFEST:
00:54 dalek parrot: re-generate MANIFEST
00:54 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48019/
00:54 dalek parrot: r48020 | mikehh++ | branches/html_cleanup/lib/​Parrot/Docs/PodToHtml.pm:
00:54 dalek parrot: remove non-UTF-8 character, trailing spaces
00:54 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48020/
00:54 cotto_work NotFound: https://duckduckgo.com/?q=s​elf-hosted+compiler&v=
00:55 cotto_work Google doesn't like you quite as much.
01:01 rurban_ joined #parrot
01:49 eternaleye joined #parrot
01:53 kid51 joined #parrot
02:06 cotto ~~
02:11 mikehh hey cotto
02:24 tcurtis joined #parrot
02:24 ash_ joined #parrot
02:27 Chandon bootstrap-ops is a bit like russian roulette
02:27 Chandon Except you start by loading six bullets. The hope is that one is a dud.
02:33 cotto bootstrap-ops, you say?
02:33 cotto please elaborate
02:34 Chandon When I get something wrong, it happily generates a wrong core_ops.c; once that happens, I need to fix it by hand before I can try again.
02:34 cotto you can just revert it
02:34 cotto svn revert src/ops/core_ops.c
02:35 cotto I did that a lot.
02:35 Chandon I did this silly thing where I edited some code at the same time such that that core_ops.c is also wrong.
02:38 cotto why wouldn't reverting help?
02:38 cotto You shouldn't have to core_ops.c directly.
02:39 plobsing joined #parrot
02:40 Chandon I changed the signature of a function that gets called by an op.
02:41 cotto ok.  revert core_ops.c, build, update the op definition and run bootstrap-ops
02:41 cotto and if you've updated the op definition, do the other things
02:44 sorear seen moritz
02:44 purl moritz was last seen on #parrot 7 hours, 4 minutes and 26 seconds ago, saying: PPP?
02:45 dalek rakudo: f8dde0a | pmichaud++ | docs/spectest-progress.csv:
02:45 dalek rakudo: spectest-progress.csv update: 507 files, 33927 (84.4% of 40197) pass, 19 fail
02:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​8dde0a111c80a6a04bede9ac4eb2ad8c222dcf3
02:46 cotto Chandon, is that helpful?
02:48 Chandon cotto: Problem with that plan comes with "build". Since a function old core_ops.c needed no longer exists, it wouldn't work. Luckily, editing core_ops.c to fix that did work, and now I'm back in less painful errors. =P
02:49 dalek parrot: r48021 | mikehh++ | branches/html_cleanup/t/perl/Parrot_Docs.t:
02:49 dalek parrot: fix failing test for added module
02:49 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48021/
02:51 cotto I see.
02:51 cotto glad you're back in business
02:51 cotto You could also use the installed ops2c, if any.
02:55 Chandon Yea, that probably would have been the right way to do it.
02:57 cotto now you know
02:57 purl And knowing is half the battle.
03:15 dalek TT #1703 closed by bacek++: IMCC doesn't generate get_params op for argless subs.
03:15 dalek TT #1703: http://trac.parrot.org/parrot/ticket/1703
03:21 dalek parrot: r48022 | tcurtis++ | branches/gsoc_past_optimization/runtim​e/parrot/library/Tree/Transformer.nqp:
03:21 dalek parrot: Make Tree::Transformer stop being a Tree::Walker. Doesn't affect tests in the least. Will eventually move its multi into its own namespace.
03:22 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48022/
03:22 eternaleye joined #parrot
03:44 janus joined #parrot
03:49 * Coke is glad to see that crabby people are not just crabby at parrot.
03:54 mikehh Coke: working on html_cleanup - glob stuff in make_html_docs.pl is not right - it runs from base dir not docs
03:54 khairul joined #parrot
03:59 * mikehh needs a break - check back later
04:11 Coke mikehh: yah. script is currently runnable from top level dir.
04:11 Coke I want to move make html out of docs into the top level makefile anyway.
04:11 Coke there's a good task for someone to fix. =_)
04:20 mikehh Coke: :-}
04:21 mikehh Coke: anything specific you want me to look at?
04:21 Coke moving the html target into the main makefile would be great.
04:22 Coke that'll make 'make html' at least do something again. =-)
04:22 Coke it shouldn't need to depend on docs, either.
04:22 Coke (since we're generating from the original POD)
04:23 Coke drumming up docs for the 5 or so files that are missing docs when run (or skipping them in the .json descriptors) would also be nice.
04:23 Coke also, merging in changes from trunk, though that's optional.
04:23 Coke zzzz here.
04:23 Coke mikehh++ for anything you manage to get to. thanks!
04:23 mikehh Coke: me too - will work on it in a few hours
04:26 LoganLK joined #parrot
04:27 dalek parrot: r48023 | tcurtis++ | branches/gsoc_past_optimization/runt​ime/parrot/library/Tree/Pattern.nqp:
04:27 dalek parrot: Refactor .transform to use a method to find the transformer class to create to allow subclasses to more easily substitute a different one.
04:27 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48023/
04:51 particle ETOOMANYTOS
04:52 TiMBuS joined #parrot
05:07 khairul cotto: ping
05:08 cotto khairul, pong
05:09 khairul see privmsg
05:16 dalek parrot: r48024 | tcurtis++ | branches/gsoc_past_optimizatio​n/runtime/parrot/library/PAST (2 files):
05:16 dalek parrot: Make PAST::Transformer::Dynamic not be a PAST::Walker::Dynamic. Also add traversal of PAST::Var.viviself to PAST::Walker.
05:16 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48024/
05:24 dalek tracwiki: v5 | cotto++ | KhairulGSOC2010Schedule
05:24 dalek tracwiki: http://trac.parrot.org/parrot/wiki/Khairul​GSOC2010Schedule?version=5&action=diff
05:55 ttbot joined #parrot
06:01 uniejo joined #parrot
06:25 fperrad joined #parrot
08:18 moritz good morning
08:18 purl For you maybe.
08:18 moritz I have two classes, A inherits from B
08:18 moritz I want to set set an attribute from B in A
08:18 moritz how do I do that?
08:19 moritz both are handled by P6Metaclass
08:41 clinton joined #parrot
08:56 mikehh joined #parrot
09:01 rurban_ joined #parrot
09:27 gaz joined #parrot
10:05 dalek pir: 3a9ded9 | bacek++ | src/POST/Compiler.pm:
10:05 dalek pir: Fix :method generating in POST::Sub.
10:05 dalek pir: review: http://github.com/bacek/pir/commit/3a9​ded94b40e6beafb442b2d907e4c5a1e93c49d
10:05 dalek pir: 598a1ae | bacek++ | src/POST/Compiler.pm:
10:05 dalek pir: Always handle params in Sub. Also prepend C<self> for methods to params.
10:05 dalek pir: review: http://github.com/bacek/pir/commit/598​a1ae9c8c2095e62a99badb26d289362639512
10:05 dalek pir: f08d46a | bacek++ | src/POST/Compiler.pm:
10:05 dalek pir: Disable emitting get_params_pc for argless Subs. :main handling in parrot isn't
10:05 dalek pir: perfect.
10:05 purl perfect is the enemy of good enough.
10:05 dalek pir: review: http://github.com/bacek/pir/commit/f08​d46ab2349edf1b015b40580e6eb214de134a1
10:05 dalek pir: ce3d442 | bacek++ | t/pbc/subs.txt:
10:06 dalek pir: Add (failing) test for :method handling.
10:06 dalek pir: review: http://github.com/bacek/pir/commit/ce3​d442e0c7ffe969bf2bcb1b5b6b12bcd4d2d38
10:06 dalek pir: 67afc83 | bacek++ | src/POST/Compiler.pm:
10:06 dalek pir: Fix sub comp flags constants.
10:06 dalek pir: review: http://github.com/bacek/pir/commit/67a​fc83f8c0f69eb69c1c40189bc10b52db4e67e
10:15 bacek ~~
10:28 dalek parrot: r48025 | mikehh++ | failed to fetch changeset:
10:28 dalek parrot: merge in trunk at r48024 and re-generate MANIFEST
10:29 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48025/
10:30 mikehh that was merging in trunk in html_cleanup branch
10:54 bkuhn joined #parrot
10:59 lucian joined #parrot
11:14 dalek nqp-rx: d01b490 | pmichaud++ | src/HLL/Compiler.pm:
11:14 dalek nqp-rx: Refactor interactive mode context handling slightly.
11:14 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/d​01b4905910c227cf43828df3e0684bc944e7c06
11:14 dalek nqp-rx: 2fb1606 | pmichaud++ | src/stage0/ (3 files):
11:14 dalek nqp-rx: Update bootstrap files.
11:14 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/2​fb16068114fbb420af8851d8a809e1bb34b12f2
11:20 dalek parrot: r48026 | pmichaud++ | trunk/ext/nqp-rx/src/stage0 (3 files):
11:20 dalek parrot: [nqp-rx]:  Update bootstrap files with latest interactive changes.
11:20 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48026/
11:38 kid51 joined #parrot
11:38 kid51 make fulltest:  PASS on Darwin/PPC at r48020 (trunk)
11:39 dalek rakudo: 5f40d37 | pmichaud++ | src/Perl6/Actions.pm:
11:39 dalek rakudo: Rename some setup variables to be more accurate.
11:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​f40d37f39e40a069941e87f742d395b1bd1abe8
11:39 dalek rakudo: b0cd2b8 | pmichaud++ | src/ (2 files):
11:39 dalek rakudo: Add a $MAIN parameter to unit mainline (signals that the unit is the mainline).
11:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b​0cd2b8f32315ecf54dc1a3cfe831e40b0edeb3b
11:39 dalek rakudo: c9aa0e9 | pmichaud++ | src/Perl6/Actions.pm:
11:39 dalek rakudo: Refactor !YOU_ARE_HERE to use outer_ctx.
11:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​9aa0e91e9c1525397466e2f64ea34ca2ced8b55
11:39 dalek rakudo: 3d0a9c2 | pmichaud++ | src/glue/run.pir:
11:39 dalek rakudo: Refactor !UNIT_START.
11:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​d0a9c2e6424c974a8109e94d103ef59531a6e38
11:39 dalek rakudo: 114971b | pmichaud++ | build/PARROT_REVISION:
11:39 dalek rakudo: Bump PARROT_REVISION.
11:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​14971bc65e95d8a37ca6660688b62953f8837e0
11:39 dalek rakudo: 67e1145 | pmichaud++ | src/Perl6/Actions.pm:
11:39 dalek rakudo: Refactor unit startup, add context saves.
11:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​7e1145d44642bfdd44fc5a2eb0b7b28fc0e1840
11:39 dalek rakudo: 86c0bee | pmichaud++ | src/glue/run.pir:
11:39 dalek rakudo: Refactor !UNIT_START to handle the various cases.
11:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​6c0bee6adaa3df788cfd33d144e0f9119851236
11:39 dalek rakudo: da40f63 | pmichaud++ | src/glue/run.pir:
11:39 dalek rakudo: Fix bug with @*ARGS setup.
11:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​a40f6366c03b4b9f89be5c64e2f380ddfb775fb
11:39 dalek rakudo: 855ca68 | pmichaud++ | docs/spectest-progress.csv:
11:39 dalek rakudo: Merge branch 'master' of github.com:rakudo/rakudo
11:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​55ca68afd4cde623f2e45ed9e8e885f2da4df57
12:09 dalek parrot: r48027 | gerd++ | trunk (2 files):
12:09 dalek parrot: Make the destination more flexible; so "cd editor && make vim-install VIM_DIR=/usr/share/vim/vimfiles" for example will work correct; so the VIM_DIR option is possible
12:09 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48027/
12:14 bluescreen joined #parrot
12:26 ruoso joined #parrot
12:46 dalek parrot: r48028 | Util++ | trunk (12 files):
12:46 dalek parrot: Remove extraneous semicolons
12:46 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48028/
12:59 Mokurai joined #parrot
13:50 tcurtis joined #parrot
13:50 bubaflub joined #parrot
14:22 dalek rakudo: ddf224e | pmichaud++ | docs/spectest-progress.csv:
14:23 dalek rakudo: spectest-progress.csv update: 507 files, 33926 (84.5% of 40171) pass, 2 fail
14:23 dalek rakudo: Failure summary:
14:23 dalek rakudo: S32-temporal/DateTime.t 15 - epoch at 1970-01-01 01:01:01
14:23 dalek rakudo: S32-temporal/DateTime.t 16 - as Str 1970-01-01T01:01:01+0100
14:23 dalek rakudo: S32-temporal/DateTime.t passed 18 unplanned test(s)
14:23 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​df224e8b8f5299a5533d5f6d828491daaed5b50
14:32 Andy joined #parrot
14:37 plobsing joined #parrot
14:41 patspam joined #parrot
14:57 dalek rakudo: c89a843 | pmichaud++ | src/ (2 files):
14:57 dalek rakudo: Remove IN_EVAL() function, $*IN_EVAL dynvar.
14:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​89a843ff1720077df1da5e3e51f8736adc27e4d
14:57 dalek rakudo: 17654af | pmichaud++ | docs/ROADMAP:
14:57 dalek rakudo: Mark REPL task as done in the ROADMAP.
14:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​7654af2241ae487d5734597b8cbec149f803e5a
14:57 dalek rakudo: 7bbb35f | pmichaud++ | docs/spectest-progress.csv:
14:57 dalek rakudo: Merge branch 'master' of github.com:rakudo/rakudo
14:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​bbb35f84ca73c9de29d38ef89d42d15cbc64748
15:09 dukeleto cotto: i just got back from a long trip, need to look at the gsoc timeline and remind peeps
15:10 particle i reminded p6/parrot folks at the weekly status meeting to do their duty next week
15:11 moritz dukeleto: ash was confused by the parrot github mirror not being up-to-date
15:11 dukeleto moritz: ah, yeah. that needs to be fixed
15:11 dukeleto particle: thank you
15:22 tcurtis pmichaud: ping
15:26 dalek rakudo: 894e793 | pmichaud++ | t/harness:
15:26 dalek rakudo: Fix bug with --long and --stress option handling.
15:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​94e79347b5db1fc90b44806bc83ac23146ca992
15:30 dalek parrot: r48029 | tcurtis++ | branches/gsoc_past_optimizat​ion/t/library/pastwalker.t:
15:30 dalek parrot: Failing test for walking of viviself attribute.
15:30 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48029/
15:30 dalek parrot: r48030 | tcurtis++ | branches/gsoc_past_optimization/runt​ime/parrot/library/PAST/Walker.nqp:
15:30 dalek parrot: Fixed the bug preventing viviself from being walked.
15:30 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48030/
15:33 tcurtis moritz: At #ps yesterday, I brought up bacek's desire that my GSoC stuff either get merged or moved to an external project soon, and it sounded like moving it to an external project would be okay. Which would prevent you from having the issue with needing to wait for me to merge parrot trunk for you to merge rakudo master.
15:35 tcurtis I'm probably going to run it by parrot-dev before I do it, but I thought you might be interested in knowing.
15:37 moritz tcurtis: either approach would be fine by me, merging into parrot would be less effort
15:37 moritz (for me)
15:38 moritz tcurtis: anyway, thanks for letting me know...
15:39 moritz my optimizations currently block on me being too dumb to iterate a hash in nqp :l/
15:40 moritz afk
15:40 tcurtis moritz: I believe for %foo will iterate over the keys.
15:45 dukeleto tcurtis: it is nice to hear that you are coordinating with both parrot and rakudo peeps. keep up the good work!
15:45 * dukeleto has been off the interwebs for 4 days and is backlogging in many dimensions
15:52 tcurtis dukeleto: thanks. I'll try.
15:57 nopaste "coke" at 192.168.1.3 pasted "moritz - nqp iterate a hash" (6 lines) at http://nopaste.snit.ch/21844
16:09 moritz thanks Coke++
16:09 pmichaud for %foo in NQP iterates over the hash and gives back "pairs"
16:10 moritz is that sensitive to sigil?
16:10 pmichaud no
16:10 pmichaud for $foo will do the same thing
16:10 pmichaud (the sigil-control of flattening came after NQP)
16:10 moritz so what is a "pair" in NQP?
16:10 pmichaud it's actually what the hash iterator returns from Parrot
16:15 nopaste "pmichaud" at 192.168.1.3 pasted "pmichaud@plum:~/nqp-rx$ cat x" (16 lines) at http://nopaste.snit.ch/21846
16:15 pmichaud moritz: see nopaste :-)
16:16 moritz pmichaud: thanks
16:34 ruoso joined #parrot
16:36 dalek parrot: r48031 | khairul++ | branches/gsoc_instrument (6 files):
16:36 dalek parrot: Fixed code issues raised by cotto.
16:36 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48031/
16:36 dalek parrot: r48032 | tcurtis++ | branches/gsoc_past_optimization (2 files):
16:36 dalek parrot: Traverse vivibase with PAST::Walker.
16:36 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48032/
16:42 ash_ joined #parrot
16:46 ash_ this might sound like a dumb question, but why does parrot differentiate between PMC's and everything else? If you just boxed all the interger's, nums, and strings in PMC's then you'd have a lot less of a number of things, plus things would be a lot more simple when you don't have to think about 4 different kinds of the same op
16:49 Coke ah, pmichaud++'s is a better example. I didn't introspect what the key was. =-)
16:52 tcurtis ash_: probably partially due to a desire to not have to GC numbers and partially due to a desire to not have to dereference a pointer for most operations on numbers.
16:52 Hunger joined #parrot
16:53 atrodo I would guess, also, it would make math operations much more difficult to JIT
16:57 ash_ not having to gc numbers and ints is pretty nice
16:57 ash_ i didn't think of that
16:57 allison joined #parrot
16:59 NotFound Do a loop with a integer register and with a integer PMC and you'll know the difference,
16:59 tcurtis How do I use exists in NQP? pir::exists__IPK doesn't work.
16:59 NotFound Even without gc involved.
17:00 ash_ NotFound: i just find it odd, in other VM's (like cpython or the ruby vm) they only have 1 object type and keep all the int's and num's boxed
17:00 ash_ well ruby cheats a bit actually, but still
17:01 rurban_ joined #parrot
17:02 ash_ in ruby, if the first bit of an object pointer is 1, then its not actually an object, its an integer inside a pointer
17:03 tcurtis ash_: common lisp implementations frequently do that, too, I think.
17:04 Andy_ joined #parrot
17:04 Andy joined #parrot
17:04 atrodo I'd imagine that's good for convenience, especially when everything is actually an object, but bad for speed
17:05 tcurtis The "that" I was referring to being encoding fixnums in pointers with a flag bit.
17:06 ash_ if you hide integers in points like that, there are no pointer dereferences on math ops
17:08 atrodo Wouldn't that add more complexity to the VM than just having the multiple ops?
17:08 ash_ i duno, i guess it just moves the complexity around
17:09 dalek parrot: r48033 | khairul++ | branches/gsoc_instrument (3 files):
17:09 dalek parrot: Fixed code issues raised by cotto (missed EventDispatcher.nqp).
17:09 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48033/
17:14 bubaflub_ joined #parrot
17:16 ash_ (for instance in the ruby vm) in the add_op it checks if its a fixnum (if the first bit is 1) and does the add, checks if its a BigInt (built in type) and calls a special built in add, else it calls the object + op that invoked the add, so thats at most 2 comparisons + a method dispatch, at best 1 comparison and 1 + op, with all of the registers not boxed as they are in parrot, then you loose the comparisons but you gain multiple
17:16 ash_ implementations of the op
17:19 tcurtis The advantage is that you never have to box a fixnum unless it overflows.
17:19 ash_ and they are faster at runtime
17:20 atrodo and you can actually optimize them
17:21 Coke (exists) I use Q:PIR for that.
17:21 ash_ atrodo: what do you mean?
17:21 Coke or, you can just /get/ the value (assuming your container doesn't autoviv) and see if it's... defineD? null? whicver that is.
17:22 tcurtis Coke: pir::exists__IQS or IQwhatever works.
17:23 atrodo If you know the operation is an add of integers, you have a higher chance of optimizing that, either in JIT or at compile time.  If you don't know, you have to do the whole dance
17:24 ilia joined #parrot
17:25 dalek parrot: r48034 | tcurtis++ | branches/gsoc_past_optimization (2 files):
17:25 dalek parrot: Walk .control and .loadinit attributes of PAST::Blocks in PAST::Walker.
17:25 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48034/
17:25 ash_ atrodo: got ya, yeah but if your jiting your code you can do that with boxed things too, thats the beauty of a JIT, it knows at runtime this is really just an integer that is boxed, you should be able to remove the boxing, if your JIT doesn't do that, then its not doing much
17:27 atrodo But that's the thing.  Unless it's typed all the time as an int, you can't automatically unbox it, you have to test it
17:27 tcurtis ash_: How do you reason that checking the first bit of both operands and then adding them(fixnum addition) is faster than just adding them(separate registers)?
17:28 atrodo And, both sides of the operations have to be ints for it to do anything unboxed
17:28 bubaflub joined #parrot
17:28 ash_ tcurtis: i didn't say it was, i was just pointing out it is more simple in some cases because its only 1 implementation of the add op instead of multiples
17:29 tcurtis What did you mean by "and they are faster at runtime"?
17:29 eternaleye joined #parrot
17:31 tcurtis atrodo: A good compiler should compile a function doing math to a single check for fixnumness on the inputs at the beginning of the function. If not, you do normal PMC multi-dispatch. Otherwise, you do pure fixnum math the same as with the separate ops.
17:31 tcurtis Slightly worse performance on the individual ops unless the fixnumness can be known.
17:32 tcurtis But, you never have to box them.
17:33 atrodo Sure, unless the value changes after input
17:34 ash_ tcurtis: i was refereeing to multiple implementations is faster, if there are specific add_ops for when you have $I# + $I# vs $P# + $P#
17:34 clinton joined #parrot
17:34 tcurtis atrodo: The compiler would know if the value changes after input. Overflow is the only tricky bit there.
17:34 ash_ atrodo: there are only certain ops that should modify the value, you'd only need to check if you need to re-box the value then
17:36 atrodo Yep and Yep.  Hold on for a second, example coming
17:38 nopaste "atrodo" at 192.168.1.3 pasted "take, for example" (5 lines) at http://nopaste.snit.ch/21847
17:39 atrodo And i'm taking this example from discussions that took place at YAPC
17:39 atrodo The problem is, you know for sure at compile time $i is an int.  But you don't know what type $y is.
17:40 atrodo if it's an int, you don't need to box anything.  If it's not, you have to box $i and call a dispatch
17:40 atrodo The compiler has no way of knowing, only the runtime knows
17:42 ash_ atrodo: yeah, your right, but thats the prefect case of how a JIT provides speed ups
17:42 atrodo ash_> Oh?
17:43 ash_ since it does know the types at runtime, it doesn't need to do a full dispatch unless completely necessary
17:43 atrodo Aye, but it still has to check everytime
17:43 tcurtis atrodo: You don't box $i. If you use fixnums, you don't have to box them ever.
17:44 ash_ well, what if $y was a string?
17:44 cotto_work ~~
17:44 Coke tcurtis: what is "Q" ?
17:44 tcurtis Coke: I have no idea. I found it in src/setting/ResizablePMCArray.pm in NQP.
17:45 atrodo ash_> Explosions, I believe
17:45 * Coke cries again about the state of docs.
17:45 tcurtis Question: are we talking about multiple dispatch or Ruby-esque single dispatch? Because that affects things.
17:45 Coke I have been going off this list: http://trac.parrot.org/parrot/wiki/NQPDocs
17:45 particle Q, as in the perl 6 op?
17:46 tcurtis particle: Q in NQP pir:: op signatures.
17:46 Coke particle: 13:22 <@tcurtis> Coke: pir::exists__IQS or IQwhatever works.
17:46 particle oh, in an op sig... hrmm
17:47 tcurtis With single dispatch, you just call your dispatch function with the fixnum and add and the string, and it sees, oh, this is a fixnum, so let's call the Fixnum add method, which maybe converts the string to an integer and adds it or something.
17:49 tcurtis With multiple dispatch, you call your dispatch function and it just looks for the + method with a fixnum and a string and calls it on the fixnum and the string.
17:50 tcurtis You could as an optimization have a dispatch_fixnum_method that didn't perform the check and was only used if you knew you had a fixnum, too.
17:53 atrodo ash_> At this point, I'm thinking that in a dynamic language, it's a wash which way you go
17:54 atrodo If it was up to me, I'd go with which ever way was more maintainable
17:54 ash_ now that i think about it more, i rather like the way its done in parrot, with multiple ops
17:55 atrodo I'm curious on the reasoning
17:58 ash_ you have less comparisons, if, at compile time, you check more stuff then you end up with a faster operation, plus if you JIT the code, its really easy to inline the ops since they each have a single implementation with virtually no logic, the add $I $I is literally just the C operation $1 += $2, there might be some with logic that might make them harder to inline, but that would be great for most cases as inlining that removes an unneede
17:58 ash_ method call for such a simple operation
18:00 Coke ok. nqp's pir::op syntax seems to just dispatch to a PAST::Op/pirop
18:02 pmichaud Q is "keyed pmc"
18:03 tcurtis ash_: Separate ops seems superior for the individual operations, but it's inferior for actually passing integers around, because you have to box them, and more GCables is bad. I think either are arguably good choices, although for native-code compilation, which Common Lisp implementations often do, it's probably a better choice to go with fixnums since it allows better machine register usage, I'd expect.
18:03 dalek winxed: r538 | NotFound++ | trunk/winxedst1.winxed:
18:03 dalek winxed: tiny refactor of operators lexing
18:03 dalek winxed: review: http://code.google.com/p/w​inxed/source/detail?r=538
18:07 pmichaud I updated the docs in PAST::Compiler.pir, didn't know about the trac wiki page
18:08 Coke pmichaud: I just updated the wiki to point to the perldoc.
18:08 Coke the wiki predates the docs in parrot, I think. based on me picking your brain some aeons ago.
18:08 Coke I just looked in Past/Compiler.pir and didn't see Q.
18:08 Coke under "signature flags" ?
18:09 cotto_work compilers/pct/src/PAST/Compiler.pir
18:09 cotto_work in trunk
18:10 Coke ... wierd. i swear i didn't just see it.
18:10 Coke pmichaud++
18:11 cotto_work That's ... fun to trace down if you don't know where to look.
18:11 dalek tracwiki: v8 | coke++ | NQPDocs
18:11 dalek tracwiki: unfortunately, this list also does not mention 'Q'
18:11 dalek tracwiki: http://trac.parrot.org/parrot/wiki​/NQPDocs?version=8&amp;action=diff
18:12 cotto_work Where is the code that actually uses those flags?
18:12 Coke Compiler does the hard work, but it's used in Past::Node's Op variant, which in turn is used by nqp's pir::<opcode>__<sig> variant.
18:13 cotto_work found (some of?) it
18:18 pmichaud you're looking for the Q part itself?
18:18 pmichaud most of the flags get handled by "coerce"
18:19 cotto_work thanks
18:19 pmichaud the 'Q' flag gets handled by "post_children"
18:19 cotto_work I've been seeing those mysterious flags for a while and been wondering what they all meant
18:19 pmichaud it's another way of specifying operand types to opcodes
18:20 pmichaud I didn't like the _ki  _p  _ic   etc forms because they're harder to parse.
18:20 pmichaud and I needed some flags that didn't correspond to anything in the opcodes already
18:22 theory joined #parrot
18:25 pmichaud afk, errands
18:28 kthakore hi folks
18:31 dalek parrot: r48035 | pmichaud++ | trunk/compilers/pct/src/PAST/Compiler.pir:
18:31 dalek parrot: Add documentation for another pirop signature flag.
18:31 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48035/
18:38 Coke I suspect I could clean up a bunch of partcl-nqp with this more current list of flags.
18:39 Chandon_ joined #parrot
18:44 dalek nqp-rx: 70f4eb7 | moritz++ | src/Regex/P6Regex/Actions.pm:
18:44 dalek nqp-rx: put AST generation for named assertions into a separate method
18:44 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/7​0f4eb714edf0fe0167602a1b78385419ec6eb7e
18:48 dalek parrot: r48036 | gerd++ | trunk/config/gen/makefiles/editor.in:
18:48 dalek parrot: add the possibility to specify something like this: make vim-install VIM_DIR=~/vim-inst-dir SKELETON=/skeleton_file_path
18:48 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48036/
19:37 dalek parrot: r48037 | gerd++ | trunk/config/gen/makefiles/editor.in:
19:37 dalek parrot: removing wrong double quote
19:37 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48037/
19:57 bluescreen joined #parrot
20:01 TimToady phone
20:01 GeJ Bonjour everyone.
20:01 darbelo o/
20:08 eternaleye joined #parrot
20:12 LoganLK joined #parrot
20:12 bubaflub joined #parrot
20:20 NotFound Spain 1 - Germany 0 :)
20:20 darbelo Spain++
20:20 moritz :(
20:20 darbelo (Magic Octopus)++
20:20 moritz that's a traitor :-)
20:21 cotto_work I'm rooting for Antarctica.
20:21 cotto_work In spite of not having a team, I think they've got a good chance.
20:21 atrodo It's like the lottery.  Not playing is the biggest win
20:22 * moritz would love to see Antarctica vs. Jamaica in the final
20:22 darbelo I would expect that to be rather one sided.
20:23 darbelo With Jamaica having a team and all...
20:24 moritz well, they have to muster the concentration of getting to the opposite, empty goal once
20:32 theory joined #parrot
20:34 particle not true... kick that jabulani ball and it might go anywhere.
20:47 patspam joined #parrot
21:10 tcurtis joined #parrot
21:15 diakopter joined #parrot
21:18 diakopter left #parrot
21:34 dalek parrot: r48038 | darbelo++ | failed to fetch changeset:
21:34 dalek parrot: Sync with trunk.
21:34 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48038/
21:35 cotto_work pmichaud: ping
21:35 pmichaud pong
21:36 cotto_work What does something like pir::set_p_p_kc__PPS(...) mean?
21:36 pmichaud it would select a very specific form of opcode -- set_p_p_kc
21:36 pmichaud and then it would force the operands to be held in a PMC register, another PMC register, and a String register
21:37 cotto_work I see.  Then it'd use PPS as directions to interpret the args
21:37 pmichaud and I'd potentially argue that IMCC or Parrot should carp about it, since I'm not sure a string register is a valid operand for _kc
21:39 cotto_work Would my $category := pir::set_p_p_kc__PPS($data, 'event_category'); be better rewritten as my $category := $data<event_category>; or is there some subtlety that I'm missing?
21:42 bacek aloha, humans
21:42 cotto_work aloha bacek
21:42 tcurtis Hello, bacek.
21:43 bacek hi cotto, tcurtis
21:43 pmichaud *much* better as  $category := $data<event_category>
21:43 pmichaud the former would stick "event_category" into a string register and then try to use it
21:43 pmichaud the latter will use the constant directly
21:43 cotto_work ok
21:43 pmichaud (at least, that's what it's supposed to do.  could be a bug in nqp if it doesn't)
21:44 cotto_work I've clearly been slacking off a little too much in the area of gsoc code review.
21:45 bacek tcurtis, do you have plans for SSA in your optimizer?
21:45 cotto_work msg khairul In Instrument::EventDispatcher::handler, $category := pir::set_p_p_kc__PPS($data, 'event_category'); should become my $category := $data<event_category>;
21:45 purl Message for khairul stored.
21:46 Andy joined #parrot
21:46 bacek cotto_work, "set"???
21:47 cotto_work blame it on a lack of familiarity with nqp
21:48 bacek my $category := $data<event_category>; translates into something like "get_p_p_sc"
21:49 cotto_work iirc there is no get
21:50 cotto_work It's all set
21:50 cotto_work apart from get_label, get_namespace, etc
21:51 tcurtis bacek: I'm planning to eventually implement a way of converting a PAST or POST to something easier to optimize, but it's not an immediate priority.
21:53 bacek tcurtis, ok. Just keep in mind that most of optimizations based on SSA form.
21:54 bacek cotto_work, yeah... I was wrong.
21:57 lucian joined #parrot
22:20 hercynium joined #parrot
22:45 cotto_work allison, when do you think you'll send your Lorito post to parrot-dev?
23:01 cotto_work msg allison When do you think you'll send your Lorito post to parrot-dev?
23:01 purl Message for allison stored.
23:05 ash_ in pbc_to_exe, wouldn't it be kinda nice if you could expand the bytecode out from its compact form into its individual calls? then you might get at least some of the optimizations your compiler knows about on that expanded form
23:07 ash_ another gain might be to specify the runcore you want at compile time, then you'd save your self a lot of pointer dereferencing
23:07 ash_ but that's not really required, just thinking
23:10 ash_ and by expand from its compact from into its individual calls i mean take the "add_i_ic" instruction and expand that out in the main of the C program generated by pbc_to_exe to a call to "Parrot_add_i_ic(op, interp);"
23:12 theory joined #parrot
23:36 silug joined #parrot
23:55 Psyche^ joined #parrot
23:59 Coke msg mikehh nevermind moving the html out of the docs makefile, we can save that for another day.
23:59 purl Message for mikehh stored.

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

Parrot | source cross referenced