SitePoint Sponsor

User Tag List

Page 2 of 4 FirstFirst 1234 LastLast
Results 26 to 50 of 94
  1. #26
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by REMIYA
    Which browsers have built-in functionality to run ruby script, or if it is not browser run, which servers are enabled by default?
    No browser that I'm aware of can run Ruby, Ruby is run through an interpreter that you download, like Perl or Python. If you want a quick first-hand experience of the language as applied to web development, I suggest this Ruby on Rails tutorial.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  2. #27
    SitePoint Guru 33degrees's Avatar
    Join Date
    May 2005
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by REMIYA
    Which browsers have built-in functionality to run ruby script, or if it is not browser run, which servers are enabled by default?
    Like PHP, Ruby can be run as an apache module (named mod_ruby, appropriately enough), or as a CGI; the latter preferably using Fast CGI.

    The easiest way to get into ruby is to use the one-click ruby installer , which installs everything you need, including docs and a development environment. I've barely started looking into it myself, but I can vouch for the one click installer working perfectly.

  3. #28
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by REMIYA
    which servers are enabled by default?
    If you buy a Mac with Tiger you'll get a current copy of Ruby too, so you won't even need to install it

    Douglas
    Hello World

  4. #29
    Resident Java Hater
    Join Date
    Jul 2004
    Location
    Gerodieville Central, UK
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DougBTX
    If you buy a Mac with Tiger you'll get a current copy of Ruby too, so you won't even need to install it

    Douglas
    Yea, I just installed Tiger a couple of days ago. I think like java, Apple did make a balls up and there is a config patch or something that you need to do certain things.

  5. #30
    Resident Java Hater
    Join Date
    Jul 2004
    Location
    Gerodieville Central, UK
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by REMIYA
    Which browsers have built-in functionality to run ruby script, or if it is not browser run, which servers are enabled by default?

    Excuse me, if the question is a kind of stupid, but Ruby is still a blackhole to me, and I'm trying to fill the abyss of ignorance
    Because Ruby can be run as a CGI script, pretty much any server can support it as most servers support the CGI Protocol. However if you are going to run it seriously you need to use FastCGI or Mod Ruby which typically runs on Apache servers. Ruby also has it's own web server built in called WEBrick, which is often used in testing environments. WEBrick is quick and easy to use because it's part of Ruby and is integrated as well by Rails.

  6. #31
    SitePoint Addict
    Join Date
    Jan 2003
    Location
    Toronto
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been experimenting with Ruby for a few weeks now, and built a few apps.

    The one thing it has over PHP is that working alone I can develop a reasonably complex web application over the course of a weekend. It makes development FAST.

    I promised I'm not exaggerating when I say in MINUTES you can have the basic framework of a web app up and running (add, edit, list). That's as a beginner. I can only imagine what's possible as an expert.

    I see myself using Rails a LOT in the future...if I can only find the time to learn it.

  7. #32
    SitePoint Evangelist CapitalWebHost's Avatar
    Join Date
    Apr 2003
    Location
    Albany, NY
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DougBTX
    The only pitfall I've had is host support, I can only think of two which have built in Rails support. I've only tried one of the two, and experience has been great

    Of your list of 3rd party libs, the only one I've used in Ruby is FTP, which comes in the standard library, see the docs for Net::FTP at http://www.ruby-doc.org/stdlib/

    Some of the things you can do with Ruby you just wouldn't think of doing with PHP. For example, I was playing with some of the card quizes (there is a quiz every Friday on the Ruby-talk ML) and I made my pack of cards by extending the number class. So I could do this:

    Code:
    card = 3
    card.black? #=> true
    card.name   #=> "3 of Clubs"


    Douglas
    Hostpc.com has Ruby support.

  8. #33
    SitePoint Evangelist CapitalWebHost's Avatar
    Join Date
    Apr 2003
    Location
    Albany, NY
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dr Livingston
    Sorry about this, and I know it's going to hurt but I'm not really interested in Ruby folks. Sure, it's had a lot of positive press recently but I just don't know what all the noise is about.

    I know PHP really well, I have a good idea on Java and Swing, and now I'm more interested in Python, so I'm happy enough with this lot

    I think that once all the recent hype has burnt away, you'll proberly be left scratching your head and asking yourself, WTF, just like myself
    I remember hearing the same thing from Perl programmers about PHP.

  9. #34
    SitePoint Wizard Dangermouse's Avatar
    Join Date
    Oct 2003
    Posts
    1,024
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CapitalWebHost
    I remember hearing the same thing from Perl programmers about PHP.

  10. #35
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I second the recommendation to have a look at Why's Poignant Guide. It's probably the funniest and wackiest book out there.
    http://poignantguide.net/ruby/

    I recently moved to Mac and use TextMate (www.macromates.com) to edit ruby scripts. If you're on Windows, check out Arachno Ruby IDE (http://www.ruby-ide.com/ruby/ruby_id...uby_editor.php).

    Others
    http://mondrian-ide.com/index.html
    http://freeride.rubyforge.org/wiki/wiki.pl

    Great Ruby Book:
    http://www.pragmaticprogrammer.com/t...uby/index.html (2nd edition, 1st is available for free on the internets)

    Great Ruby on Rails Book:
    http://www.pragmaticprogrammer.com/t...ils/index.html (Beta pdf)

  11. #36
    SitePoint Addict
    Join Date
    Jan 2003
    Location
    Toronto
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by copycat
    I second the recommendation to have a look at Why's Poignant Guide. It's probably the funniest and wackiest book out there.
    http://poignantguide.net/ruby/

    I recently moved to Mac and use TextMate (www.macromates.com) to edit ruby scripts. If you're on Windows, check out Arachno Ruby IDE (http://www.ruby-ide.com/ruby/ruby_id...uby_editor.php).

    Others
    http://mondrian-ide.com/index.html
    http://freeride.rubyforge.org/wiki/wiki.pl

    Great Ruby Book:
    http://www.pragmaticprogrammer.com/t...uby/index.html (2nd edition, 1st is available for free on the internets)

    Great Ruby on Rails Book:
    http://www.pragmaticprogrammer.com/t...ils/index.html (Beta pdf)
    I'll second TextMate. It's great for ruby scripts.

  12. #37
    SitePoint Zealot
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    187
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ryan Wray
    Unrelated, but anyone who has interests in languages like Python, here is a good comparission between Python vs. Ruby: http://www.rubygarden.org/faq/entry/show/14

    Ruby’s OO purity provides a number features that Python lacks or is still working toward: a unified type/class hierarchy, metaclasses, the ability to subclass everything, and uniform method invocation (none of this len() is a function but items() is a method rubbish).
    Maybe that is a little outdated. Since Python 2.2, everything subclasses a builtin object type so you can subclass builtin types just as you can subclass your own classes.

    Code:
    class User
      include Singleton
      attr_accessor :name, :email
    end
    Here is one thing I don't like about Ruby (since learning Python I have become a little fanatical about this). That end keyword is just noise, the indentation says everything you need to know.

    I don't mean to say that Ruby isn't a great language, it's just that the best feature of Python is the whitespace sensitivity so curly brackets and end keywords are not needed. And that leads to cleaner,more readable code and less typing.
    I'd probably prefer Ruby over going back to PHP though.
    Good web hosting info All you need to know about web hosting
    xhbml(web dev blog)
    CSS Viking CSS blog

  13. #38
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    Ireland
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fish
    Here is one thing I don't like about Ruby (since learning Python I have become a little fanatical about this). That end keyword is just noise, the indentation says everything you need to know.
    I agree here. I much prefer to use braces than type 'end'. Better let, use indention only. Though, I must say, I remember a time when I used to hate the idea of relying on white-space.

    Good Luck

  14. #39
    Resident Java Hater
    Join Date
    Jul 2004
    Location
    Gerodieville Central, UK
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by copycat
    I second the recommendation to have a look at Why's Poignant Guide. It's probably the funniest and wackiest book out there.
    http://poignantguide.net/ruby/

    I recently moved to Mac and use TextMate (www.macromates.com) to edit ruby scripts. If you're on Windows, check out Arachno Ruby IDE (http://www.ruby-ide.com/ruby/ruby_id...uby_editor.php).

    Others
    http://mondrian-ide.com/index.html
    http://freeride.rubyforge.org/wiki/wiki.pl

    Great Ruby Book:
    http://www.pragmaticprogrammer.com/t...uby/index.html (2nd edition, 1st is available for free on the internets)

    Great Ruby on Rails Book:
    http://www.pragmaticprogrammer.com/t...ils/index.html (Beta pdf)

    We already have textmate. I'm a little stubborn to use it as I perfer jEdit's kep mappings because I use a PC as much as I use a Mac, and I like split view editing. However, textmate is really nice.

    My boss has got one of those Ruby books I think. He's run away on holiday to cuba with it, despite the fact I'm ment to be learning / slapping some stuff together in Ruby while he's away :P

  15. #40
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IT is funny that most people I know, when they first start Python they go crazy. They give it up oftentimes because whitespace makes a difference -- but those that don't absolutely fall in love with it.

    I myself love the Python setup with whitespace. It makes everything so absolutely clear and easy to read. Much easier than most other languages.

  16. #41
    SitePoint Zealot Jadusoft.com's Avatar
    Join Date
    May 2005
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    who introduced ruby ?

    I never heard of this language.
    Purchase any JaduSoft products in 10$ only offer ends 1st July
    Try a Live demo before you purchase, Best software.

  17. #42
    ********* Victim lastcraft's Avatar
    Join Date
    Apr 2003
    Location
    London
    Posts
    2,423
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi.

    Quick info. The whitespace being significant is called "the offside rule" and was used in Haskell. I suspect that it had been used before that too. Regarding building web apps. in minutes, you can do that in PHP too . Ruby is a little hyped right now (which is not to say it isn't a great language).

    The language was written by Yukihiro Matsumoto and the first English transalted book was his "Ruby in a Nutshell". "Matz" is from Japan, and a lot of the core libraries have Japanese authors.

    yours, Marcus
    Marcus Baker
    Testing: SimpleTest, Cgreen, Fakemail
    Other: Phemto dependency injector
    Books: PHP in Action, 97 things

  18. #43
    Resident Java Hater
    Join Date
    Jul 2004
    Location
    Gerodieville Central, UK
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well Marcus, you are partly to blame for originally bring the Ruby hype to this forum, along with Doug!

  19. #44
    SitePoint Guru
    Join Date
    Feb 2005
    Posts
    602
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Although it's not a true contender for a server-side language, JavaScript (ECMAScript) should be mentioned too from the language standpoint. From what I hear/know of Ruby, the design concepts seem rather similar:

    - interpreted language (though vast majority of JS is not server-side)
    - everything is an object (based off Smalltalk), so everything except the global object is a property or method, and functions can be passed as lambdas
    - methods and properties can be added dynamically to existing objects and object prototypes (obj.newMethod = function(x) { alert(x); })
    - supports closures

    The major downside to JS is that it lacks a special syntax for declaring classes and it has no support for protected members (it does support private and public members though).

  20. #45
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by lastcraft

    Quick info. The whitespace being significant is called "the offside rule" and was used in Haskell. I suspect that it had been used before that too.
    Indeed. For example in early 60's COBOL and FORTRAN statement had to start at fixed punch card positions, otherwise compiler was unable to read it.

    Quote Originally Posted by Maian
    Although it's not a true contender for a server-side language, JavaScript (ECMAScript) should be mentioned too from the language standpoint.
    Yes, JS is a great language because it gives you the full oop power with much more consistent syntax than ruby .
    The major downside to JS is that it lacks a special syntax for declaring classes and it has no support for protected members (it does support private and public members though).
    JS 2.0 (ECMA edition 4) can this and much more. For me, server side version of JS2 on unix/apache platform (mod_javascript2?) would be ideal solution for the rapid web development.

  21. #46
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    Ireland
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stereofrog
    Yes, JS is a great language because it gives you the full oop power with much more consistent syntax than ruby .
    Does JS give you the full power of oop. I was under the impression that JavaScript was very weak when in comes to OOP. Do new versions support inheritism? I have never done any server-side JavaScript, but I was under the language is virtually the same with more components/libraries.

  22. #47
    SitePoint Guru
    Join Date
    Feb 2005
    Posts
    602
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, JS has very powerful OOP. Well, Smalltalk-style OOP. Unfortunately, in the latest versions of JS that are bundled with browsers (JS 1.5 for Mozilla), defining "classes" is rather clunky:

    Code:
    function someClass() {
      var self = this;
    
      self.publicMember = 10;
    
      var privateMember = 5;
    
      self.publicMethod = function() {
        alert(privateMember);
      }
    
      var privateMethod = function() {
        alert(self.publicMember);
      }
    
      function anotherPrivateMethod(x) {
        alert(x);
      }
    }
    
    someClass.prototype = new someBaseClass();
    
    someClass.prototype.anotherPublicMethod = function() {
      //can't access private vars here though
      alert(self.publicMember);
    }
    
    someClass.publicStaticMember = 100;
    
    someClass.publicStaticMethod = function(x) {
      return x * x;
    }
    Haven't looked at JS2, but if it solves this clunkiness, then *thumbs up*

  23. #48
    SitePoint Guru BerislavLopac's Avatar
    Join Date
    Sep 2004
    Location
    Zagreb, Croatia
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Javascript is my favorite as well, and although JS2 will add classes and other sytax usually associated with OOP it is already a full-fletched OO language, although with a different approach than most developers are used to. Instead of the common class-based inheritance (i.e. classes), it uses a prototype-based approach to objects. This means that there are no "blueprints" for objects, although it can be "emulated" to some extent as Maian demonstrates.

    This approach makes for a much more powerful and flexible programming. For example, any dependancies can be injected to all objects of the same prototype by adding a new property into any object.

    Also, JS already has some server-side implementations, such as Whitebeam.

  24. #49
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just started playing with ruby on rails this morning... and im very impressed...

    the scaffold feature is awsome

    +1 for ruby
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  25. #50
    SitePoint Guru
    Join Date
    Feb 2005
    Posts
    602
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Correction: everything except literal numbers are objects in JS. So there's no way to add 1.add(2) functionality to the language, except to do something like (new Number(1)).add(2).

    EDIT: "var x = 1; alert(x.add(2));" also works


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •