Make Firefox play embedded MP4 videos

For some reason (at least on Mac OS X and according to a quick search also on other platforms) Firefox does not play MP4 videos embedded into websites using the <video> tag. Seems that enabling the two config options media.fragmented-mp4.enabled and media.fragmented-mp4.exposed fixes the issue.

Firefox config for playing MP4 videos

Posted in Uncategorized | Leave a comment

A course on Homotopy Type Theory

Here’s a link to a course on Homotopy Type Theory taught by Robert Harper at Carnegie Mellon. The first few lectures introduce different views of logic and compution and their relationships. Highly recommended.

Posted in Mathematics, TCS, Uncategorized | Leave a comment

Haskell Platform on Mac OS X (with clang 5)

The workaround presented in this blog post is somewhat cleaner and I would recommend usind it instead of the hack I describe below.

Continue reading

Posted in Haskell, Tools | Leave a comment

SLIME contribs quick tip

I really like to use SLIME to interact with a Lisp system like SBCL because it makes life so much more pleasent. But for some time I had the problem that my SLIME installation (done using a recent version of el-get on Aquamacs 2.5) did not want to start at all (when issuing the command M-x slime): Emacs complained with the very unfriendly error message

Symbol's value as variable is void: 'slime-fancy

My SLIME config happens to begin with the following two lines

(require 'slime-autoloads)
(slime-setup '(slime-fancy))

I now discovered a solution of sorts: Delete all the byte-compiled files in the contrib/ folder:

$ rm $PATH_TO_SLIME/contrib/.elc

If someone has any idea what exactly is wrong here and why this hack works, drop me a line. I really dislike being in the dark about the ins and outs of the tools I use on a regular basis.

Posted in Uncategorized | 1 Comment

vim-like ctrl+v enter in Emacs

Suppose you have a list like this

foo, bar, baz, quux

in your Emacs buffer, but you’d rather have one element per line like this

foo
bar
baz
quux

What to do? In vim this is easy:

:%s/,/^M/g

where ^M is inserted using

Ctrl+v

But what to do in Emacs? Turns out it’s just as easy but different (who would have thought …): You can insert the newline character in your replace-string or something other using the keyboard command

C-q C-j

C-q is somewhat like Ctrl-v in vim and C-j is Enter. Easy as pi, yeah!

See also the page Newline Representations ^M ^J ^L about related issues with newline in Emacs.

Posted in Tools | Tagged , | Leave a comment

More Free Introductory Category Theory Video Lectures

Recently I discovered another Youtube Channel with some lectures on Category Theory. They cover only some of the basics with examples drawn mostly from topology and I do not know if the series will continue any time soon. Anyway, it’s nice to see that there are more and more resources for learning the basics of Category Theory online.

Posted in Mathematics | Tagged | Leave a comment

Speeding up the startup time of Mac OS’s Terminal.app

Terminal.app is very important to me as I use a lot of console based programs, so it’s very annoying if I have to wait a few seconds for it to start up. Recently, I stumbled across a helpful blog post (Speed Up a Slow Terminal by Clearing Log Files) that explains an easy way of combatting the slow startup of Terminal.app. I decided to take this a bit further and added to root’s crontab (using the command sudo crontab -e) the following line

@hourly rm -f /private/var/log/asl/*.asl

This cleans up the mysterious .asl log files Terminal.app produces and everything has been fine so far.

Posted in Tools | Leave a comment

Development environment for the STM32F4DISCOVERY board on Mac OS

This is just a quick post with information on how to get up and running with a development environment for the STM32F4DISCOVERY evaluation board which is a cheap and fun way to get started with developing software for ARM microcontrollers.

First, you need to install the development toolchain. I use devkitARM. See the installation instructions for more information.

Then, you will want to install openocd, a program that lets you upload software to the development board via USB. I assume that you have homebrew installed, so I will use that to install the build requirements for openocd:

brew install libtool automake libusb libftdi

Now get the latest sources for openocd (and no, the open-ocd package that is in homebrew will not cut it because it’s an older version that lacks support for the Discovery board):

git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd

… and build openocd

cd openocd
./bootstrap
./configure --enable-maintainer-mode --prefix=/opt/local --enable-stlink
make

Install in a reasonable place at your own discretion.

Posted in Electronics, Tools | Tagged , | Leave a comment

Thunderbird line breaking behaviour

Because I keep forgetting which options to set to force Thunderbird to send and display line breaks instead of flowed plain text emails that may or may not come out right at the other end (usually those emails exhibit unsightly long lines which among other things might make quoting from some MUAs a PITA), here’s a reminder mostly to myself.

Set

  • mailnews.display.disable_format_flowed_support to true and
  • mailnews.send_plaintext_flowed to false.

For more details see http://arapulido.com/2009/12/01/enabling-line-wrapping-in-thunderbird.

Posted in Tools | Leave a comment

IMAP Push with Dovecot and K-9 Mail on Android

Having had the unfortunate experience that K-9 Mail on Android set to polling mail every 10 minutes almost caused my telephone to burn a hole in my jeans pocket I investigated the IMAP push functionality. Luckily there’s already an informative article by a fellow faced with nearly the same problem that describes how to set up a sane configuration for IMAP push using Dovecot 2. That’s all good and well, but I was still running Dovecot 1.2 on my Debian stable system. Consequently I needed to upgrade to Dovecot 2 to make the best of the situation. Luckily, this did not prove to be too big of a problem. Just add the apropriate URL from http://wiki.dovecot.org/PrebuiltBinaries to your /etc/apt/sources.list and do what the error messages and/or warnings upon restarting the newly installed Dovecot imapd tell you (i.e., create a fresh config file that’s in line with the new options and defaults of Dovecot 2.0). So far everything works well, keeping my fingers crossed.

Posted in Tools | Tagged , , | Leave a comment