News for hackers. Stuff that matters.
Re:Ruby 2.0.0-preview1 is out by whalesalad on Thursday November 01, 2012 @09:45PM (#4730827)
I have a confession to make. I've been a Python (django+flask) guy for years, but I just recently jumped ship to Ruby and couldn't be happier. Within the last 60 days I've deployed 2 production websites, rebuilt my own personal blog, and am currently busting ass on my own project's API -- all of it in Rails. I still like Python, but I'm a HUGE fan of Ruby now. It's so much fun to write.

I'm excited to be a part of such an active community as well. It seems like every week there is an exciting event, release, or new project being announced.

Looking forward to building this locally, hopefully with these fast require patches applied: http://bugs.ruby-lang.org/issues/7158

self.woohoo!

Re:Ruby 2.0.0-preview1 is out by stillmotion on Thursday November 01, 2012 @10:06PM (#4730894)
All those years you used to make fun of me.
Re:Ruby 2.0.0-preview1 is out by whalesalad on Thursday November 01, 2012 @10:22PM (#4730942)
Trust me I feel like a tool for being such a fanboy.
Re:Ruby 2.0.0-preview1 is out by nickik on Friday November 02, 2012 @09:22AM (#4732480)
And now after just 60 days you are allready a fanboy of rails. You should overthink how you put your loyaltys.
Re:Ruby 2.0.0-preview1 is out by shinratdr on Saturday November 03, 2012 @04:09PM (#4737738)
> You should overthink how you put your loyaltys.

You should think harder about how you choose to phrase a sentence. "Overthink how you put your loyaltys"? C'mon.

Re:Ruby 2.0.0-preview1 is out by meskyanichi on Saturday November 03, 2012 @11:39AM (#4736823)
Took me only 15 minutes to realize what I've been missing. ;)
Re:Ruby 2.0.0-preview1 is out by excid3 on Thursday November 01, 2012 @10:23PM (#4730947)
I had exactly the same experience. Long time Python developer, and then got into Rails and haven't looked back. Really love the readability of the language.
Re:Ruby 2.0.0-preview1 is out by themckman on Friday November 02, 2012 @09:43AM (#4732549)
Anecdotally, I've gone in the exact opposite direction. I had been doing Ruby/Rails for 3 years up until about December of last year and switched to Python. I can't say I dislike Ruby for any reason, however, I just have no desire to write software with it anymore.
Re:Ruby 2.0.0-preview1 is out by aaronblohowiak on Thursday November 01, 2012 @10:03PM (#4730884)
what are the differences that make it more fun?
Re:Ruby 2.0.0-preview1 is out by weaksauce on Thursday November 01, 2012 @10:28PM (#4730960)
I am in the same boat as gp. rails has a lot of nice time savers, RVM is better than virtualenv, I like that in ruby you have more than one way to do things so you can write the way you feel most natural, ruby is more fun to program in for me(not a huge fan of the indentation now because I have had to reformat scripts to work correctly one too many times now). packaging in python is what pushed me over the edge though. It never felt like I could get anything installed nicely because the "best practice" for the packing managers were changing daily. rubygems is much nicer in that respect. I still like python but in the future I am going with ruby unless I have to use something else.
Re:Ruby 2.0.0-preview1 is out by tta on Thursday November 01, 2012 @11:28PM (#4731102)
rbenv (https://github.com/sstephenson/rbenv) is better than RVM.
Re:Ruby 2.0.0-preview1 is out by csarva on Friday November 02, 2012 @12:10AM (#4731210)
I used rbenv for a while but what killed it for me was the huge startup lag it adds to every invocation of ruby or any other bin installed via a gem. I was seeing delays of 4-5 sec which disappeared when I switched to RVM. The universe of tools and integration is also far better in RVM land (though this may have changed more recently).
Re:Ruby 2.0.0-preview1 is out by kingfishr on Friday November 02, 2012 @03:01AM (#4731604)
I had this problem right when I started using rbenv. Eventually with some help I realized that just starting bash was slightly slow, and that all the various bash scripts that rbenv runs were compounding this for a 2+ second startup.

In my case, everything was fixed by moving the the things that only need to be run in login shells out of my ~/.bashrc (where they should have been in the first place).

See the bug I filed against rbenv at the time:

https://github.com/sstephenson/rbenv/issues/70

Since that time, I've been using rbenv exclusively (development and production) and it's been great.

Re:Ruby 2.0.0-preview1 is out by tesmar2 on Friday November 02, 2012 @09:53AM (#4732579)
Most users don't care if rbenv is better than rvm since they do the same thing, and apparently, at least according to the other poster, rbenv is slow
Re:Ruby 2.0.0-preview1 is out by lloeki on Friday November 02, 2012 @11:17AM (#4733018)
> according to the other poster, rbenv is slow

Define slow:

    $ time /home/lloeki/.rbenv/versions/1.9.3-p286/bin/ruby -e 'exit'
    real	0m0.012s
    user	0m0.007s
    sys 	0m0.003s

    $ rbenv global
    1.9.3-p286

    $ time /home/lloeki/.rbenv/shims/ruby -e 'exit'
    real	0m0.055s
    user	0m0.027s
    sys 	0m0.007s
Hardly something to cry foul for. Your first significant require will blow that time by an order of magnitude.

And hardly surprising either since rbenv the alias calls rbenv the command, which sets a few env vars then calls rbenv-$1 (probably $1==exec), which calls rbenv-hooks $1 (probably a noop by default) then $1 + args. rbenv is seriously thin.

> huge startup lag it adds to every invocation of ruby or any other bin installed via a gem

Sounds more like bundler (maybe automatically started by ohmyzsh when just typing 'ruby' where you have a Gemfile):

    $ time bundle exec ruby -e 'exit'
    real	0m0.570s
    user	0m0.480s
    sys 	0m0.057s
or as mentioned, someone put too much stuff in his bashrc or something.
Re:Ruby 2.0.0-preview1 is out by charliesome on Friday November 02, 2012 @02:17AM (#4731486)
quantify "better"
Re:Ruby 2.0.0-preview1 is out by lloeki on Friday November 02, 2012 @10:59AM (#4732919)
I won't quantify, but qualify: it works without a pile of hacks like bastardizing cd, which fails in various real-world scenarios.
Re:Ruby 2.0.0-preview1 is out by weaksauce on Friday November 02, 2012 @02:22PM (#4734017)
What do they need to override cd for?
Re:Ruby 2.0.0-preview1 is out by lloeki on Friday November 02, 2012 @03:43PM (#4734395)
From the scripts/cd source [0]:

    # Source a .rvmrc file in a directory after changing to it, if it exists.  To
    # disable this feature, set rvm_project_rvmrc=0 in /etc/rvmrc or $HOME/.rvmrc
IMHO rvm is completely overkill and suffers from overengineering.

[0]: https://github.com/wayneeseguin/rvm/blob/master/scripts/cd

Re:Ruby 2.0.0-preview1 is out by whalesalad on Thursday November 01, 2012 @10:23PM (#4730944)
That's actually a really, really long comment. A blog post is definitely due about it, because I feel like a hacker again. Before I was in this fog of not enjoying what I was doing and always being up against some mountain/molehill problem.
Re:Ruby 2.0.0-preview1 is out by crusso on Friday November 02, 2012 @08:48AM (#4732352)
To paraphrase a coworker who also uses Ruby: Whenever I guess at how to do something new in Python, I'm usually wrong.
Re:Ruby 2.0.0-preview1 is out by bdesimone on Thursday November 01, 2012 @11:27PM (#4731100)
I'm happy for you. Could you be more specific about how ruby (as a language) and rails (as a framework) are more fun to you coming from python and then django/flask respectively? Is it the language you like more? Or the rails community?