Parrot 2.3.0 Released | parrot.org/ | Channel log: irclog.perlgeek.de/parrot/today | Priority: apply deprecations, merge branches, testexceptions_refactor branch | GSoC students, please read trac.parrot.org/parrot/wiki/GSoCersStartHere
Set by moderator on 6 May 2010.
sorear What's that in years? 00:01
chromatic 7 00:02
00:19 shockwave left
Whiteknight is plobsing probably canadian? 00:32
darbelo probably ;) 00:34
sorear don't we have five gsoccers? 00:41
darbelo Yes, why?
Whiteknight the rest of the world calls them gfootballers 00:42
sorear darbelo: because there are only two blog posts.
darbelo sorear: It's still early. The community bonding period is almost a month this year. 00:43
At least one student mentioned he was having his finals now, and that he'd be around a bit later. 00:44
sorear experimentally upgrades Parrot
cotto_work if you mean khairul, I think his finals are over 00:45
darbelo Honestly, I don't know who I mean.
I remember something about a student and finals. 00:46
Or maybe it was a final student. I can't be sure. 00:47
sorear let's see if losing _synchronize and StringBuilder is as big a win as it sounds like
cotto_work is that the same as an immutable student? 00:48
ash_ I have finals right now 00:49
I am also working on a robotics project that technically won't be done until June 3rd, but it shouldn't get in the way of GSoC, i don't think
purl okay, ash_.
ash_ purl forget that
purl ash_: I forgot that
cotto_work purl, ash_? 00:50
purl ash_ is curious for the case of calling parent class methods or working on a robotics project that technically won't be done until June 3rd, but it shouldn't get in the way of GSoC, i don't think
00:50 plobsing joined
ash_ how does purl work? 00:51
cotto_work she's an infobot
ash_ i imagine its a script in the netherwebs somewhere, but i have been wrong before
darbelo purl: forget ash_ 00:52
purl darbelo: I forgot ash_
darbelo ash_: ?
ash_?
sorear purl, flooterbuck?
purl i heard flooterbuck was well, flooterbuck is the kind of infobot that i am or a dagbrown, mendel, warewolf and kd production or actually maintained or github.com/dagbrown/flooterbuck/ or git-clone git://github.com/dagbrown/flooterbuck.git or a complete pile of ass written in perl 4 or mostly warewolf's fault really.
darbelo ash_: She replaces 'I' with the nick saying it. 00:53
I?
purl you are Daniel Arbelo Arrocha <mailto:arbelo@gmail.com> or Daniel "The Wrecking Ball" Arbelo Arrocha
ash_ I?
how do you fill out that info? 00:54
darbelo?
purl it has been said that darbelo is Daniel Arbelo Arrocha <mailto:arbelo@gmail.com> or Daniel "The Wrecking Ball" Arbelo Arrocha
ash_ ash_ is John Harrison
00:54 abqar joined
plobsing ash_: how far along are you with CLA/commit bit etc? 00:55
darbelo Whenever you say "$something is also $description" it gets appended to that factoid.
ash_ plobsing: coke has my cla, i have a trac account too
plobsing: i made a git fork of dukeleto's github parrot mirror, i haven't pushed any commits yet, still planning for the NCI stuff 00:56
cotto_work I thought his mirror was read-only.
ash_ ash_ is also John Harrison <mailto:john@greaterthaninfinity.com>
purl okay, ash_.
plobsing ash_: cool, I like working with git.
tcurtis I?
ash_ cotto_work: it is, but I was just planning on making patches until I have an svn commit bit, if i need to push to master that is 00:57
I?
purl you are John Harrison or John Harrison <mailto:john@greaterthaninfinity.com>
tcurtis tcurtis is Tyler Curtis <mailto:tyler.l.curtis@gmail.com>
Coke I got a cla from... yah, that guy.
tcurtis I?
purl you are, like, Tyler Curtis <mailto:tyler.l.curtis@gmail.com>
Coke (john)
plobsing hmmm, who does purl think I am? 00:58
I?
purl you are part of our sanity injection framework or probably canadian or mailto:plobsing@gmail.com
ash_ i like the probably canadian bit
plobsing not sure about the sanity, but 2 out of 3 ain't bad
ash_ plobsing: I was looking around earlier, I think I'll have to make changes in the NCI pmc as well as the dlfunc and dlvar opcodes (maybe library but I don't know about that one yet, I don't think so) 01:01
cotto_work goes home
plobsing ash_: changes how?
01:01 davidfetter joined
sorear I? 01:02
purl you are aware that PONIE is dead. I know relatively little of Perl 6 and Parrot
tcurtis chromatic, have you had a chance to look at www.parrot.org/content/past-optimization ? 01:03
Coke oooh, i'z reading that now. 01:04
bacek_at_work ~~ 01:12
ash_ one of the gcc's GSoC projects this summer is a python-like frontend for gcc, implementing a subset of python 01:18
Coke bah. Codestring branch CS choking on rakudo's perl6-grammar.
ash_ what part of the grammar? 01:19
Coke no, just slow. 01:21
plobsing ash_: what weaknesses in NCI.pmc and dlfunc do you want to address? also, how does dlvar factor into things at all? 01:25
ash_ well, If I am going to use libffi, it has its own set of variable types it uses, like ffi_type_uint8 (and other ffi_type_*) I figured I would need to replace the current NCI implementation details with libffi implementation details 01:29
plobsing you would have to parse the signature string yourself, but NCI.pmc doesn't actually handle types much 01:30
it simply delegates to thunks on a hope and a prayer
ash_ I was looking at the thunks stuff, trying to understand it, it seems rather specific 01:31
libffi would allow for a completely dynamic way of building thunks, which is what I was going for 01:32
plobsing it takes a function pointer. To use libffi, you have a general purpose libffi calling function you give to NCI.pmc and then you'd store the libffi signature description in the userdata
you could also just replace NCI.pmc. maybe by making it HLL-mappable
ash_ I also looked at the detect_llvm branch, for its config related llvm things, I noticed its not actually using llvm-config, it looks for llvm-gcc, lli, and llc, which is kinda odd 01:35
sorear who is in charge of IMCC? 01:36
it's using less memory but *much* slower
plobsing sorear: look at IMCC source code and then tell me you think anyone is "in charge" ;-) 01:37
ash_ svn blame?
purl it has been said that svn blame is just like p4 annotate, only better or just like git blame, only different
sorear rakudobuild just finished in 33 minutes 01:38
20 of them were spent in /usr/local/bin/parrot -o perl6.pbc src/Perl6/Compiler.pir
plobsing I've recently made imcc much slower. Maybe that's it.
sorear (Compiler.pir transitively includes about 200,000 lines of pir, most of it generated) 01:39
plobsing sorear: the cost scales linearly both with PMC and string constants. To make things faster, try to use fewer of those :p 01:40
01:40 Andy joined
sorear /linearly/? 01:42
plobsing my regression is linear. so it is O(n * $whatever_imcc_was_before) 01:43
sorear unfortunately, I don't know *exactly* how much memory was used 01:44
I forgot to keep an eye on top
chromatic It's time to use a hash to cache those string constants. 01:47
My best idea yet is to make a ConstTable PMC that knows how to write out those constants in the right order. 01:48
dalek rrot: r46374 | coke++ | branches/codestring/src/pmc/codestring.pmc:
remove an assignment that snuck in.
plobsing chromatic: quick and dirty (as if we didn't have enough of that already) would be to put the hash in IMCC_INFO
I'm pretty sure that would work. 01:49
chromatic I found three places that check for existence of string constants. We should unify them somehow.
plobsing That I can do.
01:52 JimmyZ joined
JimmyZ Coke? 01:53
purl Coke is Will Coleda <mailto:will@coleda.com> or perpetually annoyed. or magical ticket robot or (if Diet), something that turns into formaldehyde in my blood. or getting those data_json issues in Coke's build. or tempted to remove "ticket_append" for authenticated. or on OSX 10.6.3
01:54 szabgab joined
plobsing chromatic: how can two strings be Parrot_str_equal if they don't have the same charset and encoding? 01:59
01:59 Psyche^ joined
chromatic They can't. 01:59
plobsing so then why does the string constant equality test that I copied everywhere test these independantly? 02:01
chromatic I'm not sure.
Andy We're not relying on Perl 5.10 to build Parrot, are we? 02:02
chromatic Not yet.
Andy we're going to at some point?
chromatic Possibly. 02:03
Andy Right now, I can't run Configure under 5.8 'cause darbelo put in a next if $k ~~ /_provisional/;
which I'm going to retro back to =~
chromatic Please do. 02:04
dalek rrot: r46375 | coke++ | branches/codestring/src/pmc/codestring.pmc:
whitespace & other clenaup
02:05
Coke JimmyZ, yes? 02:06
dalek rrot: r46376 | petdance++ | trunk/config/gen/config_pm.pm:
We can't yet use smart-matching because we are not requiring Perl 5.10
02:21
sorear wonders if he should blame rakudobuilds using 30% more memory on compact_string no longer freeing 100% of memory 02:24
core.pm -> core.pir, the traditional longest step, took 7m38s (4m11s real, 420MB) 02:29
Andy embed.h is going to get headerized. It's the last holdout
02:30 plobsing joined 02:36 janus joined 02:44 Mokurai1 joined
JimmyZ Coke: parrot will remove concatenate from stringbuilder? 02:45
Coke I don't think so. why do you ask? 02:46
JimmyZ from backlogs 02:48
And push and concatenate are the same. Does parrot need two ways to do the samething? 02:50
Coke makes sens for this pmc, I think. 02:51
"sense"
JimmyZ seems that it push something to array or stack. :) 02:52
pushs 02:53
02:53 parthm joined
dalek rrot: r46377 | petdance++ | trunk (4 files):
updating PARROT_ instrumentation. The entire embed.h needs to get headerized.
02:53
rrot: r46378 | plobsing++ | trunk (4 files):
consolidate packfile constant reverse lookup in PackFile_ConstTable_rlookup function
rrot: r46379 | plobsing++ | trunk/compilers/imcc/pbc.c:
consolidate functionality into PackFile_ConstTable_rlookup()
03:10
sorear after rerrunning the build with better instrumentation: 03:25
-420 MB peak
-7.5 min for perl6->pir setting 03:26
-21 min for pir->pbc stage 2 compiler (includes setting)
dalek rrot: r46380 | coke++ | branches/codestring/src/pmc/codestring.pmc:
move methods around
sorear - 1 min for pir->pbc stage 1 compiler 03:27
-2 min nqp->pir compiler proper 03:28
-33.5 min total
03:30 LoganLK joined
Coke don't say we never did anything fer ya. 03:32
sorear don't you like feedback? especially feedback with numbers? 03:33
JimmyZ sorear: Do you mean it's better now? 03:34
Coke ah. you don't mean "33.5 minutes less altogether"
and yes, numbers are good. much better than usual. =-)
ash_ sorear: what kind of machine are you on? 03:36
sorear JimmyZ: No, that was an unfortunate choice of bullet 03:37
pbc_to_exe uses *much* less memory though
ash_ so there has been a recent trade off of memory vs speed 03:38
sorear well
pbc_to_exe uses much less memory, IMCC is much slower
it's like a phantom time travelling tradeoff
ash_: P4 2GHz 0.5MB L2 384MB RAM 03:39
ash_ ah, is it swapping a lot i guess then? 03:40
with 384 MB of ram, how much ram does the build process take?
sorear it peaks at 420 these days with a working set a bit smaller 03:41
only about 2-4 minutes of that 33 minute run was spent waiting for page faults
it was a lot worse a month ago, I had to run rakudobuilds overnight
JimmyZ :) 03:42
ash_ man, i can't imagine that... 03:44
my computer has 4 gigs, and currently i am using 3.25 ish of it
granted, i have an andriod emulator running, and eclipse
03:51 parthm joined
Coke tries moving to a linux box to see if he can track down the memory issues with the codestring branch. 04:01
04:19 iblechbot joined 04:29 Andy left 04:32 tcurtis joined
nopaste "plobsing" at 192.168.1.3 pasted "PackFile ConstTable Cached String RLookup" (141 lines) at nopaste.snit.ch/20493 04:35
chromatic Looks reasonable. 04:36
plobsing it fails
because identical strings with different encodings/charsets are the same to hashes
but are considered to be distinct elsewhere
not sure how to fix that. encodings are not my strong suit 04:38
bacek_at_work ~~ 04:40
Guys, you are doing it... sub-optimal. There is PackfileConstantTable PMC already. It's much better to move to Packfile PMCs and improve them. 04:41
(Yes, it's more effort required, but then we can rip off IMCC and use PIR/NQP to generate PBC)
plobsing are you volunteering?
bacek_at_work I've implemented most of those PMCs! :) 04:46
plobsing also, upon inspection, PackfileConstantTable likely suffers the same differently encoded strings are the same yet different problem
fix that and either solution should work
bacek_at_work Yes. But it's single place
And we can improve it without braking encapsulation
plobsing also, wrt Packfile PMCs, if we get IMCC using these, IMCC will be in a much better shape and we won't be motivated to replace it 04:47
s/motivated/as motivated/
bacek_at_work Good point! :) 04:48
plobsing anyways, I agree with the idea of Packfile PMCs, I'm just not confident I can get IMCC using these and "bug-free" before the 2.4 release. 04:50
Coke is experimenting with making CodeString a StringBuilder and is getting lovely segfaults. bah.
branches/codestring@HEAD seems to be chewing through memory.
whee, and I have a segfaulting parrot -t4. 04:51
cotto "IMCC" and "bug-free" sounds optimistic with any timeframe
plobsing hence the scare-quotes
cotto otoh, if IMCC can use the Packfile PMCs, a pir-based compiler would be one step closer. 04:52
Coke oooh, sweet, fixed it. 04:53
plobsing yes, all we'd need is a (subset PIR) -> C emitter and we could fully bootstrap
Coke chromatic: you about? 05:00
or bacek?
purl hmmm... bacek is THE MANIAC or some sort of magical coding robot
bacek_at_work Coke, github.com/bacek/pir 05:01
cotto Hmmm. How would that hande dynops? 05:02
Coke bacek_at_work: I have a codestring that ISA stringbuilder. both that and the version currently in the branch seem hella slow. Any suggestions? 05:03
(the one that ISA is just in my working copy atm.) 05:04
bacek_at_work Coke, I'll look at it tonight. I still have some $work to do...
nopaste "coke" at 192.168.1.3 pasted "make Codestring extend stringbuilder" (158 lines) at nopaste.snit.ch/20494 05:05
bacek_at_work Coke, CodeString@HEAD looks about all right... 05:10
05:38 jsut joined
plobsing hmmm... String.trans seems fishy given immutable strings 05:49
cotto not if you use it counterintuitively 05:50
plobsing it *mutates* its argument. how could it possibly be correct? 05:54
cotto nm. I assumed it'd return a mutated copy. 05:55
bacek_at_work plobsing, you're right. String.trans must be updated... 06:05
06:05 aukjan joined
bacek_at_work Actually, I would like to see only "const STRING*" passed around. It will help with catching such bugs. 06:05
06:12 uniejo joined 06:16 snarkyboojum joined
dalek rrot: r46381 | plobsing++ | trunk/src/pmc/stringbuilder.pmc:
stringbuilder strings have invalid hashes
06:26
06:38 chromatic joined
moritz rakudo on latest parrot now uses huge amounts of memory during spectest (not build) 06:38
sorear interesting 06:39
06:40 viklund joined
dalek rrot: r46382 | plobsing++ | trunk (2 files):
update String.trans to work in immutable strings style
06:42
06:44 kurahaupo joined 07:01 fperrad joined 07:05 snarkyboojum joined, fperrad_ joined
dalek rrot: r46383 | plobsing++ | trunk/examples/shootout/revcomp.pir:
update revcomp example for String.trans changes
07:15
07:18 kurahaupo_mobi joined
dalek rrot: r46384 | jimmy++ | trunk (3 files):
removed unused code and consting
08:04
08:40 cosimo joined 09:16 khairul joined 09:31 parthm joined
darbelo Wait. We're not requiring perl 5.10? 09:45
moritz are we?
darbelo Apparently Configure works on 5.8 09:46
irclog.perlgeek.de/parrot/2010-05-07#i_2303184
moritz ok, we're not :-) 09:47
darbelo We are. Andy fixed it later. 09:48
r46377
Ehm, I mean r46376
09:54 parthm left 10:14 Whiteknight joined
mikehh make test FAILures - t/compilers/pct/past.t - Failed tests: 7-9 and t/compilers/pct/post.t - Failed test: 5 - all Segmentation faults - Ubuntu 10.04 amd64 (g++) at r46384 10:52
same story with gcc with --optimize - ah no does not fail 9 11:02
make test FAILures - t/compilers/pct/past.t - Failed tests: 7-8 and t/compilers/pct/post.t - Failed test: 5 - all Segmentation faults - Ubuntu 10.04 amd64 (gcc with --optimize) at r46384 11:03
it passes the test once with prove than failed on subsequent proves (including 9) 11:07
both tests
purl both tests are using parrot 39271
11:16 Whiteknight joined
darbelo purl: firget both tests 11:16
purl darbelo: sorry...
darbelo purl: forget both tests 11:17
purl darbelo: I forgot both tests
11:42 Whiteknight joined 11:43 TiMBuS joined
darbelo Hmm. Does Parrot_str_new_constant() really need to set PObj_external_FLAG on the strigs it creates? 11:48
Oh, it's cheaper that way. Of course. Nevermind. 11:51
darbelo finds out that everything has a cost. 11:54
12:26 JimmyZ joined
nopaste "darbelo" at 192.168.1.3 pasted "Ok. WTF?" (39 lines) at nopaste.snit.ch/20496 12:31
darbelo If anyone can help diagnose that, I'll be be very grateful. 12:32
JimmyZ WTF? 12:41
darbelo Yeah, that's what I said. 12:44
Something somewhere is playing with pointers it shouldn't be. 12:45
Aha! It's a mis-concatenation. I should have seen that one coming. 12:55
No, wait. It isn't. 12:58
12:59 shockwave joined
shockwave Hi. Is there a way to declare (global) constans in a file which can be imported and used in other files? 13:00
I'm talking about PIR, btw?
s/btw?/btw 13:01
darbelo shockwave: Yes and no.
shockwave darbelo, :S
darbelo Constants can be defined in pasm, and the included in pir.
shockwave darbelo, that's fine with me.
darbelo .include 'yourfile.psm' 13:02
See runtime/parrot/include/datatypes.pasm for an example. 13:03
Also watch out. .include is dumb textual inclusion.
shockwave weird, I don't have that file in 2.3
I'll do a search. 13:04
darbelo runtime/parrot/include/iglobals.pasm 13:05
That one has been there for a long time.
.macro_const MACRONAME macrovalue 13:06
shockwave darbelo, ok, I'll try that .macro_const. Weird #2, I also don't have iglobals.
13:07 ruoso joined
shockwave Thanks, darbelo 13:09
khairul darbelo: i was just reading pdd19 (pir), ".const <type> <identifier> = <const>" , does that work too? 13:11
shockwave khairul, That works, but I think it's only for use within the subroutines. 13:12
khairul shockwave, thanks. I thought .globalconst is the one that may only be used within subs. no mention of restrictions on .const 13:15
shockwave khairul, I'm certaintly not an expert (yet), but just by the name .globalconst doesn't sound like it should be local to subs only. 13:16
khairul hrm, .const seems to work outside of subs, .globalconst doesnt. 13:21
shockwave khairul, to clarify. I only use PIR, not PASM (except now, to create those constants). So what I mean is that .const is to be used within the same sub that is created. But, to be honest, I'm just guessing at this point. I haven't tried to use it otherwise. 13:23
I tried using that macro thing before, but I couldn't get it to work. I was able to work around it. 13:29
13:30 cosimo joined
shockwave I still can't get it to work (most certainly my fault), but I definetly needed it now, and can't work around it. 13:30
Basically, I did this:
1) Created a file foo.pasm, and included lines like this:
.macro_const Ink_T_bool 3
2) included that file using .include 'foo.pasm', and then tried to use the constant like so: 13:31
_someInt == Ink_T_bool
I get: error:imcc:undefined identifier 'Ink_T_bool'
darbelo shockwave: You need a leading '.' on the name. 13:33
.Ink_T_bool
dalek gest-dynpmcs: 1ad6bcd | fperrad++ | setup.pir:
now Parrot ignores all about open_ssl
13:35
shockwave darbelo, it works. Thanks, again. 13:36
darbelo, I see what you mean about it being a dumb textual replacement.
One can't include that constants file at a top level, and include it sub files. 13:37
It must be included in every file that it will be used (darn).
I guess is better thank nothing.
Actually, having to include it in every file blows. 13:40
dalek tracwiki: v15 | fperrad++ | ListOfPlatforms 13:46
tracwiki: trac.parrot.org/parrot/wiki/ListOfP...ction=diff
bacek ~~ 13:56
13:57 clinton joined
darbelo morning bacek 13:57
fsvo morning.
bacek darbelo, 3 minutes till tomorrow :) 13:58
darbelo 'Tomorrow' and 'Morning' are the same word in spanish ;)
bacek Makes sense :) 13:59
shockwave manana en la manana: tomorrow morning. LOL
darbelo Bilingual puns aside, do you have any ideas what could be causing nopaste.snit.ch/20496 14:00
I was expecting it to explode.
Not pass coretest and then fail weirdly in PGE. 14:01
shockwave darbelo, if you're talking to me, I don't Perl.
bacek darbelo, you are braking contract with strings. _bufstart should be set
darbelo Actaully, I want to change that contract. Only set _bufstart when we have a buffer to point to. 14:02
bacek Wow... Good luck :)
14:03 shockwave left
bacek Why do you want it? 14:03
darbelo So we can store all buffer data inside the buffer itself. Like we do the 'refcount' flag. 14:04
Makes strings smaller.
bacek You can easily claim one pointer from strings.
And make code even simpler. 14:05
darbelo _buflen ?
bacek Nope
strstart
purl somebody said strstart was going away.
darbelo I tried that before. It didn't work with shared buffers. 14:06
bacek Just remove "shared buffer"
We share them for substrings only
darbelo If I only keep a pointer to the buffer, how do I know where my substring starts?
bacek Don't share it :) Allocate new string storage for substrings 14:07
darbelo That's... Not going to be cheap.
bacek Why? 14:08
We will use less memory for STRING*
compact_pool will be faster and precise
darbelo We have lots of substrings in PGE/TGE/NQP
That's why it failed the last time.
dalek kudo: def9f9c | (Solomon Foster)++ | src/core/ (4 files):
Move .sin method to Numeric and Real, cleaning up the Num and Complex versions a tad in the process. Also clean up the Real.unpolar code, and delete the now unneeded Num.unpolar.
14:09
kudo: 977fad6 | (Solomon Foster)++ | src/core/ (4 files):
Rename log-e to the more traditional (yet still unspec'd and likely to go away) ln.
darbelo I'm not sure the smaller header is enoguh to pay for all that copying.
bacek Substrings are costly anyway. We still have to allocate header
Allocating (usually small) content will not add much. 14:10
But it worth benchmarking first
darbelo Oh, wait. A small substring on a shared buffer can keep a live a bigger string, right?
bacek exactly... 14:11
darbelo If I slurp a big string, substr() a char and hold only tho that. The big one lives for ever....
bacek Immutable Immortal String!
And housekeeping for "shared" strings is... not actually so bad. But it's definitely not perfect. 14:13
msg chromatic I do want to kill "shared buffer" for strings. irclog.perlgeek.de/parrot/2010-05-07#i_2304418 14:19
purl Message for chromatic stored.
bacek darbelo, easy win. Remove bufused 14:24
darbelo I'll have to check my notes on the previous strstart removal attempt, but I think I had most of the big parts done. 14:25
bacek we never update "buffer"
NotFound bacek: bufused is used for bytelength right now.
bacek NotFound, ah... When it happened?
darbelo Wait, bufused counts off strstart?
That's totally fucked up. 14:26
NotFound bacek: don't know, my last change just unified in one point what were previously working. 14:27
darbelo: the good news is that now is more clear than before, and thus can be easilly changed. 14:28
(for some value of 'easy') 14:29
bacek
.oO( What percentage of strings used as hash keys? )
Coke (including constants in files) - you need to include it for every top level compilation. if you have a pir that includes the constants and 20 other files, those other files don't need to include their own copy. it's a compile time macro, and it needs all the PIR at once to do it. If you want something that is a constant available at runtime, you need to investigate sticking those constants in a namespace somewhere and pulling them out when yo 14:30
14:30 atrodo joined
bacek moritz, any particular spectest in rakudo which consume too much memory? 14:31
Coke, same question for codestring branch :)
moritz bacek: lots... I can re-run to find out if you want 14:32
Coke in codestring branch, it's the build of ... Actions, IIRC.
or perhaps grammar.
bacek moritz, it will be helpful
moritz tries to be helpful
Coke bacek: also, did you see my patch?
moritz++
(the one to turn the codestring branch into "ISA" instead of "HASA"?)
bacek Coke, "ISA"? I dislike it.
Coke I like that a little better.
bacek: I know you do. for no good reason, though. =-) 14:33
bacek I think CodeString isa String. And SB is not String...
Coke of course, even the HASA is very broken WRT memory, so it's hard to measure if ISA even helps.
moritz $ ./perl6 t/spec/S02-lexical-conventions/unicode.rakudo
Cannot get character past end of string
that's new too
Coke bacek: No, Codestring is intended, entirely, to be a builder.
purl okay, Coke.
Coke no, codestring is like a stringbuilder, but with a few helper methods. 14:34
purl okay, Coke.
bacek Coke, ah. Then it makes sense.
Coke (I mean, that's the whole point. the only reason it wasn't a string is because there was no stringbuilder. =-)
er, it /was/ a String...
NotFound moritz: the usages of length and bytelength in several parts were confusing. The fix risk to hava break something.
moritz it seems to have broken about 5% of rakudo spectest 14:35
Coke there are some things that do string-like activities on the buffer, so my patch adds those (and only those) to StringBuilder. But it could leave them in CodeString if we /had/ to. (like, substr_str)
darbelo Also, it's going to break even more in the next few days...
bacek Coke, we can keep them in SB. 14:36
moritz darbelo: does this have to be before the release? and in trunk?
NotFound moritz: if they are unicode related, probably are easy to locate and fix.
moritz NotFound: many of them seem to be
darbelo moritz: I'm not going to touch trunk before the release.
moritz darbelo: good :-) 14:37
darbelo moritz: I'm just trying to cleanup strings as much as I can before GSoC.
My motives are 100% selfish.
14:37 bubaflub joined
moritz selfishness++ 14:37
bacek: t/spec/S03-operators/precedence.rakudo killed after using 1.8GB 14:38
Coke bacek: ok. I'm going to go ahead and apply that pathc, then.
bacek moritz, thanks, looking.
NotFound moritz: we can revert that change but IMO the previous state were horribly bad.
moritz NotFound: if somebody fixes rakudo, I'm fine with the changes :-) 14:39
I'm just not at all familiar with parrot and rakudo on the C level
bacek: but it seems that most failures that I attributed to OOM are actually string index problems 14:40
NotFound moritz: look a the generated pir may be a easy way to know if the problem lies in parrot or in rakudo.
bacek moritz, but this one is memory related. Or some kind of infinite loop...
moritz bacek: yes, this one is 14:41
NotFound bacek: infinite loops can be caused by unappropiate usage of bytelength instead of length. 14:42
bacek NotFound, true...
NotFound So it may be the same problem.
Coke NotFound: OH.
Notfound - I wonder if that's what's borking the rakudo build on codestring. 14:43
darbelo Also, I'm not convinced parrot can correctly handle character length in all cases.
Coke darbelo: "tests, please." 14:44
(codestring does use str_byte_length...)
darbelo I don't have any. It's just a general "This code cannot be possibly working now" feeling.
NotFound darbelo: I was sceptic but my tests were good. The remaining convoluted parts are non ascii chars in pir source, but I think rakudo doesn't generate that. 14:45
14:45 jan joined
NotFound Coke: you probably must use str_length 14:46
14:46 Andy joined
darbelo NotFound: Your patch looked good to me. It looke it should be that way. I just wonder how it was working before... 14:47
14:47 fperrad joined
NotFound darbelo: It was non working, just passed tests. 14:48
bacek We have about 15 different variants of string representations. What could possible go wrong?
Coke NotFound: checking...
dalek rrot: r46385 | coke++ | branches/codestring/src/pmc/stringbuilder.pmc:
Add a few string-ish VTABLE entries to StringBuilder.
14:49
rrot: r46386 | coke++ | branches/codestring/src/pmc/codestring.pmc:
Make CodeString ISA StringBuilder instead of HAS-A.

