Parrot 1.3.0 "Andean Swift" released | parrot.org
Set by moderator on 23 June 2009.
Infinoid I honestly don't see what the big deal is. You copy a pointer value to another pointer, that's assignment. I'm ok with using '=' for that, even if it's a pointer to some higher level construct and ends up smelling like "binding" to that higher layer 00:00
Whiteknight in PMCs, we're going to do all exactly the same things as we're doing with C now, just with festive NQP syntax instead of C 00:02
still low-level pointer monkeying, etc 00:03
Infinoid Mardi Gras NQP?
If I understand it correctly (and I'm probably not as up to speed as others in here), I'm imagining something very much like a traditional asm language. No complex (struct-like or string-like) values anywhere, all that stuff is done by higher layers.
pmichaud: If that's a broken design, I'd love to be corrected before it's too late
00:09 Theory joined
jonathan -> sleep, night all 00:13
Whiteknight goodnight 00:14
cotto night 00:35
Whiteknight, nice work on the blog entry. That makes it much clearer how nqp could work. 00:43
Whiteknight just food for thought 00:44
cotto tasty food
Whiteknight signing off now, talk to you later 00:54
cotto pmichaud, ping 00:58
pmichaud cotto: pong 00:59
Infinoid: the difference becomes very apparent with something like $P0[0] = $P1
that's actually a bind. There's not really an assignment equivalent in PIR (yet?)
jonathan: I wonder if we should start running spectests with gc disabled. That would (1) increase speed and (2) avoid the false errors. 01:00
cotto pmichaud, I'm thinking about how nqp will need some changes to make it suitable for use in PMCs and ops that could conflict with its current use. 01:02
Infinoid I don't think L1 will have []
cotto It seems like we'll need two different but similar languages called nqp for the two purposes, which wouldn't be good for maintenance. 01:03
Is there a nice way to avoid that?
Infinoid nqasm 01:04
pmichaud cotto: it depends on the changes. So far I haven't see anything concrete. Or the things I've seen discussed so far, it's "oh yes, NQP can do that"
for example, being able to specify int registers is just "my int $foo"
cotto What about calling C functions, which will probably be special-cased using a special namespace? 01:05
pmichaud I don't see a problem with that.
If nothing else, we just import the C functions.
in Perl 6, "all's fair if you predeclare" 01:06
so if we have a declaration that says "foo is really a C function", then NQP can dtrt with it.
and I think it could be *really nice* to have a way to directly call C functions from NQP 01:07
just like I think it's a really good idea to have the ability to request int/string/num registers
To me, one of the primary reasons for asking "how would we implement a PMC in NQP" is not necessarily because we expect to use NQP, but because it gets us to start asking "What do we really need" as opposed to "How do we solve it in C?" 01:09
(although I do think NQP can be made robust enough to handle it)
it's to get us to ask ourselves "what should a PMC specification look like, if it's not C?" 01:10
cotto There's value in that.
pmichaud and if it works... imagine how nice it will be to be able to generate custom PMCs in NQP (especially for language designers :-)
there's one other piece to this puzzle to remember
one of the somewhat explicit goals of Perl 6 is to be able to interface more directly with other libraries (such as C) 01:11
so Perl 6 syntax really is intended to have the ability to define things that correspond to C-structs
we just haven't seen many examples of it yet (for want of implementations on which it's even possible)
one of the lessons I learned in our experiments in TGE was that people's ability to use it was quickly limited by syntax (which at the time was limited to PIR) 01:13
cotto Maybe we should add UnManagedStruct to the list of PMCs to mock, since it'll be a pretty good test of how well we can interface with an arbitrary C struct.
pmichaud so when I found a way to do the transformations using a primitive form of Perl 6 (what ultimately became NQP), I jumped at it.
Coming up with a way to mock UnManagedStruct would be a Huge Win on several fronts. 01:14
Especially if we could then do something like it in Rakudo.
Because then people could more easily start building interfaces to C libraries from Rakudo :-) 01:15
dinnertime here -- bbl
cotto That's nuts. 01:16
(in a good way)
01:25 Andy joined 01:27 AndyA joined
cotto Hmmm. I've heard of C++ and C#, but apparently now there's a C##, or at least some employer thinks there is. 01:29
skids thinks "D"s mistake was not naming itself "D-" 01:30
What's "mock" ? 01:32
cotto In this context, it means to come up with code that could implement the PMC. 01:34
i.e. make sure the language is capable of doing that 01:35
skids Thanks.
pmichaud cotto: for Perl 6's take on C-like structs, perhaps look at Synopsis 9, "Compact structs"
cotto looks 01:40
skids Also "Compact Arrays" towards the top 01:41
cotto I wonder what it'd take to make class_init completely dynamic.
That'd make pure-L1 PMCs much easier. 01:42
01:43 kid51 joined
dalek kudo: f59630e | pmichaud++ | build/PARROT_REVISION:
Bump PARROT_REVISION to current parrot head. Some spectests fail

