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. :slight_smile:

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 L., 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: Gullible Definition & Meaning | Dictionary.com

Enjoy!

Dan

Кросавчег!
Жжош!
Пеши исчо!

Daniel B. wrote:

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. :slight_smile:

Welease Wuby!

Daniel B. wrote:

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.
How is Ani, anyhow? We haven’t heard much from her since RubyConf – er
– WubyConf.


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

On 4/1/07, M. Edward (Ed) Borasky [email protected] wrote:

There’s no such project as Wuby – it’s all Microsoft FUDD!

Roundewfull!
Wobewt

Joel VanderWerf wrote:

Daniel B. wrote:

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. :slight_smile:

Welease Wuby!

There’s no such project as Wuby – it’s all Microsoft FUDD!

Ed (“I’m having wabbit for Easter dinner”) Borasky


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

On Apr 1, 4:41 pm, “Ryan L.” [email protected] wrote:

I was sort of hoping this was one of those clever “looks like an April
Fool’s joke but it really isn’t” jokes.

cvs -d :pserver:[email protected]:/var/cvs/shards login
cvs -d :pserver:[email protected]:/var/cvs/shards checkout wuby

Probably not even 5% of what I discussed is actually done, but there
you go. :slight_smile:

Dan

Dan,

this would be just fantastic news, if it were true :wink: I must confess,
coming from you and if I hadn’t read the replies before doing so myself,
I
would have almost fallen for it.

But, just like the German computer magazine c’t does a April fool’s joke
every year. Often they do become (somewhat) reality in the next couple
of
year. So the question is: What you are supposing sounds really great.
Would
this be useful to Windows devs?

Also, what about calling it WRuby. More ompf.

-se

On 4/1/07, Daniel B. [email protected] wrote:

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. :slight_smile:

LOL. You know this might actually be pretty cool!

I was sort of hoping this was one of those clever “looks like an April
Fool’s joke but it really isn’t” jokes.

Remember that Parrot started as an April Fool’s joke. :slight_smile:

Of course I’m personally working on leaving the Windows world behind
as soon as I can, so maybe it doesn’t matter.

Ryan

On 4/1/07, Daniel B. [email protected] wrote:

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. :slight_smile:

What’s the difference between Ruby and Wuby?

And what are the differences between Wuby and R#?


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

On 4/3/07, Rick DeNatale [email protected] wrote:

On 4/1/07, Daniel B. [email protected] wrote:

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. :slight_smile:

What’s the difference between Ruby and Wuby?

And what are the differences between Wuby and R#?
That is a great pun Rick and I guess I can only copy about the potential
danger.
Did we all forget what almost has happened to Java?

Cheers
Robert