r/programming • • Feb 24 '13

Ruby 2.0.0

http://www.ruby-lang.org/en/news/2013/02/24/ruby-2-0-0-p0-is-released/
600 Upvotes

193 comments sorted by

View all comments

0

u/jokubolakis Feb 24 '13

Can someone explain to a non-programmer what's new and what's ruby for?

18

u/TikiTDO Feb 24 '13

Ruby is a programming language used for a very wide variety of tasks. Probably the most popular framework written in ruby is "rails" which is a platform for making complex web pages. Because what ruby is, it would be rather hard to explain the changes and why they're cool to a non-programmer; basically it's faster, it handles resources more intelligently, and it lets people do a bunch of things they've been asking for more easily.

3

u/hak8or Feb 24 '13

By more complex, are you referring to more dynamic pages? Why would I use Ruby over PHP/HTML/CSS/JS? Does Ruby essentially combine what I listed before into one language?

11

u/[deleted] Feb 24 '13

Ruby would replace PHP out of that list, not any of the others. For information on why what is different with Ruby over PHP then check out this page.

4

u/TikiTDO Feb 24 '13

In fact going further, there are projects written in ruby that help with the authoring of HTML, CSS and JS, sometimes with the help of other languages and tools. These can make life very easy when properly configured. For instance, instead of writing HTML, I could write slim and then have a ruby script translate that into HTML. Or I could write Sass and have ruby send my file to the sass parser in order to generate valid CSS without me having to do anything extra. Or even CoffeeScript instead of JS.

So in some respects, ruby can, if not directly replace, at least give you the option to hand off your code to other authoring tools.

3

u/[deleted] Feb 24 '13

To be fair, you can do exactly the same with PHP although it isn't as prevalent as with Ruby because as PHP applications are just deployed directly into a public web server directory it isn't easy to hide files that the user doesn't need to access.