In which I learn about generators, typed arrays, and bit operations by implementing SHA-256. Continue reading
In which I try to implement a simple http file server in Dart (using the existing http implementation in the standard library of course). My goal is to get something along the lines of the various one-line servers that exist for Ruby and Python. Continue reading
You just need to think of the argument array as a stream of events and the parsing logic as the state machine that responds to the incoming events. Continue reading
rvm, chruby, rbenv, etc. do not belong in a production environment. Even if you are deploying and co-hosting applications that require different versions of ruby those tools still do not belong in a production environment. All those tools are strictly for development environments.
Binary shims and other hacks have no place in a production environment. Ideally you have one user per application that has the proper profile for setting up PATH to point to the right version of ruby which has been compiled and deployed wholesale ahead of time. This is actually quite simple and is in fact a one time operation if you do it right and package the binary bits with an RPM or Debian package. Heck, even a tar file would work if you’re willing to have some extra deployment logic and these days you can use any number of devops tools like chef and ansible to codify the initial production environment setup as well. Continue reading