Parrot 2.6.0 | parrot.org Log: irclog.perlgeek.de/parrot/today | Nopaste: nopaste.snit.ch:8001 | merge html_cleanup (talk to Coke), merge gc_* branches, fix/replace/optimize hashing
Set by moderator on 10 August 2010.
dalek rrot: r48392 | chromatic++ | trunk/src/hash.c:
[hash] Switched hash mark to linear bucket scan.

Patch courtesy Luben Karavelov <luben@...>
00:00
rrot: r48393 | chromatic++ | trunk (2 files):
[opsc] Coalesced expensive allocation for op info.

calls to calloc(). This improves Parrot startup by 4.3%.
whiteknight purl msg Chandon I get a segfault in the gsoc_threads branch building nqp-setting.pbc during "make all" Is this a known issue? "make corevm" works just peachy and I get a handful of test failures (segfaults mostly) in expected places in "make coretest 00:07
purl Message for chandon stored.
whiteknight purl msg Chandon t/pmc/filehandle.t (test 9), t/pmc/nci.t (19 and 20), t/pmc/stringhandle.t (11), t/src/extend.t (18) and t/src/threads_io.t (tests out of sequence). Are these the same errors you see on your machine? 00:09
purl Message for chandon stored.
whiteknight Tene: ping 00:11
Austin Moo. Multi-methods are failing... 00:13
whiteknight Austin: did Tene's "our method" patch for nqp make it into Parrot trunk yet? 00:15
Austin as far as i can tell, yes.
whiteknight w00t. So I can use my normal commands instead of using the second nqp binary I have floating around 00:16
Austin: what do you think are the odds that kakapo today is capable of running the unittests for PLA? 00:19
!!!: Core dump building parrot-nqp 00:20
00:20 Paul_the_Greek joined
Austin Well, if you can't build parrot-nqp, then I'll say 0% 00:20
whiteknight heh, great 00:21
Austin Whiteknight: Beyond that, I seem to recall that PLA is basically a bunch of PMCs, and the tests are invocations of those pmc objects. If that's the case, your chances are pretty good
whiteknight Austin: I don't use too much kakapo functionality. Mostly just the unit test suite stuff 00:22
Austin You should be okay, then.
Try the current gitorious master, let me know what you get. 00:23
whiteknight how does one use GDB on a command which takes input from a pipe? 00:25
Austin What do you call cheese that belongs to someone else?
whiteknight Parrot on my machine is dumping core at the command "./parrot_nci_thunk_gen --dynext --no-warn-dups --output=src/extra_nci_thunks.c <src/nci/extra_thunks.nci", but when I pass that to "gdb --args", it treats that pipe as input to gdb
nacho cheese
Austin Heh. 00:26
I got nothing on the gdb question. Sorry.
I think you do gdb foo, then do run < redirect
Telling gdb to set up the input file 00:27
Yeah, that looks right 00:28
gdb parrot-nci-thunk-gen
run < src/nci/extra_thunks.nci
whiteknight Austin++ 00:32
cotto ~~
whiteknight purl msg chromatic I'm getting a coredump during the build as of r48393. Core dumps in Parrot_exit doing hop_deinit stuff in the runcore, which looks (without digging too deeply) like what you touched in r48393. 00:33
purl Message for chromatic stored.
whiteknight (core dump)--
chromatic 64-bit Linux? 00:34
Austin msg pmichaud I think this is a bug: in nqp, saying multi method foo($x, :$named) produces a multi sig like [_, _, _], with a slot allocated for the named arg. But I don't think they count for dispatch purposes, so there's a mmd failure. 00:35
purl Message for pmichaud stored. 00:36
dukeleto Austin: how goes it?
Austin duke: Still paying the kakapo upgrade taxes. :( You?
whiteknight chromatic: yessir 00:37
chromatic: want coredump or backtrace or anything? I gots what you need 00:38
ttbot Parrot trunk/ r48394 i386-linux-thread-multi make error tt.taptinder.org/file/cmdout/365519.txt ( tt.taptinder.org//buildstatus/pr-Pa.../rp-trunk/ ) 00:39
chromatic Backtrace would be nice.
nopaste "whiteknight" at 192.168.1.3 pasted "the whole shebang for chromatic++" (165 lines) at nopaste.snit.ch/22682 00:40
whiteknight I doubt that will be super helpful for you, since by the time the memory panic happens the corruption has long since finished 00:41
but, there it is
00:41 kid51 joined
kid51 purl, kakapo? 00:42
purl rumour has it kakapo is a program framework, runtime library, and collection of useful functions for NQP programs. or See code.google.com/p/kakapo-parrot/ for documentation and issue tracking, or gitorious.org/kakapo for source code
00:42 lucian joined
chromatic No idea, whiteknight. 00:43
Oh, wait. I have an idea.
whiteknight I'm going to try out r48392 to see if 48393 was the problem 00:44
chromatic It is, I see it now.
dukeleto Austin: this and that, trying to find time to hack on PL/Parrot and thinking about removing the open/close opcodes, since they are on the deprecation chopping block now 00:45
Austin You mean open/close for PLParrot, or parrot in general? 00:46
whiteknight parrot in general
Austin Cool.
May I say how truly worthless dynamic opcodes are, from my perspective? 00:47
dukeleto Austin: do they cause you pain or are they just worthless?
Austin Both
nopaste "chromatic" at 192.168.1.3 pasted "whitenight: fix hop deinitialization" (40 lines) at nopaste.snit.ch/22683 00:48
Austin Leaving aside the whole dynop renumbering issue, I haven't found much of anything that is supposed to be a dynop that a (dyn)pmc method couldn't do. 00:49
dalek rrot: r48394 | NotFound++ | trunk/src/pmc/hash.pmc:
add a cast to make c++ happy
00:50
Austin In particular, opening and closing files 00:51
chromatic The lack of class methods might make this amusing.
dukeleto I guess this begs the question: Which use cases are dynamic opcodes the best solution ? 00:52
Austin Which, fwiw, puts a PMC object in the path of the operation, something I think the PL/Parrot security guys would really like.
use cases: I have no idea. The only thing I could think of where dynops make sense is c functions that are expected to be called a whole lot. 00:53
dalek TT #1736 created by Austin++: NQP-rx generates wrong multi signature for :named params 00:54
TT #1736: trac.parrot.org/parrot/ticket/1736
Austin But that argues that the expected parrot performance difference between opcode and pcc call is (enormous), which I'm not sure is true. 00:55
chromatic I am. 00:57
Austin expected or actual?
chromatic Actual. 00:58
Austin What about pmc nci methods? Where do they fit on the performance spectrum?
chromatic They're even worse than PIR methods. 00:59
Austin (dukeleto: This is away from the point, of course. Only in some test case somewhere are 'open' and 'close' going to be the performance drivers...)
chromatic: So if I define some integer pmc knock-off, and create an "increment" method in C, and then code up a "pir_increment" method in PIR and inject it into the Proxy, you're saying that the PIR increment will run faster then the C version, when we loop it a squillion times? 01:02
dukeleto Austin: yeah, most reasonable algorithms need to only open/close a constant number of files, or perhaps O(N) files 01:03
Austin: and i don't think the performance difference is more than a few percent
Austin duke: Yeah. So +inf from me on getting rid of file io dyn ops. Put 'em in a pmc someplace, where i can hope to load them from NQP. 01:04
chromatic Austin, exactly... and I expect the performance difference is more than a few percent.
Austin chromatic: Then shouldn't we be making it a priority to rewrite as much C as possible into PIR? 01:05
chromatic That's Lorito. 01:06
Austin Well, no. It isn't.
chromatic That's what I had in mind when I proposed Lorito. 01:07
Austin Sure.
01:11 plobsing joined
whiteknight chromatic: that patch doesn't apply 01:12
chromatic Well that's strange.
whiteknight oh shit, nevermind 01:13
I'm on the wrong revision
Austin Aww, dammit. slurpies are hosed, too.
Is there a Perl6 way to mark the end of multidispatch parameters? 01:15
sorear ;; instead of , in the arg list
atrodo chromatic> (the c vs. pir shootout) that'd be an interesting benchmark to see
Austin One semi, or two?
chromatic atrodo, it should be easy to write. 01:16
Austin sorear: Like this? 7 multi method foo( $a, $b ; $c ) or like this: 7 multi method foo( $a, $b ;; $c ) 01:17
sorear the latter
purl the latter is better
Austin Thanks 01:18
Yeah.
Guess what NQPrx doesn't support yet.
:(
whiteknight chromatic: no dice. still get a core dump (though at a different point in the build) 01:19
Austin sorear++ # thanks for the info
seen tene? 01:20
purl tene was last seen on #parrot 2 days, 4 hours, 4 minutes and 38 seconds ago, saying: That doesn't sound too difficult to fix, either. [Aug 8 21:15:31 2010]
Tene seen Austin?
purl Austin was last seen on #parrot 7 seconds ago, saying: seen tene?
Austin You feel like making some more nqp-rx grammar changes?
Tene That one sounds less-trivial. Lemme look. 01:21
Austin Tene: There's two. First, the solution to tt#1736 - stop emitting multi signature stuff for non-positionals.
01:22 Coke joined
Austin The second would be implementing ;; in the grammar, which looks like it wouldn't be too terribly hard, but would require a bunch of background coding to verify correct context, etc. 01:22
chromatic whiteknight, the problem should be fairly obvious. It's bog-standard C memory management. 01:23
Austin Also, should nqp bugs be submitted to trac.parrot, or to github, or what?
sorear github
whiteknight chromatic: I'm not really digging into it myself right now 01:25
actually...I'm out of time for the night. I'll stare at it tomorrow if it's still an issue 01:27
Coke bugs for which now? 01:28
Austin Coke: bugs found in nqp(-rx) 01:29
Tene Austin: Those both look pretty easy, actually.
Austin Tene: I didn't want to qualify the second one as easy. The first looks like <1hr.
Tene Austin: the second is easier than the first, actually. 01:30
Austin orly?
purl YA RLY.
Tene Yeah.
Austin I look forward to reading your diffs.
:) 01:31
Tene For the second, I just need to collect both before and after a ;;, and only push the first into the multi list.
Austin And fail if there's no 'multi' keyword?
Tene For the first, I need to actually inspect each item to find out if it's positional or named.
Well, failing on invalid code isn't what you asked for; you only asked for succeeding on valid code. ;) 01:33
Austin :)
Generator.
purl rumour has it generator is easy that way - you only need to run it on 1 machine or www.python.org/dev/peps/pep-0255/ or a portable MegaDrive/Genesis emulator or at www.squish.net/generator/
Austin Right.
Got it.
Tene but failing on non-multi shouldn't be hard. 01:34
Austin I realized that $*MULTINESS or whatever it's called makes that easy.
You put it in the grammar.
"Straight to the Jack. Perl6 wins again." 01:35
Tene It's not entirely clear how to check that in the grammar, though.
sorear { die unless $*MULTINESS eq 'multi' } 01:36
Austin Signature looks like [ <parameter> ** ',' ]
Tene Yeah, I wasn't certain if nqp grammars supported that.
Austin But it could look like [...] [<?{ $*MULTINESS eq 'multi'}> ';;' [...] ]? 01:37
01:37 rurban_ joined
Tene Yeah, pretty much 01:37
store the parameters in the second half under a different name
<post=.parameter> 01:38
and then handle both halves in the signature action method
dalek rrot: r48395 | plobsing++ | branches/dynop_mapping/t/native_pbc (7 files):
native_pbc platform updates
01:40
chromatic Hm, now I need to remake my core ops. 01:45
Austin chromatic: Some while ago (months, at least) you posted a link to a guy writing about his home-built VM's performance under gcc vs microsoft c. Do you still have that guys link? 01:49
chromatic Wow... not sure.
Austin I was wondering if that was someone you follow, or something you stumbled on 01:50
chromatic Must be something I stumbled on. I don't remember it.
Austin Google wins. abepralle.wordpress.com/2009/01/25/...threading/ 01:51
plobsing hi #parrot 02:08
dalek rrot: r48396 | chromatic++ | trunk (2 files):
[opsc] Fixed some of the damage of r48393.
02:13
rrot: r48397 | plobsing++ | branches/dynop_mapping/t/examples/pir.t:
skip make_hello_pbc. Packfile PMCs currently cannot generate PBC.
plobsing C++ question: how do I initialize static structs to be mutually-referential? 02:19
(gcc is complaining that my predeclaration is invalid in C++) 02:20
Austin Struct x; OtherStruct y = { ... &x ; ...}; Struct x = {... &y; ... }
Nopaste?
purl it has been said that Nopaste is nopaste.snit.ch (works with the script in $_PARROT/tools/dev/nopaste.pl) or paste.scsys.co.uk or www.extpaste.com or gist.github.com or App::Nopaste or codepeek.com/paste/ or (: pastebot)
nopaste "plobsing" at 192.168.1.3 pasted "bit_ops static struct example" (2075 lines) at nopaste.snit.ch/22684 02:23
plobsing Austin: I know of the predeclaration pattern. But apparently you can't do it with static vars in C++. 02:26
Austin Yeah, static symbols don't reserve memory 02:27
plobsing so then how do I do it?
Austin Maybe remove the 'static' on the first decl 02:30
dalek rrot: r48398 | jkeenan++ | trunk/src/pmc/threadinterpreter.pmc:
Insert POD 'item' so that documentor will know where to add function documentation.
rrot: r48399 | jkeenan++ | trunk (2 files):
[codingstd] Reformat POD so that file passes pmc_docs.t.
plobsing I can't get it to agree to compile the file unless I completely eliminate the static on the surrounding defns and extern the predecl. 02:32
Austin Whoa.
YOu need more C++ mojo than I have.
02:40 jsut joined
plobsing any tips on where I could borrow such mojo? 02:41
cotto NotFound likes C++
Austin There you go.
atrodo hmmmm. karma C 02:42
purl c has karma of 8760
nopaste "plobsing" at 192.168.1.3 pasted "toy C++ problem" (19 lines) at nopaste.snit.ch/22686
02:43 dafrito joined
plobsing seen NotFound? 02:44
purl NotFound was last seen on purl 5 hours, 2 minutes and 12 seconds ago, saying: <private message>
dalek rrot: r48400 | jkeenan++ | trunk/src/pmc/sub.pmc:
[codingstd] Insert POD 'item' so that documentor will know where to add function documentation.
02:46
rrot: r48401 | jkeenan++ | trunk/src/pmc/sub.pmc:
[codingstd] Typographic cleanup only.
rrot: r48402 | jkeenan++ | trunk (2 files):
[codingstd] Convert inline comment to POD so that file passes pmc_docs.t.
plobsing msg NotFound (C++ question) how do I get the equivalent of nopaste.snit.ch/22686 in legal C++? 02:47
purl Message for notfound stored.
02:48 janus joined 02:57 dafrito joined
kid51 must sleep 03:03
purl Sleep is for the weak.
dalek rrot: r48403 | jkeenan++ | trunk/src/pmc/coroutine.pmc:
[codingstd] Insert POD 'item' so that documentor will know where to add function documentation.
rrot: r48404 | jkeenan++ | trunk/src/pmc/coroutine.pmc:
[codingstd] Typographic cleanup only.
rrot: r48405 | jkeenan++ | trunk/src/pmc/fixedintegerarray.pmc:
[codingstd] Insert POD 'item' so that documentor will know where to add function documentation.
rrot: r48406 | jkeenan++ | trunk (2 files):
[codingstd] Convert inline comment to POD so that file passes pmc_docs.t.
kid51 purl, See, I can commit even when I'm asleep. Can you do that? 03:04
purl kid51: no idea
03:17 hercynium joined 03:19 davidfetter joined 03:33 Chandon joined
dalek rrot: r48407 | plobsing++ | branches/dynop_mapping (2 files):
workaround mutually-referencing static var C++ issue
03:36
03:39 chromatic joined 03:40 LoganLK joined
dalek rrot: r48408 | plobsing++ | branches/dynop_mapping/src (2 files):
make headerizer
03:53
04:08 bubaflub joined
dalek rrot: r48409 | plobsing++ | branches/dynop_mapping/src (4 files):
C++-ify
04:26
plobsing can someone on something other than x86_64/linux/gcc to test the dynop_mapping branch? 04:53
04:53 jsut_ joined
tcurtis svn cos it. 04:54
plobsing: Should I make corevm; make coretest and only then try other tests? Or is "Perl Configure.pl && make fulltest" sufficient? 04:56
plobsing I was thinking fulltest, but I haven't tried corevm in a while.
plobsing goes off and tests
tcurtis I'll do that, as well, then. 04:58
dalek rrot: r48410 | plobsing++ | failed to fetch changeset:
sync with trunk
05:00
rrot: r48411 | plobsing++ | branches/dynop_mapping/src/pmc/role.pmc:
[codetest] trailing space
tcurtis coretest passes.
plobsing tcurtis: what's your arch/os/cc ? 05:06
tcurtis plobsing: i386/darwin/gcc 05:08
plobsing different arch, different os. I've tested w/ g++. If fulltest passes for you, I think I'm good to merge. 05:09
tcurtis plobsing: fulltest passes for me. 05:16
plobsing tcurtis++
It's merge o'clock!
tcurtis plobsing++ 05:17
chromatic Hm, is there value to making public-ish POD documentation for static functions? 05:41
cotto you mean the internal kind that we like to change and possibly delete without deprecation notices? 05:43
plobsing The same can be asked about functions not explicitly marked PARROT_EXPORT or equivalent
05:43 bubaflub joined
chromatic Exactly. 05:44
cotto -1 05:49
purl -1
cotto purl--
purl cotto: excuse me?
cotto I said purl--
At least -1 for requiring it. 05:50
chromatic Requiring documentation of static functions seems useful.
dalek rrot: r48412 | plobsing++ | failed to fetch changeset:
merge dynop_mapping branch
chromatic Requiring *POD* documentation of static functions seems less so.
cotto wheee
POD seems like overkill for something in that state of potential flux
chromatic I don't care about that as much as I think that POD is documentation external to the file. 05:52
05:56 uniejo joined 06:16 Austin joined 06:17 AndyA joined
sorear plobsing++ 06:23
dalek rrot: r48413 | plobsing++ | trunk (8 files):
bump PBC_COMPAT and native PBC updates
plobsing sorear: it was *your* idea
dalek TT #1663 closed by plobsing++: Mixture of dyn opcodes 06:30
TT #1663: trac.parrot.org/parrot/ticket/1663
Austin Ah. NQP-rx is leaving the nest. Time to remove some kakapo syntax... 06:31
Austin sniffs.
plobsing nqp-rx was in the nest?
sorear nqp-rx left a while ago 06:33
nqp was in the nest; it left and was renamed at the same time
Austin Says you, who doesn't have to code in it. 06:34
Finally redo() and next() and last() can stop being global functions and start being keywords...
But I've still got super()
06:42 fperrad joined
cotto Goodie. I was all ready to hack on the github plugin and managed to bung up my Trac install. 07:01
Yay for opaque failures in languages and APIs I don't fully understand.
and it works after nuking anything trac-related in /usr/local/lib/python2.6/dist-packages/ 07:08
fun
07:10 Casan joined
dalek rrot: r48414 | mikehh++ | trunk/src/pmc/role.pmc:
fix codetest failure - trailing spaces
07:13
mikehh All tests PASS (pre/post-config, make corevm/make coretest, test, fulltest) at r48414 - Ubuntu 10.04 amd64 (g++ with --optimize) 07:34
07:39 TiMBuS joined
dalek rrot: r48415 | chromatic++ | trunk (2 files):
[opsc] Made hop_init() walk the op list only once.
08:21
rrot: r48416 | chromatic++ | trunk/src/gc (3 files):
[GC] Removed the non-lazy allocator.
08:28 mj41_ joined 08:30 mj41__ joined 08:31 mj41___ joined 08:38 ttbot joined
mikehh rakudo (fcf4f36) builds on parrot r48414 - make test PASS, make stresstest (pugs r31947) FAIL - Ubuntu 10.04 amd64 (g++ with --optimize) 08:42
t/spec/S03-smartmatch/any-bool.t - No subtests run
t/spec/S05-match/capturing-contexts.rakudo - TODO passed: 24
08:48 AndyA joined 08:53 lucian joined 09:39 rurban_ joined
dalek nxed: r586 | NotFound++ | trunk/winxedst (2 files):
'using static' statement, Issue 2, plobsing++
09:43
bacek aloha, humans 09:44
dalek nxed: r587 | NotFound++ | trunk/winxedst1.winxed:
use 'using static' in stage 1 compiler to improve parsing speed
10:02
10:47 Paul_the_Greek joined
Paul_the_Greek purl,messages 10:47
10:50 robin-gvx joined
dalek nxed: r588 | NotFound++ | trunk/winxedst1.winxed:
use more constructors in stage 1
11:24
11:27 [1]Casan joined 12:00 whiteknight joined 12:03 bacek joined 12:04 aloha joined
whiteknight good morning, #parrot 12:21
atrodo Morning 12:51
whiteknight hello atrodo, how are you today? 12:52
atrodo Doing great, how about you?
whiteknight doing pretty well myself 12:53
atrodo Excellent
particle would someone here be gracious enough to nominate me for re-election to the pafo board? 12:54
Austin I don't know, particle. What have you done for me this year? 12:56
whiteknight do you think you are worthy of such an honor? We don't let just any guy from off the street onto the board
Austin Cocaine? Strippers? Booze?
no, no, no.
whiteknight BOOZE?
purl BOOZE is, like, closer than you think
particle i'm happy to see that the degree of parrot's success hasn't changed the level of grace of it's community members :P 12:57
12:58 robin-gvx joined
whiteknight did my email last night nominating duke make it through? 12:59
I'll happily send more such emails for more deserving recipients if so 13:00
Austin Hmm.. there's a joke there, but I'm too tired to make it.
We should nominate bacek. 13:01
He can force a bunch of meetings in Oz, which ought to be good for something.
particle aye, duke has been nominated, your message made it 13:02
whiteknight w00t 13:03
particle: nominated. 13:04
Has the function Parrot_str_append changed recently? or disappeared? 13:14
Coke whiteknight: I think it's now str_concat 13:19
whiteknight Coke: thanks. I think I'm just going to rewrite all this garbage to use the fancy new StringBuilder instead
Austin Immutable stirings
whiteknight which are almost like immutable strings
13:20 ruoso joined
dalek kudo: a9912e1 | moritz++ | src/Perl6/Actions.pm:
bind $/ in m// calls, by advise from pmichaud++
13:25
kudo: 656170d | moritz++ | src/Perl6/Actions.pm:
disable non-working modifiders on m// for now
kudo: a389b27 | moritz++ | t/spectest.data:
run ignorecase.t and ii.t test files
13:26 Paul_the_Greek joined
Paul_the_Greek Morning, folks. 13:26
Are core ops added without concern for binary compatibility of opcodes?
13:27 bluescreen joined
Coke I'm not sure what you mean by binary compatibility of opcodes. 13:28
do mean, "of pbcs?"
Paul_the_Greek If I add an opcode, do I need to worry about the fact that all the opcode numbers will change? 13:34
In core.ops, it says that the opcode numbers can't change.
dalek rrot: r48417 | NotFound++ | trunk/t/dynoplibs/deprecated.t:
test clearp
13:35
Paul_the_Greek But in other modules they are just in alphabetical order. 13:36
NotFound Paul_the_Greek: usually new opcodes are added to experimental, in that case you don't need to worry.
Coke if you add an opcode, you break pbc compatibility anyway.
so the fact that the numbers might change isn't much worse than what you've already done. at least not today. 13:37
Paul_the_Greek So I should add round() to experimental. Then it's ultimately migrated into math.ops?
Coke eventually, we'll add them at the end of the list, instead of in order.
Paul_the_Greek Okay, experimental it is.
Coke is round() going to be builtin or dynamic? 13:38
Paul_the_Greek It is builtin, since so are floor and ceil.
I was going to add trunc, but I guess there is no point since that's what $I0 = $N0 does.
particle our bytecode version changes with every release 13:39
and we don't guarantee bytecode compat across parrot versions yet
Paul_the_Greek Although that behavior should be explicitly documented.
Do you think it's reasonable to guarantee that assignment does a truncate? The other option is to leave it undefined. 13:40
particle undefined is not an option, we need to guarantee similar behavior on all platforms 13:41
document I0 = N0 as a truncate. 13:42
Paul_the_Greek But we could say that the float is converted to an integer in an undefined manner.
particle yes, we could repeat the mistakes of c.
let's make new mistakes.
Paul_the_Greek I'm not sure it would be a mistake. You provide the four float->integer conversion operations, but leave assignment undefined. 13:44
After all, the truncation is simply part of the C definition.
Coke Paul_the_Greek: then why would I ever use assignment?
Paul_the_Greek You wouldn't; instead, you would be explicit in how you wanted to do the conversion.
particle undefined operations are security holes
Paul_the_Greek But I don't want to get religious about this. Truncation is fine. 13:45
Truncation is the obvious conversion, too.
Should we also have an explicit truncate operation?
particle i think so, for consistency and completeness
Paul_the_Greek Okay, then I will document assignment as doing truncation, and add truncate and round. 13:46
Thanks, folks.
Coke honestly, if assignment is defined as doing truncation, I would imagine we could get rid of the actual assign opcode variant and have the pir compiler translate I=N to trunc I, N 13:47
s/honestly, //
Paul_the_Greek Yes, we could do that. 13:48
moritz is assigning to an $I or $N register any different than the 'set' opcode? 13:49
13:53 bubaflub joined 13:54 robin-gvx joined 14:03 bluescreen joined
Coke moritz: I'm not sure which opcode imcc compiles that to. either set or assign. 14:04
(set)
moritz wonders what assign does 14:05
Coke error:imcc:The opcode 'assign_i_n' (assign<2>) was not found. Check the type and
nothing, apparently. =-)
Please do not mistake my confusion about set and assign with parrot's.
moritz right; parrot has its own confusion 14:06
Coke I did try to phrase that carefully. 14:09
whiteknight Austin: ping 14:22
Coke Any other parrot members want to get NOM'd for the board? 14:23
whiteknight what's the list of current nominations?
moritz NOM'd sounds painful :-) 14:24
whiteknight are all the interested current board members re-nominated?
moritz and what does the board do, actually?
atrodo NOM NOM NOM
purl I eat your head!
14:24 krunen joined
Coke current list: particle, whiteknight, dukeleto. particle has not accepted or trolled on list. 14:25
whiteknight purl msg Austin: answered my question, the PLA tests don't run with Kakapo head. Nqp::compile_file fails with error "Contextual $*FileSystem not found". I'll take a look at it myself today but probably won't have a lot of time till I get home 14:26
purl Message for austin stored.
Coke moritz: the biggest responsibilities are handling what little $$ there is and making sure elections happen. =-)
moritz Coke: ok. I'm not interested then.
Coke see parrot.org for the official docs that outline rights/responsibilities.
whiteknight Coke: particle trolled for a nom here on IRC :)
I think we really need to pursue new avenues of funding this year 14:27
Coke whiteknight: Yes. I would love to have someone on the board who has experience doing that.
or at least a bonus # of tuits.
whiteknight: there is only one current board member nominated, fwiw. 14:28
14:32 Andy joined
Coke Andy, you wanna run for the pafo board? 14:32
Andy Awwww hell naw. 14:39
What good would that be?
14:39 davidfetter joined
Andy Plus, I think it should be a requirement that members of the board know the language in question. 14:40
dalek kudo: 21b3c7c | moritz++ | t/spectest.data:
run another test file
14:42
kudo: 43f00da | moritz++ | src/core/Cool-str.pm:
type-constraint samecase() pattern to Cool
14:43
Coke Andy: ... which language? perl6? tcl? python? =-) 14:52
14:53 TiMBuS joined
dalek rrot-linear-algebra: 444238a | Whiteknight++ | src/pmc/ (5 files):
Parrot_str_append is gone now, so replace all string maing logic with
15:45
kudo: a47c455 | moritz++ | src/builtins/Cursor.pir:
[Match] return itemized arrays for quantified positional captures
15:52
particle whiteknight: happy birthday! 16:00
purl for (('to you', 'dear '.shift)[0,0,1,0]) { print "Happy birthday $_" }
whiteknight particle: thanks! 16:01
particle mine was yesterday, infinoid's is today, pmichaud's is friday, and coke's is saturday 16:02
whiteknight oh right, I forgot that Infinoid was all stealin' my thunder
happy birthday, everybody! 16:05
atrodo wow, how does that happen? 16:11
davidfetter well, about nine months before, when a man and a woman feel close to each other... 16:16
that's the usual way. these days, there are others
16:33 theory joined 16:40 cognominal joined 16:51 chromatic joined 16:54 pudge joined, dafrito joined 16:55 pudge left
cotto_work ~~ 16:59
Paul_the_Greek It's whiteknight's birthday? 17:18
purl,messages
Happy birthday! 17:19
purl for (('to you', 'dear '.shift)[0,0,1,0]) { print "Happy birthday $_" }
Paul_the_Greek Are the internals Opcodes documents the only documentation of the operations? 17:20
dalek nxed: r589 | NotFound++ | trunk/winxedst1.winxed:
some more constructor usages in stage 1 compiler
17:21
cotto_work which file are you asking about? the inline POD in src/ops/*.ops?
Paul_the_Greek No, these: docs.parrot.org/parrot/latest/html/ops.html 17:22
cotto_work same thing
that's generated from the inline POD 17:23
Paul_the_Greek Oh, right, of course.
If I want to add some information about an operation, I should add it to the inline POD.
cotto_work yes 17:24
Paul_the_Greek Also, perhaps, to the PIR book.
The PIR book has some semantics, but not all of it.
cotto_work the inline POD should be the priority but it's not a bad idea to update the book too 17:25
Paul_the_Greek Easy to do both.
dalek kudo: 6b318ea | (Patrick Abi Salloum)++ | src/core/operators.pm:
removed a bunch of hopefully unneeded code
17:26
cotto_work Heh. "hopefully unneeded" 17:27
Paul_the_Greek But there is no other user-level description of the operations, right?
atrodo That instills a lot of confidence, doesn't it?
cotto_work There could be but the .ops file is always the first place I look.
PerlJam cotto_work: I think the ... operator was a little over specified in the code, so what was removed probably was unneeded. 17:28
Coke Paul_the_Greek: definitive guide for ops docs should be in the .ops files, yes. 17:32
for docs about /the individual ops/
17:38 rurban_ joined 17:40 dafrito joined
dalek nxed: r590 | NotFound++ | trunk/winxedst1.winxed:
delete return statements from constructors in stage 1 compiler
17:55
17:58 theory joined
Paul_the_Greek What is the proper procedure in SVN for removing a file from the status list once that patch has been committed? 18:13
bubaflub Paul_the_Greek: i'm not exactly sure what you mean
Paul_the_Greek When I do an svn status, I see a long list of every file I've changed.
One of those files is now patched and committed, so I'd like it to disappear from the list.
cotto_work if the patch has been committed and you've run svn up, svn should figure out that the change has been applied both locally and remotely and dtrt 18:14
dalek nxed: r591 | NotFound++ | trunk/winxedst (2 files):
avoid overwriting constructor arg when is reused as new's result
Paul_the_Greek update! Thanks. I have the Subversion book ready to take with me to the beach. 18:15
It says that it skipped the file. 18:16
18:16 pyrimidine joined
bubaflub Paul_the_Greek: that means it worked, i believe 18:18
Paul_the_Greek Surely you jest ... hang on ... 18:19
Coke if you want to just throw out your local changes (assuming that everything was checked in on your behalf), you can run 'svn revert file.c' - that says "dump my changes, revert to the last copy I updated to" 18:20
Paul_the_Greek I want to keep the changes, but get it out of the status list. 18:21
cotto_work or svn revert -R . to clobber all local changes
Oh. You want git-svn then, which might be a bit much if you're learning svn. 18:22
Coke Paul_the_Greek: you can't do that.
if you have local changes, they are going to show up in the status.
Paul_the_Greek Then what stops the status list from growing forever?
Coke Paul_the_Greek: You're doing it wrong. =-)
cotto_work getting stuff committed
Coke basically, yes.
Paul_the_Greek Okay, so I have a file committed. If I update, then my copy should match the latest committed copy and svn status shouldn't list it. 18:23
Coke that diff is the diff between what you have in your working copy, and the repository as it existed at whatever version you checked out/updated to.
cotto_work correct
Coke Paul_the_Greek: yes.
Paul_the_Greek Okay, so let me try an update ...
Coke if it was not an exact application of your patch, you might end up with a conflict or a meaningless diff that you can get rid of with teh revert command (be sure to specify a file)
Paul_the_Greek Yup, it insists on 'skipped'. 18:24
Perhaps I need to specify a revision number?
cotto_work svn up will grab whatever's most recent
you can specify a revision if you don't want that 18:25
Paul_the_Greek I tried another file and it was also skipped. 18:27
Wouldn't it be nice if it said why?
cotto_work and they still show up in svn st? 18:30
Paul_the_Greek Oh ho! I removed the 'svn.parrot.../trunk' and it worked. 18:31
Oh yes, now we're cooking.
cotto_work you only need to specify that when you do the initial checkout
but you seem to have found that out 18:32
Paul_the_Greek Indeed I have.
And revert works if I want to dump my change. 18:33
This is lovely.
Thanks again, folks.
cotto_work I find it interesting that you've already run into one of svn's limitations. 18:34
Paul_the_Greek After three days I had made two unrelated sets of changes. 18:35
I quickly realized that the svn status list was going to be confusing.
Coke I tend to have multiple checkouts when doing unrelated things in svn. 18:36
Paul_the_Greek Here's a related question: I've checked in another patch, the first of two for the same ticket.
PerlJam tends to use git-svn :)
Paul_the_Greek If I put a comment on the ticket that says that the first patch can go in any time, is that the right way to indicate that it's unrelated to the second patch? 18:37
atrodo tends to avoid svn and cvs at all costs
Paul_the_Greek Subversion is not getting the mad props here.
PerlJam atrodo: really? at *all* costs?
cotto_work karma svn
purl svn has karma of -62
cotto_work there you go
karma cvs
purl cvs has karma of -49
cotto_work karma git 18:38
purl git has karma of 310
Paul_the_Greek Okay, so when are we converting?
bubaflub Paul_the_Greek: i use git at work, and use separate checkouts of git-svn and svn for Parrot
atrodo PerlJam> As much as I can. Sadly, we use cvs for our primary product at work :(
Paul_the_Greek Is git-svn a git front end for svn or an svn front end for git?
bubaflub atrodo: that is sad. i had to use cvs for this year's GSoC for the first time
PerlJam atrodo: so ... at all costs except for finding a new job? :)
Coke Paul_the_Greek: the former. 18:39
purl the former is a Key and the latter is a STRING
bubaflub Paul_the_Greek: it allows you use to checkout a SVN repo but with some git features like easy branching
Coke so if you want to pretend it's git locally but use an svn backing store...
cotto_work I need to make the github plugin for trac smart enough to map between svn revision numbers and git hashes and convince myself and others that the code is stable.
atrodo PerlJam> Nope, Just waiting for the day when we do convert to git. I was able to convert the office to git, so it's only a matter of time
Paul_the_Greek Got it. I'll have to look into it. Can I just switch to it without any troubles?
cotto_work (I was going to roll my own but the github plugin does most of what I need already.) 18:40
Paul_the_Greek: trac.parrot.org/parrot/wiki/git-svn-tutorial
18:41 AndyA joined
Paul_the_Greek Am I right in thinking that this is out-of-date: docs.parrot.org/parrot/latest/html/...c.pod.html 19:32
chromatic Probably so.
Paul_the_Greek Another documentation job for me. 19:33
I'm thinking I'll have job security for awhile.
The cool thing about these small ticket jobs is that I can learn pieces of the system without breaking anything too badly. 19:34
cotto_work The nice thing about breaking things badly is that you don't forget what you learn. 19:39
Paul_the_Greek Well, I've broken make bootstrap-ops, so I'm about to learn something. 19:40
atrodo Or forget the humiliation
purl atrodo, I didn't have anything matching humiliation
cotto_work yes you are
Paul_the_Greek A pir file is including a nonexistent pasm file. So I must have to make some other thing first. 19:41
cotto_work If needed, you can revert src/ops/core_ops.c and include/parrot/oplib/core_ops.h to get a buildable parrot from which you can bootstrap the ops 19:42
which one?
Paul_the_Greek ext/nqp-rx/src/stage0/Regex-s0.pir is attempting to include cclass.pasm. 19:43
cotto_work you need to have a fully built parrot before you can run bootstrap-ops
that file should be generated as part of the build
Paul_the_Greek I did a make clean; does that delete it?
19:44 tcurtis joined
cotto_work "it"? 19:44
purl i heard "it" was mssql, microsoft_sql_server, or sybase?
Paul_the_Greek cclass.pasm
cotto_work I think that'll be clobbered by clean 19:45
Paul_the_Greek I'll do a full make, then the bootstrap-ops.
cotto_work yup
Paul_the_Greek If I then add an op, is bootstrap-ops sufficient get it into the system? 19:46
cotto_work The reason it's goofy like that is to avoid circular dependencies.
dynop or core?
Paul_the_Greek The word "bootstrap" implies perhaps there's a second step.
Core.
cotto_work yes
make && make bootstrap-ops should do it
19:47 [1]Casan joined
Paul_the_Greek bootstrap-ops failed. 19:47
Oh, I added something to ops.skip that is not being built. I wonder if that's it. Let me clean that out. 19:48
luben good day
purl every day above ground is a good day or I love the smell of napalm in the morning. It's the smell of victory.
cotto_work hio luben
cotto_work wonders if we could somehow use an installed parrot to get around the bootstrap-ops issues 19:49
luben I have sent to the mailing list a patch for moving the checks for constant hashes in corresponding PMCs 19:50
GeJ Bonjour everyone. 19:54
luben This is good for encapulation and code locality because hash datastructure does not have to know who is using it
Paul_the_Greek Okay, did a make and all is well. 19:55
Then I added some ops to math.ops and did a make bootstrap-ops. 19:56
Get an error in runtine/parrot/library/PGE.pbc: Error -1073741819 19:57
cotto_work Paul_the_Greek: can you nopaste your diff?
Paul_the_Greek Hang on...
purl i heard Hang on... was also
Paul_the_Greek Nopaste is something I need to install, right? 19:59
cotto_work nopaste?
purl it has been said that nopaste is nopaste.snit.ch (works with the script in $_PARROT/tools/dev/nopaste.pl) or paste.scsys.co.uk or www.extpaste.com or gist.github.com or App::Nopaste or codepeek.com/paste/ or (: pastebot)
chromatic It's a website.
Paul_the_Greek I'll have to get that tonight.
cotto_work the script may require some Perl modules to function
Paul_the_Greek Is it okay to dump it in here? 20:00
cotto_work can you use the nopaste web interface?
nopaste.snit.ch/
Paul_the_Greek Fascinating ...
atrodo So what's the differance between nopaste on port 80 and port 8001? 20:01
nopaste "Paul_the_Greek" at 192.168.1.3 pasted "Diff" (36 lines) at nopaste.snit.ch/22700
Paul_the_Greek Okay, that's just too cool.
cotto_work If you like to see more text, you can run ./ops2c --core directly 20:02
seems to work fine for me so far 20:03
Paul_the_Greek What works fine?
cotto_work nm. The build seems to be lta about pbc compat, which would be a concern when adding or removing ops. 20:04
Paul_the_Greek 1ta? 20:05
cotto_work lta?
purl hmmm... lta is less than adequate, see also acronyms.thefreedictionary.com/LTA or "Less Than Awesome" in Rakudo world :)
Paul_the_Greek Thank you, purl.
Coke cotto_work: I don't want to have to rely on an installed parrot to develop parrot.
cotto_work make bootstrap-ops && make clean && make should work
Paul_the_Greek PGE.pbc got rebuilt just like the rest of pir files. 20:06
It was just bootstrap-ops that failed.
Coke \\o/ Got over work hurdle #4 of several thousand.
Paul_the_Greek You're on your way, Coke.
cotto_work However, we're generally trying to reduce the number of core ops. Why do you want to add more? 20:07
Paul_the_Greek We talked yesterday and decided that we should have ceil, floor, round, and truncate. There's a ticket for round.
20:08 Coke joined
PerlJam round? 20:08
purl rumour has it round is great because you don't hit it with my thumb while you're typing
PerlJam What rounding semantics?
Paul_the_Greek Round toward nearest integer; .5 rounds away from zero.
chromatic luben, your patch improves Rakudo startup by 1.293% 20:09
cotto_work luben++
luben :) great
Coke luben++
(is he in credits?)
luben it makes checks only when it need
not for all hashes
PerlJam Paul_the_Greek: why not evens up, odds down on .5 ? (that's what IEEE recommends IIRC) 20:10
Coke PerlJam: ew.
PerlJam (or something like that. maybe it's evens down, odds up)
Paul_the_Greek Yes, that's to distribute probabilities better.
I'm just using C's round(), but we could get fancier. 20:11
Or we could decide not to add round.
PerlJam C implementations haven't been known for consistency in semantics
Paul_the_Greek Something for the HLL to deal with.
PerlJam (look at how many implementations think of % as "modulus" and how many think of it as "remainder") 20:12
Paul_the_Greek We could simply state that .5 rounding is arbitrary.
Don't get me started about %.
chromatic made fill_params a lot more expensive though
Paul_the_Greek Are we tending to think that the HLL should worry about round? 20:13
luben chromatic, my patch?
PerlJam Paul_the_Greek: round is something that's always struck me as fiddly. Different people have different expectations for whatever reason, so it's best to either leave it out or say "we follow the XXX standard" (IMHO and that's all I have to say about the matter :)
cotto_work is this idea of any use: rusty.ozlabs.org/?p=89 (using the bottom few bits of a pointer to store a few bits of the hash value, allowing faster failure in some cases) 20:15
chromatic yes, luben
Not sure why.
luben I also. I have moved the checks in hash.pmc and dynlexpad.pmc 20:16
may be because now I check for const PMC key
chromatic It may just be moving things around. 20:17
Paul_the_Greek Should we do the world a favor and implement round .5 to even? Or forget round? Opinions?
Tene my inclination is to leave rounding out of the parrot base. 20:18
let HLLs add a round function if they want one.
chromatic I'll apply your patch now luben. I'd like to reduce the duplication in the exception checks in Hash though.
Coke as an HLL author, I have no need of a round opcode. 20:19
and if I did, it's dead simple to make a dynamic one.
Paul_the_Greek Do you provide it in the HLL, Coke?
Coke www.tcl.tk/man/tcl8.5/TclCmd/mathfunc.htm#M29 - it's a function, so i have to make it a .sub anyway. 20:20
Paul_the_Greek Languages without all four rounding functions bother me, but maybe that's just me.
Oh, you have it. Excellent. :D 20:21
Coke (tcl has round, entier, ceil, and floor functions)
Paul_the_Greek entier is truncate? 20:22
Okay, so let's abandon the round operator. I'll skip truncate, too, then, since assignment is defined as truncating.
We can always change our minds later. 20:23
cotto_work We've certainly done so in the past.
luben chromatic, does fill_params use in some manner hash PMC?
chromatic Checking. 20:25
luben I am making now a version that not checks PMC keys (the old behaviour)
chromatic get_params uses the CallContext PMC (which contains a hash) and uses a Hash PMC. 20:26
Sorry, fill_params.
Coke msg Andy - there certainly does not seem to be any discussion of perl in #perl. 20:27
purl Message for andy stored.
Andy Not that I could see, no. 20:28
I was also not inspired by the /topic of SCREW PROFESSIONALISM.
luben ok, posting to the mailing list a patch with the old behavour
dalek rrot: r48418 | chromatic++ | trunk (5 files):
[hash] Moved hash constant checks to Hash PMCs.

size savings. Patch courtesy Luben Karavelov.
20:32
rrot: r48419 | chromatic++ | trunk/src/hash.c:
[hash] Added another STRING hashing optimization.
Paul_the_Greek Okay, next opinions: We have cosine. Should we add cotangent and cosecant? 20:35
cotto_work Many of our math ops are something of a leftover from when the Parrot developers were less selective about what they added to Parrot. 20:37
Such functions are best left in a dynop lib
Paul_the_Greek All six basic trig functions seems reasonable, though. 20:38
Oh yes, they would be dynops.
We have every trig function except those two, it appears. 20:39
I suspect they weren't implemented because there are no C functions for them.
Ah, there are others for which there are no C functions. 20:40
I proclaim that we should add the missing two, since we have the rest. 20:41
20:45 jdv79 left
Austin seen tcurtis? 20:45
purl tcurtis was last seen on purl 1 hours, 1 minutes and 6 seconds ago, saying: <private message>
tcurtis Austin: hi. 20:46
Austin Hey. I don't know if you've already got this (probably), but 7 assign $P0, "string" ; set S0, $P0 seems like a good optimization candidate. 20:47
*$S0
It comes out whenever I call a pir:: opcode function that has a 's' signature parameter. 20:49
tcurtis Austin: I'll look into that.
dalek rrot: r48420 | chromatic++ | trunk/src/pmc/callcontext.pmc:
[PMC] Reduced PMC autoboxing in CallContext.

by a modest amount.
Austin Good enough. I don't know if your stuff is at the right level, but it's sitting on the screen bugging me right now, so I thought I'd share the aggravation... 20:50
tcurtis I suspect that would probably need to be done at the POST level, which I'm not very familiar with, or in PAST::Compiler, but I'll look and see if I can come up with a way of optimizing that away. 20:54
Paul_the_Greek I gotta say, being able to add tests to a .t file and then just run it with prove is quite nice. 20:58
cotto_work definitely one of the good things we inherited from the Perl community 20:59
Austin Tcurtis: I don't know if it helps, but the whole thing falls in the category of "put a literal string in the code, and eventually pass at literal string in an S register to an op" 21:02
But NQP is processing it as "make a String pmc, set the value from this literal, convert the PMC to an Sreg, pass the Sreg"
luben Does IMCC use garbage collected memory? 21:07
chromatic Sometimes. 21:10
21:12 wagle joined
luben aha, I see. I was wondering what was the need for parrot_chash_destroy functions that are used by imcc 21:13
chromatic That's the "sometimes not" part of the answer.
luben yes :)
sorear "prime hash sizes are just better" seems to be a pretty widely held beleif 21:15
NotFound sorear: many books says that hashing is an art, which usually means "we copy what other do without understanding it" }:) 21:17
21:20 whiteknight joined
dalek rrot: r48421 | NotFound++ | trunk/src/hash.c:
ugly cast to make c++ happy without too much changes
21:22
21:24 mj41 joined
PerlJam goes with whatever Knuth says about hashing :) 21:26
Austin whiteknight: got your message. I've got the t/ tests passing (not recursive, just t/) and amd starting on t/Parrot right now (including Nqp) 21:28
I think I'll skip Multisub, though
Paul_the_Greek Power-of-2 hash table sizes are bad if the hashing function is bad. 21:31
chromatic I have the impression our hashing function is bad. 21:34
Paul_the_Greek Imagine lots of things hashed to xxx101 and the hash table size was 8.
I think it's a black art.
chromatic Maybe we should annotate our hashes and run Rakudo to see how many collisions and the hash size and the bucket length.
Paul_the_Greek Using a prime size fixed that problem. 21:35
Or save a list of hash values and run a distribution test.
sorear today's crazy idea: I wonder what effect hash-consing our strings would have 21:36
atrodo chromatic> that hasn't been done yet?
whiteknight atrodo: not in years, if it has ever been done 21:37
Austin ping whiteknight
whiteknight pong Austin
Austin Ah, there you are.
chromatic I'm running Rakudo with annotations now. 21:38
Austin This $*FileSystem thing - something is wrong. You should definitely have it defined.
Paul_the_Greek What is hash-consing? 21:41
whiteknight Austin: yeah, I haven't had any chance to track this down yet 21:43
I don't think I am using kakapo's Program thingy, if that makes any difference 21:44
Austin It doesn't - this should be taken care of by the :load code when you bring the library on board.
nopaste "chromatic" at 192.168.1.3 pasted "Hash annotation code" (54 lines) at nopaste.snit.ch/22703 21:45
21:45 perlite joined, bubaflub joined
whiteknight Austin: I'm going to try it again soonish. I think chromatic++ fixed my build errors from last night so I can get rolling on that project again 21:46
Austin woot
whiteknight ...and it appears he did. chromatic++
Austin Man, sometimes fortune-telling is just too easy. 21:48
Russian man jailed for assaulting fortune teller who predicted he would go to jail
www.thaindian.com/newsportal/odd-ne...09679.html
chromatic In return, whiteknight gets to work on performance improvements in Parrot proper!
21:49 darbelo joined
whiteknight chromatic: As soon as I get PLA working again, that's what I plan to do 21:49
unfortunately, I've had to spend all my available tuits getting Kakapo and now PLA working after the recent upheavals
sorear Paul_the_Greek: Hash consing is when you keep a weak-ref hash table of all immutable objects in the system, keyed by their constants 21:56
pioneered on some lisp variant with immutable cons cells
but if we used it, it would be on strings
Paul_the_Greek Aha. 21:57
chromatic For fast interning? 21:58
darbelo Didn't bacek try that already in a branch?
chromatic Sort of yes and no. 21:59
darbelo My recollection is vague, but I think it ended up not being enough of an improvement to merge back. 22:03
or being not an improvement.
chromatic Instead of using a hash for the constant string cache, we tried an AVL tree. 22:09
darbelo Oh, right. The avl_string_cache branch. 22:11
It's still in svn.
sorear The point of the constant string cache was smaller packfiles and faster loading using less memory 22:22
string hash consing, aka forced interning, would mostly benefit iseq_i_s_s and string-keyed hash tables 22:23
luben chromatic, I made a quick test, rewrote a hash_expand to not depend on power of 2 table size
sorear PCT uses quite a few of the latter
luben it is a performance hit, but not severe (from 660ms to 680ms on parrot startup) 22:24
I could work on all other places that depend on power of 2 rule 22:25
to see if we can regain this loss
22:25 jsut_ joined
luben when using prime numbers as table size 22:26
cotto_work if nothing else, encapsulating that assumption is a good idea
luben it is encapsulated in hash data structure 22:27
chromatic www.perl.com/pub/2010/08/people-of-...ngton.html 22:49
darbelo Oh, new perl.org, I had missed that. 22:51
cotto_work com is the new org?
luben chromatic, I have done the test: changing "key & mask" to "key % size" is a performance hit - from 680ms to 760 on rakudo startup 22:54
further, I have made version with resize vector with numbers 22:55
prime numbers
purl prime numbers are 2, 3, 5, 7, 11, etc. or at mathworld.wolfram.com/PrimeNumber.html or approximate a logarithmic spiral at www.maths.ex.ac.uk/~mwatkins/zeta/c...spiral.htm
luben yes
I am using in the test these numberspastebin.com/2UtsLmWp 22:56
pastebin.com/2UtsLmWp
but there is no gain 22:57
chromatic Do you know if it's resizing or key comparisons that gets more expensive?
luben key comparison 22:58
but it is done in resizing too
thats because '&' is now '%'
it seems to be more expensive 22:59
chromatic It's hard to believe that's some 10% more expensive.
sorear luben: how about (key * 0x9e3779b9ul) & mask? 23:00
luben when testing with resize vector, rakudo startup time goes from 760 to 780 (because lookup the exact prime number on resizing)
sorear er. >> (32 - hashbits) 23:01
luben sorear, please explain 23:02
"key * some_number" will make colisions more common 23:03
sorear 0x9e3779b9 is 0.32 fixed point of a random irrational number (specifically the golden ratio, which has only 2s in its continued fraction expansion) 23:05
chromatic In theory then, every bit acts as a binary sieve?
sorear scaling hash values by that will cause hash values like 0, 5, 10, ... to become equidistributed modulo 2^k 23:06
What's a binary sieve?
chromatic Half of keys have 0 for a given bit and half of keys have 1 for a given bit. 23:07
whiteknight Austin: where is $*FileSystem defined?
Austin Program.nqp
luben sorear, the actual formula we use is more complicated: (key ^ seed) & mask 23:08
Austin my $instance := FileSystem.instance
and the next line
purl END OF LINE.
sorear luben: uhh. that is hilariously broken.
(key ^ seed) & mask == (key & mask) ^ seed 23:09
so the seed doesn't actually do anything at all to prevent hash collisions
I hope there's more to it than that
luben no, there isn't
whiteknight Austin: that line sets $FileSystem, not $*FileSystem 23:10
Austin Welcome to Perl6
luben this is used for comparing pointers, int and pmc keys 23:11
Austin $*Foo means "$Foo in some caller context, or <something something something>"
sorear $*Foo means (my $*Foo) in some caller context, or $PROCESS::Foo
or $Foo in the root namespace 23:12
Coke wonders how to do $P0['thing'; 1] in NQP. 23:13
Austin Coke: Using kakapo?
luben ops, (key ^ seed) is used only on keys and pointers. on pmc we delegate to vtable
Coke Austin: I have the nqp-setting. 23:14
nopaste "Austin" at 192.168.1.3 pasted "for whiteknight++: Foo" (35 lines) at nopaste.snit.ch/22704
Austin Coke: Sucks to be you.
You can do $var{$key} in nqp. 23:15
You just need to generate a key like [thing;1]
Which requires some PIR.
(A *lot* of pir, actually.)
23:16 jsut joined
Austin Coke, have a look at gitorious.org/kakapo/kakapo/blobs/m...nqp#line35 23:17
Alternatively, if you're just trying to do, say, get-caller, then go ahead and hard code the key in an inline pir block 23:18
Coke Austin: yup, not worth it when I can do one line of Q:PIR.
Hopefully something like that will make it into the nqp-setting.
Austin Dude, kakapo *is* the nqp setting. 23:19
Coke Austin: ... no, there's an nqp-setting. 23:21
it landed while you were away.
Austin Whiteknight: Anyway, either you say "my $*FileSystem := x" in your code somewhere, or the Program sets root global [ 'parrot'; '$FileSystem' ] to point to whatever. And NQP finds it.
Coke: Yeah, I saw that. nqp setting is "a runtime library for nqp". and kakapo is "a runtime library for nqp". Aside from the standard project NIH, I'm not sure why we needed two. 23:22
Coke github.com/perl6/nqp-rx/tree/master/src/setting/
I can't answer that, but in the absence of a good package handler for parrot modules, having it /in parrot/ is most helpful. 23:23
cotto_work My take was that we wanted something lighter than Kakapo. 23:26
Austin Ahh. Like kakapo_base.pir
:)
What's the story on the setting library. Does it get automatically loaded, or what? 23:27
23:28 kid51 joined
cotto_work no. It has to be loaded manually. 23:28
more minimal than kakapo_base 23:31
afaict it's a bunch of stuff that'd end up getting rewritten anyway in projects using nqp 23:32
23:46 _dolmen_ joined 23:49 ruoso joined 23:52 tcurtis joined 23:53 dngor_ joined
whiteknight Austin: another question hich should be obvious: does NQP use an HLL? That is, does "pir:set_hll_global__vSP" in NQP set $FileSystem in the root namespace or in a local HLL namespace? 23:57
Austin 'parrot'
purl 'parrot' is a valid make target
Coke points at #1737 for chromatic. 23:58
Austin If you want to do anything involving a *_root_* opcode, use [ 'parrot'; ...]
23:59 workbench joined
whiteknight Austin: The reason I ask is this: If I replace $*FileSystem in Nqp.compile_file() to be "FileSystem.instance" instead, PLA's test suite runs 23:59
with "$*FileSystem", I get the contextual not found error