From: Daniel Berger Date: 2007-04-02T05:55:51+09:00 Subject: [ANN] Wuby - Ruby for MS Windows! Hi all, I'm happy to announce the first beta release of Wuby (pronounced "woo-bee"). This is a Windows-only fork of Ruby. And yes, the name is meant to be slightly comical. :) What's the difference between Ruby and Wuby? First, much of the underlying code base has been replaced with native Windows C API functions. Many of the Unix-isms currently part of Ruby have been removed, such as File.sticky?, since they don't make sense on MS Windows. Instead, in order to mimic the Windows API more closely, the API has been changed to match it. For example, I have added a File.attributes method that lists the attributes associated with the file, such as 'hidden' or 'archive'. The File::Stat class has been modified to return attribute information. There's also a File::Security class for dealing with Windows ACL style of file security. Second, some of the existing methods that don't work on Windows have been updated or fixed. For example, the File.chardev? class method now works properly. UNC path handling is now done properly. Third, Unicode support! Thanks to the magic of MultiByteToWideString(), you can now pass an encoding as an optional second argument to String.new, e.g. str = String.new("Ελλάσ", String::UTF8). There have been some changes in the String API as a result. For example, the String#size returns the size in bytes (10), while String#length returns the length in chars (5). The encoding will default to your system's encoding, so you won't have to use the longhand notation if you don't want to. The regular expression engine has been altered to work with the new string modifications as well, so you can do "if str =~ /λ/u" and it will Just Work. Fourth, I've updated a bunch of the core methods to work with Windows Vista where possible. For example, Vista now supports symlinks, so the File.symlink and File.symlink? methods now work. Fifth, there was a major overhaul in the socket code. Most of this will be invisible to you, however. The most significant change is that select() no longer blocks! Sixth, the interpreter is now thread safe! That means it has native thread support. This is in addition to Ruby's green threads, so you still have those, too. Thus, there's now Thread.new (green) and NThread.new (native). The NThread API is somewhat different than Ruby's Thread API in order to more closely match the Windows API thread functions. Seventh, and this one is pretty significant, is that I've completely reorganized the standard library. Some packages I felt just weren't worthy of being included in the standard library, some are broken IMO and some are too specialized and/or were Unix specific. Thus, the following libraries have been removed: * Abbrev * CSV * Curses * DBM * DL * Etc * Expect * Ftools * GDBM * GetoptLong * Jcode * NKF * Pty * SDBM * Syslog The following libraries have been modified and/or tailored for MS Windows: * Fcntl * FileUtils * Find * Forwardable * Net::HTTP * Open3 * Pathname * Win32API * Win32OLE The following libraries have been added: * FasterCSV (renamed to just "CSV") * Getopt * KirbyBase Lastly, there were some fixes made for 64 bit Windows. I'm sorry I've had to keep this under wraps for so long. After RubyConf 2006 I connected with Ani Babaian (remember Ani?) and we talked about how Ruby fit into Microsoft's future. It was decided that, while John Lam's CLR work would be the better long term solution, an interim solution would be best in the short term. Besides, John could then base his interface on Wuby instead of Ruby, so it would be a smooth transition. So, with that decision made I began to work, part time and with some funding from Microsoft, on Wuby in my spare time. There were also a couple of programmers from Microsoft who were invaluable, especially Dave Lee, who wrote most of the revamped code for socket.c, and Raymond Chen himself was largely responsible for making the interpreter thread safe. Licensing is undoubtedly on your mind. Not to worry! Wuby is licensed under the same terms as Ruby itself. MS had no desire to try to make this closed source (I would have refused if they had). MS wants to play nice with the open source community, and figures it can make its money back on support contracts (which it will eventually offer) and third party tools, such as IDE's, etc. Well, that's it for now. If you're an MS Windows user, or just curious about Wuby in general, you can find more information at the following links (temporary links until the real web pages are setup soon): Wuby home page: http://tinyurl.com/ywm85w Wuby spec: http://tinyurl.com/jmw44 Enjoy! Dan