Parrot 1.9.0 "Blue-fronted Amazon" released! | parrot.org | Priorities: Add deprecations for 2.0; test platforms; check with HLL implementors | Roadmap: icanhaz.com/parrotroadmap | Latest modified TT's: icanhaz.com/parrotbugs
Set by moderator on 5 January 2010.
00:00 Zak joined
chromatic ccan.ozlabs.org/info/hash.html 00:05
darbelo Can we suck public domain Code into parrot? 00:09
chromatic License-wise, yes. 00:11
darbelo The code looks too 32-bit centered to use directly on parrot, but it shouldn't be to hard to adapt. 00:14
00:16 zak_ joined 00:46 darbelo joined 00:48 djc joined, darbelo left, darbelo joined 00:50 zak__ joined
Tene cognominal: the PIR generated is probably not in the right HLL 01:04
is my first guess, without additional information. 01:05
01:05 plobsing joined
cognominal I will go back reading docs tomorrow. Right now I am trhowing stuff at a wall and expect that it sticks. Clearly not the way to do it. 01:14
I just need to load the parrot runtime. apparently load_language 'perl6' is not enough 01:24
load_library, load_language, load_bytecode... :) 01:26
01:36 tetragon joined
cotto_work What about the Artistic License precludes distribution of BSD-licensed code as part of Parrot? 01:47
chromatic I can't think of anything. 01:48
In general, Allison doesn't like it though.
cotto_work That sounds consistent with my experience. 01:49
chromatic Provided the copyright is clear on the source code and the license for that file is obvious, I know of no legal issues. 01:50
cotto_work I was thinking about the object system you posted yesterday, but that could be pretty easily reimplemented (if it turns out to be beneficial) and it's likely that much of the original code would be significantly modified anyway.
01:55 zak__ joined 02:00 joeri joined 02:11 cotto joined 02:13 Zak joined
cognominal chromatic, what tools are you using to debug, profile parrot? 02:17
have you thought abour blogging about that? 02:18
chromatic I thought I did somewhere. Usually I use callgrind and KCachegrind. 02:19
cognominal ho, I found www.oreillynet.com/onlamp/blog/2007...grind.html 02:20
chromatic That may be a bit out of date, but it's a place to start. 02:21
cotto ohai 02:25
cognominal, if you want to profile pir code, you can use the profiling runcore by passing -Rprofiling to parrot. See docs/dev/profiling.pod for more info. 02:26
02:38 Zak joined 02:56 Maddingue joined 03:09 ilbot2 joined
moderator Parrot 1.9.0 "Blue-fronted Amazon" released! | parrot.org | Priorities: Add deprecations for 2.0; test platforms; check with HLL implementors | Roadmap: icanhaz.com/parrotroadmap | Latest modified TT's: icanhaz.com/parrotbugs
04:04 cognominal joined 04:34 japhb joined 06:53 theory joined 07:07 nopaste joined 07:14 jsut joined 08:26 iblechbot joined 08:29 chromatic joined 08:38 fperrad joined 09:40 bacek joined
bacek chromatic, murmurhash.googlepages.com/ 10:01
o hai, btw 10:03
chromatic 52 instructions; that's nice. 10:08
bacek chromatic, indeed :) 10:11
chromatic How much work is necessary to investigate this?
bacek replacing current hashing function will take couple of hours 10:13
chromatic I don't see C source code here though.
bacek testing... depends what we want from testing perspective
chromatic I'd settle for "Passes all tests". 10:14
Then we can benchmark.
bacek chromatic, check MurmurHash2.cpp. It's actually C code
chromatic You're right. 10:16
bacek Is UINTVAL platform specific? 10:19
like 64 bits on amd64
chromatic I think there's a configure check for it.
bacek Bah... It's at least 64 bits on x86 10:21
chromatic #define UINTVAL long long ? 10:22
bacek unsigned long
10:28 amuck joined
nopaste "bacek" at 110.175.160.247 pasted "32-bits MurmurHash2 in Parrot" (71 lines) at nopaste.snit.ch/19242 10:33
ttbot Parrot trunk/ r43412 i386-linux-thread-multi make error tt.ro.vutbr.cz/file/cmdout/180849.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ )
bacek chromatic, check nopaste.snit.ch/19242 - quick and dirty murmurhash2 10:34
there is no hash benchmark in parrot so far...
chromatic A lot of the benchmarks that aren't purely numeric spend a lot of time in hashes. 10:36
Anything objecty will.
The comment about four bytes at a time looks misleading; it looks like one byte at a time thanks to string iterators. 10:38
bacek chromatic, it is 10:39
but I don't have time to properly implement it...
And string iterator actually returns 4 bytes. 10:40
chromatic I'm trying to convince myself that it's worth using the string iterator rather than treating the buffer contents as raw bytes.
I'm not succeeding.
dalek rrot: r43412 | fperrad++ | trunk/README_win32.pod:
[win32] update some versions & links
bacek chromatic, it worth it. We have to generate same hashvalues for strings in different encodings. 10:42
It actually my code :)
(make test passed with murmur hash) 10:44
chromatic When we compare strings for equality though, we compare encodings.
bacek chromatic, TT#24 10:48
chromatic Oh, right. Ugh. 10:50
Canonical internal fixed-width string encoding, anyone?
bacek ucs2? 10:55
purl ucs2 is crippled also
chromatic That's my inclination. 10:56
bacek I tried to convince other devs to switch to single internal representation of strings. Failed. Epically. 11:03
chromatic Let's see if the NFG approach to strings helps.
bacek It's stalled for more than a year... 11:04
mikehh If we incorporate the Unicode standard you need a 20bit (32bit?) representation for each character - all other encodings require multiples for some characters 11:08
chromatic I *think* we have to use NFG to make Rakudo work correctly, but I don't know that for certain. 11:09
mikehh NFG? 11:10
purl hmmm... NFG is No Fscking Good! or grapheme normalization form (see docs/pdds/draft/pdd28_character_sets.pod)
mikehh I think I prefer the first purl :-}
12:26 bacek joined 13:11 Zak joined 13:14 barney joined 13:28 Zak joined 13:32 mikehh joined 14:08 davidfetter joined 14:14 zak_ joined 14:35 zak__ joined 14:38 Psyche^ joined 14:46 cconstantine joined
cconstantine hi? 14:48
purl leave me alone, willya!
14:51 zak_ joined 15:01 Psyche^ joined 15:12 zak__ joined 15:17 Zak joined 15:22 zak_ joined 15:30 KatrinaTheLamia joined 15:35 bacek joined 15:59 Psyche^ joined
cconstantine ok, dumb question: How do I check if a PMC is null? 16:13
16:14 plobsing joined
plobsing hello #parrot 16:19
cotto cconstantine, in PMC_IS_NULL() 16:21
cconstantine .local pmc var; PMC_IS_NULL(var) 16:22
?
plobsing $I0 = isnull $P0 # IIRC 16:25
cconstantine ah 16:26
cotto PMC_IS_NULL is fo C 16:27
*for
cconstantine plobsing: that works, thanks :)
16:33 zak_ joined 16:37 zak__ joined 16:47 stocks29 joined 16:51 stocks29 left 16:53 zak_ joined 17:17 amuck joined
cconstantine is it possible to have a string in NQP and convert it to a number? (eg "34" as a number) 17:22
eh, nevermind 17:23
17:29 zak__ joined 17:33 ZeroForce joined 17:52 zak__ joined 18:04 Zak joined 18:12 Zak joined 18:20 tetragon joined 18:30 payload joined 18:37 nopaste joined 19:03 payload joined, jhelwig joined
cconstantine I'm getting the following error: 'PAST::Compiler can't compile node of type cons' Is there anyway to tell PAST::Compiler how to compile a 'cons' type? 19:26
I'm guessing "You don't" 19:43
19:49 jhelwig joined 19:58 jhelwig joined 20:13 payload joined
Tene cconstantine: +"34" 20:15
cconstantine that's WAY too easy :) 20:16
Tene same with ~ for str and ? for bool
cconstantine: add a 'as_post' method, iirc 20:17
cconstantine ah 20:18
20:18 cotto joined
cconstantine not quite what I was looking for, but I don't think I was asking for what I wanted 20:18
Tene wait, no, that's probably a lie.
oooooooookay, so what do you want, then?
cconstantine 'cons' -> PAST 20:19
I got it I think
Tene (turns out the answer is to add another multi 'as_post' method to PAST::Compiler
)
cconstantine that makes sense 20:20
how would you go about creating a multimethod in NQP? 20:21
Tene You don't.
cconstantine :(
Tene alternate answer: 20:22
You first add support for multis to nqp, and then you do it exactly the same way you'd do it in P6
cconstantine hehe
I do do the multi dispatch in pir and call-back to nqp
21:08 ZeroForce joined 21:23 payload joined 21:31 hercynium joined 21:52 tetragon joined 22:21 patspam joined
dalek rrot: r43413 | bacek++ | trunk (2 files):
Expose Parrot_pcc_do_run_ops.
22:23
ttbot Parrot trunk/ r43413 i386-linux-thread-multi make error tt.ro.vutbr.cz/file/cmdout/180921.txt ( tt.ro.vutbr.cz//buildstatus/pr-Parrot/rp-trunk/ ) 22:32
22:33 mikehh joined
dalek rrot: r43414 | bacek++ | trunk/src/ops (2 files):
Detach RetContinuation from current CallContext in tailcall. Closes TT#1393.
22:39
22:56 payload joined
cconstantine stacktraces on errors in pir/nqp would be really useful 23:13
23:33 lucian joined
cconstantine I have it! Reason now parses first to a cons tree then a PAST! :) 23:49
Tene cconstantine: if you check out github.com/tene/steme/ you can find that I wrote a parser that compiles s-exps into matching rules that match s-exps. 23:52
It's part of my macros implementation. 23:53
Not sure what you're working on, but sounds like it might be of interest.
cconstantine very muc
h 23:54
it looks like you're using all kinds of features of pct i haven't seen documented
Tene Maybe... I have trouble keeping track of what's documented and what isn't.
cconstantine I don't have trouble :( 23:55
I just only know about what's documented
Tene anything specific that's used there that you want to ask me about?
cconstantine let me study a bit 23:56
github.com/tene/steme/blob/master/s...mar.pg#L31
Tene That declares 'special' to be a protoregex. It's kind of like multiple dispatch for subs. 23:57
cconstantine what is a protoregex?
purl i guess a protoregex is like a rule or a token, except it can be overloaded dynamically (per the book)
Tene That's a Perl 6 thing, not special to PCT. It's probably talked about in S05. 23:58
cconstantine S05?
purl see dev.perl.org/perl6/doc/design/syn/S05.html or dev.perl.org/perl6/doc/design/syn/S05.html or perlcabal.org/syn/S05.html
Tene cconstantine: look at the special:sym<...> stuff.
protoregex lets another rule just say <symbol>, but it will match whichever of the alternates actually matches.