You are currently browsing the category archive for the 'Technical' category.
I downloaded iPhone 2.0 onto my first-generation iPhone yesterday. I seem to have avoided some of the hiccups that others complained about. I’ve only had time to explore the new iPhone a bit, but my top 3 impressions:
- Zenbe lists are pretty cool, and fill the function gap left by the fact that iCal doesn’t have to-do lists on the iPhone.
- iCal now has multiple calendars. Hooray!
- Camera now says “Camera would like to use your current location” — yech. Has iPhone been geotagging my pictures? I don’t want this. At least I can say “no” now, but it’d be nice to be able to turn this off by default.
I’ve found that xzgv is pretty nice!
I’ve said before how much I like the streamlined browser Skim. One of the best parts is that it will auto-reload PDFs that change on disk (e.g., when you recompile a LaTeX document into a PDF). I just found out how to make it even better, so that Skim never asks you whether to reload, it just does it automatically:
$ defaults write -app Skim SKAutoReloadFileUpdate -boolean true
Voila!
For a long time I have been unsuccessful at using the crossref field in BibTeX properly for the situations where I need it most: when I have multiple chapters in an book consisting of an edited collection of articles in my database, and I want to provide book-level information through a cross-reference. I always got the error
Warning--empty booktitle in <your_favorite_key_here>
which was rather frustrating.
However, I’ve finally figured out that for a book or proceedings, you need to specify both title and booktitle fields in the book entry. Most of the time the contents of these fields will be identical. Looking back at the Guide to LaTeX, this is a no-brainer, but it stumped me for a very long time. May this blog post save you similar agony!
Read about it at http://www.macosxhints.com/article.php?story=20060825072451882.
After much searching I have finally found how to use BUGS (Bayesian Inference using Gibbs Sampling) on OS X. Thanks to Tom Palmer for this document, which explains how in a few easy steps.
Instructions taken from here:
- Click to select one of the files for which you’d like to change the associated default application
- Press Command+I to open the Get Info window
- Under Open with select the application you’d like to use
- Under Use this application to open all documents like this click on Change All… and follow the prompts
One cool thing I just found out is that emacs has version control integration. Most things are bound to C-x v <key>. Some useful commands:
- C-x v i: add
- C-x v v: commit (followed by C-c C-c once you’ve written your comment)
- C-x v l: view log
- C-x v =: view diff with repository version
A more complete list can be found here.
I’m pretty psyched about my iPhone but there are a few simple things that would really improve it. Here’s a running list:
- A functioning To-Do list. I’ve been using Toodledo as a web-based to-do list, but it’s not the same thing as having on your phone.
The ability to send text messages to multiple recipients at once.- Improvements to the Calendar functionality:
- Ability to customize event recurrence as in the OS X iCal application.
- Ability to distinguish among multiple calendars, as in iCal as well.
- A search function for email
UPDATE: as of mid-January 2008, we can now send text messages to multiple recipients. Good for Apple!
Apart from R, I do most of my research programming in Java. There are two major reasons for this:
- The Stanford NLP lab group I was in during grad school programmed in Java, and old habits die hard.
- Java has some very nice IDEs — IntelliJ and Eclipse.
One thing that bugs me a lot about Java, though, is all the type casting that you need to do. I got very excited when Java 5 introduced generics, and I use them so much that I need few casts in my programs. But then I got exposed to Ocaml and type inference. What a language! What a feature! It is the closest thing I’ve ever seen to being able to say that if your program will compile, then it will work properly.
With the right IDE available, I would give up Java and adopt Ocaml right now — (1) above I can deal with, but (2) is hard to leave behind. Sadly, no language with type inference seems to have a functioning IDE with the same power of IntelliJ or Eclipse. Anyone out there reading this blog who feels inspired, go and work on Eclipse integration for Ocaml! Here is the list of critical IDE features I’d want, in order of importance:
- Safe rename
- Safe move
- Auto extraction of functions/expressions
- Quick navigating to types (or functions, modules, etc. in Ocaml)
- Outline views
- Integration with debugger/output (e.g., cross-referencing of error messages to code lines across windows)
- Auto-generation of code—we’d need a lot less of this in Ocaml or the like.
The best prospect right now may be ODT…
I write almost everything in LaTeX. In Windows I generally previewed the output as Postscript using Ghostview, but OS X is much more PDF-oriented. I’ve found this terrific little PDF viewer called Skim, which I like more than anything else for LaTeX output. The key reason is that it will automatically reload the PDF file any time it changes on disc. That means you can work with just two or three windows — the text editor, Skim, and maybe a terminal window — and always have a pretty up-to-date view of your document.
Better yet, you can automatically switch focus from a terminal window to Skim with Applescript:
osascript -e ‘tell application “Skim” to activate’
This means you can construct a shell script that automatically compiles your LaTeX document into PDF and then shifts into Skim so that you’re looking at a freshly updated version. Pretty sweet! The only thing left is to figure out how to bind this set of commands correctly into Emacs…
I just learned about flyspell for on-the-fly spell checking in LaTeX. It’s not perfect, but still pretty sweet!
One of those “howdoI”s I come across all the time is how to manipulate PDF files, e.g. concatenate several, from the command line without too much pain. The best tool I’ve found so far is Pdftk. My favorite command is concatenating several PDFs together:
pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
For a while I had been living without color-coding in my OS X X11 xterm windows to distinguish directories from executable files from other files. A bit of playing around got me color-coding back, though. Try the following in your .bashrc:
# color
export TERM=xterm-color
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