of VTABLES used solely to dispatch to the has-a SB, and an extra PMC per codestring.
NotFound Coke: you need trunk r46371 at least.
purl codestring is, like, like a stringbuilder, but with a few helper methods
darbelo Stuff like validate() in src/string/charset/unicode.c makes me wonder... 14:51
Iterate over codepoints, but check against byte length? Either those variables are misnamed, or that function is horribly wrong. 14:52
NotFound darbelo: probably wrong, I don't reviewed that. 14:53
bacek darbelo, yay! 14:54
moritz, it is infinite loop in unicode.find_cclass 14:55
darbelo++
NotFound darbelo: looks wrong, yes.
moritz bacek: that would explain a lot 14:56
NotFound And probably is slow if the compiler isn't smart enough to optimize out of the loop the _length call.
nopaste "bacek" at 192.168.1.3 pasted "NotFound, darbelo, there is backtrace for infinite loop in unicode.find_cclass" (54 lines) at nopaste.snit.ch/20498 14:57
NotFound while (pos-- > 0) --- UINTVAL pos !!! 15:02
bacek It was actually CodeString
darbelo Really, we shouldn't be using UTF-8.
NotFound unsigneds are rarely lower than zero ;) 15:03
darbelo Unsigned negative numbers ftw!
NotFound Oh, forget it...
purl NotFound: I forgot it
bacek moritz, can you retry on r46390 15:04
Don't put any sign on me! I'm negative enough!!!
moritz bacek: doing that right now 15:05
dalek rrot: r46387 | coke++ | branches/codestring (31 files):
merge latest changes from trunk
rrot: r46388 | fperrad++ | trunk (2 files):
[Gziphandle] add uncompress
rrot: r46389 | bacek++ | trunk/src/pmc/codestring.pmc:
Fix usage of str_length in CodeString.lineof.
rrot: r46390 | bacek++ | trunk/src/pmc/codestring.pmc:
More updates to use str_length instead of byte_length in CodeString.
bacek Coke, merge them again :) 15:06
15:23 theory joined 15:27 aukjan joined
Coke bacek, you're killing me. =-) 15:28
bacek Coke, blame NotFound :)
15:29 alexn_org joined 15:34 alexn_org_ joined
NotFound Sorry, I'll be not blameable on line for the remaining of the day. 15:37
dalek rrot: r46391 | coke++ | branches/codestring (13 files):
merge latest changes from trunk
15:38
rrot: r46392 | coke++ | branches/codestring/src/pmc/codestring.pmc:
use right length-checking mechanism
Coke ok. I finally go through building Grammar... 15:54
I do wish that ulimit worked for me on this box. :P
darbelo Why does Parrot_str_length() return INTVAL? Are we expecting negative lenghts or something? 15:55
15:55 ruoso joined
Coke darbelo: to match up with an $I0... or for no good reason. 15:56
ash_ I wonder what a negative string looks like...
darbelo Right, $I0 registers. That makes sense. 16:00
$1 = Parrot_str_length(interp, $2); 16:02
I keep forgetting about this things.
bacek msg chromatic I've made PBC strings cache in r46393 ( just because waiting for 5 minutes more to build rakudo is killing me). Any objections for encoding^charset? 16:19
purl Message for chromatic stored.
16:19 khairul joined
Coke crap. Actions.pm is STILL HANGING in branch. 16:23
16:23 Mokurai1 joined
bacek checking that it is actually 2:30AM and departing to bed. 16:24
dalek rrot: r46393 | bacek++ | trunk (2 files):
Cache strings lookup in PackFile_ConstTable_rlookup. It's bring compilation time of perl6.pbc from 5.30 minutes to 40 seconds
16:27
particle wonders what robot beds look like 16:29
moritz probably with lots of electric plugs for re-charging 16:30
16:30 alexn_org_ joined 16:32 hercynium joined
Coke plugs are old school. it's just a recharging mat. 16:34
moritz sometimes i think our bacekbot is a bit old school, with all this obsession of performance and so on
dalek rrot: r46394 | coke++ | branches/codestring (12 files):
merge latest changes from trunk
16:43
sorear After IMCC is killed with fire and POST::Compiler generates packfile segments directly, what will we use CS/SB for? 16:45
Coke 16:48
SB - for efficient string building that isn't code related.
CS probably has less of a future then.
17:06 lucian joined 17:10 lucian joined
Coke ok. i think my problem in the branch is substr_str - when I rely on string for it, it's zippy enough. it does seem to get invoked a /lot/ though, so any issues in the stringbuilder version are going to be very exaggerated. 17:14
why is "hash is invalid" done explicitly in the get_string? 17:22
(of SB)
darbelo So you don't give out mis-hashed strings? 17:23
Coke why was the hash wrong in the first place? 17:24
darbelo My guess: You appended to the string without re-hashing. 17:25
I'll have to look at the code to be sure. 17:26
Is this trunk or branch?
sorear Coke: because the string embedded in SB gets constantly butchered 17:32
darbelo Coke: In trunk, this happens in the push_string() VTABLE, it memcpy()s stuff unto the string without hashing it again. 17:34
Which is the right thing to do there. Otherwise you'd be recalculating hashes and throing them away on every concatenation. 17:35
Damm, it can even *transcode* on appends. That'll invalidate hashes too. 17:36
sorear bacek++ "parrot -o perl6.pbc src/Perl6/Compiler.pir is now 15 times faster 18:04
18:23 fperrad joined
cotto_work 385/48 18:29
purl 8.02083333333333
cotto_work bacek++ (I see an 8x improvement, but that still quite awesome)
sorear 1260/90 18:31
purl 14
darbelo sorear: RAM starved, eh?
sorear darbelo: imcc doesn't come close to the limit 18:32
also I stand by my position that 384 million bytes is a ridiculously excessive amount of memory to put in one computer. 18:33
darbelo Heh, I'm used to systems where 8k bytes is a lot. I don't expect 'regular' software to run on them. 18:34
sorear (You mean like my toaster?) 18:35
darbelo Pretty much. Last embedded project I worked on was for toasting magnets. 18:37
Where toasting == spark plasma sintering 18:38
davidfetter 's toaster stores about a byte of information
then again, it's analog
darbelo I'm not sure electrocuted and compressed bread would be very tasty, thoug. 18:39
18:45 shockwave joined
shockwave Howdy. 18:45
The programming language I'm designing is strongly typed. Among the builtin types, there is a 'map' type, which is an associative array. 18:46
Internally, i have a Map class, written in PIR, which contains a few members. The important ones for my question are '%collection' and '%type', both of which are of PIR's 'Hash' type. 18:47
I'm currently writing the comparison sub for my custom Map type,
I order for the comparison to yield true, both the types and the values have to match. 18:48
I have an Array class, which is similar to the Map class. Coding the equality for the Array class which fairly easy, as all that needs to be done is compare the types and values sequentially. But Maps are not sequential. 18:49
Which brings me to my question(s).
In order to me to compare to 'Hash'es, do I need to: for every element in Hash A, iterator through every element in Hash B and see if the values match? 18:50
Or is there a more efficient way of doing this?
Thanks.
Whiteknight cotto_work: 8x improvement on what? 18:51
moritz shockwave: you can keep an xor'd bitmap of all keys in the hash...
cotto_work parrot -o perl6.pbc src/Perl6/Compiler.pir
moritz shockwave: and then compare that bitmap of the two hashes first; if they differ, you already know they are not equivalent 18:52
shockwave moritz, I'm sorry, but I don't understand. 18:53
oh, I think I have an idea of what you're talking about, moritz 18:54
One of the reasons I'm running into some issues is that the keys of the maps being compared shouldn't matter, only their values. 18:55
moritz oh
how can you compare two hashes without caring about the keys?
shockwave Or maybe they should matter, now that I think about it.
moritz, I've spent about 30 mins thinking about it, while sitting in the yard. I think somehow I convinced myself that they keys should not be important. But, yeah. Now that You mention it, they should be. 18:57
This should make things simpler.
Back to the drawing board.
Thanks, moritz
moritz :-)
19:01 hercynium joined
shockwave moritz, can you expand a bit on that bitmap of keys idea. 19:06
cotto_work it sounds a little like a bloom filter 19:07
moritz shockwave: that's only applicable if you control your hash tables on a low level - do you do that? 19:08
shockwave moritz, I think it's pretty low level, yeah.
moritz shockwave: ok... then you keep one string per hash 19:09
shockwave: and whenever you insert a new key, you xor that string (let's call it checksum) with the new key
and store the result as the new checksum
and whenever you remove a key, you do the same operation 19:10
so two hashes with the same set of keys always have the same checksum
shockwave moritz, what is the initial value of the string?
moritz shockwave: arbitrary, as long as it's the same for all hashes 19:11
19:11 LoganLK joined
shockwave moritz, cool. I'll give it a try. 19:11
moritz actually it can be an integer, if your checksum turns hash keys into integers
shockwave Sweet. Ints are my favorite data type :) 19:12
cotto_work, thanks for the info. I'm currently reading: en.wikipedia.org/wiki/Bloom_filter
moritz and then of course xor it with result of the hashing functions of the keys
19:18 plobsing_work joined
Coke instead of invalidating the hash on get-string, then, should we do it on push_string? 19:20
then anything that is accessing "buffer" after that will have it invalidated already.
plobsing_work I see bacek++ beat me to the punch on cached string rlookup 19:30
Coke plobsing_work: instead you can figure out whys branches/codestring is such a dog on rakudo's Actions.pm =-) 19:32
plobsing_work first I'll try to fix the test regressions I'm fairly sure exist in bacek's changes (his patch is remarkably similar to one I've been sitting on until I can work out the kinks) 19:35
(I don't have a test machine at work)
darbelo Coke: Yes... And on any other operation that alters the string. Except, maybe, set_string() as that carries in it's own (hopefully correct) hash. 19:37
It's probably a micro-optimization anyway. The only case where it matters is when someone does a set_string() and then a get_string without pushing anything. 19:38
And that doesn't sound like the typycal case for StringBuilder, nor CodeString. 19:39
cotto_work a nooptimization?
darbelo Oh, and the common case (set_string once, push a lot, get_string at the end) gets a smidgen slower, since it has to write 0 on a field every time ;) 19:41
You can do it a lot when pushing or once at the end. Once is faster than a lot ;) 19:42
plobsing_work I put the hash invalidation into SB last night. I didn't put much thought into what op invalidated.
darbelo You picked the right place, if you ask me. 19:43
Coke MJD #11912: Evidently it's important to you to get the wrong answer as quickly as possible. 19:52
(we can't guarantee when people are going to do a push then get, so we should really do it everywhere. updating a C struct member to 0 is pretty cheap, considering what else all those functions are doing, neh? 19:53
(more concerned about the substr case, though- better to do it right after the invalidation than try to catch all the "ok, a string is now leaving the PMC" cases.) 19:54
is t/compilers/pge/pge_examples.t failing in trunk? 19:58
dalek rrot: r46395 | coke++ | branches/codestring/src/pmc/stringbuilder.pmc:
move the hash invalidation to right after it happens. This should then cover
20:00
20:01 snarkyboojum joined
Coke 0/win 2 20:20
KHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN
shockwave moritz, Thanks again for the help. The algo I ended up concocting is better than what I expected. Unlike PHP's array_diff(), which is the function used to compare hashes in PHP, mine can actually compares the aggregates of any dimensions, not just the first dimension (unlike array_diff). 20:28
20:32 hercynium joined 20:34 allison joined
darbelo Coke: Oh, there's more than one exit path? Oops. 20:35
20:38 joeri joined
Coke darbelo: only in my branch so far. =-0 20:40
er, =-)
21:00 mikehh_ joined
Whiteknight how does a new user on parrot.org create a blog? 21:05
darbelo Whiteknight: By asking Coke. 21:07
Whiteknight Coke: ping
cotto_work log in, create content -> blog entry
Coke pong
presuming they have 'poster' privs.
Whiteknight Coke: I need a blog set up for user Chandon 21:08
if it isn't already 21:09
shit, I can probably do it myself, can't I? I think I have some permission bits
...nevermind, can't remember my password 21:11
Tene Whiteknight: did you try "123password"?
Whiteknight that's the combination to my luggage! 21:12
Tene Oops, sorry.
Whiteknight does everybody have the ability to blog by default? 21:14
darbelo Guys: It's just not funny, giving out my Home Banking password like that on IRC.
Whiteknight: Default is no blog. Or that's how it was last year. 21:15
cotto_work . o 0 (Perhaps this gsoc will be more profitable than the previous ones.) 21:16
Whiteknight to give somebody blog access, I make them a "poster"? 21:17
or an "editor"?
purl i guess an "editor" is ed, or an imposter.
moritz you make them "imposterÄ
Whiteknight damnit purl
purl damnit i am a bot!!!
moritz erm
Whiteknight she needs a better response to that 21:18
Coke poster.
editor means "I can edit any content."
like I did when i went back in and fixed a typo in the student's blog title.
Whiteknight Done
Coke see, you don't need me. 21:19
darbelo Coke: You are the default 'ask to do our work for us' guy. 21:20
dalek kudo: 916b56d | moritz++ | (2 files):
implement List.classify; all tests pass except those depending on binding
21:31
21:32 tcurtis joined 21:37 nnunley joined
dalek rrot: r46396 | fperrad++ | trunk/src/dynpmc/gziphandle.pmc:
[Gziphandle] fix uncompress
21:38
21:40 Themeruta joined
NotFound_gf hi 21:41
purl hi, NotFound_gf.
dalek kudo: ab23221 | moritz++ | build/PARROT_REVISION:
bump PARROT_REVISION to get more testing on newer parrots
21:43
21:44 rockon joined
dalek m-dynpmcs: 057b7b6 | darbelo++ | t/gdbmhash.t:
Small patch by fperrad++ to cope with the newfound dynamic nature of the OS pmc.
21:51
darbelo Dammit, I keep forgetting to push my git repos back to gitorious after I commit. 21:52
22:49 lucian joined 23:11 TiMBuS joined
bacek ~~ 23:32
23:51 theory joined
Coke bacek: hio. waking up or going to sleep? 23:52
bacek Coke, warming up. Initial checks passed. 23:53
Coke, how is codestring branch going? 23:55