Emacs 24.4 in Debian jessie

Hey, Emacs 24.4 is in Debian jessie…I’m typing on a Debian jessie laptop right now! Let’s upgrade!

$ emacs --version
GNU Emacs 24.3.1
Copyright (C) 2013 Free Software Foundation, Inc.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

$ sudo apt-get update

$ sudo apt-get upgrade

$ emacs --version
GNU Emacs 24.4.1
Copyright (C) 2014 Free Software Foundation, Inc.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Sweet! Now we have to re-install the use-package package using the Emacs package manager and re-install all of the Cask packages.

$ cd ~/.emacs.d
$ cask install

Restart Emacs and we’re back in business!

I’ve been using the fancy rectangle mode hidden inside of CUA mode for a while now, but I don’t want the rest of CUA mode, so I have these lines in my init file.

'(cua-enable-cua-keys nil)
'(cua-mode t nil (cua-base))

Emacs 24.4 has its own fancy rectangle mode using C-x SPACE. That seems to work fine, so I removed those cua-mode lines.

Rats! Now when I try to post this blog, I just get

Wrong type argument: stringp, netrc-get

in the minibuffer. It seems that netrc.el is busted in Emacs 24.4!

Emacs 24.4 released

Emacs 24.4 was released today! Let’s try it

wget http://ftpmirror.gnu.org/emacs/emacs-24.4.tar.xz
tar xf emacs-24.4.tar.xz
cd emacs-24.4
make check
sudo make install
/usr/local/bin/emacs &

Among other things, it has a new web browser…eww. No, I don’t mind web browsers…that’s its name! Type M-x eww RET to try it. Here’s what the Elixir home page looks like in eww:

screenshot of eww in Emacs 24.4


As I understand it, this will be the last release of Emacs 24. Next up, Emacs 25!

FP101x – Introduction to Functional Programming

This week, I started the Functional Programming course on edX! Almost all of my recreational programming time has been devoted to Go lately, which is decidedly not functional. But I’m excited about the release of Elixir 1.0 and I’ve been meaning to do more with Clojure, so I think I’ve got a lot more functional programming in my future. Perhaps this course will give me a boost!


keep calm and curry onand ghci in terminal

The course is not a Haskell course per se, but that’s what it uses for all the examples. I installed the Glasgow Haskell Compiler with

sudo apt-get install ghc

That was easy. Thanks, Debian!

$ cat hello.hs
module Main
      main=putStrLn "Hello, World!"
$ ghc -o hello hello.hs
[1 of 1] Compiling Main             ( hello.hs, hello.o )
Linking hello ...
$ ./hello 
Hello, World!


Next I configured Emacs for Haskell by adding

(depends-on "haskell-mode")

to my Cask file and

(use-package haskell-mode
    (add-hook 'haskell-mode-hook 'haskell-indent-mode)
    (add-hook 'haskell-mode-hook 'interactive-haskell-mode)))

to my Emacs init file. Now I’m ready to try the first set of exercises!

screen shot of Emacs in haskell-mode and ghci in terminal

Figure 2: Emacs in haskell-mode and ghci in terminal

Go workshop at Gilt Tech

Friday I attended a Go workshop at Gilt Tech in New York. It was fantastic!

pic of my badge for Gilt

I had never heard of Gilt Tech before. I found out about the course from Lauri Apple’s Google+ post. I signed up immediately! I live in Baltimore, so I had to get up very early to get on a train to New York. My train was held up with a bad axle, so I was late arriving to New York. Thankfully, the workshop started at 10:00, rather than 9:00, so I still made it on time!

pic of the Empire State Building

Figure 2: Looking up at the Empire State Building from my walk down 33rd St.

Everyone at Gilt was super nice. They have a really nice facility on Park Avenue. They had a beautiful classroom set up and even had coffee and bagels waiting for us! At lunch time, they provided pizza and other things to eat and drink as well. Amazing!

The workshop was led by Aditya Mukerjee, who has been using Go professionally for over two years. He was terrific! He covered a lot of ground, but was clear and concise about everything. He made heavy use of screen, git, and tig, so anyone unfamiliar with those tools might have been a bit lost, but it was very effective. Most of what he did was checked in to a repo on github, so we could all check out the same thing he was showing if we wanted.

pic of Aditya Mukerjee at the head of the Gilt classroom

Figure 3: Aditya Mukerjee at the head of the Gilt classroom

During the hands-on exercises, I paired with Rafael. We didn’t finish our project that day, but I think we both learned a lot.

After the workshop, I walked around New York a bit. I saw Birdland, had a few lovely pints at Heartland Brewery, and went up the Empire State Building. Then I hopped back on the train to Baltimore. This was also delayed, making for a very long day, but it was worth it. By the time the train rolled into Baltimore, it was my birthday. Happy birthday to me!

Update: Gilt posted a blog about the class as well. You can see me (and Rafael) in the second to last photo there.

Get small in Go present

Among the many cool tools in the Go ecosystem is present, a package for making slide presentations and blog posts. It’s an easy way to make a nice looking HTML5 presentation that can also run live code samples. Keen!

Because it’s so cool, lots of folks use it. Often they publish their slides afterwards. For example, here is a terrific talk by Brad Fitzpatrick from GoCon Tokyo.

The problem is, Go present must have only been used by folks with high-resolution displays so far. When I look at any Go present presentation in my browser, the top gets chopped off. On most slides, this is the title!

screen cap of Go present in smaller browser

That top line is supposed to read, “60% of the time, it works every time….”, but even though I am scrolled all the way to the top, I can’t see it.

This appears to be a typical case of making fixed-size assumptions in HTML. I fiddled with the CSS a bit until I arrived at manipulating the margin-top value. Ten percent was a bit too much

screen cap of Go present with 10% top margin.

but 5% worked pretty well.

screen cap of Go present with 5% top margin.

So, I added the following to my userContent.css file.

 * This is to force "Go present" presentations to fit in my browser.
.slides { margin-top: 5% !important; }

Now all such presentations I encounter (which is a lot lately) are readable in my browser.

My first bad MOOC

I recently completed the “Big Data and Social Physics” MOOC at edX.




What a waste of time. Thankfully, it was only one week long, so I didn’t waste too much time. But still. Even though it didn’t cost any actual money, I feel like I was ripped off. This was basically a big sales pitch for Alex Pentland’s new book, Social Physics How Good Ideas Spread–The Lessons from a New Science. The course itself is entirely free of content.

I did not cave in and buy the book, so I can’t really say, but it sure smells like it’s largely free of content as well. A new science? Is that really necessary? It sounds to me like maybe Pentland’s got a Wolfram-sized ego and has convinced himself that his ideas are so extraordinary they cannot be described with regular science. If you haven’t read Stephen Wolfram’s A New Kind of Science, you haven’t missed anything. I’m going to guess that it’s safe to skip Pentland’s “new science” as well.

Even if I’m wrong about that and it turns out Pentland’s book does contain interesting content, I still think it was wrong of him to exploit the wonderful edX platform in this way. This was not a real course. This was a TED talk that spiraled out of control.

Tomorrow, an edX course called Sabermetrics 101: Introduction to Baseball Analytics is starting. This appears to be chock full of real content including practical things like R and SQL. What does it mean if the baseball course has more “big data” in it than the Big Data course?