We’ve all been there:
True. "@amyengineer: Also found this gem on software development – it *is* a winner. pic.twitter.com/r1qkTF2bzq"
— Anna Nachesa (@ashalynd) April 14, 2015
We’ve all been there:
True. "@amyengineer: Also found this gem on software development – it *is* a winner. pic.twitter.com/r1qkTF2bzq"
— Anna Nachesa (@ashalynd) April 14, 2015
I’ve written before that I’ve started learning Calc. That last post was after I’d worked through the introductory material (which is, itself, quite dense). I’ve now completed the first three sections of the tutorial covering
It may seem that my progress is slow—that last post was two weeks ago—but there’s a huge amount of material, especially in the last section. The basic and arithmetic tutorials are pretty much what you’d expect although you’d probably be surprised at how many different functions there are. The last section is astounding. For example, there is a function to calculate the dot product of two vectors but even if there weren’t you could do the same operation using the map and reduce functions. In Elisp (but not Calc) terms that would be
(reduce #'+ (cl-mapcar #'* V1 V2))
There are lots of examples that don’t have a simple, single command so these functions turn out to be really powerful and useful.
The tutorial has exercises, some of which could be from the Euler Project. They’re not all that hard, thankfully, but some of them require careful thinking about before you can solve them. They’re really useful for helping to cement some of the functions and techniques in your head.
I’ve already started using Calc in my day-to-day work. Where before I’d bring up a Lisp REPL or try to make do with Elisp, I now just pop into Calc and perform whatever calculations I need. It’s nice that I don’t have to worry about overflow and things like that. The only downside is that I still haven’t internalized all the function codes. They are generally one or two characters and while some—like *
, +
, …—are obvious others are less so. For example VC
is the cross product of two vectors and HL
is \(\log_{10}\). Fortunately, there’s a cheat sheet that lists the most common commands.
I’m really enjoying working through the tutorial and am learning a lot. I’ll post another status report when I’ve worked through more of the tutorial.
If you’re an academic in the sciences, you have an advantage over your colleagues in the liberal arts: you can write in LaTeX using any editor you choose1. Your document is in plain text and can be operated on by several text processing utilities. If you’re an Emacs user, you don’t even have to bother with LaTeX; you can write in Org mode and export the result to LaTex for submission. Best of all, you never have to touch Word. Those in the Liberal Arts, on the other hand, almost certainly have to submit their articles in Word format.
Now some of those liberal Arts academics are rebelling and looking for ways to do their writing in plain text too. Of course, they still have to submit their articles in Word format but there are, fortunately, tools that allow this. One such effort is the Scholarly Markdown Project. It’s goal is to allow researchers to write in a slightly extended Markdown and use a port of Pandoc to convert it to other formats such as HTML or Word.
The Scholarly Markdown Project is still in the alpha stage so some academics are going their own way. W. Caleb McDaniel is a historian who is using Markdown to produce his books and articles. His post lays out his objection to using Word and then goes on to show how he’s replaced it with Markdown. I like how he’s not afraid of the Unix tools and uses them to assemble his documents.
We’ve now reached the stage where anyone who’d rather not use Word has other options but can still submit a final product in Word format. Emacs users have powerful built-in options: they can write in Org-mode and export to docx
format. Those who prefer not to use Emacs, can write in Markdown using any editor they choose and translate to docx
or any other of a number of formats using Pandoc. Lots of people don’t mind—or even prefer—Word, of course, and they’re free to continue using it. For those who’ve had enough of that walled garden and all the problems it brings, there are now alternatives.
Yes, yes, a few scientific journals also require submission in Word format but they are, fortunately, few in number.
Xah Lee has a couple of useful tutorials on the finer points of ibuffer
and the isearch
family. Every Emacs user is familiar with forward and backward incremental search, 【Ctrl+s】and 【Ctrl+r】, but there are some more specialized commands as well. For example, there are isearch-forward-word
(【Meta+s w】) and isearch-forward-symbol
(【Meta+s _】). These differ subtly from the usual isearch-forward
; see Xah’s Search & Highlight Words for the details and for other useful commands.
Most people don’t use these commands very often so they’re hard to remember. I have guide-key set to pop up the bindings when I type 【Meta+s】 so I don’t have to remember worrying about remembering them. Another good solution would be to make them into a hydra.
The default buffer listing function is list-buffers
but you should replace that with ibuffer
. It turns out the ibuffer
has many ways of marking and operating on buffers. Most folks know how to mark and delete buffers but you can also perform save, search, revert, rename and several other useful functions. Again, you should check out Xah’s tutorial on the subject for the details.
These are useful tutorials and you may want to bookmark them but you should at least give them a look.
UPDATE: regex → incremental
Over at the Google+ Emacs Community, Quan Ta has an interesting post about an “accidental theme” that he discovered when he byte-compiled his .cask
directory. He said it looked like the solarized-light theme but with colors that were a bit more lively.
I tried the solarized theme but didn’t like it because the colors seemed washed out to me and I found some of them hard to read. Thus I was interested to see what Ta’s theme looked like. A bit later, he posted a picture of it and I realized it was almost the same as my “theme.” I put theme in quotation marks because I just use the default light theme but with a background of oldlace.
So if you want to try an easy-to-set-up theme, just select the default light theme and add
(set-background-color "oldlace") (add-to-list 'default-frame-alist '(background-color . "oldlace"))
to your .emacs
or init.el
.
I like this theme better than anything else I’ve seen. Perhaps you will too.
I am, I must admit, fascinated by Karl Voit’s work in capturing, storing, and indexing the digital files that record his life. I’ve covered some aspects of this before and will doubtless cover other aspects that I find interesting.
Today, I want to talk about a post in which he describes his digital workflow. The post is nominally about how he processes and stores digital photos but many of the processes hold for any type of file.
One of the most important and interesting things—and in some sense most trivial—is his naming convention for files. Here’s an example: 2014-05-09T22.19.58 Susan presenting her new shoes -- family clothing.jpg
. Each file name begins with a date/time stamp. That’s important for Voit because he ties all his files together into his agenda so he can pull up everything relevant to a particular day in his life. It’s also important, as he explains, because file metadata is often changed by utilities that work on the files. By putting the date/time stamp in the file name, he assures that it changes only if he changes it explicitly.
After the date/time stamp, there’s a brief description of the file; it’s what most of us would use for the entire file name. That’s followed by “ --
” which marks the beginning of the tags. This is the most interesting part of his convention. It allows him to add tags to his files, which he can use for searches. He can, for example, call up all files with the “clothing” tag and get the example file above as one of them. Again, because the tags are part of the file name they don’t get lost when files are moved or stored on different media or a different operating system.
The rest of Voit’s post describes his folder structure and the scripts that he uses to help with processing his photos and dealing with naming them. Although I found his naming convention the most interesting part of the post, the whole thing is worthwhile. Read it. You may get some useful ideas.
The Setup has posted an interview with Bruce Schneier. Their interviews always ask just four questions:
It’s interesting that a technical guy like Schneier doesn’t care very much about his computer and software. He has a Windows 8.1 machine and uses Word (shudder), Eudora, and Outlook as his main tools. Partly this is because he doesn’t want any more of his files than is absolutely necessary in the cloud. He appears to hate all the software he uses with the possible exception of Eudora.
Like all Setup interviews, it’s short and interesting and well worth a read.
Via Karl Voit: Happy Birthday to the Word “Hack”.
I finally got around to compiling and installing Emacs 24.5. I forgot about the extra bit you have to do to enable eww
on OS X, so I had to rebuild it.
I’ve blogged about how to build Emacs with eww
on OS X before but in case you’re trying to do so for Emacs 24.5, here’s the magic spell1:
./configure --with-ns CFLAGS="-I /usr/local/include/libxml2" make make install
Most people, of course, will choose to just install a binary or to use Homebrew but if, like me, you want to build from scratch, the above should do it for you.
You may or may not need
./autogen.sh
before the configure
. I don’t and I’ve never been able to figure out why it’s sometimes needed and sometimes not. If you have problems, just call autogen.sh
first.
Seems indicative of shifting expectations/demands that SICP used to be freshman course book; now it's considered "super advanced reading" :/
— Andy Matuschak (@andy_matuschak) March 26, 2015