Keeping An Open Access Site Online

I’ve written several times about the renegade pirate sites that curate scientific papers and make them available for free (1, 2, 3, 4, 5, 6). Their actions are clearly illegal and some say immoral but they’re a useful corrective to the equally immoral and predatory behavior of the scientific journal publishers. All of my previous posts have focused on Sci-Hub but it turns out there is another site, Library Genesis (LibGen), that has over 33 terabytes of books, papers, and other material available. Together, the two sites ensure the availability of the papers that researchers without access to University journal subscriptions need for their research.

The publishers and their governments are not amused and have done everything they can to shut these sites down but the open access movement is fighting back. A project started by redditors is seeking to make sure that LibGen is never again offline. That’s a substantial undertaking because in addition to suing the two sites, the publishers have fought to have the sites’ hosting shutdown or blocked. Read the Vice article linked above to see what the redditors are doing to keep LibGen online.

As I’ve said before, it’s easy to be conflicted about all of this. There’s no doubt that Sci-Hub and LibGen are stealing the papers but there’s also no doubt that the publishers are predatory rent seekers who abuse the original authors, the reviewers, the schools, their subscribers and even their own editorial staffs who are mostly unpaid university volunteers. In the end, the universities themselves will probably solve this problem by refusing, as the University of California has, to renew their subscriptions unless the publishers change their business models.

Posted in General | Tagged | Leave a comment

How to Alias Car and Cdr and Why You Probably Shouldn’t

A couple of days ago, I wrote about the minor controversy concerning the names of the Lisp functions car and cdr. Some people, mostly non-Lispers but also some who use Lisp, dislike the names and think they should be changed to something more mnemonic like head and tail or first and last. Paul Graham disagrees and tweeted an excellent, pithy argument as to why. I agreed with Graham and the post was really about his tweet.

Of course, being Lisp, it’s easy to alias the names to whatever you like. However, there is, at least for Emacs, a practical reason that you shouldn’t do that or at least that you should know what you’re doing before you try. Chris Wellons, who has a profound understanding of Emacs and Emacs Lisp has a very enlightening post as to why adding something like

(defalias 'head #'car)

to your init.el file is a bad idea. The reason for that is that Emacs Lisp recognizes the importance of car and cdr and has special byte code operators for them. When you alias car to something like head, the optimizer can no longer be sure that the meaning won’t change and therefore turns the head reference into a function call. Wellons has the details but the TL;DR is that the result runs twice as slowly.

This is Emacs so it is, of course, possible to do the alias and still have the result use the car byte code but you have to tell the optimizer explicitly to do so. Again, see Wellons’ post for the details.

Wellons’ post is a slight expansion of his comment to the reddit post asking how to alias car that I referenced in my original post. His explanation is generally useful, though, so I’m glad he made it a separate post.

Posted in General | Tagged | Leave a comment

How To Wrap The MacBook Power Cord

While learning how to pour organge juice, I stumbled on a video that shows you the right way to wrap your MacBook power cord into a small neat package that fits easily in your backpack:

Here’s another video that shows the same technique but emphasizes taking the strain off the cable so that it doesn’t fray prematurely.

Posted in General | Tagged , | Leave a comment

Car and Cdr versus Head and Tail

Right after parentheses, one of the things about Lisp that non-Lispers—and even some Lispers—like to complain about are the names of the two functions car and cdr. A common understanding is that car returns the first entry of a list and cdr returns everything after the first entry but they’re more accurately thought of as returning the contents pointed at by the first and second halves of a cons cell. That view helps us understand where the names come from.

The names are an historical artifact from the first implementation of Lisp and refer to a pair of assembly language macros used to access the two halves of the IBM 704 CPU registers. When a cons cell was in a register, the car macro would access the first half of the cell and the cdr macro would access the second half. Some Lispers have sought to replace these, admittedly opaque, names with something more intuitive and obvious such as head and tail or first and rest. Many have resisted these efforts, finding car and cdr short and perfectly adequate. Paul Graham makes a cogent argument for the traditionalists’ view:

I learned Lisp by reading Graham’s books so my thinking on Lisp matters is often informed by his but that aside, I agree with his tweet completely. It makes a convincing case for using car and cdr.

This discussion applies to Elisp too, of course, so Emacsers asking how they can alias car and cdr to head and tail should consider Graham’s argument carefully.

Posted in General | Tagged , , | Leave a comment

BPF: A New Type of Software

