www.parrot.org | Parrot 1.6.0 "half-pie" released: The JIT is dead! | Testing priorities: Exception and MultiSub
Set by moderator on 20 September 2009.
NotFound darbelo: it was a polite way of say: "Just merge it!" ;) 00:02
00:18 theory joined
dalek rrot: r41505 | NotFound++ | trunk/t/pmc/codestring.t:
[t] cover %% usage in CodeString
00:29
00:37 mokurai joined 00:40 slxix joined 00:42 TiMBuS joined
slxix gcc. green-cheecked conure or gnu c compiler? 00:43
00:44 payload joined
NotFound purl: gcc? 00:46
purl gcc is a huge monster of a package. or written in C
dalek rrot: r41506 | coke++ | trunk/t/pmc/null.t:
fix typo in test description. Avoid "temp"-style var names when we already have $I regs for that.
00:49
00:55 Whiteknight joined 01:10 Austin_away joined
Austin_away Good morning, #parrot 01:11
01:33 rhr joined
jrtayloriv morning Austin 01:39
Austin_away Hello, jt4. How goes phemer?
01:40 Wolong joined
jrtayloriv Working on it ... in a blundering sort of way. 01:40
But I'm learning ;)
(which was the whole point anyhow)
Austin_away Sure. Did you get it repo'd yet? 01:42
jrtayloriv Austin_away, Yes -- svn.jrtayloriv.net/phemer/trunk 01:43
Austin I suppose I should not be away any more. 01:44
jrtayloriv :)
It's probably oozing with bad practice and logic errors ... so brace yourself. 01:45
Austin Your perlmonks entry talked about R6RS scheme, and the readme says R5. Is there a fundamental difference?
jrtayloriv Austin, I haven't updated the PM page -- it's R5RS
Austin Ok
01:45 cconstantine joined
jrtayloriv But if I design it properly, it should be easy to change to R6RS later. 01:45
It really doesn't do anything now, though. My main blocker is figuring out a non-kludgy way to initialize the bindings for the top level environment (i.e. how to make my builtin functions map to symbols in the PAST::Block in method TOP) 01:47
Austin That was my question. What's the 5/6 difference?
jrtayloriv unicode and internal numeric handling are the two big ones 01:48
Austin But nothing in the grammar?
jrtayloriv also various things like a new comment style, etc.
yes -- a few minor grammar changes as well.
Austin (You might want to check out my Close blog: close-parrot.blogspot.com/2009/09/w...hack.html) 01:49
jrtayloriv I just wanted to do R5RS because of the large amount of documentation and suppot.
Austin Ahh. Documentation. Yes. 01:50
jrtayloriv s/suppot/support/
Thanks for the link -- I'll definitely do some reading there.
Austin Do you know how you are going to interact with parrot namespaces? 01:54
dalek rrot: r41507 | darbelo++ | branches/remove-next_for_GC (2 files):
Remove reference to next_for_GC from the docs.
01:55
jrtayloriv Austin, That's part of the problems I've having with figuring out the initialization. (figuring out which namespaces I should put certain things in, for example) ... so, not really
Austin I'm thinking about user code. 01:56
jrtayloriv How do you mean?
As in how would I access non-scheme structures from scheme code?
01:56 Austin_away joined
Austin_away That was weird. 01:57
jrtayloriv A doppleganger?
Austin_away I'm thinking about user code.
Does scheme have any kind of namespace mechanism you need to worry about?
(Sorry, I got disconnected.)
jrtayloriv Austin, I don't think so -- from what I understand, everything is just lexically scoped with top-level environment being the outermost scope. 01:58
Austin_away Okay. So there's your answer. 01:59
jrtayloriv Austin, Right -- but I meant stuff like builtins/*.pir and such. i.e. which namespaces their contents should go in. 02:00
Austin_away As far as builtins, put them in a private namespace _phemer, and set package vars to point to them.
Or just bring them in directly.
jrtayloriv Austin, I was going to use a global '%_toplevel_env_symbol_hash' and the PAST::Block .symbol() method 02:01
Is that the wrong way to do it? 02:02
Austin I think it's less good than it could be, because you're duplicating work that the system already does.
jrtayloriv Yes, it looks very sloppy.
Austin Have you thought about supporting in-line PIR in your parser? 02:03
Whiteknight hello
jrtayloriv As in, inline PIR within scheme code? 02:04
Austin Hello, Andrew.
Whiteknight (i'm not here long, just checking messages)
Hello Austin
jrtayloriv howdy whiteknight
Austin Jrtayloriv: yes.
Whiteknight hello jrtayloriv
jrtayloriv Austin, No, I haven't.
Austin I suggest you make that a priority.
It's easy to do in PCT, and it means you can build stuff as you go. 02:05
It would also solve your builtin function problem, I think.
jrtayloriv Austin, I would probably fail very hard at doing something like that at this point. But I will start thinking about it and taking notes as I learn more, and try to figure out how I would go about it. 02:06
Austin :)
It's easy as pie, Jesse. It's just a PAST::Op with an inline type. 02:07
Whiteknight okay, that's all the time we have for tonight. Later! 02:08
Austin g'night, Andrew
jrtayloriv night Whiteknight
Whiteknight goodnight
Austin In theoretical terms, what does the scheme interpreter do with the sequence of s-exprs you give it? 02:09
Does it eval them in order, or does it magically install them all and then call the one named main, or what?
jrtayloriv It evals them in order. 02:10
Austin Okay.
So how do I define a function?
jrtayloriv at the top level though.
for instance (foo bar baz) is an s-expr (a list)
Austin (Please correct me if I start using the wrong terminology.)
Ok. So (foo ...) is a list.
And it calls 'foo' ? 02:11
jrtayloriv and the order in which the values of each of the list members after foo are evaluated is undefined
(according to R5RS)
Austin oooo kay.
jrtayloriv (assuming foo is a procedure)
Austin But that means you can make up whatever you want, right?
jrtayloriv yes
Austin good enough
So at the top level it's all symbol-defining operations, or operations that reference already-defined symbols? 02:12
jrtayloriv and yes, if you give and unquoted list like that (foo bar baz) vs '(foo bar bas) then it applys the procedure foo to bar and baz
Austin, Yes, or eval'ing constants (strings, numbers, chars)
Austin So how do you do "Hello, world!" in scheme? 02:13
jrtayloriv "Hello world"
purl rumour has it "Hello world" is the user's real name, RFC-822 perversion... :)
Austin Just the string, no parens?
jrtayloriv yes
strings eval to themselves
Austin Ahh. And the interpreter is supposed to print whatever it runs, yes?
jrtayloriv it should print the return value of everything, yes
but for instance (define foo 5) doesn't print anything 02:14
Austin Right.
jrtayloriv (since it doesn't return anything)
that was another thing I couldn't figure out, but it didn't matter. I've just been running the compiler in interp mode with --target=past to make sure it's working
I'm sure it's simple, but I'm very much still learning to work w/ PAST 02:15
dalek rrot: r41508 | jkeenan++ | branches/library_files (3 files):
Rename get_default_tests() to get_common_tests(); adjust as needed in t/harness and t/pharness/*.t.
Austin So your pheme.pir should be evaling and printing the results. 02:16
But your eval just returns things.
jrtayloriv Austin, no the compiler should just be returning things -- normally there is a seperate interpreter that prints the values in a Read-Eval-Print loop 02:17
Austin Right. But that loop is going to have to be in phemer.pir - that's the program.
And it calls 'eval', which calls 'compile'. 02:18
jrtayloriv I think the way that you would print from a compiled program is with (display "Hello World")
Austin Ahh.
jrtayloriv Which prints the return value of "Hello World"
Austin, What exactly did you mean earlier when you said "As far as builtins, put them in a private namespace _phemer, and set package vars to point to them." 02:19
Austin Hmm. 02:20
jrtayloriv As far as package vars, do you mean "our" variables?
Austin Sort of. 02:21
Except that an 'our' variable ISA package var
jrtayloriv Right, it's also lexical, right? 02:22
doesn't make sense ... nm
I'm trying to figure out all of this scoping terminology as well.
Austin No, just that (talking about NQP) an our variable compiles down to a package var in Parrot
Read this: code.google.com/p/close/wiki/CianIntroduction 02:23
(The section on Parrot Hardware Model)
dalek rrot: r41509 | jkeenan++ | branches/library_files (2 files):
Eliminate @Parrot::Harness::DefaultTests::standard_tests. It was not used anywhere and had not been for a long time.
02:25
jrtayloriv Austin, Very nice -- this is one of the better guides that I've read. Thanks. 02:27
Austin Thanks. Just be aware that everything about Close is a lie.
jrtayloriv :) 02:28
Austin (I'm working on it, but I'm not much ahead of where you are.)
So the point is that a subroutine reference can be made in two ways.
If you emit PIR that looks like this: 7$P0 = "foo"() the PIR compiler (assembler) will tie the foo sub directly in to your code. 02:29
This is bad, for you.
But if you emit PIR that looks like this: 7 $P0 = get_global 'foo' ; $P1 = $P0() the PIR compiler will emit code that does just that. 02:30
It looks up a package-scope variable 'foo', and invoke()s the contents. 02:31
jrtayloriv I was trying something like ---> .lex 'Sub' sym_hash['set!'] = get_global ['_phemer'], 'set!';
Austin Yeah, but why?
purl Yeah, but why is, like, it called a lambda
jrtayloriv to try to store a reference to the _phemer::'set!'() sub in sym_hash['set!'] 02:32
Austin Because you want to be able to replace them, right? 02:33
jrtayloriv exactly
Austin Okay, does set! work on vars, or functions, or both, or what? 02:34
Err. Change that.
jrtayloriv set! binds a name to a value.
Austin *what* is the mechanism for replacing a named function with another function?
02:35 janus joined
jrtayloriv (define (inc x) (+ x 1)) creates the variable 'inc' and binds it to the the procedure that adds one to x 02:35
Austin Ok
jrtayloriv then (set! inc 5) changes it to not point to a procedure anymore. Now it points to constant int 5 02:36
Austin Ok
So functions are variables in scheme?
That is, a variable pointing to runnable-code instead of data?
dalek rrot: r41510 | darbelo++ | trunk (78 files):
Moerge remove-next_for_GC brach to trunk.
jrtayloriv no -- but you can bind a variable to a function
jrtayloriv exactly
Austin ok
02:37 yanger joined
Austin Now, about symbol lookup. Are symbols dynamic, or lexically scoped? 02:37
jrtayloriv you can execute an anonymous sub without every storing it in a variable, for instance
lexical
Austin So if a calling function defines a variable 'x', there's no chance for me to see it? 02:38
(Except if the two functions are lexically nested)
jrtayloriv heard and is making sure he understands 02:39
Austin Say function foo and function bar are both defined at the top level (not nested). If foo internally defines 'x', and then calls bar, can bar see 'x' without receiving it as a parameter? 02:40
darbelo Austin: In scheme, no.
Austin Okay.
jrtayloriv (define foo 5) (define (bar x) (+ foo 1)) will work
Austin Okay. 02:41
Why?
Because define modifies the ... of its caller? Or because it returns a binding?
jrtayloriv Sorry, if I'm being dense -- I thought I understood what lexical scoping meant until just now :) ... let me think about it for a moment ... 02:43
Austin :)
This may be a parrot-ism, but I don't think so.
Let me give you an example.
Do you know java?
purl If java had true garbage collection, most applications would delete themselves.
jrtayloriv Basically, (define foo 5) creates a binds the name 'foo' to 5 in the current environment.
then (define (bar x) (+ foo x)) creates a block inside of that environment that has a local 'x', but no local 'foo' 02:44
darbelo Austin: in his example (define ) creates foo at the top-level
jrtayloriv so bar tries to find a local foo, and doesn't, so it looks in the next 'level up' (top-level environment in this case) 02:45
Austin darbelo: Because the "current environment" is the top level, no?
jrtayloriv (define (bar x) (+ foo x)) is really shorthand for (define bar (lambda (x) (+ foo x))) 02:46
darbelo Yes, if he had another foo inside bar, it would 'hide' the top-level one.
jrtayloriv exactly
Austin So 'define' is a function that modifies the environment of its caller? 02:47
jrtayloriv if I did (define (bar foo) (+ foo foo)) ... then (bar 7) would return 14,
not 10
Austin What does this do: nopaste.com/p/arbjxV7Ofb 02:49
jrtayloriv (define foo 5) creates a variable 'foo', allocates storage an int, and binds the symbol 'foo' to the storage, in the current environment (the env it's called from) 02:50
syntax error -- did you mean this: pastebin.com/db60957f 02:51
that returns 12
Austin Cool 02:52
jrtayloriv the reason you have to do 'bar' instead of '(bar)' is that bar isn't bound to a procedure, it's bound to the value of (baz 7) 02:53
Austin And I change it: pastebin.com/m619ff64a
What happens now?
Does baz see global-foo, or caller-foo ? 02:54
02:54 rg1 joined
jrtayloriv You can't do that -- it's an error (trying to figure out how to explain why clearly). You do this: pastebin.com/d4025ce28 ... and it returns 12 02:58
02:58 patspam joined
Austin Okay. As long as you understand it, my lack of scheme is survivable. 02:59
So baz sees the global foo, not the caller's foo.
It's lexical.
(Not dynamic.)
jrtayloriv That's what I had convinced myself of, from reading. But you clearly showed that although I thought I knew so, I really just got lucky :) 03:00
Austin :)
jrtayloriv 50/50 chance you know ;)
Austin So to make a function renamable, you put it in a lexical variable.
jrtayloriv Right -- that's why I was going to use PAST::Block .symbol() method. 03:01
It seems like it would act the right way.
Austin Umm, yes and no.
purl Go not to the Elves for counsel, for they shall say both no and yes.
Austin Is there some way to say (define (foo) 5) -- where the contents of foo, rather than the name, become the name of the symbol? 03:02
GeJ darbelo: ping 03:06
jrtayloriv I don't understand. Are you saying like, if I did (define foo 'bar), which makes binds the name 'foo' to storage containing the symbol 'bar', you would like to do (define foo 5) next, and have bar hold 5?
Austin Maybe.
But what I'm thinking is 7 (define x "foo") (define $x 5) where $x is perl syntax, not scheme? 03:07
The point being that a totally new name, foo, is defined. 03:08
jrtayloriv I don't think so. But I'm not sure. 03:09
Austin Ok
jrtayloriv let me play around with my scheme interpreter for a sec, and try to make that happen.
GeJ msg darbelo It looks like r41510 introduced a regression namely a segfault in t/op/calling.t see smolder reports 28151 (before the merge) and 28150 (after the merge). Would you like me to fill a TT? 03:10
purl Message for darbelo stored.
jrtayloriv Austin, I don't think you can do that, at least not using 'define' (although there might be some weird way of doing it, that I haven't come across yet) 03:13
Austin okay
So what's the difference between set and define, now? 03:15
jrtayloriv 'define' allocates the storage and binds the variable to it, and sets the value. 'set!' only works on variables that have already been created 03:17
think of it like 'define' --> int x =1 set! ---> x=1 03:18
in c)
Austin okay
and what about let?
jrtayloriv 'let' basically creates a new scope and defines some local variables in it 03:19
yanger hello, is there an emacs mode for editing .pg files?
Austin So it's a lexical block?
darbelo if you GeJ pong
Austin Yanger: I think so. Check trac.parrot.org
jrtayloriv so (define foo 5) (display foo) (let ((foo 1)) (display foo)) ... prints 5 then 1 03:20
Austin, yes -- a lexical block
but (define foo 5) (display foo) (let ((bar 1)) (display foo)) prints 5 5 03:21
Austin yanger: I was wrong: docs.parrot.org/parrot/devel/html/e...E.pod.html
03:22 quek joined
Austin jrtayloriv: What about this? (define X 5) (define foo ((display X) (define X 1))) foo 03:23
yanger thank you
Austin * + (display X) at the end of foo
bacek yanger: just search for Perl6 mode for emacs. It should exists somewhere.
03:23 cconstantine joined
Austin Does that redefine, or throw an error because it's already defined? 03:25
jrtayloriv Austin, Error, but because it's bad syntax. You can't use 'define' in places where it's expecting an expression -- like how you used (define X 1), since it doesn't return a value. One moment -- let me rewrite it to do what you want (I think)
darbelo msg GeJ Please file a TT and attache backtrace if available. 03:29
purl Message for gej stored.
jrtayloriv Austin, Displays 5 then 1 pastebin.com/d39908523 03:31
(can't use define unless at top level), you either use let or set! in nested scopes
Austin Cool. So set! looks up the symbol, right? Or does it always affect globals? 03:32
jrtayloriv (if I understand correctly)
set! looks up the symbol in the current environment, and if it doesn't find it, looks in the next scope out, until it reaches top level, and if it doesn't find it there BORK BORK BORK
Austin okay. 03:33
And can I do this: (define X 1) (define X 2)
dalek rrot: r41511 | darbelo++ | branches/remove-next_for_GC:
Branch has merged to trunk and is no longer needed.
jrtayloriv unspecified in r5rs, illegal in r6rs
Austin mkay 03:34
jrtayloriv most r5rs implementations let you, and treat the second like a set!
in r6rs, you will get a "trying to define an already defined variable" error.
Austin If I do this: 2 (define X 1) (define foo (display X)) (set! X 2) (foo) what do I get?
(Closure detection...) 03:35
jrtayloriv 2 03:36
Austin Really?
jrtayloriv pastebin.com/d180ab1c9 <--- right? 03:37
that gives 2
Austin That's a surprise. 03:38
bacek Austin: why?
slxix makes sense to me. "<jrtayloriv> (can't use define unless at top level), you either use let or set! in nested scopes" 03:39
Austin Bacek: Because I expected set! to replace the "pmc"
bacek set! just rebind value
jrtayloriv foo is just dealing with a name, not a value 03:40
bacek Austin: there is explicit (lambda ...) for such things 03:41
jrtayloriv (foo) just says "get me the value at the storage that X is bound to"
Austin bacek ?
purl bacek is THE MANIAC or some sort of magical coding robot
03:41 cconstantine joined
jrtayloriv Austin, if you want the free variables to be in a closure, you use lambda 03:42
03:42 quek left
Austin aha. 03:42
yanger @bacek , are .pg files written in perl6 syntax? I downloaded cperl-mode (updated for Perl6) from here www.mail-archive.com/perl6-all@perl...0892.html, but no syntax highlighting
bacek yanger: yes, .pg is "Perl6 Grammar" files. You probably have to explicitly set file-mode (or whatever it called) 03:43
jrtayloriv didn't even know what a 'free variable' or a 'closure' was a few days ago ...
Austin :) 03:44
I'm still not sure I do.
03:44 quek joined
bacek jrtayloriv: when you grok "call/cc" you can declare "I LEARNED SCHEME!" :) 03:44
jrtayloriv bacek, Haven't even gotten that far in my scheme book :) 03:45
bacek "sicp"?
slxix jrtayloriv, which scheme book?
jrtayloriv s/book/books/ ... "The Scheme Programming Language", "An Intro to Scheme and It's Implementation", and slowly working through SICP 03:46
03:47 JimmyZ joined
jrtayloriv And the PLT scheme documentation 03:47
which has a lot of stuff below the language level, but is very useful for understanding how things work 03:48
slxix I am reading through "LISP 1.5 Programmers Manual". 03:49
Austin jrtayloriv: Can I redefine 'define' ?
jrtayloriv austin yes 03:50
Austin Okay.
:(
jrtayloriv (define define 5) define prints 5
Austin And (define x 1) won't work afterwards, right?
jrtayloriv sorry not clear ... (define define 5) define .... prints 5
right
Austin You need to look at partcl for how he is (currently) rewriting upvar 03:51
That's going to be your define builtin.
jrtayloriv ok -- fetching a copy now. 03:52
Austin Be wary, because the tcl stuff was written in PIR before almost any of the PCT stuff existed.
yanger @bacek, thanks, i am now reading perl6 grammar(trying out squaak example). However, though I got this www.svn.pugscode.org/util/cperl-mode.el and supposedly is updated for perl6 and despite my loading this el file, it doesn't highlight the syntax. 03:53
Austin So (a) it's confusing, because it's different; and (b) Coke is sometimes twitchy, when other people have causing his code to fail.
bacek yanger: sorry, have no idea. I'm the-other-editor-guy 03:54
Austin ed, man! Ed is the standard!
yanger :), no problems, thanks for your time
bacek Austin: I'm usually use straight "cat > file" 03:56
jrtayloriv takes a 2 minute chocalate/peanut butter/coffee break -- be back in a jiffy!
Austin :)
The problem with using 'cat' is that it won't be available when /bin dies. 03:58
bacek Austin: it's built-in in my shell
Austin ROFL
And is your shell in /sbin?
This is why I use andLinux. 04:01
When /usr/bin is gone, /bin is corrupted, and /sbin has been overwritten, I won't care - it's a virtual machine, and *my* editor is running on a different platform. 04:02
bacek My shell is just around my brainz
Austin :)
jrtayloriv Austin, jikes -- all that just to bind a name to storage?!?! (upvar)
diakopter dalek: yo
Austin All that to bind a name to storage in a different lexical scope
jrtayloriv Austin, You can only call define from top level though. 04:03
04:04 kyle_l5l_ joined
Austin Yeah, but define is a function, not a keyword. 04:04
04:04 dalek joined
yanger i am curious about pugs, why was pugs written? was there some intellectual differences with implementing perl6 using parrot(rakudo)? 04:04
Austin So when I feed this: 7 (define (define name val) (display name " = " val)) (define X 5) into your compiler, what will it do? 04:05
yanger: Pugs was written because parrot was unavailable at the time. Pugs is older than rakudo.
yanger i see, thanks. 04:06
Austin yanger: So Audrey was like "why don't you guys get started?" And @Larry was like "it's not time yet," and Audrey was like "Here."
04:07 Andy joined
Austin (note: @Larry != $Larry) 04:07
yanger thanks again, good to get the history
jrtayloriv Austin, "BORK: reference to undefined identifier: x" 04:08
Austin laugh
jrtayloriv because it no longer has special-form meaning anymore -- now it is a function with x being passed as an arg.
Austin Yeah, I got that. 04:09
:)
yanger that haskell is one terse and powerful language, though wrapping ones head around *pure* functional programming is so not easy
Austin My point was that while define may only have to operate at the top level, it has to operate somewhere. Once you get into editing the lexpad, it doesn't really matter.
jrtayloriv Could I declare it as a sub, and take a reference to the sub and store it in a 'register' variable in the top block? 04:11
Austin Yes.
But then what? 04:12
This is one of those times when the Feynman Problem-solving Algorithm definitely applies.
jrtayloriv :) 04:13
bacek jrtayloriv: '$P0 = find_sub_not_null "foo"; set_global "blah", $P0' 04:14
Austin One of the reasons why it (upvar) looks scary is because he was keeping his own call stack. 04:15
(Which is a risk you were running with your symbol-hash idea, too.)
jrtayloriv I was just using the symbol hash to initialize the symbol hash built into PAST::Block, though. 04:16
Austin You need to keep in mind that that PAST symbol hash is only those symbols you have compiled in. 04:17
It's a compile-time thing, not a run-time thing.
jrtayloriv ok -- i see.
bacek, I don't understand what you were trying to tell me btw.
Austin, I misunderstood the purpose of the symbol() method, obviously. 04:18
bacek jrtayloriv: ah. Looks like I missed something. 04:19
Austin Gets and stores compiler symbol info.
jrtayloriv Austin, That's why I kept bringing it up -- because I thought I could dynamically add symbols to it at runtime somehow.
Austin Nope. At runtime, it's gone.
Nothing but you, and a lot of PIR ops.
And your light-bike, if you're a TRON fan... 04:20
jrtayloriv :) 04:22
bacek jrtayloriv: jfyi, there is virtually no "compile-time" in scheme :) 04:24
jrtayloriv chugs coffee and heads for the Scheme books in the hopes that it will help him grok bacek's last remark 04:28
Austin Here's a suggestion: create a PAST::Block(:blocktype('immediate')). Call that your top level. Add everything to it during parsing. 04:29
Then you should be able to parse a file that is nothing but constants. 04:30
(Because PCT always returns that last result.) 04:31
04:33 slxix joined
Austin jrtayloriv: One question I should have asked before: Is this for a school project of some kind? If so, are there limits to the amount and nature of the help you are allowed to accept? 04:35
jrtayloriv Austin, Nope -- I'm not in school -- dropped out about 5 years ago. 04:36
Austin Ok.
04:38 mokurai joined
Austin So in your TOP rule, make the initial block immediate. 04:43
Next, review the grammar for places where you can turn 'token' into 'rule'. 04:46
jrtayloriv I just did token to allow myself to put off learning how :sigspace works :) 04:47
Austin Don't bother. Just use rule for everything that might ever have a space in it.
jrtayloriv I don't understand how immediate block helps me. What do you mean by "parse a file that is nothing but constants"? 04:48
Austin It costs you some ops, but not many (see that blog post I linked) and later on you won't get bitten when you try to add something.
The difference between an immediate block and a declaration block at the top level is that PAST will generate a call to the immediate block.
"immediate" means "run this, now." 04:49
jrtayloriv right
Austin "declaration" means "put this in a sub, and I'll get to it later."
jrtayloriv right
But I can already parse, and build PAST for, files consisting of constants. What did you mean by that?
Austin So, as I understand scheme so far, the outermost level should always get run immediately.
So if you make the block immediate, then your compiler will produce code that gets run, and you can go "all the way" before you encounter a problem. 04:50
04:54 mberends joined 05:00 JimmyZ_ joined
yanger in the try statment of squaak, i read this "## create a new PAST::Stmts node for 05:02
## the catch block; note that no
## PAST::Block is created, as this
## currently has problems with the
## exception object."
why so?
Austin (1) That's old, and may no longer be true. (2) I don't know; I haven't dealt with exceptions yet. (3) Possibly because the current exception mechanism assumes goto, instead of call, for reaching exceptions. 05:04
(But #3 is a wild-assed guess, not based on any facts.)
yanger thanks again. 05:05
05:18 Andy joined 05:25 theory joined 05:29 iblechbot joined
dalek rrot: r41512 | pmichaud++ | branches/pct-rx/config/gen/makefiles/root.in:
[build] Alter build sequence so that pbc_to_exe is built before nqp.
05:58
mikehh all tests PASS (pre/post-config, smoke (#28156), fulltest) at r41511 - Ubuntu 9.04 amd64 06:03
dalek rrot: r41513 | pmichaud++ | branches/pct-rx/config/gen/makefiles/root.in:
[build]: Revert r41512; create parrot_nqp as part of default build.
06:12
mikehh rakudo (834929c) builds on parrot r41511 - make test / make spectest_smolder (up to 28436 -> #28158) PASS - Ubuntu 9.04 amd64 06:22
yanger btw, i just downloaded parrot and squaak factorial example doesn't appear to work 06:25
dalek rrot: r41514 | pmichaud++ | trunk (2 files):
[build]: Automatically build parrot_nqp binary (from pct-rx branch).
yanger because its not converting the type (when passing read value into function) 06:26
given that parrot use cps (continuation p style)in its byte code, why does it have a recursion limit? 06:29
and why the need for tail call optimizations? 06:30
jrtayloriv good night folks 06:40
purl and bots!
jrtayloriv and bots
purl -- here, have a glass of drano
mikehh partcl r745 builds on parrot r41511 - make test PASS (smolder #28161) - ubuntu 9.04 amd64 06:45
07:03 chromatic joined 07:06 yanger joined
bacek chromatic: good morning 07:08
purl Here I am, brain the size of a planet, and all they say is 'Good Morning'
chromatic Good Sunday, bacek. 07:11
Tene chromatic: I got email about a pull request on rakudo? 07:14
chromatic Yeah, I figured out that I could just push it to Rakudo's repo, as I have commit access.
Tene Ah, yes, that's what's usually done. I now see you've already done that. 07:15
bacek wearing "Better to ask for excuse t-shirt" and firing git svn dcommit 07:16
dalek rrot: r41515 | bacek++ | trunk (7 files):
Refactor Hashes slightly:

  * Implement HashIteratorKey.key and .value methods
  * Implement PMC (not-stringified) Hash keys.
   - Add VTABLE_hashvalue
   - Default.hashvalue stringify SELF and calculate hashvalue.
07:17
07:18 fperrad joined
dalek TT #1053 closed by bacek++: [TODO] Allow Parrot Hashes to have PMC keys 07:20
bacek departing to make some dinner for kids 07:21
ttbot Parrot trunk/ r41515 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/106687.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 07:23
chromatic Hm, the FileHandle PMC's readline_interactive() returns either a STRING or PMCNULL; that seems wrong. 07:45
Austin null meaning there is no readline library? 07:48
chromatic PMCNULL meaning it didn't read anything, I believe.
Austin Oh. That's bogus. should be "" 07:49
chromatic I think so too.
dalek ose: r159 | Austin++ | trunk/src/parser/ (9 files):
checkpoint
07:56
purl checkpoint is, like, an Integrated Firewall/VPN eSolution for iDiots(tm) designed with sales, not simplicity, in mind or what kind of DUMFUX design a firewall that can only be properly configured from a remote GUI, and not from the command line
ose: r160 | Austin++ | trunk/library/ (2 files):
Removed exec bits
Austin And now svn is borked. 08:00
Bad words, bad words, bad words.
bacek Austin: s/now//
Austin bacek: Nah. There's a cifs bug. Normally it works okay. 08:01
dalek rrot: r41516 | chromatic++ | trunk/src/pmc/filehandle.pmc:
[PMC] Tidied FileHandle PMC's code; no functional changes.
chromatic Hm, have I mentioned how much I like Git merging?
I would have ruined my local repo if I'd been using SVN.... 08:02
dalek rrot: r41517 | chromatic++ | trunk/src/pmc/filehandle.pmc:
[PMC] Fixed FileHandle PMC's readline_interactive() message to return an empty

saner, even if there is a potential semi-predicate problem (how do you expect to handle PMCNULL from PIR when you're expecting a STRING, though?).
08:05
chromatic I made those last two commits to a local branch tracking remove_next_for_GC.
Then I tried to rebase that branch from SVN. It's already deleted.
No problem; I switched to master, then merged from that branch.
Then I rebased and dumped the conflicts and then dcommitted my changes.
ttbot Parrot trunk/ r41517 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/106755.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 08:08
bacek You can cherry-pick them 08:09
chromatic Too lazy.
bacek chromatic: :)
chromatic: you probably broke Ctrl-D handling in PCT-based interactive shells 08:14
chromatic: indeed. I recall old conversations about it. 08:15
Austin Is there an installable parrot for windows? 08:20
dalek ose: r161 | Austin++ | trunk/ (9 files):
checkpoint
08:23
purl i guess checkpoint is an Integrated Firewall/VPN eSolution for iDiots(tm) designed with sales, not simplicity, in mind or what kind of DUMFUX design a firewall that can only be properly configured from a remote GUI, and not from the command line?! 08:24
ose: r162 | Austin++ | trunk/lib (2 files):
Moved Test.pm
Austin purl, forget checkpoint
purl Austin: I forgot checkpoint
dalek a: ca3dfd7 | fperrad++ | .gitignore:
ignore Test/More.*
08:39
rrot: r41518 | mikehh++ | trunk/MANIFEST.SKIP:
manifest_tests failure - run perl tools/dev/mk_manifest_and_skip.pl
09:04
09:08 kjeldahl joined
ttbot Parrot trunk/ r41518 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/106848.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 09:09
dalek rrot: r41519 | bacek++ | trunk/src/pmc/filehandle.pmc:
Revert "[PMC] Fixed FileHandle PMC's readline_interactive() message to return an empty"

PCT-based compilers.
09:11
mikehh bacek: ping 09:12
bacek mikehh: pong
mikehh bacek: loads of codetest (pod) failures on src/hash.c 09:13
bacek mikehh: I'm working on it. 09:14
dalek rrot: r41520 | bacek++ | trunk (2 files):
[core] Fix HashIteratorKey.value method. Add tests for expected behaviour
09:15
mikehh bacek: ok - also g++ failures on src/pmc/hash.pmc 09:18
bacek mikehh: nopaste? 09:19
purl nopaste is at nopaste.snit.ch/ (ask TonyC for new channels) or poundperl.pastebin.com/ or paste.scsys.co.uk/ or App::Nopaste or tools/dev/nopaste.pl or at www.extpaste.com/ or paste.scsys.co.uk (for #catalyst, #dbix-class, #moose and others) or gist.github.com/ or paste or gtfo or tools/dev/nopaste.pl or trac.parrot.org/parrot/browser/tru...nopaste.pl
ttbot Parrot trunk/ r41520 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/106900.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ )
mikehh bacek: ./src/pmc/hash.pmc:156: error: invalid conversion from ā€˜INTVAL’ to ā€˜Hash_key_type’ 09:20
bacek: ./src/pmc/hash.pmc:156: error: initialising argument 3 of ā€˜Hash* parrot_create_hash(parrot_interp_t*, PARROT_DATA_TYPE, Hash_key_type, int (*)(parrot_interp_t*, const void*, const void*), size_t (*)(parrot_interp_t*, const void*, size_t))’
bacek also 163 09:21
dalek rrot: r41521 | bacek++ | trunk/src/hash.c:
[cage] Pacify compiler about const casting and default case in switch.
rrot: r41522 | bacek++ | trunk (3 files):
[cage] Fix creating new hash in Hash.set_integer_native. Also implement
09:28
bacek mikehh++ # kicking lazy developers 09:29
ttbot Parrot trunk/ r41521 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/106958.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 09:31
dalek rrot: r41523 | bacek++ | trunk (3 files):
[cage] Change signature of PMC_compare and hash_key_PMC to avoid casing void*
09:35
ttbot Parrot trunk/ r41522 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/106982.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ )
Parrot trunk/ r41523 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107023.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 09:42
bacek mikehh: ping. Can you smoke latest trunk? 09:47
dalek rrot: r41524 | bacek++ | trunk/src/hash.c:
[cage][doc] Add docs for hash key and value casting functions
bacek mikehh: r41524 speaking precisely 09:48
ttbot Parrot trunk/ r41524 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107073.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 09:51
dalek rrot: r41525 | bacek++ | trunk/src/hash.c:
[cage] Use ASSERT_ARG macros in hash helper functions.
09:54
bacek mikehh: even r41525 :) 09:56
mikehh bacek: on it 09:58
ttbot Parrot trunk/ r41525 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107116.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 10:00
bacek seen mk41 10:06
purl I haven't seen 'mk41', bacek
bacek seen mj41
purl mj41 was last seen on #parrot 18 days, 18 hours, 45 minutes and 19 seconds ago, saying: this machine is probably special to segfaults ... tt.ro.vutbr.cz/report/pr-Parrot/rp-trunk [Sep 8 15:13:16 2009]
bacek sigh... tt.ro.vutbr.cz is down 10:07
mikehh I think you all killed it :-} 10:08
bacek I swear it wasn't me! 10:12
mikehh all tests PASS (pre/post-config, smoke (#28170), fulltest) at r41525 - Ubuntu 9.04 amd64 (gcc) 10:13
bacek good to know
mikehh g++ is still failing - but now at nqp - Unable to open filehandle from path 'parrot_nqp.c' 10:19
bacek mikehh: it's probably pmichaud's commit 10:26
NotFound mikehh: doesn'f fail for mr 10:35
me
mikehh bacek: I am not sure why but the permissions are wrong on that file - parrot_nqp.c - checking why (it's fine in my parrot dir but g.parrot which I was using to build with g++ is wrong) 10:38
bacek mikehh: just another svn shenanigans :) 10:39
mikehh bacek: did a sudo chown mhh:mhh parrot_nqp* to change ownership from root and it completed the build and make test 10:45
I have no idea how it got root ownership and why in one dir but not the other 10:46
10:53 joeri joined
dalek ose: r163 | Austin++ | trunk/ (20 files):
checkpoint: Moving files
11:05
11:06 Austin joined
dalek rrot: r41526 | NotFound++ | trunk/t/pmc/boolean.t:
[t] cover Boolean.init_pmc PMCNULL
11:12
ose: r164 | Austin++ | trunk/src/close/Compiler/Type.nqp:
Renamed Types -> Type.nqp
11:15
ttbot Parrot trunk/ r41526 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107233.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 11:20
dalek ose: r165 | Austin++ | trunk/ (8 files):
Renamed Types -> Type
11:30
rrot: r41527 | NotFound++ | trunk/t/pmc/resizablestringarray.t:
[t] cover RSA.delete_keyed
11:32
11:36 masak joined
ttbot Parrot trunk/ r41527 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107287.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 11:39
mikehh all tests PASS (pre/post-config, smoke (#28177), fulltest) at r41526 - Ubuntu 9.04 amd64 (g++)
bbiab 11:40
11:55 rindolf joined
rindolf Hi all. 11:55
bacek hi rindolf 12:04
rindolf bacek: hi.
I'm looking for chromatic.
It may be too early for him. 12:05
12:11 Whiteknight joined
bacek clock? 12:11
purl bacek: LAX: Sun 5:11am PDT / CHI: Sun 7:11am CDT / NYC: Sun 8:11am EDT / LON: Sun 1:11pm BST / BER: Sun 2:11pm CEST / IND: Sun 5:41pm IST / TOK: Sun 9:11pm JST / SYD: Sun 10:11pm EST /
bacek Good evening, Whiteknight :)
Whiteknight hello bacek 12:13
dalek TT #929 closed by bacek++: Remove redundant old_blocks delcaration in compilers/imcc/pbc.c 12:14
TT #1004 closed by bacek++: t/op/calling.t, t/pmc/sub.t failed at r41244 during 'make testj'
TT #1008 closed by bacek++: continuation mark function marks non pobj PackFile_ByteCode *seg
rindolf Hi Whiteknight 12:15
dalek TT #970 closed by bacek++: Remove Parrot_Context structure in favor of ATTRibutes in Context PMC 12:18
Whiteknight hello rindolf 12:20
rindolf What's up?
purl The Canadian Dollar
moritz jdv79: does the SMOLDER_SUBMITTER environment variable need to be a in a special format or something? 12:32
jdv79: I set it to 'moritz', but the rakudo smoke reports are still all from "anonymous2 12:33
s/2/"/
12:41 iblechbot joined
dalek TT #823 closed by bacek++: packfile pmc tests failing 12:41
kudo: a61b17f | moritz++ | t/harness:
[t/harness] only provide extra_properties when we use ::Archive
12:43
TT #758 closed by bacek++: Fix problems on openbsd/hppa 12:45
kudo: 0331d60 | moritz++ | docs/ChangeLog:
[docs] ChangeLog updates
12:48
TT #711 closed by bacek++: can't assign class with attributes to undef 12:52
masak I'm getting "Unable to open filehandle from path 'parrot_nqp.c'" during `./pbc_to_exe parrot_nqp.pbc` when trying to make bleeding Parrot. is this known? 12:59
bacek masak: "sudo chown -R masak:masak ." 13:00
moritz masak: it's probably new, due to pmichaud++ adding a parrot_nqp executable to the build
masak bacek: haven't tried compiling yet, but your hunch seems to be right. 13:01
bacek anyway. $bedtime. I've got enough cheap karma closing ticket for today.
masak that file was owned by root.
bacek++
bacek masak: It's not me. It's mikehh++ discovered it 13:02
13:02 JimmyZ joined 13:05 yanger joined
yanger given that parrot use cps (continuation p style)in its byte code, why does it have a recursion limit? 13:17
jonathan yanger: It's not a limitation of the VM, just there as a debugging aid. You can tweak the limit if you like. 13:20
13:20 cconstantine joined
yanger i see, then why the need -Oc (tail call optimization) i thought tco comes for free with cps 13:21
(thanks for the answer)
jonathan hasn't seen -Oc for a while... 13:22
Yes, tailcalls by default are more optimal, anyways. 13:23
I think -Oc enabled some more aggressive transformation that tried to turn tail calls into iterations in some cases.
yanger thanks again, actually i totally new to this, this is all very helpful 13:24
jonathan :-)
I say "enabled" as I'm sure of the state of that.
Certainly parrot -h doesn't seem to list it.
dalek a: 57459b0 | fperrad++ | src/grammar51.pir:
fix long_string lexer (\\r)
13:25
moritz yanger: not all code in the parrot repo uses CPS - for example the C code itself does not
jonathan oh, it's still in running.pod...
I'm not sure of the status of that code though. It's marked experimentail in the docs. 13:26
yanger yes its in the running.pod and is experimental
thanks @moritz
I have some other questions, regarding squaak 13:27
In examples/languages/squaak, i ran Configure.pl, make and then modified factorial.sq 13:28
to this
(the last few lines) var x=100
for var i= 1,1000 do
factorial(x)
#print(i," factorial of ", x, " is: ", factorial(x))
end
fperrad ping pmichaud
purl I can't find pmichaud in the DNS. 13:29
yanger i.e testing the run time for 1000 iterations
it was 5 seconds, compared to doing the same code in python which took 0.x seconds
fperrad seen pmichaud 13:30
yanger so if i understand correctly, parrot uses squaak.pbc to read this script, convert it to PAST
purl pmichaud was last seen on #parrot 19 hours, 19 minutes and 27 seconds ago, saying: it's just harder to read the generated code to figure out what is going on
yanger and from PAST to PIR, which it bytecompiles and runs.
So my question is, how can I make this faster?
jonathan yanger: You can compile to bytecode first. 13:32
yanger this is how I'm running it
parrot squaak.pbc examples/factorial.sq 13:33
I can get the pir representation, like this parrot squaak.pir --target=pir examples/factorial.sq> fac.pir
jonathan nod*
moritz and dthen parrot -oi fac.pbc fac.pir
Austin parrot squaak.pbc --target=pir --output=foo.pir foo.sq
moritz erm, -o, without the i 13:34
jonathan Running the PIR will be faster than the whole thing; running the PBC produced as moritz showed should be faster again.
Austin I don't recall if you can specify --output=pbc. Does that work? 13:35
yanger parrot squaak.pbc --target=pir -o foo.pir examples/factorial.sq Then parrot -o foo.pbc foo.pir and then
dalek rrot: r41528 | jkeenan++ | trunk/src/call/context.c:
Apply patch submitted by bacek++ for TT #1067. Fixes death of a test file on Darwin/PPC.
yanger parrot foo.pbc
Could not find non-existent sub infix:<=
current instr.: '_block11' pc 48 (foo.pir:23)
jonathan oh hmm 13:37
jonathan wonders if Squaak example language produces code with correct "load_bytecode" directive in... 13:38
Austin :) 13:39
yanger, can you nopaste the pir file that squaak emits?
nopaste? 13:40
purl nopaste is at nopaste.snit.ch/ (ask TonyC for new channels) or poundperl.pastebin.com/ or paste.scsys.co.uk/ or App::Nopaste or tools/dev/nopaste.pl or at www.extpaste.com/ or paste.scsys.co.uk (for #catalyst, #dbix-class, #moose and others) or gist.github.com/ or paste or gtfo or tools/dev/nopaste.pl or trac.parrot.org/parrot/browser/tru...nopaste.pl
ttbot Parrot trunk/ r41528 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107384.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 13:41
yanger yes, one sec
Whiteknight did the remove-next_for_GC branch get merged?
nevermind, I found the log message. it did 13:42
nopaste "yanger" at 24.29.231.239 pasted "pir for factorial.sq via squaak" (150 lines) at nopaste.snit.ch/18071 13:43
jonathan Whiteknight: You're more active on Parrot stuff than I am - do you know what the status of -Oc is?
Whiteknight: You guys are pretty efficeint at ripping out experimental stuff that didn't fly. ;-)
Whiteknight jonathan: I have no idea to tell you the truth. Could find out though 13:44
jdv79 moritz: no 13:45
Austin It looks like squaak does not emit the necessary .include of it's builtins.
jdv79 moritz: its the submitter prop. not the user prop. 13:46
jonathan Austin: Probably load_bytecode, but yes.
Austin It doesn't emit that, either.
:)
jonathan Aye. that's the one it probably should emit to allow compilation to PIR to work. 13:47
yanger okay, is there a way i can manually add it somewhere?
Austin yanger: Congratulations. You've found a bug.
yanger :) pleasure to help out
moritz jdv79: so what should I do to make my name appear on the smolder report?
Austin Do you have a login at trac.parrot.org?
jonathan yanger: Fix is something like a load_bytecode "squaak.pbc" or similar instruction. 13:50
(manual fix)
jdv79 its there now. what's the issue? 13:51
smolder.plusthree.com/app/public_pr...ails/28168
i see "moritz":)
moritz jdv79: I was confused because the "user" on the overview page was always "anonymous" 13:53
jdv79: so I guess it's not an issue after all. Thanks for clarifying 13:54
jdv79 i guess we could set user too... whatever.
i just copied what parrot does to try to stay similar 13:55
yanger slightly confused, why should foo.pir require load_bytecode "squaak.pbc"?, squaak is quite basic, the oly builtin function it provides is a print function (contained in src/builtins/print.pir), otherwise foo.pir ought to be self contained 13:57
and so foo.pir ought to load this pir file
aha, it ought to load this file 13:58
i.e src/builtins/print.pir which contains 'infix:<=' 13:59
jonathan yanger: Yes, though if you load that it has to be compiled from PIR to bytecode first - if you load squaak.pbc then it's just a case of loading some bytecode, which is probably mmap'd anyway. 14:00
yanger i see, thanks again 14:01
14:03 kid51 joined
dalek a: 1165a2b | fperrad++ | t/ (15 files):
these libraries are now tested by t/lua-TestMore/test_lua51/lib
14:06
14:06 particle joined
yanger Added this to the end of foo.pir 14:10
.sub 'onload' :anon :load :init
load_bytecode 'squaak.pbc'
.end
Which worked, time parrot squaak.pbc examples/factorial.sq (5.932 secs) 14:13
time parrot foo.pbc (4.32 secs)
I was hoping for pythons 0.x secs
14:23 allison joined
jonathan yanger: There's probably a whole bunch of factors there, including whether or not you compiled Parrot with optimization, that the compiler doesn't generate as optimal code as it could for Parrot anyway, and that Parrot is still very much in the process of being made fast. 14:30
yanger yes, i am recompiling now, and trying different runcores (as an aisde, using -R jit just returns, i.e doesn't run at all) and yes, i admit a lot of works is being done on parrot, so eagerly waiting 14:31
NotFound And that no one intends to optimize squaak for speed.
14:33 Patterner joined
yanger @notfound, Well, i understand that, but i wonder given the language is so simple(and the code is), i thought the vm would do the optimizations 14:34
14:34 JimmyZ joined
cconstantine I'm trying to iterate through an a slurpy argument backwords and I get an error when I so 'iter = ..ITERATE_FROM_END 14:35
'iter = .ITERATE_FROM_END'
it's complaining about the . Does anyone know what I'm doing wrong?
NotFound cconstantine: Do you include the appropiate file for that macro?
cconstantine probably not; I'm not including anything 14:36
NotFound cconstantine: .include 'iterator.pasm'
jonathan yanger: It may well be the compiler toolchain that cna do some of those as much as the VM, but yes, I hpoe more can be provided in the future. 14:37
cconstantine does that need to be in the .sub that uses it, or can it be at the toplevel?
NotFound cconstantine: at toplevel, better.
cconstantine awesome
thanks 14:38
thats what I get for searching in the docs instead of *reading* the docs :)
14:39 jan joined 14:41 Andy joined
NotFound The current implementation of ASSERT_ARGS looks wrong. It uses && but each individual assertion returns 0. 14:42
cconstantine How do I cause PAST::Var's to create boxed values? 14:51
Austin cconstantine? 14:52
cconstantine yes?
Austin What do you mean?
cconstantine ah. I want all my values to be boxed, so when I have a litteral value in my language I want it to correspond to a boxed value 14:53
Austin Because you should be able to use PAST::Val (note: val-ue, not var-iable) to box up literals
NotFound Some objection to use operator comma in ASSERT_ARGS, thus avoiding to worrying about short circuits?
cconstantine right, val not var
Austin Just create a ::Val object with the appropriate :returns() setting. 14:54
cconstantine Austin: thats what I hoped, but I can't find the word 'box' anywhere in the PAST docs
Austin PAST::Val.new(:returns('Integer'), :value("1"))
It's a magic box. 14:55
cconstantine I like magic
15:15 davidfetter joined 15:16 JimmyZ joined 15:23 Andy joined 15:28 ash_ joined 15:37 theory joined
mikehh all tests PASS (pre/post-config, smoke (#28187), fulltest) at r41528 - Ubuntu 9.04 amd64 15:52
dalek ose: r166 | Austin++ | trunk/src/ (8 files):
Moved library files to src
16:02
NotFound Who has been working recently in hash.c ? 16:06
moritz ask the blame log 16:07
s/blame/praise/ 16:08
NotFound hash_value_from_string and hash_value_from_pmc take non NULLOK parameters, but they are called with values unchecked for nullness from several places. 16:09
And ASSERT_ARGS is not catching the problems because ASSERT_ARGS is wrong. 16:10
mikehh partcl r745 builds on parrot r41528 - make test PASS (smolder #28188) - ubuntu 9.04 amd64
NotFound: mostly bacek 16:11
dalek rrot: r41529 | jkeenan++ | branches/library_files/lib/Parrot/Harness/DefaultTests.pm:
Simplify assignment to @developing_tests.
16:14
mikehh rakudo (0331d60) builds on parrot r41528 - make test / make spectest_smolder (up to 28442 -> #28189) PASS - Ubuntu 9.04 amd64
NotFound bacek: ping 16:17
16:19 allison joined
ash_ can you add new op codes at runtime? 16:21
16:25 jrtayloriv joined
allison ash_: yes, if you've compiled them as a dynop library 16:25
ash_ how are they added then? because aren't the op's hard coded into an enum? 16:28
Austin Make a saving throw vs. intelligence or go insane. 16:30
ash_ aww man *gets out my Arkham Horror dice* 16:32
dalek rrot: r41530 | NotFound++ | trunk/config/gen/platform (3 files):
[cage] fix declarations of Parrot_hires... platform functions for ansi C style
16:34
mikehh NotFound: wow - did svn log src/hash.c - it goes all the way back to r1456 16:36
NotFound A piece of history
Austin The simplest explanation, ash_, is that yes, the VM knows how many opcodes there are. And therefore, if you request an "extra", it must either be dynamic or a horrible error.
mikehh lots of it :-}
dalek rrot: r41531 | NotFound++ | trunk/src/call/context.c:
[cage] fix C90 violation
16:38
ttbot Parrot trunk/ r41530 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107481.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 16:39
jrtayloriv I'm getting a build error in r41529 if I do 'make -j5', but not if I do 'make' ... Error from 'make -j5' --> pastebin.ca/1581549 16:41
ash_ I am curious because for a llvm based jit system i think it would be best if you could define all the op codes as llvm-ir codes, then load the pasm code as its own function then you can run the llvm-jit optimizations on that and it would give you the best bang for your buck (hopefully without to bad of a startup time, but if it has a bad startup time you can always dump the resulting llvm-ir into a file so you only have to do it once). If 16:42
each dynop lib has its own op codes too then if you wanted to run it with a jit core you'd need them in llvm-ir form also, which implies you'd need an llvm compiler front-end (clang or llvm-gcc), where as if there was a special op code for external libs you could use that as a substitute, it wouldn't benefit from the same optimizations as the rest of the code would but it would mean you could compile extensions without the added requiremen
of an llvm front-end
ash_ wall if text crits you for o.0
jrtayloriv I'm also getting the error in r41531 16:43
Austin Ash, look on trac.parrot.org for "lorito." That's what they're looking at doing.
allison ash_: for true jit (that is, just in time compilation, that is compilation on the fly at runtime), you will need the llvm frontend available 16:44
ttbot Parrot trunk/ r41531 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107506.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 16:45
allison ash_: you can do a pseudo-jit (all the ops down to machine code at compile-time) and only make llvm a build-time requirement
ash_: but it's substantially less useful than a true jit
jrtayloriv (oops -- I forget to say "I'm getting a build error for *Parrot* with make -j5 in r41532", not for phemer) 16:50
NotFound jrtayloriv: some missing dependence, most probably 16:51
jrtayloriv NotFound, I haven't installed/removed any software from my system, and Parrot has been building fine previously. 16:52
Could it be an old installed Parrot causing problems somehow? 16:53
dalek TT #231 reopened by jkeenan++: make -j2 test fails
NotFound jrtayloriv: some missing dependece in the parrot Makfile, I mean
jrtayloriv oh, ok 16:54
ash_ i guess that depends on which llvm passes you want to use on your code, if you can get the whole program loaded as a llvm-ir function (which you can either build dynamically, or use the llvm compiler front-ends to build) then you can do some of the more aggressive optimizations like function inlining, but you'd have to have the ir form of code loaded to achieve that, that is a true jit still, its just optimizng the llvm-op code a bit more
than a simple jit
jrtayloriv NotFound, Should I add my error as a comment to that ticket?
16:55 payload joined
NotFound jrtayloriv: sure 16:55
jrtayloriv ok
dalek rrot: r41532 | NotFound++ | trunk (2 files):
[hash] add NULLOK decoration to value parameter in hash_value_from_pmc and hash_value_from_string
16:59
17:00 rhr joined
allison ping bacek 17:02
purl I can't find bacek in the DNS.
allison Does anyone know the purpose of the pcc_arg_unify_2_0 branch? 17:03
It looks similar to what I was planning to work on today, but I'm not sure how similar. 17:04
moritz allison: it's an attempt to apply the diff from the old pcc_arg_unify branch to trunk
NotFound allison: I think it was an attempt to apply to a recent copy of truk the diff of pcc_arg_unify
ttbot Parrot trunk/ r41532 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107564.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ )
allison exactly what I was going to work on today 17:05
but, it looks like some parts have been reverted?
NotFound allison: they were trying to help you
cconstantine in piy, how do I test if a parameter is passed in as null/0?
moritz allison: bacek mentioned that he might have resolved some conflicts wrongly
allison oh, yes, I'm not complaining
kid51 jrtayloriv: Your paste 1581549 doesn't show any 'make' failure that I can see; was it cut off?
allison it would just be silly for me to do it if it's done already 17:06
jrtayloriv kid51, make: *** [compilers/nqp/nqp.pbc] Error 127
kid51, it was in there -- I put the stuff after it as well (I don't understand parallel make well enough to know whether I am removing useful info, so I left it all in there) 17:07
Austin cconstantine: Do you really mean null?
moritz allison: irclog.perlgeek.de/parrot/2009-09-24#i_1537533 that's where it started, fvwiw
Austin Of do you mean undef?
allison moritz: any thoughts on whether it's easier to clean up merge failures in the 2.0 branch, or to try again?
cconstantine Austin: a func may return a $P0 that was nulled (null $P0), I want to detect that 17:08
Austin Because there's an if null comparison for null, but undef is another matter.
Okay.
moritz allison: no idea really
Austin if null $P0 goto p0_is_null
cconstantine awesome, thanks :)
Austin unless null $P0 goto p0_not_null
allison moritz: it's bacek I need to talk to, I know
kid51 jrtayloriv: Yeah, since I can't do parallel, I don't know parallel, and I always look first at the end of the paste.
jrtayloriv kid51, I thought that perhaps knowing what other things were happening in parallel with the part that failed might help to diagnose the problem. 17:09
kid51 Perhaps if you built starting with -j2, then -j3, etc., something might become apparent. 17:10
On my simple boxes, I've never gotten -j to do anything useful. 17:11
jrtayloriv I always use -j5, but I'll try again with -j2, j3, etc, as you suggested 17:12
moritz 'make -j' seems to build nearly nothing here
kid51 I guess the problem is: What was 'make' trying to do when it generated this: make: *** [compilers/nqp/nqp.pbc] Error 127 -- instead of simply waiting for unfinished jobs? 17:13
jrtayloriv moritz, same here. it is trying to do this ---> ./parrot -o compilers/nqp/nqp.pbc compilers/nqp/nqp.pir <--- way to early
Austin probably no dependency on parrot 17:14
kid51 moritz: Apropos of 'make -j', can you glance at reopened trac.parrot.org/parrot/ticket/231 ? thanks.
Austin I'm wrong. There's a dependency on $(PARROT) okay. 17:15
cconstantine so, is the fact that my tail positioned calls are not getting converted from a 'call' to a 'tailcall' a bug, or non-feature? 17:17
moritz kid51: my current comment is that parallel build is even more broken than before 17:18
somehow I suspect it's r41514 17:19
Austin cconstantine: non-feature
cconstantine Austin: cool, so for my language to automatically do tail cal optimization I'd have to inspect/modify the ast? 17:20
Austin ayup
moritz but I don't understand that - $(NQP) depends on $(PBC_TO_EXE), which in turn depends on $(PARROT)
cconstantine fantastic. manual tail calls it is :) 17:21
kid51 The tinderbot build failure report on MSWin32 is confirmed by the absence of any Smolder reports since r41496 yesterday. 17:22
Is there anyone on Win32 who could bisect?
mikehh jrtayloriv: I got this error with nqp a bit earlier - I think you will find that it is a permissions problem with parrot_nqp* in the build directory 17:24
jrtayloriv: I don't know what went wrong but when I did sudo chown mhh:mhh parrot_nqp* it fixed it and I haven't had the problem since 17:25
jrtayloriv mikehh, permissions and ownership are correct on all of those in my case 17:26
mikehh jrtayloriv: obviously use your id rather than mhh :-}
moritz that sounds like you did a 'make install' as root once which finished a build that was previously aborted
btw blizkost has a problem that a file was generated with permissions 000 17:27
mikehh I do a sudo make install-dev to test rakudo and partcl etc
17:28 chromatic joined
rindolf Hi chromatic 17:30
17:32 kyle_l5l_ joined 17:33 ash_ joined
chromatic hello 17:33
dalek rrot: r41533 | NotFound++ | trunk (134 files):
[cage] use operator comma in ASSERT_ARGS to avoid problems with short-circuited operators
17:34
mikehh hi chromatic
rindolf chromatic: hi. May I PM you?
chromatic If you like. 17:36
rindolf chromatic: OK.
chromatic: what's up?
purl A direction away from the center of gravity of a celestial object. or the y-axis, unless you're using a strange coordinate system.
ttbot Parrot trunk/ r41533 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107627.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 17:38
17:41 workbench joined 17:52 mokurai joined
NotFound r41533 builds fine for me in win32 with strawberry perl 17:57
18:03 Whiteknight joined
dalek rrot: r41534 | mikehh++ | trunk/tools/build/headerizer.pl:
fix codetest failure - hard tabs found
18:04
mikehh jrtayloriv: I got the same failure when I tried after config -> make -j test TEST_JOBS=5 - it tries to build nqp using ./parrot which has not yet been built
ttbot Parrot trunk/ r41534 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107682.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 18:08
mikehh jrtayloriv: I could do this before and it looks like pmichaud changed things at r41514
jrtayloriv mikehh, That's what moritz was saying earlier (that he suspected 41514 might be the issue) 18:09
kid51 I recommend filing a TT and cc-ing pmichaud so that he can look at it. 18:10
Whiteknight ls 18:20
jrtayloriv . .. naughty-photos.jpg loud-music.mp3 passwords-and-pins.txt 18:21
Whiteknight make testls 18:23
mikehh bbiab 18:24
jrtayloriv bacek, When you said last night "jfyi, there is virtually no "compile-time" in scheme :)", what did you mean, in reference to me trying to use PAST::Block symbol() method to initialize builtins as lexicals in the top block? 18:26
I've got a major block in my head about initializing the builtins as symbols bound to procedures, rather than just writing a "define" function, so that I can do (define define 5) and have it work. 18:29
It seems like there is some really obvious way to do this, but I've read, and reread the docs for PAST and PCT and can't figure out what I need to do.
bacek_at_work, ^^ or you :) 18:31
dalek rrot: r41535 | NotFound++ | trunk/t/pmc/fixedfloatarray.t:
[t] cover FFA clone empty and get_bool
18:37
ttbot Parrot trunk/ r41535 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107729.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 18:42
chromatic morepypy.blogspot.com/2009/09/first...f-jit.html 18:44
ash_ wonder how that compares to unladen swallow 18:49
pypy seems rather limited since it only works on x86-32 bit 18:50
18:51 masak joined
chromatic I don't think Unladen Swallow is trying the metacircular approach that pypy is. At least I think that's what pypy does. 18:52
Whiteknight that's what I think pypy does, yes 18:54
chromatic ftp.squeak.org/docs/OOPSLA.Squeak.html 18:56
"Smalltalk to C Translation" in specific. 18:57
Tene hates seeing people talk about parrot as "vaporware" 18:58
chromatic www.rowledge.org/tim/squeak/OE-Tour.html 19:00
19:05 cotto_working joined
allison Unladen Swallow is just modifying CPython to use an LLVM jit 19:08
not trying for metacircular approach 19:09
Whiteknight bacek: ping 19:13
dalek rrot: r41536 | whiteknight++ | branches/pcc_arg_unify_2_0 (2 files):
[misc] replace old reference to PObj_strstart with newer Buffer_bufstart. Enables build on this platform
19:16
cconstantine I've taken Tene's stene and I'm trying to add tail calls to it (with a special '(^func arg1 arg2)' form).... and I'm having problems. I have a feeling that I'm building my ast horribly wrong. Could someone help? github.com/cconstantine/Reason 19:17
dalek rrot: r41537 | whiteknight++ | branches/pcc_arg_unify_2_0/src/pmc/cpointer.pmc:
[pmc] cpointer should not attempt to mark it's P/S members. I thought this was fixed a long time ago. Fixes at least one test failure (t/pmc/null.t)
19:26
chromatic We fixed that at least twice, a while back. 19:31
Whiteknight at least twice
t/pmc/stringhandle.t hangs on my system 19:32
cconstantine the tailcall portion of my ast is matched here: github.com/cconstantine/Reason/blob...ar.pg#L122 and built here: github.com/cconstantine/Reason/blob...ns.pm#L218 19:33
chromatic Extending the Squeak Virtual Machine (this is the paper I wanted most to find): www.iam.unibe.ch/%7Educasse/FreeBoo...enberg.pdf 19:34
Tene cconstantine: I'll be available tonight for help. maybe 5 hours from now. 19:35
Whiteknight t/perl/Parrot_Test.t hangs too
cconstantine Tene: thanks. In the meantime could you let me know how to print values in NQP? 19:36
Tene cconstantine: just invoke your language's printing function. 19:37
Whiteknight a lot of these test failures are segfaults, which is probably good because it's easier to debug methinks
Tene say("foo")
cconstantine Tene: i mean so I can print values as the ast is being built... like say in method tcall in actions.pm
fantastic, right 19:39
19:43 rhr joined
Whiteknight t/pmc/fixedboolean array gets into a PIR-based infinite loop 19:46
it's an infinite exception handler loop 19:49
Ah, it's not handling a :slurpy return 19:52
it's only returning a single element (a String) instead of an RPA 19:53
Any test that uses Test::More.like() calls PGE which relies on P6object, which in turn requires :slurpy return arguments in it's onload function 19:55
I'm sure that accounts for a significant number of test failures (shift not implemented in class "String", etc)
allison: ping 19:58
allison Whiteknight: pong
Whiteknight allison: did you get my message yesterday about params/returns?
allison Whiteknight: email or IRC?
chromatic The returns code should fill out the slurpy returns appropriately.
Whiteknight allison: IRC
allison Whiteknight said: since returns are just invokes on a continuation, shouldn't we be able to unify the arg passing and returns passing functions? It's mentioned in PDD03 somewhere. Is that off the roadmap or is it part of a later refactor? 19:59
Whiteknight at least, I thought I sent an IRC message to you yesterday
allison that one?
purl i heard that one was silly to. It's an impl detail, right?
Whiteknight yes, that one
purl that one is silly to. It's an impl detail, right?
allison we can't unify them at the moment
Whiteknight because if we could just duplicate Parrot_pcc_fill_params_from_op into Parrot_pcc_fill_returns_from_op, we would fix a lot of test failures right now
at least, adding support for :slurpy returns 20:00
allison an earlier revision (pretty sure it's Chip's time) put the call to get_results *before* the call to invoke
so, it's all backwards
the current system has to set up storage locations for the results before the call, and fill them during the call 20:01
so the logic is completely different for fill_params and fill_returns 20:02
(unfortunately)
Whiteknight okay, I see what you are talking about now
chromatic That doesn't work in the face of NCI invoke, for example.
I've worked around that for ages.
allison yes, we need to change it back to how cps was meant to work
(call and return are the same behavior) 20:03
Whiteknight but that's a separate refactor
allison but, ... aye
for now, add slurpy handling to fill_returns separately, and we'll collapse later 20:04
Whiteknight ok
NotFound Parrot_oo_get_namespace is never used in the repo 20:07
allison NotFound: what's used instead?
NotFound The Class attribute, directly. 20:08
Parrot_oo_new_object_attrs is also never used 20:09
His pod says is needed for places like Parrot_oo_clone_object, but Parrot_oo_clone_object doesn't use it 20:11
Whiteknight I may have added Parrot_oo_new_object_attribute at one point when I was trying to fix a bug in Parrot_oo_clone_object 20:25
of course, I seem to remember my "fix" created segfaults, so I'm sure it's all been refactored
allison NotFound: the idea of Parrot_oo_get_namespace was to hide the class access behind an abstraction layer 20:26
NotFound: reducing direct access to attributes
NotFound allison: I suppose so, but looks like nothing by functions that are already using Class internals needs it. 20:27
s/by/but
allison but, the get_class vtable function is sufficient
(there's no get_namespace vtable function) 20:28
mmm... not explaining very well 20:29
NotFound The problem is that if no accesible part is using it, it cannot be tested.
allison NotFound: basically, yes, feel free to mark Parrot_oo_get_namespace as deprecated
NotFound: it can be tested in C 20:30
NotFound allison: I don't think is reasonable to test from C functions that aren't in the extern/embed interface. 20:31
allison NotFound: exactly
NotFound So, put it in extern, or deprecate.
allison NotFound: the decision is basically whether C extenders/embedders have access to the feature another way, or don't need access to the feature 20:32
bacek Good morning #parrot 20:34
NotFound I guess it can be useful to add subs to the namespace from C :?
allison NotFound: or introspect the namespace object for a particular class
but, better as a part of the 'inspect' vtable function, than yet-another-API-function 20:35
NotFound inspect_str provides acces to it
inspect also 20:36
allison then the C function is really redundant 20:37
NotFound We can deprecate it, then.
allison NotFound: agreed
NotFound: I'm inclined the same direction for Parrot_oo_new_object_attrs 20:38
bacek: could you fill me in on the pcc_arg_unify_2_0 branch?
bacek: work done so far, problems, etc? 20:39
NotFound allison: I think we can just get rid of that, it uses strcitly internal structrures.
bacek allison: I've merged recent trunk into pcc_arg_unify_2_0.
allison NotFound: yes, it really shouldn't be part of any publich API
NotFound Going to kill it now, then. 20:40
bacek It was a lot of conflicts. I resolved some of them in wrong way.
allison bacek: merged trunk into branch or branch into trunk?
bacek: (a fresh copy of trunk, I should say)
cconstantine Is there a language built on parrot that generates tailcalls?
allison bacek: since I wasn't sure of the status, I started working on a git branch of parrot trunk 20:41
bacek allison: technically - branch into trunk. I created new branch and merged old branch into it
allison bacek: I can give you a patch that applies cleanly to trunk pretty quickly here
bacek: and yes, there are some conflicts (about a dozen .rej files) 20:42
bacek It will be good.
allison bacek: did you use svn merge, or reapply a patch?
bacek allison: I use local git checkout. 20:43
allison: r41453 is my "merge point"
Whiteknight I'm using pcc_arg_unify_2_0 here, and it's working very well
allison bacek: okay, but how did you apply the old changes to the git checkout?
bacek (With list of conflict files)
Whiteknight a few hiccups, but debugging now 20:44
allison bacek: more out of curiosity, than anything else
Whiteknight: aye, but he had to revert a bunch of changes
Whiteknight: so it's not a full merge
bacek allison: git checkout -c pcc_2_0_local; git reset --hard remotes/pcc_arg_unify_2_0; git merge pcc_arg_unify_local
Whiteknight oh, then I won't play there anymore
bacek allison: so, I just merged 2 local branches. 20:45
allison Whiteknight: play away, just don't commit anything :)
Whiteknight I already did commit two small fixes to pcc_arg_unify, but I'll chill out on that for now
allison bacek: got it
Whiteknight Just let me know where I should go instead, I want to get my hands on this 20:46
allison Whiteknight: well, if you can give me the changes as patches later, then no problem going ahead and committing
bacek allison: I fixed some merge conflicts in subsequent commits. Not all of them...
allison bacek: I'm looking through the 2.0 branch as I work through the conlicts 20:48
bacek: in this particular case, the patch approach seems to be working more cleanly than the merge approach (a tip I picked up from Greg KH)
dalek rrot: r41538 | NotFound++ | trunk (2 files):
[cage] kill unused and unneeded function Parrot_oo_new_object_attrs
20:49
bacek allison: with git-svn - probably yes. Unfortunately in this case rebase doesn't work properly... 20:50
ttbot Parrot trunk/ r41538 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107813.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 20:53
allison bacek: the linux devs use patches and quilt extensively
bacek: and strongly recommend against using rebase for any published repository 20:54
NotFound Never remember that... If I add the deprecation note now, when is eligible?
allison (i.e. for any repository that anyone else is likely to be cloning)
NotFound: 2.1
(that is, the functions may not be included in 2.1, though they will be included in 2.0) 20:55
bacek allison: for published - yes. But during initial development it's very helpful.
chromatic A merge rebase is different from a rebase on a published tree.
allison I think I might have figured out part of why the git-svn folks are so frustrated, they're pulling the whole svn repo into git, instead of just trunk 20:57
NotFound allison: Type for the deprecation ticket is 'cage' ?
allison NotFound: aye 20:59
bacek allison: full svn repo allow to work with branches in svn. 21:00
allison bacek: which is exactly the problem, it's trying to use the svn branching model in git, which is painful 21:01
bacek allison: there is my workflow on using svn branches with git in trac. It's not exactly "painful", but "less than awesome" :) 21:03
Whiteknight the pain point isn't using SVN or Git, it's trying to use them together 21:04
either-or is much preferrable to both
allison Whiteknight: nah, a quick git branch from trunk is easy-peasy, so is developing for trunk
bacek trac.parrot.org/parrot/wiki/git-svn-tutorial #Tracking SVN branches with GIT
allison a quick git copy of any svn branch is also easy 21:05
bacek: yeah, reading that is when I realized the pain was coming from
... the way people were using git-svn 21:06
chromatic Yep. SVN branches are painful.
bacek it's just more natural to git to have a lot of branches. 21:07
And what chromatic said :)
anyway, $dayduties time
allison what's the modern way of saying CONTEXT(interp)->current_sig 21:08
bacek allison: feel free to use pcc_arg_unify_2_0 branch for anything. Or just scrap it and create new one
allison: I've added accessors for it
21:08 cconstantine joined
bacek r41454 21:08
allison bacek: which file are they defined in?
(or, which is the right one to use here) 21:09
bacek allison: src/call/context.c
allison bacek: cool, thanks!
dalek TT #1069 created by NotFound++: Deprecate Parrot_oo_get_namespace
Whiteknight I feel like that API needs some tweaking, but that's another issue for another refactor
bacek ok, see you soon.
Whiteknight: there is few tickets for Context API already :) 21:10
cconstantine Is the .return() after the .tailcall safe? nopaste.snit.ch/18073
Whiteknight bacek: I don't agree with your opinon on the Context ATTRs either, but that's also not for me to worry about now 21:11
moritz cconstantine: it's never reached, so it should be no problem
cconstantine moritz: that's what I thought
dalek rrot: r41539 | NotFound++ | trunk (2 files):
[cage] deprecation notice for Parrot_oo_get_namespace, TT #1069
21:12
chromatic I almost want to suggest that context registers (passing/returning) need separate storage from local registers. 21:13
Then I think "Oh right, continuations".
allison passing/returning doesn't use registers at all anymore 21:14
(branch, not trunk)
Whiteknight has so many tickets that are going to be closable immediately or shortly thereafter the PCC branch merges 21:15
:invocant will be easy to add, :lookahead, :signature, etc 21:16
allison oh, I forgot, current_sig is a new addition to the interpreter in the branch, so doesn't have an interface yet in trunk
Whiteknight be able to fix the stupid way that hash keys are passed
chromatic We've gone afield from one advantage of register machines though: not copying memory contents around. 21:17
ttbot Parrot trunk/ r41539 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107867.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 21:18
allison chromatic: aye, that happened with the change to variable sized local register sets
chromatic Exactly.
Whiteknight i don't think there is a sane way to bring that back either 21:19
allison chromatic: but encapsulation is such a huge security/concurrency advantage, it would be tough to go back to a single global register set
chromatic I'm not sure how we could have helped that though, with the various argument processing mechanisms.
allison chromatic: at least it's only ints and floats that get copied, strings and pmcs are just a pointer copy 21:21
chromatic Even still, the Dis paper suggested that their biggest benefit was avoiding copies entirely. 21:23
Whiteknight Dis paper? 21:24
allison chromatic: probably true at the time, no one really envisioned register usage like we've got 21:26
how do I get the current context PMC? 21:28
looks like CURRENT_CONTEXT 21:29
(with a comment that it should be replaced by an interface function, but I don't see an appropriate interface function) 21:30
cconstantine moritz: the error I'm getting is that 'String' doesn't have an 'invoke' shouldn't that func be calling .invoke() on the lexical variable 'func1' not the string object 'func1'? 21:31
moritz cconstantine: no 21:33
cconstantine: you might need a find_lex to look up the variable 21:34
cconstantine ahhh, I see how that's missing now 21:35
NotFound allison: Parrot_cx_get_context ?
Uhh... looks like that name is used in a macro, but never declared or defined :? 21:37
As expected, the macro is never used 21:38
allison maybe Parrot_pcc_get_context
NotFound allison: there is Parrot_pcc_get_context_struct 21:39
allison (since changing cx to pcc was one of the changes I made)
bacek Parrot_pcc_get_context. _struct fetches underlying structure.
allison NotFound: I want the PMC, rather than the struct inside the PMC
bacek Not sure that I added it.
21:40 darbelo joined
allison bacek: I used CURRENT_CONTEXT for now, can update to interface function when there is one 21:40
bacek: most of the other interface functions require a PMC argument for the context (which is exactly what they should do) 21:41
bacek It's better to use CURRENT_CONTEXT anyway. We can switch between API func in debug build and direct poking into Interp in optimized.
Similar to registers
(PMC) and yes, underlying structure shouldn't be exposed at all 21:42
allison bacek: good to know 21:43
bacek: is the stray Parrot_cx_get_context that NotFound found removable?
NotFound #define PMC_context(pmc) Parrot_cx_get_context(interp, (pmc))
bacek allison: I think I removed it... If no - it should be removed in favour of _pcc_ version 21:44
Just kill this define
allison: btw, should we kill Context.current_results and results_signature? Looks like they shouldn't be used anymore 21:51
allison bacek: that and a whole pile of no longer used functions, but I'm holding off on removals until all the tests are passing 21:52
bacek allison: ok
allison: can you update wiki page with explanations when "caller_sig" and "current_sig" should be filled. And when new Context should be pushed? I'll try to look at it tonight. 21:57
bacek finally run away to $dayjob
allison bacek: sure
ttbot Parrot trunk/ r41540 MSWin32-x86-multi-thread make error tt.ro.vutbr.cz/file/cmdout/107925.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 22:08
Whiteknight allison: where are you doing the PCC stuff now? svn branch? git branch?
dalek rrot: r41540 | NotFound++ | trunk/include/parrot/context.h:
[cage] delete unused and unimplemented macro PMC_context
22:10
allison Whiteknight: a local git branch
Whiteknight ok
allison I have a github account, but don't know how to push a local git branch up to github
Whiteknight: but as soon as I have a clean diff of old changes to new trunk, I'll create an svn branch 22:13
Whiteknight ok
allison just finished with the last rejected change in the patch
Whiteknight ok 22:14
chromatic allison, you should be able to add a GH repository as a remote, then push there... but that's just FYI not a suggestion. 22:16
cotto It's nice to see allison playing with git.
allison chromatic: I have a github account.... 22:17
chromatic: but, should I be pushing my master, or my git branch of the branch?
chromatic: or, does it really matter? 22:18
purl does it really matter are you planning on staying at the airport?
allison purl: no, I've had enough of airports
purl allison: i'm not following you...
Whiteknight ...and there is so much cleanup to do everywhere! 22:36
cotto How's that raid on pcc_arg_unify going? 22:46
darbelo The castle's sieged and the architect's working on breaching the main wall. 22:49
cotto I was happy to see the new wiki page.
Whiteknight cotto: no raiding. Still waiting. Allison is creating a new branch
allison Whiteknight: okay, I've published my git branch in progress github.com/allisonrandal/pcc_testing 22:51
Whiteknight: got another context fix to make in core.ops 22:52
Whiteknight okay
22:52 preflex joined
darbelo /me brings his trebuchet 22:54
allison somehow adding a remote repo for publishing make .gitignore stop working...
s/make/made/
Whiteknight yeah, the git checkout thing is throwing an error about a remote repo 22:56
22:56 mokurai joined
allison Whiteknight: what's the error? 22:59
purl allison: Is a directory
Whiteknight remote HEAD refers to nonexistent ref, unable to checkout.
allison are you doing git clone git://github.com/allisonrandal/pcc_testing.git foobar 23:00
Whiteknight yes 23:01
allison looks like it's because I pushed from a local branch of a branch, instead of local master 23:02
japhb Tene, around?
allison Whiteknight: okay, do it now 23:04
Whiteknight: (I had to push the master too)
japhb darbelo, did Tene post a patch for his Plumage fetch code? I don't see a commit for it in the repo ... 23:05
darbelo japhb: I'm not sure he did. Let me check the backscroll. 23:06
Whiteknight no love
darbelo Whiteknight: works for me. 23:07
Whiteknight well la-de-dah darbelo.
:)
cotto me too
Whiteknight I'm sure I have something screwed up settings-wise here
allison Whiteknight: you'll get the master, but looks like the changes on my sub branch
don't go through that way
Whiteknight okay, what's the command I type then? 23:08
(git newbie here, this is my first git branch)
cconstantine is there anything I need to include to use sprintf in pir? 23:09
cotto I'm really glad to see some development done on Parrot using git.
Whiteknight cconstantine: shouldn't be. Have a built-in sprintf op
cotto even if it doesn't represent a commitment either way
cconstantine Whiteknight: I'm getting various errors about sprintf* not being found 23:10
Whiteknight cconstantine: what C compiler are you using? sprintf is a builtin C runtime routine. It should be everywhere 23:11
allison git clone \t git://github.com/allisonrandal/pcc_testing.git localname
cconstantine uh, I'm on a mac... created the language by copying stene... it appears to be created with one of the dev/ mk_language scripts
darbelo cconstantine: if you want your language to write a sprintf builtin you'll have to wrap the opcode, look at builtins.pir for an example.
allison Whiteknight: but that won't give you what you want just yet 23:12
cconstantine darbelo: I'm trying to use sprintf from within a builtin
Whiteknight cconstantine: can you nopaste your configure output? 23:13
cconstantine Whiteknight: you mean the makefile?
Whiteknight cconstantine: no, the console output 23:14
cconstantine so, ignoring my language for now... I wrote a simple test.pir that calls sprintf and I'mg etting the same errors
nopaste.snit.ch/18074 23:15
oh.. right, parrot's .Configure output
Whiteknight yeah, Parrot's :) 23:16
cconstantine nopaste.snit.ch/18075
Whiteknight well, that should have everything you need. 23:18
darbelo Whiteknight: he wants to use the opcode sprintf from his HLL. I'm not sure the configure output helps here.
Whiteknight what was the exact error you were getting about sprintf?
cconstantine darbelo: right now I'm just trying to use it in a .pir file run as './parrot test.pir'
error:imcc:The opcode 'sprintf_p_sc' (sprintf<2>) was not found. Check the type and number of the argument in file 'test.pir' line 10 23:19
that is from '$P0 = sprintf "foo"' in my test.pir 23:20
Whiteknight ah, you can't use a $P0 return value
darbelo try '$S0 sprintf "foo"'
23:20 zerhash joined
cconstantine $S0 = sprintf "fo" 23:21
?
Whiteknight yessir
and if you want a String PMC, use $P0 = box $S0
allison Whiteknight: try this sequence...
git clone git://github.com/allisonrandal/pcc_testing.git foobar
git fetch origin +pcc-reapply:pcc-reapply
git checkout pcc-reapply
cconstantine "error:imcc:The opcode 'sprintf_s_sc' (sprintf<2>) was not found."
allison that should set you on a current local branch that's the same as my current local branch
(with a 'cd foobar' between git clone and git fetch 23:22
)
Whiteknight right, got it now. Thakns
cconstantine: sprintf has two forms, both have three arguments 23:23
so try this sequence:
$P0 = null
$S0 = sprintf "foo", $P0
$P1 = box $S0 23:24
cconstantine hm, that worked 23:25
Whiteknight yay!
cconstantine still having problems, but now it's the next problem :) 23:26
Whiteknight good, progress 23:28
Tene japhb: oops, looks like I forgot to push 23:29
japhb Tene, ah.
Easy fix there. :-)
Tene japhb: pushed 23:30
cconstantine: ping 23:31
cconstantine Tene: pong
Tene cconstantine: still trying to print from actions.pm? 23:32
or did you figure that out?
japhb Tene, Confirmed. Thanks!
cconstantine Tene: figured that out
Tene: I've figured out that the problem is when the function to call is a var, it's always thinking the func is a global 23:33
'the problem' being the tail call problem 23:34
23:35 kid51 joined 23:36 darbelo left
Tene japhb: available to review patch? 23:37
jrtayloriv I'm having trouble figuring out why the PAST::Op in method TOP can't find 'say' (using the builtins/say.pir that is genereated by mk_language_shell) --> pastebin.com/d510a56b8 (I know this shouldn't be there, btw -- I'm just trying to learn how to construct/use Op nodes correctly.)
japhb Tene, the one you just committed or a new one? (The one you just committed I will be looking at in a couple minutes, after I finish my journal for last week's work) 23:38
Tene th elatter
japhb Tene, go ahead and nopaste, I'll look at it in a few minutes. 23:41
Tene erm.. the former
:P
cconstantine I'm looking to create an invoke() method for String and having problems. I've defined a .sub as ".sub invoke :method :vtable" and I'm still getting 'invoke not implemented on class String' 23:45
Tene invoke on string? o.O
cconstantine oh yes
as a pass through to sprintf
Tene cconstantine: despite what I think of "invoke on string" :) it's actually not possible in parrot currently.
cconstantine so I can do ("some num $d" 1) 23:46
Tene You can't override the invoke vtable.
cconstantine oh poo. I guess (sprintf "foo: %d" 1) will ahve to do ;)
Tene This will be possible to fix sometime after the pcc refactors are done.
cconstantine ok
japhb Tene: OK, journal not finished, but I'm at a decent stopping point, so in the interest of getting you moving again, reviewing the patch now. 23:50
Tene japhb: I was just preparing to go out for dinner. :)
Searching on yelp for something good where I'm teaching this week. 23:51
japhb Tene, that's fine, I'll review and you'll have something yummy to read for desert. :-)
Where are you teaching?
Tene Bellevue, WA.
Just south of Redmond.
japhb Nodnod 23:53
What are you teaching?
Tene Intro to Linux
Shell scripting, VI, fdisk/mkfs, installation, ssh, etc.
cconstantine fun fun
Tene Why did I capitalize vi? o.O 23:54
cconstantine no emacs!?!?! (j/k)
Tene cconstantine: emacs is discussed, but vi is recommended, due to its prevalance as the standard editor. 23:55
;)
cconstantine hehe
23:57 patspam joined
Whiteknight disappears into the night 23:59
later