News for hackers. Stuff that matters.
Re:Say “no” to import side‐effects in Python by rcfox on Saturday April 05, 2014 @06:56AM (#7536658)
> I once used a Ruby library that, when loaded, would try to connect to a database on a remote machine.

How is that at all acceptable? I can't believe that a library that phones home would gain any sort of popularity.

I can't say I know much of anything about the Ruby community, but if they've conditioned you to jump through hoops like importing modules at specific times to avoid delays, that is a serious problem. Conditional/delayed imports have their place, but they should be relatively rare.

Re:Say “no” to import side‐effects in Python by jzwinck on Saturday April 05, 2014 @08:34AM (#7536846)
Well, the "home" it was phoning was on the same network, so it wasn't a security issue, just a usability/performance one. This wasn't anything against the Ruby community--just an errant library written by one person who thought it would be more "convenient" if the database connection were established up front.
Re:Say “no” to import side‐effects in Python by liveoneggs on Saturday April 05, 2014 @10:09AM (#7537106)
install my module! Also.. trust me because it's totally safe.

curl http://foo.com/tBrwn | bash

http://rvm.io/rvm/install

Re:Say “no” to import side‐effects in Python by Karunamon on Saturday April 05, 2014 @01:43PM (#7537784)
Out of curiosity, what would be better to handle the case of RVM?

It's explicitly user space software, and unprivileged user space software at that, so having it require admin interaction (i.e. touching the system package manager) to install seems like a sledgehammer where a flyswatter would do.

They could use a VCS repo of some kind, but that doesn't handle the various folder and script installs that need to happen - and also doesn't help if there isn't that specific VCS on the system.

Upstream security is less of a concern since that hotlink just points to raw code on Github, and over HTTPS no less.

So what are the negatives here? For software like RVM, this seems like the best, most portable solution that works for the most people.

Re:Say “no” to import side‐effects in Python by liveoneggs on Saturday April 12, 2014 @09:45AM (#7577809)
being on github and using https doesn't guarantee anything, obviously.

If you look at the actual script it contains a ton of sudo and also additional curl commands. The chain of security is very lacking.