Live data from Hacker News

RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

bountysource.com

51–60 of 60 posts

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#51

Earlier quoted context omitted.

> Expecting other people to go out of their way to learn the things you know is disrespecting their time. That might be true if you are going to use the tool precisely once and then never again, but this is your system's shell we're talking about. You're disrespecting your own time if you don't learn how it works. > You said that rbenv isn't advanced shell scripting. You are right, it isn't - for us. You're conflatin…

> Absolutely everything you mention is discussed in great detail in the bash man pages. Great. If you would tell the entire human population about this so that they don't ask these questions anymore, then I would be very grateful. Until then, I'm going to assume that people don't, and don't like to, read documentation, and adjust my software to that fact.

> I'm going to assume that people don't, and don't like to, read documentation, and adjust my software to that fact.

Fine, but rvm has chosen the completely wrong way to go about adjusting the software to that fact! Rather than build a simple system that has an optional easy-mode layer on top, rvm begins with some crazy complex shell-builtin overriding functionality and works backwards from there. If at some later time I want to use the just put shit on my path mode, I'm shit out of luck.

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#52
I think I'm missing something. If an operating system doesn't come with a version of Ruby installed at all, how would you run RVM if it was written in Ruby? Unless it came bundled with a version of Ruby, which sounds bad. I thought the entire point of having these systems written in bash was to make them usable _before_ having Ruby installed at all?

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#53

I think I'm missing something. If an operating system doesn't come with a version of Ruby installed at all, how would you run RVM if it was written in Ruby? Unless it came bundled with a version of Ruby, which sounds bad. I thought the entire point of having these systems written in bash was to make them usable _before_ having Ruby installed at all?

After thinking about this for more than 1 second I guess a large portion of RVM that works after you have Ruby installed, such as rvmsudo, could be based on Ruby. Leaving the setup code written in Bash.

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#54
post #2

$50.000? I don't get the amount of cash needed. Not judging, just not understanding. Could someone explain and justify the need for this?

I plan on spending the next year working solely on RVM2, the fundraiser is updated with milestones => https://www.bountysource.com/fundraisers/489-rvm-2-0

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#55

I think I'm missing something. If an operating system doesn't come with a version of Ruby installed at all, how would you run RVM if it was written in Ruby? Unless it came bundled with a version of Ruby, which sounds bad. I thought the entire point of having these systems written in bash was to make them usable _before_ having Ruby installed at all?

After thinking about this for more than 1 second I guess a large portion of RVM that works after you have Ruby installed, such as rvmsudo, could be based on Ruby. Leaving the setup code written in Bash.

There's a Google Doc with a lot more detail as well:

https://docs.google.com/document/d/1xW9GeEpLOWPcddDg_hOPvK4o...

Your question is covered under "Bootstrapping"

> Bootstrapping > Using ruby should be possible thanks to binary rubies, in worst case we can fallback to static build or use JRuby. The binary Ruby (or static or JRuby) will be installed along with RVM 2 using very simple bootstrapping script written in shell most likely pure SH to provide compatibility with as much systems as possible

I had similar thoughts. The fact that RVM is implemented (currently) in shell means you don't need Ruby installed. It does, however, expose your tool to all the idiosyncrasies of someone else's shell environment.

I sit in #rvm on Freenode from time to time and the vast majority of trouble pings are related to differences in environment. That is to say, if you run a standard (as in, not heavily customized) environment, you won't have much trouble. There are a large number of users who really like to tweak their shell though, so RVM has to face the issue head on.

I think this is what has lead the team to the "bundled" approach. It sounds like RVM 2.0 will be a full-blown application, rather than a collection of scripts. The choice to build the application in Ruby, as opposed to something like C, seems obvious when you consider what it is. Ruby folks want to write Ruby.

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#56

Earlier quoted context omitted.

Creating proper platform-specific packages is a mad undertaking, requiring huge amounts of manpower to setup and to maintain. We provide native Phusion Passenger packages for 5 platforms (3 Ubuntu versions, 2 Debian versions, OS X Homebrew) and it's already crazy complicated. Check out the toolchain that we spent months on building: https://github.com/phusion/passenger_apt_automation https://github.com/phusion/passen…

> Creating proper platform-specific packages is a mad undertaking, requiring huge amounts of manpower to setup and to maintain. Of course you are right, and I am well aware of this. After all, that is the reason it has not been done before. Still, a crazy amount of effort went into creating and maintaining rvm, rbenv and the myriad of other tools we now have. I cannot help but wonder where we would stand now had all…

system packages and maintainers in current day are not used to support mixing multiple software with an easy separation like RVM does, they put everything in one prefix like /usr and change only application suffix, it works well with alternatives-update - but it’s static switching of ruby, what developers need is runtime switching and clear separation of libraries per language, the lack of clean separation also is bad when deploying servers that run multiple versions of given language (not limiting to ruby)

also check the update with schedule - https://www.bountysource.com/fundraisers/489-rvm-2-0 - "2 months: Work on building packages using RVM 2 (so it deprecates itself)"

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#57

I would if RVM 1.0 didn't suck so much of my time away that I gave up and just went with vagrant.

Using vagrant in place of rvm is like killing a housefly with a hammer. Vagrant is great if you want to setup the whole app environment but using it just for rvm's functions is overkill.

yeah except try working on several projects where you have to use different rubies with different c libraries and compilers. RVM can't handle that. Vagrant can. rvm is like swatting at a housefly over and over and over and over and over and over and over and not killing it and nothing happening.

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#58
post #28

Earlier quoted context omitted.

I don't know if creating top notch packages is too realistic, when the biggest difficulty with that is often the platform policy (e.g. insistence on separating documentation and runtime, even if it's more tightly coupled that it looks, having only one executable per package...) that is the biggest hurdle to overcome. The fact that no platform got it right for Perl, Python nor Ruby points to a huge difficulty...

Python works pretty well with system packages. Few people compile Python from source in the way that is common for Ruby. People do use pip/ virtualenv, but those are more the equivalent of bundler/ RVM gemsets-- they manage libraries, not entire interpreters. It's a little confusing because virtualenv appears to have its "own" Python, but really it is a symlink to the (usually) system interpreter managed by the distr…

> Python works pretty well with system packages.

Does it? From my limited exposure to python I remember that e.g. recent CentOs comes with python 2.6 only and installing any never version requires you to manually compile it while being extra extra careful not to touch the system python since otherwise yum dies.

Ruby works just well on that level - as long as the system ruby is fine for you, all is settled. For the rest of us that need a never/other ruby there's rvm/rbenv/chruby.

Re: RVM 2.0: Convert 20,000 lines of shell script into Ruby [Fundraiser]

#59

Earlier quoted context omitted.

After thinking about this for more than 1 second I guess a large portion of RVM that works after you have Ruby installed, such as rvmsudo, could be based on Ruby. Leaving the setup code written in Bash.

There's a Google Doc with a lot more detail as well: https://docs.google.com/document/d/1xW9GeEpLOWPcddDg_hOPvK4o... Your question is covered under "Bootstrapping" > Bootstrapping > Using ruby should be possible thanks to binary rubies, in worst case we can fallback to static build or use JRuby. The binary Ruby (or static or JRuby) will be installed along with RVM 2 using very simple bootstrapping script written in s…

Thanks for the link. That definitely makes sense. They'll get a lot more involvement from Ruby developers when they wouldn't have to write it in Bash, that's for sure.
Post reply on HN