Lisp and Ruby 336
sdelmont writes "The developers of Rubinius, an experimental Ruby interpreter inspired by SmallTalk, have been discussing the possibility of adding a Lisp dialect to their VM. Pat Eyler collected some ideas and opinions from the people involved and it makes for some interesting reading. For many, Ruby already is an acceptable Lisp, and the language itself started as a 'perlification' of Lisp (even Matz says so) so it is perhaps fitting and might help explain why the whole idea feels right. Now, if someone added support for VB and gave it the respect it deserves, the world would be a better place."
why not go all the way? (Score:3, Informative)
Re:Genuine question about perl vs ruby (Score:4, Informative)
Having Perl as it is, what are the reasons to take a look at Python? Having Python as it is, what are the reasons to take a look Ruby? Having Ruby as it is, what the reasons to take a look at Perl? Having Python as it is, what are the reasons to take a look at Perl?
Because they're different languages with different strengths and weaknesses. Just as Lisp and Ruby are different, and Python and Perl are different, so is Perl and Ruby.
A good staring point for you would be to read this article differentiating Perl and Ruby [ruby-lang.org]. Working back from that description, if you have experience in programming in languages other than Perl, you should be able to figure out what the advantages are of Ruby over Perl and vice-versa.
Re:Performance, anyone? (Score:5, Informative)
"I mean, take Lisp and its performance. Compare it to Ruby's."
Which Lisp? One which (as most implementations of Common Lisp do these days) appropriately and reasonably gets compared to the output of a C compiler?:
http://www.lrde.epita.fr/cgi-bin/twiki/view/Public ations/200606-IMECS [epita.fr]
I wouldn't have thought that would be a very fair comparison to make for Ruby.
Re:Genuine question about perl vs ruby (Score:5, Informative)
2) Consistency -- In Perl it is needlessly difficult to do ever simple tasks like making arrays of arrays or arrays of hashes -- you have use a weird syntax to get at references. I never could remember it and always had to look it up whenever I needed an array of arrays in Perl. In Ruby, everything is a reference to an object so you don't have to worry about it -- a[0] = [1, 2] does exactly what you want -- puts an array [1, 2] in the first element of array a.
I used to be a big Perl fanboy -- I did most of my programming in Perl from 1992-1999. But when I discovered Ruby I went for it and never looked back. What's cool about it is that its syntax is so clean that it is basically a version of the pseudocode I have in my head. In the Ruby community there's a phrase for it -- "the principle of least surprise" -- things just work.
Obviously, if you really like Perl, nothing is going to make you change. But if you are just keeping with Perl because of inertia, then you ought to look around at other scripting languages. Ruby is my favorite, but most modern scripting languages are cleaner than Perl.
Re:wow, I have no idea what that just meant! (Score:4, Informative)
Smalltalk is another high level language where everything is an object. It has syntax, supports many interesting high level concepts like persistance, and has some nice development environments and pseudo OS projects, one of which is called Squeak.
Ruby is a newer high level language from Japan, that was designed to combine the high level concepts of Lisp, but added some syntax to reduce code verbosity and increase expressiveness. The Lispnicks say this is unnecessary complexity that reduces the power of the language; people that were raised on languages with syntax find the expressiveness more familiar, easy to use and powerful.
I'm still undecided.
Re:Performance, anyone? (Score:4, Informative)
rails is not ruby (Score:2, Informative)
No, make a dinky little toy web app. Even DHH himself doesn't use such blatent exagerations to push rails. Yes its faster than coding everything from scratch, no it is not magic and you can't write anything non-trivial with it in 60 minutes. Do you seriously think anyone anywhere would be using anything but rails if it actually offered a 100x development speed improvement?
"If you think you can do faster and better in Perl, I bow to you mighty Perl God."
Catalyst is for perl what rails is for ruby. There's no need to switch to ruby just to get a web framework.
He asked why to switch to ruby from perl, and you basically ignored ruby altogether and talked about rails. He never even mentioned if he even does web development, how would rails help him if he doesn't do DB driven web development? Ruby itself doesn't offer much over perl, basically just cleaner OO support. If you are already used to perl then I don't think it makes any sense to switch. If you do DB driven web dev and would benefit from rails, then it still makes more sense to stick with perl and just use catalyst (or maypole for trivial 60 minute type stuff) than to switch to ruby just for rails.
Re:Genuine question about perl vs ruby (Score:1, Informative)
That's something I like. Coupled with the facts that a method can return any type, and everything is an expression, allows you to do things like:
if x = goDoSomethingThatReturnsAnIntegerOrFalse()
In C you'd have to write something like
if( (x=goDoSomethingThatReturnsAnIntegerOrAMagicNumber ()) != MAGIC_NUMBER_THAT_SURELY_WILL_NEVER_COME_UP_OTHERW ISE)
Try Perl with Win32::OLE (Score:3, Informative)
is still alive though not supported my Microsoft (VB6).
I think you meant 'by' not 'my', a typo (it happens to all of us).
But there's the rub. You never know when MS is going to pull the rug out from under you. Right now its
VB6 was horribly crippled. No good object support, reflection, etc. Nothing that made it better than COBOL.
Re:Genuine question about perl vs ruby (Score:3, Informative)
Asians complain about having to share codepoints for characters (see Han Unification). A lot of people think the whining is mostly racist in nature; however, there are a few legitimate complaints in there, for instance many characters that Han Unification forced to share codepoints actually have different glyphs depending on which language it's written in, even if they all shared a similar source. Unicode's official stance is that the application should identify the language being used and select the correct glyph for that particular character from a font designed for that language (which basically makes it impossible to create a single definitive Unicode font). Explanation of both the glyph problem and the not-invented-here issues here [wikipedia.org]. More on glyphs [kaist.ac.kr].
As for the "major encodings" currently in use, Shift-JIS was basically forced onto them by Microsoft who took their existing JIS encoding (based on ISO-2022) and broke it. There's about 1000 [google.com] websites of people telling the world just what they thought of that, yet not-invented-here or not, the Shift-JIS system sucks. Consider the fact that it uses two separate non-contiguous sets of codepoints (compare graphs of the non-unicode encodings here [lfw.org].
It's easy to say "not-invented-here", it's harder to admit that the foreigners had no clue what they were doing and broke it
it could just be a vocal minority
Of course it's a vocal minority, the majority just want their computers to work.