Index

Show enters and exits. Hide enters and exits.

13:58:57thelinuxlichis there any caveat with dynamic methods in rubinius?
13:59:22thelinuxlichI have a method running with the method_missing stuff that fails asking one more argument
13:59:33thelinuxlichonly in rbx
14:00:35thelinuxlichoops, the method receives 2 arguments, but rbx sends 3
14:06:40kronos_vanothelinuxlich, provide the sample of code pls
14:15:17thelinuxlichok I'll simplify it here, but is define_method behavior different from MRI?
14:22:26thelinuxlichkronos_vano, http://www.pastie.org/1050433
14:25:12thelinuxlichlooks like rbx doesn't love splat operator
14:32:51cremesthelinuxlich: i suggest opening a github issue so this doesn't get lost/forgotten
14:33:12cremesinclude your pastie along with the output from uname -a and rbx -v
14:40:20thelinuxlichcremes, okay!
14:41:08cremesand give the issue a descriptive name :)
15:27:34kronos_vano:/
15:27:35kronos_vanoif(required > 1 && (size_t)required != args.total())
15:27:43kronos_vanoblock_as_method.cpp
15:31:42thelinuxlichkronos_vano, define_method stuff?
15:33:07kronos_vanothelinuxlich, BlockAsMethod::block_executor
15:40:33kronos_vanothelinuxlich, it checks that passed params count shoud be equal to required params count. but it is wrong in our case. I've changed "=" to ">=". tests are running now...
15:42:40kronos_vanohm. seems like it works.
15:44:53kronos_vanohttps://gist.github.com/79d86495eeb5badc2243
15:47:52kronos_vanoug. no no no it's wrong
15:51:51kronos_vano"Otherwise, it's strict arg checking."
15:52:27kronos_vanoevan, why in BlockAsMethod::block_executor method you use strict checking?
16:03:50kronos_vanobbl
16:06:15evanmorning.
16:06:20evankronos_vano: probably just a bug.
16:06:25evanwe need to write some specs for that behavior.
16:51:26JamesKiltonwhat's the current state, if any, of making rbx embeddable?
16:52:36evanwe haven't done any explicit work on it
16:52:50evanit's a little cumbersome because we don't build a shared library
16:52:57JamesKiltonYeah noticed that
16:53:06evanbut you can look at vm/drivers/cli.cpp
16:53:18evanfor an example of the API to spin things up
16:53:55JamesKiltonyep, been looking through there. So currently building extensions is simply telling the linker to ignore symbol lookup and assume they exist via the rbx runtime?
16:54:32evanwell, the linker does that by default with shared libraries
16:54:33evanso yeah.
16:59:31JamesKiltonk. Been looking at what it will take to make Rice work with rbx, the tests are currently in C++ and embed ruby to run, i'll have to build a wrapper to run them as an rbx extension then.
17:00:35evanwell
17:00:45evanyou need to remove all usage of RHASH and RREGEX
17:00:48evanis the main thing
17:00:49evanrice wise.
17:02:00JamesKiltonYeah, been working on that. It's the whole "manage a built-in ruby object" vs "just use the ruby API"
17:02:12evank
17:02:29evanwriting a C wrapper for our startup API should be easy enough
17:02:57evanyou'll have to use Environment in a C++ global probably
17:04:14JamesKiltonfrom what I saw, the simplest could just be new Environment(argc, argv); ?
17:04:50evanyeah
17:05:07evanif you'd like some stuff wrapped up
17:05:09evanor improved
17:05:10evanlet me know
17:05:12evanor send me a patch
17:05:14evani'll add it.
17:05:29JamesKiltonk
17:23:51dbussinkgoyox86: did you also add specs for #417?
17:24:10dbussinkor are there tagged specs that pass after that change?
17:24:36evangoyox86: also, if you can, please explain more about the bug in the issue
17:24:42evana link in the body only is poor form.
17:24:44slavahi evan
17:24:50evanslava: hi hi.
17:25:45goyox86evan: This is just a fix to a tagged failing spec, Kernel.extend was not raising an TypeError when self was frozen
17:25:48dbussinkevan: looks like rbx is also faster in antonio's shootout
17:26:04dbussinkthan 1.8 in general
17:26:08evangoyox86: please still say more.
17:26:21evanie, indicate if there is a tag that would be removed
17:26:22evanetc.
17:26:38evanor even "Here is a patch: "
17:26:50evanI know it sounds silly
17:26:53evanbut i look at so many of them
17:27:02evanthe more info in the issue itself
17:27:03evanthe better.
17:27:24goyox86evan: no pro, i'll update the ticket right now :]
17:27:28dbussinkputting it in a <pre> block in the ticket would already make it better too
17:27:32dbussinkbecause it's pretty small
17:27:43dbussinkand you can see it right away, not having to click through
17:31:58dbussinkgoyox86: if you can add a patch for removing the tag too, that would be nice
17:32:26dbussinkgoyox86: and something i'm somewhat anal on is not adding trailing white space
17:32:38dbussinkmy git diff shows red blurps if i add those :P
17:32:50goyox86dbussink: i the same ticket?
17:33:04dbussinkgoyox86: best is probably two patches in one ticket
17:33:15dbussinkand explain that change x fixes tagged spec y
17:33:29goyox86dbussink: oh man sorry for that trailing ws! :(
17:33:40dbussinkone ticket == one issue, which can consist of several patche
17:33:42dbussinkpatches
17:33:53goyox86dbussink: k
17:36:12goyox86evan: Ruby.chek_frozen what exactly is? a Primitive?
17:36:19evana macro.
17:36:27goyox86Ruby.check_frozen*
17:36:34evanthe bytecode compiler detects and expands it out to the check_frozen instruction
17:36:49evanit's only available for use in kernel/
17:36:56evanit's turned off otherwise.
17:36:59goyox86evan: k
17:37:48goyox86evan: There are a lot of this kind of macros?
17:38:04evana lot? no.
17:38:13evana few.
17:39:24goyox86evan: heh, when i said a lot, i meant others :s, sorry for my bad english, i from southamerica ;)
17:41:31sbryantevan: I just saw the new Ruby shootout. And Rubinius' performance is really starting to shine.
17:42:07evanoh? where is the new shootout?
17:42:16evangoyox86: no problem :D
17:42:19sbryanthttp://programmingzen.com/2010/07/19/the-great-ruby-shootout-july-2010/
17:42:37sbryantRubinius is really starting to be competitive.
17:45:04evanhm, something must be up with that primes benchmark
17:46:58sbryanthrrm, either way the people might be all over JRuby and 1.9.2 approaching performance parity, but rubinius is where it's at.
17:47:13evanand I wonder what the errors on the matrix one are..
17:47:24evani'll check that out in a bit
17:49:22sbryantalright. I'll take a look if I get a chance, but congrats
17:49:54evanthanks!
17:50:00evanyeah, things are coming along nicely.
17:50:48sbryantIt really shows
17:51:11JamesKiltonYeah, when I saw brixen's commits on Array#pack / #unpack, and ran the subsequent benchmarks, I was amazed: http://gist.github.com/475672
17:51:22JamesKiltonthat's 1.8.7 vs rbx 1.0.1
17:51:55goyox86evan: nice thing about rbx is that when you improve some kernel functionality the overall system sees the benefits :]
17:52:07evanyep!
17:52:30goyox86evan: are you now focused on performance now? or compatibility?
17:52:41evanJamesKilton: yeah, our old pack was crazy pants.
17:53:13sbryantNow they use Miracles and Magic(tm)
17:53:26evandisappears in a puff of smoke
17:53:33sbryanthah
17:53:49JamesKiltonthough I have to wonder how in the world you guys keep that insane bunch of goto jumping straight
17:54:23goyox86JamesKilton: me too :]
17:54:57evanwhich? the ragel one?
17:57:36blowmagethe shootout shows rbx is an improvement on ree for memory usage, but it is still quite high compared to mri/yarv.
17:57:55blowmageis memory usage something that is planned to be addressed?
17:59:07JamesKiltonevan: #pack and #unpack. I have to imagine that's generated but nothing else was committed
17:59:22evancheck github.com/brixen/rapa
17:59:28evanthe .rl files are what it's generated from
17:59:35evanwe're not writing that crazy goto parser by hand
17:59:35evanno.
17:59:45JamesKiltonhaha, good
18:00:02JamesKiltonthat's neat, Ragel is one awesome tool. I really need to find something that lets me learn it
18:00:39tarcierievan: is that using the Rubinius.asm backend for Ragel?
18:00:46evanno.
18:00:49tarcierio
18:01:08evanbecause the actions are really lowlevel
18:01:16evanso we decided to do them in C++
18:01:26tarcieriI thought about playing with that again but it seems like it'd be all slow compared to C(++)
18:01:32evanthe code is cleaner and faster for implementing "V" in C++ than ruby
18:01:33evanby a lot.
18:22:03evanhah
18:26:40goyox86evan: which tool do you use to count how many lines of Ruby Code and C++ in the rbx codebase?
18:28:17goyox86evan: i ran yerterday SLOCCount, on rbx top level directory
18:29:17evanI don't.
18:29:50goyox86evan: k
18:41:07jakedouglashmm
18:41:18jakedouglasDir.glob not behaving like mri
18:44:53jakedouglashates being the one to find some of these boring ones
18:45:42evanjakedouglas: got an example?
18:47:33jakedouglasruby-1.8.7-p299 > Dir.glob(".//Gemfile") => [".//Gemfile"]
18:47:46jakedouglasrbx-head > Dir.glob(".//Gemfile") => => ["./Gemfile"]
18:47:53evanseems fine to me
18:47:55jakedouglasextra slashes dont get included in the result
18:47:55evanwhats wrong?
18:48:11jakedouglasrbx example is missing the second slash
18:48:26evanwhy is that wrong?
18:48:29sbryantIs that a bug for rbx or mri?
18:48:36evanisn't ./Gemfile == .//Gemfile
18:48:36evan?
18:48:48jakedouglasevan: from a filesystem perspective
18:49:07jakedouglasthe rails3 fixture loader does some stuff with the strings that expects extra slashes to be in the result
18:49:36evanreally? sounds like a super fail.
18:50:00evanwhy would the expect it?
18:50:01jakedouglasheh
18:51:03jakedouglashttp://github.com/rails/rails/blob/master/activerecord/lib/active_record/fixtures.rb#L836-842
18:51:54evanso?
18:51:59evani don't see anything about extra slashes?
18:52:27jakedouglasDir["#{fixture_path}/**/*.{yml,csv}"]
18:52:35jakedouglasfixture_path is a path with a trailing slash
18:52:41evan..
18:52:42evanok...
18:52:43evan?
18:52:57jakedouglasand then the next line uses String#[] with some numbers in there
18:53:09matschafferlooks like line 839 is assuming that / is there
18:53:14jakedouglasif the result of the dir.glob doesn't have the extra slash, the math is wrong
18:53:31jakedouglasand table_names ends up missing the first character of the table name
18:53:37matschafferwhy does fixture_path come out with an extra / in the first place?
18:53:53jakedouglasmatschaffer: it gets set manually
18:54:14matschafferand the default is test/fixtures/ ?
18:54:30evanjakedouglas: please show me the input to this
18:54:32evanand the expected output
18:54:49jakedouglasok. should i file a ticket? or just make up a gist?
18:55:41jakedouglasmatschaffer: http://github.com/rails/rails/blob/master/railties/lib/rails/test_help.rb#L21
18:56:02matschafferI'd be tempted to file this as a rails bug
18:56:05evanjakedouglas: feel free to file a ticket
18:56:15evanjakedouglas: but please provide the input to this rails code
18:56:19jakedouglassure
18:56:21evanso I can see the full cause
18:56:30matschafferjakedouglas: good find
19:01:09matschafferjakedouglas: you want me to file it in rails' lighthouse? philly.rb is planning a bug mash next month. This could be a nice easy one
19:01:56jakedouglasevan: is this an acceptable example? http://gist.github.com/481814
19:02:26jakedouglasmatschaffer: up to you
19:04:05evanjakedouglas: thats pretty weird.
19:04:06evanactually.
19:04:21evani need the contents of that directory
19:04:25jakedouglassure
19:04:58evanthat looks different than the / thing
19:05:33jakedouglasrefresh the gist, i added the directory contents
19:05:56evanthe first lettter is cut off.
19:05:57evan..
19:06:01evanthats pretty weird.
19:06:04evannever seen that before
19:06:08evango ahead and open it
19:06:10evani'll check shortly.
19:07:31jakedouglasright, the first letter is cut off. i am pretty certain the reason is that the Dir.glob result does not include an extra / and the arguments to String#[] are expecting it to or something
19:08:10evan...
19:08:22evanaah
19:08:25evanok
19:08:27evanopen the issue
19:08:29jakedouglask
19:08:37evanthats so fucked up rails code
19:08:38evanbtw
19:08:41evan*eyeroll*
19:08:43jakedouglasheh
19:12:30matschaffersadly I can't find anything the the rubyspec about how this should get handled
19:12:41jakedouglasyea there isn't a spec for it .
19:12:41evanmatschaffer: might not be one
19:12:44evancare to write one?
19:13:05matschafferI'd prolly write it how rbx does it :-P
19:14:46dbussinkmatschaffer: well, what mri does, is the spec ;)
19:14:51dbussinkbut this rails code is a real wtf
19:15:16matschaffertrue
19:15:28matschafferI filed this as https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5154 as well
19:15:43matschafferand put it on the list of things to look at for our bugmash
19:16:25matschafferevan: how nasty is it to get the rubyspec running?
19:16:34evanit's trivial
19:16:40evanjust write them in spec/ruby/core of rbx
19:18:14matschafferoh you keep your own
19:18:50evaneveryone does
19:21:49matschafferevan: taking a look now. Haven't tried building rubinius outside of rvm yet though, so we'll see how this goes :)
19:22:08evanmatschaffer: shoudl be trivial
19:22:59kronos_vanomatschaffer, git clone && ./configure && rake :D
19:23:19matschafferyep, so far so good
19:26:12jakedouglashttp://github.com/evanphx/rubinius/issues/issue/420
19:28:25evanjakedouglas: i'll check it out in a bit.
19:28:29jakedouglask
19:28:47jakedouglaserr, no dude, i cant wait! my deploy is waiting on this!
19:29:32evanO_o
19:30:13dbussinkjakedouglas: i bet that will trigger evan ;)
19:31:33evani'm getting lunch first.
19:31:49jakedouglasmy client cant wait until after lunch, they need deploy now!!
19:32:22JamesKiltonI didn't know evan ate food, I figured he was a robot.
19:32:34slavasounds like you should be paying for the rubinius pre-lunch support plan
19:32:50evanJamesKilton: aah, thanks!
19:32:52evanslava: hah
19:33:06jakedouglasevan is impressively balanced in his lifestyle
19:33:33jakedouglasperhaps even lazy by the slave-driving standards of some software cultures :p
19:35:06evani'm definitely lazy compared to slava.
19:35:07evanno doubt.
19:35:13evannow, lunch.
19:35:35jakedouglasheh. mostly i just envy your ability to walk away consistently to do other stuff
19:45:04dbussinkevan: just ran those bm_hilbert_matrix benches and they ran fine here
19:45:08dbussinkwas with master though
19:59:20evank
20:08:42sbryantwhen is 1.0.2 or 1.1 being cut?
20:12:27evanaugust
20:12:30evan1.1
20:12:52evanjakedouglas: work/life balance is important.
20:12:56evankeeps me from burning out.
20:12:57dbussinkevan: any plans on what should be finished before that?
20:13:04evanpack/unpack
20:13:08dbussinkevan: just get that beeper back ;)
20:13:10evanString#% would be nice.
20:13:17evandebugger
20:13:22jakedouglasyou say it like its easy to achieve :p
20:13:24evangot a little query agent work to do
20:13:28evanjakedouglas: oh, it's not.
20:13:32evanbut it's still important.
20:14:06sbryantI thought someone was working on String#%
20:14:14dbussinkevan: hmm, that hilbert bench is pretty slow, but it's mainly Bignum#% being slow
20:14:19evansbryant: kstevens was
20:14:23evandbussink: ok
20:14:47evandbussink: wanna try and speed up Bignum#% ?
20:14:48evan:D
20:14:50dbussinkother than that it seems to run fine
20:14:50dbussinkhttps://gist.github.com/87d8e153131e449547e6
20:14:55dbussinkhehe, i can take a look :)
20:15:02evank
20:15:05dbussinkshould be easier than String#% :p
20:15:09evanwe should ask him what was up
20:26:43dbussinkevan: do we already have some instruments to profile c++ parts of the vm?
20:27:59evanno
20:28:01evani use shark
20:58:39dbussinkevan: ugh, quite a bit seems to be in libtommath :(
21:13:16evandbussink: hm, ok,.
21:13:25evanantyhing where we could maybe add a fast path?
21:13:32evanie, is it doing % 2 or something?
21:14:11dbussinkwell, there's also quite a bit of ruby overhead that shows up, maybe stuff could be moved there
21:14:18dbussinkbut that means a more complex primitive :(
21:14:42dbussinkthis is through the Integer.gcd path, so maybe there at a higher level
21:15:03dbussinkthat's why mri is fast on this benchmark, afaik it has a fast gcd implementation added in 1.9
21:18:14evanaah
21:18:20evanwell, i see that mod_primitive stuff
21:18:59evanbetter to make it the prim
21:19:08evanand type check in the prim and use fallback code for the rare cases
21:19:17evanlike if it's a Float or non-numeric
21:20:56evanthat would probably speed it up a bit
21:20:58evanand it would be cleaner
21:27:16dbussinkevan: just tried this: https://gist.github.com/af1820157cc05ede0923
21:27:23dbussinkpasses all specs :S
21:27:33evanthats good
21:27:36evanexpect that
21:27:38dbussinkbut can't really believe it, usually it's more brittle :P
21:27:57evandepends on how bignum_mod is
21:27:58evanlets see.
21:30:03dbussinkevan: that float handling should be handled in the primitive too i think
21:30:12evansure
21:30:13evanthats fine.
21:30:47dbussinkso that can go too
21:42:40dbussinkevan: pretty happy with this version: https://gist.github.com/c264a5b498f94d393141
21:42:45dbussinktwo liner :)
21:42:57evannice
21:42:58evango it.
21:43:02evaner. do it.
21:43:24dbussinkevan: should this be in bootstrap or common?
21:43:34evaneither
21:45:37dbussinkevan: ok, will put it in bootstrap for consistency sake
21:45:44evank
21:45:47dbussinkbut it's quite a bit faster :)
21:45:51evan:D
21:45:54dbussink30% off
21:45:59evannoice.
21:53:12dbussinkhmm, where's the github bot?
21:54:08evanhe's here..
21:54:18dbussinkevan: that hilbert bench went from 35 to 27 sec on my machine
21:54:26dbussinknot too wild, but still nice
21:54:27evannice.
21:54:37evani can restart boyscout
21:54:39evanhe worked this morning
21:54:43evanso it's probably github being slow.
21:56:53boyscoutBe sure to add debug symbols to libtommath - 67192e7 - Dirkjan Bussink
21:56:54boyscoutCleanup of Bignum#%, significant performance improvement - 684874d - Dirkjan Bussink
21:57:05dbussinkah, there it is
21:58:05evanjust github being slow.
22:00:08dbussinkhmm, mri has rational completely in c
22:00:28dbussinkwhich also explains why 1.9 is so much faster on this
22:00:38dbussink1.9 has rational in c i mean
22:00:46evanthis == matrix?
22:00:52dbussinkthat hilbert one
22:00:56evanright
22:01:03dbussinkdid you see antonio's numbers"
22:01:04dbussink?
22:01:09evanyeah
22:02:57dbussinkman, ruby has a Prime class
22:03:41dbussinkevan: man, this benchmark is beyond terrible, look at the comment: https://gist.github.com/3fc7bdc81c498c8397ca
22:03:45dbussinkbm_primes
22:04:20evan:/ :/
22:04:59evanwhy would he put that crap into the benchmark set?
22:05:05evanthats testing nothing.
22:05:34boyscoutCI: rubinius: 684874d successful: 3502 files, 14364 examples, 42140 expectations, 0 failures, 0 errors
22:07:17dbussinki have no idea
22:08:36dbussinkevan: not even headius bothered with replacing that crappy Prime thing, guess really nobody uses it :p
22:08:52evanno one does.
22:08:59evani didn't even know it was there.
22:09:19dbussinkme neither :)
22:09:53dbussinkbut rubinius is fastest at bm_sudoku :)
22:09:58dbussinkthat's what matters :P
22:10:09jaribare there any benchmarks from other languages that would be interesting to port?
22:10:41evandbussink: we should write some sudoku web apps
22:10:43evanwith solvers
22:10:45evanin rbx.
22:13:46dbussinkhehe
22:13:52dbussinkbut it's time to get some sleep for me
22:15:02dbussinknite!
22:21:16goyox86evan: remember the little ticket about Kernel.extend, i modified it look a that and give me feedback, when you have time of course :) http://github.com/evanphx/rubinius/issues#issue/417
22:21:34evanlooks good
22:21:41evani'm almost done working on the profiler
22:21:46evanand then i'll dig into tickets.
22:23:32goyox86evan: what dbussink did with Bignum#%, was implement it as a primitive? (Just for educational purposes :])
22:23:58evanit was already a primitive
22:24:21evanhe just cleaned it up so that the primitive was called as Bignum#% directly
22:24:33goyox86i see
22:26:47goyox86evan: primitives are implemented in c++?, and the called in Rubyland with Ruby.primitive?
22:27:36evanyes, primitives are in C++
22:27:40evanRuby.primitive as another macro
22:27:44evanit's not a real call.
22:27:56evanit just tags the current method as being implemented by the named primitive
22:28:07evanso when the method is called, the primitived is invoked by the VM
22:28:17evanit's only valid as the first line of a method
22:29:34goyox86evan: you mean, i can only put a Ruby.primitive in the first line of a method in ruby?
22:29:46evanyes.
22:29:55evanbecause it's not a method call.
22:29:57evanit's just a tag
22:31:07goyox86evan: i see, when the VM sees this directly calls c++ func?
22:31:23evanyou can think of that way
22:31:38evanthats not exactly true at the VM level
22:33:36goyox86evan: thanks for the explanation bro!, and brixen was kidnapped today?
22:33:41evan:D
22:33:46evanhe's off at oscon today
22:33:56evanand working on his presentations
22:37:16goyox86evan: "Pegarus and Poison: Rubinius VM as a Multi-Language Platform" kidnapped brixen :D
22:37:21evanhehe
22:39:39goyox86goes to play some soccer, seeeee yaa! people
23:03:33evanyay
23:03:42evani think i've finally cracked the code of the profiling data
23:34:55halorgiumevan: very good :D
23:35:01evan:)
23:35:26evanhalorgium: i'm about to commit a bunch of profiler changes
23:35:32evanI started work on friday
23:37:20boyscoutFix profiler graph output and handling of blocks - faad10f - Evan Phoenix
23:50:07boyscoutCI: rubinius: faad10f successful: 3502 files, 14364 examples, 42140 expectations, 0 failures, 0 errors
23:59:12boyscoutAdd spec for escaping used by String#delete - 12b70e7 - Evan Phoenix
23:59:12boyscoutIgnore escaped -'s. Fixes #409. - cb7dd02 - Evan Phoenix