When I first saw the title of Brendan Gregg’s blog post—reproduced above—I had a small frisson of annoyance. BPF (aka Berkeley Packet Filter) has been around since 1992 as the kernel interface to tcpdump and here was Gregg appropriating the name for some other piece of software. I needn’t have worried. Gregg was, in fact, talking about the Berkeley Packet Filter but in its extended form as implemented in the Linux kernel. Actually, it’s been extended so much that it no longer has much to do with Berkeley, packets, or filtering. It implements a fairly powerful virtual machine that runs in the kernel.

Gregg recently gave a talk on BPF for the Ubuntu Masters Conference in which he describes the (extended) system and why it’s a new type of software. Rather than being a user application or kernel module, applications written for BPF run in user space but have access to kernel facilities through a special BPF API. There are many advantages to this approach including ease of implementation and safety.

Gregg works for Netflix and mostly uses BPF to instrument the kernel. He describes several examples in the talk that illustrates some of the things one can do with it. The system is a little complicated so your best bet is to watch the video for the details. If you’re really interested, Gregg has a book (out as an ebook, coming this month as a dead tree book) that describes the system in detail. It’s an interesting talk and definitely worth watching. Gregg’s post at the above link also has a pointer to the talk’s slides. The video is about 31 minutes so you’ll need to schedule some time.

Update added before publishing
ZDNet has an article on BPF and Gregg’s talk. If you’re interested in this technology, it’s worth reading after you watch the video.

Posted in General | Tagged | Leave a comment

Techie Luddites

Those of you who have been around Irreal for a while know that one of my favorite hobby horses is the new luddites. These are mostly humorless folks who imagine that the rest of us share their psychoses and who, therefore, think it their duty to instruct us on the proper way of doing things. One of their most recent obsessions is with “tech addiction” and why we should all throw out our smartphones.

It’s easy to think of these people as some sort of Amish-like sect but that would be a calumny on the Amish. In truth, the new luddites can be found in almost any demographic. Even ours. In an interesting article in the Los Angeles Review of Books, Morgan G. Ames tells us how many of the “technical elite” refuse to let their children use electronic devices such as phones, tablets, or computers and how they send them to schools that proclaim themselves to be traditional and tech-free.

As Ames points out, many of these technical people consider themselves to be the smartest people in the room and while that may be true regarding technology, they don’t know anymore than the rest of us about child development or the wider social implications of technology. They are, in fact, subject to the same fashions and misinformation as everyone else.

If that claim seems a little overwrought, consider this shocking fact: at the Waldorf School of the Peninsula, “[a] techie-dominated, tech-shunning school,” only 35% of kindergarteners had been fully vaccinated before California made such vaccinations mandatory. If even the anti-vaxxers have established a beachhead among the technical elite, we must certainly abandon any claim to being immune to new luddism.

Ames is a former CS graduate who gave up the field to pursue a PhD in Communications and the article sometimes seems as if she’s trying a bit too hard to disparage her former brethren but she makes many good points and the article is worth reading.

Posted in General | Tagged | Leave a comment

The Myth of the Young Entrepreneur

One of geekdom’s most cherished beliefs—especially among young hackers—is that of the 20 year old who comes up with a new idea, builds it into a fabulously successful business, sells it for millions after a few years, and retires a millionaire at age 27. Indeed, Paul Graham built his own business catering to that idea and has helped start several successful companies.

It turns out, though, that our cherished belief is mostly a myth, at least according to a study by Pierre Azoulay, Benjamin F. Jones, J. Daniel Kim, and Javier Miranda. An article on the American Institute for Economic Research (AIER) Website discusses the study and some of its conclusions. The TL;DR is that experience, domain knowledge, and discipline are actually the best predictors of startup success and that most successful startup founders are middle aged (mean of 45 years old for the 1 in 1,000 highest growth new ventures) rather than the 20 year old who drops out of school to follow his dreams.

That’s a provocative claim that goes against the conventional wisdom but the study authors took a hard look at the data and are reporting what they saw. I’m not an economist so I can’t speak to the validity of the study but it does seem well researched and is certainly worth looking at if you have the itch to start your own company. There are, of course, many examples of young hackers who have built successful companies but it’s hard to name more than a handful. Doubtlessly, Graham could name more than most of us but of the thousands of companies he helped launch how many could be termed huge successes? The data the study presents (and which is discussed in the AIER article) is pretty discouraging for young entrepreneurs.

