[MacRuby-devel] experimental branch: status update

Matt Aimonetti mattaimonetti at gmail.com
Mon Jul 27 00:34:57 PDT 2009


>
> - The strscan C extension was rewritten in pure Ruby and imported into the
> repository. All the specs but one pass and new specs have been written too.
>

Just a tiny clarification, the new Ruby version passes all the Rubyspecs
available upstream, however I added and modified specs to be 1.9 compatible.
One of these new specs relies on file encodings and magic comments which
aren't fully supported in MacRuby yet (the failing spec). So if, you were
planning on using StringScanner, you can start now, things will work well.

- Matt



On Sun, Jul 26, 2009 at 11:52 PM, Laurent Sansonetti
<lsansonetti at apple.com>wrote:

> Here is another status update on the experimental branch. I forgot to send
> this one earlier, sorry.
>
> Highlights:
>
> - Unicode strings! You can now create strings containing multibyte
> characters in your MacRuby programs and apply the String methods on them
> (even regular expressions!).
>
> - Digest extensions (bubblebabble, md5, rmd160, sha1, sha2) are now
> available.
>
> - The readline extension is also available. It means macirb has history and
> editing features again! Unfortunately the bugs are still there, though :)
>
> - The strscan C extension was rewritten in pure Ruby and imported into the
> repository. All the specs but one pass and new specs have been written too.
>
> Changes:
>
> - Fixed a regression in the instance variable lookup.
>
> - IO#gets now returns tainted strings.
>
> - Implemented Fixnum#popcnt, a MacRuby extension to Fixnum that counts the
> number of set bits in a number.
>
> - Fixed a bug in rb_str_each_byte.
>
> - Implemented ByteString#getbyte, ByteString#setbyte, ByteString#bytesize.
>
> - Fixed a bug in the super dispatcher: now ignoring all call stack items
> before the receiver's implementation, to work around false positives in our
> stack check.
>
> - Fixed the compilation of return from a higher level block (ex: 1.times {
> 1.times { return } }).
>
> - Fixed 2 compilation bugs in NODE_OP_ASGN1 (ex: a[1]||=1+1).
>
> - Fixed a compilation problem where the LLVM sret attribute was applied to
> the return value of the C stub, and not the 1st argument as it should be.
>
> - Fixed a lot of broken methods in Process and implemented a preliminary
> fork().
>
> - Local variables used as dynamic variables should now be saved correctly
> even if an exception is raised.
>
> - Implemented Kernel#select and ensured that all the specs pass.
>
> - Re-enabled File#path, File#atime, made their specs pass.
>
> - Re-enabled File#ctime and File#mtime, wrote File#chmod, fixed File.chmod,
> and made them all pass the specs.
>
> - Implemented String#ascii_only? using CFCharacterSets.
>
> - Re-enabled File#truncate and made sure it passes its specs.
>
> - Fixed a pretty severe bug in IO#ioctl. (But if you're actually using
> ioctl, you're insane.)
>
> - Delay the require of -r libs until the compiler is available.
>
> - IO#lineno= now calls to_int on its inputs.
>
> - Made the STDIN, STDOUT, and STDERR constants have a nice printable path.
>
> - Lots of changes to make mkmf.rb work again.
>
> - Fixed a bunch of serious IO bugs (especially in IO.copy_stream).
>
> - Fixed a bug in the way we implemented break inside a block: now cleaning
> the broken_with VM value at the end of the dispatcher to avoid side-effects
> of pure Ruby calls of blocks vs C calls of blocks.
>
> - Unlocked mutexes are now automatically unlocked once the thread that
> locked them dies (rubyspec conformance).
>
> - Now raising an exception when trying to unlock a mutex that is locked by
> another thread (rubyspec conformance).
>
> - Fixed bugs in Mutex#synchronize and thread's unlock all mutexes logic: do
> not raise exceptions (rubyspec conformance).
>
> - Fixed the return value of attribute assignments.
>
> - Fixed String#[] to work if the given range is larger than the string's
> length.
>
> - Implemented Kernel#warn.
>
> - Fixed +[MacRuby sharedRuntime] to initialize the shared compiler.
>
> - IO#write: if the receiver isn't an IO object, dispatches the write:
> selector on it instead.
>
> - Our rubyspec suite now includes library specs. spec:library will only run
> them, and spec:ci will also include them. Very important change: these rake
> tasks are now using the macruby executable (setting DYLD_LIBRARY_PATH to use
> the local libmacruby.dylib) and not miniruby anymore. It means you must
> build macruby before starting these tasks. If you hack on MacRuby, make sure
> to build the macruby:dylib task before starting the specs, otherwise your
> changes might not be taken into account by mspec!
>
> - The digest C extensions (bubblebabble, md5, rmd160, sha1, sha2) have been
> ported to the new runtime APIs and are now compiled and installed. All their
> specs pass.
>
> - Unicode work:  All strings coming from the parser are now compiled as
> unicode character arrays, then we generate CFString objects at runtime based
> on them. The final encoding of these strings is picked by CoreFoundation for
> us. The String#encoding method returns the fastest encoding of the receiver,
> which is generally MacRoman for ASCII strings and UTF16 for strings
> containing multibyte characters. It is now possible to apply regular
> expressions on strings containing multibyte characters, but it is not yet
> possible to create a regular expression containing multibyte characters yet.
>
> This work is still under development and it is not yet compatible with the
> upstream 1.9 semantics of unicode strings. But at least you can create
> unicode strings in your MacRuby programs and use the String methods on them.
> Report us bugs please :)
>
> Laurent
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20090727/15fac264/attachment.html>


More information about the MacRuby-devel mailing list