In a feat almost unparalleled in my career, Ruby1.6.6 compiled and installed clean on my machine under Cygwin!
I had to share that with y'all.
Wayne
I had to share that with y'all.
Wayne
cygwin\m68k\bin;c
cygwin\bin;%PATH%Originally posted by _klamath_:
Ruby is awesome...
"Look at our previous argument on this matter, and read my points with special
emphasis."![]()
Originally posted by Agathos:
Well, I just re-read that thread and I have to say I didn't find your points very convincing. They seemed to be personal: lots of "In my experience, in my opinion..." I may well have the same experience, but the only way to know for sure is to learn both Ruby and Python and write non-trivial code in both. Which I will probably do in time...
In the meantime, all I know is that in my dabbling, Ruby code has been pretty, readable, and fun to write.
Originally posted by dockeen:
Hasn't Python been around significantly longer that Ruby?
If so, could some of the maturity of implementation issues be a matter of maturity and be expected to improve?
Ruby, under the covers, still has the look and feel of a program written by a single lone programmer, and while that's the case, it'll most likely stay that way.
Python is making leaps and bounds while Ruby stands still
why Python is gaining things like coroutines and generators while Ruby isn't.
[Python's implementation is] more readable and more consistent, and by those attributes more accessible to people who want to hack on it.
I read a blurb somewhere on Lua. Where does it fall with respect to Ruby, both as a language and as a mass of users, or lack thereof?
Does this qualify me as cave dweller or John Q. Public?
Originally posted by _klamath_:
What parts of Ruby "under the covers" have this look and feel that you refer to?
For instance, the silly type/class distinction,
the need to pass 'self' to every object method explicitely,
the naming of lots of functions prefixed with '__' (rather than, say, access control),
the mediocre C API,
the duplicity of having both lists and tuples (when the functionality of tuples is merely a subset of the functionality of lists), etc.
What about the internals of Ruby bother you?
This simply isn't true. The fact that there are ~5 Ruby books in the process of being published (there were 0 in 2000) is only the most obvious evidence that there are LOTS of people interested in Ruby. Has it hit critical mass yet, or does it have more users than Python? No -- but it's absurd to say it's "standing still". And of course, Perl has more users than both languages combined, and Java dwarfs all 3.
Perhaps because Ruby's design didn't suffer from as many problems as Python's does -- so there's no need to correct them!![]()
But seriously, generators/iterators are (IIRC) directly inspired by Ruby;
I'm not sure how Python is implementing coroutines, but I would suspect the reason that no such radical changes are being proposed for Ruby is that they're no needed.
There is an interpreter rewrite coming up (Ruby 2), but so far, the wishlist includes only a couple major things (native threads, bytecode compilation) -- most of the changes will just be minor, backwards-incompatible API changes to fix warts and the lile. It's not like there is a huge lack of manpower to implement major changes -- simply because they're not needed.
I'd agree with you on this -- Ruby's implementation is mostly hacked on by 3 or 4 language gurus, that's it. Most major changes are implemented by matz (the language creator). However, this is entirely a function of maturity, as dockeen pointed out. Another goal of the upcoming rewrite is to improve the quality/clarity/readibility of the implementation so that future maintainence work is simplified.
Originally posted by dockeen:
A deep left field question. Not long after I first heard about Ruby, I read a blurb somewhere on Lua. Where does it fall with respect to Ruby, both as a language and as a mass of users, or lack thereof?
You mention later in your post that Ruby is up for a major rewrite. One of the main reasons you list for such a rewrite is to improve the "quality/clarity/readability" of Ruby's implementation.
Which, um, doesn't exist anymore since 2.2.
Rather than having an extra syntactical construct for referencing member variables, like Ruby does? I'll take Python's way any day.
How do you suggest allowing classes to override operators without introducing extra syntax for it?
code:<HR>Code:anObj['foo']
In what ways? At the very least it's far more consistent than Ruby's C API -- Ruby's api has a number of (in my opinion) awkwardly named functions, some of which have no prefix, some of which have a "ruby_" prefix, some of which have an "rb_" prefix. Such a diversely named API really doesn't lend a feeling of maturity to the language.
Tuples are immutable. Lists are mutable. Aside from the several obvious optimizations that are possible with tuples that aren't possible with lists, it additionally allows a unified interface for tuple decomposition and, say, function argument access.
Just as one example -- Ruby doesn't compile to bytecode.
[Python]'s been ported to Java
Originally posted by _klamath_:
Yes, I'll admit that the general impression is that the current Ruby implementation is a bit inaccessible to most Ruby programmers. It's implemented almost entirely in C (whereas some people are talking about a Ruby-in-Ruby design), and as I said before, is mainly hacked on by matz. I'm not too worried about this though, because there really aren't many issues with the interpreter proper. I really can't think of a major language feature or syntactic sugar I'd like to see in Ruby -- what is really needed is more applications, libraries and documentation.
My bad -- my info on Python is a bit out of date. But this is an example of what I was referring to: this problem didn't need fixing in Ruby.
What's wrong with more syntax? The goal of a language's syntax is to communicate information. Rather than forcing the programmer to laboriously type in verbose syntactic cruft to work around a language limitation, I'd much rather use a simple prefix of '@'. This makes the intent much more clear, and helps the programmer to easily distinguish between member variables and lexical ones.
First, I'm quite skeptical about operator overloading. But in Ruby, it is implemented without requiring extra syntax: for instance, you can define the '[]' method on an object/class. That means that this code will work:
Quote: "
anObj['foo']
"
Similarly, defining '[]=' will allow assignments as above to work.
All the commonly used Ruby API functions begin with "rb_". Again, you seem to emphasize naming and fairly superficial aesthetic concerns over functionality. As for the API itself, the main thing that iritates me about Python's C API is the need to do manual reference counting. Beyond that I haven't looked at it closely enough to be able to comment.
Quote: "Tuples are immutable. Lists are mutable. Aside from the several obvious optimizations that are possible with tuples that aren't possible with lists, it additionally allows a unified interface for tuple decomposition and, say, function argument access.
"
What optimizations can be performed due to this distinction?
Can you explain what you mean by the end of the 2nd sentance?
In any case, it seems that the benefit of these 2 data types is clearly outweighed by natural drawbacks of introducing a new data type, with special syntax to learn (which is something Python programmers typically evangelize about).
Quote: "Just as one example -- Ruby doesn't compile to bytecode."
I would think that the performance impact of this is basically negligable (parsing hardly requires a lot of CPU time).
In any case, this is one of the issues that is going to be rectified in Ruby 2 (and/or the Ruby parrot stuff).
I was referring to this one, of course:Originally posted by jemfinch:
I don't quite know if we're referring to the same thread, since the thread I'm
referring to is on http://www.linuxnewbie.org/.
But, of course, Python won't be standing still during the time Ruby is resolving this issue. By the time Ruby compiles to bytecode, it's likely that Python will have leapt forward by a whole new set of capabilities