Camelia, the Perl 6 bug

IRC log for #parrot, 2010-02-24

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 dalek rakudo/master: 6884da0 | jonathan++ | src/core/ (2 files):
00:01 dalek rakudo/master: Bring loads of methods for EnumMap (previously Mapping) and Hash back. Rewrite those that used to be in PIR into Perl 6. Some that don't do mutations but were only in Hash are now in both; I see no good reason for them not to also be in EnumMap.
00:01 dalek rakudo/master: review: http://github.com/rakudo/rakudo/commit/6​884da05657857e92c5705910c3e655bd3d57334
00:01 dalek rakudo/master: 7452234 | jonathan++ | t/spectest.data:
00:01 dalek rakudo/master: We pass S03-smartmatch/scalar-hash.t again.
00:01 dalek rakudo/master: review: http://github.com/rakudo/rakudo/commit/7​452234b31048140f7280a7711fb2ed948f6597b
00:01 dalek rakudo/master: 3b44842 | jonathan++ |  (3 files):
00:01 dalek rakudo/master: Move Regex.ACCEPTS to core.
00:01 dalek rakudo/master: review: http://github.com/rakudo/rakudo/commit/3​b44842b6074339d0f35a6fe06c292dfc66e294d
00:01 bacek_at_work darbelo, pong
00:04 darbelo It looks like the build infrastructure in your PIR compiler has bitrotted, do you have any pointer towards salvaging it?
00:07 cotto_work If you figure that out, it may be easier to get ops_pct working again against head.
00:09 darbelo cotto_work: It's not the *code* that I'm trying to salvage (right now). It's the build procedure that's hosed.
00:09 cotto_work oh
00:09 darbelo The makefile references tools that have been removed from the repo.
00:11 dalek parrot: r44423 | mikehh++ | trunk/t/oo/new-old.t:
00:11 dalek parrot: fix perlcritic failure - fix perl coda
00:11 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44423/
00:11 darbelo Maybe I should just not bother with necromacy and try to make it work with distutils...
00:13 dalek winxed: r427 | julian.notfound++ | trunk/examples/pirado.winxed:
00:13 dalek winxed: improve pirado, with some temporary tricks, making it able to work with some two
00:13 dalek winxed: arg ops
00:13 dalek winxed: review: http://code.google.com/p/w​inxed/source/detail?r=427
00:14 bacek_at_work darbelo, not yet.
00:15 kid51 mikehh:  Any words of wisdom about the perlcritic errors?
00:16 mikehh kid51: just going through them now - fixing the easy ones first :-}
00:17 mikehh kid51: I am not sure about things like TODO violations
00:17 patspam joined #parrot
00:19 mikehh kid51: should we be testing ext/Parrot-Embed/t/pipp.t
00:19 kid51 I'm amazed we're down to 27 failures.
00:20 kid51 IIRC, files in ext/ are outside our scope.  But I'm not very familiar with ext/ myself.
00:20 mikehh there are some multiple failures in some of the files
00:22 kid51 mikehh:  I will take care of:  t/steps/auto/snprintf-01.t  and t/tools/ops2pm/08-sort_ops.t
00:24 dalek dbm-dynpmcs: dc1a7c1 | darbelo++ | t/gdbmash.t:
00:24 dalek dbm-dynpmcs: Make temp file deletion smarter to cover the fact that the OS pmc is dumb.
00:24 dalek dbm-dynpmcs: Thanks to fperrad++ for pointing this out and prviding a patch.
00:24 dalek dbm-dynpmcs: review: http://gitorious.org/dbm-dynpmcs/dbm-dynpmcs/c​ommit/dc1a7c1ddbc4feae03a4fd1b4a13506417e171be
00:24 dalek dbm-dynpmcs: 4fbd6be | darbelo++ | t/gdbm (2 files):
00:24 dalek dbm-dynpmcs: Undo typo in filename.
00:24 dalek dbm-dynpmcs: review: http://gitorious.org/dbm-dynpmcs/dbm-dynpmcs/c​ommit/4fbd6be6b56d7fda452f737815d6f257c2a8f143
00:24 dalek dbm-dynpmcs: 3b748cf | darbelo++ | t/gdbmhash.t:
00:24 dalek dbm-dynpmcs: Give each test it's own db file.
00:24 dalek dbm-dynpmcs: review: http://gitorious.org/dbm-dynpmcs/dbm-dynpmcs/c​ommit/3b748cfe9487617aa5bc7a571d8d7cf8fceb01ae
00:24 dalek dbm-dynpmcs: 04ff353 | darbelo++ | LICENSE:
00:24 dalek dbm-dynpmcs: Add LICENSE file.
00:24 dalek dbm-dynpmcs: review: http://gitorious.org/dbm-dynpmcs/dbm-dynpmcs/c​ommit/04ff353c667ad82e0b0dbe15a84238a3d2ed5d4c
00:28 dalek parrot: r44424 | mikehh++ | trunk/t/op/exit.t:
00:28 dalek parrot: fix perlcritic failure - fix perl coda
00:28 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44424/
00:28 dalek parrot: r44425 | jkeenan++ | trunk/t/steps/auto/snprintf-01.t:
00:28 dalek parrot: [codingstd] Cut out some comments that contained the deadly 'TODO' string, which was triggering perl-hyper-critic.
00:28 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44425/
00:43 mj41 mikehh: TapTinder test each commit to trunk on many clients. Is it possible to put more files with codingstyle fixes to one commit?
00:44 dalek parrot: r44426 | jkeenan++ | trunk/t/tools/ops2pm/08-sort_ops.t:
00:44 dalek parrot: [codingstd] Delete inline comments that contained TODO; tests that had been TODO-ed are now passing.
00:44 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44426/
00:44 dalek parrot: r44427 | mikehh++ | trunk/t/op/sysinfo.t:
00:44 dalek parrot: fix perlcritic failure - fix perl coda and TODO -> todo
00:44 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44427/
00:44 dalek parrot: r44428 | mikehh++ | trunk/t/tools/ops2pm/05-renum_op_map_file.t:
00:44 dalek parrot: fix perlcritic failure - missing perl coda
00:44 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44428/
00:44 dalek parrot: r44429 | mikehh++ | trunk/ext/Parrot-Embed/t/pipp.t:
00:44 dalek parrot: fix perlcritic failure - missing perl coda, but still 2 TODOs in the file
00:44 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44429/
00:46 mj41 Time to sleep, dobrou noc.
00:46 mikehh mj41: at the moment I am doing some tests after each commit, and I also like to avoid too much change at once in case there is a problem
00:47 mikehh I should say before each commit
00:48 dalek rakudo/master: 90b5153 | jonathan++ | src/ (3 files):
00:48 dalek rakudo/master: Minor optimization to BUILDALL and .can. Takes 10s or so off the spectest run for me.
00:48 dalek rakudo/master: review: http://github.com/rakudo/rakudo/commit/9​0b5153761768b8d07fcb7a8b2a900d236499119
00:48 dalek rakudo/master: a7874a7 | jonathan++ | src/builtins/ (2 files):
00:48 dalek rakudo/master: Rip out the .fixup_cloned_sub macro - we don't need it any more. Should make .clone a tiny, tiny bit cheaper by saving a (useless) check.
00:48 dalek rakudo/master: review: http://github.com/rakudo/rakudo/commit/a​7874a7c1e07d4975d64a6cd3a7f54058d274106
00:51 integral joined #parrot
00:54 darbelo purl: msg bacek I forked your PIR compiler at http://github.com/darbelo/pir and started adding a new build procedure. It kind of builds, but needs more necromancers before it works properly.
00:54 purl Message for bacek stored.
01:00 dukeleto darbelo: cool! we need more development on PIR compilers
01:00 dalek parrot: r44430 | mikehh++ | trunk/compilers/ncigen/t/NCIGENAST (2 files):
01:00 dalek parrot: fix perlcritic failure - add use strict/use warnings
01:00 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44430/
01:02 abqar joined #parrot
01:17 dalek parrot: r44431 | mikehh++ | trunk/compilers/ncigen/t (3 files):
01:17 dalek parrot: fix perlcritic failure - add use strict/use warnings
01:17 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44431/
01:20 Coke msg chromatic - thanks for fixing that very old MMD bug.
01:20 purl Message for chromatic stored.
01:25 cotto_work Would it be possible to use lexicals to make todo in PIR's Test::More saner?
01:27 * cotto_work heads home
01:27 purl Slacker!
01:33 dalek parrot: r44432 | mikehh++ | trunk/compilers/ncigen/t/parse_00.t:
01:33 dalek parrot: remove dubious construct in test
01:33 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44432/
01:42 kid51 joined #parrot
01:48 mikehh kid51: down to 12 files now
01:50 dalek parrot: r44433 | mikehh++ | trunk/compilers/pirc/t (5 files):
01:50 dalek parrot: fix perlcritic failure - add use strict/use warnings
01:50 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44433/
01:50 dalek parrot: r44434 | plobsing++ | trunk (2 files):
01:50 dalek parrot: remove last references to Parrot_call_sub() and Parrot_call_sub_ret_int() that have already been removed
01:50 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44434/
01:59 mikehh kid51: if you want to look at the rest, I've had enough for the moment - it is 2am for me
01:59 dalek TT #1145 closed by plobsing++: extend/embed API functions for calling subs/methods
01:59 kid51 mucho gracias, miguelito
02:00 mikehh anyway make test passes, will try fulltest in a few hours
02:06 dalek parrot: r44435 | jkeenan++ | trunk/examples/languages/abc/t/01-tests.t:
02:06 dalek parrot: [codingstd] No 2-argument-form for 'open'.
02:06 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44435/
02:07 dalek parrot: r44436 | jkeenan++ | trunk/t/examples/pod.t:
02:07 dalek parrot: [codingstd] quiet critic re TODO in comment.
02:07 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44436/
02:16 dalek TT #1476 created by jkeenan++: t/compilers/pct/past.t:  Complete desired tests
02:19 dalek parrot-data-structures: 54e716d | Whiteknight++ |  (4 files):
02:19 dalek parrot-data-structures: add some stuff I should have added last commit
02:19 dalek parrot-data-structures: review: http://github.com/Whiteknight/parrot-data-structur​es/commit/54e716d2ceeed405bb963100e7a291d8a65dfb5f
02:23 dalek parrot: r44437 | jkeenan++ | trunk/ext/Parrot-Embed/t/pipp.t:
02:23 dalek parrot: [codingstd] TODO -> todo to shut up the perl-hyper-critic.
02:23 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44437/
02:23 dalek parrot: r44438 | jkeenan++ | trunk/t/compilers/pct/past.t:
02:23 dalek parrot: [codingstd] Convert TODO request for more tests to TT #1476.
02:23 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44438/
02:25 plobsing embedding question: is it possible to call into parrot with a variable signature/number of arguments for a single call site?
02:25 plobsing All I'm seeing is Parrot_ext_call which uses varargs (which suck IMHO)
02:28 dukeleto plobsing: i don't know if what you want exists
02:34 nbrown_ joined #parrot
02:36 dukeleto plobsing: why do varargs not work for you?
02:36 plobsing can't be built at runtime
02:37 plobsing Personally, I would prefer an array.
02:37 plobsing nice, simple, works anywhere, for anyone.
02:39 plobsing I could live with using an aggregate PMC too.
02:49 dalek TT #1477 created by plobsing++: [embed] expose non-vararg-based sub/method call-ins
02:56 dalek parrot: r44439 | jkeenan++ | trunk/t/compilers/imcc/imcpasm/optc.t:
02:56 dalek parrot: perlcritic.t objected to prototypes in Perl 5 subroutines.  Modify subroutine used to generate permutations to not use prototypes.
02:56 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44439/
02:56 dalek parrot: r44440 | jkeenan++ | trunk/t/native_pbc/integer.t:
02:56 dalek parrot: perlcritic.t objected to prototypes in Perl 5 subroutines.  Modify subroutine to not use prototypes.
02:56 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44440/
03:12 dalek parrot: r44441 | jkeenan++ | trunk/t/native_pbc/number.t:
03:12 dalek parrot: perlcritic.t objected to prototypes in Perl 5 subroutines.  Modify subroutine to not use prototypes.
03:12 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44441/
03:12 dalek parrot: r44442 | jkeenan++ | trunk/t/native_pbc/string.t:
03:13 dalek parrot: perlcritic.t objected to prototypes in Perl 5 subroutines.  Modify subroutine to not use prototypes.
03:13 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44442/
03:13 dalek parrot: r44443 | jkeenan++ | trunk/t/op/calling.t:
03:13 dalek parrot: [codingstd] perlcritic complained about variable declaration in conditional statement.  Fixed.
03:13 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44443/
03:13 dalek parrot: r44444 | jkeenan++ | trunk/t/op/calling.t:
03:13 dalek parrot: Correct spelling error.
03:13 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44444/
03:13 dalek parrot: r44445 | jkeenan++ | trunk/t/pmc/exporter.t:
03:13 dalek parrot: Delete string 'TODO' in comment; already superseded by a Trac ticket number.
03:13 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44445/
03:23 dalek TT #1478 created by jkeenan++: t/pmc/iterator.t:  split test
03:25 kid51 Two more commits to be reported, but all perlcritic.t complaints have been addressed.
03:25 * kid51 goes for beer.
03:29 dalek parrot: r44446 | jkeenan++ | trunk/t/pmc/iterator.t:
03:29 dalek parrot: [codingstd] Replace 'XXX' in comment with TT #1478.
03:29 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44446/
03:29 dalek parrot: r44447 | jkeenan++ | trunk/t/pmc/sub.t:
03:29 dalek parrot: [codingstd] perlcritic complained about variable declaration in conditional statement.  Fixed.
03:29 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44447/
03:30 dalek rakudo/master: 4f74e3b | (Solomon Foster)++ | src/core/Rat.pm:
03:30 dalek rakudo/master: Make Rat.Num return +/- Inf if the denominator is 0.
03:30 dalek rakudo/master: review: http://github.com/rakudo/rakudo/commit/4​f74e3b1bb56ecdf31ff2356ff6ae73ae581f5f8
03:35 kid51 r44447:  make codetest PASS
03:49 Coke kid51++
03:49 Coke mikehh++
03:50 * kid51 must sleep
03:50 purl $kid51->sleep(8 * 3600);
04:09 cognominal joined #parrot
04:11 * Coke enjoys his upgraded netflix subscription.
04:19 janus joined #parrot
04:21 Coke $ svn up
04:21 Coke svn: Can't find a temporary directory: Internal error
04:22 Coke sounds like a server bug.
04:25 Coke I opened a ticket with osuosl.
04:25 Coke damnit. I had a big commit for the warnings stuff. =-)
04:45 * Coke hurls http://feather.perl6.nl/~coke/warnings.pm in case anyone wants to review it.
04:46 Coke compare to config/auto/warnings.pm on rm_cflags branch.
04:53 TiMBuS joined #parrot
04:57 dalek joined #parrot
05:17 dalek pynie: r113 | allisonrandal++ | trunk/Grammar/Actions.nqp:
05:17 dalek pynie: Modify AST generation to delete keyed items as well as entire
05:17 dalek pynie: variables (only handled variables before).
05:17 dalek pynie: review: http://code.google.com/p/pynie/source/detail?r=113
06:27 Coke svn restored.
06:38 dalek parrot: r44448 | coke++ | branches/rm_cflags/config/auto/warnings.pm:
06:38 dalek parrot: Allow specification of warnings for skipping or adding per-file
06:38 dalek parrot: Continue to generate config's ccwarn; if per file modifications are given,
06:38 dalek parrot: generate ccwarn?filename.c, also.
06:38 dalek parrot: Improve the docs.
06:38 dalek parrot: Rename try_warning to valid_warning & memoize it.
06:38 dalek parrot: Fix bugs in spec of 'warnings' data.
06:38 dalek parrot: Remove a redundant spec in --cage that was already in the basic warnings.
06:38 dalek parrot: Do not generate config information for each individual warning, eliminate
06:38 dalek parrot:   now-unused function in the process.
06:38 dalek parrot: Inline _set_ccwarn
06:38 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44448/
06:38 dalek parrot: r44449 | coke++ | branches/rm_cflags/config/auto/warnings.pm:
06:38 dalek parrot: Construct the warnings data structure in smaller pieces.
06:38 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44449/
06:53 dalek pynie: r114 | allisonrandal++ | trunk/Lib/test/bootstrap/dicts.py:
06:53 dalek pynie: Test element deletion by element count, rather than the 'in' keyword,
06:53 dalek pynie: which seems to have a bug. Comment out the 'in' test for later fix.
06:53 dalek pynie: review: http://code.google.com/p/pynie/source/detail?r=114
06:56 dalek plparrot: 23de4a5 | (Joshua Tolley)++ | src/plparrot.c:
06:56 dalek plparrot: Initialize the interpreter only once. This fixes the crashes I've been having all the time.
06:56 dalek plparrot: Note, in passing, that the recent move of plparrot.c to src, instead of
06:56 dalek plparrot: src/handler, doesn't fix the problem where make installs everything into the
06:56 dalek plparrot: wrong place. PostgreSQL still looks for plparrot.so in $libdir, but the
06:56 dalek plparrot: installer puts it in $libdir/src. This hasn't been failing immediately in my
06:56 dalek plparrot: case, because there's an old plparrot.so already there. That makes debugging
06:56 dalek plparrot: ... less simple. :) But that's also a fix for another night.
06:56 dalek plparrot: review: http://github.com/leto/plparrot/commit/2​3de4a5b8d2b5235639f49dc9121734c002a9209
07:00 chromatic joined #parrot
07:03 Coke chromatic: hio
07:06 fperrad joined #parrot
07:07 cotto joined #parrot
07:09 Coke do folks have any thoughts on taking everything in parrot config and making it available as a variable in an included makefile?
07:10 Coke (all prefixed with something to avoid conflicts with env vars.)
07:10 he_ joined #parrot
07:11 dalek parrot: r44450 | coke++ | branches/rm_cflags (3 files):
07:11 dalek parrot: - Change optional @@ syntax from URL-like ? to a more parrotish ::
07:11 dalek parrot: - move spf/src_render's override into auto::warnings.
07:11 dalek parrot: - Split out cc_warn from cc_flags in the makefile
07:11 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44450/
07:14 Coke hurm. nevermind, that would be helpful but not for the problem I'm working on right now.
07:25 Coke darbelo: rm_cflags should probably build now with sun cc as long as you don't --optimize.
07:27 dalek parrot: r44451 | coke++ | branches/rm_cflags (3 files):
07:27 dalek parrot: Don't run with "unused" by default. (it wasn't in trunk).
07:27 dalek parrot: Move imclexer's warning overrides into auto::warnings.
07:27 dalek parrot: Don't bother overriding unused if we're not using it.
07:27 dalek parrot: imclexer's overrides are not (at the moment) respected, doc it.
07:27 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44451/
07:31 dalek plparrot: fa1081e | (David Fetter)++ | Makefile:
07:31 dalek plparrot: Removed awful hack.  9.0's pg_regress now uses the new CREATE OR
07:31 dalek plparrot: REPLACE LANGUAGE, which means it doesn't break when we load PL/pgsql.
07:31 dalek plparrot: review: http://github.com/leto/plparrot/commit/f​a1081e19e9060e4dca08b48ced939cc7fbc59b5
07:55 bacek joined #parrot
07:56 bacek o hai
07:56 bacek darbelo, ping
08:03 iblechbot joined #parrot
08:09 Coke darbelo: bah, I lied. more fixes necessary.
08:18 dalek parrot: r44452 | coke++ | failed to fetch changeset:
08:18 dalek parrot: merge latest changes from trunk
08:18 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44452/
08:43 nopaste "mj41" at 147.229.5.176 pasted "NotFound: pbc_disassemble.exe hanging" (45 lines) at http://nopaste.snit.ch/19753
09:22 mikehh All tests PASS (pre/post-config, make corevm/make coretest, smoke (#32368), fulltest) at r44452 - Ubuntu 9.10 amd64 (gcc with --optimize)
09:27 chromatic joined #parrot
09:51 bacek joined #parrot
09:57 dalek parrot: r44453 | fperrad++ | trunk (2 files):
09:57 dalek parrot: [gdbmhash] add methods open/close.
09:57 dalek parrot: This allows to remove database file without problem on Windows
09:57 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44453/
10:06 AndyA joined #parrot
10:18 lucian joined #parrot
10:25 Austin kthakore: It didn't go. Both of the perl modules failed to build, leaving me with no way to verify/diagnose my sdl installation.
10:52 payload joined #parrot
10:58 mikehh joined #parrot
11:08 Austin msg Tene Here's one that's particularly bothersome at the moment. If a calls b calls c, and c throws an exception which is caught by a, then a rethrows the exception, the backtrace printed should mention c as the origin, not a.
11:08 purl Message for tene stored.
11:46 plobsing joined #parrot
11:51 lucian joined #parrot
12:00 bkuhn joined #parrot
12:07 payload joined #parrot
12:11 payload1 joined #parrot
12:27 kthakore Austin: what os are you on?
12:27 Austin andlinux
12:27 purl i heard andlinux was a full solution, and it saves you a lot of pain or at http://www.andlinux.org/
12:28 kthakore Austin: what errors have you been getting for ALien::SDL?
12:28 Austin It's basically ubuntu running under windows
12:30 nopaste "Austin" at 68.37.46.53 pasted "AlienSDL errors" (10 lines) at http://nopaste.snit.ch/19756
12:31 kthakore ah you seem to have an older version of File::PAth?
12:31 Austin For some value of older? I'm running perl 5.10
12:31 kthakore Austin: I dunno how
12:32 kthakore maybe cpan File::Path ?
12:32 kthakore Austin: I have to head to work
12:32 kthakore talk to you in a bit
12:32 Austin l8r
12:35 mikehh joined #parrot
12:39 cosimo joined #parrot
12:41 Austin msg kthakore I googled a bit and did an install of sdl-dev+debian, which apparently installs the kitchen sink, too. At this point, the parrotSDL test run fails on the very first test with an error about SDL_ttf not initialized.
12:41 purl Message for kthakore stored.
12:43 cosimo joined #parrot
12:51 whiteknight joined #parrot
12:52 mikehh joined #parrot
12:59 whiteknight good morning #parrot
13:12 dalek rakudo/master: 59c65be | moritz++ | t/spectest.data:
13:12 dalek rakudo/master: re-enable S03-junctions/associative.t
13:13 dalek rakudo/master: review: http://github.com/rakudo/rakudo/commit/5​9c65be84afc1ffa8fb00fd56d7163724f9aab8f
13:14 Austin Good morning, whiteknight
13:15 Austin I have a somewhat novel idea for you, after you've had that first cup of coffee
13:15 [hudnix] joined #parrot
13:17 whiteknight I don't drink coffee. I'm receptive to novel ideas starting at 5 AM
13:17 Austin Okay.
13:17 Austin Pretend for a minute that we get to wave our magic fairy wands and solve a bunch of coding problems - this isn't about cost.
13:17 Austin Let's say we have a string.
13:18 Austin We can assign a number to that string using a global string enumerator.
13:18 Austin It will be dense:  1, 2, 3, ...
13:18 Austin Given that mechanism, we can assign a number to every method name.
13:19 Austin You with me so far?
13:20 Austin 'new' = 1, 'isa_tty' = 2, etc.
13:20 Austin Right now, the vm deals with opcodes.
13:21 Austin An opcode that runs on a pmc (as opposed to one like 'getinterp') is a lookup of an entry in that pmc's vtable.
13:22 Austin If we can enumerate all method names, we can (pretend to) build a really big vtable for each object.
13:22 Austin The opcodes become "call_method $object, #22" because the first #n vtable entries are reserved already.
13:22 Austin (So our enumerator has to return #n + 1, 2, ...)
13:24 Austin We start with a "blank" vtable that has however-many copies of a pointer to a function that does "lazily resolve vtable function or method name" for its invocant.
13:25 Austin As objects exercise more and more ops/methods, they fill in their (shared or not) vtables, so it doesn't have to be a giant initial effort.
13:27 Austin The payoff is, I think, that vtable and method calls use the same mechanism.
13:29 Austin Calls to static methods - where the method name is a constant - can be num-ified at load time. Calls to variable -named methods (callmethod($obj, $meth_name, @args)) have to do a hash/enum, but then the dispatch problem is solved, since any already-dispatched method is cached in the vtable.
13:30 Austin What do you think?
13:30 purl I think Austin should try flossing more often!
13:30 d4l3k_ joined #parrot
13:32 Austin heh
13:32 Austin purl++
13:32 [hudnix] joined #parrot
13:33 mikehh_ joined #parrot
13:38 eirik joined #parrot
13:38 plobsing_ joined #parrot
13:38 dngor joined #parrot
13:38 Hunger joined #parrot
13:38 Coke joined #parrot
13:38 pmichaud joined #parrot
13:38 jsut joined #parrot
13:38 Ryan52 joined #parrot
13:38 tetragon joined #parrot
13:38 zostay_ joined #parrot
13:38 fperrad joined #parrot
13:38 szabgab joined #parrot
13:39 PacoLinux joined #parrot
13:40 japhb joined #parrot
13:40 payload joined #parrot
13:40 darbelo joined #parrot
13:40 hercynium joined #parrot
13:41 Austin Apparently my idea was so brilliant it knocked people of #irc.
13:41 Austin How ya like me now!
13:57 kthakore Austin: not much
13:57 purl same here, dude
13:57 Austin :)
13:57 kthakore Austin: how do I check the message?
13:57 Austin say "messages" to purl
13:58 Austin purl, messages
13:58 kthakore purl, messages
13:58 kthakore well that is not a good message :|
13:58 Austin Then you can say "messages erase" to clear them
13:58 kthakore ok
13:59 PerlJam Austin: did you figure out a way to make parrot uber-fast, uber-small, backwards compatible, and just generally awesome such that there's nothing left to do?
13:59 kthakore messages erase
13:59 kthakore purl, messages erase
13:59 purl kthakore: what?
13:59 kthakore purl, KILL THE MESSAGE
13:59 purl kthakore: sorry...
13:59 Austin messages?
13:59 purl To access purl's messages, msg me with the word "messages".
13:59 Austin purl, messages
13:59 kthakore Austin: ok done
14:00 Austin PerlJam: How about fast-er?
14:00 kthakore Austin: I might have to make config.pir
14:00 Austin kthakore: Why?
14:00 kthakore Austin: to get all the boiler plate generated
14:00 Austin Ah
14:00 kthakore for the SDL-dev locations and what not
14:00 Austin Is this really a location problem?
14:00 kthakore my idea is similar to what I am doing in perl5
14:00 kthakore Austin: yes
14:01 kthakore Austin: NCI needs the location absoulte and accesible
14:01 kthakore to load the C function hook
14:01 Austin That seems wrong.
14:01 PerlJam Austin: faster is always good :)
14:01 kthakore Austin: yesh!
14:01 kthakore Austin: shouldn't it look in PATH for the libraries
14:02 kthakore like any sane program?
14:02 Austin Depends on what libraries..
14:02 Austin .so libraries, sure.
14:02 Austin .pbc libraries, not so much
14:04 ruoso joined #parrot
14:08 kthakore Austin: well these SDL libs are .sop
14:08 kthakore .so
14:08 kthakore Austin: so why doesn't NCI look for them in PATH
14:08 Austin I don't know. Ask Whiteknight.
14:09 kthakore whiteknight: ping!
14:09 Austin (I don't know much about the innards.)
14:09 whiteknight ?
14:09 kthakore Austin: me neither
14:09 kthakore whiteknight: why doesn't NCI look for .so libs in PATH
14:09 whiteknight I have no idea. probably should
14:09 whiteknight are you sure it doesnt?
14:09 kthakore whiteknight: why do I have to give it the name and absolute path
14:09 kthakore whiteknight: yeah pretty sure
14:11 kthakore whiteknight: see teh http://github.com/kthakore/p​arrotSDL/blob/master/SDL.pir
14:12 kthakore whiteknight: I either give it an env var
14:12 kthakore or it looks only in /usr/lib
14:12 kthakore whiteknight: ignore rest of PATH
14:14 whiteknight well that's not right. File a ticket
14:15 kthakore whiteknight: yay!
14:15 kthakore trac?
14:15 purl well, trac is a web-based software project management and bug/issue tracking system emphasizing ease of use and low ceremony. It provides an interface to the Subversion revision control systems, integrated Wiki and convenient report facilities.  http://projects.edgewall.com/trac/ or Python, SQLite and ClearSilver or killing killtrac or a bug-tracking tool or at https://trac.parrot.org/parrot/ or slow or REALLY slow
14:15 whiteknight It should use Parrot' normal file-loading mechanism, which uses PATH
14:15 kthakore whiteknight: I will check again but even Austin is having that problem with ttf
14:18 plobsing_ kthakore: are you sure you shouldn't be using LD_LIBRARY_PATH in stead?
14:21 kthakore plobsing_: but not all platforms use LD_LIBRARY_PATH
14:21 kthakore plobsing_: most do use PATH
14:22 kthakore plobsing_: I don't know what it uses but it should find the lib in /usr/local/lib
14:23 plobsing_ kthakore: I was under the impression the two uses were disjoint. PATH for programs, LD_LIBRARY_PATH for shared libs
14:23 Austin See nopaste - searching seems limited.
14:23 Austin Is snit.ch down?
14:23 Austin purl, ping nopaste.snit.ch
14:23 purl nopaste.snit.ch: 10 packets transmitted, 10 received, 0% packet loss, time 9013ms, rtt min/avg/max/mdev = 230.306/230.673/231.698/0.564 ms
14:24 nopaste "Austin" at 68.37.46.53 pasted "search paths" (33 lines) at http://nopaste.snit.ch/19757
14:25 Austin Works via browser, but the nopaste script can't talk to port 8001
14:25 kthakore plobsing_: whiteknight ^^ see that doesn't work for NCI
14:26 kthakore we need /usr/lib and /usr/local/lib
14:26 kthakore at the very least
14:26 plobsing_ kthakore: Parrot uses the system's dlopen function. This is a Good Thing.
14:26 plobsing_ it avoids reinventing the wheel
14:26 kthakore plobsing_: ok thats fine and everything
14:26 kthakore not faulting how it is done
14:27 kthakore but where it looks!
14:27 plobsing_ which your system provides a way of setting.
14:28 kthakore ok ... then how do I fix it to look at /usr/local
14:28 kthakore or other locations in PATH and LD_CONFIG_PATH
14:29 plobsing_ ... system dependant, but most unix-like operating systems use LD_LIBRARY_PATH
14:36 kthakore ok
14:36 kthakore ...
14:36 bluescreen joined #parrot
14:49 Austin Woot!
14:50 Austin kthakore: I modified SDL.pir to add some extra filenames to check - libSDL_ttf-2.0.so.0 seems to have done it
14:50 Austin Now I'm at the stopwatch problem
14:50 kthakore ah ok
14:50 kthakore Austin: hooray
14:50 Austin Null PMC access in isa
14:50 kthakore yeah that is where I am stuck too
14:51 Austin I think you need to write a general purpose "try to load X with these suffixes" function.
14:51 kthakore plobsing_: isnt that another thing. why is libSDL_tff sufficent to get it try all links?
14:51 kthakore Austin: don't you mean NCI should handle that ;)
14:52 kthakore Austin: yes I think that is what you mean
14:52 kthakore Austin: good point sir!
14:52 * kthakore tips his hat and twirls his mustache
14:52 Austin kthakore: NCI should definitely not handle this part.
14:52 kthakore crap
14:52 kthakore ...
14:52 kthakore ssssssshhhhhhh
14:53 ruoso joined #parrot
14:53 Austin The "find a path" part is handled (correctly, it turns out) by the system. The .so, -2-0.so-0-0, _1.2.so.0 stuff seems to be at the whim of whoever built the library.
14:53 kthakore Austin: yeah that is problabwhat I cam going to have make SDL::Loader
14:54 kthakore Austin: make a perl script that generates a quick parrot hash? with all the right names of the libs
14:54 kthakore Austin: and have setup.pir run that
14:54 Austin Oh, and your problem is that $P0 is not initialized.
14:55 * Austin slaps kthakore in the head!
14:55 Austin You change from .local pmc class  to $P0
14:55 Austin s/$P0/class/ should do it
14:56 Austin "Could not find non-existent sub store_global"
14:56 kthakore Austin: didn't write this man!
14:56 kthakore Austin: I am fixing it!
14:56 Austin Oh, sure. Blame the other guy.
14:56 * kthakore goes cries in the corner
14:56 kthakore Austin: so where is this?
14:57 Austin StopWatch
14:57 kthakore ah ok
14:57 Austin Once you fix the $p0 -> class problem
14:57 kthakore man this chan is brutal!
14:57 kthakore Austin: ok
14:57 kthakore yes suh
14:57 kthakore right away suh
14:57 Austin I suspect store_global ought to be set_hll_global (opcode)
14:57 kthakore ok
14:58 Austin In fact, if you search for store_global, that __onload sub looks very confused. Double check all the registers - I think it doesn't work.
15:00 kthakore ok
15:00 Austin You get the $P0 thing fixed?
15:01 kthakore yeah
15:01 kthakore working on it suh
15:01 kthakore please don't hit me
15:01 Austin ;-
15:02 kthakore the opcode set_hll_global was not found
15:02 kthakore I am using it at line 255
15:02 kthakore as you said
15:03 he_ left #parrot
15:05 Austin Huh?
15:06 lucian joined #parrot
15:15 bubaflub joined #parrot
15:16 kthakore Austin: ok if I fix the class I get could not find non existant sub store_global
15:16 Austin Yeah.
15:16 kthakore Austin: so I made it the set_hll_global
15:16 Austin Try replacing that with set_hll_global [ 'SDL::NAmespace'], 'globalName', $P99
15:16 kthakore but it dies too
15:16 kthakore ok
15:17 Austin Pretty much same args order, I think.
15:17 kthakore ok
15:17 kthakore what is the find_global alternative?
15:19 Austin $P99 = get_hll_global ['SDL::Namespace'], 'variable'
15:20 kthakore ok
15:21 Austin Btw, it works for functions, too - $P0 = get_hll_global [ 'SDL' ], 'function'
15:24 kthakore Austin: yay!!!
15:24 kthakore it works
15:24 Austin Progress?
15:24 purl well, Progress is progress
15:24 kthakore yeah
15:24 Austin Woot!
15:24 Austin kthakore++
15:24 kthakore putting it up now
15:24 kthakore Austin: now STOP HITTING ME in public
15:25 kthakore Austin: it is up
15:25 Austin Two days, 3 git repos, and I can't remember how many packages installed, all because you changed variable names in mid-routine?
15:25 kthakore come on #sdl
15:26 kthakore Austin: I DIDN"T DO IT
15:26 * kthakore cries
15:27 iblechbot joined #parrot
15:29 nopaste "tene" at 76.27.121.193 pasted "whiteknight: example of auto-resume non-fatal exceptions. Rakudo uses this for warnings." (16 lines) at http://nopaste.snit.ch/19758
15:29 kthakore Austin: huh?
15:30 kthakore Austin: I was about to start demo work in #sdl
15:30 kthakore Austin: ok maybe later
15:30 whiteknight tene: okay, thanks. I wasn't sure if it worked or not
15:30 whiteknight but I'm happy to see that it does
15:30 Austin kthakore: I'm glad it's working, but I've got my own crappy code to debug... :(
15:30 kthakore heheh
15:30 kthakore Austin: can I hit you now
15:31 * kthakore slaps Austion
15:31 kthakore WHy is you crappy code not working!!
15:31 Austin Because I spent too much time working on that SDL stuff!
15:31 Tene whiteknight: Yes, I implemented it, so I'm glad to see it still working.
15:31 Tene whiteknight: I really like your blog post about exceptions.  I'm going to condense it into some cleanup notes.
15:32 Tene I think I'll have time today to work on it.
15:32 Tene afk $work
15:32 kthakore Austin: :p
15:32 kthakore Austin: thanks for the help
15:33 Austin np
15:35 silug_ joined #parrot
15:39 mikehh joined #parrot
15:47 Psyche^ joined #parrot
15:52 ruoso joined #parrot
15:57 theory joined #parrot
16:01 whiteknight Tene: I'm glad you like it! I really want to be clear that I'm complaining about the spec, not about your work with it
16:01 whiteknight because you've done a lot of really good work
16:10 darbelo bacek: pong
16:13 NotFound whiteknight: there is some problem with oplib.pmc First, it doesn't set the custom_mark flag, but even fixing that it crashes sometimes. If I delete the "singleton" specifier, it doesn't fail. Maybe there is some problem in the GC about marking singletons?
16:14 whiteknight NotFound: that's possible. I think singletons are created in the constant pool, so the cache object it uses might not get marked
16:14 whiteknight so either remove singleton, which is a hack, or change the cache to be a constant PMC
16:14 NotFound Looks like the other singletons in the repo doesn't need to mark anything.
16:15 darbelo NotFound: Singletons are immortal.
16:15 NotFound darbelo: yes, but his data is not.
16:16 NotFound whiteknight: I think constant hashes with non constant data have related problems.
16:16 darbelo NotFound: It will only be destroyed during final celanup. The alternatives are to leak, crash or both.
16:17 NotFound darbelo: if a singleton has some PMC data, it needs to be marked.
16:18 whiteknight NotFound: so that's a good point. Maybe remove the singleton tag
16:18 darbelo NotFound: Sure, you can set the custom_mark flag, just be careful with the custom_destroy one.
16:19 NotFound darbelo: I've do that, but still crashes.
16:20 NotFound I think removing the singleton tag is the way to go. Is just an attempt of optimization, I think.
16:20 NotFound It doesn't really need to be unique.
16:21 darbelo NotFound: Making sigletons work right is a better choice.
16:21 darbelo ;)
16:21 NotFound darbelo: yes. I can create a ticket: "Fix parrot" X-)
16:22 Andy joined #parrot
16:22 darbelo We should have a ticket for sigleton order-of-destruction bugs since last year.
16:22 kurahaupo joined #parrot
16:22 darbelo I opened it ;)
16:23 NotFound This isn't an order of destruction problem. The var is never destroyed before crashing.
16:25 darbelo NotFound: I'm looking at it now, and the init() vtable is wrong.
16:25 darbelo singletons shouldn't play with the pointers that {get,set}_pointer manipulate.
16:26 patspam joined #parrot
16:27 darbelo NotFound: Can you try http://nopaste.snit.ch/19759 ?
16:27 NotFound darbelo: I don't see any pointer manipulated by both. get and set uses OPLIB_PMC_INSTANCE and init uses OPLIB_OPCODE_CACHE
16:28 darbelo NotFound: Precisely. They should both touch the same pointer.
16:29 darbelo The code in pmc.c uses get_pointer and set_pointer to ensure the unicity of the PMC.
16:29 NotFound darbelo: no effect
16:30 darbelo NotFound: Oh, my bad. wrong nopaste.
16:30 darbelo Gimmie a sec...
16:30 NotFound darbelo: I've already tried setting one ot both to NULL or to PMCNULL,
16:31 kurahaupo joined #parrot
16:33 kthakore NotFound: japhb: can you guys answer this http://www.reddit.com/r/perl/com​ments/b5q6t/sdl_perl_eye_candy/
16:33 kthakore see reticulator's comments
16:33 NotFound BTW I don't see why we need the static PMC pointers, anyway.  The singleton support should take care of all that,
16:34 Tene whiteknight: of course.  no offense taken.  My main blocker on exceptions work was a lack of experience to inform me how it *should* work.  I tried updating PDD23, but I was mostly just able to make it consistent, not able to evaluate sanity.
16:35 whiteknight NotFound: you're right. Parrot should have a built-in mechanism to properly support singletons WITHOUT requiring the ugly get_pointer/set_pointer inteface it uses now
16:35 whiteknight Better would probably be an Integer->PMC hash in the interpreter that keyed type id number to instance, and looked it up there
16:36 NotFound kthakore: Answer what question?
16:38 kthakore NotFound: when will you guys start NCI redesign?
16:39 NotFound kthakore: To have threaded callbacks? We don't even have a usable thread system rigth now.
16:40 kthakore well what needs to be done
16:41 dalek kakapo: 4a69f1e | austin++ |  (11 files):
16:41 dalek kakapo: More changes in support of Close.
16:41 dalek kakapo: review: http://gitorious.org/kakapo/kakapo/commit​/4a69f1e20b67cb6eb7330e2f1dd81cbf8b46a20c
16:44 darbelo NotFound: You do need *one* static pointer. And that one should only be touched by get/set_pointer. The cache should be an attr.
16:45 darbelo See http://nopaste.snit.ch/19760
16:46 darbelo That's what I wanted to paste the first time.
16:53 kurahaupo joined #parrot
16:57 theory joined #parrot
16:59 NotFound darbelo: still crashes
16:59 Coke (rethrow doesn't seem to rethrow) - there's a ticket for that.
16:59 darbelo Damm, do you have a simple test case?
16:59 Coke I remember being confused by the explanation as to why rethrow wasn't working like I expected.
17:00 NotFound darbelo: that depends on what you accept as 'simple'. Using packfile.winxed -d a_large_file.pbc
17:01 Coke Austin: see TT#1283
17:01 darbelo Simple < "100 lines of PIR"
17:02 Austin Coke: hell, yeah.
17:02 NotFound darbelo: packfile.winxed compiled to pir is 1196 lines long, I suppose it doesn't qualify.
17:03 dalek kakapo: 950bb09 | austin++ |  (6 files):
17:03 dalek kakapo: Added NameSpace.string_name options.
17:03 dalek kakapo: Signed-off-by: Austin Hastings <Austin_Hastings@Yahoo.com>
17:03 dalek kakapo: review: http://gitorious.org/kakapo/kakapo/commit​/950bb093687195bfe59b20ae0c32ae354ae84e78
17:03 darbelo I'm getting a winxed checkout now. If you can show me a 2-line invocation that breaks reliably I'll take that.
17:04 NotFound darbelo: winxed --stage=2 examples/packfile.winxed -d winxedst2.pbc
17:05 NotFound I saved you one line ;)
17:06 NotFound Or you can first compile packfile to pbc, to shorten it:
17:06 darbelo Nice, except that my g++ is too ancient for winxed.
17:06 cotto joined #parrot
17:07 mikehh All tests PASS (pre/post-config, make corevm/make coretest, smoke (#32382), fulltest) at r44453 - Ubuntu 9.10 amd64 (g++ with --optimize)
17:07 NotFound darbelo: uh, that's a problem, I don't have a distributable stage 1 precompiled yet.
17:09 NotFound darbelo: What g++? The intention was that it builts with any reasonably recent version.
17:10 darbelo g++ (GCC) 3.3.5 (propolice)
17:10 Austin Is there a way, in pir, to create a continuation?
17:10 NotFound darbelo: should work. Where it fails?
17:12 kurahaupo1 joined #parrot
17:12 NotFound Austin: t/pmc/continuation.t
17:13 Austin NotFound++
17:13 darbelo NotFound: http://nopaste.snit.ch/19763
17:15 NotFound darbelo: looks odd. Maybe you have mixed several g++ versions?
17:15 darbelo I should only have the one that ships in the OpenBSD base system.
17:16 AndChat| joined #parrot
17:16 NotFound Note that is a g++ header who fails to include another header.
17:23 darbelo Shit. There's something awfully wrong in /usr/include
17:29 * Coke reads andrew's blog post and has a hard time getting past all the insults.
17:30 * Coke marks them unread for later.
17:39 kurahaupo Firefox says: Warning: The stylesheet http://nopaste.snit.ch/style was loaded as CSS even though its MIME type, "text/html", is not "text/css".
17:44 NotFound I think that the "errorson" model is hard to understand an implement in a multi language and multi model scenery.
17:44 NotFound s/model/module
17:45 NotFound We may need that each sub set his wanted state at start.
17:46 kurahaupo Sounds like a candidate for an attribute on the sub?
17:46 NotFound Sounds like a mess to me. Is far easy to select what behaviour is desired by just using the appropiate opcodes.
17:47 kurahaupo Not our fault other people design stupid languages
17:49 Austin NotFound++
17:49 kurahaupo NotFound++
17:49 Austin I think that's a relic of everyone having to write pir:  "I don't want an exception, 'cause that's a lot of work to set up. Just return null"
17:50 NotFound Even within the same sub, one may want to check for a name in one place, and take for granted it can get other. For the first it uses a check, for the second soemthing that throws if not found.
17:51 Austin Sure.  if $namespace.contains('qsort') { qsort(@array) }
17:51 particle austin: it's a relic of the exception system not having been implemented for a long time
17:51 Austin particle: You think?
17:51 purl No, I'm a bot.
17:51 particle and of static thinking in a dynamic world
17:51 particle parrot's design changed significantly as perl 6 grew
17:52 particle initially, parrot was designed as a vm for a perl 5-like language
17:52 particle perl 6 was a perl 5-like language at first
17:52 particle that changed.
17:52 Austin NotFound: Would it make sense to implement the control exceptions as a set of searchable RPA stacks with continuations, instead?
17:53 NotFound I don't want to blame any one, just want a workable design and a path towards it.
17:53 Austin We're more than a year in, so i think we can blame it all on Obama, now.
17:54 NotFound We can always blame Nixon.
17:55 NotFound Austin: what will be the difference between that and the current way? It already has stacks of exception handlers.
17:56 NotFound Ah, you mean to separate the control ones?
17:56 Austin Yes.
17:57 NotFound Better ask the rakudo guys, I've never used control exceptions.
17:58 NotFound Winxed uses good old goto ;)
17:58 nopaste "Austin" at 68.37.46.53 pasted "return 1; (nqp->pir)" (7 lines) at http://nopaste.snit.ch/19765
17:58 Austin O
17:59 Austin I'm thinking that the cost of setting up and executing all those control exceptions is really wasted, since the control stuff is all about invoking a non-local continuation with an optional parameter.
17:59 NotFound The reason is that I don't plan to allow resumable exceptions in Winxed.
17:59 Austin :)
18:00 bacek joined #parrot
18:01 NotFound Austin: well, if the initial design was based in excpetions used for exceptional conditions, it makes sense that it doesn't try to make them faster to build and throw.
18:02 NotFound If heavily used for control flow, agreed that a faster way will be a big gain.
18:02 Austin Ignoring that, it's a case of an exception being an all-purpose thing. But a control-transfer is just a longjmp. Somebody registers the target, somebody else invokes it.
18:03 NotFound Austin: ah, you mean then to use a plain continuation instead of wrapping it in a full exception handler?
18:03 Austin Just about, yeah.
18:04 NotFound Looks good and doable.
18:04 nopaste "Austin" at 68.37.46.53 pasted "Exception overhead in nqp" (74 lines) at http://nopaste.snit.ch/19766
18:04 davidfetter joined #parrot
18:05 Austin If you look at hte last half or so, you'll see what price pmichaud has to pay to use control exceptions.
18:05 NotFound Yes, I had the idea that it used something like that.
18:06 Austin FYI: Type 58 is a "return" exception.
18:07 NotFound An initial path may be to use a PMC derived from exceptionhandler easier to initialize. Later it can be change to no inherit from exceptionhandler, if wanted.
18:08 Austin So "return 1" takes a 2-line sequence (create an Integer, set it to 1) and adds 4 lines of build an exception,set the type, set the payload, throw the exception.
18:09 Austin I was thinking of just using a continuation. Then use something like find_dynamic_lex to locate the handler.
18:09 whiteknight Coke: insults?
18:09 purl insults are against the MOTD
18:09 NotFound And nqp can't define his own opcodes to shorten it because we want nqp to be light weight, I see.
18:10 pmichaud the cost isn't in the opcodes
18:10 Austin Actually, I was thinking the opcodes could come later, if at all, and make things even more direct. Kind of like 'vivify'
18:10 whiteknight Exception systems tend not to be very performant because they are usually not intended to be used frequently
18:11 chromatic joined #parrot
18:11 NotFound pmichaud: yes, but having to generate a lot more of them isn't also good.
18:11 Austin Is anyone else having trouble with the nopaste script talking to snit.ch ?
18:12 pmichaud let me just say that having an equivalent opcode to perform the same sequence wouldn't provide significant performance benefit.  all it might do is make the PIR code look a little neater
18:13 Austin But if it could stop the nesting?
18:13 pmichaud ...stop the nesting?
18:13 pmichaud I don't understand
18:14 Austin Don't exceptions wind up with a nested run loop for a bit?
18:14 pmichaud for longer than a bit, even.
18:15 pmichaud but continuations suffer the same problem.
18:15 Austin Really?
18:15 pmichaud see the thread at http://lists.parrot.org/pipermail/p​arrot-dev/2009-December/003479.html  -- especially the later messages in the thread
18:16 pmichaud Bob Rogers' messages are particularly relevant:
18:16 pmichaud http://lists.parrot.org/pipermail/p​arrot-dev/2009-December/003517.html
18:16 NotFound Continuations work with contexts, not with the C stack, I think, so they must have the same problems.
18:17 pmichaud http://lists.parrot.org/pipermail/p​arrot-dev/2009-December/003536.html
18:17 pmichaud (actually, just read the whole thread)
18:17 bluescreen joined #parrot
18:17 pmichaud but it points out that Parrot continuations in general have a runloop issue, not just exceptions
18:18 NotFound I fully agree.
18:18 pmichaud In http://lists.parrot.org/pipermail/p​arrot-dev/2009-December/003548.html, Bob Rogers provides a proof-of-concept patch for helping out the runloop with exceptions problem, but also says
18:18 pmichaud 1.  This only works for the ExceptionHandler class; it should be
18:18 pmichaud refactored so it works for all continuation classes.
18:19 pmichaud anyway, getting better control over subroutine exit semantics (which would include "return" handling)  has been on Rakudo's priority list for a long time now, and explicitly mentioned whenever someone asks me "how can Parrot help Rakudo?"
18:21 Austin What is it that is needed, other than "go faster" ?
18:21 pmichaud the ability to explicitly force a caller subroutine to exit (and return specific values)
18:21 pmichaud and to roll up the intermediate runloops in the process
18:21 NotFound pmichaud: I'm not sure if that patch takes into account resumable exceptions
18:21 pmichaud NotFound: I'm not sure if it does either.  But the other messages in the thread identify a way to deal with exceptions in general
18:22 pmichaud my proposal was http://lists.parrot.org/pipermail/p​arrot-dev/2009-December/003511.html
18:23 Austin So if there was a stack of 'return' (as separate from loop-next) continuations, and one could invoke $context.control_stack<return>[-4]($result)
18:23 Austin would that do it?
18:24 pmichaud at any rate, it's worth noting that in Rakudo's case, the PIR code generated for  "return 1"   is in fact    "&return"(1)
18:24 pmichaud (might not be yet, but that's what it will end up being for a time)
18:25 pmichaud Austin: yeah, that's something along the lines of what I had been imagining.
18:25 Austin My only hesitation is naming
18:25 pmichaud well, I was thinking more of:
18:26 Austin Some of the control structures in Perl want names. How to attach them?
18:26 pmichaud $context[-4].return($result)
18:26 pmichaud i.e., go up a certain number of caller contexts, get its return continuation, and invoke it.
18:27 pmichaud in the Perl 6 context that gets a little trickier, though, as in addition to invoking the return continuation we have to perform constraint checks on the argument
18:27 pmichaud s/argument/return value/
18:27 Austin Isn't that the responsibility of the caller?
18:27 pmichaud no
18:27 Austin (IOW: [-4])
18:27 Austin So the continuation would point to a constraint checking postamble...
18:27 pmichaud oh, yes, that's a possibility
18:28 pmichaud another possibility is that there's a constraint checking postamble that is performed whenever the subroutine exits
18:29 Austin That would call the body?
18:29 pmichaud I don't have specific details as yet.
18:29 pmichaud I just know that Parrot is missing some pieces we need for Perl 6.  :)
18:30 NotFound darbelo: I'm going to commit a patch dropping the singleton tag, if youn don't object.
18:30 Austin :)
18:31 darbelo NotFound: Not at all, it looks to me like it's tehere as a (premature) optimization.
18:31 pmichaud I also know that Perl 6 tends to look at return handling as exception-based  (even to the point of being able to catch return exceptions)
18:31 NotFound darbelo: anyway we can test and restore it later, if looks convenient,
18:31 pmichaud although optimizers are free to omit the exception creation/handling if they can determine that it's safe to do so
18:32 Austin Hmm
18:32 pmichaud it gets a lot trickier though when returning from nested lexical scopes
18:32 Austin Who would catch a return exception?
18:32 pmichaud the outer sub catches it
18:32 Austin Yeah.
18:32 pmichaud oh, you mean other than that
18:32 Austin So to get between outer and inner ...
18:32 Austin you have to be part of the outer, or part of the inner.
18:32 pmichaud sub foo() {     CONTROL { ...catch return exception here... };    if $x { return 5; } }
18:33 pmichaud foo() can catch the return exception and do something with it before exiting.
18:33 Austin Does perl6 have goto?
18:33 pmichaud yes, perl6 has goto
18:33 Austin ('cause it does now, for sure..)
18:33 pmichaud that's just another exception, generally :-)
18:34 pmichaud it might end up being a continuation as well, but we have to have a mechanism to handle block exit semantics when jumping from one scope to another
18:34 Austin How would that interact with the forcing-a-caller issue?
18:35 Austin If I want to force a 'caller' to return a value, I need a way to identify the caller - not some code that jams a continuation or exceptionhandler on a stack someplace.
18:35 pmichaud well, one can look up the caller stack to find the caller of interest
18:36 Austin Also, if I did the force-a-caller thing, would any Control::Return handlers inside the caller see the return event?
18:36 pmichaud or, a compiler can know who the caller is
18:37 pmichaud the force-a-caller thing would need to be able to detect intermediate Control::Return handlers, yes.  It's an optimization, not a "always do it this way" sort of thing.
18:38 pmichaud anyway, I have to run some errands -- bbl
18:42 bacek Morning...
18:43 ruoso joined #parrot
18:43 davidfetter oi ruoso
18:45 dalek parrot: r44454 | NotFound++ | trunk/src/pmc/oplib.pmc:
18:45 dalek parrot: drop singleton tag from OpLib PMC and set custom mark on it
18:45 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44454/
18:45 whiteknight I keep wanting to ask pmichaud about those exit routines
18:46 whiteknight because it seems to me that the problem is every HLL subroutine is composed of several nested PIR subroutines, and then we need a way to "exit" from the whole group
18:47 Austin Yeah
18:47 darbelo bacek: pong
18:47 Austin Throw a Control::Return exception
18:47 whiteknight it seems to me more that the solution would involve flattening out so 1 Perl6 sub == 1 PIR sub
18:47 Austin Nope.
18:47 whiteknight nope?
18:48 whiteknight The only reason I can see to have the nested conglomeration of subs is to implement nested lexical scopes
18:48 Austin Blocks that can "return" get a return handler (58) added to them.
18:48 Austin whiteknight: Correct. Especially for reused symbols like $_
18:48 bacek darbelo, I can just give you commit bit to pirpct git repo.
18:49 Austin for @list { say $_ ;  for @inner_list { say $_ ; for @inner_inner_list { say $_; } } }
18:49 darbelo bacek: Excellent. I've just got the compiler to run.
18:49 whiteknight Austin: right. But if you look at the output of other compilers, eg a C compiler, even though the language enforces nested lexical scopes, the output ASM has no notion of them
18:49 Austin Yep.
18:50 bacek darbelo, I just have to find how to do it :)
18:50 whiteknight the ASM code doesn't know variable names, just allocates different storage for each and flattens
18:50 Austin But parrot doesn't have memory.
18:50 Austin It does have lexpads.
18:50 darbelo It doesn't do anything, except not die at the moment.
18:50 whiteknight what do you mean, doesn't have memory?
18:50 darbelo But I'm told not dying is important...
18:50 Austin Whiteknight: How can you allocate local storage in parrot?
18:50 Austin .local pmc foo
18:51 whiteknight Austin: we allocate local storage for registers
18:51 whiteknight a smarter code generator would allocate more registers
18:51 Austin And give them names.
18:51 whiteknight why give them names?
18:51 Austin So your code can find them?
18:51 bacek darbelo, can you try to push in my repo?
18:52 hicx174 joined #parrot
18:52 darbelo Sure, give me a second. I think I lost my local clone.
18:52 Austin A C compiler can re-use a name by assigning the same name (different lexical vars) to different local addresses.
18:52 whiteknight Austin: string names can be done now. We have that. symbolic names at the PIR level are useless
18:52 whiteknight Austin: the C compiler doesn't have names. Just registers and memory locations
18:52 whiteknight at least, the output of it
18:52 Austin Right, but the input did.
18:53 Austin So if I say, in C:    { int x = 0 ; for (;;) { int x = 1; ...} ... }
18:53 Austin there's two vars there
18:53 Austin "outer x" and "inner x"
18:53 whiteknight Austin: right, but that's just a constraint of naming imposed by the parser
18:54 whiteknight internally to the compiler, and in the generated output, the two aren't even remotely related
18:54 Austin A dumb C compiler, like myself, might simply say: okay, "outer x" is [bp + 4] and "inner x" is [bp + 8]
18:54 Austin 8 ]
18:54 whiteknight right, and that would be fine
18:54 Austin In parrot, we can't do that. Everything has to have a name.
18:55 Austin You can call 'em p0 and p1, or '$_' and '$foo', but there's names.
18:55 Austin If you try to put them in registers, then you need a way to map the name to a register when some subroutine tries to search for a dynamic variable.
18:55 Austin Because C doesn't have "eval"
18:57 whiteknight Austin: that could be accomplished quite easily, and with far less overhead, with some sort of name stack
18:57 Austin Could it?
18:57 whiteknight I believe so
18:57 Austin With closures and everything?
18:58 whiteknight Pushing a name on a stack would update the register number refrence, in the way that lexicals keep track of that info now
18:58 whiteknight closures would then inherit those name mappings
18:58 whiteknight so yes, I think it would work
18:58 whiteknight Again, keeping in mind that logically separate variables have distinct storage with a name mapping that doesn't change
18:59 Austin That sounds a lot like perl5's "local"
18:59 whiteknight with sufficiently smart optimizers, everything fails (including the current implementation)
18:59 whiteknight Austin: that's not a horrible model
18:59 Austin I didn't say it was. But there might be some documentation of all the things wrong with it - somebody else has probably already done that work.
19:00 particle stack is a dirty word.
19:03 tewk Austin, see http://en.wikipedia.org/wiki/Lambda_lifting
19:04 darbelo bacek: done. pushed all of my commit s to the other repo.
19:05 bacek darbelo, excellent!
19:05 darbelo I'll un-fork it now ;)
19:07 darbelo Doing 'parrot setup.pir' leavs you with a not-very-functional installable_pir fakecutable.
19:08 bacek darbelo, it's very-very old code. And yes, require a lot on necromancy to resurrect :)
19:08 * darbelo goes fetch his necronomicon.
19:16 NotFound http://notfound.posterous.com/how-​to-build-parrot-for-the-nokia-n900
19:17 davidfetter iaaa!
19:19 theory joined #parrot
19:36 ruoso joined #parrot
19:36 AndyA joined #parrot
19:37 pmichaud 18:57 <whiteknight> Pushing a name on a stack would update the register number refrence, in the way that lexicals keep track of that info now
19:38 pmichaud fwiw, at one time Parrot used to have something very much like this.  but then it was eliminated.
19:38 pmichaud i.e., lexpads were maintained on a stack, so that a single hll subroutine with nested lexicals could potentially correspond to a single parrot sub
19:39 pmichaud I never quite understood why that approach was eliminated.  (on the other hand, I didn't quite understand how to make things work with it either -- this was long before we were dealing with lexical vars in any sort of hll)
19:45 joeri joined #parrot
20:00 TimToady phone
20:00 s1n joined #parrot
20:01 lucian joined #parrot
20:02 whiteknight pmichaud: I wish I had joined Parrot earlier so I could have witnessed some of those kinds of decisions
20:03 whiteknight and "stack" isn't a dirty word.
20:03 darbelo Yes it is, we're a register vm.
20:03 bacek CPS actually
20:04 davidfetter ?
20:04 whiteknight a per-context lexical names stack could potentially be a huge performance svings for HLLs that make heavy use of lexicals and nested scopes
20:04 whiteknight Parrot being register-based means we don't have aglobal control flow stack
20:04 whiteknight it doesn't mean we can't use stacks for other purposes, especially when those are the right thing to do
20:04 pmichaud whiteknight: I don't think those decisions were made with open discussion, fwiw :)
20:04 bacek "register-based" and "control flow" are orthogonal.
20:05 whiteknight bacek: sort of
20:05 davidfetter fwiw?
20:05 purl i think fwiw is for what it's worth.
20:05 whiteknight bacek: unless we're creating storage on the stack
20:05 davidfetter purl, fwiw is also http://www.youtube.com/watch?v=Wm6NeM-6vBE
20:05 purl okay, davidfetter.
20:05 davidfetter fwiw
20:05 bacek whiteknight, we are not.
20:05 davidfetter oops
20:05 davidfetter fwiw?
20:05 purl somebody said fwiw was for what it's worth. or http://www.youtube.com/watch?v=Wm6NeM-6vBE
20:05 whiteknight bacek: right. But some VMs DO use a stack for storage and for flow control
20:06 whiteknight I think JVM and .NET both do
20:06 darbelo For the record, I was just being glib :)
20:06 whiteknight and that doesn't matter, because those two VMs blow parrot's ass out of the water in terms of performance
20:06 bacek whiteknight, yes.
20:06 bacek for many reasons
20:06 whiteknight so it's hard to say that "stacks are evil" when we have significantly worse performance than most stack VMs
20:06 NotFound Lots of money, for example ;)
20:07 NotFound whiteknight: Who says evil isn't fast? ;)
20:08 chromatic It's hard to say that Parrot uses registers when we spend so much time copying values in and out of "registers".
20:08 whiteknight One saving grace is that we can push expensive tasks like register allocation to compile-time and amortize savings over multiple bytecode uses
20:09 whiteknight Parrot really should make much higher use of the "compile to bytecode and run the bytecode" paradigm, then we could offload a lot more processing to the compiler for amortized savings
20:09 chromatic Sure, but if you read the Inferno papers, they say "Maybe the biggest benefit of the register approach is not spending all that time copying memory around."
20:09 whiteknight chromatic: I think that's misguided. Copying a P value to a new register is no more expensive than copying a register pointer to a call list
20:10 chromatic Copying a pointer is more expensive than not copying a pointer.
20:10 whiteknight chromatic: so how would you make a call without taking either a pointer to a register or copying the contents of that register in the call?
20:10 chromatic Read the Inferno paper.
20:11 whiteknight I believe I have. Link?
20:11 whiteknight We're not using native hardware registers, so every modification is memory access in any case
20:12 whiteknight whether we store an index, store a pointer, or copy a pointer, it's all the same expense
20:12 bacek not quite true
20:13 bacek We allocate storage for registers/copy values/allocate storage fro return values/copy pointers to return values/
20:13 bacek On every single bloody call...
20:15 chromatic http://www.usenix.org/events/ve​e05/full_papers/p153-yunhe.pdf
20:18 bacek Oh gosh... I almost forgot how I hate ImageIO/Packfiles...
20:20 whiteknight either we need to copy pointers to new register sets, or we need to have a sliding window register system
20:20 whiteknight in either case, we're moving data between calls
20:20 bacek which is harder to implement on CPS VM...
20:20 bacek (sliding window)
20:20 whiteknight exactly
20:20 chromatic If you know that a target register is a return value....
20:21 whiteknight the PCC system could get significantly cleaner and faster if we have Lorito and if we rewrite the top 30% of Parrot in Lorito
20:21 bacek it will not
20:21 bacek At least I can't imagine how Lorito can help with PCC
20:21 whiteknight once we enter the the Lorito runloop we never exit it, never descend far into C, and then never need to worry about getting parameters as a va_list*
20:22 whiteknight if we don't have multiple input formats, we don't need CallContext as a serialization format, and we can save a lot of effort
20:22 bacek it's unified now
20:22 bacek every Sub call going through PCC
20:22 whiteknight bacek: If everything is written in Lorito, we don't need Parrot_pcc_invoke_from_c_args
20:22 bacek from_op
20:22 whiteknight bacek: yes, but PCC is more complicated because of multiple argument formats
20:22 bacek we still need it
20:23 whiteknight one argument format, one code path, fewer checks and branches
20:23 PerlJam whiteknight: has anyone worked out what the "top 30% of parrot" is ?
20:23 whiteknight chromatic: yes, I have seen this paper before. Thanks for the link
20:23 whiteknight PErlJam: ops and PMCs mostly. A few APIs
20:24 whiteknight PerlJam: any code path that nests into a new runloop or results in a new PIR function call
20:24 bacek it's about 90% of parrot :)
20:24 bacek *incoming*
20:24 whiteknight 90% of the top 33% :)
20:25 dalek parrot: r44455 | bacek++ | branches/boehm_gc_2/compilers/imcc (6 files):
20:25 dalek parrot: Use consistent string allocations
20:25 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44455/
20:25 dalek parrot: r44456 | bacek++ | branches/boehm_gc_2/compilers/imcc/pcc.c:
20:25 dalek parrot: One more malloc replace in IMCC
20:25 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44456/
20:25 dalek parrot: r44457 | bacek++ | branches/boehm_gc_2/src/gc/gc_boehm.c:
20:25 dalek parrot: Comment out GC_FREE. It's faster.
20:25 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44457/
20:25 dalek parrot: r44458 | bacek++ | branches/boehm_gc_2/src/main.c:
20:25 dalek parrot: Reorder variable declaraions to prevent compiler warnings. Don't call GC_init. It's useless.
20:26 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44458/
20:26 dalek parrot: r44459 | bacek++ | branches/boehm_gc_2/src/pmc/callcontext.pmc:
20:26 dalek parrot: Reorder ATTRs in CallContext to enable typed allocations in Boehm GC.
20:26 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44459/
20:26 dalek parrot: r44460 | bacek++ | branches/boehm_gc_2/include/parrot/settings.h:
20:26 dalek parrot: Switch default GC to MS.
20:26 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44460/
20:26 dalek parrot: r44461 | bacek++ | branches/boehm_gc_2/compilers/imcc (2 files):
20:26 dalek parrot: HACK: Don't clear memory in IMCC. It's allocated in strange way and causes segfaults...
20:26 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44461/
20:26 dalek parrot: r44462 | bacek++ | branches/boehm_gc_2 (2 files):
20:26 dalek parrot: Actually use typed allocation for CallContext.
20:26 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44462/
20:28 whiteknight ...well, that ends the conversation
20:28 whiteknight bacek++
20:28 bacek Boehm is slower than our MS GC on small live objects set...
20:29 bacek And I almost gave up on it...
20:29 chromatic Boehm isn't precise, is it?
20:29 bacek It's conservative.
20:30 bacek But I use typed allocations with memory layout bitmaps
20:30 PerlJam Is there a standard parrot benchmark in the repo for comparing GCs?
20:30 bacek PerlJam, I use "fib2.nqp"
20:30 nopaste "bacek" at 114.73.160.181 pasted "fib2.nqp" (17 lines) at http://nopaste.snit.ch/19768
20:30 bacek this one
20:31 bacek Boehm is about 17 seconds, MS - 19.
20:34 chromatic Do you have Callgrind numbers for each?
20:35 bacek nope. valgrind can't work with Boehm...
20:36 chromatic Oh, right.
20:37 cotto_work How so?
20:40 bacek ==31706== Process terminating with default action of signal 11 (SIGSEGV)
20:40 bacek ==31706==  Access not within mapped region at address 0xBED3F000
20:40 bacek ==31706==    at 0x4417B88: GC_push_all_eager (in /usr/lib/libgc.so.1.0.3)
20:42 dalek parrot: r44463 | bacek++ | failed to fetch changeset:
20:42 dalek parrot: Merge branch 'master' into boehm2
20:42 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44463/
20:45 magnachef joined #parrot
20:47 nopaste "bacek" at 114.73.160.181 pasted "Meh... I BROKE IT..." (20 lines) at http://nopaste.snit.ch/19770
20:48 chromatic You get both pieces as a consolation prize.
20:55 hercynium joined #parrot
21:09 AndyA_ joined #parrot
21:15 dalek parrot: r44464 | bacek++ | trunk/compilers/imcc/pbc.c:
21:15 dalek parrot: Use zeroed allocations for constants
21:15 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44464/
21:22 hercynium joined #parrot
21:43 TonyC joined #parrot
21:53 darbelo joined #parrot
22:04 lucian joined #parrot
22:11 desertm4x joined #parrot
22:21 dalek parrot: r44465 | NotFound++ | trunk/t/pmc/oplib.t:
22:21 dalek parrot: update oplib test, no more a singleton
22:21 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44465/
22:31 bacek joined #parrot
22:32 Coke botsnack
22:32 purl thanks Coke :)
22:33 Coke does the oplib pmc work with dynpmcs? or just core?
22:33 Coke errr... dynops, not dynpmcs.
22:34 NotFound Coke: don't know, never used dynpmcs yet.
22:35 NotFound It looks a interpreter table, so whatever that table does.
22:35 NotFound dynops
22:37 dalek parrot: r44466 | NotFound++ | trunk/t/pmc/oplib.t:
22:37 dalek parrot: some more oplib testing
22:37 dalek parrot: review: http://trac.parrot.org/parrot/changeset/44466/
22:40 darbelo NotFound: I fixed my g++ issues and now winxed builds (With some "class Foo has virtual functions but non-virtual destructor" warnings) an passes all of make test.
22:40 NotFound darbelo: good
22:41 darbelo Apparently, I installed my development tools from a corrupt archive, but never did enough c++ coding to notice.
22:41 NotFound darbelo: the warning are pointless because it never destructs anything. It uses a 'infinite memory' garbage collector ;)
22:42 darbelo So, it leaks like a sieve and *likes* it?
22:42 darbelo Makes for straightforwad code I guess...
22:42 Austin The inf gc has a certain performance bonus...
22:43 NotFound darbelo: yes, the compiler has a short live, the driver calls it an gets the pir result.
22:45 NotFound The plan was to use some smart pointer, but that way will force to use a c++ 0x compliant to some degree or force to install boost. This way is more portable.
22:45 dalek kakapo: e98c9a7 | austin++ |  (2 files):
22:45 dalek kakapo: Force Mimus::Maker to get methods from all parent classes.
22:45 dalek kakapo: Signed-off-by: Austin Hastings <Austin_Hastings@Yahoo.com>
22:45 dalek kakapo: review: http://gitorious.org/kakapo/kakapo/commit​/e98c9a79788e56c0187f5c119dd987fe99abd9ce
22:46 Whiteknight joined #parrot
22:46 darbelo For a bootstrap stage, I'm all in favor of portablity over 'correctness'.
22:46 NotFound Yeah
22:47 darbelo I'm guessing you mean for the bootstrapped compiler to be the main one.
22:48 NotFound Yes, but the speed difference with the stage 0 is high. Need more thinking.
22:50 kurahaupo joined #parrot
22:51 NotFound Welcome to the Winxed user's club, BTW ;)
22:52 darbelo 'user' is an overstatement. I haven't even learned the syntax yet!
22:53 NotFound Feel free to ask.
22:55 Austin What is src/dynoplibs/math.ops?
22:55 Austin Is that available by default, or do I have to jump through hoops?
22:55 NotFound The idea is that anyone with rudiments of javascript and knowledge of pir should easily understand the parrot related examples.
22:55 Austin .loadlib math_ops
22:57 NotFound Austin: t/dynoplibs/math.t looks like that, yes.
22:59 Austin Do I have to dlfunc the functions, or does the loadlib take care of that for me? (They're ops, in this case.)
22:59 darbelo Austin: loadlib does the trick.
22:59 Austin Walkin' a mile to get a random number...
23:00 NotFound I think the .loadlib directive takes care of the underground work.
23:00 Austin I hope that's an opcode, not a directive.
23:01 NotFound Don't know, the internals of dynops are black magic for me.
23:02 darbelo Austin: opcode, it's defined in src/ops/core.ops
23:03 NotFound I suppose pir needs the directive form to be able to parse the opcodes.
23:04 darbelo Not really.
23:04 darbelo I've always used it as $P0 = loadlib "lib"
23:06 Austin We'll find out in just a sec. Anyone got a good test case for Array.unsort?
23:06 darbelo [ 1,2,3,5 ] ?
23:11 Austin Problem with changing algorithms in midstream is all those declared variables with the wrong name...
23:13 Austin Well, that isn't working.
23:13 Austin Apparently there's more to be done to get dynamic ops working.
23:13 Austin :(
23:16 darbelo Austin: can you show what code isn't working?
23:17 Austin darbelo: It's the .loadlib directive
23:17 Austin I'm doing nqp, not pir, so there's no way to generate a directive.
23:18 Austin I can get nqp to emit the rand opcode, but that doesn't work because the whole loadlib thing happens at pir-compile time, I guess.
23:18 darbelo And using the loadlib opcode doesn't work?
23:19 Austin darbelo: right. It loads the library, but doesn't do whatever magic is required to make the opcodes work
23:27 darbelo Hmm. The opcode form only works with dynpmcs becouse those don't need to tell IMCC about syntax changes.
23:27 hercynium joined #parrot
23:32 darbelo Austin: But having dynops inaccesible from NQP feels wrong. You should consider asking pmichaud about that.
23:37 Austin ?
23:38 Austin I didn't understand the part about no syntax changes... isn't a dynop a syntax change (new opcode#, new string to parse, whatever)?
23:38 darbelo Yes, dynpmcs don't add any opcodes so they work without needing a directive.
23:39 darbelo I just realized all of my loadlib uses were for dynpmcs, not dynops.
23:39 darbelo That's why I though it worked.
23:39 Austin Ahh, here we go. The directive loads the lib at compile time, the opcode loads it at runtime.
23:40 darbelo Yeah.
23:42 pmichaud if it's not loaded at compile time, imcc doesn't recognize the opcode
23:43 pmichaud ooc, what happens if one does  Q:PIR { .loadlib "math" } ?  Does imcc require .loadlib directives to be outside of Parrot subs?
23:44 darbelo Yep. .loadlib inside a sub bails out.
23:44 pmichaud ouch.
23:44 pmichaud I'm going to guess that we need some special handling in NQP to be able to tell Parrot to .loadlib
23:44 pmichaud I'm not sure what that should look like
23:45 Austin #pragma loadlib ?
23:45 darbelo 'use' with a fake namespace root?
23:46 pmichaud well, I'd like it to be perl 6 syntax.  'use' might work.
23:46 Austin A special block
23:46 Austin like INIT { }
23:47 pmichaud along a similar vein, I'd like there to be a way to specify .HLL within NQP
23:47 pmichaud haven't figured that one out yet either, but the syntax involved is likely similar
23:47 pmichaud might end up being a specialized pir:: pseudo-op, or something similar.
23:52 s1n left #parrot

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

Parrot | source cross referenced