Another Argument for Reproducible Research

As you all know, I’m a big fan of reproducible research. Most people have an idealized conception of scientific research and that, by and large, it’s all about the pursuit of truth. Sadly that’s not always the case. The problem isn’t that all problematic results are faked; sometimes human nature is enough to corrupt the results.

Over at the Pacific Standard, Jerry Adler has an interesting article that is nominally about research in Psychology but has implications for other scientific research, including, astonishingly, Mathematics.

It’s astounding how often data is massaged to support a preconceived hypothesis. The article describes a study that used real data to “prove” an preposterous result. The study was up front about the silliness of the result and was making a point about how easily data can be manipulated.

Not all of these problems would be solved by reproducible research but having the data and the specific manipulations that it was subjected to available would go a long way towards ending this problem. Read the article to get an idea of the extent of the problem. After reading it, see if you don’t agree that journals should insist that submitted articles provide access to the type of data envisioned by reproducible research. Perhaps, then, the Reproducibility of important research in fields such as bio-medicine would do a bit better than one in ten.

Posted in General | Tagged | Leave a comment

A TeX Spring Cleaning

Every few years Donald Knuth raises his head from his travails on TAOCP and considers the state of TeX. From time to time people submit bugs they’ve found in TeX and during these periodic respites from his life’s work, Knuth addresses those bugs. He considers TeX as converging to a perfect state and uses these periodic reviews as an opportunity to advance that convergence.

The latest cycle happened in 2014 and resulted in a few non-user-visible changes to TeX. The real lesson here is how mature TeX is. There are no glaring, document-destroying bugs. Rather there are a few cobwebs in some obscure corners that scarcely anyone has ever bothered to visit. Consider Knuth’s TeX Tuneup of 2014 for the latest changes. As you can see, there’s nothing in there that would give you the slightest pause.

It’s received wisdom in our field that software is never defect free but TeX is a candidate to refute that. It may not be perfect but it’s certainly converging on it. Tex is surely one of the best pieces of software ever written.

Posted in General | Tagged | Leave a comment

An Emacs FFI

The estimable Christopher Wellons has another great Emacs post. This time he describes an Emacs Foreign Function Interface that he wrote. He considers it a proof of concept and not quite complete but he shows several examples of using it to call external library functions.

The FFI is implemented as a package that communicates with libffi through a pipe. As Wellons points out that has both advantages and disadvantages but it does appear to work well. Read Wellons’ post for the details on how things work and what you can do with it.

If you’ve wished for an FFI for Emacs take a look at the post and the package. Because it’s implemented as a package, it’s available now and doesn’t need to be integrated into Emacs core. Very impressive work, I think.

Posted in Programming | Tagged | Leave a comment

When To Use CLOS

Jean-Philippe Paradis retweeted a link

to this classic Erik Naggum post on CLOS and object-oriented programming in Lisp. Every time I read it I learn something new and understand CLOS just a little bit better. If you’re a Lisper and haven’t read it yet do so right now.

Naggum, in his inimitable way, explains why the message passing approach to O-O—and therefore most common languages claiming to be object-oriented—is fundamentally broken. He says, in fact, that trying to implement object-orientation in a statically typed language is theoretically unsound.

That’s a bit polemical, of course, but whether you agree or not, his discussion of Common Lisp’s approach to object-orientation is useful and enlightening. If you’ve been confused by the claimed superiority of CL’s approach of emphasizing generic functions instead of classes, give this post a read; Naggum explains it well.

If you’re completely new to CLOS and generic functions, you should read Joe Marshall‘s excellent Warp Speed Introduction to CLOS (link fetches the page) before looking at Naggum’s post. Even if you’re not interested in Naggum’s post, you should read Marshall’s article. It’s the best no-nonsense introduction to CLOS I’ve seen.

Update: Parradis → Paradis

Posted in Programming | Tagged , | 3 Comments

Whom We Spy On

The NSA and its apologists are fond of insisting that the NSA’s mission is to monitor our enemies and that any interception of Americans’ or American Allies’ communications are incidental and that such data, once collected, is promptly destroyed. Only the most jejune of us believed that, of course, but even the cynical and curmudgeonly staff at Irreal were not prepared for the truth.

NSA whistle blower Russel Tice, a former NSA agent, says that the NSA spies on Senators, congressmen, military leaders, supreme court justices, and even Barach Obama. Tice’s charges are so explosive that it’s hard to credit them. Except, you know, for everything else we’ve found out recently. Perhaps discovering that they, too, are targets will finally convince Senators and Congressmen to reign these criminals in.

