Show enters and exits. Hide enters and exits.
| 15:26:41 | brixen | khaase: this regex/gsub/string bug exposed by redcloth3 is maddening |
| 15:26:55 | brixen | I can't get a repro outside of the test |
| 15:27:22 | khaase | you mean the xss thing? |
| 15:27:32 | khaase | that was exposed by redcloth3? |
| 15:27:38 | khaase | or something else? |
| 15:27:44 | brixen | no, this is in redmine |
| 15:27:58 | brixen | application_helper_test |
| 15:28:11 | brixen | the textile source is not being fully processed |
| 15:28:34 | brixen | and appears to be because text.gsub!(re) { |m| blah } is not matching |
| 15:28:43 | brixen | I'm still working on it |
| 15:29:14 | brixen | insane regexes in redcloth3 |
| 15:30:04 | khaase | yeah, i talked to edavis about upgrading to red cloth 4 |
| 15:30:38 | khaase | the thing is, they really have a lot of patches applied to the version shipped with redmine |
| 15:31:35 | brixen | yeah |
| 15:31:44 | brixen | that should have been a good indication of something ;) |
| 15:33:42 | khaase | huh. rvm issues again. |
| 15:34:21 | wayneeseguin | eh? |
| 15:34:54 | khaase | did an rvm install rbx-head and somehow removed rbx-head after that. i think it's my fault this time. |
| 15:35:09 | wayneeseguin | oh? |
| 15:36:57 | khaase | wayneeseguin: dunno, i do this: http://github.com/rkh/dotfiles/blob/master/bin/update#L83-87 |
| 15:37:15 | khaase | wayneeseguin: log says it went fine |
| 15:37:32 | khaase | installed again, works now. strange |
| 15:38:44 | khaase | brixen: 3f/1e for application_helper_test? |
| 15:40:48 | khaase | up and running now btw |
| 15:43:12 | brixen | yep |
| 16:02:33 | khaase | brixen: all tests pass on rbx for RELEASE_3_0_4 tag from redcloth |
| 16:07:29 | brixen | khaase: all tests in application_helper? |
| 16:08:04 | khaase | brixen: no, i'll try to port them, but all redcloth tests pass |
| 16:08:15 | brixen | ahh ok |
| 16:08:32 | brixen | well, there are 2 legit bugs exposed by application_helper tests |
| 16:08:40 | brixen | one I'm not sure how to fix yet |
| 16:08:57 | brixen | if you create a proc from a method, it needs the args splatted into the call to that proc |
| 16:09:08 | brixen | the other is exposed by redcloth3 |
| 16:09:24 | brixen | I'm trying to work through String#gsub! |
| 16:09:58 | brixen | it's not matching the 4th *x* instance in "\t<p>a H *umane* W *eb* T *ext* G *enerator*</p>\n" |
| 16:10:39 | brixen | really wish the debugger was working :( |
| 16:11:02 | brixen | but first, I need some fooooood :) |
| 16:13:21 | khaase | yeah, the missing debugger is really annoyinh |
| 16:13:26 | khaase | annoying |
| 16:13:41 | khaase | this keeps me from using rbx for regular development atm |
| 16:14:27 | khaase | what annoys me the most: it's damn easy to write a debugger for mri. |
| 16:20:01 | khaase | brixen: 17f/1e with clean redcloth application_helper tests (probably due to the missing patches) |
| 16:20:44 | brixen | ok |
| 16:20:56 | brixen | we have a debugger, it's just fallen behind the vm changes |
| 16:21:02 | brixen | especially with native threads |
| 16:21:23 | khaase | interesting thing is: i get 17f/0e with mri |
| 16:21:45 | brixen | what is the 1e? |
| 16:22:58 | khaase | est_syntax_highlight(ApplicationHelperTest): ArgumentError: method 'token': given 1, expected 2 |
| 16:23:18 | brixen | that is the method to_proc issue |
| 16:26:13 | khaase | oh, well, hmmm... proc { |a,b| a }.call [1,2] |
| 16:26:40 | khaase | isn't that like rather common? |
| 16:26:58 | khaase | for stuff like Hash#each |
| 16:27:36 | brixen | hash each splats the args |
| 16:28:16 | brixen | your code isn't right anyway |
| 16:28:19 | brixen | run that in mri |
| 16:29:26 | brixen | what's happening in redmine is: |
| 16:29:31 | brixen | coderay does tokens.each(&self) |
| 16:29:49 | brixen | where self defines to_proc as method(:token).to_proc |
| 16:30:01 | brixen | which in rbx pulls out the method and wraps it in a proc |
| 16:30:09 | brixen | eventually, #token is called |
| 16:30:27 | brixen | but it's a method, and the args are not splatted into that call |
| 16:31:00 | brixen | kernel/common/method.rb #call at 67 |
| 16:31:28 | brixen | so I think the to_proc from a method needs to set an attrib that this method will be called like a block |
| 16:36:49 | khaase | ah, ok. i got to go home now, but i'd like to at least write a spec for this, maybe even try to fix this later. |
| 16:38:35 | khaase | brixen: dunno, but seems doable. have to dig into the code more, but was planning to do that anyways. |
| 16:39:20 | brixen | khaase: ok |
| 16:40:47 | khaase | brixen: where does the hash splat happen? |
| 16:41:23 | brixen | khaase: here's a repro http://gist.github.com/382355 |
| 16:43:21 | brixen | khaase: it's not a splat per se, it's the way a block is called http://gist.github.com/382360 |
| 16:44:38 | khaase | ah, ok. |
| 16:46:14 | brixen | now, if only I had such a simple repro for this String#gsub! bug :( |
| 16:57:14 | khaase | really gotta run now... bbl |
| 17:45:01 | brixen | bingo, something to do with $KCODE == utf8 |
| 17:45:59 | khaase | the gsub issue? |
| 17:46:01 | khaase | cool |
| 17:46:11 | khaase | related to the xss issue? |
| 17:46:26 | khaase | wasn't that like an utf8 issue, too? |
| 17:47:52 | brixen | the xss issue is kcode related, yes |
| 17:49:55 | brixen | sweet! 1.9 has the issue too |
| 17:50:05 | brixen | when using utf-8 encoding in the file |
| 17:50:16 | brixen | so, this is onig |
| 17:51:54 | khaase | hmmm... so setting the encoding for the redcloth3.rb would fix it? |
| 17:52:06 | brixen | not at all |
| 17:52:34 | brixen | redmine (or something it uses) sets $KCODE == utf8 |
| 17:52:40 | brixen | rbx uses onig |
| 17:52:52 | brixen | when onig is set to utf8, it fails to match the full string |
| 17:52:58 | brixen | one sec... |
| 17:54:35 | brixen | http://gist.github.com/382450 |
| 18:06:48 | khaase | brixen: shouldn't the splatting be handled in Proc::Method? |
| 18:08:36 | dbussink | brixen: man, that regexp speaks "i had a problem, want to solve it with a regexp, now i have two problems" |
| 18:08:48 | khaase | brixen: that way i would not need to set an attrib |
| 18:09:16 | khaase | afk |
| 18:09:56 | brixen | khaase: kernel/common/proc.rb line 84-86 |
| 18:10:04 | brixen | it already splats the args |
| 18:10:42 | brixen | dbussink: so totally true |
| 18:11:50 | brixen | dbussink: if you've seen roberto's talk on LPEG, you can see why regexes are the cruelest joke played on computer programmers |
| 18:12:14 | brixen | (and why I need to get pegarus running asap) |
| 18:14:01 | dbussink | i think this is like the most complex regexp in our app: value.strip.gsub(/(\w+)/){|n| n.capitalize} |
| 18:14:06 | dbussink | that's doable :P |
| 18:15:30 | dbussink | brixen: i can read that even now :) |
| 18:16:44 | brixen | dbussink: indeed, that's doable :) |
| 18:19:38 | dbussink | brixen: is 07/22/2010 your deadline for pegasus? ;) |
| 18:23:02 | brixen | dbussink: heh, I guess that'd be yes |
| 18:43:34 | brixen | are there any utf8 gurus here? |
| 18:43:49 | BrianRice-work | hides |
| 18:43:50 | brixen | or anyone who knows if *< should be special in utf8 encoding? |
| 18:44:05 | brixen | BrianRice-work: hah, excellent |
| 18:45:01 | BrianRice-work | I have deliberately forgotten what I learned about it, so can't answer. |
| 18:45:36 | brixen | BrianRice-work: ok, thanks for nothin' then :) |
| 18:45:54 | BrianRice-work | any time ;) try #unicode |
| 18:46:26 | BrianRice-work | I mean, the easy answer is that no, there's no obvious reason why it would be special |
| 18:46:53 | brixen | ok, I didn't see any obvious reason it would be either |
| 18:46:54 | BrianRice-work | of course, * and < might not be the ansi characters... |
| 18:56:41 | brixen | khaase: http://redmine.ruby-lang.org/issues/show/3217 |
| 18:56:50 | brixen | khaase: I'm moving on for now |
| 19:02:48 | brixen | hm, indeed /u does make it match |
| 19:03:02 | brixen | but then what is *< then? |
| 19:03:50 | brixen | oh wait, I am wrong |
| 19:03:59 | brixen | the /u has no affect |
| 19:04:05 | brixen | I had modified my test string |
| 19:04:13 | brixen | * < matches, *< does not |
| 19:07:15 | khaase | brixen: yeah, i also informed edavis, as this is not a rbx issue |
| 19:45:05 | dbussink | brixen: is 1.9 / onig also vulnerable to that issue that jruby fixed? |
| 19:45:20 | dbussink | brixen: i can imagine it being so, since rbx and 1.9 both use onig |
| 20:03:56 | brixen | dbussink: no, 1.9 is not |
| 20:03:57 | brixen | xss.rb:6:in `<main>': invalid byte sequence in UTF-8 (ArgumentError) |
| 20:04:37 | brixen | when the encoding is not set to utf-8, it behaves as 1.8.7 does |
| 20:04:44 | dbussink | brixen: ah ok, what makes the difference there? guess string encodings there come to the rescue? |
| 20:04:56 | brixen | it would appear so, yes |
| 23:15:37 | seydar | how much snow did people get today? |
| 23:29:04 | brixen | seydar: no snow today, maybe tomorrow |
| 23:29:20 | seydar | i got an inch, but other kids in the school district got a foot |
| 23:29:35 | brixen | wow, did you have a big umbrella? |
| 23:31:07 | seydar | i wish. i just cried on the inside, wore my red hat and a wool sweater, and toughed it out as it was coming down |
| 23:32:06 | seydar | so do you guys use statistics a lot while testing? |
| 23:32:32 | seydar | zed shaw talks about how important statistics are, and i see his reasoning, but I just haven't had the occasion to do any actual statistics |
| 23:33:02 | brixen | hm, while testing... |
| 23:33:04 | brixen | not really |
| 23:33:11 | brixen | sometimes while looking at perf issues |
| 23:33:35 | brixen | my statistics knowledge is pretty rudimentary |
| 23:33:41 | brixen | zed would want to kill me |
| 23:33:44 | seydar | yeah, that's what i meant. performance stuff |
| 23:34:16 | brixen | on the other hand, I don't make stupid statistically incorrect arguments for which zed would want to kill me |
| 23:34:29 | seydar | interesting life choice. |
| 23:34:36 | brixen | indeed |
| 23:34:44 | seydar | do you ever feel that it would be good to use more statistics magic? |
| 23:34:50 | brixen | sure |
| 23:34:57 | brixen | like, whenever I play poker :) |
| 23:35:05 | brixen | (which is never) |
| 23:35:22 | brixen | seriously though, yes, I need to up my stats chops |
| 23:36:21 | brixen | speaking of perf, rbx is basically 4x mri on this test with the jit on http://gist.github.com/382883 |
| 23:36:30 | brixen | ~8x interp only |
| 23:36:55 | seydar | so it's faster interp only? |
| 23:37:01 | brixen | resetting the method cache and messing with the method tables appears to be pretty expensive |
| 23:37:13 | brixen | no, the jit is ~2x interp only |
| 23:37:18 | brixen | ~2x faster |
| 23:37:25 | brixen | ~8x MRI with no jit |
| 23:38:15 | seydar | so it's faster without jit? |
| 23:38:34 | brixen | um no :) |
| 23:38:35 | seydar | that would agree with your earlier statement on April 28, 2010 at 7:36PM |
| 23:38:46 | seydar | grrr i can't read these number i is confused |
| 23:39:02 | brixen | rbx with interp only is about 8x slower than MRI, with the jit on, it's about 4x slower |
| 23:39:14 | seydar | OOOOOH |
| 23:39:14 | brixen | so, the jit makes rbx about 2x faster than interp in this test |
| 23:39:19 | seydar | dur. |
| 23:39:23 | seydar | i'm still new to this world |
| 23:39:27 | brixen | hehe |
| 23:39:34 | seydar | i'm getting used to the idea that bigger times aren't better |
| 23:39:45 | brixen | ah yes |
| 23:39:48 | seydar | i was like "8x MRI fuck yeah that's twice as much as 4x" |
| 23:39:52 | brixen | bigger is not *always* better |
| 23:40:25 | brixen | yeah, I'm used to expressing "x times slower than MRI" with no velocity vector |
| 23:40:28 | brixen | just as a scalar |
| 23:40:35 | brixen | cus we're usually slower right now :( |
| 23:40:56 | brixen | but soon, my vector will switch, and by default 8x MRI will mean rbx is 8 times faster :) |
| 23:41:17 | brixen | then there will be beers all around for those in the US >21 |
| 23:41:20 | seydar | what're we waiting on for that switch to happen? |
| 23:41:36 | brixen | basically, better and better jit |
| 23:41:49 | seydar | anything in particular or just random fixings? |
| 23:42:17 | brixen | hm, lots of little work |
| 23:42:40 | brixen | I'm sure some algorithmic improvements of ruby code too |
| 23:43:22 | seydar | you know what would be scientifically 1337h4><? |
| 23:43:34 | seydar | documenting which algorithms are used in the files along with their runtimes |
| 23:43:35 | brixen | um, what? :) |
| 23:43:43 | brixen | hmm, interesting |
| 23:43:58 | seydar | if that were in the documentation people would ball hard in shiny cars |
| 23:44:26 | brixen | well, I'm using algorithm loosely here |
| 23:44:26 | seydar | i remember one day in the lab the guy next to me spent like 3 days trying to figure out what the implementation of some java class was |
| 23:44:48 | brixen | consider that the "add a method to a class operation" is something of an algorithm |
| 23:44:57 | brixen | but it's expressed across multiple methods |
| 23:45:00 | seydar | all algorithms have runtimes. they should be documented |
| 23:45:03 | brixen | see that gist for instance |
| 23:45:19 | brixen | do you mean "complexity" by runtimes? |
| 23:45:47 | seydar | yeah! |
| 23:45:59 | seydar | once again, i'm new to this plizace |
| 23:46:10 | brixen | sure, but consider that an "algorithm" might not be in one method in one file |
| 23:46:25 | brixen | the whole operation to add a method to a class requires multiple classes and methods |
| 23:46:36 | seydar | start small |
| 23:46:39 | seydar | work your way up |
| 23:46:40 | brixen | so, documenting the "operation of adding a method to a class" would be a bit involved |
| 23:46:45 | brixen | sure |
| 23:46:57 | seydar | it would be a nice summer job |
| 23:46:59 | brixen | I detect hints of a eager volunteer |
| 23:47:25 | seydar | ..... maybe.... |
| 23:47:34 | brixen | :) |
| 23:49:16 | seydar | well, i must flee now. i can has 3 essays and a poem to write by friday |
| 23:49:31 | brixen | get busy! |
| 23:49:47 | seydar | believe me, i would much rather be getting busy right now instead of doing hw |
| 23:50:26 | seydar | peace. one love. seydar out. |