Camelia, the Perl 6 bug

IRC log for #parrot, 2010-03-21

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:05 M_o_C joined #parrot
00:06 Whiteknight I was just talking to my dog about TT #389. He says i'ts a government conspiracy
00:06 Whiteknight it's funny, I didn't think I had a dog
00:13 M_o_C left #parrot
00:14 fperrad_ joined #parrot
00:25 fperrad joined #parrot
00:29 arnsholt joined #parrot
00:31 arnsholt Is docs/pct/*.pod the up-to-date place to look for info on implementing a new language on Parrot?
00:31 arnsholt I'm trying to follow gettingstarted.pod but it doesn't quite seem to jive with the SVN copy I checked out
00:33 fperrad_ joined #parrot
00:33 Whiteknight arnsholt, it's probably all out of date
00:33 arnsholt That's what I was afraid of
00:34 arnsholt Is any of the other compilers in compilers/ a better guide than the others as to how I should go about things?
00:34 arnsholt (Or some other document I should read)
00:34 Whiteknight best bet is to find a working one, follow the examples, and ask questions here
00:35 patspam joined #parrot
00:35 arnsholt Righties
00:38 davidfetter joined #parrot
00:39 arnsholt Is tools/dev/create_language.pl or mk_language_shell.pl the one to use?
00:40 sorear mk_language_shell.pl is the one I know about
00:40 Tene the former is *more* up-to-date, at least
00:40 arnsholt I'll try that then
00:42 arnsholt Yeah, this looks more like what I expected
00:44 patspam joined #parrot
00:44 japhb Infinoid, I *assume* (perhaps wrongly) that you can glean the branch from the feed, because it's definitely not feed-per-branch; my request was triggered by pushes to different branches both showing up.
00:45 japhb Infinoid, at worst you could probably inspect the proper place in the URLs for the files changed, since gitorious should have a standard URL structure.
00:46 japhb fperrad, I'm in the process of moving things around in the repo to prepare for installs (like changing the top-namespace Util module to Plumage::NQPUtil)
00:48 japhb sorear, I remember that patch now.  I hadn't given it my +1 because someone with more knowledge of the C code in that section had beaten me to it and I didn't want to just AOL.  But FWIW, +1 from me.
00:48 japhb OK, anyone else waiting for an answer from me?
00:49 Tene japhb: I am!
00:49 japhb Tene, Ah, sorry, what's up?
00:49 sorear japhb: You should have gotten a copy, unless I sent it to the wrong Geoffrey Broadwelle
00:49 Tene japhb: No, I'm really not.  I'm just harassing you.
00:49 japhb sorear, that's what I was referring to.  As soon as I saw the cover letter on the patch, I recognized it right off.
00:50 japhb Tene, I had a feeling you might be, but hey, I lose nothing for taking you at your word.  Except perhaps a few sanity points.  :-)
00:50 Tene That's exactly the damage I try to go for. :)
00:50 japhb Nice.  :-)
00:50 plobsing japhb: do you have any recommendations for examples for parrotncitut?
00:51 plobsing the only commonly known, simple callback interface I can think of is qsort
00:52 japhb plobsing, I think parrotncitut should contain a range from simple C calls with primitive type arguments and return value, expand to handling pointer args and/or returns, then what to do with structs & buffers, and only *then* approach callbacks.
00:53 japhb Some of the simple stuff can just be explaining the code in the NCI tests -- because it's the simple stuff that's covered there.
00:53 japhb well, some of the code, I mean, it would get bloody repetitive to explain it all.  :-)
00:53 japhb Just extract a couple variants at different "complexity levels" and explain them.
00:53 japhb EOL
00:53 plobsing japhb: yes, but I'm trying compile a consistent set of examples. I don't want it to be a dog's breakfast.
00:54 japhb Or a pig's ....
00:56 japhb For callbacks, unfortunately most of them that I know about either A) are related to event handling, which is a whole 'nother slop trough, or B) are complex enough in and of themselves that the API in question would overwhelm the person just trying to learn the NCI bits.
00:56 japhb Sort routines, as you point out, are a decent exception.
00:57 japhb Sadly, the base C library ones don't work with our NCI callbacks, because they don't include an opaque data pointer.
00:57 japhb er, *user data pointer
00:58 sorear you could just use a TLS variable
00:58 japhb sorear, threads != interpreters
00:58 japhb And it's the interp that we want to capture
00:59 sorear threads == threads
00:59 plobsing sorear: it comes down to a problem of C not supporting closures
00:59 sorear there is at most 1 current qsort invocation per thread
00:59 sorear so if you store the current callback userdata in a tls variable, it will work for qsort
00:59 sorear save the old value if you recurse
00:59 sorear like a P6 contextual
00:59 sorear plobsing: yes
00:59 plobsing sorear: that may be for well behaved functions like qsort, but other libraries (GUIs for example)  hold onto the callback for later
01:00 plobsing if I hand off 3 callbacks to gtk and it calls back later, how do I know which callback was invoked?
01:00 japhb And we're train people into habits that will work across the board (as much as we can).
01:00 sorear I think the best way is to ask the NCI to spit out a freshly generated function that binds the interpreter
01:00 theory joined #parrot
01:00 sorear plobsing: Indeed :(
01:00 japhb sorear, but serious points for thinking of a way to make that hack work.
01:01 sorear unfortunately, the NCI doesn't have an actual code generator on all platforms
01:01 japhb sorear, that is *exactly* what we really want NCI to be able to do.  But until we have a JIT/FFI library, we can't.
01:01 japhb Several generations of Parrot hackers (including me) have tried to figure out a portable way to do that in pure C, and it's basically insane.
01:02 plobsing and in general, I don't think we ever want to *require* a JIT/FFI library. That excludes platforms.
01:02 dalek rakudo: 5edcafa | jonathan++ | src/ (3 files):
01:02 dalek rakudo: Get parsing of hyperops, including transparency of precedence, implemented. Stub in the various &hyper multis. Implement the very simplest case.
01:02 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​edcafaaabbe47975959a37ca007a83f6a0b6f8b
01:03 sorear parrot already excludes platforms... it's well over the minimum maxima for many C features
01:03 dalek parrot: r45071 | chromatic++ | branches/pcc_hackathon_6Mar10/src/ops/core.ops:
01:03 dalek parrot: [ops] Tidied code; no functional changes.
01:03 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45071/
01:03 dalek parrot: r45072 | chromatic++ | branches/pcc_hackathon_6Mar​10/src/pmc/callcontext.pmc:
01:03 dalek parrot: [PMC] Tidied code; no functional changes.
01:03 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45072/
01:03 japhb plobsing, a platform that cannot do JIT/FFI simply can't have thread/interpeter-safe GUI-style event callbacks.
01:03 japhb ... like, say, memory usage.  ;-)
01:04 abqar joined #parrot
01:04 plobsing japhb: that's only true if it doesn't supply userdata
01:05 sorear and word size (32+), program size (3 MiB code segment in this libparrot.so.2.2.0
01:05 japhb plobsing, OK, sure.  Let's say -- there are a lot of APIs that hold onto callback pointers for extended periods that those platforms will not be able to use safely.
01:05 sorear we can do portable FFI on any platform with cc and dlopen
01:06 sorear that's all POSIX.2008 at least
01:06 japhb I'm trying to imagine a platform that could conceivably hold something as complex as the Parrot VM that does not have 32-bit or larger words
01:06 sorear japhb: the 286
01:07 sorear not that anyone cares at all about 286 compatibility any more, because the 386 is software compatible and available everywhere
01:07 sorear but the 286 has 16 bit instructions *only* and a maximum physical address space of 16 MiB
01:07 japhb I don't think there is a 286 that could actually compile Parrot.  :-)
01:09 japhb Anyway ... I haven't even seen a 286 in *decades*.  I've seen working Commodore 64's much more recently.  :-)
01:10 dalek tracwiki: v53 | cotto++ | ParrotQuotes
01:10 dalek tracwiki: http://trac.parrot.org/parrot/wiki/Pa​rrotQuotes?version=53&action=diff
01:11 Austin Heh.
01:11 Austin I've got a 386/25 I'm about to discard...
01:11 * japhb trips across strverscmp(3) ... *chuckle*
01:13 sorear GNU brain damage ftw
01:13 japhb "Because if there just aren't enough features ... add 10 more."
01:14 sorear the GNU project loves their monolithic design... we need this in our libc so that the Hurd package manager can use it
01:14 Austin Heh. They're learning from Parrot.
01:14 plobsing libc is hardly the worst offender. Take a look at "man cat"!
01:15 japhb heh
01:15 Austin Mmm... PCT Tree matching...
01:16 sorear Is there any documentation on the PCC data structures floating around?  (PDD 03 only covers accessing PCC from PIR; I want to write a varargs C function)
01:16 snarkyboojum_ joined #parrot
01:16 patspam joined #parrot
01:18 cotto What'd be the right way to organize code for testing the profiling runcore?
01:19 cotto Hmm.  It may be best to write all in one place and divide it up later.
01:24 Austin How would you test the profiling runcore, anyway?
01:24 Austin Run a bunch of code, and then assert that the counts for various opcodes were right?
01:26 cotto http://trac.parrot.org/par​rot/wiki/TestingProfiling
01:27 cotto That's more of a scratch pad than a coherent strategy though.
01:32 Austin Ahh, I see you refer to the "Name" document...
01:34 cotto ?
01:34 Austin Heh.
01:34 Austin The profiling.pod reference is a joke?
01:34 cotto It's a real file.
01:35 Austin It's one page long and describes three environment variables.
01:35 patspam joined #parrot
01:36 dalek parrot: r45073 | cotto++ | trunk/docs/running.pod:
01:36 dalek parrot: [docs] add profiling runcore to running.pod
01:36 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45073/
01:36 dalek parrot: r45074 | cotto++ | branches/profiling_testing:
01:36 dalek parrot: new branch for testing the profiling runcore
01:36 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45074/
01:36 Austin Do you have a different version in a branch, somewhere?
01:37 cotto Nope.  I could make that more skimmable though.
01:38 Austin Oh. I was looking for the solution to the randomness.
01:39 cotto It's at the bottom
01:39 Austin ?
01:40 Austin The bottom of docs/dev/profiling.pod is a description of the PARROT_PROFILING_ANNOTATIONS variable
01:41 cotto I added it fairly recently.
01:41 Austin Ahh, so it's not in 2.2?
01:41 Austin My bad.
01:41 cotto http://trac.parrot.org/parrot/bro​wser/trunk/docs/dev/profiling.pod
01:43 dalek tracwiki: v6 | Austin_Hastings++ | TestingProfiling
01:43 dalek tracwiki: http://trac.parrot.org/parrot/wiki/Test​ingProfiling?version=6&action=diff
01:43 dalek tracwiki: v16 | cotto++ | CottoTasklist
01:43 dalek tracwiki: http://trac.parrot.org/parrot/wiki/Cot​toTasklist?version=16&action=diff
01:43 dalek tracwiki: v7 | Austin_Hastings++ | TestingProfiling
01:43 dalek tracwiki: http://trac.parrot.org/parrot/wiki/Test​ingProfiling?version=7&action=diff
01:43 Austin Ahh, there it is.
01:43 Austin cotto++
01:44 * Austin is sorry he ever doubted you...
01:44 cotto thanks for the edit
01:44 cotto Austin++
01:45 Austin Speaking as an HLL guy, I want to know two things. (1) How often do I call a sub, and (2) how much does it cost?
01:45 Austin That's a post-processing of the dump format you've already described.
01:45 cotto yup
01:45 Austin As far as I'm concerned, if you give me that, then it already works.
01:46 cotto There's plenty of room for improvement.  The postprocessed output for Callgrind can be useless for large programs.
01:46 Austin Heh
01:47 Austin Just needs more post-processing... :)
01:51 arnsholt A bit off-topic, but does anyone know of a sane way to get to read ISO/IEC standards, without pawning off your firstborn?
01:54 Austin Heh. Google is your friend.
01:54 Austin Which standad?
01:54 Austin *standard?
01:55 Austin Many of them are available as "draft" versions which differ pretty much only in the date from the published standard.
01:59 joeri left #parrot
02:03 arnsholt Austin: In this case, the Prolog one
02:03 arnsholt But the draft is a good suggestion
02:03 * arnsholt goes digging
02:03 patspam joined #parrot
02:04 snarkyboojum joined #parrot
02:10 sorear In some cases, you can get free copies of the actual standards from sister organizations
02:10 sorear the ANSI terminal escape code spec is available for free from ECMA
02:11 sorear The Open Group hosts a free version of POSIX.1
02:14 arnsholt Nice tricks those
02:14 arnsholt I found a draft of the Prolog standard which should suffice
02:21 Austin Ahh, my old nemesis "Could not build C3 linearization: ambiguous hierarchy" ... we meet again...
02:32 patspam joined #parrot
02:55 cotto Looks like Env is broken in nqp.
02:55 Austin How so?
02:56 nopaste "cotto" at 96.26.227.153 pasted "Env broken in nqp" (15 lines) at http://nopaste.snit.ch/20020
02:57 Austin Coder error. Use env{} instead of []
02:57 Austin say( pir::new__PS('Env'){'PATH'});
02:57 Austin WFM
02:58 cotto Yay!
02:58 cotto Austin++
02:59 Whiteknight Austin is fantastic
03:00 Austin No, that's DangerMouse...
03:02 Austin http://www.youtube.com/watch?v=​UE7WrEidvyY&feature=related
03:02 Whiteknight can anybody explain to me why the pcc branch hasn't merged yet? If I remember correctly, it was passing all tests last tuesday
03:02 parthm joined #parrot
03:03 cotto It might have something to do with nobody having merged it.
03:03 Austin Plus, this isn't tuesday..
03:06 Whiteknight in scrollback, it looks like chromatic just made two commits to it tonight
03:28 cotto there are always more cleanups to be done
03:35 sorear signatures and activation records are both represented by CallContext?
03:39 chromatic joined #parrot
03:39 chromatic The PCC branch needs a new opcode to fix the result_info tests.
03:42 * sorear thinks he finally understands PCC
03:42 nopaste "chromatic" at 173.50.130.127 pasted "whiteknight: use fixed size storage for STRINGs" (100 lines) at http://nopaste.snit.ch/20021
03:48 chromatic Hm, where'd he go?
03:49 sorear he left 27 min ago
03:51 Austin Mmm... if this is Saturday, it must be a bug...
03:53 patspam joined #parrot
04:02 dalek parrot: r45075 | chromatic++ | trunk/src/gc (3 files):
04:02 dalek parrot: [GC] Tidied code; no functional changes.
04:02 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45075/
04:05 cotto What is is abou the html for the synopses that makes a search freeze Firefox for several seconds.
04:05 Austin They're long
04:05 Austin And ff searching sucks balls.
04:05 cotto They're not that long.
04:06 cotto they do seem to trigger a nice pathological case
04:06 dalek TT #1520 created by Austin_Hastings++: P6metaclass cannot derive from already-`register`ed PMC type
04:06 dalek TT #1520: http://trac.parrot.org/parrot/ticket/1520
04:08 patspam joined #parrot
04:10 Austin Have a look at the source of one of the pages.
04:19 sorear no, wrong, pcc isn't clear to me
04:20 cotto That would have been suspiciously quick.
04:23 sorear you'd think that for something as central as PCC there would be some clear example code
04:23 Austin There is. $_SRC/call
04:23 sorear I've read that; it doesn't count as "clear"
04:24 sorear (for me, yet, yadda yadda)
04:25 parthm left #parrot
04:26 Austin Yeah, every time I go there, I start wishing for a requirements document...
04:30 sorear all I want is example code for - in C - passing slurpies, taking slurpies, returning slurpies, expecting slurpies
04:30 sorear all the documentation I can find thinks that I know my argument types
04:34 Austin Slurpies are RPAs or Hashes.
04:34 Austin With the slurpy bit
04:36 Austin You sure you're not looking for:  Parrot_pcc_build_sig_object_from_varargs ?
04:38 sorear I'm not sure of anything.
04:39 Austin What simple thing are you trying to do?
04:39 Austin (And note: anything with a slurpy in it isn't really simple..)
04:40 sorear Take an arbitrary number of "P" arguments, and pass them all to Perl_call_sv
04:40 sorear Take an arbitrary number of return values from Perl_call_sv and pass them to a RetContinuation
04:40 sorear Take an arbitrary number of arguments in a Perl->C callback and pass them to VTABLE_invoke
04:41 sorear Receive an arbitrary number of returns from that and send them back to Perl
04:42 sorear I don't claim to know what the best approach here is
04:42 Austin Is that C to C, or PIR to C ?
04:43 sorear Is what?
04:44 Austin The calls you want to make.
04:44 Austin An arbitrary number of P args -> Perl_call_sv
04:44 sorear The calls I want to make are
04:44 sorear er
04:44 janus joined #parrot
04:45 sorear Perl_call_sv is part of the Perl 5 API.  I know how to feed it an indeterminate set of arguments.
04:45 sorear At the end of the day, I'm going Parrot (->) C -> Perl 5 and Perl 5 -> C (->) Parrot
04:45 sorear the parenthesized boundaries are where I'm confused
04:45 purl You won't be after this episode of Soap!
04:49 Austin What does Perl_call_Sv do?
04:49 Austin Does it take a "name of the perl code to call" type argument?
04:50 sorear no
04:50 sorear the perl5 vm is stack based
04:51 sorear you push SVs (basically P5 PMCs) onto it, then you do call_sv(the_sub_sv, flags)
04:51 sorear so if I can just iterate over all passed arguments, I'm fine for callin arguments
04:52 sorear for callback arguments and return values, I can iterate over the stack return values, and then I need to push them onto a Parrot call somehow
04:53 Austin Okay..
04:53 Austin And you're in C, on the Parrot side of the fence?
04:54 sorear yes
04:54 Austin So you want to get a single RPA (ResizablePmcArray) with all the args in it..
04:55 sorear or something that I can access like one, yes
04:55 sorear and I want to get a RPA for all the return values after VTABLE_invoke
04:55 Austin You want Ps
04:55 Austin as a signature
04:55 sorear I want an infinite number of Ps, right
04:56 sorear how do I say that
04:56 Austin Ps
04:56 sorear oh
04:56 Austin The "s" stands for slurpy
04:56 Austin Do a perldoc of call/pcc.c
04:57 sorear mm
05:01 sorear odd, it doesn't look like Parrot_pcc_build_sig_object_from_varargs even implements slurpy return or named arguments
05:01 Austin Heh
05:02 Austin I think that make the bizarre assumption that you know the args at the C level, and so decode the va-list entirely into an array.
05:02 Austin As opposed to building something that wraps the va-list.
05:03 Austin (Which would probably have to be a pmc type)
05:04 Austin Here's a "vision check" question: How is your stuff going to be used from parrot?
05:04 sorear (define (hello) (some-perl5-function "Moo"))
05:05 Austin Will the perl stuff have names, or be called as "here's a string of perl code" or what?
05:05 sorear for the most part, I plan to use PMCs to wrap P5 CODE references (like Sub.pmc)
05:06 sorear and these PMCs will implement invoke and be passed around
05:06 Austin Okay. So you're making a kind of P5sub pmc?
05:06 sorear yes
05:06 Austin So your invoke vtable gets called, with whatever args.
05:06 Austin That's positively simple..
05:07 sorear the Parrot arguments -> Perl5 arguments case is already done for me by jonathan++, but it's ancient code from back when you handled PCC by hand-banging structure fields
05:07 sorear I just need to handle the other three cases
05:07 sorear and I'm kinda stuck
05:07 sorear yes
05:07 sorear invoke vtable gets called
05:09 sorear what next?
05:11 kthakore joined #parrot
05:11 cotto It's really nice to be able to throw out a grammar at any point and tell nqp-rx "parse the string with this grammar and give me the match".
05:12 sorear PARROT_CANNOT_RETURN_NULL
05:12 sorear static void
05:12 sorear dissect_...
05:12 sorear is this wrong?
05:13 chromatic Looks wrong.
05:13 cotto quite
05:13 sorear src/call/args.c :736
05:14 Austin You need to do what get_params does, whatever that is.
05:15 sorear exactly
05:15 sorear I can't figure out what get_params et al are doing
05:15 sorear or how to do it without an opcode
05:16 chromatic Why are you doing this the hard way and not using NCI to wrap Perl_call_sv?
05:19 Austin get_params asks the interp for a signature, presumably based on whatever is in the sub pmc. I think you would specify your own signature (Ps->Ps) explicitly. Otherwise, you can probably copy/paste all the code up to fill_params_from op. I don't know if there's a different form (different than 'from_op') you need to use as a pmc.
05:19 sorear because Perl_call_sv is a macro
05:20 sorear and I have to set up the calling environment for it with other macros
05:20 chromatic Right, I forgot that Perl 5 doesn't have an API.  Sorry.
05:21 Austin Sounds like they do have an API - it's just a C-only api...
05:21 chromatic It's a C-only-provided-your-precompiler​-works-the-same-way-as-we-expect API.
05:22 chromatic Granted, not everyone yet agrees that API means "a .so with documented entry types and opaque pointers usable without having to install a C compiler", but give me six months.
05:22 chromatic Regardless, the hard way of invoking Perl 5 subs from Parrot is to write your own PCC to P5CC thunk marshaller/demarshaller.
05:23 chromatic The easy way is to use NCI which already knows how to marshall to and demarshall from CCC.
05:23 Austin So if he writes a C function that ... ?
05:23 sorear Except that, in order to write a CCC to P5CC thunk marshaller/demarshaller, I would need a full FFI.
05:23 sorear So I'm actually even worse off.
05:25 sorear Austin: yeah, the problem is that the fully featured args code requires it have an op available to interrogate.
05:27 sorear chromatic: and the NCI can't handle variable length argument and return lists at present anyway
05:29 Austin sorear: But the reason for the op is to provide the signature. You already *know* your signature, so you don't need it.
05:30 sorear Austin: there are 2 versions of the codepath.  The one that takes a const char * can't handle slurpies, the one that takes an opcode_t * can
05:31 Austin ?
05:31 Austin This is core.ops::get_params?
05:31 Austin Because the only fork in that code path is for tailcalls.
05:32 sorear if you look at core.ops::get_params, you'll see that it passes an opcode_t* to Parrot_pcc_fill_params_from_op
05:32 sorear I can't call that function because I don't have an opcode_t*
05:32 sorear Parrot_pcc_fill_params_from_op does not share much code with the C PCC API
05:32 sorear and has a different set of features
05:32 Austin Okay.
05:33 Austin The raw_params for you would be a single pmc register, since that's where the slurpy would go.
05:33 sorear raw_params has type opcode_t*
05:33 sorear are you telling me to cast a pmc to that type
05:33 Austin Here's a question: What if you wrote the vtable in pir, and then nci-called with a single (RPA) parameter?
05:33 sorear because I don't think it will work
05:34 Austin (cast a pmc: no)
05:34 sorear Austin: that
05:35 sorear Austin: that's a very good question.
05:36 Austin .sub invoker :vtable('invoke') ; .param pmc pos :slurpy ; .param pmc named :named :slurpy ;  ... blah blah NCI(pos, named) blah blah .return ; .end
05:36 sorear yes
05:37 sorear I think it would mean rewriting most of this binding though, and it's not mine to rewrite; I'll forward your idea to jonathan
05:37 cotto How do I tell prove how to run a test script?  I've got an nqp test that spits out TAP output but prove just sits there when I try to run the script with it.
05:38 Austin Maybe you need the test to be executable.
05:38 Austin edit the #! line and chmod+x it?
05:38 chromatic +x shouldn't matter
05:38 Tene try using -e
05:38 Austin No?
05:39 chromatic I can't recall anything in Test::Harness that checks -x.  I do know it checks the #! line.
05:40 Austin so maybe prove -e parrot-nqp
05:40 Austin WFM
05:40 Austin prove -e parrot-nqp t/Program.nqp
05:40 cotto I know what was happening.  It was using my installed parrot-nqp, which is spitting out its opcodes to a file.  It was running, just really slowly.
05:40 Austin Heh
05:41 sorear joined #parrot
05:41 cotto I've been running rakudo's spectest all day.  the log is up to 25G.
05:41 * cotto is glad for his external usb hdd
05:42 * Austin coughs!
05:49 cotto Is there an easy way to import subs from another namespace in nqp?
05:49 Austin With, or without, using kakapo?
05:49 cotto without
05:49 Austin NameSpace pmc's offer an export_to method.
05:51 Austin Also, the 'parrot' language defines an import/export protocol, if you're going to be doing much of this. That requires creating $namespace/EXPORT/ALL subnamespace, etc. but the code does it for you.
05:51 Austin See runtime/language/parrot
05:51 cotto it's just for using Test;More in nqp
05:51 Austin ?
05:52 sorear did I miss the Answer?
05:52 cotto using plan(2); instead of Test;More;plan(2);
05:53 Austin http://gitorious.org/kakapo/kakapo/blobs/​master/t/bootstrap/UnitTest/Testcase.nqp
05:53 Austin See the init block at the top
05:54 cotto That's what I was hoping for.  Austin++
05:57 dalek parrot: r45076 | cotto++ | branches/profiling_testing (3 files):
05:57 dalek parrot: [profiling] commit some initial profiling testing code, doesn't test anything meaningful yet
05:57 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45076/
05:57 Tene Austin: actually, there's some confusion over the import/export protocol.  NQP actually defines and installs a compiler with compreg for the 'parrot' language that has a different API
05:58 Austin Heh.
05:58 Tene I was going to work on figuring all that out, but then other stuff happened.
05:59 Austin Yeah, I know the feeling. FWIW, I'm pretty sure the perl model is insufficient..
05:59 Tene Any feedback you have would be great.  japhb has mentioned a few things that plumage will need that aren't supported anywhere.
06:00 Tene I sleep now.  Might be around tomorrow.  Don't count on it.  :(
06:00 Austin Mainly it's just that the namespace boundaries don't correspond with file boundaries. And sometimes I want to import something that is already loaded.
06:01 Austin Okay, tene. Have a good night.
06:01 Tene "import something if it's loaded, but don't trigger loading if it isn't" was added by pm's API
06:03 sorear I've already come up with a few things Blizkost needs
06:03 sorear they're pretty small though
06:03 Austin sorear: You mean for importing pbc, or in general?
06:03 sorear I think that PDD-31 will be much better understood once it's actually happening
06:05 Austin Hmm.. And now I have a tree matching library.
06:06 Austin Kakapo grows one step closer to total world domination...
06:06 Austin I should probably add a windowing UI...
06:06 sorear Is it just me, or is PIR trying to replace Perl 6?
06:07 chromatic Just you.
06:07 * sorear imagines writing apps with PIR and Kakapo
06:08 Austin Forget pir, man. It's NQP and Kakapo
06:08 purl Austin, I didn't have anything matching pir, man. it's nqp and kakapo
06:08 Austin Thanks, purl
06:08 eternaleye joined #parrot
06:19 dalek kakapo: d0ab692 | austin++ |  (8 files):
06:19 dalek kakapo: * Added Matcher::P*T::Node modules in src/Matchers/PctNodes.nqp - for tree matching.
06:19 dalek kakapo: * Made P6metaclass smarter about defining attribute accessors.
06:19 dalek kakapo: * Added global 'hash' function
06:19 dalek kakapo: Signed-off-by: Austin Hastings <Austin_Hastings@Yahoo.com>
06:19 dalek kakapo: review: http://gitorious.org/kakapo/kakapo/commit​/d0ab69202ee84b289f26b0709415dd32b42f8d43
06:32 payload joined #parrot
06:41 dalek kakapo: d0a927e | austin++ |  (3 files):
06:41 dalek kakapo: Added Integer::int global function.
06:41 dalek kakapo: Signed-off-by: Austin Hastings <Austin_Hastings@Yahoo.com>
06:41 dalek kakapo: review: http://gitorious.org/kakapo/kakapo/commit​/d0a927e73cc5b9b7ab2f8a1b09da28812427f7e1
07:17 sorear Adding dynops is relatively cheap, right?
07:18 cotto What do you mean by "adding"?  runtime cost?
07:18 sorear I mean loading a library that provides them
07:19 cotto I'd never thought to profile that.  it's an interesting question.
07:21 sorear I mean, I was thinking I would use dynops instead of the NCI to bind some code, because it's simpler that way, and I'm wondering if it will tank load performance
07:22 cotto You can go the simpler route now and switch to NCI later if performance isn't acceptable.
07:22 sorear right
07:28 cotto It doesn't appear to be very expensive.
07:29 cotto night
07:34 dalek parrot: r45077 | chromatic++ | trunk/ext/Parrot-Embed/Build.PL:
07:35 dalek parrot: [ext] Made Parrot::Embed compile and link against Parrot when built in-tree.
07:35 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45077/
07:35 dalek parrot: r45078 | chromatic++ | trunk/ext/Parrot-Embed (2 files):
07:35 dalek parrot: [ext] Fixed Parrot::Embed to use current embedding API; temporarily commented
07:35 dalek parrot: out some tests that need debugging.
07:35 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45078/
08:01 rt7 joined #parrot
08:13 sorear Is there any deep reason why you can't use NQP for vtable overrides?
08:17 moritz sorear: probably because NQP tries to be a Perl 6 subset, and Perl 6 has no notion of vtables...
08:17 moritz sorear: maybe one could come up with a trait syntax still
08:17 moritz something like method foo() is :vtable<get_string> { ... }
08:17 moritz but I have no idea how hard that would be to implement
08:33 sorear IMO NQP should be like Perl--
08:33 sorear C-- is a superset of C in a few places...
08:44 Austin sorear: Not only can you use nqp for vtable overrides, I've done it.
08:44 Austin It's very easy.
08:45 Austin (NOTE: The override you're doing may require a lot of work. But the NQP part is trivial.)
08:45 sorear How, then, do you do it?
08:48 Austin bide.. url coming
08:49 Austin http://gitorious.org/kakapo/kakapo/blobs/​master/src/Cuculinae/Cuculus.nqp#line140
08:49 Austin See line 155 in particular
08:50 Austin The has_vtable sub is here: http://gitorious.org/kakapo/kakapo/blobs/m​aster/src/Classes/P6metaclass.nqp#line231
08:51 Austin You should be able to load_bytecode('P6object.pbc') and then use that sub, since I don't think it depends on any other Kakapo code.
08:52 Austin But the "add_vtable_override" code is a built-in method on Class.pmc, so you can just call it from PIR, etc.
09:06 bacek joined #parrot
09:06 bacek aloha
09:06 bacek seen chromatic
09:06 purl chromatic was last seen on #parrot 2 hours, 59 minutes and 41 seconds ago, saying: Just you.
09:13 dalek parrot: r45079 | bacek++ | branches/pcc_hackathon_6Mar10/​lib/Parrot/Pmc2c/Attribute.pm:
09:13 dalek parrot: Low-hanging fruite for 3% performance improvements: reorder GETATTR macros to favour non-objects.
09:13 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45079/
09:13 dalek parrot: r45080 | bacek++ | branches/pcc_hackathon_6Mar10 (5 files):
09:13 dalek parrot: Remove CallContext.results_signature. It's not used anymore
09:13 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45080/
09:13 dalek parrot: r45081 | bacek++ | branches/pcc_hackathon_6Mar10/src/call/args.c:
09:13 dalek parrot: Poke in CallContext.num_positionals directly. Yet another little bit performance improvement.
09:13 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45081/
09:16 sorear bacek: Is it possible to, from C, call a Parrot function which returns an unknown number of values and get them all back as an array?
09:16 bacek sorear, yes. Use RPA for returns.
09:17 bacek something like Parrot_ext_call(..., "Ps->Ps", args, returns);
09:17 bacek where C<returns> is RPA
09:18 sorear I'm reading the Parrot_pcc_build_sig_object_from_varargs and it looks like there's no parsing for adverbs on the RHS
09:18 bacek (and, in this case, C<args> is RPA as well)
09:18 bacek there is not
09:18 sorear worth me trying to fix it?
09:19 sorear or deliberate omission?
09:19 bacek Check pcc_hackatron branch
09:19 bacek We reordered ops to be little bit more "natural"
09:20 sorear how do I switch branches in svn?
09:20 bacek sorear, no idea. I'm using git-svn
09:21 sorear good idea, I should do the same
09:21 sorear it'll at least make this whole pending patches thing less irritating
09:21 bacek There is semi-official git clone of parrot svn by dukeleto.
09:21 bacek You can try it
09:22 bacek http://github.com/leto/parrot
09:22 bacek This one
09:22 sorear ty
09:33 sorear bacek: so, when can I start depending on pcc-hackathon-6Mar10?
09:34 bacek in couple of hours
09:34 sorear ooooooh
09:34 moritz bacek++ is our mad coding machine :-)
09:34 bacek Or, officially, from 2.3
09:35 iblechbot joined #parrot
09:35 sorear well, my code won't work on 2.2.1 anyway
09:35 moritz rakudo can require it as soon as it's merged into trunk/master
09:35 sorear it depends on a patch that japhb has promised to review "tonight"
09:36 sorear (the RTLD_GLOBAL binding, if you follow -dev@)
09:40 bacek moritz, can you try rakudo at r45082?
09:41 moritz bacek: is that in the branch?
09:41 bacek yes
09:41 moritz bacek: i have a few things running atm, but once they are through I can try
09:42 bacek moritz, ok
09:46 dalek parrot: r45082 | bacek++ | branches/pcc_hackathon_6Mar10 (3 files):
09:46 dalek parrot: Implement op set_result_info
09:46 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45082/
09:52 dalek TT #1511 closed by bacek++: op result_info is broken in pcc_hackatron branch.
09:52 dalek TT #1511: http://trac.parrot.org/parrot/ticket/1511
10:11 he_ joined #parrot
10:19 dalek parrot: r45083 | bacek++ | branches/pcc_hackathon_6Mar10 (55 files):
10:19 dalek parrot: Sync branch with trunk.
10:19 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45083/
10:20 moritz bacek: sshould I try rakudo on r45083, or on something older?
10:22 bacek moritz, I have locally merged branch. As soon as you'll give "green light" on Rakudo I'll dcommit it
10:23 moritz bacek: ok
10:24 bacek 45083 is preferable
10:24 bacek It's merged trunk with branch
10:24 moritz that's what I'm build rakudo on right now
10:26 bacek moritz, ok
10:28 dalek rakudo: e877b2a | (Solomon Foster)++ | src/Perl6/ (2 files):
10:28 dalek rakudo: Move the <infix_prefix_meta_operator> <infixish> into the <infix_prefix_meta_operator> tokens themselves.
10:28 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​877b2ae12cab206ccbde1c16920ec1f190c1884
10:28 dalek rakudo: 6be8f8c | (Solomon Foster)++ | src/Perl6/Grammar.pm:
10:28 dalek rakudo: Proper precedence for !op, Rop, and Sop.  jnthn++.
10:28 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​be8f8c5a1d6726d05905ccbe0c40843489f9ac5
10:29 moritz bacek: /home/moritz/rakudo/parrot_install/bin/parrot: symbol lookup error: dynext/perl6_group.so: undefined symbol: Parrot_pcc_get_results_signature
10:29 moritz make: *** [perl6.pbc] Error 127
10:30 bacek moritz, sigh... This one was removed as part of reorder.
10:31 moritz and replaced by...?
10:33 bacek :call_sig
10:33 purl i think :call_sig is different, it specifies the signature of the subroutine as taking a single PMC
10:36 bacek let me check and try to patch rakudo for latest "API"
10:49 nopaste "bacek" at 114.73.8.126 pasted "Rakudo patch for moritz++" (85 lines) at http://nopaste.snit.ch/20023
10:51 bacek moritz, can you try nopasted patch?
10:51 moritz just a sec
10:53 bacek moritz, basically  just removed references to get_results_signature
10:53 bacek s/  / I /
11:03 bacek Bed time...
11:03 purl rumour has it bed time is probably a good idea
11:03 bacek I'll commit it tomorrow if noone beats me
11:04 moritz bacek: build worked... now running spectest
11:05 moritz bacek: seems to break autothreading - t/spec/S03-junctions/associative.t and other junction tests fail
11:08 dalek parrot: r45084 | fperrad++ | trunk/runtime/parrot/library/distutils.pir:
11:08 dalek parrot: [distutils] refactor for parallel build (step 1)
11:08 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45084/
11:15 jan joined #parrot
11:29 muixirt joined #parrot
11:29 muixirt good morning
11:35 muixirt anybody working on bindings for a gui tk?
11:46 Whiteknight joined #parrot
11:46 Whiteknight good morning, #parrot
11:46 muixirt hi Whiteknight
11:46 Austin ciao, whiteknight
11:46 Whiteknight hello muixirt, Austin
11:50 Austin Today's kakapo updates, monsieur, feature a spring mixture of bug fixes and enhancements, including a parse-tree matching library and some nice mods to Program to allow configuring the sub to call as 'main'...
11:52 Whiteknight nice
11:52 Whiteknight I'll have to read the diffs
11:54 Austin It's more or less what you were talking about the other day (and no doubt you've long-since moved on). The Program.set_main() method lets you tell program what sub to run as "main". And since Program already does saving and restoring of the std handles, I think this deals with your testcase issue.
11:54 clinton joined #parrot
11:56 Whiteknight that sounds quite interesting. So I can call Program.set_main while the program is already running?
11:56 Whiteknight so, it creates a sub-program in a sense?
11:56 Austin Umm, no.
11:56 Austin You create a new program, and use set_main to configure it.
11:56 dalek parrot: r45085 | whiteknight++ | branches/compact_strings:
11:56 dalek parrot: Creating a branch to play with the string compactor and the ugliness therein
11:56 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45085/
11:58 Austin { my $pgm := Program.new ;  for @long_list_of_testcase_files -> $file { $pgm.set_main:  NQP::compile_file($file); #{ something here about capturing output }# ; $pgm.run; } }
11:58 Austin I don't recall if you were postprocessing the output of files individually, or waiting until the end...
11:59 Whiteknight I was processing them individually
11:59 Whiteknight but, always ways around that
11:59 Austin So then you'd rewind the stdout stringhandle after each call.
12:00 Austin Anyway, that's enough of me talking about me. Let's talk about you...
12:00 Austin What do *you* think of me...?
12:00 Austin :)
12:00 lucian joined #parrot
12:00 Austin How's the whole PLA thing going, anyway?
12:03 Whiteknight going very well. The new test framework makes it obvious where deficiencies are, and where there are behavioral differences between the types
12:03 Austin Are you modeling pla on an existing library, or do you intend to make the behaviors consistent overall?
12:04 Whiteknight It's a unique design
12:04 Whiteknight I want them to be generally consistent
12:05 Austin Always (row, col) then?
12:05 Austin :)
12:05 Whiteknight yeah
12:06 dalek rakudo: 6a8049b | moritz++ | t/spectest.data:
12:06 dalek rakudo: track name changes of test files
12:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​a8049bf423b4200da3cccbaba26ff6bcd810ea3
12:06 dalek rakudo: 760b272 | moritz++ | docs/running.pod:
12:06 dalek rakudo: [docs] fixed a typo in running.pod reported in <https://bugzilla.redhat.com/show_bug.cgi?id=574547>, gerd++
12:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​60b2727e27b74093f6fd7efbeb1911b8a665bcb
12:06 dalek rakudo: 547069d | moritz++ | t/spectest.data:
12:06 dalek rakudo: more passing test files
12:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​47069d74d36c7512b61ad1ba237337502f481f5
12:06 Whiteknight I really want the types to be internally compatible with the BLAS library. BLAS uses FORTRAN-style memory buffers, so I have to keep things that way
12:06 Whiteknight indexing row-column is just a good point of consistency
12:06 Austin Okay. That's what I was wondering about, when I asked if you were stuck with somebody else's design..
12:10 Whiteknight Because I've got all the test issues mostly resolved, I'm able to look forward to areas of new development
12:10 Austin Sweet!
12:10 Whiteknight without kakapo, that wouldn't really be possible :)
12:10 Austin So what's next, development wise?
12:11 Whiteknight multi-dimensional matrices, mostly
12:12 Austin Is it just a case of creating dimensional-pmc-n, for increasingly large values of n, or is there more to it?
12:12 Whiteknight I'm not sure
12:13 Whiteknight I'm hoping for a single type
12:13 dalek parrot: r45086 | whiteknight++ | branches/compact_strings/src/gc (2 files):
12:13 dalek parrot: apply a patch from chromatic++ for testing
12:13 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45086/
12:14 Austin Sounds sensible.
12:15 Whiteknight but we run into a lot of problems with that, especially if we allow dynamic resizing
12:15 Austin Really?
12:15 Whiteknight yeah, because a matrix wants to be "square"
12:16 Whiteknight so if we resize the number of columns, we have to resize all buffers
12:16 Austin I'd think you would just allocate a different memory buffer, sauve qui peut, and toss out the old one..
12:16 Whiteknight that's basically what we do now
12:17 Austin So here's me not knowing very much computational linear algebra, but how often does that happen?
12:17 Whiteknight but all that copying can get expensive, and we generally cant just memcpy because layouts change
12:17 Whiteknight I don't know
12:18 Austin All the stuff I've ever had to do was usually graphics, and the matrices were fixed sizes.
12:18 Austin Okay.
12:18 Austin Hey, you still interested in that gig in Penndel? I never got a resume from you.
12:18 Whiteknight In general my philosophy has been "fast if you preallocate, slower if you grow dynamically"
12:19 Whiteknight oh, yeah. I never sent one. I meant to
12:20 Whiteknight I will put it together today
12:20 Austin Not too late. They just went to alpha on the next product, and I know they've hired a few guys for the next release cycle.
12:20 Whiteknight ok
12:23 Austin Hey, what's a good syntax for multi-dimensional keys in C?
12:23 Austin I've been thinking about using '::' as a delimiter. It's logical, but looks weird.
12:25 Whiteknight what?
12:25 Whiteknight in C?
12:25 purl in C is there some rational choice between for (;;){...} and while(1){...}?
12:25 Austin Well, close. but yeah
12:26 Whiteknight Ah, Close. You can't use just "[a, b, c]"?
12:26 Austin Technically, comma means sequential execution.
12:26 Whiteknight you're back on the Close train now?
12:26 Austin Yep
12:26 Whiteknight awesome. I've been looking forward to it since damn YAPC
12:26 Austin For all the glory of Kakapo, it's in service of close.
12:27 Austin Me, too.
12:28 Whiteknight so how is kakapo used in close? Is it just used to implement the parser, or is it also used to implement a runtime?
12:28 Austin Kakapo is a lot of the supporting code I wrote for the parser.
12:29 Austin Then rewrote when -rx showed up. :)
12:31 Whiteknight yeah
12:32 Austin x = foo[1::2];
12:32 Austin Ugh
12:32 Austin x = foo[1; 2];
12:32 Whiteknight yeah, don't think I like that one
12:32 Austin Better.
12:33 Whiteknight yes, better
12:33 Austin I'll tell you, I've been converting the close grammar to -rx, and that's a hell of a lot of fun.
12:33 Austin highlight, highlight, delete
12:33 Whiteknight I need to do that all for matrixy too
12:34 Austin A lot of the low-level tokens are free, now.
12:34 Whiteknight I've been waiting for the PCC improvements. When I rewrite, I'm going to fix function call semantics in one swipe
12:36 Austin Is the PCC stuff going to be visible?
12:36 Austin Or, wait, you're doing C stuff, right?
12:36 Whiteknight no, no C stuff
12:37 Whiteknight It's not really going to be visible
12:38 Austin Here's a fun one:  Null PMC access in get_number()
12:38 Austin Run time error, due to typo that compiles...
12:38 Whiteknight ?
12:38 Austin Welcome to perl...
12:39 Austin Every possible sequence of input characters is a valid program...
12:39 Austin I had this:  :grammar(%adverbs<parsegrammar),
12:39 Whiteknight haha
12:39 Austin What I meant, was this:  :grammar(%adverbs<parsegrammar>),
12:40 Whiteknight treated "parsegrammar" as a 0-arity sub
12:40 Whiteknight classic
12:41 Austin No, as a global symbol that would have resolved to null, and generated an exception, if it hadn't got hung up on trying to coerce %adverbs into a float, first.
12:42 Whiteknight oh, nice
12:42 Whiteknight I have to go, be back later
12:42 Austin bye
12:48 fperrad msg cotto see r45084, have you any idea to implement a method run_jobs() which run in parallel ?
12:48 purl Message for cotto stored.
12:58 joeri joined #parrot
13:00 arnsholt If I want to create a Parrot continuation in my NQP code, can I just do Continuation.new, or do I have to use inline PIR?
13:17 Austin arnsholt: neither. There's a wiki page on the "Hll Resources" page.
13:18 Austin http://trac.parrot.org/parrot/wiki/​Creating%20Closures%20with%20NQP-rx
13:18 Austin The example is somewhat long, because it shows the whole shared/notshared thing. You want the sub, and the pir::newclosure
13:19 Austin Whoops.
13:20 Austin Nevermind. I saw "continuation" and read "closure.
13:20 Austin my bad.
13:21 arnsholt No problem =)
13:21 arnsholt This is probably useful knowledge as well
13:22 Austin The problem with a Continuation will be the set_addr
13:22 Austin You'll have to give it a sub, or drop into inline PIR.
13:23 Austin my $c := pir::new__PS('Continuation); pir::set_addr__vPP($c, &foo);
13:24 arnsholt Oh, that's a bit more handy than pure inline PIR at least
13:24 Austin I'm not sure that last bit will work.
13:24 Austin What are you wanting to do with it?
13:24 arnsholt So far my solution was to have Q:PIR{label:} a bit further down in the code
13:24 Whiteknight doing continuations from NQP would be hot
13:25 Austin Arnsholt: Beware that inline PIR isn't as inline as you think...
13:25 Whiteknight I thought Q:PIR made a nested sub
13:25 arnsholt Austin: I'm toying around with unification
13:25 Austin It used to make a nested eval...
13:25 Austin It may still.
13:25 arnsholt In the generated PIR I get with my basic inlines it is inlined
13:25 Austin Have you tried the label in line yet?
13:26 Austin That's cool if it works.
13:26 arnsholt The code is inlined, but I'm not yet at the stage where I've figured out how to test my code =)
13:26 Austin Heh.
13:26 Whiteknight does NQP have support for labels?
13:26 Austin Whiteknight: no.
13:26 Austin Unless you do Q:PIR { label: }
13:26 Austin apparently
13:26 Austin :)
13:27 arnsholt I've seen people do the inline labels in #perl6 (I think), so it should work
13:29 theory joined #parrot
13:32 nopaste "Austin" at 68.39.12.202 pasted "Here is how you test a compiler" (16 lines) at http://nopaste.snit.ch/20024
13:34 Whiteknight nice
13:35 Austin I had to hack the compiler to get the parse rule to support :rule
13:35 Austin That's present in Regex but not in the legacy PCT compiler code.
13:36 Austin And then I built the past tree matching code as a Matcher, so I can do var(...) and stmts(...) and so on.
13:40 iblechbot joined #parrot
13:41 Whiteknight where does the matcher get called?
13:41 Austin assert_match calls it internally.
13:41 Austin assert_match( $item, $matcher, $message)
13:42 Austin becomes fail($message) unless $matcher.matches($item)
13:42 Austin more or less
13:42 purl thereabouts
13:43 Austin The function   "var( name => $name )" is building the matcher.
13:43 Austin ("var" builds a PAST::Var matcher, etc.)
13:43 Whiteknight so var(name=> $name) is a matcher?
13:43 Whiteknight ok
13:43 Austin Yeah.
13:44 Austin node_type = PAST::Var, and attribute{name} == '$name'
13:44 Whiteknight where is var defined?
13:44 Austin src/Matchers/PctNodes
13:45 Austin http://gitorious.org/kakapo/kakapo/commit​/d0ab69202ee84b289f26b0709415dd32b42f8d43
13:48 Austin What I don't have, but would like to have, is some kind of "find this in any subtree" mechanism.
13:48 dalek rakudo: d296602 | (Solomon Foster)++ | src/ (2 files):
13:48 dalek rakudo: Reorganization of !op, Rop, Xop, and Zop in preparation for a refactor.
13:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​2966027ce9351fd260dd9de96d2c1a8eeb053e7
13:48 dalek rakudo: 2067a57 | (Solomon Foster)++ | src/core/metaops.pm:
13:48 dalek rakudo: Switch Mu $a to Mu \$a in the notresults and reverseargs functions, as per jnthn++'s advice.
13:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​067a57f9781bee8e8aa914cf9ff0e41563e11d7
13:53 Whiteknight yeah, a subtree "searcher" would be a nice thing
13:54 Austin The problem is reporting failure.
13:55 Austin Do I report "nope, couldn't find any"
13:55 Austin Or do I report, "here's how every single one of them was inadequate..........."
13:55 Whiteknight "Or El Duderino, if you're not into that whole brevity thing"
13:56 Austin :)
13:56 Austin Maybe a heuristic
13:56 Mokurai joined #parrot
13:57 Austin If the match is a subtree, then require an exact match at the top.
13:57 Austin If not a subtree, require the right node type...
13:57 Austin like:
13:57 Austin parse: "foo(1, 2, 3, 4)"
13:58 Austin match somewhere_in_tree( param( value = 5 ) )
13:58 Austin four params, four failures
13:59 Austin Maybe a separate threshold matcher. Don't report a failure unless this much matches..
13:59 Austin That makes sense.
14:00 Austin Then tune the default threshold...
14:01 Austin I wonder how this ties in to the combinators I was using already..
14:02 Whiteknight that sounds good
14:02 arnsholt Is fail a keyword in NQP?
14:02 Austin Not that I know of.
14:02 Austin It was a keyword in some old perl6regexes, but has since been removed.
14:02 moritz arnsholt: seems like not - see #perl6 p6eval output
14:03 arnsholt Good idea. Thanks
14:03 Austin It's such a useful verb, though, that I use it in my UnitTest library...
14:04 arnsholt Quite. Here it's for non-deterministic search
14:05 Austin Prolog?
14:05 purl Prolog is pretty darned weird.
14:05 arnsholt Austin: That's what I'm hoping for
14:05 arnsholt But I've only spent about two hours on this so far, so it's not quite there yet =)
14:06 arnsholt purl: Indeed. I love it =)
14:06 purl arnsholt: huh?
14:08 arnsholt Huh @ what?
14:08 purl @ is necessary
14:13 dalek joined #parrot
14:13 Whiteknight purl is a bot
14:13 Whiteknight purl, purl?
14:13 purl hmmm... i am a retard or a trannybot or a fuckslut in GumbyBRAIN's mind or the national trannywreck champion or better than any of you #perl fucktards or very vile or the one to watch >:) or omniscient or 13 or well behaved or useless or fun or a megalomaniac or known to get testy if not fed or slacking off or gummy in scalar context or a silly bot or a stitch
14:13 arnsholt Yeah, that dawned on me =)
14:14 Whiteknight purl, arnsholt?
14:14 purl whiteknight: no idea
14:14 Whiteknight purl, whiteknight?
14:14 purl whiteknight is, like, mailto:wknight8111@gmail.com or the grand master funk or http://wknight8111.blogspot.com/
14:15 Austin arnsholt is probably tired of people making jokes about his handle
14:15 Austin arnsholt?
14:15 purl arnsholt is probably tired of people making jokes about his handle
14:15 Whiteknight purl arnsholt?
14:15 purl i heard arnsholt was probably tired of people making jokes about his handle
14:15 Austin botsnack
14:15 purl :)
14:15 Austin good purl
14:15 purl Aw, shucks, Austin. *blush*
14:15 arnsholt Now that's a pretty cool bot
14:15 Whiteknight karma arnsholt
14:15 purl arnsholt has karma of 7
14:16 Whiteknight karma Austin
14:16 purl austin has karma of 317
14:25 brianwisti joined #parrot
14:28 Whiteknight Austin: you ever been to peddler's village?
14:29 Austin Um, no.
14:29 Austin That's over just on the other side of the river, right? I can't remember the name of the town..
14:29 Whiteknight New Hope
14:29 purl hmmm... New Hope is a bit of a ways from here, Easton the same. Levittown is where I am.
14:30 Austin 11am - 5pm Sundays
14:31 Whiteknight we're heading there today with the kid, take him for the walk
14:32 Austin He's only a few months old! How much walking can he do?
14:32 Whiteknight well, we do all the walking, he crys and spits up on himself
14:32 Whiteknight ...which probably burns the same amount of calories
14:33 Austin There you go.
14:33 Austin Like a cat.
14:33 davidfetter joined #parrot
14:33 Austin Amazon is selling an all-in-one laser printer for $99
14:34 Austin Humorously, the "X25" refill cartridges cost $70
14:35 Austin So apparently, the printer itself is only worth $29...
14:35 moritz or the cartridge isn't full
14:35 Whiteknight doesn't suprise me, printers are all garbage
14:36 moritz that's a common trick to sell the printers cheaply; they make the money by selling the cartridges anyway
14:36 Austin Fax modem, OCR software, printer, etc.
14:36 Austin Yeah.
14:37 Austin Moritz, I had a brother all-in-one, and a few years ago I threw it away after realizing it was cheaper to buy a new HP printer than to buy one toner cartridge for the d***ed thing...
14:40 Austin Hmm..The default NQPrx expression parser is very intolerant of spaces...
14:41 Whiteknight realy?
14:41 Austin Seems that way.
14:41 Whiteknight how so?
14:41 Austin Whitespace is only for infix ops.
14:41 Austin ++x -> ++ x
14:41 Austin No space for you!
14:42 Whiteknight oh
14:42 Whiteknight okay, I'm heading out for our walk. Be back later
14:42 Austin prefix and postfix don't get any .ws love..
14:42 Austin Have a good walk, Whiteknight
14:43 moritz Austin: that's probably because in Perl 6 you're not allowed to have spaces before the postfix op
14:43 moritz as disambiguation against infixes
14:43 Austin Heh.
14:45 Austin Well, in some-language-other-than-perl, it's less of a problem.
14:45 Austin But 'new' is considered a prefix operator, and I would like to put a space after it...
14:45 Austin :)
14:46 moritz Austin: rule prefix:sym<new> { <sym> }
14:46 Austin yeah
14:46 Austin I've just been dropping <.ws>
14:46 Austin Maybe you know this:
14:46 Austin Can I mix rule and token syms?
14:47 Austin proto token foo { <...> }
14:47 Austin rule foo:sym<a> {...} ??
14:47 moritz Im quite sure you can
14:48 Austin Yeah, but *should* you be able to?
14:48 Austin What NQP permits is not always a good learning aid...
14:49 Austin You have any idea how to debug the EXPR_reduce function?
14:50 moritz nope :(
14:50 Austin Bah
14:50 Austin This is why I did it top-down the first time.
14:50 dalek joined #parrot
14:54 dalek rakudo: a61c40c | (Solomon Foster)++ | src/Perl6/Actions.pm:
14:54 dalek rakudo: infix_prefix_meta_operator refactor!
14:54 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​61c40cda94ba2bffc47c490e2157660686ce237
15:01 tetragon joined #parrot
15:38 parthm joined #parrot
15:47 japhb sorear, ping
15:49 japhb purl, msg sorear I gave my support for your patch yesterday (conceptually, I'm not familiar enough with that section of code to check for technical errors).  Nothing should be waiting on me.
15:49 purl Message for sorear stored.
16:06 dalek close: r192 | Austin_Hastings++ | branches/austin:
16:06 dalek close: Moved to personal branch
16:06 dalek close: review: http://code.google.com/p/close/source/detail?r=192
16:07 Austin karma Austin_Hastings
16:07 purl austin_hastings has karma of 134
16:28 Psyche^ joined #parrot
16:35 parthm left #parrot
16:49 Mokurai1 joined #parrot
17:00 jan joined #parrot
17:02 davidfetter hello
17:03 davidfetter is there a repo of images for parrot's mascot parrot?
17:16 patspam joined #parrot
17:51 bacek joined #parrot
18:19 nopaste "arnsholt" at 81.234.214.29 pasted "Non-functional non-deterministic search" (82 lines) at http://nopaste.snit.ch/20025
18:20 arnsholt Does anyone have an idea why this doesn't work?
18:21 arnsholt The choose sub finds the right values, but for some reason the return value isn't the same
18:34 Austin Looks like a nest of snakes to me.
18:35 arnsholt Yeah, sorry 'bout that =)
18:37 arnsholt Continuations make my brain itch as well
18:43 arnsholt But the idea is that each time fail() is called, we backtrack and return the next value in the array passed to choose()
18:43 arnsholt Which is what happens on the inside of choose(), but for some reason the return value doesn't change...
18:46 dalek rakudo: 9780625 | (Solomon Foster)++ | src/core/metaops.pm:
18:46 dalek rakudo: Rework hyper so that it properly handles cases with differing numbers of elements on each side.
18:46 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​780625c7626e2a322624b14b2aa03b1170d3022
18:52 Psyche^ joined #parrot
18:52 snarkyboojum joined #parrot
18:54 Austin arnsholt: I just watched it in trace, and yeah, it's screwing up.
18:55 Austin That said, I have no idea what the expected behavior is, never mind the actual behavior.
18:56 Austin You want to talk to Whiteknight, allison, bacek, or chromatic, who were all recently involved in touching the calling-conventions code, and  who therefore (1) are likely to know more about how call/return works than anyone; and (2) are probably to blame if something broke.
18:56 arnsholt Heh. Expected behaviour is la\la\ny\ny\bos\la (with newlines instead of \)
18:56 Austin Sez you.
18:56 arnsholt Well, intended behaviour
18:57 arnsholt I'm wondering if I've messed up somehow (my first guess), or if I've found a bug (way less likely, IMO)
18:57 Austin But the whole multiple-return thing reminds me of coroutines, and I think there's a separate continuation for that, for some reason. It's all Eldritch Secrets to me...
18:57 Austin Heh.
18:57 Austin Your modesty is becoming, but misplaced.
18:58 dalek rakudo: 0d10ff6 | moritz++ | src/core/IO.pm:
18:58 dalek rakudo: enable printf() again
18:58 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​d10ff649e1cd6a95b0be57f6f7dafacb355ecfa
18:58 dalek rakudo: 3c9f65b | moritz++ | src/core/operators.pm:
18:58 dalek rakudo: small fix in series operator
18:58 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​c9f65b23577fd3f369ccbe825728ecdbbb51af5
18:58 Austin There aren't really enough HLL guys pushing on parrot, so there's plenty of room for you to score a hundred or so tickets...
18:58 Austin Especially if you're doing this stuff, which I'm not touching, and I don't think partcl deals with.
18:59 arnsholt Right. Is there someone in particular I should try to hit up for this?
18:59 Austin Whichever of the four people I mentioned above you happen to see first.
18:59 Austin What timezone are you in?
18:59 arnsholt Europe
19:01 Austin Hmm... allison was recently in europe, but I don't know where she's at now. She's kind of infrequent around here, though. Bacek is in Australia, Whiteknight is eastern-US. He's generally here a good part of the day, though, checking in at work and at home.
19:02 arnsholt Spiffy. I tend to be up reasonably late as well, so I should be able to encounter the US-based ones at least
19:02 Austin Chromatic tends to appear here in the wee hours. I think he's western-us, logging on at the end of his day.
19:03 Austin clock?
19:03 purl Austin: LAX: Sun 12:03pm PDT / CHI: Sun 2:03pm CDT / NYC: Sun 3:03pm EDT / LON: Sun 7:03pm GMT / BER: Sun 8:03pm CET / IND: Mon 12:33am IST / TOK: Mon 4:03am JST / SYD: Mon 6:03am EST /
19:03 arnsholt Right. That's probably a bit late, even for me
19:03 Austin So Bacek is just about to get up and go to work. He might show up in 2-3 hours.
19:03 arnsholt Hmm. I'll probably be around then
19:04 arnsholt If I see him I'll try to get some info from him
19:04 Austin You might msg him with your nopaste, and ask him to take a look.
19:04 arnsholt Good idea, that
19:04 arnsholt Thanks for the help!
19:04 Austin He just dropped a big pcc-related commit on trunk, so maybe he's feeling guilty..
19:04 Austin By the way, are you on a release or on trunk?
19:05 arnsholt Trunk
19:05 Austin Okay.
19:05 Austin A better argument for "your changes screwed up my hll!"
19:06 arnsholt ("I decided to make a HLL, and you broke the features I need", more like, but no matter =)
19:06 Austin Have you looked at $_PARROT/t for the various testcases?
19:07 Austin (IIRC, there's like 2 continuation tests... :)
19:07 arnsholt Oooh, another good idea
19:09 arnsholt Yeah, two very simple testcases for continuations
19:11 Austin but look for coroutines, see if there's something there...
19:12 arnsholt Hmm. More tests for that
19:13 tetragon_ joined #parrot
19:43 snarkyboojum joined #parrot
19:52 iblechbot joined #parrot
20:16 joeri left #parrot
20:18 sorear japhb: pong
20:30 kjeldahl joined #parrot
20:37 GeJ_ Good morning everyone.
20:37 GeJ_ clock?
20:37 purl GeJ_: LAX: Sun 1:37pm PDT / CHI: Sun 3:37pm CDT / NYC: Sun 4:37pm EDT / LON: Sun 8:37pm GMT / BER: Sun 9:37pm CET / IND: Mon 2:07am IST / TOK: Mon 5:37am JST / SYD: Mon 7:37am EST /
20:41 dukeleto joined #parrot
20:41 dukeleto 'ello
20:51 eric_j joined #parrot
21:01 payload joined #parrot
21:05 sorear japhb: Er.  I gave it to you because I thought you were going to apply it.  Who do I hand it off to next, or is it Tracker Time?
21:15 hudnix joined #parrot
21:35 Whiteknight joined #parrot
21:35 Whiteknight good afternoon, #parrot
21:37 arnsholt Whiteknight: I was told you're one of the people to talk with about continuations
21:37 arnsholt That right?
21:38 Whiteknight sure, what do you want to talk about?
21:39 arnsholt I'm poking at starting a HLL project (a Prolog)
21:40 arnsholt And for that I've got a non-deterministic search based around continuations, but I've got a weird issue with the code
21:40 arnsholt See: http://nopaste.snit.ch/20025
21:40 Andy joined #parrot
21:41 arnsholt choose() stores continuations that are invoked each time fail() is called, effectively giving backtracking
21:41 arnsholt choose() gets the right elements, but for some reason the value returned to blob() is always the same
21:42 arnsholt (I tried removing the .tailcall, but that doesn't change anything)
21:42 arnsholt Does there look like anything's wrong with my code?
21:44 Whiteknight okay, give me a rundown of what happens in this code
21:46 dalek rakudo: 70dd723 | (David Romano)++ | src/core/Array.pm:
21:46 dalek rakudo: [src/core] indentation fix
21:46 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​0dd72357a06832b65256820311287c37dd17388
21:46 dalek rakudo: af16e57 | (David Romano)++ | src/core/operators.pm:
21:46 dalek rakudo: [src/core] Define ne in terms of !eq
21:46 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​f16e578a7804a1489b91380a02057de89d0b6df
21:52 arnsholt Whiteknight: Ok. Choose gets called, and gets the first value on the list, and stores a continuation that will process the rest of the list when invoked
21:52 arnsholt Then it returns the value
21:53 arnsholt fail() calls the first continuation in the list, or if there are none, the top-continuation, which will return control to the main routine
21:53 snarkyboojum joined #parrot
21:55 arnsholt (additionally, choose() calls fail() when the list of options is empty)
21:57 arnsholt Does that clear things up?
21:58 arnsholt If you run the code (there's a dot missing before the first sub directive), it'll print out three pairs of lines between the "blob"s
21:59 arnsholt The first is the value selected inside choose(), the second is the value we get on the outside, in blob()
22:04 Whiteknight This is a good question, I can't see what is wrong
22:05 Whiteknight bacek_at_work: ping
22:05 arnsholt Yeah, me neither. The continuation looks like it's working fine, but the return value somehow gets scrambled
22:08 Whiteknight I think the return value is getting crapped up, but I can't see why.
22:11 arnsholt Thanks for the help
22:11 arnsholt Now at least I'm a bit closer to figuring this out
22:13 Whiteknight My suggestion is this: Convert choose to a coroutine and yield values back to blob in a loop
22:13 Whiteknight create the continuation inside blob, not choose
22:13 Whiteknight that way you aren't continuing inside choose and worrying about the return value
22:14 arnsholt Very good idea
22:15 dalek parrot: r45087 | plobsing++ | trunk/ext/Parrot-Embed/t/interp.t:
22:15 dalek parrot: fix codetest error
22:15 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45087/
22:15 dalek parrot: r45088 | plobsing++ | trunk/src/nci/api.c:
22:16 dalek parrot: missing NCI thunks are an exception, not a panic
22:16 dalek parrot: also stronger assertions in NCI thunk lookup
22:16 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45088/
22:16 Whiteknight It's not good, because this should work and it's a workaround
22:16 Whiteknight but, I think it will work for you for now
22:16 Whiteknight File a bug report
22:16 arnsholt I'll do that
22:17 arnsholt Try to boil it down to something more concise
22:18 arnsholt Heh. Replacing Continuation with RetContinuation gives a segfault
22:19 arnsholt But then again, RetContinuation is outdated, no?
22:21 Whiteknight RetContinuation is extremely specialized to handle returns only
22:22 Whiteknight (though that's important information too. File another ticket for it
22:22 Whiteknight it shouldn't segfault
22:22 arnsholt Yeah, those are generally a bad sign
22:23 Whiteknight two tickets in one night? You're kicking butt
22:23 arnsholt Feels more like it's mine being kicked, but thanks nonetheless =)
22:24 eternaleye joined #parrot
22:25 Whiteknight arnsholt: There is a branch relating to method calls and continuations that is going to get merged soon. Some of these issues might go away (or the problems could become more obvious). If you can keep a copy of this code until monday, maybe it will magically start working
22:26 japhb purl, msg sorear Ah, OK, I understand now.  I'll be happy to commit the diff if no one beats me to it, but I can't do it for another few hours.  Perhaps plobsing or whiteknight, since they seem to be around?
22:26 purl Message for sorear stored.
22:27 Whiteknight japhb: what am I maybe doing?
22:27 japhb Whiteknight, committing a patch for sorear
22:28 sorear purl, erase message
22:28 purl sorear: huh?
22:28 sorear purl, messages
22:28 sorear purl, help
22:28 purl #perl is not a help channel, and I'm not a help bot.  If you want Perl help, try #perl-help or #metallica. or (see the 'help channel' factoid as well) or
22:28 Whiteknight sorear: nopaste the patch and I'll look at it ASAP
22:28 sorear purl, link me to your source code and/or documentation
22:28 purl sorear: excuse me?
22:28 japhb sorear, you want 'messages erase'
22:28 sorear ah thanks
22:29 sorear Whiteknight: svn diff preferred format?
22:29 Whiteknight yeah
22:29 japhb OK, now I've really got to run, sorry.
22:29 sorear http://pastie.org/880205  a couple days old but still applies cleanly
22:30 arnsholt Whiteknight: Yeah, I've got disk space to spare for a bit of code
22:37 plobsing sorear: I looked at your patch with the intent to commit it, but I have some objections.
22:37 dalek rakudo: 12b6d27 | moritz++ | src/glue/run.pir:
22:38 dalek rakudo: re-instatiate $*EXECUTABLE_NAME
22:38 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​2b6d2783874cd3bfbd7c075109093b55853803e
22:41 AndyA joined #parrot
22:42 arnsholt What's the canonical way of stringifying an int in PIR?
22:43 AndyA joined #parrot
22:43 plobsing arnsholt: $S0 = $I0 seems to work
22:43 AndyA joined #parrot
22:44 arnsholt Dur. Good suggestion
22:45 sorear plobsing: Good
22:45 sorear plobsing: I need feedback
22:46 AndyA joined #parrot
22:53 sorear plobsing: replied
23:06 cotto massages
23:06 purl hmmm... massages is wrong.
23:06 cotto I disagree.
23:06 dalek rakudo: 92745eb | jonathan++ | src/ (3 files):
23:06 dalek rakudo: First cut of prefix and postfix hyper-operators. Parsing should all be fine, implementation probably needs tweaking for nested arrays.
23:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​2745ebe599ed7320891cf2ff782bf4ac35c354a
23:10 sorear plobsing++ helping with documentation
23:15 arnsholt "'P1' is only a valid register name in PASM mode" What does that mean?
23:16 arnsholt Can you only use a single unnamed register in PIR?
23:16 plobsing arnsholt: the syntax is "'$P1'"
23:16 sorear in PIR register names have sigils
23:16 arnsholt D'oh! I looked for it and missed it
23:17 plobsing the distinction is that P0 refers explicitly to the zero-th P register, whereas $P0 refers to the zero-th arbitrarily mapped (by IMCC) P register
23:20 arnsholt Ah, I see
23:25 kid51 joined #parrot
23:37 dalek parrot: r45089 | plobsing++ | trunk (10 files):
23:37 dalek parrot: provide access dlopen RTLD_GLOBAL flag
23:37 dalek parrot: patch by sorear++
23:37 dalek parrot: review: http://trac.parrot.org/parrot/changeset/45089/
23:42 NotFound plobsing: That thing shouldn't be declared experimental?
23:47 dalek rakudo: 53707fb | jonathan++ | src/Perl6/Grammar.pm:
23:47 dalek rakudo: Start to scatter various $*LEFTSIGIL bits around, in prep for item assignment. This covers all cases in STD apart from those in EXPR.
23:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​3707fb03007c9ba464b8c483c945a36de440153
23:47 arnsholt Whiteknight: See http://trac.parrot.org/parrot/ticket/1521
23:48 arnsholt Could it be that the Continuation resumes from a slightly off position (ref. bug.pir)?
23:51 Whiteknight maybe
23:51 Whiteknight when a call is made currently, pointers to the registers to receive the return values are passed
23:52 Whiteknight so somehow the subsequent calls are not passing values to those original pointers
23:52 Whiteknight What I think is this: Because you only call choose once, it only sets up those return pointers once
23:54 plobsing NotFound: good point.
23:55 jan joined #parrot
23:57 theory joined #parrot
23:58 dalek TT #1521 created by arnsholt++: Continuations interact badly with .return
23:58 dalek TT #1521: http://trac.parrot.org/parrot/ticket/1521

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

Parrot | source cross referenced