Emacs in the Coming Year

Nic Ferrier, the creator of elnode and the proprietor of Marmalade, gave an interesting Skills Matter talk on what the coming year will mean for Emacs. The video is about an hour and a quarter so plan appropriately.

The talk centers around Emacs becoming an important development environment in the same sense that Lisp Machines were. Ferrier begins with elnode, a platform that allows you to write Web servers that run under Emacs. As examples, he demonstrates a simple Web Chat app and then moves on to discuss how he is rewriting Marmalade to run under elnode.

There’s a lot good material and ideas in the talk. It’s long but well worth your time. Ferrier shows how the dream of having a modern Lisp Machine development environment is closer than you may think.

Posted in General | Tagged | 2 Comments

Quickdocs

Eitarow Fukamachi has put up an interesting service called Quickdocs. It’s a search engine for the Quicklisp repository. There’s no directions or explanation of exactly what a search provides so it’s a bit of an adventure game but appears to be quite useful. If I type in “iron,” I get a result that says “ironclad” the excellent crypto library from Nathan Froyd. When I click on “ironclad” it gives me the README for the project and offers to download it for me.

From what I can tell, the search is a regular expression search on the project name so typing in “crypto” returns no results. This appears to be a handy resource and will doubtless get better. Worth a look if you are, as you should be, a Quicklisp user.

Posted in Programming | Tagged , | Leave a comment

Richard Dillon’s Emacs Videos

Via Magnar Sveen’s Emacs Rocks! twitter feed I came across this retweet pointing me at Richard Dillon’s Emacs videos. It’s a set of 13 videos on using Emacs intended mostly for those inexperienced with Emacs. He covers several topics including

  • Working with buffers
  • Working with windows and frames
  • The mark and point
  • Org mode
  • Customization
  • Loading mechanisms
  • Initialization files
  • Working with the REPL
  • Hacking the mode line

Even though these videos are mainly aimed at the n00b, I still learned a few things I didn’t know. They’re each 10 to 20 minutes long so they cover the material pretty well.

If you want to view the videos in order, start at the end of the list and work your way up. Of course, YouTube starts the video automatically when you click on the link. That leads to a slight problem (at least for me). I like to view them in full screen so I click on the expand button after the video has started but then it’s very hard to read his Emacs screen. I discovered that if you stop the video and restart it (while in full screen mode) it restarts and will be perfectly clear.

All in all, a useful addition to the set of Emacs videos. Well worth taking a look at regardless of your familiarity with Emacs.

Posted in General | Tagged | Leave a comment

Reflections on Trusting Trust Redux

Way back in 1984, Ken Thompson wrote what I consider one of the greatest papers on computer security. I wrote about this in my The Greatest Hack of all Time post. If you haven’t read this paper your education is incomplete and you should remedy the situation immediately. You can find the paper here.

Bruce Schneier is reporting that David Wheeler has published a paper on how to detect the Thompson hack. This is good stuff. The solution is simple and obvious in retrospect but interesting nonetheless. You really should take a look at this (and Thompson’s original paper) even if you’re not particularly interested in security—it’s part of your heritage.

Posted in General | Tagged | Leave a comment

The Vivid Schemer

Recursion always seems to cause beginning CS students trouble. One of the very best resources for learning and becoming comfortable with it is The Little Schemer. Although the exercises are in Scheme, they apply equally well to Common Lisp or Elisp.

Now Cheng Yichao brings us The Vivid Schemer, which captures the spirit of The Little Schemer in an interactive Web page. If you’re a fan of The Little Schemer or you’d like to get a feel for what it’s like, take a look at the Vivid Schemer.

Posted in Programming | Tagged , | Leave a comment

Multiple Cursors and the Mouse

On Emacs Rocks!, Magnar Sveen announced that he’s added a mouse interface to the excellent multiple-cursors package. Amusingly, the first two replies were

  1. Excellent!!!!
  2. This is the beginning of the end!