from the command line. For at least a couple of days we'll accept the failures in hopes that Parrot folks can better track it down.
01:51
02:03 Theory joined 02:05 dukeleto joined 02:30 zak_ joined 02:42 janus joined 03:19 Zak joined 03:43 hercynium joined 03:50 allison joined
jdv79 limbic?! 04:27
purl it has been said that limbic is just that:)
04:33 Zak joined 05:11 amuck joined
cotto bacek_at_work, ping 05:12
nm. I'll catch you later. 05:15
dalek rrot: r39869 | petdance++ | trunk/src/io/unix.c:
consting
05:21
05:27 zak_ joined 06:07 uniejo joined 06:09 pjcj_ joined 06:13 UltraDM joined 06:16 uniejo joined, iblechbot joined
bacek_at_work clock? 06:25
purl bacek_at_work: LAX: Thu 11:25pm PDT / CHI: Fri 1:25am CDT / NYC: Fri 2:25am EDT / LON: Fri 7:25am BST / BER: Fri 8:25am CEST / IND: Fri 11:55am IST / TOK: Fri 3:25pm JST / SYD: Fri 4:25pm EST /
06:29 Theory joined 06:39 Theory joined 07:38 mberends joined
mikehh make fulltest PASS, also pre/post config, smolder at r39869 - Ubuntu 9.04 amd64 07:39
07:48 MoC joined 07:49 zak_ joined
mikehh I am getting - Method 'succ' not found for invocant of class 'Method' in tests including t/00-parrot/04-op-cmp.t and t/01-sanity/04-if.t using parrot r39869 07:51
plus quite a few spectests 07:53
07:53 dukeleto joined 08:02 chromatic joined 08:28 iblechbot joined 09:04 bacek joined
bacek o hai 09:04
09:52 masak joined
dalek TT #805 created by MoC++: Undefined reference error upon building on Windows 10:10
10:12 HG` joined
nopaste "bacek" at 114.73.166.104 pasted "Whiteknight, I almost caught problem with hashes." (68 lines) at nopaste.snit.ch/17101 10:25
bacek Anyone with strong gc-fu around?
Infinoid Where was expand_hash called from? 10:44
I don't think my gc-fu is very strong, but it is an area I've been staring at for the last few days :) 10:46
bacek parrot_hash_put 10:55
Infinoid I could keep asking you for the next frame, but it might be easier if you just nopaste the backtrace
bacek nopaste.snit.ch/17101 10:56
Infinoid I think something holds a reference to this Hash without marking it
bacek I suspect "C stack"
10:56 AndyA joined
Infinoid thanks, but I don't see the rest of the backtrace in that nopaste 10:56
ok, if it's on the C stack without being detected, that is a big problem 10:57
that would be a bug in our basic set detection
bacek My guts feelings that objects on C stack didn't get PObj_live flag cleared before gc run 10:58
And VTABLE_mark didn't get called for "live" objects
Infinoid well, the objects on the C stack are really just pointers, the objects still live in their arenas, and PObj_live should be cleared for everything in all arenas 10:59
If we were allocating actual PObj structures on the stack, that would be different
nopaste "bacek" at 114.73.166.104 pasted "full bt" (31 lines) at nopaste.snit.ch/17102
Infinoid (but we don't do that. Yet.)
ok. That Hash is the "parent_overrides" ATTR of a Class PMC, which should have marked it 11:02
Maybe the Class PMC itself wasn't marked
bacek (gdb) p classobj->flags & 524288 11:03
$16 = 0
524288 is PObj_live flag
but looks like it's stale from previous GC run 11:04
Infinoid we're never calling any vtable functions in that class, but I think its attr struct should also have been freed if it were GCed 11:07
here's something I never understood (which may or may not be related to your problem): base classes like Object have mark() functions, and Object's marks the Class. But subclasses can declare their own mark() function, and they apparently are not required to call SUPER(). 11:11
The GC doesn't even try to walk the class inheritance stack, it just calls VTABLE_mark(), so the superclass mark function never gets called. Won't that cause problems?
bacek hmm... It can be. 11:12
Infinoid I always sort of figured "if it were really a bug, lots more things would break, but things seem to be working well". But I still don't see how they work
jonathan The class VTABLE mark will mark its parents list.
Infinoid I can see that if it calls SUPER(), but not all mark functions seem to 11:13
bacek there is only on pmc inherited from Class - PMCProxy. 11:14
And it properly mark all members afaiu
Infinoid In this case, your PMC is inherited from Object, and the Object has a reference to the Class for its get_class function 11:15
the Object mark function marks the Class. But my question was, is Object.mark ever being called
if the Class object was GCed, that suggests the answer is "no" 11:16
Is classobj->vtable set to deadbeef?
bacek no 11:17
oookeeey.
Infinoid ok, so I'm wrong.
bacek I've added PARROT_ASSERT(hash->gc_mark_runs >= interp->arena_base->gc_mark_runs);
into parrot_hash_put
Infinoid I like your strategy. :)
bacek Divide and conquer! 11:18
All fails lead to packfile's do_sub_pragma
do_sub_pragmas
Looks like (freezed?) strings in PBCs aren't thawed properly 11:19
bacek hate precise GCs more and more with every minute... 11:24
Infinoid "precise"? 11:30
bacek isn't is noun for "precisely"? 11:34
In GC word it's opposite to "conservative" 11:35
Infinoid oh, I understood it to mean the opposite of "inaccurate" 11:43
bacek "conservative" GC is pretty "inaccurate" :) 11:44
Infinoid true :)
bacek ok, I have to sleep on this problem... 11:54
see you tomorrow.
my tomorrow :)
12:11 kid51 joined 12:14 masak joined 12:27 ruoso joined 12:43 eternaleye joined 12:44 allison joined 12:48 skids joined 13:32 Whiteknight joined 13:39 AndyA joined
dalek rrot: r39870 | fperrad++ | trunk/config/auto/gcc.pm:
[config]

see TT #805
13:42
TT #805 closed by fperrad++: Undefined reference error upon building on Windows 13:48
Whiteknight Infinoid: ping 13:58
13:59 mberends left
Infinoid Whiteknight: hi 14:11
Whiteknight Infinoid: do any work on that pipes patch since last I saw it? 14:12
Infinoid no. been wrestling with the GC since then
Whiteknight ah, okay 14:15
I just didn't want to commit something if you had a patch coming through
Infinoid no, please feel free
14:16 amuck_ joined
Infinoid the pmc=0x2 bug has been peeking out randomly for a while now, I really want to kill it 14:16
Whiteknight bacek found some really interesting bugs yesterday with regards to hashes and the gC
so I wonder if that has anyting to do with it 14:17
Infinoid yeah, he pasted nopaste.snit.ch/17101 and nopaste.snit.ch/17102 this morning 14:18
to me that looks almost as though the Class wasn't being marked, yet it's still alive
Whiteknight hmmm 14:25
dalek rrot: r39871 | jkeenan++ | trunk/config (8 files):
[config] Modify config/init/hints/*.pm files to eliminate use of $(SHARE_EXT) and

  'libparrot_for_makefile_only'. Make similar change in
config/gen/makefiles/root.in. This should eliminate $(SHARE_EXT) and
  $(SOVERSION) in lib/Parrot/Config/Generated.pm and config_lib.pasm and, hence,
output of parrot_config. See trac.parrot.org/parrot/ticket/797.
14:42
14:49 MoC joined
dalek kudo: 6a4d66a | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 412 files, 11546 passing, 90 failing

   S05-grammar/parse_and_parsefile.t aborted 6 test(s)
   S05-metasyntax/regex.rakudo aborted 17 test(s)
   S12-enums/basic.rakudo 27 - short name of the enum without parenthesis is an enum
   S16-filehandles/io.rakudo aborted 62 test(s)
   S32-num/rand.rakudo aborted 4 test(s)
15:04
15:06 davidfetter joined 15:11 gaz joined
Whiteknight this backtrace is amazing really 15:23
Tene does anybody know about issues with nci and :slurpy?
Whiteknight Tene: I wasn't aware of any issues with that
(of course, I don't think I've seen any examples of it either) 15:24
15:48 whoppix joined
Tene erm... and :flat 15:52
jonathan Tene: Didn't know of them but not surprised by them either... 15:54
nopaste "tene" at 24.10.252.130 pasted "example for Whiteknight++" (15 lines) at nopaste.snit.ch/17105
Tene It works like that, but if you swap which call is commented, it fails with too few arguments passed to NCI function 15:55
any ideas on how to make it work?
15:59 darbelo joined
jonathan Tene: 'fraid not, other than digging into the NCI guts 16:01
Tene :( 16:02
jonathan But maybe allison's calling conventions work will fix it.
If it ever lands in trunk.
16:02 |MoC| joined
kid51 Whiteknight ping 16:05
Whiteknight kid51: pong
kid51 Hi Andrew!
This line in t/op/io.t: 39804 whiteknight if $S0 == 'MSWin32' goto tt661_ok 16:06
16:06 Limbic_Region joined
kid51 We're getting consistent Smolder failures on Win32 on t/op/io.t/ 16:06
Appears that MSWin32 is not yet ready to be un-TODOed.
Whiteknight okay then
kid51 Example: smolder.plusthree.com/app/public_pr...ails/24452 16:07
... which Franļæ½ois submitted within last half hour. 16:08
Tene :( looks like I'm going to ahave to parse NCI sigs, then...
Whiteknight okay, I'll TODO it then
16:26 bacek joined 16:27 [1]Limbic_Region joined 16:37 Psyche^ joined 16:48 chromatic joined
MoC If I want to report an error in a certain test, which component should I choose? 17:03
(And I do believe that the error is in the test itself, not the code tested.)
17:04 ruoso joined
chromatic Is there a component for tests? 17:04
If not, Parrot or core will work.
17:04 eternaleye joined
MoC chromatic: If TGE doesn't stand for something test related, then, no. 17:05
appears like it does not; submitted ticket. 17:07
dalek TT #806 created by MoC++: Test.readdir is not skipped on Win32 even though it appears that it should ... 17:08
TT #807 created by jkeenan++: t/pmc/eval.t: freeze/thaw test not passing on OpenBSD/AMD 64 17:11
17:12 eternaleye joined
kid51 MoC: I was discussing that test file with Whiteknight earlier today. Based (solely) on Smolder reports, it looked like there were a whole bunch of tests that had been prematurely un-TODOed in that file when OS is mswin32. 17:13
MoC well, the test is skipped on win32 but only if it's compiled with msvc... 17:14
kid51 My error: What I was speaking about with Whiteknight was t/op/io.t 17:16
MoC Ok. 17:17
17:23 amuck_ joined 17:30 bacek joined 17:41 allison joined 17:59 eternaleye joined 18:04 mberends joined
bacek bah! 18:04
dalek cnum-dynpmcs: r100 | darbelo++ | trunk/ (7 files):
Add an 'exceptions' ATTR to hold a mask indicating the conditions we raise an

Allow manipulation of this ATTR via get and set METHODS Modify check_flags_and_throw to use this ATTR. Disable exceptions for tests that need it.
18:10
18:27 dukeleto_ joined 19:01 ruoso joined 19:03 ruoso joined 19:04 ruoso joined 19:17 davef joined 19:39 kid51 joined 19:55 davef joined 20:06 mikehh joined 20:10 davef joined
davef topic #parrot 20:17
20:33 david joined 20:36 david left 20:41 david joined 20:43 davidfetter joined
david Hi, is parrot stable enough to create a subset of the JDBC API on? Can you do this in rakudo and generate PIR? 20:43
chromatic I believe so. 20:44
david What in your opinion is the best approach to take on this: code in Parrot or code in Perl 6 and then 'tune' the generated PIR? 20:45
chromatic I'd try NQP instead. 20:46
It generates simpler PIR.
jonathan If you want to write a bit more high level than PIR but Perl 6 is a bit too heavy...yeah, what chromatic beat me to saying. :-)
david I wanted to play with Perl 6 and databases, saw the Simon Cozens DBDI example and the Tim Bunce comment about providing a JDBC API at the Parrot level. I was wondering how good a fit Parrot and JDBC are, and whether it's 'hard' to implement or just 'long and boring'? 20:49
chromatic The latter, I suspect. 20:52
There may be some exciting bugs and some missing features, but mostly it's just a lot of work.
jonathan That said, it's work that would be *very* much welcomed, I'm sure. I suspect the folks doing web stuff on Rakudo at the moment would really quite like database access. 20:53
mberends david: don't be afraid of 'long and boring', if you break the ice on a facility such as JDBC, there will be plenty of people to fill it out.
david Are there any NQP/Parrot 'best practices' that would make it easier to integrate at a later date? Is there up-to-date NQP documentation anywhere? 20:54
jonathan It'll probably be in compilers/nqp/ or maybe the Parrot book covers it. 20:56
chromatic There's a section in the Parrot book but it needs editing.
jonathan docs/book/draft/ch06_nqp.pod
david What's the best way to develop it, get a github account and develop under the parrot tree? Can you develop standalone Parrot modules a la CPAN? 20:58
chromatic A standalone module should work just fine.
david Sorry if these are dumb questions - but: is there any standard packaging to develop standalone modules in NQP/Parrot? Is it similar to a CPAN package (MANIFEST, code etc.)? 21:01
chromatic No one's addressed that to my knowledge.
jonathan david: And they're not dumb questions at all. :-) 21:04
david I noticed when playing with Perl 6 (rakudo) that if I wanted to access particular modules I had to be in the appropriate directory (ie. 'use' complained that it couldn't find the module). Is this just the current state of development or am I doing something wrong? 21:07
pmichaud It's just the current state of development. 21:08
mberends david: try 'export PERL6LIB=/some/dir' etc before executing your code elsewhere 21:09
it's the current temporary workaround
david OK, so it hasn't got an INC path yet?
mberends oh yes, there is one too. 21:10
pmichaud @*INC is just initialized by PERL6LIB 21:11
mberends in the top of your program you can write: use v6; BEGIN { @*INC.unshift('/my/module/dir'); }; use MyModule; 21:12
david Are there any modules it finds by default (core perl 6/parrot modules) or should I append each module I needs path to PERL6LIB? 21:14
mberends append each one 21:15
david Thanks. Can you embed Perl 6 in Parrot? I'm thinking about the JDBC code interfacing to different implementations for each database vendor and whether it would be easier for driver developers to develop in Perl 6 or Parrot/NQP. 21:18
jonathan Rakudo Perl 6 runs on top of Parrot
It's mostly written in PIR/NQP/Perl 6. 21:19
In theory (and, to an increasing degree, in practice), you can use libraries written in one langauge from another.
There's plenty of way to go on the details, but there's already been proof of concept style examples of it working at least. 21:20
mberends in a PIR program you can for example: load_bytecode '../perl6.pbc'
david So would it make more sense to write it in Perl6? Could it then be bun+ 21:27
21:27 s163m joined
jonathan The Perl 6 compiler emits more complex code than you may wish for. 21:30
But not so bad I guess.
mberends david: have you read parrot/examples/nci/Mysql.pir for ideas? 21:32
david No - I just saw the Simon Cozens example and looked at the code. 21:33
Does anyone control namespaces in Perl6/Parrot yet? 21:54
chromatic Not yet. 21:57
pmichaud It's a frontier.
darbelo If you get there first, it yours. 21:59
david ok. Are traits and all the other Perl 6 oo goodies easily accessible in Parrot?
pmichaud we're still working on that. 22:00
david Is anyone else working on API's like JDBC where there would need to be multiple vendor specific drivers? 22:03
22:05 Psyche^ joined
david Thanks for all your help everybody. I think I need to go away and play with it a bit - then I'll be back with more questions :) 22:17
jonathan Have fun, look forward to seeing what you come up with. :-) 22:19
22:21 david left 22:35 rg1 joined 22:36 bacek joined 22:40 Austin_Hastings joined
Austin_Hastings class PCT::Node extends Capture 22:40
woot.
bacek good morning 22:53
purl Here I am, brain the size of a planet, and all they say is 'Good Morning'
davidfetter 'sup bacek 22:56
Austin_Hastings ohai bacek 23:00
bacek hi davidfetter, Austin_Hastings
Austin What are you working on this morning, Bacek? 23:01
bacek Austin: gc...
Austin Are you patching the existing one, or writing a new one?
bacek groking existing one. 23:02
chromatic rolls to assist with bacek's Sanity save.
18, and I'm trained in sanity with a +12, so you get +2 on your save. 23:03
bacek running in circles screaming
davidfetter iaaa! iaaa!
bacek chromatic: any ideas why Class.parent_overrides created with constant_pmc_new??? 23:05
chromatic Perhaps to prevent order-of-destruction bugs (though I'm not sure that matters).
dalek rrot: r39872 | bacek++ | trunk/src/pmc/sub.pmc:
[cage][pmc] Mark Sub.namespace_stash in Sub.mark
chromatic Perhaps because classes are all created as constant, in which case they only get marked once.
bacek Are constant pmcs marked during gc? 23:06
chromatic They're marked once, but because there's no sweep of the constant pools, they never get unmarked. 23:07
Thus they may get marked if they're reachable from a non-constant PMC, but they'll never mark their children.
If our GC kept liveness markers outside of the PMC headers, we wouldn't have this problem. 23:08
We'd also be able to sweep more efficiently.
bacek And parent_overrides is just cache for lookup. Which can be filled with non-constant keys...
chromatic I don't think it has any non-constant children.
bacek src/oo.c 23:09
line 539
chromatic Subs are constant.
bacek We can pass non-constant STRING* key 23:10
Subs are constant even after unpack from Packfile?
chromatic Yes.
I don't know about the key.
bacek * TODO use thaw_constants 23:11
src/packfile.c, +3986
Looks like even Subs after unpacking are not constant anymore.. 23:12
chromatic You could throw PARROT_ASSERT(PObj_is_constant_TEST(pmc)) in there. 23:13
src/oo.c I mean
bacek PARROT_ASSERT(PObj_is_constant_TEST(name))?
chromatic Right. 23:14
23:15 cotto joined
cotto hi 23:17
purl hello, cotto.
bacek hi cotto
chromatic: how many kittens will die if I replace parent_overrides with non-constant version? 23:19
23:20 Theory joined
chromatic Try it with the gc-debug runcore and see. 23:20
GeJ Good morning everyone 23:21
bacek GeJ: good morning 23:24
purl Here I am, brain the size of a planet, and all they say is 'Good Morning'
bacek chromatic: "make testb" passed 23:26
chromatic Good sign.
23:27 eternaleye joined, whoppix joined
bacek What the difference between "--gc-debug" and "-R gcdebug"? 23:35
chromatic One of them works and one doesn't, I think. 23:37
bacek :)
is there shortcut for "-R gcdebug"? 23:39
chromatic I don't believe so. 23:42
nopaste "bacek" at 122.110.58.243 pasted "Aha! Found at least one GC problem!" (37 lines) at nopaste.snit.ch/17107
23:53 Theory joined 23:56 Austin_Hastings joined