Emacs Redux Redux

I’ve written about Emacs Redux a couple of times before. Bozhidar Batsov continues to post a panoply of really useful Emacs tips. Consider this a reminder to subscribe if you haven’t already.

If you’re looking for a turnkey Emacs configuration, take a look at Batsov’s prelude. It has already implemented many of the suggestion discussed in Emacs Redux.

Posted in General | Tagged | Leave a comment

Surprise!

Here’s a surprise. Netflix is offering further proof—if you needed it—that piracy is mostly a phenomenon of the content industry’s own making. Netflix reports that when they enter a new territory, BitTorrent traffic is drastically reduced. This suggests, as we’ve said here many times, that most people are basically honest and will pay for their content when given the opportunity. It’s only when Hollywood refuses to make movies available for streaming or download, that people search it out on pirate sites.

It’s nice to see more verification of this but I’m skeptical that it will make much difference. Hollywood will continue to whine that they can’t make content available because people will pirate it and the cycle will go on and on. Perhaps this study will at least help prevent more moronic legislation although that, too, seems unlikely given that moronic legislation is Washington’s primary product.

One puzzling thing about the article, which has its origin in a story from Stuff, is how Netflix got this data. Netflix says,

“One of the things is we get ISPs to publicise their connection speeds
– and when we launch in a territory the BitTorrent traffic drops as
the Netflix traffic grows.”

That, of course, doesn’t make any sense—unless they’re postulating some relationship between connection speed and a drop off of BitTorrent traffic—so I’m guessing the actual statement got filtered by the entertainment press, which probably doesn’t have much of a grasp on network engineering.

Posted in General | Tagged | Leave a comment

An Interview With Ray Kurzweil

I’ve been a big fan of Ray Kurzweil ever since I read The Singularity is Near. Kurzweil is controversial and some scientists dispute his conclusions but he is by no means some crackpot spouting nonsense. He has a proven track record as a scientist and inventor with significant work in OCR, speech synthesis, and musical keyboards. In 1999 President Clinton awarded him the National Medal of Technology and Innovation, America’s highest technology award.

Recently, Kurzweil went to work for Google, the first time he has worked at a company that he didn’t found. Forbes has a nice interview with him in which he talks about his work at Google, why he accepted the job, and what he hopes to accomplish. Whatever your views on the singularity, I think you’ll enjoy this interview.

Posted in General | Leave a comment

What’s in a Logo?

Troy Hunt is the world’s greatest lover and he’s got the t-shirt to prove it. That’s his way of making a serious point about those badges you see on many sites certifying that the site is safe and not infected with malware. Hunt, as is his wont, decided to test that. It won’t come as a surprise to Irreal readers that the truth falls short of the claims.

Many sites boasting one or more of those logos have serious security issues. I won’t step on Hunt’s post by rehashing the details but you should definitely go on over and take a look. It’s not pretty. The takeaway is that these badges are basically useless for informing the user of anything more than that the site owners had enough money to buy one.

Posted in General | Tagged | Leave a comment

The Greatest Car Commercial Ever

As a young nerd I wanted to be Spock. Every nerd wanted to be Spock. So of course this commercial really resonates with me. It’s hilarious and I’m sure all Irreal readers will love it even if your boyhood heroes run in a different direction. As one of the commenters remarked, the only thing that could make it better is an appearance by Shatner.

Posted in General | Tagged | Leave a comment

A Solution to EmacsGolf 4

EmacsGolf 4 didn’t generate a lot of interest, apparently. What little discussion there was centered on why you would want to perform the given transformations rather than how to do so. Nevertheless, the honor of Emacs users everywhere is at stake here so I offer the following solution using multiple-cursors.

Ctrl+n Ctrl+n Ctrl+f move to first defvar
Ctrl+* invoke multiple cursors on defvar
Ctrl+e move to end of line
Ctrl+BackSpace Ctrl+BackSpace kill variable name
Ctrl+y yank it back
SPC n i l add nil
Ctrl+n Ctrl+a beginning of second line
Meta+( wrap list in parens
s e t q SPC add setq
Ctrl+y add variable name
Ctrl+d delete extra space
Ctrl+n down to third line
Ctrl+x Ctrl+t interchange second and third lines
Ctrl+p Ctrl+p up to second line
Meta+^ join with first
Return exit multiple cursors

That 29 keystrokes. If you’re not using multiple-cursors (why not?!) you could use almost the same keystrokes with a macro. Substitute 【F3】 for 【Ctrl+*】 and 【Ctrl+3 Ctrl+n F4】 for 【Return】. Then use 【Meta+0 F4】 to run the macro on the rest of the buffer.

Surely the Irreal heavy hitters can do better than my 29. If you can, leave a comment. It’s not too late.

Posted in General | Tagged | Leave a comment

Lexical Binding in Emacs Video

If you’re still confused about the difference between dynamic and lexical scoping in Emacs, Nic Ferrier has an excellent video that explains it with a couple of simple examples.

You may find it useful to review the meaning of closure before watching the video. Here’s a short definition from the Emacs manual.

Posted in Programming | Tagged | Leave a comment

Org Mode Summary

I recently saw this Org-mode summary from the Linux Journal mentioned in a tweet. It’s pretty old—from 2007—but still serves as a useful introduction to some of Org-mode’s power. If you’ve never used Org-mode, this article will give you a feeling for what it can do.

The best introduction and go-by remains Bernt Hansen’s excellent Org Mode – Organize Your Life In Plain Text! It’s quite long but very comprehensive and Hansen considers it a work in progress so it’s always up to date. It’s the perfect follow on to the Linux Journal article. Of course, Org-mode comes with a comprehensive manual that covers everything in detail. There is also an compact Org-mode Guide that can serve as a sort of quick start manual, although I prefer Hansen’s guide.

With all this great documentation, there’s no excuse for not giving Org-mode a spin. Be warned though: it will insinuate its way into almost every aspect of your work flow.

Posted in General | Tagged , | 2 Comments

Complexity Cheat Sheet

Eric Rowell and Nick Dizazzo have posted a great Big-O cheat sheet. The sheet gives time and space complexity for several popular algorithms such as searching, sorting, and manipulation of data structures and graphs. One feature that I like is a graph that shows the curves for O(1), O(log(n)), O(n), O(nlog(n)), O(n2), O(2n), and O(n!). It demonstrates in a dramatic way how algorithms exhibiting these behaviors differ.

If you find yourself having to look up the complexity of algorithms occasionally, bookmark this page and have the information at your fingertips.

Posted in Programming | Tagged | Leave a comment

linedit

Pavel Penev has updated and republished his excellent post Learning Lisp The Bump Free Way. It’s a nice introduction to the problems that Lisp n00bs face and how to overcome them. If you know anyone struggling with learning Lisp, this is a good resource to point them to.

I learned something too: linedit. linedit is a readline-like library (written in CL) that brings greater editing functionality to the CL REPL. It’s got a lot of features that are detailed at the link so be sure to take a look if you ever use Lisp directly from the terminal. It appears to be (at least somewhat) SBCL-centric so users of other distributions may have varying results. It’s available from Quicklisp so installation is a snap. You add a couple of lines to your .sbclrc file to enable it and another line to your Emacs configuration to prevent it from interfering with Slime. The appropriate incantations are explained on the linedit site.

If you’re like me, you mostly use Lisp in conjunction with Slime but when I do use the terminal I always miss having basic line editing so linedit is a win for me.

Posted in General | Tagged , | Leave a comment