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

Show parent comments

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?

-5

u/[deleted] Feb 24 '13

Ruby, I should mention, is a real programming language, whereas PHP can only be used for dynamic pages and is usually just embedded into HTML. You can do this with Ruby too of course. You can create native programs (weasel word, but compiles to bytecode and similar things probably don't mean much to you).

In web programming, Ruby is often used as the backend for dynamic web sites in lieu of say, ASP.NET, Java EE or PHP (or Python, in Reddit's case).

Why? because Ruby is a really, really nice language! I haven't been as productive with other languages as I have with Ruby. And that goes for a lot of other people, too.

If you want to get started with programming, Ruby is probably your best bet. I'd highly recommend the TryRuby tutorial by Code School. Codecademy also offers 'learning by doing' exercises, though you have to sign up (it's completely free though, unlike Code School's more advanced exercises). Otherwise, pick up a good book on it. Your local library should have one, Ruby is one of the top ten programming languages for a reason (hint: it's awesome!).

0

u/hak8or Feb 24 '13

I am already familiar with C, assembly, Python, and I dabble in HTML, Javascript, a TINY in PHP, and some CSS if that can be called a programming language. By native programs, you mean that Ruby can compile to the X86 architecture and both for the Windows and Linux os's?

Though, I think I am starting to ask questions which can be found by a simple google, apologies.

I am going to look into transferring my site hak8or.com to Ruby. Always eager to try out new things!

7

u/tofueggplant Feb 24 '13

Ruby's kind of like Python, but with different syntax and a few different features. If you know Python you'll probably find Ruby pretty familiar.

2

u/jyper Feb 24 '13

any language can theoretically compile to x86, I don't think any ruby does directly although you can use jruby to compile to java bytecode which can be compiled to x86 or other machine code by the java vm you are using.

That said it's easier to make desktop gui/cmdline aplications in ruby then in php. Ruby is a lot like python except that it's a bit more object oriented a bit more fast changing(for good and bad as library interfaces can be more unstable) and that since python is so similar and is already used in many categories where ruby could have been used(os scripting, app scripting, gui desktop applications, ect.) most of the time ruby is used to make website(usually using the rails framework).

1

u/warbiscuit Feb 24 '13

There is the new (alpha) Topaz project - it's a Ruby VM written using the PyPy project's toolkit, so it gets all the JIT x86 assembly goodness that project provides.

-2

u/clavicle Feb 24 '13

You don't compile to "x86". That's an architecture.

5

u/[deleted] Feb 24 '13

x86 is a microcode VM instruction language, unless you're referring to 20-year-old chips.

1

u/jyper Feb 25 '13

I meant to x86 assembly/ machine code

1

u/[deleted] Feb 24 '13

[removed] — view removed comment

2

u/jyper Feb 24 '13

I think cruby 1.9+ gets compiled to bytecode which is then interpreted like cpython, cruby 1.8 was straight up interpreted. And as you mention there are other ruby implementations(mainly jruby)