Camelia, the Perl 6 bug

IRC log for #parrot, 2008-06-11

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:01 DietCoke is there any pir syntax to call something directly from another namespace?
00:06 donaldh joined #parrot
00:06 jonathan DietCoke: Not that I know of; you need to look it up and then $P0(...)
00:07 Zaba joined #parrot
00:09 * jonathan sleeps
00:09 AndyA joined #parrot
00:13 bacek_ joined #parrot
00:14 bacek_ joined #parrot
00:17 DietCoke ... you can't use [] in a macro!?
00:17 * DietCoke cries.
00:17 DietCoke (oh, right, this is why I haven't hacked on tcl in ages. =-)
00:20 DietCoke (... because I keep making wild claims about things that aren't true?)
00:25 Whiteknight joined #parrot
00:43 Whiteknight what is qpsmtdp?
00:47 dalek r28228 | coke++ | trunk:
00:47 dalek : [tcl] Delete unused file.
00:47 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28228
00:53 chromatic joined #parrot
00:58 Whiteknight joined #parrot
00:58 bacek__ joined #parrot
01:02 rdice joined #parrot
01:13 DietCoke hey,c.
01:15 gmansi joined #parrot
01:20 bacek__ morning...
01:25 chromatic pong
01:32 DietCoke you get my cell?
01:41 DietCoke ohloh--
02:12 tewk chromatic:  http://tewk.com/nci.callgrind.out
02:13 tewk I ran it without any special commandline parameters
02:15 kid51 joined #parrot
02:21 particle1 joined #parrot
02:22 Eevee joined #parrot
02:38 kid51 joined #parrot
02:46 schobes joined #parrot
02:47 schobes left #parrot
02:53 grim_fandango joined #parrot
03:09 chromatic tewk, a lot of bsr calls.  Those can get a little expensive.
03:09 chromatic 36% of all GC runs are due to those.  That's probably something worth optimizing in your grammar.
03:10 chromatic Looks like 20% of all GC runs are due to get_string calls on PMCProxy.
03:10 chromatic 90% of those are getting object attributes, which I'd like to make somewhat cheaper.
03:11 chromatic Another ~10% of GC runs come from calling name on Object PMCs.
03:12 chromatic Looks like 3% of the immediate runtime costs come from converting String PMCs to STRINGs in the calling conventions.
03:13 chromatic Avoiding that could get you 5-7% improvement.
03:15 chromatic My (informed) guess is that you have a lot of backtracking in your grammar, and a couple of careful optimizations there could speed things up significantly.
03:23 tetragon joined #parrot
03:39 petdance joined #parrot
03:54 bgeron joined #parrot
03:57 pmichaud (backtracking grammar) -- yes, while tracking down a bug in PGE earlier today, I noticed quite a few bsr calls that I think we could improve on
03:58 pmichaud also, things will be *much* better when we have protoregexes and ltm
03:58 pmichaud because we can eliminate a ton of branches and backtracking
04:01 chromatic If you want another speedup in Rakudo parsing, fix a couple of those easy bsrs.
04:02 pmichaud yes
04:02 pmichaud currently each alternation in rules stores another backtrack point (bsr)
04:02 pmichaud at least, I *think* that's what happening, based on the trace I did
04:03 pmichaud so, an alternation with five branches ends up with four bsrs, where only one (at a time) is really needed.
04:03 pmichaud with protoregexes we can eliminate quite a few of those alternations
04:04 pmichaud but we can also generalize alternation to be a list operator instead of binary
04:06 chromatic If any of those are an hour or less of work, you could save a fair amount of amortized development time.
04:06 chromatic (The rules change when pdd25cx merges though.)
04:06 pmichaud protoregexes are definitely more than an hour.  Fixing Alt may be O(hour)
04:06 pmichaud what changes in pdd25cx merge?
04:07 chromatic There's no bsr/Stack_Chunk_t mess in pdd25cx.
04:07 chromatic So the GC characteristics of backtracking have changed somewhat.
04:07 pmichaud ah, yes.  But what we have instead is a bit heavier, so avoiding bsrs (or their replacement) is an even bigger win, I should think
04:09 pmichaud at any rate, I'm sure there will always be grammars that take the alternation approach instead of the protoregex approach, so this is a particularly useful optimization to add.
04:09 chromatic It's a good policy in general, but I'm not going to guess until I measure it.
04:09 pmichaud I was a bit surprised to see strings of 11 or so bsr's in a row.  :-)
04:10 chromatic That's not good.
04:12 pmichaud anyway, that'll be a good project for tomorrow.  far too many interesting things to work on these days :-)
04:12 pmichaud and I need to write some journal posts.
04:14 chromatic Me too.
04:14 dalek r28229 | chromatic++ | trunk:
04:14 dalek : [lib] Fixed a memory leak in isa_hash initialization for PMCs;
04:14 dalek : parrot_new_hash() allocates Hash memory already, so there's no need to allocate
04:14 dalek : it here.
04:14 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28229
04:17 pmichaud afk for a while
05:17 dalek r28230 | chromatic++ | trunk:
05:17 dalek : [src] Changed several runtime constant strings to compile-time constant strings.
05:17 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28230
05:48 Zaba_ joined #parrot
05:53 Eevee joined #parrot
06:00 donaldh joined #parrot
06:12 dalek r28231 | chromatic++ | trunk:
06:12 dalek : [PDDs] Cleaned up PDD formatting errors from the codingstd tests.
06:12 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28231
06:15 Eevee joined #parrot
06:15 uniejo joined #parrot
06:16 Psyche^ joined #parrot
06:36 Eevee joined #parrot
06:43 Zaba joined #parrot
06:47 Zaba_ joined #parrot
06:55 spinclad BREAKING NEWS: Parrot hijacks CPAN, attacks New York!   # http://search.cpan.org/~simon/parrot-0.0.1/
06:56 spinclad [as noted by particle earlier]
06:57 allison joined #parrot
07:08 iblechbot joined #parrot
07:12 Zaba joined #parrot
07:22 ruoso joined #parrot
07:40 Zaba joined #parrot
08:16 cizra I tried to generate a new test language, but its Makefile wasn't generated.
08:16 Zaba_ joined #parrot
08:16 cizra (using the tools/dev/mk_language_shell.pl)
08:20 cizra Running parrot on the test PIR didn't succeed either.
08:20 cizra error:imcc:No such file or directory
08:29 cizra Tene: Try running echo 'i = 0; i.upto(5) {|j| puts j}' | parrot cardinal.pbc --target=parse -- it's freakin' HUGE. Is it supposed to be so complex?
08:31 braceta joined #parrot
08:48 TiMBuS cizra
08:49 TiMBuS if that freaks you out, you better not try: echo 'my $i = 0; for $i..5 -> {say $^j}' | ../../parrot perl6.pir --target=parse
08:52 Eevee joined #parrot
09:02 Ademan joined #parrot
09:26 Eevee joined #parrot
09:33 cizra TiMBuS: doesn't parse
09:33 purl ?SYNTAX ERROR
09:34 TiMBuS .. really?
09:35 cizra Statement not terminated properly at line 1, near "5 -> {say "
09:35 TiMBuS odd, it works for me.
09:35 TiMBuS this is rakudo im talking about not cardinal
09:36 cizra I tried running it in languages/perl6
09:36 cizra Dunno what rakudo is
09:36 TiMBuS languages/perl6 is rakudo. strange that doesnt parse for you
09:36 TiMBuS the point i was making is any large language has a pretty huge syntax tree
09:37 TiMBuS its about the same size as the one cardinal produces
09:37 cizra OK
09:39 TiMBuS 226 lines for cardinal, 197 for perl6. nothing to fret about.
09:40 cizra OK
09:40 cizra Is that tutorial at http://www.parrotblog.org/2008/03/ep​isode-2-poking-in-compiler-guts.html supposed to be current and correct?
09:40 shorten cizra's url is at http://xrl.us/bhy43
09:40 cizra The tools/dev/mk_language_shell.pl script didn't create a makefile for the new test language.
09:40 TiMBuS i do believe so, but if theres any updates they would be in languages/squaak/docs
09:41 TiMBuS oh, yeah the 'executable' flag isnt set on it
09:41 TiMBuS use 'perl tools/dev/mk_language_shell.pl'
09:42 cizra nono
09:42 cizra I did that and the new language was generated,
09:42 cizra but it lacks a makefile.
09:42 TiMBuS oh
09:42 TiMBuS ooh yeah i had that problem
09:42 TiMBuS did you run configure for parrot again?
09:43 cizra Think so.. wait
09:43 cizra yep, nothing
09:44 TiMBuS well try Configure.pl --languages="yourlanguage"
09:44 TiMBuS thats what i had to do i think
09:44 cizra works
09:45 cizra thanks
09:45 TiMBuS kewl
09:45 cizra Ougt to update the doc.
09:45 cizra Will you commit if I make you a patch?
09:45 pjcj joined #parrot
09:45 TiMBuS oh, i dont have commit
09:45 TiMBuS haha
09:46 TiMBuS but im sure someone would commit a change to it
09:49 cizra Hey, folks! Anyone got SVN commit permissions?
09:50 cizra http://pastie.org/212876
09:58 slightlyoff joined #parrot
10:08 Eevee joined #parrot
11:08 MagNET joined #parrot
11:24 Eevee joined #parrot
12:09 Zaba joined #parrot
12:21 tetragon joined #parrot
12:34 DietCoke cizra: applied with tweaks, thanks.
12:34 cizra \o/
12:34 dalek r28232 | coke++ | trunk:
12:34 dalek : Clarify mk_language example
12:34 dalek : cizra++
12:34 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28232
12:35 DietCoke For anything more serious, a patch is probably better so it doesn't get lost. =-)
12:38 cizra You mean, mailing a patch to the list?
12:40 IllvilJa joined #parrot
12:41 DietCoke ya. (docs/submissions.pod); just that IRC isn't always monitored, is all.
12:42 DietCoke thanks for the patch.
12:42 cizra (=
12:46 TiMBuS hmm, when you append a pmcarray to another pmcarray, is the appended array copied?
12:50 TiMBuS hmm i think i might have to iterate the second array and copy every element or something..
12:51 jonathan TiMBuS: How are you appending it?
12:51 TiMBuS array."append"(otherarray)
12:52 TiMBuS but it seems like changes made to the first array apply to the second
12:53 TiMBuS which also happens if i clone the second array and append what is supposed to be the clone.
12:54 clunker3 joined #parrot
12:54 jonathan That may work...heh...I didn't know there was an append method.
12:55 DietCoke ew. append should probably be reworked to use the vtable methods.
12:55 DietCoke (or an iterator)
12:56 DietCoke (solely, that is)
12:56 * bacek found crash in parrot...
12:56 TiMBuS ill just manually copy and append each element, im not fussed
12:56 bacek 1 ~~ Perl6Scalar
13:01 jonathan bacek: I'm not sure what that should do, I guess maybe other than returning a false value...it shouldn't segfault.
13:01 jonathan Make a ticket. Or a patch. ;-)
13:04 IllvilJa joined #parrot
13:06 bacek jonathan, probably :) But there is already few my patches in RT...
13:08 TiMBuS heh, 1 ~~ Perl6
13:08 TiMBuS segfault
13:08 purl rumour has it segfault is http://xkcd.com/371/
13:10 jhorwitz joined #parrot
13:13 iblechbot joined #parrot
13:14 TiMBuS Perl6* pmc's/whatever they are shouldnt be directly accessible from perl 6, should they?
13:16 TiMBuS or are they considered an actual type?
13:39 nopaste "bacek" at 202.7.166.164 pasted "jonathan: there is a patch for crash in '1 ~~ Perl6Scalar'" (42 lines) at http://nopaste.snit.ch/13229
13:43 jonathan bacek: Looks sane - I am tied up doing $DAYJOB at the moment, so please send in patch (as Parrot one, not Rakudo)
13:44 pmichaud (append array):  I've been using splice, myself.
13:45 TiMBuS hmm
13:45 TiMBuS ill give that a shot
13:45 pmichaud Perl6* pmc's won't generally be accessible, no -- we just haven't worked to clean up those loose edges yet.
13:46 TiMBuS oh, gewd
13:46 pmichaud +            "Method '%Ss' not found for non-object", meth);
13:47 pmichaud isn't really describing what's happening.   The error should probably be "Null PMC in callmethod"
13:47 particle joined #parrot
13:48 pmichaud or, better:    "Null PMC access in callmethod '%Ss'"
13:49 bacek pmichaud, It's copy-pasted from existed check. But I can change it
13:50 TiMBuS the parrot opcodes need a search function or a list i can ctrl-f over =/
13:50 bacek but it actually is not NULL PMC, AFAIU
13:50 pmichaud ohhhhh
13:50 pmichaud you're right.
13:51 gryphon joined #parrot
13:51 bacek (jfyi #55620)
13:51 pmichaud ....but every PMC has a class.
13:51 pmichaud or should have one.
13:51 bacek this is mathian PMC without class :)
13:51 bacek Martian
13:51 Zaba are there exception objects in perl6?
13:52 pmichaud In this particular instance (  1 ~~ Perl6Scalar  )     I'm guessing that the problem is that the symbol Perl6Scalar doesn't exist (i.e., PMCNULL).
13:52 pmichaud the code then attempts to invoke .ACCEPTS on PMCNULL, and that's the segfault.
13:53 pmichaud so, perhaps PMCNULL doesn't have a class.  But AFAICT every other PMC should respond with some value to VTABLE_get_class
13:53 pmichaud if PMCNULL is the only PMC w/o a class, though, it would be better to check for it directly.
13:54 bacek pmichaud, hmm. Just a sec.
13:54 pmichaud I can add my comments to the ticket.
13:54 pmichaud (if it would help.)
13:54 * bacek run 'git reset HEAD~1; make' to test
13:55 bacek but I think is was NameSpace...
13:55 pmichaud oh, you're right there.
13:55 pmichaud bacek++ bacek++   # correcting my silly mistakes
13:55 TiMBuS Zaba, theres a 'Failure' if that helps..
13:56 pmichaud Zaba: yes, Perl 6 has Exception types.
13:56 bacek pmichaud, :)
13:56 DietCoke pmichaud: ifnull ...
13:56 pmichaud so, is VTABLE_get_class returning null on NameSpace objects?
13:57 Zaba pmichaud, nice..
13:57 DietCoke pmichaud:         return PARROT_NAMESPACE(SELF)->_class;
13:57 bacek (gdb) p object->vtable->whoami->strstart
13:57 bacek $45 = 0xb7e740d3 "NameSpace"
13:58 bacek this one without ->data.
13:58 bacek And it cause crash in error report.
13:58 bacek oops. No. Its with data...
13:58 IllvilJa joined #parrot
13:58 DietCoke pmichaud: looks like _class is an attribute on the namespace.
13:59 bacek (gdb) p object->vtable->get_class(object)
13:59 bacek $48 = (PMC *) 0x0
13:59 DietCoke (and it's only set via a call to set_class, which isn't called elsewhere in teh pmc.
14:00 bacek DietCoke, make sense.
14:00 pmichaud I wonder if NameSpace needs some sort of PMC Proxy instance
14:05 jonathan I originally intended that everything had a PMCProxy instance that it, by default, returned from the get_class vtable method.
14:05 pmichaud oh, I see where bacek++ got the code from for the patch.
14:05 pmichaud just copied it from callmethodcc into callmethod
14:05 Zaba joined #parrot
14:06 pmichaud works for me.  Pay no attention to the ravings of the just-waking-up Rakudo guy.
14:06 bacek "<bacek> pmichaud, It's copy-pasted from existed check. But I can change it" :)
14:06 pmichaud bacek: I was looking at a different "existing check"
14:07 pmichaud I didn't see the one you were referring to.  Anyway, as I said, I'm messed up on this one.
14:07 * pmichaud slinks off into a different developing cave for a while.
14:09 Whiteknight joined #parrot
14:11 TiMBuS finally!
14:13 dalek r28233 | Whiteknight++ | gsoc_pdd09:
14:13 dalek : [gsoc_pdd09] updating to trunk r28232
14:13 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28233
14:14 TiMBuS i just ended up cloning every pmc in the array then appending it to the other. oh well function calls now work so ive pretty much written the parrot version of 'joy'
14:15 TiMBuS awesome
14:16 TiMBuS next time ill write an imperative language using pct since its deigned to compile, you know, imperative languages,
14:17 Zaba joined #parrot
14:23 * DietCoke should just bite the bullet and see how tcl works (without rename) using PCT.
14:24 DietCoke er, [rename]
14:24 NotFound Latin?
14:24 purl well, Latin is an "inflected" language.  instead of using word order to denote subjects and objects like we do in english, latin puts different endings on their words. or a horrible waste of time. or not something on Babelfish's menu
14:33 Zaba joined #parrot
14:33 rdice joined #parrot
14:42 dalek r28234 | kjs++ | trunk:
14:42 dalek : [squaak] implement return statement. Not sure if it's complete now, think so.
14:42 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28234
14:46 Zaba joined #parrot
14:47 sjansen joined #parrot
14:52 NotFound I've read the discussion about _class in namespace. A problem is that in zero initialized structure PMC * members are filled with NULL, not PMCNULL.
14:55 NotFound Attempts to use PMCNULL can throw exceptions, with NULL usually just segfaults.
15:01 dalek r28235 | kjs++ | trunk:
15:01 dalek : [squaak] fix action method for try. Apparently, seting viviself and isdecl flags need PAST::Val nodes instead of just literal constants.
15:01 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28235
15:14 davidfetter joined #parrot
15:17 Infinoid joined #parrot
15:35 Zaba joined #parrot
15:38 bacek joined #parrot
15:39 dalek r28236 | kjs++ | trunk:
15:39 dalek : [squaak] update README a bit; return is now implemented.
15:39 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28236
15:42 particl1 joined #parrot
15:43 dalek r28237 | Whiteknight++ | gsoc_pdd09:
15:43 dalek : [gsoc_pdd09] adding some basics for root-at-a-time increments and an optional threaded mode
15:43 IllvilJa joined #parrot
15:43 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28237
15:46 tewk I ran it without any special commandline parametersq
15:47 tewk oops
16:18 cotto_home joined #parrot
16:22 peepsalot joined #parrot
16:27 Zaba joined #parrot
16:27 dalek r28238 | Whiteknight++ | gsoc_pdd09:
16:27 dalek : [gsoc_pdd09] some changes, mostly a lot of comments
16:27 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28238
16:38 Zaba joined #parrot
16:41 Theory joined #parrot
16:54 Zaba joined #parrot
17:11 Zaba_ joined #parrot
17:16 Eevee joined #parrot
17:38 particle jhorwitz: ping
17:38 jhorwitz particle: pong
17:38 particle did you get mod_lolcode working?
17:39 particle i know somebody who wants to put up a monster.com ad for it :)
17:39 jhorwitz yes, but persistence didn't work
17:39 jhorwitz of globals, that is
17:39 particle that seems appropriate
17:40 jhorwitz i wanted to say "i can haz X cheezburgers?"
17:40 particle i wonder why that's broken
17:40 jhorwitz it was cuz you couldn't use or test the value of a variable w/o declaring it
17:40 particle ooh, ff3 has a search bar in the download window
17:40 barney joined #parrot
17:40 jhorwitz i made a small fix for that, but it caused other problems.  can't remember.
17:41 jhorwitz particle is distracted by shiny things
17:41 particle I CAN HAZ FAIL CASCADING?
17:43 DietCoke we do have folks kind of maintaining lolcode, feel free to submit bugs.
17:43 DietCoke tcl is far more important though. =-)
17:43 jhorwitz obviously.  ;-)
17:44 Whiteknight DietCoke, are you going to get Tk working with it?
17:44 DietCoke So... pct is designed to work with languages with syntax. Tcl doesn't really have that, per se. I am thinking that for a first pass at implementing tcl on pct, I need to pretend that the 'if' command is really syntax.
17:45 DietCoke (Tk) It's not on my radar, no.
17:45 Whiteknight okay
17:45 DietCoke (pct) so, once I get all that working, I can then dynamically replace the grammar if someone redefines 'if'.
17:46 DietCoke but that seems kind of hacky to me. :|
17:47 DietCoke Anyone have any better ideas? I'd like to keep something like the PGE grammar I have now, but still be able to take advantage of the ast/ost/pir chain; right now that chain is all handrolled in tcl.
17:47 DietCoke (I wonder if I can just work on replacing those bits rather than returning my handrolled PIR)
17:47 IllvilJa joined #parrot
17:48 DietCoke Whiteknight: (tk) to do that, I think I'd need to support the C level Tcl APi as well.
17:48 DietCoke and I'm just going for the tcl language level stuff atm.
17:48 particle DietCoke: you can define your own compiler chain with pct
17:49 Whiteknight Okay, that's fair. I know the Tk lib is going to be used eventually for perl6 too, I personally would prefer to see a Gtk2 library in there, but I dont have the time or tuits to implement it
17:50 DietCoke well, I can already call out to parrot stuff, so if there's a wrapper in lib/ I can use the gtk2 stuff.
17:50 DietCoke Hurm. actually, I'm not sure I can, because all my namespace access is rooted at ['tcl'] atm.
17:51 particle all your namespace are belong to ['tcl']
17:51 DietCoke particle: so here's my thing: the first parse for tcl is always "break this into commands". Each command can start out with handrolled PIR, or something I've compiled, but I have to be able to swap it all out at runtime.
17:52 particle lexical redefinition, or global?
17:52 DietCoke We have bits that actually return the PIR necessary to run some of those commands (analagous to PCT, but done differently). We also have runtime versions of most things.
17:52 DietCoke (so if someone calls [for ...], they're getting a runtime version written in PIR.)
17:53 particle perl 6 does this with begin
17:53 DietCoke particle: global.
17:53 particle you can redefine the grammar
17:53 DietCoke if you replace the main [if] sub, you replace the whole thing.
17:53 DietCoke but it's not really a grammar.
17:53 DietCoke er, a grammar change.
17:53 DietCoke the grammar is just "break this into commands"
17:54 DietCoke Like I said, I can cheat and actually flesh that out more. It does feel like cheating atm, though. hurm.
17:54 particle you look up via arity?
17:54 particle i mean, look forward
17:54 DietCoke ?
17:54 DietCoke There's no arity involved. dispatch to named sub in the appropriate namespace.
17:55 particle i mean, to determine how to evaluate
17:55 particle how many args does this sub expect
17:55 DietCoke so [if {$a == $b} {puts hi}] is invoking 'Tcl'; '&if'
17:55 particle ah, ok, brackets delimit commands
17:55 DietCoke well, there's only one choice, if the sub name is present, dispatch to it.
17:55 DietCoke yes.
17:56 DietCoke (just a way to show I'm quoting tcl code here. You'd not write the brackets around a top level command.)
17:57 DietCoke Hurm. I guess it's not cheating that bad. :|
17:58 DietCoke One other problem I have: I need to evaluate each command immediately.
17:59 DietCoke (which I'm not doing now, but need to fix in any major rewrite). Is there a way to do that with PCT?
17:59 DietCoke I know it's theoretically possible with my current setup by changing my grammar to be a single command and then looping over the input, but I would love to have that baked into the toolkit.
18:00 donaldh joined #parrot
18:05 particle sorry, phone call :(
18:12 Ivatar joined #parrot
18:12 dalek r28239 | coke++ | trunk:
18:12 dalek : [distro]
18:12 dalek : Follow the convention of naming files consisting only of POD with .pod
18:12 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28239
18:12 barney I'm wondering whether the Perl6 object model fits PHP. '=&' in PHP seems to be the same as ':=' in Perl6
18:16 DietCoke oh, wait. PCT doesn't support HLL yet, does it?
18:25 pmichaud =& in PHP is really two tokens, I think.
18:26 pmichaud PCT doesn't support HLL yet, no.  But it shouldn't be too hard to add it.
18:31 cotto_work pmichaud, yes
18:33 gmansi joined #parrot
18:34 barney pmichaud: I don't understand PHP semantics yet. '$a =& $b' is the same as '$a = &$b' but don't mean: Store reference to $b in $a.
18:35 barney It feels more like a single op. $a is now an alias for $b
18:38 Zaba joined #parrot
18:39 cotto_work barney, $a = & $b; means $a refers to the same thing $b refers to, afaict from the docs
18:40 pmichaud in this sense, yes, it's like a bind.
18:41 avar barney: it means $a now refers to the same variable as $b, it's like a hardlink
18:41 avar (not a reference)
18:42 Eevee joined #parrot
18:45 barney Yes, that's why I probably should change assignment in Plumhead for pasttype('bind') to pirop('assign') and use pasttype('bind') only for '= &'
18:45 barney s/for/from/
18:56 Zaba joined #parrot
19:02 jhorwitz particle: what exactly is the deal with lolcode & monster?
19:02 grim_fandango joined #parrot
19:09 dalek r28240 | bernhard++ | trunk:
19:09 dalek : [Plumhead]
19:09 dalek : Remove unused for  src/pct/Plumhead/Grammar.pir
19:09 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28240
19:10 barney s/for/file/
19:15 pmichaud DietCoke: ping
19:15 DietCoke pong
19:16 Zaba joined #parrot
19:16 pmichaud you might not be able to answer this, but ...
19:16 gryphon joined #parrot
19:16 pmichaud I want to use "store_lex $S0, $P0"  to create a new lexical
19:16 pmichaud because there's not a   .lex $S0, $P0    option
19:16 pmichaud i.e., create a lexical at runtime instead of compile time
19:16 pmichaud pdd20 says this should work if the :lex flag is present (as Tcl requires), but I can't seem to get it to work
19:17 pmichaud any clues?
19:17 purl Dee Dee Dee!
19:17 pmichaud phrased differently -- how does Tcl create lexicals at runtime?
19:18 NotFound bacek: please take a look at my answer on #55620
19:18 DietCoke moment.
19:19 DietCoke pmichaud: languages/tcl/runtime/variables.pir
19:19 dalek r28241 | Whiteknight++ | gsoc_pdd09:
19:19 dalek : [gsoc_pdd09] modify the arena allocator for better spacial locality. A few other misc changes
19:19 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28241
19:19 DietCoke you are probably interested in __store_var, the lexical path.
19:20 pmichaud ah, stick it directly into the LexPad
19:20 pmichaud let's see if that does what I need.
19:20 DietCoke except that it looks like we're manually managing our call chain to get the lexpads; if you have a lexpad handy, that might work.
19:21 avar barney: is =& logically distinct from just assigning to something prefixed with &?
19:21 avar I.e. does it need to be special cased?
19:21 NotFound bacek or any other interested in the "say 1 ~~ Perl6Scalar" bug.
19:23 pmichaud it appears that :lex forces generation of a lexpad
19:24 DietCoke hokay. so that trick works for you, then?
19:24 pmichaud but I don't seem to be able to add an entry to it.
19:24 DietCoke odd.
19:24 barney avar: I think it is distinct
19:24 DietCoke There is magic going on with the call_chain[] call there; I think mdiep did that work, I don't recall what's going on in that code path.
19:25 pmichaud I would think that  obtaining the lexpad and then doing   lexpad['symbol'] = $P0    would create the entry
19:26 DietCoke we do have separate paths for creating and updating.
19:26 DietCoke sub 'make', perhaps?
19:27 pmichaud oh.
19:27 pmichaud afaict, none of Tcl is making use of Parrot's lexical features.
19:27 pmichaud i.e., Tcl is mantaining its own complete stack of lexpads.
19:28 DietCoke Very likely because at one point nothing worked and we had to roll out our. =-)
19:28 dalek r28242 | bernhard++ | trunk:
19:28 dalek : [Plumhead]
19:28 dalek : Get rid of unused vars in Makefile.
19:28 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28242
19:28 DietCoke "roll our own"
19:28 DietCoke we don't have declared variables, so our lexicals were never using :lex
19:28 pmichaud okay, that answers my questions about Tcl then.  Thanks for pointing me to the right places to look.
19:29 DietCoke we alwyas had to do it the hard way. If there's an easier hard way, I'm all for updating. =-)
19:29 DietCoke I had thought we were using whatever the fallback version for lexicals was.
19:29 pmichaud I think the answer is that Parrot's lexical support isn't supporting what you need
19:29 pmichaud at least, not yet.
19:29 Tene jhorwitz: feel free to harass me about lolcode.  I have a standing policy of working on anything anyone finds important enough to bother me about.
19:29 DietCoke tene: my lawn needs mowing. get on that.
19:29 DietCoke tene: my lawn needs mowing. get on that.
19:29 DietCoke tene: my lawn needs mowing. get on that.
19:30 pmichaud I'm finding I want something similar but can't find the right incantation to get that working.
19:30 pjcj joined #parrot
19:30 jhorwitz Tene: bringing up mod_lolcode shortly.  i'll know soon how much i need to harass you.  :)
19:31 pmichaud I'll poke around the lexpad.pmc guts a bit and see what's up there.
19:32 pmichaud ah, looks like that was left unimplemented.  At the least the code doesn't match the documentation in the code.
19:34 Zaba joined #parrot
19:34 IllvilJa joined #parrot
19:35 Tene DietCoke: Sure, I'll do that the next time I'm in NY.
19:37 davidfetter joined #parrot
19:44 dalek r28243 | bernhard++ | trunk:
19:44 dalek : [Plumhead]
19:44 dalek : Add an empty actions.pm,
19:44 dalek : prepare for migrating PAST generation from TGE to NQP.
19:44 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28243
19:47 Zaba joined #parrot
19:49 Tene DietCoke: as long as you close >=10 tickets while I'm doing it.
19:51 DietCoke I've already closed that many this week. =-|
19:51 particle crap, i have bad ram.
19:51 particle now i have to find out which of four modules or four slots is bad
19:52 Tene I'm sure you won't need your system while running memtest86 on it for the next day, right?
19:53 DietCoke is this the machine that was coming to OH?
19:57 particle memtest86 just froze
19:57 particle OH?
19:57 particle this is my desktop, 6GB dual quad-core xeon monster
19:59 jhorwitz you should see his laptop
19:59 smash joined #parrot
20:00 smash hello everyone
20:00 Tene Hi!
20:01 Tene particle: froze, eh?  Maybe you've got bad ram.
20:01 Tene ;)
20:02 DietCoke er, IL.
20:02 * DietCoke geographizes GUT
20:04 dalek r28244 | Whiteknight++ | gsoc_pdd09:
20:04 dalek : [gsoc_pdd09] modify the arena allocator for better spacial locality, again. Requires some voodoo pointer arithmetic, which is probably buggy.
20:04 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28244
20:07 particle tene: :P
20:10 cjfields joined #parrot
20:10 donaldh left #parrot
20:11 barney joined #parrot
20:13 Eevee joined #parrot
20:13 jonathan 6GB dual quad core?! WANT!
20:13 jonathan (with non-faulty RAM, kplzthnx)
20:14 cotto_work good for teing make -j
20:14 cotto_work s/tesing/testing/
20:14 Infinoid hooray for voodoo pointer arithmetic
20:14 Infinoid ptr += sizeof(dead_chicken)
20:22 jhorwitz particle: mod_lolcode lives
20:22 particle HORRAY!
20:22 particle link?
20:22 jhorwitz on my dev box at home right now
20:22 Tene nice
20:22 particle link?
20:22 particle :P
20:22 jhorwitz hold yer lolcats
20:23 particle sheesh, i can debug ram problems faster...
20:23 jhorwitz kthxbye
20:23 jhorwitz ;-)
20:23 particle :D
20:28 jhorwitz particle: http://www.smashing.org/sandbox/cheezburger.lol
20:29 particle joy!
20:29 cotto_work yuo can haz win
20:29 Zaba joined #parrot
20:29 cotto_work are you going to keep an example page up?
20:29 jhorwitz cotto_work: yes, trying to have all that up by YAPC
20:30 jhorwitz particle: i think everything's a lexical right now, so not much we can do w/ persistence (cheezburger counters, etc.)
20:30 jhorwitz Tene: can you confirm?
20:31 NotFound No one wants to take a look at #55620 ? I'm in discussing mood.
20:32 Tene jhorwitz: sounds right to me.  Feel free to tell me what you'd prefer.
20:32 DietCoke crap. I missed the call again, dinnit i.
20:34 jhorwitz Tene: either globals or file-scoped lexicals would be nice (a la perl's "our").  then i can write a cheezburger counter.
20:34 DietCoke NotFound: that last variant looks best. =-)
20:34 NotFound DietCoke: I like both.
20:35 Tene jhorwitz: give me  aproposal for how they should work and I'll implement it.
20:35 jhorwitz can do.  probably not real soon though.  :)
20:36 NotFound I know the first gives less informative messages, but I think that when more descriptive messages are needed an explicit check is the way to go.
20:40 DietCoke it's the sort of patch I would normally defer to someone more comfort with parrot guts to apply.
20:40 Zaba joined #parrot
20:41 NotFound And can't be applied as is, several test must be addapted before.
20:43 NotFound But the last can be applied indepedently of the decission about the first mine or the original one.
20:45 NotFound The NULL _class is an open call for segfaulting bugs.
20:53 Zaba joined #parrot
20:53 NotFound By the way, this code segfaults: $P0= get_root_namespace | $P1= get_class $P0
20:55 particle DietCoke: i think pmichaud nominated you for something in your absence :)
20:56 DietCoke which is what, now?
20:56 particle summarizing list mail and irc traffic or something small like that...
20:56 particle i'm kidding, of course.
20:57 particle but we did discuss the Great Need
20:59 Whiteknight what is the Great Need?
21:02 particle summarizing list mail and irc traffic or something small like that...
21:02 particle ~8-10h/week
21:05 cotto_work I'll have to think about whether I'd have time to do that, since it looks like I'll be in code purgatory for a while still.
21:07 rdice left #parrot
21:07 Zaba joined #parrot
21:08 cotto_work something like http://www.perl.com/pub/a/200​4/04/p6pdigest/20040425.html ?
21:09 particle yes
21:09 particle and there's the *possibility* for some funding, from tpf or parrot
21:10 particle we'll definitely be talking about it at yapc
21:10 cotto_work funding would be a secondary concern
21:10 particle and i know ann barcomb well, who did perl 6 summaries for a while
21:10 cotto_work (at least for me)
21:10 particle she and nothingmuch developed some tools to make it easier to manage
21:11 cotto_work good thing to talk about at yapc
21:11 particle ya
21:16 DietCoke whee, more "perl6 is going to suck" crap to wade through.
21:18 jonathan I'm not sure if that beats the "perl6 is a failure" or "perl6 is vaporware" crap...
21:18 * jonathan will be hacking Rakudo tomorrow.
21:20 DietCoke I think it's harder to defend against. Though they're ranting about the initial apoc, I think.
21:20 Tene DietCoke: where?
21:21 Zaba joined #parrot
21:24 DietCoke private online community
21:24 DietCoke I just quit that channel.
21:24 Whiteknight perl 6 is going to be the bee's knees
21:24 Whiteknight I'm so excited about it, I could plotz
21:25 DietCoke heh. If I was personally more excited about perl6, I could probably defend it. As it is, it's just a drain to talk to these guys.
21:26 Whiteknight The proof will be in the pudding, as it were. When we get a working product and start doing amazing stuff with it, people will cut out their crap
21:29 jonathan I've found some people you can have a reasonable technical discussion with. And even if you end up disagreeing, at least it was a discussion. Others, frankly, aren't going to change their mind no matter what you say and aren't worth the time to argue with.
21:30 DietCoke jonathan: and since I'm not a perl6 expert, I can't even have that discussion, typically. =-)
21:31 Whiteknight I'm not a perl6 expert, but I am an enthusiast. It's perl 6 that lead me to Parrot in the first place
21:31 jonathan Same.
21:32 jonathan ...5 years ago.
21:32 Whiteknight let me tell you what, my C-foo has gotten more of a workout today then it has in years
21:33 Whiteknight doing C pointer arithmetic really makes me appreciate dynamic languages even more
21:33 Tene Hm.  I could really enjoy some lolcode hacking tonight.
21:34 Tene I'm usually just a bit too tired to really get any hacking done unless I'm excited about something specific, or someone else harasses me to do it.
21:35 Tene Caffeine helps a lot, but then I have trouble sleeping for the next two to three days.
21:36 DietCoke I've spent the last several years building up an immunity to caffeine power.
21:36 DietCoke powDer
21:37 Whiteknight I can harass you!
21:37 Tene It's not worth the trouble for me if I end up sleeping in through the start of class, and I'm in different timezones regularly, so I'm more sensitive to that than I used to be.
21:38 Zaba_ joined #parrot
21:38 Tene I think I figured out how to solve a problem I've been having with cardinal in my sleep last night, though.
21:40 Tene I'm still not sure what I'm going to do about the "no syntactic difference between variable and nullary sub" thing and the "no syntactic difference between attribute access and nullary method call" thing
21:41 DietCoke tene: is there a mailing list for generic LOL code stuff?
21:41 Tene DietCoke: I have no clue whatsoever.
21:41 * DietCoke needs mdiep back to hack on tcl more.
21:41 Tene I just read some stuff from the spec page.
21:42 Tene There are web forums, I know.
21:42 NotFound DietCoke: almost any mailing list and web forum in the world have a lot of LOL people.
21:42 DietCoke Happy to create a mailing list on coleda.com if you need one.
21:42 DietCoke NotFound: specifically looking for lolcoders, though. =-)
21:44 DietCoke (mailing list) probably better off to do that via google groups, though.
21:45 Tene DietCoke: why do you ask?
21:45 DietCoke because I assume you are having trouble resolving a spec question, not an implementation detail.
21:45 NotFound Created #55640 with the segfault found when discussing #55620
21:46 Tene I was talking about cardinal there, not lolcode.
21:47 * DietCoke missed the context switch
21:47 DietCoke ->
21:47 Tene in ruby, "a = b + c", both b and c could be either variables or nullary subs.
21:48 NotFound Less than an hour to locate, fixing, testing and creating the ticket, not so bad :)
21:53 Auzon joined #parrot
21:57 Zaba joined #parrot
22:04 cjfields left #parrot
22:09 Limbic_Region joined #parrot
22:18 Auzon joined #parrot
22:39 dalek r28245 | Whiteknight++ | gsoc_pdd09:
22:39 dalek : [gsoc_pdd09] more modifications, add a cardmarking function, will probably be inlined later
22:39 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28245
22:57 jonathan Whiteknight: I'd guess most compilers will spot it, but  card = card + (hdr->index / 4); is maybe better to use ">> 2" instead of potentially slow "/ 4"?
22:58 jonathan And bitwise of instead of the modulo too.
22:59 japhb joined #parrot
23:05 NotFound jonathan: if the values are unsigned, you can trust the compiler will optimize it.
23:06 NotFound (and if not, the compiler is so bad that those microoptimization will not be noticeable)
23:09 NotFound We already have too many attempts of premature optimization, IMO.
23:10 particle joined #parrot
23:13 IllvilJa joined #parrot
23:18 japhb NotFound: sure ... but given that the compiler should DTRT, the choice of /4 or >>2 should depend on what the actual *intent* of the code is.  If it's an integer getting scaled, /4 is the correct code.  If it's a bitmask, >>2 is the correct code.
23:19 * japhb hates it when people mix /(2**n) and >>n without thinking ...
23:19 cotto_work premature optimization?
23:19 purl premature optimization is the root of all evil or when you make the mistake of optimising for speed when really you should optimise for maintainability and correctness, in the first instance. or unnecessary optimization is premature by definition. or hacking with tequila in preference to wine
23:19 japhb ... but I'm also in the "code is prose" group
23:19 NotFound japhb: yeah, but I haven't seen yet a / 4 used when >> 2 will be desirable.
23:19 japhb I like that last definition for premature optimization ...
23:20 japhb NotFound: sadly, I have.
23:20 japhb Someone doing a clbuttic reactionary conversion, I think
23:20 jonathan Fine, fine, leave it as it is.
23:22 japhb jonathan: OH, I hadn't looked at the original patch in full, so I don't know which is correct in that instance.  I was just trying to say that /4 ==> >>2 is not *necessarily* the best choice.
23:22 jonathan Given it's doing the cardmarking stuff, I suspect bitwise would be more natural.
23:22 japhb Fair enough.
23:23 japhb Tene: So how does *ruby* resolve the 'a = b + c' syntax ambiguity?
23:24 japhb Is every variable name really syntactically a nullary accessor, that just might be optimized away?
23:24 jonathan Also note, we tend to run Parrot unoptimized much of the time, and I'm guessing this is a hot code-path. Given bitwise seems clearer anyway (though I didn't mention that originally), and doesn't need an optimizer to make it run that tiny bit faster (which may add up), I thought it might be a sensible change.
23:25 NotFound Well, then I can't say no more don't heave seen that ;)
23:25 japhb jonathan: nodnod
23:25 japhb <insert parrot should be built optimized rant here>
23:26 particle parrot is optimized for development atm
23:26 jonathan I may be wrong, but I think some compilers won't let you have debugging symbols *and* optimized build together.
23:26 NotFound jonathan: we also tend to run parrot undertested, and bugs introduced by attempts of optimization are difficult to find.
23:26 japhb particle: I think that's the intent.  I'm not sure it's truly working out that way.
23:26 japhb jonathan: Now that I would believe
23:26 NotFound See all tickets non-null related, for example.
23:26 particle japhb: msvc can't do optimized debug iirc
23:27 * japhb rolls his eyes in frustration with all things Microsoft ... it's been one of those days
23:27 jonathan particle: that was the compiler I was thinking of, but didn't want to say it without checking, and am too tired to be bothered to go look it up and check. :-)
23:27 particle jonathan: i'm pretty certain, but not 100%
23:28 particle and if you and i are both thinking it, there's greater chance that it's true, i'd like to believe :)
23:28 japhb heh
23:28 * particle thinks perl 6 is cool
23:28 NotFound Sometimes the problem is that people only looks at the IDE options, but the command line have more.
23:28 jonathan I think mswin32.pm in hints has something to make sure we don't try and do debug and optimized.
23:28 slightlyoff left #parrot
23:30 * japhb reads through mswin32.pm, feels rather sick to his stomach
23:32 jonathan :-)
23:33 Tene japhb: pretty much, yeah.
23:33 Tene japhb: optimized build on amd64 is broken, iirc
23:34 japhb Oy, and it looks like Borland's Win32 compiler *forces* -O2 ...
23:34 japhb Or rather, we force -O2 when detecting bcc ...
23:35 particle hrmm, borland is one compiler i don't have for windows....
23:35 particle yet.
23:36 japhb Tene: That's one reason that I think always building with no optimization is bad.  Because no one has a strong enough incentive to fix that problem, instead delaying it until much later ... when the fix may be much more painful.
23:36 particle japhb: same can be said for jit, and alternate runcores
23:37 particle we *need* a smoke environment and toolset
23:37 TimToady a Perl 6 programmer is going to be surprised when they put in a breakpoint at infix:</> and don't hit it on /4  :)
23:37 japhb particle: Yep.  Which I've commented similarly about.
23:37 japhb (jit and alternate runcores)
23:38 TimToady Postmature optimization is the leaf of all evil...
23:38 japhb Nice.
23:39 jonathan TimToady: The only time we could ever optimize that is when we can infer from the type that we actually have an int...and I'd hope in the case of lowercase int type we're not compiling down to a multi-dispatch.
23:39 jonathan That's my I-need-sleep guess anyway.
23:40 particle postmature pessimisation is the square of all evil...
23:41 NotFound In the C case, I think there is no debugger that allows to put a breakpoint in / operator.
23:42 ank joined #parrot
23:42 * particle wonders if the perl 6 debugger will have protobreakpoints
23:43 * jonathan isn't sure whether to ask for an explanation
23:43 ank proto?
23:43 purl proto is probably to start at the lowest and use the first available.  The client should be configurable.
23:43 japhb particle: do you mean a breakpoint that activates on any one of a multi?
23:43 particle yep
23:44 japhb nice feature idea, that
23:44 particle like protoregexes
23:44 jonathan Oh, OK.
23:44 jonathan That makes sense.
23:44 particle i think it could be quite useful
23:44 jonathan *nod*
23:45 * particle can't build perl6 :(
23:45 particle jonathan: have you built rakudo lately?
23:45 NotFound All optimized build bugs have seen solved recently were caused by the non-null issues.
23:46 jonathan particle: No, have been snowed under with $DAYJOB since weekend.
23:46 particle notfound: i expect after all those are fixed, optimized build should be much more stable
23:46 jonathan Tomorrow I get full day on Rakudo that $OTHER_JOB won't interupt, though. :-)
23:46 particle ok, well the build dies during dynpmc gen
23:47 NotFound particle: I start to think that the only reasonable way to solve all is to completely drop non-null parameters.
23:47 particle .\perl6str.c(1288) : error C2275: 'PMC' : illegal use of this type as an expression
23:47 particle NotFound: the decorators were added probably without testing optimized build
23:47 particle they're worth having, as long as they're correct and complete
23:47 jonathan Heh. I get "error:imcc:syntax error, unexpected DOT ('.')", but I only updated my Rakudo, not my core Parrot
23:47 japhb particle: re: smoke environment and toolset ... I keep seeing mentions of smoke tools here and there, but always in passing.  What is the current state of things?
23:48 NotFound particle: and wthout testing if the compiler can warn about misuse.
23:48 particle notfound? there's a configure step to detect those attributes
23:48 jonathan particle: On svn up, I see
23:48 jonathan U    lib\Parrot\Pmc2c\PMCEmitter.pm
23:49 particle jonathan: yes, i remember reading a commit msg from chromatic about that
23:49 particle i bet he broke it
23:49 NotFound particle: detect what, if the attributed functions are called with possible null arguments?
23:49 particle but i need to concentrate on mk_language_shell.pl
23:49 jonathan particle: Yup, after getting that, my Rakudo is now hosed too.
23:49 particle NotFound: detect whether the compiler has the ability to use those attributes
23:50 particle NotFound: i believe only gcc can do that now
23:50 bacek_ joined #parrot
23:50 NotFound particle: when there is not such ability, there are no problems caused by it.
23:50 particle correct
23:50 jonathan particle: Will do a realclean.
23:50 particle jonathan: doesn't help, but go ahead
23:51 jonathan damm
23:51 jonathan OK, then I'll go and sleep and have nightmares about the pmc2c fix I might have to do tomorrow.
23:51 IllvilJa joined #parrot
23:51 particle yeah.
23:51 particle enjoy.
23:51 * jonathan hopes it magically gets fixed before he wakes up
23:51 NotFound And even if the compiler were able to warn about possible misuses, it will lose it in jit generated code.
23:52 particle not everyone will run jit
23:52 NotFound particle: I fixed some bugs detected with jit.
23:53 NotFound So at least the people that filled the ticktes does.
23:53 particle right
23:54 particle the matrix of platforms and configurations under which parrot will run is huge
23:54 dalek r28246 | Whiteknight++ | gsoc_pdd09:
23:54 dalek : [gsoc_pdd09] add all allocated objects to the free list. Some simplifications and refactors
23:54 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=28246
23:54 particle the better-defined our api is, the easier it will be to extend and maintain that matrix
23:54 NotFound particle: and that's the main reason to avoid to write potentially dangerour code.
23:55 particle if we can guarantee and document and test that certain parameters and functions allow or disallow null, it makes maintenance easier
23:55 NotFound particle: yes, and the problem is that the api definitions are somewhat nebulous.
23:55 NotFound To say the least.
23:56 particle yes, that's what needs correcting
23:56 NotFound Write code that meets the specification is as easy as walk over water...
23:56 * particle prefers to write tests that meet the spec, then write the code
23:57 NotFound You just need that both are frozen.
23:57 particle the more of parrot we get implemented, the closer that is to happening
23:57 particle sometimes the implementation informs the design
23:58 particle or, using my method, the tests inform the design
23:58 bacek_ morning everyone...
23:59 particle when will you get this right, bacek_, it's almost evening here! :P
23:59 Tene EVENING
23:59 Limbic_Region localtime()
23:59 purl rumour has it localtime() is Y2K compliant, read the doco phule

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

Parrot | source cross referenced