I pretty much ignore the mouse when I’m in Emacs so the functionality is not something I’m apt to use. That said, it doesn’t bother me that it’s there—I firmly believe the Earth will continue to revolve around the Sun—and, according to Sveen, it’s something that people have been asking for.

I look on it as Sveen continuing the Emacs tradition of letting you have it your way. If you aren’t already using multiple-cursors, stop wasting your time reading blogs and go download it with ELPA. If you haven’t already seen it in action, spend 4 minutes to watch this excellent demonstration. You’re sure to be impressed.

Posted in General | Tagged | Leave a comment

Calling External Programs

One of the rules specific to EmacsGolf, as opposed to VimGolf, is that you’re allowed to call external programs to operate on a region of the buffer using something like 【Ctrl+u Meta+|】. You can do the same thing from an Elisp program, of course, and Xah Lee has a useful post showing how to call external programs.

This functionality is more flexible than many beginners realize. You can call shell scripts, a scripting language such as Perl or Python, or a compiled program such as sort—anything that reads from stdin and writes to stdout. There nothing hard about doing any of this, of course, but you do need to know the proper incantation. See Lee’s post for the details. Also take a look at shell-command. It can be useful when you want to run an external program and optionally capture its output to a buffer—see this post for an example of its use.

Posted in Programming | Tagged | Leave a comment

Is Emacs an IDE?

Is Emacs an IDE? Here’s one answer. Here’s another: who knows, who cares? You might as well ask if Emacs is a fingdop. Emacs is what it is regardless of whether or not we call it an IDE (or fingdop, for that matter). It’s hard to see how a decisive answer to the question would make the slightest bit of difference in anyone’s life. I don’t understand why people keep obsessing about this.

Here’s what Emacs is: an editor that provides a user programmable editing environment unmatched by any other editing tool. Sometimes it looks like an IDE, sometimes it looks like an operating system, sometimes it just looks like an editor. If you simply must feel like you’re using an IDE, fire up Eclipse; then there’ll be no doubt. Just don’t blame me if you still aren’t happy.

Posted in General | Tagged | 2 Comments

EmacsGolf Challenge 2

Xah Lee sent me another suggestion for an EmacsGolf challenge. While in a whimsical mood, Lee decided to write some Elisp to convert Latin text to Fraktur (Gothic font). That’s an interesting Elisp challenge in its own right but Lee decided to use a simple table lookup and to provide the facility to go back from Fraktur to Latin. His table, as you can see at the link, is a vector of vectors and a bit of a pain to construct. Having built the first table, Lee wants to make the second as easily as possible. Given the starting table

(setq latin-to-gothic [ ["A" "𝔄"] ["B" "𝔅"] ["C" "ℭ"] ["D" "𝔇"] ["E" "𝔈"]
["F" "𝔉"] ["G" "𝔊"] ["H" "ℌ"] ["I" "ℑ"] ["J" "𝔍"] ["K" "𝔎"] ["L" "𝔏"]
["M" "𝔐"] ["N" "𝔑"] ["O" "𝔒"] ["P" "𝔓"] ["Q" "𝔔"] ["R" "ℜ"] ["S" "𝔖"]
["T" "𝔗"] ["U" "𝔘"] ["V" "𝔙"] ["W" "𝔚"] ["X" "𝔛"] ["Y" "𝔜"] ["Z" "ℨ"]
["a" "𝔞"] ["b" "𝔟"] ["c" "𝔠"] ["d" "𝔡"] ["e" "𝔢"] ["f" "𝔣"] ["g" "𝔤"]
["h" "𝔥"] ["i" "𝔦"] ["j" "𝔧"] ["k" "𝔨"] ["l" "𝔩"] ["m" "𝔪"] ["n" "𝔫"]
["o" "𝔬"] ["p" "𝔭"] ["q" "𝔮"] ["r" "𝔯"] ["s" "𝔰"] ["t" "𝔱"] ["u" "𝔲"]
["v" "𝔳"] ["w" "𝔴"] ["x" "𝔵"] ["y" "𝔶"] ["z" "𝔷"]])

