From Why Not Ruby to Screw Python Hello Ruby

By Xah Lee. Date: . Last updated: .

My evolution with Ruby. Written in different years. (check the date) From “why not ruby” to “hello Ruby”.

Why Not Ruby?

Spent about 3 hours looking into Ruby language today.

The articles i read in detail are:

The Wikipedia gives the best intro and overview in proper context. The “Ruby in Twenty Minutes” is just 4 pages. It give you a very concrete intro to Ruby's syntax and semantics. Stevey Yegge's blog doesn't teach much and rambles, but provides a little personal view. I read it because his opinions i respect.

Will you learn Ruby?

No. For practical application, the lang is some 100 times less libraries or other support than each of Perl, Python, JavaScript. For academic study, functional langs like {Mathematica, Haskell, OCaml, Erlang, Oz}, are far more interesting and powerful in almost all aspects. Further, there's also {Perl6, newLISP, Clojure, Scala, …}. With respect to elegance or power, these modern lang of the past 5 years match or exceed Ruby.

See: Proliferation of Programing Languages .

Do you think Ruby lang is elegant?

Yes. In my opinion, better than Perl, Python, PHP. The syntax is clear and simple, basically in a few hours you feel you know the whole language (similar in situation to Scheme 5 lisp (R5RS)). As a high level lang, it's far better than {Java, C, C++} type of shit. However, i don't think it is much better than Emacs lisp, Scheme lisp, Javascript. Note that Ruby doesn't have a spec, and nor a formal spec. JavaScript has. Ruby's syntax isn't that regular, nor is it based on a system. Mathematica's is. [see Concepts and Confusions of Prefix, Infix, Postfix and Lisp Notations] Ruby lang's semantic power is probably less than Scheme, and probably same as JavaScript, but far less than functional lang such as OCaml, Haskell, Mathematica.

I also didn't like the fact that Ruby uses keyword like “begin”, “end” to indicate code block much as Pascal, Visual Basic, Logo, Bash, do. I don't like that.

Won't Ruby be a interesting learning experience?

Not particularly. Ruby's semantics is pretty much identical to Perl, Python, PHP. There is nothing new in Ruby, when compared to Perl, Python, or Emacs lisp, Scheme lisp.

I am a expert in Perl and PHP, and have working knowledge of Python. I already regretted having spent significant amount of time on Python. (roughly over a year since 2005) In retrospect, i didn't consider the time invested in Python worthwhile.

(I learned no new language features or concepts from knowing Python. Python's syntax is much better than Perl. Python semantics is much clear and easier to learn than Perl too. Its doc is arguably less usable than Perl. (Python's simplicity advantage in comparison to Perl can be easily seen here: Python Tutorial, Learn Perl in 1 Hour .) The language power are the same. As it turns out, i don't like Python and Guido cult. Python, like Perl, as i have found out in dismay, is also culty, and has high computer-sciency and OOP pretension over genuine simplicity and practicality (in this regard, Scheme lisp and Haskell's computer science association is actually genuine, and PHP, JavaScript's practicality is solid). Python has a anti-functional programing attitude. It supports even less functional programing than Perl. Backward incompatible Python 3 is heading for mumbo-jumbo of iterators, list comprehensions, views … (Guido has no understanding of functional programing and doesn't like it [see Lambda in Python 3000]))

Do you recommend new programers to learn Ruby then?

Not particularly. As i mentioned, if you are interested in practical utility, there's already Perl, PHP, Python, JavaScript, which are all widely adopted in the computing industry. If you are interested as a academic exercise, there's Scheme lisp, and much of functional langs such as OCaml, Haskell, Mathematica, which will teach you a whole lot more about computer science, features of language semantics, etc.

Do you condemn Ruby?

No. I think it's very nice, but today there are too many new languages, some are arguably more elegant and powerful than Ruby. See: Proliferation of Programing Languages.

Should I learn Ruby?

