Common Lisp and Pink Floyd

Common Lisp and Pink Floyd. How could it get better than that?

Posted in General | Tagged , , | Leave a comment

Resistance is Futile…

…you will be assimilated:

Posted in General | Tagged | Leave a comment

Data Sharing in Publications

John Kitchin has a really interesting article in ACS Catalysis on Effective Data Sharing in Scientific Publishing. In it, Kitchin discusses various strategies for embedding supporting data—such as tables and processing code—in a publication’s PDF or source file so that other researchers can recreate the results or use the data for further analysis.

He begins by noting that one can simply embed supporting documents directly in the PDF, \(\LaTeX\) or Word document. The problem with that method is that it’s easy for the actual data and its representation in the final paper to diverge.

A better solution, Kitchin says, is to use Org mode and generate the published tables and results directly from data embedded in the manuscript source. Followers of Kitchin’s blog (or even Irreal) will recognize that this is Kitchin’s longtime publishing process. He and his group write their papers in Org mode along with the supporting data and code. That way, future researchers have everything they need to reproduce and extend the results.

If you’re interested in using Org mode to write papers or in reproducible research, you’ll enjoy Kitchin’s paper.

Posted in General | Tagged , , | Leave a comment

Say What?!?

I don’t have the words…

Posted in General | Tagged | 3 Comments

Reading Code with Emacs

I have long believed that one of the best ways to move from journeyman to master coder is to read the code of the masters. I learned most of my advanced C techniques by reading the Unix source code. Other languages have different masters that you can learn from. Nathaniel Knight has a post that suggests some convenient methods of reading code with Emacs. These boil down to learning the marking and narrowing commands.

Once you learn to conveniently mark expressions and functions, for example, you can narrow to the region and look just at the code you’re interested in. That may not seem like a huge win but as Knight explains, it often makes working with the code easier. Once you get in the habit of using narrowing, you’ll want to take a look at Artur Malabarba’s excellent post on narrow-or-widen-dwim. It’s really great because you need only call a single command and it figures out what you want to do by context. It’s a huge timesaver.

Knight also covers the little-known clone-indirect-buffer command. That’s just what you need when you want to narrow to two (or more) separate areas at the same time. Again, the utility of doing this may not be obvious but it turns out to be tremendously useful. One common use case is where you have different types of code in the same buffer. You can clone the buffer, narrow to the desired code segments, and then work in the appropriate Emacs mode for each segment independently.

You can follow Knight’s recipe for doing this but there’s an easier way. The code discussed at the link is just a little bit of Elisp to automate the cloning and narrowing steps but it’s a real time saver. Follow the link to Zane Ashby’s post (at the easier way link) to see an example of the use case I mentioned.

Posted in General | Tagged | 1 Comment

Scimax

The ACM Technews newsletter has a short piece on John Kitchin’s Scimax project. Here’s the CMU article on Scimax, which gives an overview of the project.

Basically, Scimax is the collection of (mostly) Elisp utilities that Kitchin has put together to help with his group’s writing and publishing of papers. It features using Org mode to write the papers in a reproducible research way and then publish them to the format required by the journal they are submitting the paper to. There are also some tools to aid in teaching. For more details, check out Kitchin’s Scimax page.

The nice thing about Scimax is that all the utilities are packaged up into a single project repository that anyone interested can download and use. The project is hosted on Github if you’re interested.

Posted in General | Tagged , | Leave a comment

Mark Rectangle

If you’re like me you don’t often have occasion to mark rectangles so it’s easy to forget how simple it is to do. Here’s a nice reminder from Tony Garnock-Jones.

Posted in General | Tagged | 3 Comments

Capturing BibTeX Entries with Google Scholar

Brad Collins has a nice post on collecting BibTeX citations. As he notes, there are plenty of articles on how to generate a citation in Org mode from a BibTeX entry but not on how to gather the entries to begin with.

He starts with a simple Org mode template to capture the citation once you retrieve it from Google Scholar. The idea is that you copy it from Google Scholar and paste it into the capture buffer. If you do this a lot, it would be pretty easy to write a bit of Elisp to automatically copy the citation, bring up the capture buffer, and paste the entry into it.

If you’re using Firefox or Chrome you can make things easier by installing the Google Scholar button and then follow Collins’ workflow. If you’re on a Mac using Safari—or, I suppose, on Windows using one of the Microsoft browsers—his basic workflow still works. Just follow these steps:

  1. Go to the Google Scholar page
  2. Search for the paper you’re interested in
  3. Click the “Cite” link at the bottom of the article description
  4. Choose BibTeX in the popup
  5. A tab will open with the plain text citation in BibTeX format
  6. Copy and paste the citation as described in Collins’ post

If you’re writing a lot of papers for school or for work, Collins’ method is an easy way to build up your bibliography database. Even if gathering a citation is an occasional thing, knowing how to use Google Scholar to retrieve it is useful.

Posted in General | Tagged , | 3 Comments

König #28: Publishing

Rainer König has posted the latest video in his Orgmode Tutorial series. This time he looks at publishing. Publishing is a sort of generalization of exporting that allows you export whole projects at a time.

König begins by showing us how to set up Apache (under Linux) so that he can demonstrate publishing a Web site. Details will vary, of course, with other platforms or Web servers. Configuring Org to publish a project is pretty easy but König mentions a critical piece missing from the manual so be sure to watch the video. Once you’ve described the project and it’s location, it simply a matter of choosing “Publish” from the export menu.

Check out the video for the details. As usual with König’s videos, this one is relatively short (14 minutes) so it shouldn’t be hard to fit it in. Let me say again, if you’re trying to learn Org Mode or are just curious about it, König’s video series is the absolutely easiest way to get going. After watching his videos, you may want to check out Bernt Hansen’s excellent Org Mode – Organize Your Life In Plain Text! and, of course, the manual.

Posted in General | Tagged , | Leave a comment

Abo-abo Screencast

Abo-abo has a new screencast up that demonstrates his refactoring workflow. Watch it and be amazed at how fast he navigates through his code. Part of the demonstration is the best non-trivial use of keyboard macros that I can remember.

I also learned something new: If you’re using swiper, it turns out that you can save the swiper list to another buffer and navigate through the original buffer from there. It works like occur and is, in fact, called ivy-occur. By default it’s bound to【Ctrl+c Ctrl+o】so you don’t have to do anything special to get it.

Actually, there’s a lot of useful functionality hidden away in swiper but you have to read the manual (or watch abo-abo’s screencasts) to discover it. In any event, take a look at the video. It’s informative even if you don’t use swiper. The video is just short of 10 minutes so scheduling shouldn’t be a problem.

Posted in General | Tagged | Leave a comment