Perl 6 - the future is here, just unevenly distributed

IRC log for #parrot, 2013-11-23

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:12 Psyche^ joined #parrot
00:16 kid51 joined #parrot
00:20 rurban1 joined #parrot
01:20 rurban1 joined #parrot
02:00 FROGGS joined #parrot
02:21 rurban1 joined #parrot
02:44 nnunley_ joined #parrot
03:17 kid51_ joined #parrot
03:22 rurban1 joined #parrot
04:06 preflex_ joined #parrot
04:23 rurban1 joined #parrot
04:53 rurban1 joined #parrot
05:06 benabik joined #parrot
05:35 jsut joined #parrot
05:36 jsut_ joined #parrot
06:52 nnunley joined #parrot
07:36 simcop2387 joined #parrot
08:14 particle joined #parrot
11:09 rurban1 joined #parrot
12:09 rurban1 joined #parrot
12:45 denisboyun joined #parrot
13:10 rurban1 joined #parrot
14:06 kid51 joined #parrot
14:11 rurban1 joined #parrot
14:11 Hunger joined #parrot
14:16 MikeFair joined #parrot
15:12 rurban1 joined #parrot
15:56 denis_boyun joined #parrot
16:12 rurban1 joined #parrot
16:59 rurban1 joined #parrot
17:50 nnunley joined #parrot
18:21 benabik joined #parrot
19:11 Mike-PerlRecruiter_ joined #parrot
19:29 timotimo joined #parrot
19:29 timotimo good day
19:30 timotimo i've noticed updating the line pos cache from nqp's HLL::Compiler is very slow on utf8 strings. i implemented a simple cache to re-use iterators when possible and got it faster by a factor of 2
19:30 sa1 left #parrot
19:30 timotimo the cache is in encoding_find_cclass (and i added it to encoding_find_notcclass for symmetry)
19:30 FROGGS timotimo: did you run parrot's test suite?
19:30 timotimo i should! is it just "make test"?
19:30 FROGGS think so
19:30 timotimo will do
19:34 timotimo it resulted in a pass, some TODOs were passing as well, but that's probably not my fault :)
19:34 timotimo i patched an older version of parrot, though
19:34 timotimo 5_9_0
19:34 timotimo i'll try to apply it to master now
19:34 FROGGS that is not sooo old
19:34 FROGGS but a pass is still nice, I think parrot's test suite covers pretty much :o)
19:36 timotimo larry was suggesting to actually put a cache for offsets into strings, but that's a more hairy change that i'd want to either run by the parrot devs first or have someone more experienced implement
19:37 timotimo i'm surprised i could only get it to be 2x faster, though. i expected the complexity to drop by one power
19:37 timotimo it's still like 10000x slower than if you have ucs4
19:38 timotimo but i won't be picky. 2x as fast is good.
19:38 timotimo shaves off 7 seconds from the whole rakudo build
19:40 timotimo so is the official way to get this in a pull request?
19:40 FROGGS just make one
19:40 timotimo will do.
19:41 FROGGS here is a travis build bot that will show success/failure
19:41 benabik It doesn't run PRs though.
19:42 timotimo aaw
19:43 timotimo https://github.com/parrot/parrot/pull/1027
20:00 FROGGS benabik: ohh, I might have mixed it up with #libuv
20:01 benabik Testing #1027 locally, will merge if successful.  Looks food at first glance
20:01 timotimo glad to hear :)
20:01 timotimo i wasn't sure if other people would agree that my use of static variables to cache that stuff is elegant
20:02 timotimo i'm not a thoroughly experienced C programmer
20:03 benabik That is kinda what static variables are for.
20:03 benabik Oh, wait...  Are String_iters GC'd?
20:03 benabik Because if they are, that's probably a GC bug waiting to happen.
20:04 timotimo that's a good question. i wouldn't know how to find it out :(
20:05 benabik Well, the static variable isn't allocated from the GC.  It's just a structure.  That's fine then.  :-)
20:06 benabik And if the string is GC'd, it shouldn't be passed in as an argument...
20:06 timotimo the only bad thing that could happen is when two strings happen to get the same memory address
20:06 benabik I suppose there's a non-zero chance that the original string gets GC'd and then a new string in the same location gets passed...
20:06 timotimo hehe.
20:07 timotimo but then the find_cclass would have to be started at a kinda late offset
20:07 timotimo and it couldn't have had a longer-than-128-bytes string in between
20:08 timotimo i could add a comment "if you happen to stumble over a cache false-positive here, contact Timo Paulssen for a sixpack of good beer at this address: ..."
20:08 benabik heh.
20:09 benabik Hm.  I dislike adding possible GC-related bugs.  They're nasty to hunt down.
20:10 timotimo yes. is there a field in the string that i could factor into the comparison?
20:10 timotimo except for the whole string itself
20:11 timotimo string length perhaps? how often is that going to coincide?
20:13 benabik Almost makes me wonder if we should cache an iterator on the string itself.
20:14 arnsholt I was about to suggest something like that
20:14 timotimo larry suggested something like that
20:14 timotimo it's only valuable for varying-width encodings ...
20:15 arnsholt Or even something like struct longstring { struct string common; ... } so that only long strings incur the storage overhead of the caches
20:15 benabik Probably faster to do it unconditionally than try to figure out what strings it's useful for.
20:15 benabik Hm.  maybe.  Strings are already kinda chubby.  three pointers, four integers.
20:15 timotimo we've got almost a month of time now :)
20:16 benabik whoop, 5 integers.
20:16 timotimo unshift_string() not implemented in class 'Hash'  -  is this something that's changed on parrot's end?
20:16 benabik Last commit with the string "unshift_string" is in 2011
20:17 timotimo huh.
20:17 arnsholt I don't think unshift is an operation that really makes sense on hashes
20:17 timotimo that's right. but this is in our stage0. how did that happen?
20:18 arnsholt Oh
20:18 timotimo er, huh. it seems like i'm doing something very wrong
20:19 timotimo yup, i was somehow using parts of the old parrot
20:19 timotimo yup, it was entirely my fault. never mind what i pasted.
20:25 benabik My $0.02 added as a comment on the PR.  Don't feel wholly comfortable committing it without someone else looking at/thinking about it.
20:25 MikeFair joined #parrot
20:28 timotimo yup, that's fair
20:29 timotimo i'll get some early sleep today i think
21:58 kid51 joined #parrot

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

Parrot | source cross referenced