Posted in General | Tagged | Leave a comment

Org 9.3

Bastien Guerry has announced the release of Org-mode 9.3

In the tweet and the original announcement, Guerry emphasizes that this is a major release with some incompatible changes so you should read the Change Log.

As usual, thanks to Nicolas and Bastien and the others for all their hard work. The Org community is lucky to have such a great development team.

Posted in General | Tagged , | Leave a comment

An HTML Email Coda

Last week, I wrote about Perry Metzger’s reasons for not using Emacs to read his email. His take on email is something on the order of, “These days, email is HTML. Deal with it.” Many of us would rather not deal with it but Metzger’s point is well taken. An awful lot of email (maybe even most) comes to you as HTML.

Over at the Emacs subreddit, NukedTeas writes that he’s just had his first, “Gee, I wish I were writing this email in Emacs” moment and goes on to say that he’s going to have to figure out how to do that. The comments were of two types. First, there were the supporters who offered advice on how to do that—mostly mu4e or Notmuch along with offlineimap or mbsync to retrieve the mail.

There was another group of commenters, though, typified by kingpatzer who said that “It’s actually impossible to do email in Emacs”. That comes as a shock to the many of us who do just that everyday. Kingpatzer’s real point, of course, is the same as Metzger’s: Emacs doesn’t render HTML emails very well and most of our email is HTML. A surprising number of commenters agreed or made the same point.

I’m more inclined to agree with oantolin who suggests, “Just stop reading email that isn’t plaintext, I doubt anyone will notice”. That’s a bit smart-alecky, perhaps, but it hints at something that might be true: Most email that comes to you as HTML only is probably not worth reading. I’ve certainly found that true. Almost all of it is commercial messages of one sort or another. There are a few exceptions. The ACM, to its everlasting shame, sends its emails in a form that can’t be rendered in plain text and even EWW doesn’t do a great job with them. Of course, when that happens I just type a v and it pops me into the my browser and displays it there. That’s a bit of a pain but only a bit and it’s more than made up for by doing the majority of my email work in Emacs.

The other point worth making is that most non-spam email that comes as HTML has no reason to be HTML. If you’re an Emacs user, one would expect that most of the people you communicate with know that and send plain text. Sadly, that’s not the case. The only real answer is that given by Metzger: fix Emacs so it can render HTML well. That’s not easy, of course, but it’s definitely worthwhile.

Posted in General | Tagged , | Leave a comment

A Vim User Explores Emacs Distributions

Paul Kuruvilla is a recent immigrant to Emacs from Vim. Of course, that’s a familiar story—along with those going in the opposite direction—and wouldn’t be worth commenting on except for Kuruvilla’s take on the three main Emacs “distributions:” Vanilla Emacs, Spacemacs, and Doom Emacs. His observations are interesting because those of us safely ensconced in the Emacs world become blind to the problems that these variations present to a new user.

As a long time Vim user, Kuruvilla decided against abandoning his Vim muscle memory and opted for packages with Vi emulation. He liked the descriptions he found of Spacemacs and decided to give it a go. Standard Spacemacs seemed too bloated and complicated for his needs so he tried Spacemacs-base. The problems began when he tried to add more functionality. It wasn’t as seamless a process as he would have liked so he tried standard Spacemacs instead.

He found standard Spacemacs to be too bloated and significantly slower for some tasks. He also found that it would sometimes freeze in the middle of editing files. That’s not acceptable, of course, so he took a look at Doom Emacs.

Doom is famously targeted specifically at former Vim users and Kuruvilla found that although it required more work to set up, it met his needs better than Spacemacs. He’s now a happy Emacs user in the camp of the Doom adherents.

As many of you know, I was also a long time Vim user but when I came to Emacs more than a decade ago, I decided to embrace Emacs entirely and chose Vanilla Emacs. I haven’t regretted that choice for an instant but I am aware that some Vanilla Emacs users have migrated to Spacemacs, Doom, or one of the Vi emulation modes to deal with repetitive stress issues.

I know some Irreal readers are ardent Spacemacs users and swear by it so I was a bit surprised at Kuruvilla’s problems with it. If you’re a Spacemacs user and have seen to same problems, leave a comment. Or if you’re a Spacemacs user and haven’t seen those problems, also leave a comment. In the mean time, welcome, Mr. Kuruvilla, to the Emacs family.

Posted in General | Tagged | Leave a comment