Index

Show enters and exits. Hide enters and exits.

15:26:41brixenkhaase: this regex/gsub/string bug exposed by redcloth3 is maddening
15:26:55brixenI can't get a repro outside of the test
15:27:22khaaseyou mean the xss thing?
15:27:32khaasethat was exposed by redcloth3?
15:27:38khaaseor something else?
15:27:44brixenno, this is in redmine
15:27:58brixenapplication_helper_test
15:28:11brixenthe textile source is not being fully processed
15:28:34brixenand appears to be because text.gsub!(re) { |m| blah } is not matching
15:28:43brixenI'm still working on it
15:29:14brixeninsane regexes in redcloth3
15:30:04khaaseyeah, i talked to edavis about upgrading to red cloth 4
15:30:38khaasethe thing is, they really have a lot of patches applied to the version shipped with redmine
15:31:35brixenyeah
15:31:44brixenthat should have been a good indication of something ;)
15:33:42khaasehuh. rvm issues again.
15:34:21wayneeseguineh?
15:34:54khaasedid an rvm install rbx-head and somehow removed rbx-head after that. i think it's my fault this time.
15:35:09wayneeseguinoh?
15:36:57khaasewayneeseguin: dunno, i do this: http://github.com/rkh/dotfiles/blob/master/bin/update#L83-87
15:37:15khaasewayneeseguin: log says it went fine
15:37:32khaaseinstalled again, works now. strange
15:38:44khaasebrixen: 3f/1e for application_helper_test?
15:40:48khaaseup and running now btw
15:43:12brixenyep
16:02:33khaasebrixen: all tests pass on rbx for RELEASE_3_0_4 tag from redcloth
16:07:29brixenkhaase: all tests in application_helper?
16:08:04khaasebrixen: no, i'll try to port them, but all redcloth tests pass
16:08:15brixenahh ok
16:08:32brixenwell, there are 2 legit bugs exposed by application_helper tests
16:08:40brixenone I'm not sure how to fix yet
16:08:57brixenif you create a proc from a method, it needs the args splatted into the call to that proc
16:09:08brixenthe other is exposed by redcloth3
16:09:24brixenI'm trying to work through String#gsub!
16:09:58brixenit's not matching the 4th *x* instance in "\t<p>a H *umane* W *eb* T *ext* G *enerator*</p>\n"
16:10:39brixenreally wish the debugger was working :(
16:11:02brixenbut first, I need some fooooood :)
16:13:21khaaseyeah, the missing debugger is really annoyinh
16:13:26khaaseannoying
16:13:41khaasethis keeps me from using rbx for regular development atm
16:14:27khaasewhat annoys me the most: it's damn easy to write a debugger for mri.
16:20:01khaasebrixen: 17f/1e with clean redcloth application_helper tests (probably due to the missing patches)
16:20:44brixenok
16:20:56brixenwe have a debugger, it's just fallen behind the vm changes
16:21:02brixenespecially with native threads
16:21:23khaaseinteresting thing is: i get 17f/0e with mri
16:21:45brixenwhat is the 1e?
16:22:58khaaseest_syntax_highlight(ApplicationHelperTest): ArgumentError: method 'token': given 1, expected 2
16:23:18brixenthat is the method to_proc issue
16:26:13khaaseoh, well, hmmm... proc { |a,b| a }.call [1,2]
16:26:40khaaseisn't that like rather common?
16:26:58khaasefor stuff like Hash#each
16:27:36brixenhash each splats the args
16:28:16brixenyour code isn't right anyway
16:28:19brixenrun that in mri
16:29:26brixenwhat's happening in redmine is:
16:29:31brixencoderay does tokens.each(&self)
16:29:49brixenwhere self defines to_proc as method(:token).to_proc
16:30:01brixenwhich in rbx pulls out the method and wraps it in a proc
16:30:09brixeneventually, #token is called
16:30:27brixenbut it's a method, and the args are not splatted into that call
16:31:00brixenkernel/common/method.rb #call at 67
16:31:28brixenso I think the to_proc from a method needs to set an attrib that this method will be called like a block
16:36:49khaaseah, 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:35khaasebrixen: dunno, but seems doable. have to dig into the code more, but was planning to do that anyways.
16:39:20brixenkhaase: ok
16:40:47khaasebrixen: where does the hash splat happen?
16:41:23brixenkhaase: here's a repro http://gist.github.com/382355
16:43:21brixenkhaase: it's not a splat per se, it's the way a block is called http://gist.github.com/382360
16:44:38khaaseah, ok.
16:46:14brixennow, if only I had such a simple repro for this String#gsub! bug :(
16:57:14khaasereally gotta run now... bbl
17:45:01brixenbingo, something to do with $KCODE == utf8
17:45:59khaasethe gsub issue?
17:46:01khaasecool
17:46:11khaaserelated to the xss issue?
17:46:26khaasewasn't that like an utf8 issue, too?
17:47:52brixenthe xss issue is kcode related, yes
17:49:55brixensweet! 1.9 has the issue too
17:50:05brixenwhen using utf-8 encoding in the file
17:50:16brixenso, this is onig
17:51:54khaasehmmm... so setting the encoding for the redcloth3.rb would fix it?
17:52:06brixennot at all
17:52:34brixenredmine (or something it uses) sets $KCODE == utf8
17:52:40brixenrbx uses onig
17:52:52brixenwhen onig is set to utf8, it fails to match the full string
17:52:58brixenone sec...
17:54:35brixenhttp://gist.github.com/382450
18:06:48khaasebrixen: shouldn't the splatting be handled in Proc::Method?
18:08:36dbussinkbrixen: man, that regexp speaks "i had a problem, want to solve it with a regexp, now i have two problems"
18:08:48khaasebrixen: that way i would not need to set an attrib
18:09:16khaaseafk
18:09:56brixenkhaase: kernel/common/proc.rb line 84-86
18:10:04brixenit already splats the args
18:10:42brixendbussink: so totally true
18:11:50brixendbussink: if you've seen roberto's talk on LPEG, you can see why regexes are the cruelest joke played on computer programmers
18:12:14brixen(and why I need to get pegarus running asap)
18:14:01dbussinki think this is like the most complex regexp in our app: value.strip.gsub(/(\w+)/){|n| n.capitalize}
18:14:06dbussinkthat's doable :P
18:15:30dbussinkbrixen: i can read that even now :)
18:16:44brixendbussink: indeed, that's doable :)
18:19:38dbussinkbrixen: is 07/22/2010 your deadline for pegasus? ;)
18:23:02brixendbussink: heh, I guess that'd be yes
18:43:34brixenare there any utf8 gurus here?
18:43:49BrianRice-workhides
18:43:50brixenor anyone who knows if *< should be special in utf8 encoding?
18:44:05brixenBrianRice-work: hah, excellent
18:45:01BrianRice-workI have deliberately forgotten what I learned about it, so can't answer.
18:45:36brixenBrianRice-work: ok, thanks for nothin' then :)
18:45:54BrianRice-workany time ;) try #unicode
18:46:26BrianRice-workI mean, the easy answer is that no, there's no obvious reason why it would be special
18:46:53brixenok, I didn't see any obvious reason it would be either
18:46:54BrianRice-workof course, * and < might not be the ansi characters...
18:56:41brixenkhaase: http://redmine.ruby-lang.org/issues/show/3217
18:56:50brixenkhaase: I'm moving on for now
19:02:48brixenhm, indeed /u does make it match
19:03:02brixenbut then what is *< then?
19:03:50brixenoh wait, I am wrong
19:03:59brixenthe /u has no affect
19:04:05brixenI had modified my test string
19:04:13brixen* < matches, *< does not
19:07:15khaasebrixen: yeah, i also informed edavis, as this is not a rbx issue
19:45:05dbussinkbrixen: is 1.9 / onig also vulnerable to that issue that jruby fixed?
19:45:20dbussinkbrixen: i can imagine it being so, since rbx and 1.9 both use onig
20:03:56brixendbussink: no, 1.9 is not
20:03:57brixenxss.rb:6:in `<main>': invalid byte sequence in UTF-8 (ArgumentError)
20:04:37brixenwhen the encoding is not set to utf-8, it behaves as 1.8.7 does
20:04:44dbussinkbrixen: ah ok, what makes the difference there? guess string encodings there come to the rescue?
20:04:56brixenit would appear so, yes
23:15:37seydarhow much snow did people get today?
23:29:04brixenseydar: no snow today, maybe tomorrow
23:29:20seydari got an inch, but other kids in the school district got a foot
23:29:35brixenwow, did you have a big umbrella?
23:31:07seydari 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:06seydarso do you guys use statistics a lot while testing?
23:32:32seydarzed 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:02brixenhm, while testing...
23:33:04brixennot really
23:33:11brixensometimes while looking at perf issues
23:33:35brixenmy statistics knowledge is pretty rudimentary
23:33:41brixenzed would want to kill me
23:33:44seydaryeah, that's what i meant. performance stuff
23:34:16brixenon the other hand, I don't make stupid statistically incorrect arguments for which zed would want to kill me
23:34:29seydarinteresting life choice.
23:34:36brixenindeed
23:34:44seydardo you ever feel that it would be good to use more statistics magic?
23:34:50brixensure
23:34:57brixenlike, whenever I play poker :)
23:35:05brixen(which is never)
23:35:22brixenseriously though, yes, I need to up my stats chops
23:36:21brixenspeaking of perf, rbx is basically 4x mri on this test with the jit on http://gist.github.com/382883
23:36:30brixen~8x interp only
23:36:55seydarso it's faster interp only?
23:37:01brixenresetting the method cache and messing with the method tables appears to be pretty expensive
23:37:13brixenno, the jit is ~2x interp only
23:37:18brixen~2x faster
23:37:25brixen~8x MRI with no jit
23:38:15seydarso it's faster without jit?
23:38:34brixenum no :)
23:38:35seydarthat would agree with your earlier statement on April 28, 2010 at 7:36PM
23:38:46seydargrrr i can't read these number i is confused
23:39:02brixenrbx with interp only is about 8x slower than MRI, with the jit on, it's about 4x slower
23:39:14seydarOOOOOH
23:39:14brixenso, the jit makes rbx about 2x faster than interp in this test
23:39:19seydardur.
23:39:23seydari'm still new to this world
23:39:27brixenhehe
23:39:34seydari'm getting used to the idea that bigger times aren't better
23:39:45brixenah yes
23:39:48seydari was like "8x MRI fuck yeah that's twice as much as 4x"
23:39:52brixenbigger is not *always* better
23:40:25brixenyeah, I'm used to expressing "x times slower than MRI" with no velocity vector
23:40:28brixenjust as a scalar
23:40:35brixencus we're usually slower right now :(
23:40:56brixenbut soon, my vector will switch, and by default 8x MRI will mean rbx is 8 times faster :)
23:41:17brixenthen there will be beers all around for those in the US >21
23:41:20seydarwhat're we waiting on for that switch to happen?
23:41:36brixenbasically, better and better jit
23:41:49seydaranything in particular or just random fixings?
23:42:17brixenhm, lots of little work
23:42:40brixenI'm sure some algorithmic improvements of ruby code too
23:43:22seydaryou know what would be scientifically 1337h4><?
23:43:34seydardocumenting which algorithms are used in the files along with their runtimes
23:43:35brixenum, what? :)
23:43:43brixenhmm, interesting
23:43:58seydarif that were in the documentation people would ball hard in shiny cars
23:44:26brixenwell, I'm using algorithm loosely here
23:44:26seydari 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:48brixenconsider that the "add a method to a class operation" is something of an algorithm
23:44:57brixenbut it's expressed across multiple methods
23:45:00seydarall algorithms have runtimes. they should be documented
23:45:03brixensee that gist for instance
23:45:19brixendo you mean "complexity" by runtimes?
23:45:47seydaryeah!
23:45:59seydaronce again, i'm new to this plizace
23:46:10brixensure, but consider that an "algorithm" might not be in one method in one file
23:46:25brixenthe whole operation to add a method to a class requires multiple classes and methods
23:46:36seydarstart small
23:46:39seydarwork your way up
23:46:40brixenso, documenting the "operation of adding a method to a class" would be a bit involved
23:46:45brixensure
23:46:57seydarit would be a nice summer job
23:46:59brixenI detect hints of a eager volunteer
23:47:25seydar..... maybe....
23:47:34brixen:)
23:49:16seydarwell, i must flee now. i can has 3 essays and a poem to write by friday
23:49:31brixenget busy!
23:49:47seydarbelieve me, i would much rather be getting busy right now instead of doing hw
23:50:26seydarpeace. one love. seydar out.