Clojure and Scheme Compared

As I’ve said before, I’m sometimes tempted to take up Clojure but have always been put off by its reliance on the JVM. Last year, Mike Zamansky posted a couple of videos (1, 2) on using Clojure for the Advent of Code challenges that nudged me further towards giving Clojure a try.

Enter Peter Bex with a comparison of Scheme and Clojure. That seemed just what I needed to help me decide if I really wanted to invest time and effort in learning Clojure. It turned out that his post did, indeed, help me make up my mind.

One of my impressions from casual observation of Clojure code is that there’s more syntax than most other Lisps. For example, contra the “too many parentheses” crowd, I like that parentheses are essentially the only grouping deliminator in Common Lisp and Scheme. Less syntax is, in my opinion, one of the real strengths of Lisp. Bex agrees that Clojure does, indeed, have more syntax than other Lisps and that that’s not always a good thing.

The TL;DR of Bex’s post is that Clojure is—for the most part—a well designed language but there are definitely warts. For instance, you can optionally separate items in a list with commas (rather than just white space as in other Lisps) but that means that a new notation is now required for unquote in quasiquotes. Since using commas as separators is optional and little used, whatever benefit they provide is outweighed by the problems they cause. Similarly, the syntax for the let operator is different for no apparent benefit.

There are other gotchas. Take a look a Bex’s post for the details. My conclusion is that although Clojure is a nice language there are enough negatives that I’m still not convinced it’s worth the effort. Doubtless the intersection of the Clojure community and Irreal readers will explain the errors of my ways to me. And, really, I look forward to hearing from them because I’m still open to changing up my mind.

Posted in Programming | Tagged | Leave a comment

Red Meat Friday: Offend a Programmer

How to offend a programmer with a survey:

You gotta admit: It is offensive. The proper survey would have been

  • Emacs
  • Vim
  • VSCode, Atom, Sublime, or other bling-centric editor
  • Eclipse, IntelliJ, or other pushbutton app generator
  • Nano, Notepad, or other toy editor
Posted in General | Tagged , | Leave a comment

Brown M&Ms

Do you know the story of brown M&Ms? It’s one of my favorite stories both because of the cleverness it reveals but also because of—at least according to conventional wisdom—the unexpected source of that cleverness. The short version of the story was that the rock band Van Halen used to put in their concert contracts that they must be provided with M&Ms backstage but that no brown M&Ms were permitted. The typical reaction from the band when they found brown M&Ms was to trash the dressing room and possibly cancel the concert.

Most people put that down to spoiled rock star misconduct and dismissed it as typical behavior from the breed. The thing is, all this was purposeful behavior meant to solve a serious problem. Van Halen was one of the first bands to stage elaborate shows with huge amounts of complicated gear. Some of the venues they played at couldn’t accommodate that gear so their contract spelled out precisely what was required. Many venues didn’t bother reading the contract, though, so dangerous things like collapsing stages occurred. The prohibition of brown M&Ms was a test to see if the concert organizers had, in fact, read the contract. If the band arrived to find brown M&Ms, they knew they could expect other problems.

Over at Effectiviology they have a great article on the brown M&Ms story. They give more details on the Van Halen aspect but also consider how the concept can be applied to situations Irreal readers are probably more familiar with than being a rock star. It’s an entertaining and informative read and very much worth a few minutes of your time to read.

Posted in General | Leave a comment

On Passwords and SolarWinds

By now everyone knows about the major breach of the U.S. Government (and probably others) that had its genesis in an exploit that gave attackers access to the SolarWinds build chain. Some are reporting that the problem was a leaked and very weak password. Others say that the password doesn’t really matter and that the nation state responsible would have gained access one way or the other.

Whatever the truth of the matter, the password itself deserves comment. The password was the comically inept solarwinds123. The only thing you can say about it is that it’s not 123456 or password. It’s so bad that the SolarWinds CEO felt that blaming it on the standard, all-purpose rouge engineer was not enough so he blamed an intern. I’m sure he would have blamed the janitor if he could have come up with a plausible story to go with the accusation.

The CEO can say what he wants but how is it not a massive management failure for this to happen? Not only was an intern allowed to set a password that gave access to the company’s network but that password was exposed on the Internet for two years before a security researcher found it and reported the exposure to SolarWinds. Why wasn’t the intern’s actions monitored by IT? Why wasn’t he provided with a token generator for two-factor authorization or at least told to use an SSH key?

It’s almost a cliché to say that passwords are dangerous and need to be replaced. I don’t think that’s necessarily right and it’s certainly not going to happen but we can surely do better than solarwinds123. And no one should think that blaming an intern in any way relieves management of the responsibility to see that we do do better.

Posted in General | Tagged | Leave a comment

How to Implement a Zettelkasten Link Type in Org

Christian Tietze is an author at the zettelkasten.de site and, of course, keeps his notes in a Zettelkasten. He has his own app, The Archive, for that but he’s also an Emacs user. He uses a timestamp as a key to his Zettelkasten notes and can access them from his browser with a URL of the form:

thearchive://match/TIMESTAMP

Being an Emacs user, Tietze wanted to be able to link to his notes through Org mode. To do that, he implemented a special Org-mode link type: zettel. Thus he can use links like

[[zettel:TIMESTAMP]]

or

[[zettel:TIMESTAMP][Descriptive text]]

and clicking on one of them opens the relevant note in his browser.

It turns out to be pretty easy to set this up. Take a look at Tietze’s post for the details. Of course, his is a pretty specialized use case but the same simple procedure can be used to set up your own special links. The post is short and informative so it’s worth taking a look at it even if you don’t need a special link type right now.

