Index

Show enters and exits. Hide enters and exits.

01:53:08telinnerudTrying to compile the RC on Snow Leopard I get: Undefined symbols:
01:53:08telinnerud "_mp_init_copy", referenced from: ....
01:53:21telinnerudfamilar?
01:53:27telinnerudfamiliar
01:55:32telinnerudhttp://gist.github.com/243776
02:01:41sbryantah yes
02:01:48sbryanttelinnerud: you around?
02:01:56telinnerudyepp
02:02:08sbryantokay, what version of ruby are you running?
02:02:20telinnerud1.9.1p243
02:02:32telinnerudbut I can switch to built in 1.8.7 if it helps
02:02:47sbryantrubinius does not support MRI 1.9.1.
02:02:59sbryantBUT
02:03:06sbryantLet me guess, you installed it from macports?
02:03:26telinnerudno I used rvm
02:03:33telinnerudso its easy to switch versions
02:03:44sbryantAlright, well try and get a universal binary.
02:04:18sbryantThat error comes from arch differences, the file is there, but wrong arch.
02:04:34sbryantI had a similar issue and I rebuilt ruby to be universal
02:05:00telinnerudI had a feeling it was something like that :)
02:05:04sbryantYeah
02:05:09sbryantif you're on macports
02:05:15sbryantport install ruby +universal
02:05:46telinnerudthanks, i'll give it a spin
02:06:03sbryantOkay, hope it helps
03:42:11dwaitehappy turkey extinction day
04:37:57dwaitetries a rake install
05:38:22dkubbshould this code use __send__() and not send(): http://github.com/evanphx/rubinius/blob/master/kernel/alpha.rb#L238
05:47:37sbryantdkubb: maybe, have you made the change?
05:48:18dkubbsbryant: I am just running some specs for DataMapper against Rubinius, and changing DM, or making note of spec failures
05:49:37sbryantI really don't know, but I want to say yes
05:49:46dkubbsbryant: in one of our specs, we remove the send() method from a certain type of object (on purpose) and ensure the logic still works.. I know it's weird, but there was one case where someone wanted their domain objects to have a method named send()
05:50:01sbryantthat's completely valid.
05:50:14sbryantAnd that's why I kind of want to say dup is wrong
05:50:50dkubbsbryant: ahh ok. I'll submit a ticket with a patch and see what happens
07:30:40stephenebI'm trying to build rubinius and I've already got llvm installed (separately) but ./configure --enable-llvm tries to install llvm again
07:30:54stephenebI'd like to build with the jit AND use the llvm I have installed
07:31:31brixenstepheneb: rubinius requires 2.6
07:31:47brixenprobably best to just let it do it's thing right now
07:31:58brixenwe're still working on the "link to llvm" story
07:32:34stephenebWhere will it install the llvm it downloads?
07:32:44brixenvm/external_libs/llvm
07:32:58brixenyou can pre-link your own there and configure will find it
07:32:59stephenebahh ... ok, it will just take a long time
07:33:09brixenthere are prebuilts
07:33:14brixenhow did you run configure?
07:33:59stephenebI started with: ./configure --enable-llvm
07:34:15stepheneband stopped it after I saw it start to download llvm
07:34:36stephenebI've got llvm svn 82750 installed
07:34:50stephenebtried rake without ./configure
07:34:54brixenwhat's your platform?
07:35:05stephenebmacos 10.5.8
07:35:27brixenthen just let it download the prebuilt
07:35:32brixenwhat's the issue with that?
07:36:29stephenebnot a big issue -- didn't know when it started that it wouldn't install over the llvm I already have installed in /usr/local
07:37:24stephenebalso thought I'd check here if I could use the one I already have installed, r82750 is from Sep 25
07:37:33brixenno, you cannot
07:37:47brixenjust use the prebuilt, it will not interfere with your install
07:38:05stephenebok, I'll just let ./configure --enable-llvm run until it's done ;-)
07:38:13brixenwe keep everything contained in the rbx dirs
07:38:51stephenebwill it work if I install into a custom prefix?
07:39:00brixenit should
07:39:08brixenopen a ticket if it doesn't
07:42:23stephenebnow .configure stops after: Using LLVM: auto Checking for existing LLVM tree: found! Checking for function 'backtrace': found!
07:49:25dbussinkstepheneb: that's all configure does :)
07:51:25stephenebI think I got the working dir into a strange state by first running: ./configure --enable-llvm
07:51:50stephenebstopping that when I realized it was starting to download llvm
07:51:59dbussinkah ok
07:52:08stephenebthen running rake, which used the llvm I already had installed
07:52:18dbussinkwell, just remove vm/external_libs/llvm and then do a ./configure --enable-llvm again
07:52:21stephenebI'm checking out a clean clone
07:52:31dbussinkthat probably works too :)
07:52:48stephenebI did try rm -rf vm/external_libs/llvm firs
07:53:58stephenebyeah ... now it's working hard again by starting to get the llvm version that rubinius needs
09:18:08dkubbsbryant: I submitted a ticket/patch for that dup problem we talked about earlier: http://github.com/evanphx/rubinius/issues#issue/98
09:26:26stephenebbrixen: fyi: I just entered an issue describing a failure building with a custom --prefix, http://github.com/evanphx/rubinius/issues/#issue/99
10:39:41ppahdnahello all
10:40:08ppahdnawhat are frozen specs? Are these the specs that have been completed already?
10:48:33ppahdnaanyone?
16:27:43jamisbuckI'm trying to implement cipher support for Rubinius' OpenSSL module, and I'm running into some cases where the OpenSSL API uses callback functions. Is there any support for that in the FFI stuff? (I couldn't see anywhere that it did.) Is there a recommended way to approach things like this in Rubinius? (e.g., falling back to writing code in C/C++, etc.)
16:32:16scotjamisbuck: I'm not sure if the rubinius ffi is fully compatible with the ruby ffi stuff, but in the ruby-ffi codebase, in spec/ffi/callback_spec.rb there should be some examples
16:33:02jamisbuckah, thank-you scot_____, I'll check there
16:33:42scottgah, stupid irc names
17:04:05sbryantjamisbuck: not sure if this is relevant but there is an example of callbacks using FFI: http://blog.headius.com/2008/10/ffi-for-ruby-now-available.html
17:05:03jamisbucksbryant: thank-you, I think I'm getting a handle on this. We'll see when I go to run it :)
17:05:13sbryant:)
17:27:00jamisbuckif I wanted to run the ffi preprocessor, how do I do that? I can see the task defined in rakelib/vm.rake, but I can't see how to invoke it. Feeling a little blind. :) I've read docs, googled, etc.
17:27:27sbryantI'm looking at the ffi stuff right now and I don't see support for callbacks :-\
17:27:46jamisbucksbryant: yeah, I wondered about that. I can see specs for it in spec/frozen, but that's it
17:28:11sbryantAhhh
17:30:31jamisbuckfound the ffi preprocessor task
17:31:25jamisbuckand, alas: "NoMethodError: No method 'callback' on OpenSSL::Cipher::Foreign" :/
17:32:22sbryantYeah, the article said JRuby went further.
17:33:44jamisbucklooks to be supported in http://github.com/ffi/ffi. if I have some time, this weekend I'll take a look and see what it would take to implement that in rubinius
17:33:54sbryantYeah, looking at the same
17:34:18jamisbuckgotta break now and do "real work". thanks for the sanity check, sbryant
17:34:25sbryantno problem.
18:58:34somebeeWhen trying to install rubinius I get: library not found for class Digest::SHA1 -- digest/sha1
18:58:59dkubbI'm running DataMapper's specs against rbx and fixing/reporting bugs, but I came across one that I think is an rspec/rbx bug. see #8 in this list: https://gist.github.com/8fa28265f0a69a616a8b
18:59:26dkubbit happens in a spec that is pending without any block, eg: it 'should pass'
19:02:40somebeeanyone know how to get around: library not found for class Digest::SHA1 -- digest/sha1 when running rake for rubinius (latest trunk)?
19:11:53somebeehmm, tried with llvm (latest version) now, and get another error instead
19:21:04sbryanthow are you installing it?
19:21:19sbryantAnd what's the error?
19:23:17somebeesbryant: I figured it was probably because I used ruby 1.9, but now I get other errors with ruby187 - rake aborted dlopen(lib/ext/melbourne/ruby/melbourne.bundle, 9): no suitable image found. Did find: lib/ext/melbourne/ruby/melbourne.bundle: mach-o, but wrong architecture - lib/ext/melbourne/ruby/melbourne.bundle
19:23:28sbryantahh
19:23:33sbryanthow did you install ruby 1.8.7?
19:24:05sbryantThat's a problem with differences between your kernel (64bit) and ruby being (32bit) or the reverse
19:24:24somebeesbryant: I compiled it in osx to actually get it to be 64bit
19:24:30sbryantif you're using macports try this: port upgrade --enforce-variants ruby +universal
19:25:12somebeesbryant: nope, compiled and installed int /usr/local/ruby-1.8.7 with flags for 64bit
19:25:29sbryantrun file /path/to/ruby and tell me what you get
19:25:32dwaitesomebee: I see that problem with ruby 1.9.1
19:25:51sbryantRuby 1.9.1 isn't supported.
19:26:00dwaiteI imagine you would also see it if you were building cross-architecture, say 32bit to 64 bit or vice-versa
19:26:12sbryanthttp://rubini.us/ <-- says it
19:26:20dwaitesbryant: it worked two weeks ago, unfortunately it broke when the compiler was switched in
19:26:58dwaitethe reasons it doesn't work are kinda bad
19:27:19dwaiteso I've been trying to find a way to make it work again
19:27:19sbryantwhat are they?
19:27:38dwaitethe bootstrapping phase uses elements of both the system ruby and rbx
19:28:11dwaitethe digest issue above seems to be related to the load path including 'lib' and '.' while bootstrapping
19:28:17somebeesbryant: any idea how I can get around this? Shouldnt rubinius be able to see which architecture ruby uses and compile the bundles correctly?
19:28:36dwaitei.e., it uses rbx's version of digest and rbx's compiled extensions, rather than the ones in the system ruby
19:29:03sbryantsomebee: that's a good question. And I'm not sure of the reasoning (I'm just another user)
19:29:10sbryantbut I do know a way around.
19:29:11somebeesbryant: ah ok
19:29:30sbryantbuild a universal binary ruby
19:30:00sbryantif you run "file /path/to/ruby" and tell me what you get.
19:30:42somebeehmm, w00t. Mach-O executable i386
19:30:52somebeeMaybe I only managed to compile 1.9.1 for 64bit
19:31:06somebeeI see i686 mentioned all through the rubinius rake-process
19:31:11sbryant:)
19:31:48somebeeso, is there a quick way? Like installing ruby-1.8.7 through macports
19:31:53sbryantyeah
19:31:59sbryantport install ruby +universal
19:32:09sbryantthen add to your path /opt/local/bin
19:33:07somebeeI don't want to think about how many versions of ruby I have on my system now :P
19:39:02somebeeruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.7.1]
19:39:07somebeenow let's hope it will work
19:39:13sbryantehh
19:39:25sbryantrun a file on it?
19:39:47somebeeMach-O universal binary with 2 architectures
19:40:04somebee- /opt/local/bin/ruby (for architecture x86_64): Mach-O 64-bit executable x86_64
19:40:04somebee- /opt/local/bin/ruby (for architecture i386): Mach-O executable i386
19:40:12sbryantawesome
19:41:07sbryantthat's an old patch version, but oh well
19:41:34somebeeahrg, version-hell.. need to get rubygems etc up for this one, now it runs rake from the other ruby-dir
19:42:16dkubbsomebee: OT, but I've found rvm to be quite nice to keep all of my rubies and related binaries segregated
19:42:32dkubbsomebee: like you, i often have many versions of ruby installed at once
19:42:38sbryantsomebee: you made need to start a new session
19:42:44sbryantmay need*
19:43:02somebeedkubb: I do it manually now with different dirs in usr/local and symlinking the currently used (fast switching with aliases).. but gets more messed up when using macports aswell
19:43:33somebeehmm, is rubygems on macports?
19:44:05somebeeforget it
19:44:41dkubbsomebee: ahh yeah, before my last machine update I had a system hacked together with shell commands to switch symlinks between different rubies installed with multiruby. rvm is much cleaner that what I had IMHO
19:44:47sbryantsounds like a path problem
19:45:23somebee- atlas:rubinius sindre$ sudo gem install rake
19:46:09somebee- /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- zlib -
19:50:02sbryantis zlib installed?
19:50:27somebeepeople should learn from the passenger install-process. I _always_ get loads of problems like this with ruby, native gems, rubygems, (rubinius) etc... it should be possible to catch some of these and actually give meaningfull errors? passenger has the best install-process of any unix-app I've ever compiled
19:51:05somebeesbryant: since I am running several versions of ruby already, and port install zlib just goes 'Cleaning zlib' I guess so
19:51:30somebeeand if not, I find it strange that it is never catched when installing ruby or rubygems? Instead of just throwing a no such file
19:56:17somebeetrying to install only 64bit version in macports
20:03:13somebeesbryant: rubygems started working after removing the universal one
20:03:43sbryantweird
20:04:33somebeew00t - rubinius installs
20:14:01somebeeis there a way to live get the sexp/ast of a method?
20:33:24ppahdnahello all
20:33:41ppahdnadoes anyone know what frozen specs are?
22:19:10somebeeis there a way to get the sexp/ast of an class after initiation/evaluation?
22:31:05dbussinksomebee: no, the new compiler also doesn't use a sexp anymore
22:31:26somebeedbussink: hmm :(
22:32:10somebeedbussink: so it is less flexible than parsetree.. I was hoping rubinius would make for a killer env to do some ruby to javascript magic, hehe
22:33:52dbussinksomebee: well, it's flexible differently :)
22:35:06somebeedbussink: Would there be any way to inspect actual methods live? Seems you can do so much with methods etc, that I was a tiny bit surprised I couldn't find anything like that
22:35:07somebee]
22:35:46brixensomebee: the ast is discarded after the bytecode is generated
22:35:52brixenyou can parse the source again
22:36:20brixenwe can also write a simple sexp emitter that works the same as the parse tree processor that emits the AST
22:36:25somebeebrixen: so the same as with 1.9.1 then. because of memory? Is it possible to keep rubinius from discarding it
22:36:38brixenyou have to store it somewhere
22:36:41brixenthat's an option
22:36:57somebeebrixen: that is the thing, I'd love (ideally) to inspect the models after initial load and firing of class-methods etc
22:36:58brixenreally though, I'm pretty skeptical of source to source translation
22:37:09brixenwhrite a real compiler to target javascript ;)
22:37:09somebeebrixen: everyone is until you have something that is solid enough
22:37:22somebeebrixen: I'd do it if I had the skill :)
22:37:26brixenheh
22:37:41dbussinksomebee: you can even use the bytecode if you want ;)
22:38:08somebeerubyjs is actually pretty close to something I'd be willing to switch to.. with some decent work and refactoring...
22:38:22brixensomebee: I don't really know what you're trying to do, but expecting the AST or the sexp to have a specific form is typically a fast path to pain and suffering
22:38:29brixenuse it as a last last resort
22:38:52brixenbecause it constrains us from doing powerful stuff or modifying what should be INTERNALS
22:38:57somebeebrixen: so, do you have any books / articles to recommend for someone who seriously wanted to make a rock-solid ruby to js compiler (the real deal)
22:39:03brixenuse methods, classes, sending messages to implement stuff in ruby
22:39:22brixensomebee: yes, prag progs have a book, language implementation patterns
22:39:29brixenit's very good and right up this alley
22:39:45brixenalso, engineering a compiler by keith cooper is very good
22:39:55brixenbut it's more focused on compilers that emit machine code
22:40:20brixenlanguage impl patterns has a lot more stuff on source-to-source and interpreters
22:47:00dbussinksomebee: you can probably reuse the ruby parser
22:47:47dbussinksomebee: and emit javascript from that, that's should be relatively simple i guess
22:48:31dbussinksomebee: the thing i remember from the compiler class in college, is that it was actually simpler and less magic than i though :)
22:48:36dbussinkit was for a simple language though
22:49:54somebeedbussink: ok. yeah, it is actually trivial to implement a large part of ruby in javascript. the problem comes with the last 5% (as always), but there's no need to implement 100% as I see it
22:50:20somebeebrixen: thanks for the suggestions, I'll definitely read them. good to know more in-depth stuff no matter which approach I take
22:55:30brixensomebee: full on targeting js so you can run a ruby app in the browser is a cool idea
22:55:42brixensomebee: on the other hand, RJS is a dead end
22:55:48brixennot sure which direction you want to take
22:56:07somebeebrixen: but it is a huge task. Yes, I am talking about a 'full' implementation of ruby.. have you seen rubyjs? It comes close
22:56:21somebeebrixen: *shrugs* not anything like rjs no
22:56:46Zoxcwonders what caused the spike in traffic for mirb...
22:57:12somebeebrixen: I think we're either moving towards js on the server aswell, or making js the assembly of the web, and moving towards GWT-alike concepts. GWT in ruby would be so much more awesome
22:57:49dbussinkdoesn't really mind writing javascript actually
22:58:46somebeebrixen: http://github.com/mneumann/rubyjs/raw/master/doc/talks/rubyconf07_rubyjs.pdf <- there has been a big rewrite since this that never got fully completed (but it seems very promising)
22:59:31somebeedbussink: I don't either, it is okay, but for very large projects I'd much prefer to use ruby. Both for the obvious pro using the same language for server and client, but also because I generally enjoy ruby alot more, and it is easier to organize
23:00:09dbussinksomebee: well, i've worked on a 50 / 50 ruby / javascript app, but it pushes javascript performance pretty hard
23:00:38brixensomebee: rubyjs looks cool
23:00:39dbussinkdunno how it would work with javascript as just a generated language
23:00:43somebeedbussink: would you consider using ruby in the browser if you knew it compiled to high performance javascript without sacrificing any meaningful ruby-stuff (except maybe bang! methods for strings)
23:01:33dbussinksomebee: i definitely would, but it would greatly depend on how well it would be and whether i would notice that it wouldn't properly fit
23:01:53dbussinkand having an escape is also nice, so you can "drop down" into javascript if you want / need
23:02:05somebeedbussink: the thing is, if the compiler is advanced enough, you can write more performant rubyjs than real js.. a simple example is iterating through arrays. In js you almost always use a helper-method for this.. with a compiler you could insert the fastest native implementations etc.. and do stuff directly for each platform (compiled beforehand)
23:02:18somebeedbussink: I agree. If you notice it doesnt fit, just a tiny bit, it does not work
23:06:46somebeebrixen: is language implementation patterns almost done? Bought it now, but I see that it is beta
23:08:01dbussinksomebee: hmm, rubyjs uses exceptions for returns?
23:08:13somebeedbussink: for regular returns? no?
23:08:41somebeedbussink: you can throw and rescue exceptions etc, but exceptions are never used for anything else
23:09:22somebeedbussink: from diggin into the code, it seems very well thought out.. just need to clean up, optimize, and complete the missing pieces
23:11:55dbussinksomebee: ah, cool, but the biggest issue now is the parsetree dependency?
23:12:50somebeedbussink: yes. one of the things about rubyjs is that it evaluates the code before compiling, so it can do clever optimizations for method_missing etc (although I can see places where it would break).. switching to rubyparser is possible, but you would need to rethink some aspects
23:14:00brixensomebee: yeah, the book is almost out I think
23:14:07somebeebrixen: cool
23:14:38brixenrubyparser may be a good approach, but I'd suggest ripping out the sexps and having it emit an AST
23:14:45brixensexps are teh suck
23:14:47brixentrust me
23:15:02somebeebrixen: that is what rubyjs does now.. it creates an AST from the sexps
23:15:16Zoxcsucks teh sexps
23:15:18somebeebefore converting anything
23:15:43somebeeI considered using melbourne from rubinius, but I guess that is not used at all anymore?
23:18:22brixenmelbourne is the new parser ext
23:18:27dwaitesomebee: melbourne is the brand new compiler
23:18:30dwaitehi brixen!
23:18:33brixenit emits an AST directly from the parse tree
23:18:39brixenhey dwaite
23:18:48brixensomebee: we used to convert sexp to AST
23:19:10brixenthere lies the road to many klocs of sadness and pain
23:19:16somebeebrixen: ok, would it not be ideal to use melbourne directly then, and compile the AST into js? instead of using rubyparser I mean
23:19:24brixensomebee: surely
23:19:33dwaitebrixen: it looks like that digest error I saw was due to the rbx digest impl being sucked into 1.9
23:19:59brixendwaite: I saw you mentioned that, odd
23:19:59somebeebrixen: isn't it relatively trivial to convert sexp to an AST? maybe there is something I don't understand, but it seems clean/trivial
23:20:14dwaiteit seems like 'lib' may be overloaded when you consider the bootstrap phase
23:20:21brixensomebee: depends on how complex your lang is
23:20:38brixensomebee: if you want to see how "easy" it is, go look at older rbx code
23:20:45dwaitebrixen: you upgrade to SL yet, or are you going to wait until 1.0.0 final? :)
23:20:50brixenbefore melbourne was made the default
23:20:57brixendwaite: still not on SL yet
23:21:21somebeebrixen: hehe ok. I was just guessing that brixen needs to do all of the same things
23:22:57brixendwaite: so, we should not use -Ilib while running MRI to bootstrap?
23:23:11brixendwaite: perhaps -Ilib/compiler instead?
23:23:25brixenI'll play around with getting 1.9.1 working to build...
23:25:05dwaitebrixen: gem install rbx, rbx-install, reopen terminal, rbx install 1.9.1, rbx use 1.9.1 = beauty
23:25:47dwaite1.9.1 is my default shell ruby atm so that I can keep getting annoyed by this sort of thing and filing patches to gems :)
23:26:30dwaiteheh, I did my black friday shopping at 3 pm. don't know what people were all up in arms about, didn't seem that busy
23:26:34brixengem install rbx?
23:26:45dwaitegrrm, rvm
23:26:51brixenoh ok
23:26:52dwaiteI got rbx on the brain
23:26:54brixenhah
23:27:17brixenI suppose I should use rvm now
23:27:21dwaiteI can only read rbx in my brain as rubyx
23:27:22dwaitebtw
23:27:35dwaitemake sure you upgrade to gem 1.3.5 first
23:27:47brixenhmm, for me it's arr bee eks
23:27:51dwaiteotherwise.. well, some of the shell scripts are not marked executable, and its annoying
23:27:57dwaitearby x?
23:28:16dwaitethe roast beef executor
23:33:15dwaiteomg. I just realized why they are called arby's
23:33:32dwaitehow did I not figure this out when I was like .. eight?
23:41:35brixendwaite: cus rbx wasn't around when you were eight? haha