Camelia, the Perl 6 bug

IRC log for #parrot, 2010-01-24

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:10 payload joined #parrot
00:39 cognominal joined #parrot
00:42 kid51_at_dinner msg Coke Please see r43577: realclean;configure;make;clean;make works for me
00:42 purl Message for coke stored.
00:45 kid51 Smolder, at least intermittently, is giving proper feedback and not timing out.
00:46 cconstantine How would I go about creating a non-anonymous function declaration in PAST?  I set the subid, but it still has a :anon in the generated PIR
00:48 dalek parrot: r43577 | jkeenan++ | branches/one_make/config/gen/makefiles/root.in:
00:48 dalek parrot: 'clean' target has been deleting files which are still being created during
00:48 dalek parrot: configuration (gen::opengl).  Patch removes two files from 'clean' target and
00:48 dalek parrot: re-enables successful 'make' after 'make clean'.  This is valid on assumption
00:48 dalek parrot: that gen::opengl will continue to create those files.
00:48 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43577/
00:53 Tene cconstantine: :name('foo')
00:59 PacoLinux joined #parrot
01:04 dalek parrot: r43578 | coke++ | branches/one_make/tools/dev/checkdepend.pl:
01:04 dalek parrot: Re-add XXX removed in 43575 ; this is a todo in a branch; it'll get a ticket
01:04 dalek parrot: or a TODO on the wiki or something if it's not done before mergeback.
01:04 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43578/
01:07 Coke cotto_w0rk: tools/dev/checkdepend.pl is barfing.
01:07 Coke ok 153 - compilers/tge/TGE/Rule.pir has correct dependencies (.
01:07 Coke Use of uninitialized value $rule_deps in split at tools/dev/checkdepend.pl line 261.
01:07 dalek TT #1413 created by jkeenan++: Convert planet.parrotcode.org to planet.parrot.org
01:14 LaVolta joined #parrot
01:46 cconstantine Tene: I forgot!  that worked, thanks! :)
01:56 cognominal joined #parrot
02:02 cotto joined #parrot
02:17 eternaleye joined #parrot
02:21 nopaste "kid51" at 70.85.31.226 pasted "checkdepend.pl: This patch makes uninitialized value warning go away -- but is it what we want?" (158 lines) at http://nopaste.snit.ch/19340
02:22 kid51 sorry, wrong paste
02:22 nopaste "kid51" at 70.85.31.226 pasted "checkdepend.pl: This patch makes uninitialized value warning go away -- but is it what we want?" (19 lines) at http://nopaste.snit.ch/19341
02:23 kid51 that's more like it
02:24 cotto that's fine
02:28 cotto I'll apply that.
02:29 cotto actually, you can.  I have some other stuff going on in that file and we haven't switched to git yet.
02:34 * kid51 grows old waiting for 'svn diff' to complete on orderedhash_revamp branch ;-)
02:36 cotto If you don't feel like committing, the change will go in next time I commit.
02:39 kid51 It's on its way
02:41 dalek parrot: r43579 | jkeenan++ | branches/one_make/tools/dev/checkdepend.pl:
02:41 dalek parrot: Check for truth (non-empty string) on rule dependencies, rather than definedness.
02:41 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43579/
02:53 cotto good use of apostrophe
02:58 cotto anyone up for a makefile question?
02:58 nopaste "cotto" at 96.26.227.153 pasted "is this a valid rule?" (10 lines) at http://nopaste.snit.ch/19343
03:00 cotto make doesn't seem to choke on it, fwiw
03:03 cotto Bah.  The tool is already approaching a reimplementation of make and it's still not catching some stuff.  I'm wondering if this is the right approach.
03:11 plobsing joined #parrot
03:12 kid51 By 'the tool', do you mean checkdepend.pl?
03:12 cotto yes
03:12 Coke what does r43579 buy us?
03:12 kid51 It eliminates the uninitialized value warning you were getting.
03:12 kid51 Nothing else.
03:12 purl nothing else is probably counting how many hours scrottie's computer has been on!  SMART rules!
03:13 Coke that works.
03:13 Coke cotto_w0rk: why would that not be a valid rule?
03:14 cotto I'm not especially familiar with makefile syntax
03:14 cotto It looked valid from what I could find but I wanted to verify.
03:17 Coke A : B is pretty basic.
03:18 Coke (you can always just do a make clean, make <target> to see.)
05:25 chromatic joined #parrot
06:09 cconstantine anyone left in here?
06:10 cconstantine I'm attempting to invoke a compiler directly and run the resulting code.... I know I'm getting back a block (defining a sub).  How do I go about executing it?
06:12 cconstantine http://github.com/cconstantine/Reason​/blob/master/src/pct/actions.pm#L204
06:12 cconstantine replcaing 'magic goes here' with a call to the generated function
06:14 cotto does $code() not work?
06:16 cconstantine it does not
06:17 cconstantine well... I'm defining a func with 1 arg
06:18 cconstantine $code() gives me a 'not enough args' error
06:18 cconstantine $code(1) gives me a 'Null PMC access in invoke()
06:27 cconstantine got it!
06:27 cconstantine i wasn't setting the HLL for the block
06:36 cotto happy
06:39 cognominal joined #parrot
07:48 dalek parrot: r43580 | cotto++ | branches/one_make/tools/dev/checkdepend.pl:
07:48 dalek parrot: [checkdepends] add line and file info to output
07:48 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43580/
07:53 fperrad joined #parrot
08:25 joeri joined #parrot
09:06 chromatic joined #parrot
10:10 AndyA joined #parrot
12:16 muixirt joined #parrot
12:16 muixirt hi
12:16 purl bonjour, muixirt.
12:16 muixirt what version of prove does setup.pir need?
12:39 kid51 joined #parrot
12:42 Whiteknight joined #parrot
12:56 LaVolta joined #parrot
13:28 muixirt hi Whiteknight
13:30 Whiteknight hello muixirt
13:31 muixirt sorry for my comments :-)
13:31 Whiteknight it's okay. Parrot needs criticism
13:31 Whiteknight it's healthy
13:31 Whiteknight things have been moving relatively slow lately, I have noticed that
13:48 Austin joined #parrot
13:48 Austin moo
13:49 muixirt hi Austin
13:49 Austin Hi muixirt.
13:49 muixirt is 'Close' active?
13:49 Austin I think that the FPA .sort() method should return self.
13:49 Austin mux: not at present. I'm working on kakapo so I can (eventually) get back to close.
13:50 muixirt kakapo?
13:50 purl kakapo is a program framework, runtime library, and collection of useful functions for NQP programs.
13:50 Austin In particular, I would like to be able to do this:  7 for %hash.keys.sort { say($_); } 0
13:51 Austin Right now, RPA inherits FPA.sort, which returns nothing.
13:52 Austin muixirt: kakapo is a RTL for NQP programs. I extracted a lot of utils from the close compiler
13:57 Austin TT#1414
14:05 Austin Okay, this is weird. Why doesn't a parent class show up in the list?
14:07 kid51 Whiteknight: Can you look at http://trac.parrot.org/parrot/ticket/850 ?  Should we just close it?
14:08 dalek TT #1414 created by Austin_Hastings++: Change ??A .sort() methods to return self
14:08 kid51 Austin:  Re 1414:  what do RPA and FPA mean?
14:08 Austin Resizable/Fixed Pmc Array
14:08 kid51 Given that I had to ask that, you might want to clarify that in ticket.
14:10 Austin I added a note
14:11 kid51 thanks
14:12 kid51 Is this issue related at all to that in http://trac.parrot.org/parrot/ticket/218 ?
14:12 Whiteknight kid51: looking
14:15 Austin kid51: No. #218 was a problem related to "internal" (C-level)  objects versus "external" (pir-level) objects. 1414 is simply a request that whatever the object type, the invocant should be returned after the sort. Currently, nothing is returned after the sort.
14:17 Austin While there *are* some sort-related TTs already, none of them that I saw (search: sort array) pertained to the return value.
14:26 Whiteknight it seems we need a bigger policy about the return values of mutator methods that modify a PMC in place
14:27 Whiteknight sort is just one example
14:27 Austin Good morning, Andrew.
14:28 Austin Q{ This compiler is built with the Parrot Compiler Toolkit, parrot revision 0. }
14:28 Austin Possibly a useless message. But at least it says parrot.
14:29 Austin I'd think that in-place modification should always return self. I'm thinking now about how to get self back from things like shift.
14:31 Austin Here's a question: If I find what I think is a bug in nqp (parrot-nqp), how do I know if it's a -rx bug, or an nqp bug?
14:32 cognominal joined #parrot
14:34 payload joined #parrot
14:39 kid51 Whiteknight:  http://trac.parrot.org/parrot/ticket/993  Can you respond to dukeleto?  Thanks.
14:41 cghene joined #parrot
14:52 fperrad joined #parrot
14:52 Whiteknight kid51, sure
14:56 dalek TT #643 closed by jkeenan++: Segfault while compiling fperrad's lua
15:06 cconstantine I'm trying to write a function that gets a PAST object as an argument and returns a PAST node who's value is the given PAST object... If I pass in the PAST object to a new PAST::Val as it's :value I get an "undefined identifier 'Capture'" error.  Is it possible to have a PAST Node who's runtime value is another PAST node?
15:08 cconstantine http://github.com/cconstantine/Reason​/blob/master/src/pct/actions.pm#L198
15:11 cconstantine I think I'm getting the PAST tree I want
15:12 cconstantine http://parrot.pastebin.com/d4951469b
15:12 Austin cconstantine: you can't do that.
15:13 cconstantine *pout*
15:13 dalek TT #681 closed by whiteknight++: Cannot use a PIR object for IO
15:13 cconstantine but I wanna?
15:13 Austin The Past::Value class expects something that it can store in a string and pass literally to pir
15:13 cconstantine hmmm
15:13 Austin So the :value has to be literal-compatible
15:13 cconstantine right
15:13 Austin (0x01, 1, "hello, world", etc.)
15:13 cconstantine which another PAST::Node isn't
15:14 cconstantine so mabe I want a PAST::Var ?
15:14 Austin Looks like you want an expression, no?
15:14 Austin But why the indirection?
15:15 cconstantine it's for the (quote <foo>) lisp form
15:15 Austin Okay. What's that?
15:15 purl that is the case, but I don't know
15:15 cconstantine a lisp macro is a function that returns a list that can be compiled
15:15 cconstantine so, a list like (PAST::Symbol .... )
15:16 cconstantine would compile to an invoke call on the PAST::Symbol
15:16 Austin Okay.
15:16 Austin So should you just store the string, and do an "eval" on it later?
15:16 cconstantine to write macros I need to be able to say: (list (quote say) (quote 1)) so that I get back a list of PAST nodes instead of they're values
15:17 cconstantine no, that would be the C way of doing macros (aka, "The Bad Way")
15:18 Austin Are you compiling this, or interpreting the AST?
15:18 cconstantine Aren't those kind of the same thing?
15:18 Austin Clearly not.
15:18 Austin Else I would not have asked.
15:18 cconstantine oh, not 'interpreting' like QBasic is interpreted
15:19 cconstantine I am compiling it
15:19 Austin Using the PAST/POST/PIR cycle?
15:19 cconstantine yup
15:19 Austin So how do you imagine the macros are going to work?
15:20 cconstantine when a programmer does a (defmacro foo (x) (list (quote say) x)) a macro named 'foo' is created
15:20 cconstantine the macro 'foo' is really just a function that is registered and available to execute at runtime
15:20 cconstantine I have that part working
15:20 cconstantine see the compile_defmacro form
15:21 cconstantine in the foo example the function returns a list whose first value is a symbol 'say'
15:22 cconstantine so when I call 'foo' later, the call to it is compiled and executed.  the returned value is a list and I continue compiling that list
15:22 cconstantine oh, I'm missusing 'compile' there
15:22 cconstantine I take that list to a PAST tree
15:22 cconstantine and I return that isntead of a call to foo
15:23 Austin But you don't really return a past tree, because what would anyone do with it? You need to return a sexp that will compile the list and return its result, no?
15:23 cconstantine right, the macro returns an sexp
15:24 cconstantine the call to 'to_past' takes that sexp and converts it to a PAST tree  http://github.com/cconstantine/Reason​/blob/master/src/pct/actions.pm#L271
15:24 Austin So I think you want to built a call to a function that does an eval, or a "compile the rest of this past tree" if you like.
15:24 cconstantine I have that
15:25 Austin So use that instead of your Past::Value node.
15:25 cconstantine the $code object created/stored in %?MACROS is invoke-able, so I just call exec_macro  on it
15:26 Austin FYI, looking at compile_node, it is possible to store subs in a hash table.
15:26 cconstantine yeah, I tried that for about 2 seconds and it didn't work
15:26 cconstantine I'll probably convert to that at some point
15:27 cconstantine I know the big if/else block is ugly
15:28 nopaste "Austin" at 68.37.46.53 pasted "subs in hash" (15 lines) at http://nopaste.snit.ch/19345
15:28 jan joined #parrot
15:28 cconstantine thanks :)
15:29 dalek TT #1415 created by coke++: parrot macport for 2.0.0
15:29 bacek joined #parrot
15:30 Austin So it seems like you've got this working.
15:30 Austin What's the problem?
15:30 purl well, the problem is that WikiDoc doesn't use Pod formatting codes, and I don't like to have two sets of formatting codes.
15:30 cconstantine hehe
15:30 cconstantine the only thing that isn't working is the 'quote' form
15:31 Austin The relationship between quote and defmacro is?
15:32 Austin Because it seems like quote might be a noop here.
15:32 cconstantine for me to be able to compile the sexpr returned by the macro I need to be able to quote symbols so i don't get back the value of the symbol (like the sub 'say' instead of the PAST::Var who's name is 'say')
15:32 Austin Ah, but in other cases you want the value, right?
15:32 cconstantine right
15:32 cconstantine sometimes I want the value... actually most of the time I want the value
15:32 Austin (defmacro foo (x) (quote say) x)
15:33 cconstantine something like that :)
15:33 cconstantine (defmacro foo (x) (list (quote say) x))
15:33 Austin So then quote has to defer ...
15:33 Austin Which means putting "say" into a PAST::Val
15:34 cconstantine to which (foo 'bar') would be rendered as a (Symbol<say> Val<'ba'>)
15:34 Austin But the result of "quote" can't be a value. It has to be a sexp that expands its first arg.
15:34 cconstantine the value of quote can be a PAST::Node type
15:34 cconstantine but that node's rvalue needs to be another PAST::Node
15:34 cconstantine or a PMC
15:34 Austin So you need an identity function?
15:35 Austin (quote x) => x
15:35 cconstantine not exactly
15:35 cconstantine (quote x) => Symbol(x)
15:36 cconstantine so it looks liek I need to create a block, and have the value of the block be the symbol
15:36 cconstantine (quote (a b c) ) => (a b c) too... this isn't just about symbols
15:38 Austin what does exec_macro do?
15:38 cconstantine it's just the only way I know how to get a :flat
15:38 cconstantine I need to flatten the arguments out from a list (or array) into an argument list
15:39 cconstantine so it's a PIR sub in compiler.pir
15:39 Austin okay.
15:39 Austin (I've got "call_sub" and "call_method" that do similar things. :)
15:39 cconstantine http://github.com/cconstantine/Reason/bl​ob/master/src/builtins/compiler.pir#L47
15:39 cconstantine hehe
15:40 Austin Then what does to_past do?
15:41 Austin found it
15:42 cconstantine cons -> PAST
15:42 cconstantine ties into the compile_* methods
15:43 Psyche^ joined #parrot
15:43 Austin So if I type:   (say 'hello') it translates into [call:say [val:'hello']] right?
15:43 cconstantine hmm, I could probably create a 'register' Var and assign it the type
15:44 cconstantine [ call:[var:'say'] [val:'hello']]
15:45 cconstantine the [var:'say'] has a scope of 'package', and the sub say is defined
15:45 cconstantine so it effectivly turns into PIR like 'say'
15:45 cconstantine bah
15:45 cconstantine like 'say'('hello')
15:45 Austin_Hastings joined #parrot
15:45 Austin_Hastings But if I do:  (foo 'hello') what should it produce?
15:45 Austin_Hastings Ugh. I don't know what that was.
15:45 Austin_Hastings cconstantine, are you still here?
15:45 cconstantine yeah
15:46 cconstantine did you see my responses to your translation of (say 'hello') ?
15:46 Austin_Hastings Yeah, in the logs
15:46 cconstantine ok
15:46 Austin_Hastings What would (foo 'hello') do?
15:47 Austin_Hastings Assuming (defmacro foo (x) (list (quote say) x))
15:47 cconstantine given (defmacro foo (x) (list (quote say) (quote 'foo') x))
15:47 cconstantine ok that
15:47 cconstantine at compile time the function 'foo' defined in the defmacro is called
15:47 cconstantine that function returns a list (symbol:say val:'foo' val:'hello')
15:48 cconstantine that list is given to to_past which returns a PAST tree of a call to the package var say with 2 arguments
15:49 Austin_Hastings So exec_macro calls the macro function right now, and the result is expected to be a ... ?
15:49 cconstantine an object that can be to_past()ed
15:49 Austin_Hastings :)
15:49 cconstantine so either a PAST::Node or an sexpr
15:49 Austin_Hastings clearly.
15:50 * cconstantine detects a hint of sarcasm :)
15:53 dalek parrot: r43581 | jkeenan++ | trunk/runtime/parrot/library/Getopt/Obj.pir:
15:53 dalek parrot: Applying modified version of patch originally submitted by tene++ in �http://trac.parrot.org/parrot/ticket/1372:  Change usages of 'Getopt::Obj' to ['Getopt';'Obj'].
15:53 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43581/
15:54 cconstantine Austin_Hastings: did I lose you?
15:55 Austin joined #parrot
15:57 Austin It seems pretty clear that the internet godz don't like me talking about Reason.
15:58 cconstantine hehe
15:58 cconstantine that seems pretty unreasonable
15:58 cconstantine Ha!  reason, unREASONable... ahem, sorry :)
15:59 cconstantine so the problem with quote is that the PAST compiler wants to be able to render everything involved into PIR
15:59 cconstantine if the value can't be written as a PIR value it can't
16:00 cconstantine whereas i want it to generate code that references and already existing object in memory
16:00 Austin Yepper.
16:00 Austin So (quote say) will work, since 'say' is a valid string.
16:00 Austin But (quote (a b c)) not so much
16:01 cconstantine well.. neither will work right
16:01 cconstantine kinda
16:01 cconstantine when I say (quote say) I get back the literal sub named 'say'
16:01 Austin Which is what you want, right?
16:02 cconstantine where i want it to be a PAST::Val/Var who's value is the sub named 'say'
16:02 Austin Get the sub, then call it.
16:02 Austin Ah.
16:02 cconstantine I can't compile the literal sub named say
16:03 Austin But quote doesn't compile things.
16:04 Austin If I run   (say 'foo') I get foo as output.
16:04 cconstantine right
16:04 Austin What do I get if I run (say (quote 'foo')) ?
16:05 cconstantine you should get something like 'Capture[0x125da10]'
16:05 Austin I should?
16:05 cconstantine yeah
16:05 Austin Why?
16:05 cconstantine because 'Capture [...]' is how PAST nodes are output from 'say'
16:05 Austin Is Capture even a part of the Reason type model?
16:06 cconstantine it's part of the compiler
16:06 cconstantine the whole point of macros is to execute code in the compiler
16:06 cconstantine or part of the point at least
16:06 Austin Right, but this isn't a macro.
16:06 Austin It's just quote.
16:07 cconstantine compiler and runtime of lisps are kinda indistinguishable
16:07 Austin Sure.
16:07 Austin But is quote a compile-time function?
16:08 Austin Or a run-time function
16:08 cconstantine so if you did a (quote (list 1 2 3)) you'd get back the list created at compile time that has a symbole:'list' etc
16:08 cconstantine compile-time
16:08 cconstantine well.. it's a special form
16:11 Austin According to google, quote returns its single argument "unchanged".
16:12 Austin So I would expect (say (quote 'foo')) would be the same thing as (say 'foo')
16:12 cconstantine that's not very useful
16:12 fperrad_ joined #parrot
16:12 Austin :)
16:12 Austin no comment
16:12 purl hmmm... no comment is assent :-) or dissent :-(
16:12 cconstantine :P
16:13 Austin And (say (quote (1 2 3))) would be the same as (say (1 2 3)) - which I have no idea what that produces.
16:14 cconstantine http://clojure.org/special_forms#toc5
16:15 Austin So (say (1 2 3)) produces what? 123
16:15 Austin Or would that be (say 1 2 3)?
16:16 cconstantine that would be (say 1 2 3)
16:16 cconstantine (say (1 2 3)) produces an error because '1' isn't a function
16:17 Austin okay
16:17 cconstantine '(1 2 3) is a reader macro for (list 1 2 3)
16:17 cconstantine in clojure
16:17 cconstantine so you probably meant (say (list 1 2 3))
16:17 cconstantine which would produce '(1 2 3)'
16:18 cconstantine and (say (quote (1 2 3))) should produce the same thing
16:18 cconstantine the difference being that (say (list 1 2 3)) prints the list generated at runtime via a call to the func 'list' whereas (say (quote (1 2 3))) prints the list generated at compile-time
16:18 Austin Right.
16:19 Austin So there's a quote-parsing mode, since (say (1 2 3)) and (quote (1 2 3)) are different, yes?
16:19 cconstantine as an asside, I plan on having reader macros like '(1 2 3) supported at some point
16:20 cconstantine 'quote-parsing mode' and compile time are the same thing
16:20 Austin Or maybe not, since you're compiling lists.
16:20 Austin Okay.
16:20 cconstantine compiling the special form (quote ...) .... hmm, maybe this is something I'm not as familiar with as I thought
16:21 cconstantine ok
16:21 cconstantine so, if we have (foo bar baz) in the source that string turns into a cons tree
16:21 Austin So when I say (quote (1 2 3)) the parser produces a (1 2 3) sexp/cons tree.
16:22 cconstantine yeah
16:22 cconstantine but what I'm not sure of anymore is *when* that happens
16:22 Austin And quote sticks it in a temporary variable and returns a variable reference.
16:22 Austin Right at compile time.
16:23 cconstantine right, idealy it returns a PAST node that is a var who's value is the thing it's given at compile-time
16:24 cconstantine so I could probably do this with globals (have a global array of values and generate PAST nodes that generate lookups into the array)
16:24 Austin Is quote commutative? (Is commutative the right word?)
16:24 cconstantine but taht seems really ugly
16:25 cconstantine does it go into a list?  not sure yet :)
16:25 Austin If I say (quote (1 a 2)) what is the result?
16:25 Austin Is 'a' a literal char, or a symbol reference?
16:25 cconstantine it wouldn't be a literal char
16:26 Austin Okay.
16:26 cconstantine it's wether it is a symbol reference or the value of that symbol
16:26 cconstantine for now lets say it's the symbol reference
16:26 Austin But '(1 a 2) is not ('1 'a '2)
16:26 cconstantine correct
16:27 cconstantine ('1 'a '2) would cause the compiler to attempt to generate a function call to '1
16:27 cconstantine '(1 2 3) has a runtime value of a list
16:28 cconstantine ok, how would i build a PAST that references a 'package' array variable's index?
16:28 Austin So try this: Create a @QUOTES variable, make the compiler push when it sees (quote x) and replace the (quote) with a reference to @QUOTES[counter++]
16:28 cconstantine yeah
16:29 cconstantine is there an example of how to generate array indexing code?
16:29 Austin PAST::Var.new(:scope('index'), PAST::Var.new(:scope('package'), :name('@Q')), PAST::Val.new(:value(1)))
16:29 Austin Or maybe it's backwards.
16:30 Austin I've got it here someplace.
16:30 cconstantine hehe
16:32 Austin keyed.
16:32 cconstantine ah
16:32 cconstantine I see it in the docs now
16:34 Austin It's [keyed [var] [index]]
16:35 Austin So    [PAST::Var  :scope(keyed)   [PAST::Var  :scope(package), :name('@QUOTES')]   [PAST::Val  :value(8675309)]  ]
16:36 cconstantine so how would I get the length of the array in nqp?
16:36 Austin In Close, I have to screw around because I need to unshift the array into the postfix index PAST.
16:36 Austin +@array
16:36 Austin -1
16:36 purl -1
16:37 cconstantine obviously
16:37 Austin Or not.
16:37 Austin You could compute and then push.
16:37 cconstantine I've got a global @?QUOTES
16:37 Austin $index := +@array; @array.push(temp)
16:37 cconstantine I .push($node)
16:37 Austin $node?
16:37 cconstantine PAST node i want to preserve
16:38 Austin Yeah, I see it.
16:38 cconstantine well, really first($node)
16:38 Austin Is first($node) just $node[0] ?
16:38 cconstantine not exactly
16:38 cconstantine $node isn't an array
16:38 cconstantine or an indexable
16:38 cconstantine it's a 'cons' PMC
16:38 cconstantine and first is a multimethod
16:38 Austin Ah.
16:39 Austin Why not call it $cons then? :)
16:39 Austin I was assuming that it was a PAST node.
16:39 cconstantine it's a node, and dynamic typing is awesome right?
16:39 Austin Yeah.
16:39 cconstantine it's a cons node instead of a PAST node
16:39 Austin I love the shit out of dynamic typing...
16:40 cconstantine hehe
16:40 Austin One reason I'm still paying my taxes...
16:41 cconstantine +@?QUOTES - 1    is yielding -1 for me
16:41 cconstantine after the push
16:43 Austin Heh
16:43 cconstantine which is bad
16:44 Austin Did you initialize it correctly?
16:44 cconstantine I think?
16:44 Austin Store a new array into @QUOTES somewhere?
16:45 Austin The auto-viv of arrays (used to - it may have changed) doesn't store the new array.
16:45 Austin That is:   my @x;   @x.push(1);
16:45 Austin The @x.push detects an undef, creates a temp array, pushes 1 into the temp array, and then stops - never storing the temp.
16:46 cconstantine my current attempt is on github
16:46 Austin I lost the url on the reboot.
16:46 Austin actions.pm?
16:46 purl i guess actions.pm is getting kinda...big. What would you think to trying to refactor some of the larger actions a bit to use various subs, and putting those into a separate .pm file or files? It's just that it takes a little while to compile.
16:46 cconstantine http://github.com/cconstantine/Reason​/blob/master/src/pct/actions.pm#L198
16:47 cconstantine now does purl know I'm throwing everything in a single .pm?
16:47 cconstantine creepy
16:48 Austin I think that's a comment that every single HLL developer has made at some point.
16:48 cconstantine hehe
16:48 cconstantine so, I probably need to give a namespace
16:48 Austin Yeah, @?QUOTES isn't initialized.
16:48 cconstantine it is in reason.pir
16:49 Austin Is it? okay.
16:49 cconstantine but I think I'm grabbing ::@?QUOTES instead of ::Reason::Grammar::Actions::@?QUOTES (to use C++'s namespacing syntax)
16:49 Austin Okay.
16:50 Austin So Var.new(:scope('package'), :namespace( ('Reason', 'Grammar', 'Actions') ), :name('@?QUOTES'))
16:53 theory joined #parrot
16:55 cconstantine that appears to have done it
16:56 Austin Yeah?
16:56 cconstantine my only reservation with this solution is that the array and items in it won't get GCed
16:56 cconstantine but yeah, I appear to be limping allong to the next problem :)
16:56 Austin Maybe you should create temporary variables - $quote_123 - instead of an array.
16:57 cconstantine that would be awesome
16:57 cconstantine working quote form is up
16:58 cconstantine is it possible to create named temporary variables like that?
16:58 Austin At the nqp level it's just string catenation, right:   PAST::Var(:name(  '$quote_' ~ $index++))
16:58 Austin Of course, you have to remember them somehow...
16:58 Austin But that's what the rest of the PAST tree is about.
16:59 cconstantine how do I create the variable so I can do $quote_N := first($node);
16:59 Austin You should probably create a new namespace (Reason::_quote) to stuff them in..
17:01 cconstantine probably
17:04 cconstantine ok, I think I can use PIR to create the var
17:07 nopaste "Austin" at 68.37.46.53 pasted "Create temp vars" (26 lines) at http://nopaste.snit.ch/19346
17:08 Austin Frankly, I'm not sure about that "first(rest($node))" thing.
17:08 Austin Should it just be "rest($node)" ?
17:09 cconstantine possibly?
17:09 cconstantine I'm not sure about it either
17:10 Austin In the case where you say (quote (1 2 3)) it seems like you would get "1"
17:11 cconstantine well, $node is the list starting with symbol:quote
17:11 Austin But maybe you start with [ 'quote' [ [1] [2] [3] ] ]
17:11 tetragon joined #parrot
17:11 cconstantine so rest($node) is the list starting at (1 2 3)
17:11 Austin And so rest($node) is [ [ [1] [2] [3] ] ]
17:11 Austin Try it like it is, and see.
17:20 cconstantine ok
17:20 cconstantine I got it
17:20 cconstantine it was correct to begin with, but the list was missing it's $/ object
17:21 Austin woot
17:26 cconstantine w00t indeed
17:26 cconstantine *working macros are up
17:26 cconstantine *may not really be working
17:27 Austin :)
17:27 cconstantine I'm always setting the 'node' attribute to the $/ object  on the thing returned from executing the macro
17:27 cconstantine if the result is a simple PAST::Node that won't work
17:28 Austin Why not?
17:28 cconstantine will it?
17:28 purl will it is it being written to use djb's string functions and such?
17:28 Austin The :node attribute points to the source location.
17:28 cconstantine oh, PAST::Node has a node method...
17:28 cconstantine oh, it's an attribute
17:28 cconstantine well then, see I knew what i was doing *shifty eyes*
17:29 Austin :)
17:29 Austin Make sure it does what you think it does.
17:30 cconstantine yeah no
17:30 dalek parrot: r43582 | jkeenan++ | branches/one_make (2 files):
17:30 dalek parrot: Extract subroutines from h2inc.pl and place them in lib/Parrot/H2inc.pm.  This makes them potentially reusable and/or testable.
17:30 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43582/
17:32 cconstantine thanks so much for the help Austin
17:32 Austin no problem. I'm glad you got it working.
17:33 cconstantine I think I'll tackle this problem later, and I have a plan (multi-method so I only attach the $/ to 'node' if the result of the macro is a cons object)
17:33 cconstantine I have a weekend's worth of work to do in 3 hours
17:33 Austin :)
17:34 payload joined #parrot
17:38 moritz Coke: re timtowtdi, use aptitude for installing packages
18:20 cognominal joined #parrot
18:27 chromatic joined #parrot
19:00 dukeleto 'ello
19:01 * dukeleto just got out of order test detection working in Tapir
19:02 davidfetter dukeleto++ :)
19:13 dalek tapir: 00cc34d | dukeleto++ | Makefile:
19:13 dalek tapir: Make the compile target required for the test target in the Makefile
19:13 dalek tapir: review: http://github.com/leto/tapir/commit/00​cc34d47952884b007304f806107006e001d740
19:13 dalek tapir: 959dbdf | dukeleto++ | lib/Tapir/Parser.pir:
19:13 dalek tapir: Almost-working out of order test detection
19:13 dalek tapir: review: http://github.com/leto/tapir/commit/95​9dbdf4398e26dab07e279e269c6eb6cc22999d
19:13 dalek tapir: 7b1962d | dukeleto++ | t/03-parse_tapstream_error.t:
19:13 dalek tapir: Add some tests for parsing out of order tests, mostly passing.
19:13 dalek tapir: Currently we do not count any tests that are out of order as passed,
19:13 dalek tapir: so test files with out of order tests do not pass, but this is currently
19:13 dalek tapir: dumb luck. The parse_tapstream method needs to be modified to detect
19:13 dalek tapir: out of order tests and still count which pass and fail.
19:13 dalek tapir: review: http://github.com/leto/tapir/commit/7b​1962d6cc86d8eab35f9dac3fad292cd3ee1b1a
19:13 dalek tapir: fb239bd | dukeleto++ |  (2 files):
19:14 dalek tapir: Improve the is_tap method in Tapir::Parser and add some tests
19:14 dalek tapir: review: http://github.com/leto/tapir/commit/fb​239bdcb8ced00fcac27530b927fad8c6613504
19:14 dalek tapir: eda3b9e | dukeleto++ | t/03-parse_tapstream_error.t:
19:14 dalek tapir: Add tests for bail_if_necessary to Tapir::Parser
19:14 dalek tapir: review: http://github.com/leto/tapir/commit/ed​a3b9e473a15a14893a2b7b5f0eeb72c6e58267
19:14 dalek tapir: 8c4680b | dukeleto++ | lib/Tapir/Parser.pir:
19:14 dalek tapir: Refactor is_tap to use a natural control flow
19:14 dalek tapir: review: http://github.com/leto/tapir/commit/8c​4680b8b0d82b42ca5161d0fdb85474cc65c6f2
19:14 dalek tapir: ff8b843 | dukeleto++ | lib/Tapir/Parser.pir:
19:14 dalek tapir: Refactor parse_tapstream
19:14 dalek tapir: review: http://github.com/leto/tapir/commit/ff​8b843d6f6277d2617e013e6c976609d51f3634
19:14 dalek tapir: 42a74c6 | dukeleto++ | lib/Tapir/ (2 files):
19:14 dalek tapir: Out of order tests are now detected
19:14 dalek tapir: Test files which contain out of order tests will now fail.
19:14 dalek tapir: Better diagnostics, such as:
19:14 dalek tapir:     Out of order tests detected, saw test 42 but expected test 5
19:14 dalek tapir: would be nice.
19:14 dalek tapir: review: http://github.com/leto/tapir/commit/42​a74c6685909b8b1b3d7fcc8a0718b2f8e27122
19:20 iblechbot joined #parrot
19:29 AndyA joined #parrot
19:37 kid51 joined #parrot
19:38 lucian joined #parrot
19:57 hercynium joined #parrot
20:28 dalek parrot: r43583 | jkeenan++ | branches/one_make/t/tools/pmc2cutils (2 files):
20:28 dalek parrot: Update README to explain purpose of tests.  Fix one TODO-ed test.
20:28 dalek parrot: review: http://trac.parrot.org/parrot/changeset/43583/
20:32 bacek joined #parrot
20:49 preflex joined #parrot
20:50 fperrad joined #parrot
20:59 plobsing joined #parrot
21:08 dukeleto make fulltest PASS on orderedhash_revamp (darwin x86)
21:35 * Coke grumbles.
21:38 dukeleto PackFile_unpack: This Parrot cannot read bytecode files with version 5.4.
21:38 dukeleto i am sure i am ding something wrong, but that error messages doesn't tell me what
21:39 chromatic joined #parrot
21:57 dalek parrot-plumage: ee53364 | leto++ | t/03-util.t:
21:57 dalek parrot-plumage: Add tests for %hash.values
21:57 dalek parrot-plumage: review: http://gitorious.org/parrot-plumage/parrot-plumag​e/commit/ee53364dbbaa8d5bb56e95604501f0f4418a766f
22:03 dalek parrot-plumage: cdd56bd | leto++ |  (3 files):
22:03 dalek parrot-plumage: Update Tapir
22:03 dalek parrot-plumage: review: http://gitorious.org/parrot-plumage/parrot-plumag​e/commit/cdd56bd9891193c902b9796a84c5db4a7fe03aa9
22:08 mikehh one_make branch at r43583 - codetest FAIL (perlcritic.t - 2 failures)
22:08 mikehh all other tests PASS - pre/post-config, corevm/coretest, smoke (#31876), fulltest - Ubuntu 9.10 amd64 (g++ with --optimize)
22:10 mikehh Coke's XXX and missing use warnings in lib/Parrot/H2inc.pm
22:33 hercynium joined #parrot
22:40 patspam joined #parrot
23:17 Coke ... so, it's a good thing to hide all that stuff for a one shot script into .pm's?
23:18 Coke to me, it'slike premature obfuscation.
23:18 Coke ->zzz
23:21 japhb seen whiteknight
23:21 purl whiteknight was last seen on #parrot 8 hours, 28 minutes and 1 seconds ago, saying: kid51, sure
23:21 japhb *sigh*
23:23 japhb msg whiteknight I need a PMC that can represent WebGLArray and WebGLArrayBuffer as seen in the WebGL draft spec: https://cvs.khronos.org/svn/repos/registry/​trunk/public/webgl/doc/spec/WebGL-spec.html -- can parrot-linear-algebra's packed arrays do this?  In particular, can you share a single buffer amongst multiple array "views"?
23:23 purl Message for whiteknight stored.
23:23 Whiteknight joined #parrot
23:24 chromatic That was useful.
23:24 japhb well, that was convenient
23:24 japhb Whiteknight, see your messages.  :-)
23:24 Whiteknight messages
23:28 Whiteknight japhb: Looks feasible
23:29 Whiteknight I would want to do it in a way that wasn't opengl-specific
23:29 Coke chromatic: what was useful?
23:30 chromatic japhb complaining that Whiteknight wasn't here.
23:32 Whiteknight if people complain when I'm not here, there must be a lot of complaining recently
23:32 LaVolta joined #parrot
23:41 Coke rant: everything in DEPRECATED.pod should have a ticket.
23:41 japhb Whiteknight, excellent.  I hadn't wanted it opengl-specific, merely that it could be bent to that task.  :-)
23:44 japhb Whiteknight, what currently works in p-l-a?  The README and ROADMAP appear to only contain future plans ...
23:45 Whiteknight japhb: the test suite is a decent example of the capabilities
23:45 Whiteknight it's missing stuff for some
23:45 Whiteknight p
23:45 Whiteknight PMCs
23:45 japhb Whiteknight, ah, OK
23:47 Whiteknight i'll give you a commit bit if you want
23:47 japhb Whiteknight, sure, thank you
23:49 Whiteknight done
23:52 japhb Merci.
23:52 Coke ah, chromatic, 'twas you. - can you create a ticket for the :: issue you added to the D.pod?
23:52 Coke (and link back to it from DEP.pod?)
23:52 chromatic The double-colon namespace pseudo-separator?  I thought we had many tickets for that.
23:53 BooK joined #parrot
23:57 Coke ok. can you list them in the pod? =-)
23:58 chromatic I will put that on my task list.
23:58 Coke it's a good task for minions.
23:59 Whiteknight muah hah hah!!

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

Parrot | source cross referenced