Some Useful Emacs Packages

Torstein Johansen has a nice post on useful Emacs packages. As it happens, I use all of those packages except auto-complete so I’m certainly in agreement with his list. The post includes animated gifs so you can see the packages in action.

His list is mostly concerned with ways to speed up【Meta+x】 and with word completion. If you aren’t using these packages, you aren’t getting the most performance out of Emacs. But what about auto-complete? I haven’t run across it before but I’m going to give it a try. Why not? The rest of those packages are very useful and I wouldn’t want to live without them.

Posted in General | Tagged | 5 Comments

Configuring Emacs as a C/C++ IDE

Baris Yuksel has a nice set of videos (Part 1, Part 2) that show you how to configure Emacs to be a reasonable IDE for C and C++. In the first video Yuksel talks about auto-complete, auto-complete-c-headers, and yasnippet. Adding these three packages allow a programmer to autocomplete many of the common C/C++ objects.

The second video discusses iedit, flymake-google-cpplint, google-c-style, and flymake-cursor-mode. Together with the packages from the first video, they make a very nice C/C++ environment. The flymake-google-cpplint and google-c-style packages help enforce Google coding standards. You may or may not subscribe to Google’s standards but there are also generic C++ checkers as well as checkers for many other languages. The flymake-cursor-mode puts a message in the minibuffer telling you what error the other flymake packages are complaining about for the line at the cursor.

Finally, iedit is sort of like Magnor Sveen’s multiple cursors. If you’re already using multiple cursors, you probably don’t need it.

Together the two videos are less than 15 minutes so it’s easy to fit them into your schedule. If you’re hacking C or C++ in Emacs, you should give them a look.

Posted in Programming | Tagged | Leave a comment

Senator Feinstein in High Dudgeon

I know I mentioned it before, but this is just too hilarious to let pass unremarked. Senator Dianne Feinstein who has consistently dismissed objections to our government spying on its citizens is up in arms about the Government spying on Senate Intelligence Committee staffers. What’s particularly amusing is that she uses the same words that those of us upset about NSA spying used. Somehow, when her ox is getting gored it’s a serious Fourth Amendment issue that needs to be referred to the Justice Department.

I sympathize with Feinstein. It is outrageous and does need to be stopped just as the spying on ordinary citizens does. One would hope that Feinstein will have second thoughts about her support of these programs but of course she won’t. She’ll just make sure that they aren’t used against her and then go right on explaining how if we don’t have anything to hide we shouldn’t be concerned. It’s no wonder that the favorability rating of Congress is at a record low.

Update:
Adding to the hilarity, Sen. Feinstein is particularly upset that the CIA accused her staff of removing classified documents from the secure facility in which the staff works. This after screaming for Edward Snowden’s blood. You can’t make this stuff up.

Posted in General | Tagged | Leave a comment

The Security of the Apple Keychain

TidBITS has a great post on how Apple secures the iCloud keychain. An Apple device will remember passwords to sites you visit, WiFi nodes you join, and many other things. If you don’t do anything special, these credentials will be stored only on your local device. But it is also possible to sync them across all you Apple devices or even back them up on iCloud.

If you’re like me, you’re paranoid about this. Why would you ever trust the crown jewels to a third party? As the TidBITS article makes clear, Apple has gone to great lengths to ensure that trusting Apple with your passwords is, in fact, safe. If Apple is doing what they claim—and as TidBITS points out they’d face serious legal liabilities otherwise—then it appears that it actually is safe to trust your credentials to them. Read the article and see if you don’t agree.

The article even tells you how to make your keychain safe from government snooping. If you believe your end device is secure, then you can probably depend on Apple to keep your passwords safe. If, like most people, you’re off the NSA radar, then your concern is a criminal getting your credentials. Absent physical access to your device, Apple’s security should keep you safe. They’ve done a really good job securing your information and even, if you don’t think they’re in cahoots with the NSA, keeping it safe from government snooping.

Not all Irreal readers are Apple users, of course, but if you are you’ll want to read this article. Whatever you think of Apple, they seem to have this particular area under control. Again, read the article and see if you don’t agree.

