I just installed TeX on my MacBook Pro, and boy is it a lot easier than installing it on a server a decade ago. Just download MacTeX-2008 from TUG and you’re basically done. MacTeX installs a nifty little System Preferences pane that allows you to have different versions or distributions of TeX installed and switch between them with a mouse-click. It even sets your
MANPATH variables automagically using the
/etc/paths.d directory facility in Leopard. In my case that didn’t work because I have a custom
.tcshrc, but the “What Is Installed” document in /Applications/TeX/Utilities/Documents explained exactly what they are doing so it was easy to update my path.
It’s good to be using TeX again, though I’m still learning the new stuff. I’m doing
dvipdf, but I think the new way would be to use
pdflatex. However, it seems to choke on the EPS file I have as part of the UH thesis example document.
Later I realized that Google Finance is using Flash for their chart (boo!) so the playing field is not quite level.
There appears to be a lot of activity in this area (many of the packages listed are pre-1.0) so perhaps this is a case where procrastination will pay off.
Sadly, I cannot seem to find a link to the paper I remember reading that showed that procrastination can be effective when purchasing a compute cluster to work on a particular project. A cookie for any CSDLer that can dig it up! 🙂
Josh and I did our 4H today with me in the driver’s seat. I’m still doing Ruby tutorials, so we did Chapter 6 (Iteration A of the Depot application) from Agile Web Development with Rails. Pretty neat, data validation from forms is really easy in Rails. The database migration stuff also seems very cool.
Philip and I did a combined 4H and individual meeting on Wednesday. For our 4H time, Philip was in the driver’s seat and we talked about Restlet, which is the Java REST framework that we’ll be using in Hackystat version 8.
We walked through the tutorials included with Restlet, and after adding a bunch of JARs to Philip’s Eclipse library path, they all seemed to work. There was one that downloaded the most recent bookmarks from del.icio.us, and also Yahoo searches. I believe the examples came from the upcoming O’Reilly book RESTful Web Services. All in all, Restlet looks like a decent foundation for Hackystat 8, and there is even some evidence that it performs well compared to Tomcat.
David and I did our 4H today in his office. We were working through his issues on the jEdit sensor. Following a trail from the jEdit Activity Log, we determined that his plugin was not getting loaded by jEdit. After unjaring some other plugins, we determined that the path to the plugin class was being inferred by the names of properties in the required plugin properties file in the jar (shame jEdit!). This was not obvious because the example plugin uses the default package so it was not clear that the property names had to include the whole package path to the plugin class.
After changing the properties file, jEdit was able to load the plugin so at least that hurdle has been resolved. Sounds like jEdit needs better documentation on writing a decent plugin (what’s up with using the default package, that’s amateur Java programming).
Pavel and I did our 4H on Friday. I was in the driver’s seat, and decided to finish up the Rails tutorial that I presented the first portion of last Wednesday at the CSDL meeting.
We used the CSDL meeting area for our 4H, and since we were working through a tutorial we used the projector as a second monitor rather than a mirrored display: tutorial web page on the projector, Eclipse on the laptop display. This worked pretty well I think, and I would encourage it as an option for other 4Hs.
As for what was learned, the rest of the tutorial had more actual Rails coding and went more into modifying view pages in RHTML.
P.S. I forgot that we were supposed to spend the last 5 minutes blogging about it, so this is a belated blog entry.
Most Rails tutorials use MySQL as their canonical database. Locomotive includes SQLite, but not MySQL.
The consensus seems to be that installing MySQL via the official Mac OS X MySQL installer is the best way. It installs in
/usr/local/ and includes a System Preferences pane for easy startup and shutdown.
MySQL installs with 4 accounts (including 2 root accounts) that have no password. While the default install only allows connections from localhost, it’s still a good idea to set the passwords to something. MySQL AB has a help page on Securing the Initial MySQL Accounts.
For manipulating MySQL databases directly, the open source CocoaMySQL seems nice. I used it to secure the initial MySQL accounts: Tools->Edit User.
Here’s a bunch of RoR tutorials from the web. The canonical book on the topic is Agile Web Development with Rails.
Getting RoR installed is pretty easy with Locomotive, an entirely self-contained RoR environment for Mac OS X (there is a Windows equivalent called Instant Rails). This means no installing all the pieces, and no messing up of anything in Mac OS X (which includes Ruby these days). You just drag the application into your Applications folder and you are good to go. However, it also means that any other tool or application that needs to call Ruby has to be configured to use the version installed inside Locomotive (which is really a bundle that includes the application and all the RoR components).
The hip text editor for RoR on the Mac is TextMate. However, it’s a commercial application and has no API for Hackystat hooks, so I’m avoiding it for now.
Pieced together from various web pages, here is how to get up and running with RoR on Mac OS X (assuming you have Eclipse 3.2.X already installed):
- Download Locomotive and drag the Locomotive icon into your Applications folder.
- Install RDT and RadRails Eclipse plugins. Aptana has the links in their RadRails docs.
- Configure RadRails to use RoR embedded in Locomotive. Due to the RadRails documentation transition right now the wiki with the instructions is only available from Google’s cache, but here it is from some blog. Note that Preferences will be under the Eclipse menu (not RadRails, the customized Eclipse version), and that the exact paths will be different based on what version of Locomotive you have (the release date is part of the path, ugh) and whether you are on an Intel-based Mac (select “i386” path) or a PowerMac (select “powerpc” path).
After following my instructions I was still getting weird errors in RadRails when trying to create a HelloWorld project. I think the key is to do the RadRails configuration before creating any projects. Remember that Eclipse configuration follows the workspace, so if you create a new Workspace for RoR work then make sure you do that before you configure RadRails to use the Locomotive paths.
I’m using my personal blog for my engineering log, so if someone wants to get just the posts tagged as engineering-log, here is a feed just for that.