#parrot Parrot 2.2.0 "Like Clockwork" Released! | parrot.org/ | Channel log: irclog.perlgeek.de/parrot/today | Tasks: Fix compact_pool shenanigans | Fix HLL bugs (TT #389, #1040) | Prioritize Rakudo Needs
Set by moderator on 20 March 2010.
00:05 M_o_C joined
Whiteknight I was just talking to my dog about TT #389. He says i'ts a government conspiracy 00:06
it's funny, I didn't think I had a dog
00:13 M_o_C left 00:14 fperrad_ joined 00:25 fperrad joined 00:29 arnsholt joined
arnsholt Is docs/pct/*.pod the up-to-date place to look for info on implementing a new language on Parrot? 00:31
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
Whiteknight arnsholt, it's probably all out of date 00:33
arnsholt That's what I was afraid of
Is any of the other compilers in compilers/ a better guide than the others as to how I should go about things? 00:34
(Or some other document I should read)
Whiteknight best bet is to find a working one, follow the examples, and ask questions here
00:35 patspam joined
arnsholt Righties 00:35
00:38 davidfetter joined
arnsholt Is tools/dev/create_language.pl or mk_language_shell.pl the one to use? 00:39
sorear mk_language_shell.pl is the one I know about 00:40
Tene the former is *more* up-to-date, at least
arnsholt I'll try that then
Yeah, this looks more like what I expected 00:42
00:44 patspam joined
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:44
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:45
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:46
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
OK, anyone else waiting for an answer from me?
Tene japhb: I am! 00:49
japhb Tene, Ah, sorry, what's up?
sorear japhb: You should have gotten a copy, unless I sent it to the wrong Geoffrey Broadwelle
Tene japhb: No, I'm really not. I'm just harassing you.
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.
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. :)
japhb Nice. :-)
plobsing japhb: do you have any recommendations for examples for parrotncitut?
the only commonly known, simple callback interface I can think of is qsort 00:51
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:52
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
well, some of the code, I mean, it would get bloody repetitive to explain it all. :-)
Just extract a couple variants at different "complexity levels" and explain them.
EOL
plobsing japhb: yes, but I'm trying compile a consistent set of examples. I don't want it to be a dog's breakfast.
japhb Or a pig's .... 00:54
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
Sort routines, as you point out, are a decent exception.
Sadly, the base C library ones don't work with our NCI callbacks, because they don't include an opaque data pointer. 00:57
er, *user data pointer
sorear you could just use a TLS variable 00:58
japhb sorear, threads != interpreters
And it's the interp that we want to capture
sorear threads == threads 00:59
plobsing sorear: it comes down to a problem of C not supporting closures
sorear there is at most 1 current qsort invocation per thread
so if you store the current callback userdata in a tls variable, it will work for qsort
save the old value if you recurse
like a P6 contextual
plobsing: yes
plobsing sorear: that may be for well behaved functions like qsort, but other libraries (GUIs for example) hold onto the callback for later
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).
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
sorear plobsing: Indeed :( 01:00
japhb sorear, but serious points for thinking of a way to make that hack work.
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.
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.
plobsing and in general, I don't think we ever want to *require* a JIT/FFI library. That excludes platforms. 01:02
dalek kudo: 5edcafa | jonathan++ | src/ (3 files):
Get parsing of hyperops, including transparency of precedence, implemented. Stub in the various &hyper multis. Implement the very simplest case.
sorear parrot already excludes platforms... it's well over the minimum maxima for many C features 01:03
dalek rrot: r45071 | chromatic++ | branches/pcc_hackathon_6Mar10/src/ops/core.ops:
[ops] Tidied code; no functional changes.
rrot: r45072 | chromatic++ | branches/pcc_hackathon_6Mar10/src/pmc/callcontext.pmc:
[PMC] Tidied code; no functional changes.
japhb plobsing, a platform that cannot do JIT/FFI simply can't have thread/interpeter-safe GUI-style event callbacks.
... like, say, memory usage. ;-)
01:04 abqar joined
plobsing japhb: that's only true if it doesn't supply userdata 01:04
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.
sorear we can do portable FFI on any platform with cc and dlopen
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
sorear japhb: the 286
not that anyone cares at all about 286 compatibility any more, because the 386 is software compatible and available everywhere 01:07
but the 286 has 16 bit instructions *only* and a maximum physical address space of 16 MiB
japhb I don't think there is a 286 that could actually compile Parrot. :-)
Anyway ... I haven't even seen a 286 in *decades*. I've seen working Commodore 64's much more recently. :-) 01:09
dalek tracwiki: v53 | cotto++ | ParrotQuotes 01:10
tracwiki: trac.parrot.org/parrot/wiki/ParrotQ...ction=diff
Austin Heh. 01:11
I've got a 386/25 I'm about to discard...
japhb trips across strverscmp(3) ... *chuckle*
sorear GNU brain damage ftw 01:13
japhb "Because if there just aren't enough features ... add 10 more."
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.
plobsing libc is hardly the worst offender. Take a look at "man cat"!
japhb heh 01:15
Austin Mmm... PCT Tree matching...
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
01:16 snarkyboojum_ joined, patspam joined
cotto What'd be the right way to organize code for testing the profiling runcore? 01:18
Hmm. It may be best to write all in one place and divide it up later. 01:19
Austin How would you test the profiling runcore, anyway? 01:24
Run a bunch of code, and then assert that the counts for various opcodes were right?
cotto trac.parrot.org/parrot/wiki/TestingProfiling 01:26
That's more of a scratch pad than a coherent strategy though. 01:27
Austin Ahh, I see you refer to the "Name" document... 01:32
cotto ? 01:34
Austin Heh.
The profiling.pod reference is a joke?
cotto It's a real file.
Austin It's one page long and describes three environment variables. 01:35
01:35 patspam joined
dalek rrot: r45073 | cotto++ | trunk/docs/running.pod:
[docs] add profiling runcore to running.pod
01:36
rrot: r45074 | cotto++ | branches/profiling_testing:
new branch for testing the profiling runcore
Austin Do you have a different version in a branch, somewhere?
cotto Nope. I could make that more skimmable though. 01:37
Austin Oh. I was looking for the solution to the randomness. 01:38
cotto It's at the bottom 01:39
Austin ?
The bottom of docs/dev/profiling.pod is a description of the PARROT_PROFILING_ANNOTATIONS variable 01:40
cotto I added it fairly recently. 01:41
Austin Ahh, so it's not in 2.2?
My bad.
cotto trac.parrot.org/parrot/browser/trun...filing.pod
dalek tracwiki: v6 | Austin_Hastings++ | TestingProfiling 01:43
tracwiki: trac.parrot.org/parrot/wiki/Testing...ction=diff
tracwiki: v16 | cotto++ | CottoTasklist
tracwiki: trac.parrot.org/parrot/wiki/CottoTa...ction=diff
tracwiki: v7 | Austin_Hastings++ | TestingProfiling
tracwiki: trac.parrot.org/parrot/wiki/Testing...ction=diff
Austin Ahh, there it is.
cotto++
Austin is sorry he ever doubted you... 01:44
cotto thanks for the edit
Austin++
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
That's a post-processing of the dump format you've already described.
cotto yup
Austin As far as I'm concerned, if you give me that, then it already works.
cotto There's plenty of room for improvement. The postprocessed output for Callgrind can be useless for large programs. 01:46
Austin Heh
Just needs more post-processing... :) 01:47
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:51
Austin Heh. Google is your friend. 01:54
Which standad?
*standard?
Many of them are available as "draft" versions which differ pretty much only in the date from the published standard. 01:55
01:59 joeri left
arnsholt Austin: In this case, the Prolog one 02:03
But the draft is a good suggestion
arnsholt goes digging
02:03 patspam joined 02:04 snarkyboojum joined
sorear In some cases, you can get free copies of the actual standards from sister organizations 02:10
the ANSI terminal escape code spec is available for free from ECMA
The Open Group hosts a free version of POSIX.1 02:11
arnsholt Nice tricks those 02:14
I found a draft of the Prolog standard which should suffice
Austin Ahh, my old nemesis "Could not build C3 linearization: ambiguous hierarchy" ... we meet again... 02:21
02:32 patspam joined
cotto Looks like Env is broken in nqp. 02:55
Austin How so?
nopaste "cotto" at 96.26.227.153 pasted "Env broken in nqp" (15 lines) at nopaste.snit.ch/20020 02:56
Austin Coder error. Use env{} instead of [] 02:57
say( pir::new__PS('Env'){'PATH'});
WFM
cotto Yay! 02:58
Austin++
Whiteknight Austin is fantastic 02:59
Austin No, that's DangerMouse... 03:00
www.youtube.com/watch?v=UE7WrEidvyY...re=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
cotto It might have something to do with nobody having merged it. 03:03
Austin Plus, this isn't tuesday..
Whiteknight in scrollback, it looks like chromatic just made two commits to it tonight 03:06
cotto there are always more cleanups to be done 03:28
sorear signatures and activation records are both represented by CallContext? 03:35
03:39 chromatic joined
chromatic The PCC branch needs a new opcode to fix the result_info tests. 03:39
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 nopaste.snit.ch/20021
chromatic Hm, where'd he go? 03:48
sorear he left 27 min ago 03:49
Austin Mmm... if this is Saturday, it must be a bug... 03:51
03:53 patspam joined
dalek rrot: r45075 | chromatic++ | trunk/src/gc (3 files):
[GC] Tidied code; no functional changes.
04:02
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
And ff searching sucks balls.
cotto They're not that long.
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
TT #1520: trac.parrot.org/parrot/ticket/1520
04:08 patspam joined
Austin Have a look at the source of one of the pages. 04:10
sorear no, wrong, pcc isn't clear to me 04:19
cotto That would have been suspiciously quick. 04:20
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
sorear I've read that; it doesn't count as "clear"
(for me, yet, yadda yadda) 04:24
04:25 parthm left
Austin Yeah, every time I go there, I start wishing for a requirements document... 04:26
sorear all I want is example code for - in C - passing slurpies, taking slurpies, returning slurpies, expecting slurpies 04:30
all the documentation I can find thinks that I know my argument types
Austin Slurpies are RPAs or Hashes. 04:34
With the slurpy bit
You sure you're not looking for: Parrot_pcc_build_sig_object_from_varargs ? 04:36
sorear I'm not sure of anything. 04:38
Austin What simple thing are you trying to do? 04:39
(And note: anything with a slurpy in it isn't really simple..)
sorear Take an arbitrary number of "P" arguments, and pass them all to Perl_call_sv 04:40
Take an arbitrary number of return values from Perl_call_sv and pass them to a RetContinuation
Take an arbitrary number of arguments in a Perl->C callback and pass them to VTABLE_invoke
Receive an arbitrary number of returns from that and send them back to Perl 04:41
I don't claim to know what the best approach here is 04:42
Austin Is that C to C, or PIR to C ?
sorear Is what? 04:43
Austin The calls you want to make. 04:44
An arbitrary number of P args -> Perl_call_sv
sorear The calls I want to make are
er
04:44 janus joined
sorear Perl_call_sv is part of the Perl 5 API. I know how to feed it an indeterminate set of arguments. 04:45
At the end of the day, I'm going Parrot (->) C -> Perl 5 and Perl 5 -> C (->) Parrot
the parenthesized boundaries are where I'm confused
purl You won't be after this episode of Soap!
Austin What does Perl_call_Sv do? 04:49
Does it take a "name of the perl code to call" type argument?
sorear no 04:50
the perl5 vm is stack based
you push SVs (basically P5 PMCs) onto it, then you do call_sv(the_sub_sv, flags) 04:51
so if I can just iterate over all passed arguments, I'm fine for callin arguments
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:52
Austin Okay.. 04:53
And you're in C, on the Parrot side of the fence?
sorear yes 04:54
Austin So you want to get a single RPA (ResizablePmcArray) with all the args in it..
sorear or something that I can access like one, yes 04:55
and I want to get a RPA for all the return values after VTABLE_invoke
Austin You want Ps
as a signature
sorear I want an infinite number of Ps, right
how do I say that 04:56
Austin Ps
sorear oh
Austin The "s" stands for slurpy
Do a perldoc of call/pcc.c
sorear mm 04:57
odd, it doesn't look like Parrot_pcc_build_sig_object_from_varargs even implements slurpy return or named arguments 05:01
Austin Heh
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
As opposed to building something that wraps the va-list.
(Which would probably have to be a pmc type) 05:03
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"))
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)
and these PMCs will implement invoke and be passed around 05:06
Austin Okay. So you're making a kind of P5sub pmc?
sorear yes
Austin So your invoke vtable gets called, with whatever args.
That's positively simple..
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
I just need to handle the other three cases
and I'm kinda stuck
yes
invoke vtable gets called
what next? 05:09
05:11 kthakore joined
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:11
sorear PARROT_CANNOT_RETURN_NULL 05:12
static void
dissect_...
is this wrong?
chromatic Looks wrong. 05:13
cotto quite
sorear src/call/args.c :736
Austin You need to do what get_params does, whatever that is. 05:14
sorear exactly 05:15
I can't figure out what get_params et al are doing
or how to do it without an opcode
chromatic Why are you doing this the hard way and not using NCI to wrap Perl_call_sv? 05:16
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
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.
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.
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
Regardless, the hard way of invoking Perl 5 subs from Parrot is to write your own PCC to P5CC thunk marshaller/demarshaller.
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 ... ?
sorear Except that, in order to write a CCC to P5CC thunk marshaller/demarshaller, I would need a full FFI.
So I'm actually even worse off.
Austin: yeah, the problem is that the fully featured args code requires it have an op available to interrogate. 05:25
chromatic: and the NCI can't handle variable length argument and return lists at present anyway 05:27
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:29
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:30
Austin ? 05:31
This is core.ops::get_params?
Because the only fork in that code path is for tailcalls.
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
I can't call that function because I don't have an opcode_t*
Parrot_pcc_fill_params_from_op does not share much code with the C PCC API
and has a different set of features
Austin Okay.
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*
are you telling me to cast a pmc to that type
Austin Here's a question: What if you wrote the vtable in pir, and then nci-called with a single (RPA) parameter?
sorear because I don't think it will work
Austin (cast a pmc: no) 05:34
sorear Austin: that
Austin: that's a very good question. 05:35
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
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.
Austin Maybe you need the test to be executable. 05:38
edit the #! line and chmod+x it?
chromatic +x shouldn't matter
Tene try using -e
Austin No?
chromatic I can't recall anything in Test::Harness that checks -x. I do know it checks the #! line. 05:39
Austin so maybe prove -e parrot-nqp 05:40
WFM
prove -e parrot-nqp t/Program.nqp
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.
Austin Heh
05:41 sorear joined
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
Austin coughs! 05:42
cotto Is there an easy way to import subs from another namespace in nqp? 05:49
Austin With, or without, using kakapo?
cotto without
Austin NameSpace pmc's offer an export_to method.
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
See runtime/language/parrot
cotto it's just for using Test;More in nqp
Austin ?
sorear did I miss the Answer? 05:52
cotto using plan(2); instead of Test;More;plan(2);
Austin gitorious.org/kakapo/kakapo/blobs/m...stcase.nqp 05:53
See the init block at the top
cotto That's what I was hoping for. Austin++ 05:54
dalek rrot: r45076 | cotto++ | branches/profiling_testing (3 files):
[profiling] commit some initial profiling testing code, doesn't test anything meaningful yet
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
Austin Heh. 05:58
Tene I was going to work on figuring all that out, but then other stuff happened.
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.
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.
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
sorear I've already come up with a few things Blizkost needs 06:03
they're pretty small though
Austin sorear: You mean for importing pbc, or in general?
sorear I think that PDD-31 will be much better understood once it's actually happening
Austin Hmm.. And now I have a tree matching library. 06:05
Kakapo grows one step closer to total world domination... 06:06
I should probably add a windowing UI...
sorear Is it just me, or is PIR trying to replace Perl 6?
chromatic Just you. 06:07
sorear imagines writing apps with PIR and Kakapo
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
Austin Thanks, purl
06:08 eternaleye joined
dalek kapo: d0ab692 | austin++ | (8 files):
* Added Matcher::P*T::Node modules in src/Matchers/PctNodes.nqp - for tree matching.

  * Added global 'hash' function
Signed-off-by: Austin Hastings <Austin_Hastings@Yahoo.com>
06:19
06:32 payload joined
dalek kapo: d0a927e | austin++ | (3 files):
Added Integer::int global function.
06:41
sorear Adding dynops is relatively cheap, right? 07:17
cotto What do you mean by "adding"? runtime cost? 07:18
sorear I mean loading a library that provides them
cotto I'd never thought to profile that. it's an interesting question. 07:19
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:21
cotto You can go the simpler route now and switch to NCI later if performance isn't acceptable. 07:22
sorear right
cotto It doesn't appear to be very expensive. 07:28
night 07:29
dalek rrot: r45077 | chromatic++ | trunk/ext/Parrot-Embed/Build.PL:
[ext] Made Parrot::Embed compile and link against Parrot when built in-tree.
07:34
rrot: r45078 | chromatic++ | trunk/ext/Parrot-Embed (2 files):
[ext] Fixed Parrot::Embed to use current embedding API; temporarily commented
08:01 rt7 joined
sorear Is there any deep reason why you can't use NQP for vtable overrides? 08:13
moritz sorear: probably because NQP tries to be a Perl 6 subset, and Perl 6 has no notion of vtables... 08:17
sorear: maybe one could come up with a trait syntax still
something like method foo() is :vtable<get_string> { ... }
but I have no idea how hard that would be to implement
sorear IMO NQP should be like Perl-- 08:33
C-- is a superset of C in a few places...
Austin sorear: Not only can you use nqp for vtable overrides, I've done it. 08:44
It's very easy.
(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?
Austin bide.. url coming 08:48
gitorious.org/kakapo/kakapo/blobs/m...qp#line140 08:49
See line 155 in particular
The has_vtable sub is here: gitorious.org/kakapo/kakapo/blobs/m...qp#line231 08:50
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:51
But the "add_vtable_override" code is a built-in method on Class.pmc, so you can just call it from PIR, etc. 08:52
09:06 bacek joined
bacek aloha 09:06
seen chromatic
purl chromatic was last seen on #parrot 2 hours, 59 minutes and 41 seconds ago, saying: Just you.
dalek rrot: r45079 | bacek++ | branches/pcc_hackathon_6Mar10/lib/Parrot/Pmc2c/Attribute.pm:
Low-hanging fruite for 3% performance improvements: reorder GETATTR macros to favour non-objects.
09:13
rrot: r45080 | bacek++ | branches/pcc_hackathon_6Mar10 (5 files):
Remove CallContext.results_signature. It's not used anymore
rrot: r45081 | bacek++ | branches/pcc_hackathon_6Mar10/src/call/args.c:
Poke in CallContext.num_positionals directly. Yet another little bit performance improvement.
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.
something like Parrot_ext_call(..., "Ps->Ps", args, returns); 09:17
where C<returns> is RPA
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)
there is not
sorear worth me trying to fix it?
or deliberate omission? 09:19
bacek Check pcc_hackatron branch
We reordered ops to be little bit more "natural"
sorear how do I switch branches in svn? 09:20
bacek sorear, no idea. I'm using git-svn
sorear good idea, I should do the same 09:21
it'll at least make this whole pending patches thing less irritating
bacek There is semi-official git clone of parrot svn by dukeleto.
You can try it
github.com/leto/parrot 09:22
This one
sorear ty
bacek: so, when can I start depending on pcc-hackathon-6Mar10? 09:33
bacek in couple of hours 09:34
sorear ooooooh
moritz bacek++ is our mad coding machine :-)
bacek Or, officially, from 2.3
09:35 iblechbot joined
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
sorear it depends on a patch that japhb has promised to review "tonight"
(the RTLD_GLOBAL binding, if you follow -dev@) 09:36
bacek moritz, can you try rakudo at r45082? 09:40
moritz bacek: is that in the branch? 09:41
bacek yes
moritz bacek: i have a few things running atm, but once they are through I can try
bacek moritz, ok 09:42
dalek rrot: r45082 | bacek++ | branches/pcc_hackathon_6Mar10 (3 files):
Implement op set_result_info
09:46
TT #1511 closed by bacek++: op result_info is broken in pcc_hackatron branch. 09:52
TT #1511: trac.parrot.org/parrot/ticket/1511
10:11 he_ joined
dalek rrot: r45083 | bacek++ | branches/pcc_hackathon_6Mar10 (55 files):
Sync branch with trunk.
10:19
moritz bacek: sshould I try rakudo on r45083, or on something older? 10:20
bacek moritz, I have locally merged branch. As soon as you'll give "green light" on Rakudo I'll dcommit it 10:22
moritz bacek: ok 10:23
bacek 45083 is preferable 10:24
It's merged trunk with branch
moritz that's what I'm build rakudo on right now
bacek moritz, ok 10:26
dalek kudo: e877b2a | (Solomon Foster)++ | src/Perl6/ (2 files):
Move the <infix_prefix_meta_operator> <infixish> into the <infix_prefix_meta_operator> tokens themselves.
10:28
kudo: 6be8f8c | (Solomon Foster)++ | src/Perl6/Grammar.pm:
Proper precedence for !op, Rop, and Sop. jnthn++.
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
make: *** [perl6.pbc] Error 127
bacek moritz, sigh... This one was removed as part of reorder. 10:30
moritz and replaced by...? 10:31
bacek :call_sig 10:33
purl i think :call_sig is different, it specifies the signature of the subroutine as taking a single PMC
bacek let me check and try to patch rakudo for latest "API" 10:36
nopaste "bacek" at 114.73.8.126 pasted "Rakudo patch for moritz++" (85 lines) at nopaste.snit.ch/20023 10:49
bacek moritz, can you try nopasted patch? 10:51
moritz just a sec
bacek moritz, basically just removed references to get_results_signature 10:53
s/ / I /
Bed time... 11:03
purl rumour has it bed time is probably a good idea
bacek I'll commit it tomorrow if noone beats me
moritz bacek: build worked... now running spectest 11:04
bacek: seems to break autothreading - t/spec/S03-junctions/associative.t and other junction tests fail 11:05
dalek rrot: r45084 | fperrad++ | trunk/runtime/parrot/library/distutils.pir:
[distutils] refactor for parallel build (step 1)
11:08
11:15 jan joined 11:29 muixirt joined
muixirt good morning 11:29
anybody working on bindings for a gui tk? 11:35
11:46 Whiteknight joined
Whiteknight good morning, #parrot 11:46
muixirt hi Whiteknight
Austin ciao, whiteknight
Whiteknight hello muixirt, Austin
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:50
Whiteknight nice 11:52
I'll have to read the diffs
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
11:54 clinton joined
Whiteknight that sounds quite interesting. So I can call Program.set_main while the program is already running? 11:56
so, it creates a sub-program in a sense?
Austin Umm, no.
You create a new program, and use set_main to configure it.
dalek rrot: r45085 | whiteknight++ | branches/compact_strings:
Creating a branch to play with the string compactor and the ugliness therein
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
I don't recall if you were postprocessing the output of files individually, or waiting until the end...
Whiteknight I was processing them individually 11:59
but, always ways around that
Austin So then you'd rewind the stdout stringhandle after each call.
Anyway, that's enough of me talking about me. Let's talk about you... 12:00
What do *you* think of me...?
:)
12:00 lucian joined
Austin How's the whole PLA thing going, anyway? 12:00
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?
Whiteknight It's a unique design 12:04
I want them to be generally consistent
Austin Always (row, col) then? 12:05
:)
Whiteknight yeah
dalek kudo: 6a8049b | moritz++ | t/spectest.data:
track name changes of test files
12:06
kudo: 760b272 | moritz++ | docs/running.pod:
[docs] fixed a typo in running.pod reported in <bugzilla.redhat.com/show_bug.cgi?id=574547>, gerd++
kudo: 547069d | moritz++ | t/spectest.data:
more passing test files
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
indexing row-column is just a good point of consistency
Austin Okay. That's what I was wondering about, when I asked if you were stuck with somebody else's design..
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!
Whiteknight without kakapo, that wouldn't really be possible :)
Austin So what's next, development wise?
Whiteknight multi-dimensional matrices, mostly 12:11
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
I'm hoping for a single type 12:13
dalek rrot: r45086 | whiteknight++ | branches/compact_strings/src/gc (2 files):
apply a patch from chromatic++ for testing
Austin Sounds sensible. 12:14
Whiteknight but we run into a lot of problems with that, especially if we allow dynamic resizing 12:15
Austin Really?
Whiteknight yeah, because a matrix wants to be "square"
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..
Whiteknight that's basically what we do now
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
I don't know
Austin All the stuff I've ever had to do was usually graphics, and the matrices were fixed sizes. 12:18
Okay.
Hey, you still interested in that gig in Penndel? I never got a resume from you.
Whiteknight In general my philosophy has been "fast if you preallocate, slower if you grow dynamically"
oh, yeah. I never sent one. I meant to 12:19
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.
Whiteknight ok
Austin Hey, what's a good syntax for multi-dimensional keys in C? 12:23
I've been thinking about using '::' as a delimiter. It's logical, but looks weird.
Whiteknight what? 12:25
in C?
purl in C is there some rational choice between for (;;){...} and while(1){...}?
Austin Well, close. but yeah
Whiteknight Ah, Close. You can't use just "[a, b, c]"? 12:26
Austin Technically, comma means sequential execution.
Whiteknight you're back on the Close train now?
Austin Yep
Whiteknight awesome. I've been looking forward to it since damn YAPC
Austin For all the glory of Kakapo, it's in service of close.
Me, too. 12:27
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.
Then rewrote when -rx showed up. :) 12:29
Whiteknight yeah 12:31
Austin x = foo[1::2]; 12:32
Ugh
x = foo[1; 2];
Whiteknight yeah, don't think I like that one
Austin Better.
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.
highlight, highlight, delete
Whiteknight I need to do that all for matrixy too
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
Austin Is the PCC stuff going to be visible? 12:36
Or, wait, you're doing C stuff, right?
Whiteknight no, no C stuff
It's not really going to be visible 12:37
Austin Here's a fun one: Null PMC access in get_number() 12:38
Run time error, due to typo that compiles...
Whiteknight ?
Austin Welcome to perl...
Every possible sequence of input characters is a valid program... 12:39
I had this: :grammar(%adverbs<parsegrammar),
Whiteknight haha
Austin What I meant, was this: :grammar(%adverbs<parsegrammar>),
Whiteknight treated "parsegrammar" as a 0-arity sub 12:40
classic
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:41
Whiteknight oh, nice 12:42
I have to go, be back later
Austin bye
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
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:00
Austin arnsholt: neither. There's a wiki page on the "Hll Resources" page. 13:17
trac.parrot.org/parrot/wiki/Creatin...h%20NQP-rx 13:18
The example is somewhat long, because it shows the whole shared/notshared thing. You want the sub, and the pir::newclosure
Whoops. 13:19
Nevermind. I saw "continuation" and read "closure. 13:20
my bad.
arnsholt No problem =) 13:21
This is probably useful knowledge as well
Austin The problem with a Continuation will be the set_addr 13:22
You'll have to give it a sub, or drop into inline PIR.
my $c := pir::new__PS('Continuation); pir::set_addr__vPP($c, &foo); 13:23
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.
What are you wanting to do with it?
arnsholt So far my solution was to have Q:PIR{label:} a bit further down in the code
Whiteknight doing continuations from NQP would be hot
Austin Arnsholt: Beware that inline PIR isn't as inline as you think... 13:25
Whiteknight I thought Q:PIR made a nested sub
arnsholt Austin: I'm toying around with unification
Austin It used to make a nested eval...
It may still.
arnsholt In the generated PIR I get with my basic inlines it is inlined
Austin Have you tried the label in line yet?
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 =)
Austin Heh.
Whiteknight does NQP have support for labels?
Austin Whiteknight: no.
Unless you do Q:PIR { label: }
apparently
:)
arnsholt I've seen people do the inline labels in #perl6 (I think), so it should work 13:27
13:29 theory joined
nopaste "Austin" at 68.39.12.202 pasted "Here is how you test a compiler" (16 lines) at nopaste.snit.ch/20024 13:32
Whiteknight nice 13:34
Austin I had to hack the compiler to get the parse rule to support :rule 13:35
That's present in Regex but not in the legacy PCT compiler code.
And then I built the past tree matching code as a Matcher, so I can do var(...) and stmts(...) and so on. 13:36
13:40 iblechbot joined
Whiteknight where does the matcher get called? 13:41
Austin assert_match calls it internally.
assert_match( $item, $matcher, $message)
becomes fail($message) unless $matcher.matches($item) 13:42
more or less
purl thereabouts
Austin The function "var( name => $name )" is building the matcher. 13:43
("var" builds a PAST::Var matcher, etc.)
Whiteknight so var(name=> $name) is a matcher?
ok
Austin Yeah.
node_type = PAST::Var, and attribute{name} == '$name' 13:44
Whiteknight where is var defined?
Austin src/Matchers/PctNodes
gitorious.org/kakapo/kakapo/commit/...32b42f8d43 13:45
What I don't have, but would like to have, is some kind of "find this in any subtree" mechanism. 13:48
dalek kudo: d296602 | (Solomon Foster)++ | src/ (2 files):
Reorganization of !op, Rop, Xop, and Zop in preparation for a refactor.
kudo: 2067a57 | (Solomon Foster)++ | src/core/metaops.pm:
Switch Mu $a to Mu \\$a in the notresults and reverseargs functions, as per jnthn++'s advice.
Whiteknight yeah, a subtree "searcher" would be a nice thing 13:53
Austin The problem is reporting failure. 13:54
Do I report "nope, couldn't find any" 13:55
Or do I report, "here's how every single one of them was inadequate..........."
Whiteknight "Or El Duderino, if you're not into that whole brevity thing"
Austin :) 13:56
Maybe a heuristic
13:56 Mokurai joined
Austin If the match is a subtree, then require an exact match at the top. 13:57
If not a subtree, require the right node type...
like:
parse: "foo(1, 2, 3, 4)"
match somewhere_in_tree( param( value = 5 ) ) 13:58
four params, four failures
Maybe a separate threshold matcher. Don't report a failure unless this much matches.. 13:59
That makes sense.
Then tune the default threshold... 14:00
I wonder how this ties in to the combinators I was using already.. 14:01
Whiteknight that sounds good 14:02
arnsholt Is fail a keyword in NQP?
Austin Not that I know of.
It was a keyword in some old perl6regexes, but has since been removed.
moritz arnsholt: seems like not - see #perl6 p6eval output
arnsholt Good idea. Thanks 14:03
Austin It's such a useful verb, though, that I use it in my UnitTest library...
arnsholt Quite. Here it's for non-deterministic search 14:04
Austin Prolog? 14:05
purl Prolog is pretty darned weird.
arnsholt Austin: That's what I'm hoping for
But I've only spent about two hours on this so far, so it's not quite there yet =)
purl: Indeed. I love it =) 14:06
purl arnsholt: huh?
arnsholt Huh @ what? 14:08
purl @ is necessary
14:13 dalek joined
Whiteknight purl is a bot 14:13
purl, purl?
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
arnsholt Yeah, that dawned on me =)
Whiteknight purl, arnsholt? 14:14
purl whiteknight: no idea
Whiteknight purl, whiteknight?
purl whiteknight is, like, mailto:wknight8111@gmail.com or the grand master funk or wknight8111.blogspot.com/
Austin arnsholt is probably tired of people making jokes about his handle 14:15
arnsholt?
purl arnsholt is probably tired of people making jokes about his handle
Whiteknight purl arnsholt?
purl i heard arnsholt was probably tired of people making jokes about his handle
Austin botsnack
purl :)
Austin good purl
purl Aw, shucks, Austin. *blush*
arnsholt Now that's a pretty cool bot
Whiteknight karma arnsholt
purl arnsholt has karma of 7
Whiteknight karma Austin 14:16
purl austin has karma of 317
14:25 brianwisti joined
Whiteknight Austin: you ever been to peddler's village? 14:28
Austin Um, no. 14:29
That's over just on the other side of the river, right? I can't remember the name of the town..
Whiteknight New Hope
purl hmmm... New Hope is a bit of a ways from here, Easton the same. Levittown is where I am.
Austin 11am - 5pm Sundays 14:30
Whiteknight we're heading there today with the kid, take him for the walk 14:31
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
...which probably burns the same amount of calories
Austin There you go. 14:33
Like a cat.
14:33 davidfetter joined
Austin Amazon is selling an all-in-one laser printer for $99 14:33
Humorously, the "X25" refill cartridges cost $70 14:34
So apparently, the printer itself is only worth $29... 14:35
moritz or the cartridge isn't full
Whiteknight doesn't suprise me, printers are all garbage
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.
Yeah.
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:37
Hmm..The default NQPrx expression parser is very intolerant of spaces... 14:40
Whiteknight realy? 14:41
Austin Seems that way.
Whiteknight how so?
Austin Whitespace is only for infix ops.
++x -> ++ x
No space for you!
Whiteknight oh 14:42
okay, I'm heading out for our walk. Be back later
Austin prefix and postfix don't get any .ws love..
Have a good walk, Whiteknight
moritz Austin: that's probably because in Perl 6 you're not allowed to have spaces before the postfix op 14:43
as disambiguation against infixes
Austin Heh.
Well, in some-language-other-than-perl, it's less of a problem. 14:45
But 'new' is considered a prefix operator, and I would like to put a space after it...
:)
moritz Austin: rule prefix:sym<new> { <sym> } 14:46
Austin yeah
I've just been dropping <.ws>
Maybe you know this:
Can I mix rule and token syms?
proto token foo { <...> } 14:47
rule foo:sym<a> {...} ??
moritz Im quite sure you can
Austin Yeah, but *should* you be able to? 14:48
What NQP permits is not always a good learning aid...
You have any idea how to debug the EXPR_reduce function? 14:49
moritz nope :( 14:50
Austin Bah
This is why I did it top-down the first time.
14:50 dalek joined
dalek kudo: a61c40c | (Solomon Foster)++ | src/Perl6/Actions.pm:
infix_prefix_meta_operator refactor!
14:54
15:01 tetragon joined 15:38 parthm joined
japhb sorear, ping 15:47
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.
dalek ose: r192 | Austin_Hastings++ | branches/austin:
Moved to personal branch
16:06
Austin karma Austin_Hastings 16:07
purl austin_hastings has karma of 134
16:28 Psyche^ joined 16:35 parthm left 16:49 Mokurai1 joined 17:00 jan joined
davidfetter hello 17:02
is there a repo of images for parrot's mascot parrot? 17:03
17:16 patspam joined 17:51 bacek joined
nopaste "arnsholt" at 81.234.214.29 pasted "Non-functional non-deterministic search" (82 lines) at nopaste.snit.ch/20025 18:19
arnsholt Does anyone have an idea why this doesn't work? 18:20
The choose sub finds the right values, but for some reason the return value isn't the same 18:21
Austin Looks like a nest of snakes to me. 18:34
arnsholt Yeah, sorry 'bout that =) 18:35
Continuations make my brain itch as well 18:37
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
Which is what happens on the inside of choose(), but for some reason the return value doesn't change...
dalek kudo: 9780625 | (Solomon Foster)++ | src/core/metaops.pm:
Rework hyper so that it properly handles cases with differing numbers of elements on each side.
18:46
18:52 Psyche^ joined, snarkyboojum joined
Austin arnsholt: I just watched it in trace, and yeah, it's screwing up. 18:54
That said, I have no idea what the expected behavior is, never mind the actual behavior. 18:55
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 \\)
Austin Sez you.
arnsholt Well, intended behaviour
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...
Heh.
Your modesty is becoming, but misplaced.
dalek kudo: 0d10ff6 | moritz++ | src/core/IO.pm:
enable printf() again
18:58
kudo: 3c9f65b | moritz++ | src/core/operators.pm:
small fix in series operator
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...
Especially if you're doing this stuff, which I'm not touching, and I don't think partcl deals with.
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.
What timezone are you in?
arnsholt Europe
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:01
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.
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 /
arnsholt Right. That's probably a bit late, even for me
Austin So Bacek is just about to get up and go to work. He might show up in 2-3 hours.
arnsholt Hmm. I'll probably be around then
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.
arnsholt Good idea, that
Thanks for the help!
Austin He just dropped a big pcc-related commit on trunk, so maybe he's feeling guilty..
By the way, are you on a release or on trunk?
arnsholt Trunk 19:05
Austin Okay.
A better argument for "your changes screwed up my hll!"
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?
(IIRC, there's like 2 continuation tests... :) 19:07
arnsholt Oooh, another good idea
Yeah, two very simple testcases for continuations 19:09
Austin but look for coroutines, see if there's something there... 19:11
arnsholt Hmm. More tests for that 19:12
19:13 tetragon_ joined 19:43 snarkyboojum joined 19:52 iblechbot joined 20:16 joeri left
sorear japhb: pong 20:18
20:30 kjeldahl joined
GeJ_ Good morning everyone. 20:37
clock?
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
dukeleto 'ello 20:41
20:51 eric_j joined 21:01 payload joined
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:05
21:15 hudnix joined 21:35 Whiteknight joined
Whiteknight good afternoon, #parrot 21:35
arnsholt Whiteknight: I was told you're one of the people to talk with about continuations 21:37
That right?
Whiteknight sure, what do you want to talk about? 21:38
arnsholt I'm poking at starting a HLL project (a Prolog) 21:39
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
See: nopaste.snit.ch/20025
21:40 Andy joined
arnsholt choose() stores continuations that are invoked each time fail() is called, effectively giving backtracking 21:41
choose() gets the right elements, but for some reason the value returned to blob() is always the same
(I tried removing the .tailcall, but that doesn't change anything) 21:42
Does there look like anything's wrong with my code?
Whiteknight okay, give me a rundown of what happens in this code 21:44
dalek kudo: 70dd723 | (David Romano)++ | src/core/Array.pm:
[src/core] indentation fix
21:46
kudo: af16e57 | (David Romano)++ | src/core/operators.pm:
[src/core] Define ne in terms of !eq
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
Then it returns the value
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
21:53 snarkyboojum joined
arnsholt (additionally, choose() calls fail() when the list of options is empty) 21:55
Does that clear things up? 21:57
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:58
The first is the value selected inside choose(), the second is the value we get on the outside, in blob() 21:59
Whiteknight This is a good question, I can't see what is wrong 22:04
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
Whiteknight I think the return value is getting crapped up, but I can't see why. 22:08
arnsholt Thanks for the help 22:11
Now at least I'm a bit closer to figuring this out
Whiteknight My suggestion is this: Convert choose to a coroutine and yield values back to blob in a loop 22:13
create the continuation inside blob, not choose
that way you aren't continuing inside choose and worrying about the return value
arnsholt Very good idea 22:14
dalek rrot: r45087 | plobsing++ | trunk/ext/Parrot-Embed/t/interp.t:
fix codetest error
22:15
rrot: r45088 | plobsing++ | trunk/src/nci/api.c:
missing NCI thunks are an exception, not a panic
Whiteknight It's not good, because this should work and it's a workaround
but, I think it will work for you for now
File a bug report
arnsholt I'll do that
Try to boil it down to something more concise 22:17
Heh. Replacing Continuation with RetContinuation gives a segfault 22:18
But then again, RetContinuation is outdated, no? 22:19
Whiteknight RetContinuation is extremely specialized to handle returns only 22:21
(though that's important information too. File another ticket for it 22:22
it shouldn't segfault
arnsholt Yeah, those are generally a bad sign
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
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:25
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.
Whiteknight japhb: what am I maybe doing? 22:27
japhb Whiteknight, committing a patch for sorear
sorear purl, erase message 22:28
purl sorear: huh?
sorear purl, messages
purl, help
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
Whiteknight sorear: nopaste the patch and I'll look at it ASAP
sorear purl, link me to your source code and/or documentation
purl sorear: excuse me?
japhb sorear, you want 'messages erase'
sorear ah thanks
Whiteknight: svn diff preferred format? 22:29
Whiteknight yeah
japhb OK, now I've really got to run, sorry.
sorear pastie.org/880205 a couple days old but still applies cleanly
arnsholt Whiteknight: Yeah, I've got disk space to spare for a bit of code 22:30
plobsing sorear: I looked at your patch with the intent to commit it, but I have some objections. 22:37
dalek kudo: 12b6d27 | moritz++ | src/glue/run.pir:
re-instatiate $*EXECUTABLE_NAME
22:41 AndyA joined
arnsholt What's the canonical way of stringifying an int in PIR? 22:42
22:43 AndyA joined
plobsing arnsholt: $S0 = $I0 seems to work 22:43
22:43 AndyA joined
arnsholt Dur. Good suggestion 22:44
sorear plobsing: Good 22:45
plobsing: I need feedback
22:46 AndyA joined
sorear plobsing: replied 22:53
cotto massages 23:06
purl hmmm... massages is wrong.
cotto I disagree.
dalek kudo: 92745eb | jonathan++ | src/ (3 files):
First cut of prefix and postfix hyper-operators. Parsing should all be fine, implementation probably needs tweaking for nested arrays.
sorear plobsing++ helping with documentation 23:10
arnsholt "'P1' is only a valid register name in PASM mode" What does that mean? 23:15
Can you only use a single unnamed register in PIR? 23:16
plobsing arnsholt: the syntax is "'$P1'"
sorear in PIR register names have sigils
arnsholt D'oh! I looked for it and missed it
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:17
arnsholt Ah, I see 23:20
23:25 kid51 joined
dalek rrot: r45089 | plobsing++ | trunk (10 files):
provide access dlopen RTLD_GLOBAL flag
23:37
NotFound plobsing: That thing shouldn't be declared experimental? 23:42
dalek kudo: 53707fb | jonathan++ | src/Perl6/Grammar.pm:
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
arnsholt Whiteknight: See trac.parrot.org/parrot/ticket/1521
Could it be that the Continuation resumes from a slightly off position (ref. bug.pir)? 23:48
Whiteknight maybe 23:51
when a call is made currently, pointers to the registers to receive the return values are passed
so somehow the subsequent calls are not passing values to those original pointers 23:52
What I think is this: Because you only call choose once, it only sets up those return pointers once
plobsing NotFound: good point. 23:54
23:55 jan joined 23:57 theory joined
dalek TT #1521 created by arnsholt++: Continuations interact badly with .return 23:58
TT #1521: trac.parrot.org/parrot/ticket/1521