Domain: ruby-lang.org
Stories and comments across the archive that link to ruby-lang.org.
Comments · 349
-
Andreessen gets it wrong it again
-
Re:XML?
ruby-xslt is still being developed. New version released just last week.
And yes, speaking as one of the developers - it could use some polish. -
Oh, great.Fortunately, Python 2.5 is going to have context managers with a much nicer syntax than the Ruby syntax [...]
First, by "much nicer syntax" you must mean "with a syntax that I'm already used to." (OTOH, I spend all day programming Scheme, so you probably think I'm a loony anyway when it comes to syntax.)
Anyway, yeah. The Python language is going to be revised to add yet another special-purpose feature and syntax to do yet another specific thing that any language with closures can do trivially with a higher-order function, without any revisions to the language.
And then it's going to take a while for the revisions to be available in all of the implementations of Python, and for third-party libraries to catch up with the language and implement APIs that use this feature. Sure. Sounds great.
Same story with list comprehensions, generators and generator expressions. Ruby, Scheme, and other such languages don't have any of those. Instead, they've had anonymous lexical closures since the start. For example, Python required a new language version to implement generators; in Ruby, the same functionality was implemented as a standard library, and to boot, it was implemented in Ruby itself.
-
Screw Perl 6
Seriously... I once thought it was going to be something but not any more. The whole design is moronic.
Hey Larry! Dumbass! Everyone has moved on. Loads of people are using Python (although I don't know why, blech). People who know what they are doing and understand what made Perl so great are using Ruby... and PHP is out there too. -
Perl 6 is a mistake.I've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.
One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespacethank you very much).
The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.
Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. It's like Ada all over again! The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.
On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?
I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.
Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying.
-
Perl 6 is a mistake.I've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.
One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespacethank you very much).
The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.
Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. It's like Ada all over again! The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.
On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?
I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.
Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying.
-
Re:Not so fast
It's not perfect, but it represents a lot of what people have learned from experience. Apple is using a version of C that fakes object orientation through a runtime and some clever preprocessing. Nobody expected objective C to be around in the year 2005.
I don't know about the rest of the comment, but this statement is completely wrong.
Objective C may be ancient and cryptic but it is and always has been fully OO. It's dynamic which means you can generate classes / subclasses / methods on the fly. Not something that C# or Java could do.
On a side-note, I used to think that these dynamic language features are too clever to use, but Ruby and Ruby on Rails have convinced me otherwise. -
"future of cross-platform development"
-
Re:uh-oh
And, BTW, you are way off topic. This article is about PHP frameworks. Let me explain to you. PHP is considered by some to be an excellent language. However, differently from Ruby, PHP users are ready to acknowledge its shortcomings. So, how can we make PHP a better language? Frameworks are one kind of solution.
Well, we're not really THAT far off topic. The reason that the OP doesn't want to use Rails is that they don't want to learn another language. That's a good reason on the surface, but to those of us who have made the leap, it's absurd. As many have pointed out, if you know PHP or Perl, the learning curve of Ruby is really shallow. You can get the basics in a few hours, and be quite proficient in a few weeks. And once you've taken the leap, you WILL be more efficient on 99% of tasks. So rather then being off topic, we are pointing out that the entire question is based on a flawed premise.
I'm not qualified to really explain the technical advantages & disadvantages of Ruby vs. PHP. But there's a high level overview of what's great about Ruby on the Ruby website. If you want more, the first edition of the excellent Programming Ruby is available for free online. You could easily scan through the first chapter in half an hour, and it touches on all the major parts of the language. If you're honest about your curiosity about Ruby, then I highly recommend you spend a few minutes & scan the online docs. You won't be disappointed. -
DSL-friendly languages
I'm guessing that the future of programming lies within languages in which you can easily define a domain specific language to solve your problem. Good languages to write DSLs: Lisp dialects, Ruby, Factor, Smalltalk. When code is data, you have a really powerful language. That's where the future lies IMO.
-
Re:Ruby on Rails
First, Rails is in Ruby. If you never used Ruby, you may think it's not a big deal. If you did, you're probably interested in Rails now, because you love Ruby.
But even if you don't care about Ruby, Rails is amazing because... well, instead of bogging you down with boring hype, I'll point to the videos on the official page (they're much cooler hype). Seriously, watch them. -
Perl6 is a mistakeI've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.
One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespace thank you very much).
The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.
Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.
On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?
I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. To put it bluntly, Perl scripts will still look less beautiful than our friend Mr Goat.cx. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.
Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying. Larry is buggering it up the ass without lubricants, just like Shoeboy is doing to Larry's daughter.
-
Perl6 is a mistakeI've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.
One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespace thank you very much).
The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.
Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.
On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?
I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. To put it bluntly, Perl scripts will still look less beautiful than our friend Mr Goat.cx. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.
Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying. Larry is buggering it up the ass without lubricants, just like Shoeboy is doing to Larry's daughter.
-
I use Ruby.
It works very well. There is an interpreter for Win32.
-
Language Bigot Alert!
My advice to everyone who wants dynamic websites is to use PostgreSQL for the database, it supports more of the SQL standard. But don't use JSP, use Ruby and Rails.
There are many reasons why I would give this advice:
- Java is not Free as in Freedom. This might not matter to some, but it does matter to me.
- Web applications in Java require complex application servers like Tomcat or JBoss to run.
- There are half a billion different web, database, and other "frameworks" out there for Java, and they nearly all incompatible with each other. You'll spend a week figuring out how to publish a SOAP call using JAX-RPC, for example. Spring, Hibernate, EJB, Tapestry, Torque, Struts... so many crappy ways to do the same thing!
- Java forces you to love duplicating things you've expressed in code in myriad XML configuration files.
- Jerks like this.
I always think of Java as more of a distraction for CS students and developers who like to secure their jobs behind layers of complexity and expensive purchases of commercial software ("we paid thousands for this, now we have to use it!"). This probably accounts for the success of Java in the corporate world.
Huge, enterprise applications can be written in any language; hell, Yahoo! runs on PHP for god's sake, as does Lufthansa's ticketing system. Languages are languages. What makes a "real" one in your eyes? The only thing you should be concerned about is code quality. Whether a language is interpreted or byte-compiled really means nothing.
-
Re:Not a cron replacement, a init replacement
They use XML because they never heard of YAML or other more appropriate solutions for their configs.
Like many others, I fell for the XML hype (and I even got XML Developer certified by IBM) and I have about $200+ worth of XML-related books.
Despite this, I use YAML 95% of the time in new projects because it is much more practical than XML. Think of YAML as providing 80% of XML benefits while being much more friendly to hand-editing in plain text editors (which is what many of us do with config files).
And no, I'm not involved in yaml.org or any of their projects--I'm just a satisfied developer who found YAML when I started using Ruby this year (which has built-in support for YAML).
Try it and see your productivity skyrockit. YAML will make you more productive.
http://www.yaml.org/
http://www.ruby-lang.org/ -
Ruby Rocks !If you haven't used it, you might want to give Ruby a try.
I was stunned when I used the Ruby on Rails package and had content driven web-apps up and running in a few hours, without the headache of deployment descriptors and no need to wrap them up in War/Jar/Ear files.
The language and it's syntax are VERY lean and elegant. It's almost as if Ruby is what Java could have been (without the bloat)
And with the GUI, Database, XML, Network, and the rest of the other bindings it is fairly complete runtime environment.
-
Re:Advantages?
If you don't already know Python, I suggest (as an alternative) Ruby ( http://www.ruby-lang.org ) and Ruby on Rails ( http://www.rubyonrails.org ). I personally prefer Ruby as a language over Python. I wanted to learn a new language for server-side web programming, and took a month to do my research on all sorts of dynamically-typed languages. Though currently less popular in the US than Python, Ruby is much better -- in my opinion. (No language flame wars, please.) I almost chose Python purely because of Zope, but after looking into Zope for a week I didn't "get it", and I went with Ruby. And then...Ruby on Rails came out. Holy cow, it is AMAZING. It's like programming with butter. (Whatever that means.) All yesterday as I worked with it I repeatedly caught myself grinning because it was so easy, so simply, and so joyous.
-
Gifts
-
Re:...okay...If del.icio.us changes its terms of service, you are stuck. If del.irio.us changes its terms of service, you (or someone else) can fork.
True enough, but if and when that day comes, duplicating delcio.us will problay take half a day using a decent language and framework.
In the meantime, the real value of del.cio.us are the collaborative data. It's the network effect of many people using a common resource. Split that resource up into disjoint sites, and the value is diminished.
Just make sure you backup your bookmarks, and you should be good if things change.
-
Don't forget to take a look at Ruby
Since you have the luxury of not having locked yourself into a language, you have the ability to survey all the offerings out there, whether minority and up-and-coming, or well-known and entrenched.
After considering various languages to switch to for my scripting needs (ironically, it was prompted by the fact that PHP won't handle unsigned integers), I took a look at Python and Ruby and thus I would suggest taking a look at Ruby. I was one of those people turned off by Python's "significant indenting", and some other quirks. Ruby has a heck of a lot of niftiness beneath the surface.
Here is a ruby-gtk+ faq. I am currently studying Ruby on Rails myself, and lovin' it! -
Re:Already ditched
OutputStream out = new FileOutputStream(filename);
next?
I have seen this little gem while learning Ruby, which realls shows how simple it is to code in such a dynamich language. The full functional program is a multithreaded server that offers the time to anyone connecting to port 1234:require "socket"
How much code would this be in Java? I have not tried it, but it shure will be a hell of a lot more complicated.
server = TCPServer.new(1234)
while (session = server.accept)
Thread.new(session) do |my_session|
my_session.puts Time.now
my_session.close
end
end -
perl6 is a mistakeI've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.
One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespace thank you very much).
The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.
Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. It's like Ada all over again! The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.
On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?
I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.
Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying.
-
perl6 is a mistakeI've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.
One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespace thank you very much).
The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.
Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. It's like Ada all over again! The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.
On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?
I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.
Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying.
-
Lost opportunity15 years ago I briefed a room full of programmers on our new corporate initiative to migrate from VAX/VMS to UNIX. We (management) thought that open computing was the way of the future.
One person resigned pointing out that his chosen career path was VMS programming. UNIX has no future he told us. I'll bet he isn't programming VMS any more.
You just made the same mistake as that programmer.
C# will probably die since the world now has ruby but you should never miss the opportunity to add a new skill to your resume.
-
As a frequent BASH user...
...I feel impelled to chip in and mention that your choice of the term "shoots up" is a singularly - albeit probably subconsciously - appropriate description of BASH. (-:
It doesn't look quite as much like the result of a dodgy serial connector as, say, TECO (think "vi with the Shift key stuck down" :-), but it's close enough to represent a fairly strong incentive to use Ruby for all of your scripting. -
Flash is till easier
It's still easier to make a program like this in Flash; you can use ruby for a command line version. Why do you think so many are flocking to Flash now. MX 2004 Pro can do amazing things with very little work! And the next version is going to be better.
That's why I hold out hope for native flash compiling solutions like Flirt.
But it's not enough to have Flash being able to be run natively, we also need a free Flash IDE. That's where good OOP scripting languages like Ruby and Flash extensions like Ming/Ruby come in handy. With the mix of the two you can make an open source Flash IDE, using Flash as the interface elements (an interface made in flash that sends the variables on) that could send out all the info through Ruby, which would then compile the .swf for you and viola'! a Flash IDE made from Flash to compile Flash.
Now all we need is people to help Ming and all the sub project, Ming/php, Ming/Ruby, Ming/perl, et cetera, to keep up with the file format specs released by Macromedia. -
Re:What's the flaw again?
Turning everything into an object in a procedural language like Java would have a tremendous negative impact on performance, since currently there aren't practical optimizations to take care of that. Such a hypothetical language would be an immediate failure, even though it might look ellegant.
Funny, I seem to have heard of some real, practical languages where every variable is an object. -
Re:Offtopic - Ruby
why's (poignant) guide to Ruby A very cartoonish introduction to Ruby and programming in general. This one hides complexity of the language at first, but goes into more detail later. It uses interesting analogies and stories to keep the whole thing interesting. Has been praised all over the place. Programing Ruby, The Pragmatic Programmer's Guide annotated version The first edition of the definite Ruby programmer's in-detail book. I learned Ruby using this and enjoyed doing so. Make sure to try out lots of code in IRB while you read it. This version has been annotated so you can easily find places where the language changed since the first edition was released. The second edition is better than ever and you will have to pay for it. Many people happily did so, even if they already had a physical copy of the book. RubyDoc A short and fast introduction to Ruby. Teaches you how to learn by yourself, using IRB, Ruby's amazing interactive code interpreter. Introduction to Ruby Another relatively rapid introduction. Not too much to say about it, but it looks straight-forward. A little Ruby, a lot of Objects While this is more of an introduction to OOP in the world of very dynamic languages, it uses Ruby to express its samples. Definitely worth a read to see just how easy things like meta programming are done in Ruby.Wheres a good tutorial site? (multipule if possible)
Programming Ruby: The Pragmatic Programmer's Guide, Second Edition I already hinted at this in the above list. Definitely worth getting, has all the details. You can either buy this from your local evil overlord mega corporation or directly from the Pragmatic Programmers who are also offering a PDF version on their site. The Ruby Way This goes a long way to explain how to do specific programming tasks in Ruby. It's a slick read and the code sample will usually show insightful ways of using to the language in powerful ways in detail.Any books worth reading?
There's more than these, of course, but these will definitely get you started.
Ruby-Doc Collects lots of documentation of Ruby on one single site. RedHanded Coming from the same guys who brought you the poignant guide to Ruby this is already guaranteed to be a very interesting read. One of the nicest Ruby weblogs there are right now. Also have a deeper look at his Links sidebar, it contains lots of good stuff. Ruby Application Archive Contains lots of interesting Ruby libraries. A nice place to start research. Has been largely superseded by RubyForge These guys offer free Ruby project hosting. You get everything from a bug tracker to CVS access and automatic geneGeneral resources sites?
-
Re:why onLAMP?
-
More on Ruby
The Ruby language home page is here, and the main reference book is the Pickaxe (from the Pragmatic Programmers)
-
Re:Ruby
Yes yes, burn me +1 redundant...
:-) -
Re:Heh
-
Re:Several frustrating points
- No decent scripting language? In Unix? What do you suggest? BASIC? JCL? Microsoft's batch language?
Unix needs something like MSH, I think.
Of course, there are plenty of good scripting of languages for Unix. The question is whether we need some higher-level glue between scriptable components, and I think we do.
-
Quantian articleI own the quantian.org domain. The following is from my article on the Quantian Distribution. Here is a brief run down of links, programs, and other goodies in Quantian.
- R, including several add-on packages (such as tseries, RODBC, coda, mcmcpack, gtkdevice, rgtk, rquantlib, qtl, dbi, rmysql), out-of-the box support for the powerful ESS modes for XEmacs as well as the Ggobi visualisation program;
- A complete teTeX, TeX, and LaTeX setup for scientific publishing, along with TeXmacs and LyX for wysiwyg editing;
- Perl and Python with loads of add-ons, plus ruby, tcl, Lua, and Scientific and Numeric Python;
- The Emacs and Vim editors, as well as Gnumeric, kate, Koffice, jed, joe, nedit and zile;
- Octave, with add-on packages octave-forge, octave-sp, octave-epstk, and matwrap;
- Computer-algebra systems Maxima, Pari/GP, GAP, GiNaC and YaCaS;
- the QuantLib quantitative finance library including its Python interface;
- GSL, the Gnu Scientific Library (GSL) including example binaries;
- The GNU compiler suite comprising gcc, g77, g++ compilers;
- the OpenDX, Plotmtv, and Mayavi data visualisation systems;
- it includes apcalc,aribas,autoclass,
-
Please don't try this...
...at home. Seriously, recommending C++ or Java as introductory languages is IMHO a really bad idea. Both languages suffer from design problems that will take a lot of fun from the learning experience.
C++ is probably the worst choice besides C or Assembler (not talking about Braindead et al :) for learning a new language. With manual memory management, heavy generic programming (templates) and mostly speed-optimized libraries (easy interfaces vs. performance) C++ is the heavy machine gun of languages that can be very difficuly to handle...
Java does sufficently abstract low-level aspects of programming and thus is often used as introductory language, but in my experience teaching it at my university I noticed one huge problem that's very difficult to get over: the massive SDK, with it's miles deep object hierarchies, doesn't make sense for people not yet thinking in object oriented terms (arguably it does for the rest ;). It's too strict in this sense, at least for learning purposes. Take a look at the Java version of Hello world, does this look intuitive?
Lua might not be a good choice either, as it is very lightweight (missing some nice functionality you might better get a grip of early on).
Personally I would recommend Ruby (the cleanest language around) or Python (also very clean, with more mature community support) for a start. Both offer everything necessary to develop computer games... -
Book is five years old, whew...
...one of the nice things about Ruby is that Dave Thomas and Andy Hunt keep Programming Ruby up to date. The second edition just came out, and it's a good one.
If you're using Ruby or are interested in using it, it's an excellent written by someone who's very active in the Ruby community. -
Re:Started with QBasic
You could give Ruby a shot.
-
Re:First edition is available online.
And here they are converted to actual links:
Ruby Home
http://www.ruby-lang.org/
Ruby Forum (new! primarily for beginners)
http://www.ruby-forum.org/bb/
Ruby Online Docs
http://www.ruby-doc.org/
Ruby Project Archives
http://raa.ruby-lang.org/
http://rubyforge.org/
Ruby Package Manager (easy to install ruby apps)
http://rubygems.rubyforge.org/wiki/wiki.pl
Ruby IDE (free!)
http://freeride.rubyforge.org/wiki/wiki.pl
Ruby One-Click Installer for Windows
http://rubyinstaller.rubyforge.org/wiki/wiki.pl
Ruby IRC channel
#ruby-lang at irc.openprojects.net
Ruby Newsgroup
news://comp.lang.ruby
Ruby Links
http://www.rubycentral.com/links/index.html
http://dmoz.org/Computers/Programming/Languages/Ru by/Software/ -
Re:First edition is available online.
And here they are converted to actual links:
Ruby Home
http://www.ruby-lang.org/
Ruby Forum (new! primarily for beginners)
http://www.ruby-forum.org/bb/
Ruby Online Docs
http://www.ruby-doc.org/
Ruby Project Archives
http://raa.ruby-lang.org/
http://rubyforge.org/
Ruby Package Manager (easy to install ruby apps)
http://rubygems.rubyforge.org/wiki/wiki.pl
Ruby IDE (free!)
http://freeride.rubyforge.org/wiki/wiki.pl
Ruby One-Click Installer for Windows
http://rubyinstaller.rubyforge.org/wiki/wiki.pl
Ruby IRC channel
#ruby-lang at irc.openprojects.net
Ruby Newsgroup
news://comp.lang.ruby
Ruby Links
http://www.rubycentral.com/links/index.html
http://dmoz.org/Computers/Programming/Languages/Ru by/Software/ -
It is extremely important to mention Parrot
Can I get any advice? Is Ruby really "more powerful than Perl and more object oriented than Python" - is this what I'm looking for, or should I put it off and learn Python first?
No, it is not more powerful than Perl. But than again, nothing is. The points is not what is more powerful per se, but rather which is more powerful in your hands and which one best fits your own brain. At this point it is extremely important to mention Parrot: "The amazing project [...] to really unite Perl and Python one day (not to mention Tcl, Scheme, Forth and Ruby, to name just a few)."
Perl, Python and Ruby, while not the only ones, are certainly the most important languages for the Parrot development. Parrot will not be considered ready until all of them are fully supported, and at this point Parrot will be their main target Virtual Machine, running each of them and allowing them to interoperate. At this point it won't matter which of those languages you personally use, because whatever you choose you will still have access to all of the libraries and module, class and object, of each of them.
Few years ago I will tell you: "go for Perl because of CPAN." Now my advice woule be: "go for whatever you please, for in few years it won't really matter. We will be able to work on the same project, write the same application. I will write my part in Perl 6, you will write yours in Ruby, someone will write in Python and another one in Scheme. We will all subclass our classes, invoke our methods, use our objects, and we will produce a single, monolithic Parrot application anyway."
Just imagine picking up some fresh, young and cutting-edge language designed weeks ago--or even designing your own language--and having every module from CPAN available at once, working just fine using your new language syntax. This is the future Perl, Python and Ruby. Interoperation instead of competition.
-
"an intense C++ AI programming contest"
-
Have you tried Ruby?
I really think that if you're coming from Perl you'll prefer
Ruby to Python. No indentation hassles with Ruby, for example. You'll also like the way Ruby does OO compared to Perl OO. More Rubilicious links...
Also, The Pragmatic Programmers have released a new edition of Programming Ruby that's a great intro and reference to the language - go buy it from their website.
Ruby: Because I can't wait around for Perl 6 to get finished -
Nice comment on Tcl> I use Tcl for everything not involving
> low-level things or speed.
I feel the same way about Ruby. It's just not worth the hassle of plowing thru 20 lines of try catch blocks in Java when I can do something likeFile.read(myfile).grep(/foo/).size
with Ruby. Good times! -
Re:For those who wish to buy this book
Why argue over "Coke or Pepsi" when you can try a fine wine?
And you can do web development faster than you ever thought possible. just watch. -
Using Fortran, eh?From the article:
...complicated software written in a computer language called Fortran...
Huh. Not Java, or maybe even Ruby? What's the maintenance burden like for a large body of Fortran code? -
Re:Java is not back
SUN has done an amazing job in extending Java even to include generics without breaking backwards compatability. Yes it did not lead to the solution that is technically and internally the most efficient (it would have required changes to the JVM), but the developer is not affected. Internally it is solved by typecasts, but who cares?
I care. To me, Java has two arguments in its favor vs Python: execution speed and jobs available.
The former is being eroded. Really, the only application I can think of where Python's execution speed worries me is for a 3D engine I'd like to do. But with psyco, I found that the Python version of lesson 10 of the nehe opengl tutorial gets 140 frames-per-second to Java's/LWJGL's 180 (though not 'out of the box', I had to level the playing field by turning on the same opengl features for both versions). I'm still leaning slightly towards Java for this project, as I wonder that the performance gap won't become more pronounced with a real game engine that does more than just feed polygons to my graphics card.
As for jobs, I'm deciding whether I would really want another Java job. Java's not fun for me, but I digress.
Getting back to Sun, they broke backward compatibility from 1.3 to 1.4 for assertions. Why did they not do the same for generics when it would have improved performance? You'd think they would have, since there have been stories circulating of
.NET's superior performance (true or not). I think generics were rushed into Java to compete with C#. The JVM was left alone, not to preserve backward compatibility (which Sun has broken before), but because there was no time to add this feature and still ship Java 1.5 in a short enough time-frame to preserve Java's waning mind-share.".NET is years behind and plans to bring similar features only in 2007 (generics)."
Incorrect. C# has generics right now.
Also, I like that C# can allocate stuff on the stack and allows 'unsafe' code to use pointer arithmetic. These are all boons to performance, and performance is why you use C# or Java (buzzword-compliance notwithstanding). If you want to innovate or be spookily productive you use something else.
-
Re:You haven't heard about "taint mode"?Taint mode is not unique to perl. It also exists in Ruby, at least.
As for SQL injection problems: I'm avoiding them by using a self-built API that is based more closely on the relational model than SQL is. That makes it trivial to write safe code, even without prepared statements. The basic problem of incompetent programmers still remain, of course - it is non-trivial for somebody to learn a relational API instead of SQL, and writing a relational API is even less trivial (and I'm not going to release mine until I feel it "complete", as I can't field the noise involved.)
Eivind.
-
Re:I think the world has finally left me behind
Jeez, how many times am I going to see this claim repeated over and over? Perl and Python ARE NOT INTERPRETED LANGUAGES! They both compile to a bytecode (intermediate) language which is then interpreted, just like Java/C#, and thus share the same advantages you mentioned. Python I know was a bytecode compiled language from its very beginning, it was never an interpreted language, and Python at least has Psycho, which is a kind of just-in-time compiler for Python bytecode, which can convert a lot of Python code (but not all) into native x86 instructions.
Care to provide some links? From what I can find, Python is interpreted, Perl is interpreted, and Ruby is interpreted. Now perhaps they mean something different when they things like, "Ruby is the interpreted scripting language," or, "Python is an interpreted, interactive, object-oriented programming language," but to me that says "interpreted". That the interpreter may JIT compile the script into a faster bytecode during runtime does not necessarily make the languages non-interpreted. Java and C# need to be explicitly compiled. Python, Perl, and Ruby do not.
So, care to back up your statements?
-
Calling Python from Ruby
On-going from my previous reply, I should also point out for all those existing python programmers who are concerned they might miss a particular module that they really really need:
ruby-python: Ruby/Python is a Ruby extension library to embed Python interpreter in Ruby. With this library, you can use the libraries written for Python in your Ruby scripts.I've never used it so can't comment on its effectiveness, but would be interested if anyone has any comments.