If you are leaning a new lang primarily to increase your employability or programing experience, then Ruby will not be of use. Learn PHP, Perl, Python, JavaScript, Visual Basic. Each of these are widely used in the industry, which means large number of libraries, integration to other systems, support, etc.

If your purpose is personal edification and exploration, and if you do NOT already know one of {Perl, Python, PHP}, then i recommend Ruby. As a lang, it is better than Perl, Python, PHP. If you do already know one of the above, then i recommend learning Emacs Lisp, JavaScript, instead. Emacs lisp will teach you lisp's features, in particular lisp's concept of treating variables as symbol (and thus lisp macros), and a uniform syntax system, with immediate practical utility in text processing and writing emacs commands that helps your daily text editing tasks long term. (See: Text Processing: Emacs Lisp vs PerlEmacs Lisp Tutorial. ) Javascript is a necessity in web app field. Its syntax is pretty conservative (C-like syntax) and semantics is very clean. It is becoming one of the standard scripting lang in many niche areas.

Or, you can learn Scheme lisp that has some 30 years history in academic teaching and language research. If you are interested in learning exotic concept in functional lang, there's lots of choices: OCaml (F#), Erlang, Mathematica, each of these are rooted in the industry in niche areas. (For example, OCaml in automated theorem proving systems, Erlang in fault-tolerant and distributed systems, Mathematica in math and physics research.) For functional lang primarily used in academia, there's Oz, Haskell. For very new functional lang primarily intended for industry, with user base similar to that of Ruby, there's Clojure, Scala, and even Perl6.

Some context: I'm a expert in {Mathematica, Perl, PHP, emacs lisp}. I have working knowledge in {Python, JavaScript, Java}.

Screw Python. Hello Ruby

Background: coding perl in a day job 1998 to 2002. Learned python in ~2004. Hated perl for its unix drivel and Larry Wall snake oiling shit. [see Larry Wall and Cults] I thought python is antidote to perl's ways. It turns out, python is a cult of a different kind. But worse, it is actively anti functional programing. So, if your coding habit is FP, it's a pain in the ass in python. In fact, worse than Perl. Also, python doc is actually WORSE than perl in practice, despite that perl's is intentionally littered with drivels and obfuscations.

Been smelling ruby since the ~2008 Ruby On Rails shit. Heard great things about it from people i trust. But resisted learning it, because i don't plan to spend another few years to learn something that is really the same as perl and python. Plus, ruby didn't support unicode.

but now, since i love langs so much, i don't see reason not to. Latest Ruby support Unicode well now. Never learned much of Python anyway, other than writing some scripts for text processing my site. The precious time that's meant to be spent on something i really should such as OCaml, math proof systems (HOL, Coq) and practical JS/DOM, never really happened that much. And lately been reading more python doc, and am reminded what shit python is.

Ruby the lang, i knew for sure is better than perl and python. The question remains is whether its community is culty. I have a sense it's at least not as bad as perl/python. It's a lang from Japan….

Ruby is Just Fantastic

Ruby is just fantastic. Spent a total maybe 8 hours in past days reading its doc/tutorial. Far better than python and perl.

my feeling is exactly the same as Steve Yegge blog A Quick Tour of Ruby. Don't like perl? there's python. Why O Why the world needs Ruby? Then, you learn a bit about Ruby and it just blow python and perl off the earth. No wonder it rose up among so many coder geeks. Plus, its doc and tutorial is beautiful. Unlike the perl cult SCREW littered with inane litanies, or the python screws with “comp-sci R Us” incomprehensible screw.

to be sure, Ruby lang is not too diff from perl/python. If you are a lang aficionado, and already know one of {perl, python, php, JavaScript}, then there's really not much new in Ruby. You better off to pick up {OCaml, Haskell, Mathematica, erlang, …}.

search Yegge on Ruby to read his blog.

i'll be working on Xah Take of Ruby tutorial now. Starting with strings, perhaps today.