experimental branch: status update
Hi all, The last status was sent the 4th May, so this one is a bit lengthy. I am sorry about that and I will try to do status updates more often. Before listing the changes, 2 important things happened since and I think they need to be mentioned! - The very first RubyOnOSX conference was held in Amsterdam, Netherlands. I had the pleasure to attend it and it was awesome. There were about 7 presentations on Ruby on Mac OS X, most of them related to MacRuby, and I think that all of them were filmed. Hat tips to Fingertips (Eloy, Manfred and Thijs) for the organization. I heard they are processing the videos right now, if you are using Twitter you can follow http://twitter.com/fngtps for more info. - Patrick Thompson, our intern, started working full-time from the Cupertino offices for 3 months! He will certainly be able to push more excellent work during this period. And now the list of changes. - The format string APIs were re-implemented on top of a LLVM -> CFStringCreateWithFormat() stub. - libffi was removed from the project build, because it's not used anymore! - Implemented assignment to global values in a multiple assignment expression. - The MacRuby Objective-C class was re-implemented. - Finished the save of locals when a block transformed into a Proc leaves the scope of the function where it was created. - Implemented assignment to constants in a multiple assignment expression. - A HACKING file was added, for those interested into hacking MacRuby. (It's still very preliminary). - Implemented yield of splat arguments. - Some work for 10.6 support. 10.6 support is almost as stable as 10.5, but it has a few caveats and it's still not ready for everyone. - Re-implemented the way we push blocks in the VM so that it works with some strange Ruby behavior (such as `def foo(p=Proc.new); p.call; end; foo {}`) and also fixed numerous blocks-related bugs. - Make sure primitive classes can be subclassed again, fixed immutability check. - Improved String#<< and str_modifiable() check. - Fixed a bug when using negative indexes to Array#[] (in the optimized primitive). - Implemented $! as well as the way we save current exceptions in the VM. Also fixed a few exceptions-related bugs. - Fixed bugs in the Method class (principally making sure it's statically linked to the method implementation) and also implemented Method#to_proc. - Fixed Hash.new with a block. - IO work: some ARGF functionality, Kernel#readlines, Kernel#readline, IO#pos, IO#read (bugfix), IO#pipe, IO#foreach, IO#sysopen, IO#bytes, IO#lines, IO#chars, IO#stat, IO#write (bugfix), Kernel#syscall, - Implemented a very basic AOT compiler, which is available via the -- compile command-line option of the miniruby/macruby executable. It compiles the given Ruby expression or file into a binary, by translating the LLVM IR into machine code, statically. The resulted binary does not parse/compile anything anymore. This is a proof of concept and it only supports a limited set of the Ruby language for now, but it will be extended later. - The big roxor.cpp source file (> 11K lines) was split into several small files: vm.{cpp|h}, compiler.{cpp|h}, bridgesupport.{cpp|h}. The codebase is now easier to maintain and also faster to build during development. - Added support for calling pure Ruby method starting with a regular argument then an optional Hash argument. - Fixed the internal str_new() function to not create unnecessary Bytestring objects. - Fixed a lazy JIT bug when dealing with modules included in modules then included in classes. - Fixed a bug when copying Objective-C methods upon module inclusion that have not been resolved (non-JIT'ed) yet into subclasses. - Fixed the overwriting of Objective-C methods accepting an argument whose size is larger than 128-bit (ABI conformance). - Implemented informal protocol method definition. - Fixed several misc bugs in the compiler when compiling Objective-C stubs. - Ported the math.c and random.c files to the new runtime APIs. - Ruby exceptions can now be caught by Objective-C (64-bit only). - Define -allocWithZone: and not -alloc on every new NSObject pure Ruby subclass (IB/nib support). - Allow true/false to be passed as numeric C types. As you can see lots of things changed since the last status update, and the more relevant thing is that the project is now installable again. You can do rake and rake install. We passed several "internal" milestones in order to reach this point. Also, some Cocoa support work was done and several sample code applications work again. Some don't, but we are working on that. The experimental branch is not ready yet to replace trunk, but I think we are progressing well, slowly but surely. If you are interested into installing the experimental branch, keep in mind that: 1) It's not as stable as trunk yet, and the installation will override your previously installed version of MacRuby. It is possible to install experimental then switch to 0.4 by toggling the Current symbolic link within the MacRuby.framework bundle. 2) I do not recommend doing `sudo rake install` because the branch could have some IO regressions and nuke your environment. I recommend doing the following to install the branch: $ DESTDIR=/tmp/XXX rake install $ sudo ditto /tmp/XXX / (This way, the branch is installed into a temporary directory and the install script is not run as root, but the temporary directory is then merged into the system as root.) Our next goal is to make sure we run all the samples and that we fully work on 10.6, the upcoming Mac OS X release. Stay tuned! Laurent
As of revision 1634, my PPC build is still failing in spots. See http://cfcl.com/rdm/macruby/2009.0529.0500 for details. -r ... You appear to be using a PowerPC machine. MacRuby's primary architectures are Intel 32-bit and 64-bit (i386 and x86_64). Consequently, PowerPC support may be lacking some features. ./mspec/bin/mspec ci -B ./spec/macruby.mspec ... (in .../2009.0529.0500/macruby-experimental) MacRuby version 0.5 (ruby 1.9.0) [universal-darwin9.0, ppc] 2009-05-29 05:07:12.116 miniruby[50581:717] *** Terminating app due to uncaught exception 'RuntimeError', reason: 'can't modify frozen/immutable array' 2009-05-29 05:07:12.304 miniruby[50581:717] Stack: ( 2478378432, 2426381548, 1325972, 207312, 201556, 11728, 24660, ... ... 60000000 ensure w/o exception 0.540000 0.000000 0.540000 ( 0.608066) 50000 raise 2009-05-29 05:08:34.144 miniruby[50633:10b] *** Terminating app due to uncaught exception 'RuntimeError', reason: '' 2009-05-29 05:08:34.200 miniruby[50633:10b] Stack: ( 2478378432, 2426381548, 1325972, 214128, ... ) rake aborted! Command failed with status (): [./miniruby -I./lib bench.rb...] ... -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development
Hi Rich, I forgot to mention that 32-bit support is a bit b0rked for now, which is probably what's problematic in your case. Laurent On May 29, 2009, at 1:59 PM, Rich Morin wrote:
As of revision 1634, my PPC build is still failing in spots. See http://cfcl.com/rdm/macruby/2009.0529.0500 for details.
-r
... You appear to be using a PowerPC machine. MacRuby's primary architectures are Intel 32-bit and 64-bit (i386 and x86_64). Consequently, PowerPC support may be lacking some features. ./mspec/bin/mspec ci -B ./spec/macruby.mspec ... (in .../2009.0529.0500/macruby-experimental) MacRuby version 0.5 (ruby 1.9.0) [universal-darwin9.0, ppc] 2009-05-29 05:07:12.116 miniruby[50581:717] *** Terminating app due to uncaught exception 'RuntimeError', reason: 'can't modify frozen/immutable array' 2009-05-29 05:07:12.304 miniruby[50581:717] Stack: ( 2478378432, 2426381548, 1325972, 207312, 201556, 11728, 24660, ...
... 60000000 ensure w/o exception 0.540000 0.000000 0.540000 ( 0.608066) 50000 raise 2009-05-29 05:08:34.144 miniruby[50633:10b] *** Terminating app due to uncaught exception 'RuntimeError', reason: '' 2009-05-29 05:08:34.200 miniruby[50633:10b] Stack: ( 2478378432, 2426381548, 1325972, 214128, ... ) rake aborted! Command failed with status (): [./miniruby -I./lib bench.rb...] ...
-- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841
Technical editing and writing, programming, and web development _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (2)
-
Laurent Sansonetti
-
Rich Morin