Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Is Ruby slow?

24

Comments

  • edited March 2006
    >>> Anyone who thinks they can program for Rails without learning Ruby first is in for a big surprise to. The funny thing is, I honestly do it pretty effectively. Sure, I have to ask questions from time to time, but I've already managed to write a few apps for my company. Actually I think the hardest part I have with it is doing SQL queries through Rails (aka, not actually doing them). The database setup is the hardest (and ugliest part) of Rails, imo. But that is a nice thing about PHP...you just learn a single language instead of a language and a framework. Its too bad PHP is such a nasty language in so many ways (compared to Ruby, Python and the like). What we need is a domain-specific language like PHP for web applications that fixes its problems. Anyway, like I was saying...the most complicated part of the entire Rails stack is putting together your database schema properly - especially if you want to do anything complicated. There's got to be a better way of doing things. That and getting everything setup. FCGI, SCGI? Apache, Lighttpd? Sometimes I like Python's "there's only one way to do it" approach. Maybe web development needs that (and that's how it was for the longest with LAMP). Altough I don't really think MySQL, PHP, or Apache are the answer anymore. Rails has shifted the focus away from things like mod_php inside of Apache to lightweight, fast servers like Lighty running SCGI or FCGI processes. I'm actually suprised the Rails team didn't go with Postgres, by all accounts, it is a better database. I dunno. I am dabbling around with the idea of writing a lightweight framework in Python. If I do it, though, I'm going to be selective about what I include. I'd only support certain things, like Postgres, some specific server, etc, that way you can utilize their strengths. Rails has done it to some extent with MySQL and Lighttpd, but it still supports a ton of other systems, which in my opinion just leads to complication. There's still a ton of confusion on how exactly you get Rails setup over Apache (though Instant Rails is really nice and is what I'm using), and how certain features in things like Postgres work. I am eagerly awaiting Ruby 2. It should fix just about every problem people have with it. Its probably a year or more out, though.
  • Really? I find the DB side of things a breeze, and you can always resort to find_by_sql. You can use Rails with Postgres, SQLite and many many others, not that I've tried.
  • >>> Anyone who thinks they can program for Rails without learning Ruby first is in for a big surprise to. A statement that reveals that the person saying so does not know anything about RoR ;) Let me be clear on few things about RoR. You don't need to learn Ruby to find RoR usefull, and RoR basically teches you Ruby at the same time you play around with it, I know Amy Hoy agrees with me, she went on a quest to learn RoR first and eventually learning Ruby later, obviously she is an exceptional piece of work, but she did it. And another misconception, Apache /w FCGI/SCGI is as good a choise as LightTPD /w FCGI/SCGI and actually my home computer is running Apache /w FCGI and PostgreSQL and my just wok platform is running FC4 with Lighty /FCGI and MySQL and the programs that I write (without learning any Ruby first mind you) run perfectly on both platforms, no major changes done. So that should take care of the Apache vs. Lighty vs. MySQL vs. PostgreSQL debate. RoR is very very powerful framework when you have a chance to wrap your head around it, and the fact that you have to learn Ruby and some bits of the framework stuff, is not something that anyone couldn't overcome, since 99% of the time you have to learn several languages anyway (PHP, Templating languages, HTML, SQL commands) and shit like that. So learn RoR first before taking a jab at it, trashtalk without knowing something is very hilariously sad.
  • edited March 2006
    Ruby is indeed slow and inefficient because it is interpreted and does not use byte code, but that is not a reason not to use RoR, especially if the server has the power to deal with it. However, I heard rumours that BaseCamp is horribly slow.

    My post on CSSBeauty:

    Code Igniter is very easy to use and very similar to RoR.

    I don't like RoR as much as I thought I would.

    Ruby is ugly (not as ugly as PHP, but still quite ugly). Ruby is horribly slow. Ruby 2.0, has been vapourware for years (opcode, virtual machine, supposed to be fast). It has horrible XML support.

    If you want a different functionality than RoR supports, it's a pain to get it working.
    For example, they included validation functionality in ActiveRecord, which should clearly be coded in a generic way in it's own class. I want to show, validate, and submit via email a form. ActiveRecord is designed to work with databases, not email. To get around this there is hack1, which makes it believe that it works on a table, hack2, which removes the database code, but you still use ActiveRecord, and hack 3, which requires some not so nice code. There is a ton of functionality in ActiveRecord that should be in it's own separate classes. RoR is all about ActiveRecord.

    There is a lot of hype and FUD surrounding RoR.
  • edited March 2006
    > There is a lot of hype and FUD surrounding RoR. Totally agree, but DHH doesn't want you to know that. Rails is great when you do what it wants you to do. When you step outside of that box, there are some serious problems. I still really am annoyed by the fact that Python is being overlooked for both Ruby and PHP. It is an amazing language, and I can't believe how simple/elegant it is.
  • boo.codehaus.org -- cleaned up Python for .NET.
  • I notice they say that Boo is about the same speed as C#. Is C# generally faster than CPython? Things like Boo seem the way to go. It harnesses all the power of .NET in a scripting language without all the extra cruft that C# and such have.
  • It's not a scripting language. It's a full programming language, but it's got the tools for scripting.
  • Well, in THIS coder's experience, RoR requires some learning of Ruby to do anything really efficiently. The concept is great. But the initial learning curve is a bit of a bear. And my experience was that yeah, you can whip some stuff together quickly if you (as mentioned) do what it wants you to do. To get outside that box, you're going to have to learn Ruby. I think in the end it's just a different language suited to different coders. Just like some prefer .net or C# or PHP or Python or RoR or C++ or COBOL or Pascal or Fortran or (insert language here). If it works for ya, great. In MY opinion the initial learning curve is steep ... although once you make it over that curve it's a pretty flat line from thereon in.
  • > It's not a scripting language. It's a full programming language, but it's got the tools for scripting. There's not really a standard definition for what a "scripting" language is these days.
  • The two major characteristics of a "scripting" language are the lack of a distinct compilation step, and loose typing.
  • booc helloworld.boo -> helloworld.exe booi helloworld.boo -> interpreted booish (python-like shell)
  • Been checking out Code Igniter. I really like what I see. Very RoRish. What advantages/disadvantages does it have compared to RoR?
  • edited March 2006
    The advantages is that it works on PHP4, and that is supported virtually everywhere. It is also more flexible. Due its flexibility, resulting in a disadvantage, is that it requires a little more code since it does not generate stuff for you. But, that flexibility is worth it. Read the CodeIgniter forum.
  • Lol, yeah, I did...and I saw your post. :) One thing that still frustrates me about most programming language/framework sites is they don't have forums. They instead resort to mailing lists which are generally much more difficult to use. If there is a forum for the language/framework, its not officially supported. That really annoys me.
  • Actually a question you asked in another post which I was wondering about myself....where is the models folder? Did you ever figure that out?
  • So a framework has limitations, and people think that is bad? Ok, so we have to clear this out, it is a FRAMEWORK, not a magic book, I have known that from the beginning, and I accepted it. I believe that all this is a problem because people are too much caught in the hype, they think that RoR makes you rich, happy and your dick twenty inch long. Like I said in one of my earlier threads, Framework is the new CMS, they give you freedom to do certain stuff, but they also require you to know the underlying code to hack away stuff, not exactly a world shattering discovery. As for the slowness, I haven't used Basecamp, and it's sad if it really is slow and I hope they fix it eventually. But as RoR is only few years old, I don't see it as any major problem anyway. But more enlightend by this thread, I will go and see what Django is all about, and maybe I wander off to see what everyone else is doing. Is there a PERL framework?
  • edited March 2006
    Is there a PERL framework?
    God I hope not.
  • Just talked on the RoR irc channel about slowness and they pointed out that one RoR site benchmarked with 2.5million requests and that if there is any slowness you can take care of it with caching easily.

    Just to defend RoR against accusations of it being slow.

    But if one is looking for absolutely optimal solution in every aspect, I would point them in to PHP, documentation second to none, support is worldwide second to none, developers behind and in every bush, trillions and gazillions of ready made programs ready to be hacked, tied to so many codes that if you have even touched something that had some other person who is a coder touch it you are halfway there, and ofcourse, T-shirt for idiots.
  • Out of all the frameworks I've looked at (mostly PHP, but also Django and RoR), Rails is the only one that does what I want it to, exactly how I want it to. Yes, it has its fanboys and more than enough hype, but the switched on enough among us will be able to cut through that. Horses for courses, that's all there is to it. Works for me, not for others. Get over it already - both the haters and the lovers.
This discussion has been closed.