~Ruby Discussion~

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

~Ruby Discussion~

Post by AZ_ on Sat Sep 10, 2011 1:03 am
([msg=61488]see ~Ruby Discussion~[/msg])

I see a lot of people overlooking Ruby for Python and Perl, but I have seen some amazing things done with Ruby and Rails.

Why use Ruby?

It's a flexible and dynamic programming language, designed to provide the ideal balance of power and simplicity. Released in 1995, Ruby was developed to draw on the strengths of existing programming languages and to deal with the rapidly growing capabilities of computer systems. Today it is one of the worldʼs most widely used programming languages, touted by many as being the most flexible and intuitive language for a variety of applications.

Programmers will appreciate Rubyʼs sparse, efficient syntax and logical framework, built to mirror the way the human mind thinks. Ruby was designed to blend the strengths of Perl, Smalltalk, Eiffel, Ada, and Lisp, intended to create a language more powerful than Perl and more object-oriented than Python. Because of its mixed heritage, Ruby is easy to learn as a second programming language and can be adapted to interface with C/C++, Perl, Fortran, and even Java.

Users of applications written in Ruby will appreciate its fast, reliable performance and efficient handling. Rubyʼs proficiency as a web language and its ability to interact directly with existing applications such as Google search, Amazon, and PayPal make it a excellent choice for easy-to-use integrated web applications for businesses, while its powerful and intuitive framework make it the first choice of NASA and the National Oceanic and Atmospheric Administration when they need fast, powerful, data processing for realtime satellite imaging and complex computer simulations.

The developers of Ruby openly acknowledged that there is no such thing as a perfect programming language. They created Ruby to be the ideal blend of strengths to produce exceptional flexibility and efficiency. The result is a language which is powerful and reliable for both web and office applications.


Any Ruby users here? Rails dev are also welcome! :)

-- Sat Sep 10, 2011 1:25 am --

Here is a Q&A with the creator:

http://servicesangle.com/blog/2011/08/3 ... e=services
User avatar
AZ_
Poster
Poster
 
Posts: 105
Joined: Sun Jun 05, 2011 12:38 pm
Blog: View Blog (0)


Re: ~Ruby Discussion~

Post by tgoe on Mon Oct 03, 2011 11:15 pm
([msg=62037]see Re: ~Ruby Discussion~[/msg])

"Overlooking" is the wrong word. Ruby is slower than Python and almost as ugly as Perl. Python has Django these days and Perl isn't going anywhere...

EDIT: "Ignoring" might be the right word.
User avatar
tgoe
Contributor
Contributor
 
Posts: 638
Joined: Sun Sep 28, 2008 2:33 pm
Location: q3dm7
Blog: View Blog (0)


Re: ~Ruby Discussion~

Post by AZ_ on Fri Oct 07, 2011 1:28 am
([msg=62133]see Re: ~Ruby Discussion~[/msg])

Source for Ruby being slower than Python?
User avatar
AZ_
Poster
Poster
 
Posts: 105
Joined: Sun Jun 05, 2011 12:38 pm
Blog: View Blog (0)


Re: ~Ruby Discussion~

Post by mShred on Fri Oct 07, 2011 7:14 pm
([msg=62175]see Re: ~Ruby Discussion~[/msg])

AZ_ wrote:Source for Ruby being slower than Python?

I wouldn't count on him replying for a long while. A lot of the things he says are very opinionated as is. Though informational too.
Image

For those about to rock.
User avatar
mShred
Administrator
Administrator
 
Posts: 1689
Joined: Tue Jun 22, 2010 4:22 pm
Blog: View Blog (2)


Re: ~Ruby Discussion~

Post by thetan on Sat Oct 22, 2011 7:54 pm
([msg=62516]see Re: ~Ruby Discussion~[/msg])

Ruby isn't significantly slower then python. Source: http://shootout.alioth.debian.org/u32/b ... g2=python3

However comparatively ruby, python, php and perl are all together the slowest languages around. source: http://shootout.alioth.debian.org/u64/w ... astest.php . heh, even Javascript is faster then those languages.

Ruby, Python, Perl and php's horrible performance is symptomatic of the defacto implementations however and aren't strongly tied to the language themselves. Any interpreted system that has to traverse an abstract syntax tree (AST) will be orders of magnitude slower then something that is compiled into machine code or JIT compiled into machine code at runtime and Ruby, Python, Perl and php are all interpreted languages that traverse ASTs. Also, dynamically typed languages will always be slower then statically typed languages due to the extra level of indirection in handling that can be of any type and Ruby, Python, Perl and php are all dynamically typed languages.

Alternative implementations
IE: PyPy is a JIT that will use about 2x the memory of the standard CPython implementation with about 2-3x performs gains on typical applications. luaJIT is a JIT compiler and runtime for the lua programming language that will make lua hum almost as fast as C/C++. Jython and Jruby are frontends for Java's Virtual Machine (JVM) that compile Python and Ruby respectively into Java bytecode that the JVM can further JIT and optimize into an application that will almost always out perform their defacto implementations.

So why not ruby?
Ruby is cool, i use it for some pet projects and we have an internal Ruby project at my job that i work on every once in a while. However, i've developed a bad taste for Rails and i'd much prefer to write Ruby web stuff in a more pragmatic framework/stack like Sinatra, haml and sass

Also, Ruby is loosing steam. As a community and as a project less and less things are happening in Ruby in comparison to the boom in the middle of the last decade.

The Ruby boom was mostly because it was _the cool language_. Well, Ruby isn't the coolest kid in the classroom anymore as has been clearly proved in github statistics. https://github.com/popular/watched . RoR was the most watched project on github
almost since github was created, now it's at a draw in popularity with Node.JS a project that was only publicly released 1 1/2 years ago.
"If art interprets our dreams, the computer executes them in the guise of programs!" - SICP

Image

“If at first, the idea is not absurd, then there is no hope for it” - Albert Einstein
User avatar
thetan
Contributor
Contributor
 
Posts: 657
Joined: Thu Dec 17, 2009 6:58 pm
Location: Various Bay Area Cities, California
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests