Newspapers

As longtime readers of Irreal know, I have a fascination for the various media and how they are coping in the digital age. One of the media sectors about which I haven’t had much to say is newspapers. Mostly that’s because I don’t read newspapers and haven’t for many years. I use to be voracious reader of them, often devouring two a day but I came to see them as broken products. The reporting that wasn’t outright tendentious was flabby and often significantly wrong. Michael Creighton famously described the situation with the Gell-Mann Amnesia Effect. As techies, we’re all familiar with the effect. When was the last time you read a story about a technical subject in a newspaper that didn’t have significant errors and a complete lack of understanding?

The other day I saw an excellent article over at Gigacom by Mathew Ingram on newspapers and their failure to thrive in the digital age. Ingram has a key insight that, while obvious, hadn’t occurred to me. Newspapers’ customers are not their readers but their advertisers. Ingram points out that most often even the newspapers themselves fail to remember this and act as if their readers really were the customers. That explains pay walls and talk about how the readers should be willing to pay for the content they consume. That would make sense if, in fact, the readers were the customers but they’re not. The advertisers are.

That fact, Ingram says, also explains why newspapers in their current form are doomed. Before the Internet, the papers were able to establish monopolies on information delivery but those monopolies were really monopolies on the delivery of printed advertising into targeted areas such as cities or metropolitan areas. Those days are gone. These days, advertisers have a choice of several advertising channels many of which offer more finely targeted advertising than newspapers were ever able to offer. And if an advertiser wants the broad based advertising that newspapers specialized in, Ingram says, they have billions of websites on which they can drop a cheap display banner.

Follow the link to find out what Ingram thinks the future holds for newspapers. Most people can’t imagine a world without newspapers but I can tell you that my little corner of the world has been newspaper free for some time and it’s quite pleasant. As I wrote in Living Without Flash, I was sure I’d miss all the content that Flash brought me but after it was gone, I didn’t miss it at all and hardly noticed its absence.

Posted in General | Leave a comment

Dribble

Nicholas May, on his blog Because two cents wasn’t enough, reminds me of something I’d long forgotten: The dribble command in Common Lisp. What dribble does is record a Lisp session much like the Unix script command or the Scheme transcript-on/transcript-off commands. To start the recording, execute the command

(dribble file-name)

and dribble will start recording your REPL session into the file-name file. You can stop the recording by executing

(dribble)

This functionality is more useful than you might think. The canonical use, I suppose, is for students to record homework sessions. It’s also useful for recording bits of a REPL session that you want to include in a book, report, or blog post. It has the advantage of showing exactly what happened during the session. It’s not something you’ll use everyday, but when you want to capture a session, it’s just what you need.

Posted in Programming | Tagged | Leave a comment

More On Lexical Scoping

Yesterday I posted a reminder about Yoo Box’s excellent article on lexical binding in Emacs 24. I recently came across a post by Sergey M over at On elisp and programming in general that also considers lexical scoping in Emacs 24. This post has additional information from that given by Box so it is also worth a look if you’re trying to figure out how lexical binding works and what it can do for you.

Posted in Programming | Tagged , | Leave a comment

A Reminder About Lexical Scoping in Emacs

Back in January, I wrote a short post recommending Yoo Box’s piece on lexical scoping in Emacs 24. Now that Emacs 24 is officially released, this seems like a good time to remind folks about Box’s post. If the idea of lexical scoping is new to you this is an excellent introduction to its use in Elisp. Recommended (again).

Posted in Programming | Tagged , | Leave a comment

How To Design a Successful Programming Language

Sooner or later, every programmer gets bitten by the “I want to design a programming language” bug. Sadly, most of these efforts, Larry Wall, Guido van Rossum, and Yukihiro Matsumoto notwithstanding, will come to naught. Now Caleb Garling reveals the secret of designing a successful programming language.

Posted in General | Tagged | Leave a comment

A Contrast

From time to time something happens to make me think that maybe big media has caught a clue and is moving to saner policies. The last such example was Tor’s abandonment of DMR—a significant step forward. Sadly, reality inevitably intrudes and the media powers demonstrate that they’ve learned nothing.

As a case in point, I offer these two posts as a contrast in perceptions of reality. Thomas Hambleton writes on his blog that It’s 2012 and this still happens. The post, which documents his unsuccessful attempt to buy Paloma Faith’s new album, bears an uncanny resemblance to one of my favorite Oatmeal comics. Here’s a guy that wants to give the record labels money but they refuse to take it. Yes, yes, they have contracts that restrict distribution by region but you know what? It’s 2012, there’s this thing called the Internet, and maybe it’s time to rethink distribution policies from decades ago.

What does big media think? This. What can you say about a man who simultaneously whines about people pirating his product while opining that his customers are being unreasonable for not wanting to wait for his company to get around to selling their product locally? He’s entitled to his opinion, of course, but he shouldn’t be surprised when people disagree and turn to pirate sites for their instant gratification.

For some insight into the problem from the publishers’ point of view, see this comment from Patrick Nielsen Hayden, one of publishing’s more enlightened executives, on John Scalzi’s site, Whatever.

Posted in General | Leave a comment

Reverting All Buffers

I have two machines on which I do most of my writing and development: a 27″ iMac and a 5 year old MacBook Pro. I use both of these computers everyday so I need to keep them in sync. I do that with Git repositories that live on a separate Linux server. One of those repositories contains all my org files. That includes blog posts, todo and task lists from my org agenda, and various other files that I maintain with org-mode. Those, along with all the other archived files means that I have a lot of files to keep up to date.

The first thing I do when I begin a session is a git pull to make sure I have the latest files from the other machine. Of course that means I have to be religious about pushing any changes to Git but that’s pretty much second nature now. The other thing you need to know is that when I’m finished with a session, I just put the machine in sleep mode. That means my Emacs still has all the open files from the last session when I get back to it. I also have desktop-save-mode on so this happens even if I turn the computer off or reboot it.

Here’s the problem. After the Git pull, those buffers and their underlying files are no longer in sync. I could set Emacs to automatically sync them but I don’t want to deal with the overhead. Thus I have to run revert-buffer by hand for each of the updated files. That’s a pain, of course, and cries out for automation so I wrote a quick bit of Elisp to do it for me. Here’s the code

(defun revert-all-buffers ()
  "Revert all non-modified buffers associated with a file.
This is to update existing buffers after a Git pull of their underlying files."
  (interactive)
  (save-current-buffer
    (mapc (lambda (b)
            (set-buffer b)
            (unless (or (null (buffer-file-name)) (buffer-modified-p))
              (revert-buffer t t)
              (message "Reverted %s\n" (buffer-file-name))))
          (buffer-list))))

The code is pretty simple. It goes through the buffer list looking for buffers with an underlying file. If the buffer is not dirty, I call revert-buffer to get the changes from the Git pull into the buffer. If I’ve made changes to the buffer, then I have to fix things up by hand so I don’t want to do the revert.

It seems to me that there’s nothing special about my work flow so others may have the same problem and find revert-all-buffers useful.

Posted in Programming | Tagged , | 9 Comments

RSA Explained

Barry Steyn over at I’m Still Learning has a nice post on RSA and how it works. Steyn explains the needed mathematical background in small pieces that should be accessible to everyone. At each step he works through a small example so that the reader can follow the process.

If you’ve ever wondered what’s behind RSA, how it works, and what its weaknesses are, this post is an excellent introduction. Steyn even explains modular arithmetic so if the statement 11 divided by 4 equals 2 remainder 3 makes sense to you, you will have no problem following his exposition.

Posted in General | Tagged | Leave a comment

The Emacs CL Controversy

The other day I was griping to Xah Lee off-line about the refusal of the Emacs maintainers to add the CL package functionality to the core Elisp distribution. Lee pointed me at several threads on the emacs-devel mailing list that explained both sides of the controversy. Now Lee has summarized those threads for the benefit of anyone else who may be interested.

My own opinions are somewhere in between the two extremes. I have no particular desire to make Elisp into Common Lisp so I tend to think of the CL package as adding useful functions to Elisp rather than making Elisp into CL, which the package certainly doesn’t do. Some folks, like RMS, may find CL ugly and they’re entitled to that opinion but why should that be an excuse to exclude things like incf, reduce, and remove-if-not useful functions that get implemented (for various values of implemented) by every Elisp user who makes the decision not to add

(require 'cl)

to their programs.

Other excuses, such as “it would make the Emacs manual too large” are non-starters. It would make the manual too large. Really? That’s your reason for not including the CL functions in core Elisp? Sorry but if you say stuff like that don’t expect people to take you seriously even if you are RMS.

Others have noted the plans to replace the Elisp engine with Guile (Scheme) but those plans actually call for using the Guile engine with its Elisp language layer not for replacing Elisp with Scheme so I don’t see how that fact enters the argument at all. You still need some sort of reduce function when writing in Elisp whether the underlying engine is the traditional Emacs one or Guile.

Sadly, this question has devolved into a religious argument so we can expect no resolution in any time span meaningful to human beings. Still, it would be nice if we could just add those functions that almost everyone agrees are useful and not mention Common Lisp at all. Can’t we just pretend we found them lying on the side of the road?

Posted in Programming | Tagged , | 3 Comments

Flame Malware Uses New MD5 Collision Attack

Much has been written lately about the provenance of the Flame malware. Recent reports suggest that it was a joint project of the United States and Israel. Now comes the startling revelation that Flame used a hitherto unknown MD5 collision attack to forge a Microsoft certificate used for security updates.

Cryptanalist Marc Stevens who published the first practical MD5 collision attack in 2009 has analyzed the MD5 collision attack in Flame and concluded that it used a previously unknown attack. This suggests, he says, that the team who wrote Flame included world-class cryptanalysts and mathematicians.

After Stevens revealed his attack, the use of MD5 to authenticate certificates was deprecated and its use quickly died out. Microsoft, however, continued to use a certificate signed with MD5 for its security updates and that was how Flame was able to infect its targets.

Posted in General | Tagged | Leave a comment