Posted in General | Tagged | Leave a comment

Common Lisp Reader Macros

Chaitanya Gupta has posted a nice introduction to reader macros. The conventional wisdom is that reader macros are ripe for abuse and many experts recommend avoiding them. Still, there are times when they solve a legitimate problem1 and in those cases they provide a powerful tool.

If you want a detailed explanation of reader macros, the best places to find it are still Paul Graham’s On Lisp and Doug Hoyte’s Let Over Lambda. Gupta’s tutorial is an excellent introduction and enough to allow you to write your own reader macros. If you’re a Lisper and don’t know about reader macros you should definitely spend a few minutes on Gupta’s tutorial.

Footnotes:

1

That is, a problem that doesn’t involve trying to make Lisp look like Python or something similar.

Posted in Programming | Tagged , | Leave a comment

Me Neither

Posted in General | Tagged | 4 Comments

Sauce for the Gander

I don’t understand why they’re so upset. After all, if they have nothing to hide

Posted in General | Tagged | Leave a comment

Fixing the Emacs distnoted Problem on OS X 10.9

With Emacs 24.3 (and possibly earlier versions) under OS X 10.9 there is a nasty problem that causes distnoted, the OS X distributed notifications daemon, to periodically suck up processor resources and basically tie up the machine. Sometimes it recovers on its own, sometimes you have to restart Emacs. That is particularly apt to happen after waking up from sleep mode.

The problem is fixed in the 24.4 release and I’ve been ignoring it while I waited for the new release. The other day, though, I ran out of patience and hunted up a patch I’d seen for it some time ago. If you build Emacs from source, it’s trivial to apply it: just follow the instructions in the patch commentary1.

After applying the patch and rebuilding, everything worked normally again and I haven’t had anymore runaway distnoted problems. Actually, the whole system seems snappier after I installed the patch. That’s not too surprising given that Emacs is always running on my machines. If you’re running Emacs on OS X 10.9, you may want to rebuild Emacs with the patch. As long as you have a C development environment, that’s easy. I don’t know if Homebrew and the other package systems have applied the patch or not.

Footnotes:

1

For some reason that I’ve long forgotten, I don’t have to do the

make bootstrap

step. If you get a fatal error on the

make install

step, just start over but omit the

make bootstrap

step.

Posted in General | Tagged | 6 Comments

HTML as an STD?

The LA Times has a surprising revelation about Americans’ beliefs. You might find their views extreme but are they wrong? As far as HTML is concerned, maybe they’re on to something.

We geeks live in our own cocoon and sometimes forget that the everyday terms we use are mysterious—or, apparently, downright nasty—to the rest of the population. I tagged this entry as humor but maybe it really isn’t that funny. How can 10% of the population not know what HTML is? As I say, a cocoon.

Posted in General | Tagged | Leave a comment

Dual_EC_DRBG Expalined

Irreal readers are doubtless familiar with the broad outlines of the NSA’s insertion of a backdoor into the NIST Special Publication 800-90A elliptic curve random bit generator but may be unfamiliar about what was actually involved. Now Mother Jones has an excellent article about mathematician Edward Frenkel. The article is mostly about the beauty of Mathematics and how the teaching of it is terrible. I like that, of course, but the thing that will be interesting to most of you is a video interview with Numberphile in which Frenkel discusses the Dual_EC_DRBG algorithm.

He gives a simple and very accessible explanation of modular arithmetic, elliptic curves, how the Dual_EC_DRBG algorithm works, and how the NSA was able to insert the backdoor by the judicious choice of some parameters. It’s an amazing explanation because while Frenkel keeps the explanation well within the capabilities of a high school algebra student, he nevertheless gives a mathematically accurate description of what’s going on. If you have the slightest interest in the elliptic curve DRBG and the how it can be subverted, you’ll enjoy this video. It’s only about 11 minutes so you can enjoy it with your morning coffee.

Update: Frenkel talks further about the deplorable state of Mathematics education in this LA Times story.

Posted in General | Tagged | Leave a comment