Really, you should read this post. As I say, it’s hard to accept that things could have gotten so far out of hand. If it’s true, there are a bunch of people who need to go to jail. Read it and make up your own mind.

Posted in General | Tagged | Leave a comment

Lisp Types

There’s been a lot of talk lately about static versus dynamic typing. The partisans on both sides are adamant in their positions and absolutely secure in their righteousness. It has, in other words, become a religious issue.

Although I’ve used many languages over my career, these days I do virtually everything in either Lisp or C so I have a foot in each camp. I believe, as do most who can shake off their religious fervor, that either paradigm is fine and that each has advantages—and disadvantages—and one should pick the most appropriate choice for the situation at hand.

Lisp, especially, has a bad rap because of it’s supposed dynamic typing but the reality is much for complex. Bob Krzaczek over at The Bit Bucket has an excellent post on the Lisp type system and how it works. Although Common Lisp is nominally dynamically typed, you can, in fact, specify types at compile time. That, of course, means that the compiler can use the additional information to generate better code. Often the code will be essentially the same as a C compiler will generate.

Krzaczek’s post starts with an example that demonstrates an important point: Lisp will do everything it can to compute the correct result given the arguments it’s passed. That’s something that, say, C won’t necessarily do. For example if you tell C that an input argument is a 32-bit integer and pass it a 64-bit integer, the chances are that C will truncate the input to the lower 32 bits.

Read Krzaczek’s post for an explanation of the Lisp type system and how sophisticated it is. If you’re a static type partisan, it may be counter-intuitive but Lisp’s type system is much more intelligent and flexible than what’s found in the typical C compiler.

Posted in Programming | Tagged , | Leave a comment

Irreal Turns Three

Three years ago on April 26, 2011, I published the first post in this instantiation of Irreal. I guess that means that the terrible twos are finally over.

Posted in General | Tagged | Leave a comment

The Ultimate Privacy Guide

From time to time I’ve mentioned articles that help you maintain your privacy. Some of us grumpy and misanthropic types have nothing to hide but do everything we can to maintain our privacy out of orneriness. If that sounds like you, let me recommend The Ultimate Privacy Guide.

It’s a long (almost 13,000 words) article that covers just about everything you need to know to keep your online activity as private as possible. Pretty much every expert agrees that if the NSA really wants to snoop on you in particular, there’s not much you can do except to abandon all communication technology. Fortunately, the government doesn’t have the wherewithal to give everyone that sort of individualized attention so taking steps to secure your communications makes sense.

The authors suggest that you not try to read to whole thing at once but rather that you choose the topic that you’re interested in at any particular time. Probably your best bet is to bookmark the article so that you can look up topics as you need them.

Posted in General | Tagged | 1 Comment

Guile and Emacs

Three years ago, I wrote about a talk by Andy Wingo on the new Guile architecture. One of the most interesting things in the talk for me was Wingo’s plans to integrate Guile into Emacs by replacing the Elisp engine with the Guile engine. Guile already has an Elisp mode so the idea is that existing packages wouldn’t need to be rewritten and new code could be written in either Elisp or Scheme.

Since that talk I haven’t heard much about the project except for an occasional question on reddit or HN as to whether it was still alive. It turns out that it is alive and one of this year’s Google Summer of Code projects is to complete the integration of Guile into Emacs.

Sadly, I can’t find much useful information about the project but this article on the Emacs Wiki gives some useful background. It’s not clear that the Emacs maintainers would accept Guile as the new Emacs engine so Guile-Emacs may be just a curiosity. On the other hand, it may turn out to offer enough advantages that it does get accepted. It will be interesting to see what happens.

Posted in General | Tagged , | 1 Comment

Sacha’s Emacs Beginner Resources

Speaking of Sacha Chua—as I did yesterday—she’s got a nice page on beginner resources for Emacs. Chua tasked one of her assistants to seek out resources for learning Emacs and published the results.

She’s got all the sites you’d expect: the Emacs Wiki, Mickey’s Mastering Emacs, Xah Lee’s Tutorial, and others. But there are also some resources that I wasn’t familiar with so even if you’re an experienced Emacser, you might want to take a look. Definitely a useful resource. If you’re just starting this is an excellent place to find useful tutorials.

Posted in General | Tagged | Leave a comment