Skip to content

Comment on CodeReddit: Cover UI for Reddit at Workparent

Comments

php is one apt-get install away. Java, not so much (for example).

at least request contexts in http php apps are isolated; memory lives and dies per request, which is more than can be said for java web applications.

That is not a virtue. Java (And ruby, and python, and ASP.Net) get faster when they warm up.

or they leak memory. or a heavy request generates gc activity which impacts other requests.

i've seen site outages in large companies due to these sorts of bugs. multiple times. this is a major set of problems that you avoid by having a memory model that fits the domain (http services). php sort of did it by accident, but it works. BEAM gets this right as well.

That is a possible failure mode, but if it's standard practice in the systems you're touching you've had some bad luck?

apt-get install openjdk-6-jre-headless?

Sorry, I wasn't specific enough, I meant Java-based web apps^^

php based web apps are not 1 apt-get away either.

I don't know how many times I tried to run a php web app just to find out a random php5-* extension was missing, and then having to guess which one.

Modern applications using composer for dependencies give you this error information for free by virtue of the fact that `composer install` will fail. Most (all?) PaaS solutions take this into account and install those extensions. I know heroku does, as dokku uses the heroku buildpack :)

Or you know, anything with Ruby. Especially two things that need two different versions of Ruby!

This would be problematic for any programming language, though.

However, if you do want an elegant solution for your problem, may I recommend ruby-install[1] and the companion for easily changing between versions, chruby[2]. Alternatively, you could try RVM[3].

There are a couple more versions (one is even specifically designed for Windows), but I found ruby-install and chruby to be the most convenient ones for both personal and professional use.

[1] https://github.com/postmodern/ruby-install [2] https://github.com/postmodern/chruby [3] https://rvm.io/

This would be problematic for any programming language, though.

...except PHP.

Exactly.

I'm not trying to bash Ruby, but I haven't done any programming with it for about 6 years. I just want to get some web thing running on my home server, or get some gems installed for Compass or whatever (which to be fair is now a lot easier with bundler).

What I don't want to do is figure out how RVM works for the third time and how to install it globally instead of just for my user account so Apache site one can use one version and Apache site two can use another.

Everything in that world changes every year and if you're not keeping up it's a huge mess.

How is it not problematic with PHP? It's just as problematic from my experiences (I work for a hosting company and we have various PHP setups).

Unless you install PHP with a certain prefix—which you can do for other languages—I don't see how PHP solves the problem.

This would be problematic for any programming language, though.

C?

Well, compiling C11 with a compiler that only supports C98, or GNU-C "extensions" in contrast to vanilla C, but there's no runtime compatibility issues like with interpreted languages (if that is what you were getting at).

Also, there's the problem with platform portability (in terms of compiler "oddities", not system libraries) which I won't get into, because it's a hairy subject. :)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.