we want to make a second table to map Fraktur to Latin.

(setq latin-to-gothic [ ["A" "𝔄"] ["B" "𝔅"] ["C" "ℭ"] ["D" "𝔇"] ["E" "𝔈"]
["F" "𝔉"] ["G" "𝔊"] ["H" "ℌ"] ["I" "ℑ"] ["J" "𝔍"] ["K" "𝔎"] ["L" "𝔏"]
["M" "𝔐"] ["N" "𝔑"] ["O" "𝔒"] ["P" "𝔓"] ["Q" "𝔔"] ["R" "ℜ"] ["S" "𝔖"]
["T" "𝔗"] ["U" "𝔘"] ["V" "𝔙"] ["W" "𝔚"] ["X" "𝔛"] ["Y" "𝔜"] ["Z" "ℨ"]
["a" "𝔞"] ["b" "𝔟"] ["c" "𝔠"] ["d" "𝔡"] ["e" "𝔢"] ["f" "𝔣"] ["g" "𝔤"]
["h" "𝔥"] ["i" "𝔦"] ["j" "𝔧"] ["k" "𝔨"] ["l" "𝔩"] ["m" "𝔪"] ["n" "𝔫"]
["o" "𝔬"] ["p" "𝔭"] ["q" "𝔮"] ["r" "𝔯"] ["s" "𝔰"] ["t" "𝔱"] ["u" "𝔲"]
["v" "𝔳"] ["w" "𝔴"] ["x" "𝔵"] ["y" "𝔶"] ["z" "𝔷"] ])

(setq gothic-to-latin [ ["𝔄" "A"] ["𝔅" "B"] ["ℭ" "C"] ["𝔇" "D"] ["𝔈" "E"]
["𝔉" "F"] ["𝔊" "G"] ["ℌ" "H"] ["ℑ" "I"] ["𝔍" "J"] ["𝔎" "K"] ["𝔏" "L"]
["𝔐" "M"] ["𝔑" "N"] ["𝔒" "O"] ["𝔓" "P"] ["𝔔" "Q"] ["ℜ" "R"] ["𝔖" "S"]
["𝔗" "T"] ["𝔘" "U"] ["𝔙" "V"] ["𝔚" "W"] ["𝔛" "X"] ["𝔜" "Y"] ["ℨ" "Z"]
["𝔞" "a"] ["𝔟" "b"] ["𝔠" "c"] ["𝔡" "d"] ["𝔢" "e"] ["𝔣" "f"] ["𝔤" "g"]
["𝔥" "h"] ["𝔦" "i"] ["𝔧" "j"] ["𝔨" "k"] ["𝔩" "l"] ["𝔪" "m"] ["𝔫" "n"]
["𝔬" "o"] ["𝔭" "p"] ["𝔮" "q"] ["𝔯" "r"] ["𝔰" "s"] ["𝔱" "t"] ["𝔲" "u"]
["𝔳" "v"] ["𝔴" "w"] ["𝔵" "x"] ["𝔶" "y"] ["𝔷" "z"] ])

Lee says he did this with a simple replace-regexp. Can you do better? Since this is EmacsGolf, you can use anything in stock Emacs, ELPA, or an external tool called from Emacs.

Posted in General | Tagged , | 14 Comments

SBCL 1.1.4

Somehow I missed the fact that SBCL 1.1.4 was released at the end of January. I just compiled and installed it and as usual everything is fine. The new release is mainly bug fixes and an optimization to the LOOP macro.

I love SBCL. It’s a world-class Lisp system that compiles to native code. If you’d like to get started with Lisp, I can’t recommend SBCL and Emacs/SLIME enough. Together they make an outstanding development system.

Posted in Programming | Tagged , | Leave a comment