Ok, so trying to get back into the (programming) swing of things, been spending my day re-configuring my laptop to become a lean, mean, programming platform. Of course my life would be easier with Mac OSX, but I’m stuck with my ThinkPad X60s laptop for now. (When is Apple going to come out with a truly lightweight ultraportable??
My setup so far
- cygwin – for Linux-like interface (making sure to install bash, screen, xrvt, vim, X11, etc.)
- vim – my favorite text editor (using gvim.exe Win32 edition for use out of cygwin)
- ruby – downloaded a Win32 edition (can also use InstantRails as a “shortcut”); also installed rails
- mysql – everyone’s favorite (free) database, right? (postgresql is cool too)
- apache – installed it, but haven’t had time to configure that one (correctly) yet
Screen will allow me to have a few vim sessions open, plus a ruby console, and mysql console, and yeah, mongrel running from a command line all within one (or more) terminal window. I can toggle between screens with a simple key-command. Plus, I can “detach” the screen, close the terminal window and the sessions will persist in the background. Once I’m done with “other work” I can tell screen to “reattach” and all my files and applications will still be there.
Yeah, there are other IDEs out there I could use (such as Eclipse, etc.), but since I hardly have time to learn ruby as it is, I’m sticking to what I learned “back in the old days”, which was not that long ago anyway 😉 I’m a big fan of learning how to program on UNIX using command line environments. It may not be “user-friendly” but learning to operate in a lean environment like that comes in handy later on. Plus, I haven’t seen any text editor that truly rivals vim or emacs. 😉
Some early challenges
So, I had some trouble running ruby scripts within cygwin’s bash shell. Something about bad file extensions, missing ruby gems, and other random crap. Given I have ruby installed in both “regular” Win32 version and in cygwin, and can’t get rails installed in cygwin, I probably shot myself in the foot. It works perfectly fine using windows xp’s dos shell (cmd.exe), so i’m calling cmd within a bash shell and running ruby from there. Not pretty _at_all_ but it gets the job done, and with Duo Core + 1.5GB in RAM, I have plenty of memory and CPU to spare.
Also, couldn’t get screen to work correctly in cygwin’s bash. Seems like a bug, but thanks to this site, I found a work around using xrvt: when reattaching to a screen, need to use screen -D -RR and it works.
Here’s my shortcut for C:cygwinbinrxvt.exe -fn “Lucida Console-14” -geometry 160×60 -sr -sl 1000 -e /bin/bash –login -i
I found this site after working through this, wish I had found it earlier: http://infrablue.tripod.com/cygwin.html
I agree with the author, quoting him,
For many, including myself, the shell environment is the most critical part of a system and graphical applications and utilities are often superfluous, distracting, wasteful of resources, and even dangerous. Most of the command GNU command-line utilities are practically universal and can be used on everything from supercomputers to small handheld devices.