A Math & Lisp Blog

If, like me, you're interested in Mathematics and Lisp and like doing math experiments on a computer, you should check out Atabey Kaygun's Blog. Kaygun is a Mathematician at Bahçeşehir University in Istanbul.

On his blog he considers various problems and algorithms that strike his fancy and uses (mostly) Common Lisp to experiment with them. Sometimes the problems are from Project Euler, other times they're things that pop into his head, and still others are culled from the literature. The problems are generally accessible to non-specialists and Kaygun does a good job providing background and explanation so the average Irreal reader should be able follow along. Here is a list of some of his recent musings.

If Mathematics is right after root canals on your list of favorite things, you probably won't be interested but if you like playing around with math problems and using Lisp to quickly and easily try out candidate solutions you're apt to enjoy Kaygun's blog. Fans of Project Euler and Programming Praxis are particularly likely to enjoy his posts.

Posted in Programming | Tagged , | Leave a comment

Keyboard Switches

As many of you know, Xah Lee is a keyboard aficionado who spends a lot of time researching and trying different keyboards. There are, it seems to me, three aspects to keyboards

  • Ergonomics
  • Layout
  • key switches

All three aspects are important and users feel very strongly about them. Lee has addressed all of those aspects but a recent post talks about the least obvious one: key switches. Many folks don't think about them at all or, even if they do, consider them the least important aspect.

I disagree. The switches control what your typing feels like. If you have cheap rubber dome switches it feels like you're typing on marshmallows. A good mechanical switch, on the other hand, gives excellent tactile feedback and makes typing a pleasure.

My favorite keyboard, by far, is the Unicomp Keyboard, a clone of the original IBM Model M keyboard. I've used both and love them. On my iMac, I use the Apple wireless keyboard, which is OK, but not a great as the Unicomp and Model M. I have several of the Unicomps and use them on all my non-apple computers. These keyboards use the buckling spring key switches and produce what I think is the best typing experience.

That's where Lee's post comes in handy. It discusses the various switches and let's you know what to look for when purchasing a keyboard. For example, some people find the Unicomp buckling spring switches too noisy and want a key switch that is quieter but has a similar typing feel. Lee's post is a good resource to find the type of key switches that meet your preferred typing style.

Posted in General | Tagged | Leave a comment

Launching Emacs Features

Artur Malabarba has a nice riff on his toggling keymap that I wrote about here. This time he considers launching Emacs commands such as calc, ediff-buffers, man, shell, proced, and others. As Malabarba says, these are useful commands that you don't use that often so it's handy having a way of launching them with an easily remembered key sequence.

The idea is the same as it was for toggling modes. You create a key map attached to 【Ctrl+x l1 in such as way that the keys are intuitive and easy to remember. Thus 【Ctrl+x l c】 launches calc.

As with his toggling post, you will probably have different commands you want to bind to your keymap but his method is completely general. If you have commands that you rarely launch, you may find his post useful.

Footnotes:

1

Or some other sequence such as 【Ctrl+c l】 if you're worried about future conflicts.

Posted in General | Tagged | 6 Comments

Git Merge and Rebase Explained

Git has become the de facto standard version control system. Many people find it confusing or even impossible to understand. In actuality, Git is based on some simple ideas that, once understood, make Git almost transparent. An example of this is Tom Preston-Werner's explanation of Git as taking a series of snapshot of your file system. Once you understand the idea of taking snapshots, a lot of the mystery of what Git's doing dissolves.

Still, there are Git functions who details are not obvious. A couple of these are merge and rebase—especially rebase. Alex Ford has an excellent three part post on how merge and rebase work and when you should use each. Ford uses screen shots from SourceTree to show the state of the commit graph as a branch is created and then merged to make the merge process clear. Then he repeats the process with rebase so that you can see how the two commands differ.

This is the clearest explanation of the difference between merge and rebase that I've seen. If you're at all unclear about them, Ford's posts can help you achieve enlightenment.

Posted in General | Tagged | Leave a comment

One Side of the Argument Has Class

That distant relative agrees to take back the sweater.

Posted in General | Tagged | Leave a comment

Three Groups of Editors

I came across this tweet

that reminded me of my slightly less controversial post on the same subject. That post was from 2 and a half years ago so it's worth considering how things have changed.

The most obvious change is that TextMate is no longer a player. It's apparently still available and the source code of the new version development has moved to GitHub but one hardly hears about it anymore. In terms of my original post, that leaves Emacs and Vim as the editors of choice for experienced developers. The battle between them for the top spot proceeds apace, of course, with partisans on both sides as adamant as ever.

There are a couple of new editors that are getting a lot of buzz: Sublime Text and Atom. Emacs users haven't been much impressed and I assume the same is true of Vim users as well. Emacs and Vim are like black holes. Once you start using them you never leave1. It may be that in the long term these editors will gain traction but in the mean time, I think it's still true that the most experienced engineers are using Emacs or Vim.

There are lots of decent editors, each with their own champions, and plenty of experienced and talented developers who use them. Still, as a general statement I think it's still true that the most experienced and talented engineers tend to prefer Emacs or Vim, and that to a first order approximation their use signals someone who is experienced and cares about optimizing their work flow.

On the other hand, as far as uptake goes, we have this.

Footnotes:

1

Although there is movement between the two editors. It's just that there's no escape from the twin system of Emacs and Vim.

Posted in General | Tagged | 2 Comments

The Real Purpose of Operating Systems

An amusing anecdote from Perry Metzger's The Editor of a Lifetime talk.

Posted in General | Tagged | Leave a comment

A Quick Introduction to Generic Functions & CLOS

Zach Beane points to a nice post by Nicolas Hafner on Generic Functions and CLOS. CLOS is often considered a hideously complicated system but the basics are easy to understand and use and most people will never need to explore the complex parts. Hafner's post reminds me of Joe Marshall's excellent Warp Speed Introduction to CLOS.

Together, these two posts serve as a sort of orientation to the Common Lisp object system. Both approach CLOS through generic functions, which are useful whether or not you ever define or instantiate an “object.” Both are short and definitely worth a read.

Posted in Programming | Tagged , | 1 Comment

And By the Way...

…Happy Programmers' Day.

Posted in General | Tagged | Leave a comment

Things My Mom Taught Me

Suppose a distant relative sends you a sweater. It's a perfectly good sweater but not a style you like or would ever wear. Instead of rolling your eyes and sending a pro forma thank you note, you take to twitter and your blog to complain bitterly that you were given a sweater you didn't like. What would your mother say?

I don't know about you but if I did that my mom would deliver me a scolding and a lecture about manners. But that's just me. The Internet appears to be ablaze with weeping and gnashing of teeth over Apple's adding the latest U2 album to everyone's iTunes collection. Here's TechCrunch waxing apoplectic about the gift. And I can't tell you how many Twitter posts I've seen complaining about it. Even people who aren't Apple users and don't have an iPhone or iPad are complaining. It's apparently difficult to delete music from your iTunes account (although it can be hidden) so these folks are feeling especially aggrieved.

Talk about a first-world problem. It's not as if there aren't serious things to complain about. How about NSA snooping, for example? Seriously, people, put the damn sweater in a drawer and get on with your lives. And anyone from Apple reading this can take it as my thank you note.

Update: Here's a selection of Tweets bemoaning the U2 download. I know I must be old because I do know who U2 is. So old, I actually have several of their albums.

Posted in General | Tagged | 2 Comments