Posted in General | Tagged , | Leave a comment

An Interview with SciHub’s Alexandra Elbakyan

I’ve written several times about Sci-Hub and the moral quandary it presents for some of us. On the one hand it’s easy to say that what they’re doing is stealing and that it should be stopped. On the other hand, the scientific publishers are rapacious rent seekers who exploit the researchers, the reviewers, their journal editors, and in most cases the taxpayers who paid for the research in the first place. It’s hard not to cheer anything that disrupts their scam.

The Wire has an interesting interview with Alexandra Elbakyan, who founded Sci-Hub. Her impetus for starting it and for continuing to run it is that a large part of the scientific community lives in poorer regions or are not associated with a university and simply can’t afford access to the articles they need for their research.

Elbakyan talks about how she came to found Sci-Hub and her take on the piracy issue. The TL;DR is that Sci-Hub is not diverting funds from the creators who deserve it but from outside organizations that don’t. The publishers, of course, beg to differ and she and Sci-Hub have been sued many times—currently India is being asked by the Publishers to block Sci-Hub. A U.S. court has ordered her to pay Elsevier 15 million dollars, a ruling that she’s blithely ignores.

It’s an interesting interview and relatively short so it’s well worth taking 5 minutes to read it.

Posted in General | Tagged | Leave a comment

Emacs Writer

As most of you know, I’m very interested in the ways that non-technical people use Emacs and ways of making Emacs more accessible to such people. Ashton Wiersdorf is a technical user married to a non-technical writer looking for a better way to wrangle text. Being an Emacs user, Wiersdorf naturally thought of Emacs but worried that it was too intimidating for non-technical users so he built emacs-writer, simple configuration purpose-built for writers.

Wiersdorf makes a point of saying that this is still a work in progress and that you shouldn’t inflict it on a loved one unless you’re willing to provide technical support. Still, it seems like a nice project that can be easily adapted for individual needs.

I think this is a great project as long as its intended users understand that it’s a “starter kit.” I use Emacs for writing all the time and a lot of the features I use everyday are add-ons that users add as they become more experienced. If you plan on using emacs-writer forever, you’re missing the real power that Emacs has to offer. On the other hand, it makes a great configuration to start with and there’s not reason you can’t add to it as you become more experienced with Emacs.

In any event, it’s worth following this project if you have someone who could benefit from a real text editor. As Wiersdorf says at the top of the README,

“Writing should be all about the words. But word processors like Microsoft Word, Google Docs, or Apple’s Pages force you to think about formatting as you compose.”

Posted in General | Tagged | Leave a comment

Facebook and Apple

It’s unlikely that any sentient being in the known universe, let alone any Irreal reader, is unaware of the squabble raging between Apple and Facebook over Apple’s forthcoming iOS change that will require apps to ask a user’s permission before collecting tracking data. “Collecting tracking data” is adtech weasel wording for “stalking and spying on their users.”

NPR has an article on the dispute that is more sympathetic to Facebook’s position than any other I’ve seen but even with their generous reading of the situation, Facebook’s arguments don’t hold up. Facebook can’t attack the notion that users should have control over their own data, of course, so they fall back on two arguments.

The first is that Apple’s action will hurt small businesses and that Facebook is simply acting as their champion. That doesn’t pass the laugh test, of course, and most organizations not Facebook think that the change will have little effect on small business. Facebook, on the other hand, could take a 7% hit to their revenue.

The second argument is basically an ad hominem. Facebook says that the real reason Apple is making the change is to do away with free apps in favor of subscription-based apps because then Apple gets 30% of the take. Even if we assume, arguendo, that that’s true, so what? That doesn’t change the fact that Facebook wants to spy on us and Apple is saying, “Fine but you have to ask first.”

That last part is significant. Apple isn’t saying you can’t track, merely that you have to ask the user’s permission first. Facebook hates that because, of course, most people aren’t going to give that permission. So who, really, is standing up for the little guy?

Posted in General | Tagged | Leave a comment

Red Meat Friday: Programmers—Then & Now

Here’s a little red meat for all the graybeards out there waving their canes and yelling at the kids to get off their lawn.

Posted in General | Tagged | Leave a comment

Tracking Pixels

Daring Fireball’s John Gruber, taking a break from criticizing the president who is not the president (it’s a Zen thing), has an excellent rant on the abomination that is email tracking pixels. As most Irreal readers surely know, tracking pixels are a one pixel, essentially invisible, image included for the purpose of tracking. When the image is downloaded the requesting IP address (at least) is captured and used to track that the recipient has read the email and, of course, how many times it was opened.

It’s another outrageous practice that the adtech industry tells itself is okay because “everybody does it.” Gruber takes a blowtorch to that and the other excuses that the industry offers. This disgraceful behavior has been going on for a long time. Gruber wrote about it a couple of years ago but it’s use predates that post by many years. According to the BBC, 2/3 of emails sent to personal accounts contain a tracking pixel.

What to do? Gruber mentions that the Hey Email client detects and eliminates essentially all the tracking pixels and laments that Apple, the company known for privacy, does nothing to prevent them. As regular readers know, we here at Irreal are not fans of calling in the government to fix every perceived problem but it’s hard to see how the industry’s behavior is any different from stalking, which we already have laws against. The use of tracking pixels is explicitly illegal in the EU but that law appears to be honored more often in its breach than in its observance. I like Hey’s strategy of displaying a “shaming banner” with any email that contained a tracking pixel. Perhaps if people saw how often it was happening they’d complain to the perpetrators.

Posted in General | Tagged , | Leave a comment