New Hydra Functionality

I haven’t written about abo-abo’s excellent hydra package for a while but he’s continued to make significant enhancements to it. The latest is the ability to temporarily suspend a hydra and even push it onto a stack while you invoke another.

The nifty thing about the upgrade is that you don’t have to do anything to your hydra definitions. All you need do is bind your desired key sequence to hydra-pause-resume and the functionality is enabled.

Posted in General | Tagged , | 1 Comment

A Wonderful Piece of Unix History

Unix is widely extolled as the first portable operating system but many don’t know how that came about. By the time of Version 6, Unix had been licensed to many universities but it still ran only on the PDP-11 family of computers. Juris Reinfelds tells the story of how the University of Wollongong made the first port of Unix to a non-PDP system.

It’s an interesting story. The small Computer Science section—it was part of the Mathematics Department then—needed a time share system for hands on computing by students and staff. Reinfelds visited Murray Allen and John Lions1 of the University of New South Wales to discuss possible systems. He early on decided that a Unix system would be ideal but the CS section didn’t have enough money for a PDP-11 so they bought an Interdata 7/32 instead.

The Interdata didn’t run Unix, of course, so the plans for a Unix system were put on hold. Around that time, Richard Miller joined the department and was looking for a programming challenge. Reinfelds and Miller decided that porting Unix would be just the thing so Miller started work on the first Unix port. He started by recoding the C compiler’s code generator to output Interdata assembler code. That was difficult because the University of Wollongong had no PDP-11 and the University of New South Wales had no Interdata. A further complication was that there were funds for at most three trips to UNSW.

I’ll let you read Reinfelds’ story (it’s short) to see how it all worked out. It’s a tribute to Miller and Unix that a port was possible at all let alone so easily. Definitely worth reading.

Footnotes:

1

Of Lions Book fame.

Posted in General | Tagged | Leave a comment

Marking Up Quoted Org Strings

Artur Malabarba has a nice tip on how to markup strings in Org mode that begin with " or '. I should have implemented it for this post.

Posted in General | Tagged , | Leave a comment

Elisp/Emacs Examples

Caio Rordrigues has an excellent resource for beginning/intermediate Elisp programmers that also lists some of the common Emacs customizations that many Emacs users end up making. For example, it tells you how to turn off requiring a “yes” or “no” response to certain prompts and enabling a simple ‘y’ or ‘n’ instead.

The real meat, though, is the list of Elisp examples. You can think of it as an Elisp cookbook. It covers things like filtering lists, reading or writing from/to strings, splitting strings, mapping, structures, the loop macro, working with buffers and files, and a host of other useful examples. It’s fun just to read through it and when you do, you’re likely to learn a few things you didn’t know.

This is a really useful resource, especially for learning Elisp idioms and what sort of functions are available. As I’ve written before, the basics of Lisp programming are easy; it’s learning the library that’s hard. That’s especially true of Elisp, which has many specialized functions for editing text. Sometimes you know what you want to do but it’s not clear what terms you should search for to tell you how to implement it. Rordrigues’ examples covers most types of actions and will at least get you to the right set of functions. Even new Emacs users will find the section on customizations helpful.

Posted in General | Tagged , | Leave a comment

Draft #4

I’ve had this post in my blog-ideas queue for some time but it’s always seemed too far afield from Irreal’s interests—being about writing and dictionaries, and stuff—to write about. Now, happily, I’ve found the perfect hook. I wrote previously about DuckDuckGo bang shortcuts and gave some examples. Another example is !webster which takes you to the 1913 + 1828 Webster’s Revised Unabridged Dictionary. Why should you care?

The answer to that is in James Somers’ beautiful post, You’re probably using the wrong dictionary. In it, he describes a New Yorker article, Draft #4, by the prose stylist John McPhee. In that article, McPhee explains that the fourth draft comes after he’s done all the creative work and is ready to “punch up” his language. His main tool for doing that is to identify words that aren’t quite right or perhaps present an opportunity to do better and then look those words up in the dictionary. Note that it’s dictionary not thesaurus.

The problem, says Somers, is that most dictionaries are dry and give efficient, juiceless definitions. Although McPhee doesn’t say what dictionary he uses, Somers was able to track it down—it’s Webster’s Revised Unabridged, of course—and add it to his dictionary app. You really have to read his post to see why that’s worthwhile but if you’d like to improve your writing it’s well worth the read.

After reading Somers’ post, I bookmarked the dictionary but it was a bit of a pain to look up the bookmark. It would be easy to add some Elisp to pop me into the right definition in my browser or perhaps even the in the minibuffer the way abo-abo’s excellent define-word package does but I don’t use it that often so it never seemed worthwhile. Now with the DuckDuckGo bang shortcut it’s really easy and I’ll probably start using it more. Maybe enough to justify writing the Elisp.

UPDATE: he → he’s; prefect → perfect; unabdridged → unabridged

Posted in General | Tagged , | 3 Comments

Mastering Emacs in Emacs

Virtually every Emacs geek knows about and has probably purchased Mickey’s Mastering Emacs. Álvaro Ramírez wanted a bit more: he wanted to be able to search it from Emacs.

That turns out to be surprisingly easy. Just download the epub and convert it to Org mode, and you’re all set. There’s a little cleanup involved but it seems a reasonably easy process. Check out Ramírez’s post for the details. If you want to be able to bring up Mickey’s wisdom as you’re working, this seems like just the thing.

UPDATE: Matering → Mastering

Posted in General | Tagged | 7 Comments

Roundup of Open Plan Office Research

Jack Schofield over at ZD Net has a nice post on the evils of open plan office layouts. That’s a favored Irreal hobbyhorse, of course, so you might think I’ve said just about everything there is to say about the matter. Schofield’s post is useful because it has links to the multitude of research showing the harm to productivity and employee health that inevitably accompany such plans.

As I’ve stressed many times, the only real benefit of open plan offices is that they’re cheaper. That means facts probably won’t have much of an impact on management but if you think you have a fighting chance, the links may help.

Posted in General | Tagged | Leave a comment

Obscure Math Curiosity of the Day

The Fibonacci sequence: it’s everywhere.

Posted in General | Tagged , | 1 Comment

SBCL 1.2.13 Released

The Steel Bank Common Lisp developers have released version 1.2.13. The release fixes 8 bugs and has a few enhancements for the Windows port and for threading. See the NEWS file for the details.

The system compiled without incident as usual. The regression test error that I wrote about last time is still there so I may have to look into myself. The only other problem is that it’s still being hosted on Source Forge. That’s not a problem for me because I compile from source but if you’re downloading a prebuilt binary, make sure that you don’t click on any of the crapware download buttons that are positioned to look like what you should click to download SBCL.

As I always do, I urge anyone who wants to try out Lisp or who is looking for a first rate CL implementation to give SBCL a try. It’s a great system and one that many use for production systems. Definitely recommended.

Posted in General | Tagged , | Leave a comment

Big Data

Cory Doctorow has an interesting piece in The Guardian positing that in the commercial sphere, if not the world of spies, big data has run its course. I especially like this quote:

The fact that the billions spent spying on everyone, always, has spectacularly failed to catch any terrorists is taken as proof that they’re not doing enough surveillance – not that untargeted, mass surveillance without particularised suspicion is a waste of money.

Posted in General | Tagged | Leave a comment