Asterisms in LaTeX

22/02/2011

Another \LaTeX trick this week: asterisms. Asterisms are typographic devices used to separate or to call attention to a piece of text without resorting to using a section or chapter. While its usage in modern English (and French, for that matter) is now rare, it is still an interesting device to structure text.

The usual manifestation of an asterism is the ⁂ symbol (U+2042) but the single character asterism may not be suitable for all occasion. In HTML, and in these posts, you have seen it quite often. With \LaTeX, getting an decent-looking asterism is not that easy.

Read the rest of this entry »


Sustainable iPod Rack

08/02/2011

This week, I have a half-an-hour project for you: A sustainable iPod rack. All you need is a 50 mm × 50 mm × 70 mm (2in × 2in × 2½in) block a wood, a band saw, and a chisel.

OK, it’s not entirely made of wood; you may also need felt pads underneath to make it more stable and/or furniture friendly.

Read the rest of this entry »


RetroComputing

01/02/2011

There are plenty of web sites and museums dedicated to the computers of yore. While most of them now seems quaint, and delightfully obsolete, there are probably a lot of lessons we could re-learn and apply today, with our modern computers.

If you followed my blog for some time, you know that I am concerned with efficient computation and representation of just about everything, applied to workstation, servers, and embedded systems. I do think that retro-computing (computing using old computers or the techniques of old computer) has a lot to teach us, and not only from an historical perspective.

Read the rest of this entry »


Epigraphs in LaTeX

18/01/2011

There are times when part of the message, the gist, must be communicated to the reader in an out-of-band fashion, so to speak. One way of doing this is to use an epigraph to open a chapter or section, carefully chosen to convey the intended message but in the voice of another author (self-epigraphs are of very bad taste in my opinion).

\LaTeX is the preferred document preparation system of computer scientists, physicists, and mathematicians and if you intend to follow a career into the academia, it’s pretty much unavoidable. One day, you’ll have to learn \LaTeX. The thing is, \LaTeX is pretty much like C++: it can do just about anything, but it’s not going to help you do it. You have to rely on the innumerable packages or, if you really can’t find what you need, you can code it yourself. Let us have a look on how to code an epigraph macro in \LaTeX.

Read the rest of this entry »


iPod Touch Movies?

11/01/2011

I got myself one of those “retina display” (960×640) 5th gen iPod Touch for the New Year. First impressions are that it’s rather well integrated, responsive, and has a number of fun applications. It’s even usable as an X/SSH thin client with a 10$ App.

With Permissions of Emily Carroll

But then you try to see how far you can push the use of the device with Linux (my primary operating system) and find that the support is dismal. The support is already not that impressive with Apple‘s iTunes running on Mac OS X. iTunes is really slow even when running native (i.e., without virtualization) and also does some very stupid things such as preventing you from copying a PDF you downloaded from the web back on the computer even though it has no DRMs—a behavior defective by design. Another limitation is in the iPod itself: the video formats supported are very limited.

Read the rest of this entry »


The CFM-01

04/01/2011

In a previous post, I presented the CFM-00, a “cluster” of 8 Pentium III at 500MHz, assembled into one MDF casing. The assembly was rather clean-cut given the rather rudimentary materials (MDF and threaded rods) but the resulting computing power is dismal (but that’s no surprise). We have about 2GHz of computing power, and at 128MB of ram per node, it makes running even just a remote shell not that responsive.

A few months ago, my friend Christopher came to me with a data center clearing deal with Pentium III 1GHz 1U rack-mount (with 512MB of RAM) servers for $15, and I got eight of them to build the CFM-01, the successor to the CFM-00. But I did not strip the motherboards from their casing this time, I built an inexpensive rack out of slotted angle steel.

Read the rest of this entry »


Suggested Reading: Find the Bug: A Book of Incorrect Programs

24/12/2010

Adam Barr — Find the Bug: A Book of Incorrect Programs — Addison-Wesley, 2010, 306p. ISBN 0-321-22391-8

(Buy at Amazon.com)

This short book (306 p, but a quick read) asks us to debug 50 short programs written in 5 different languages: C, Python, Java, Perl, and x86 assembly. The book offers quite verisimilar code snippets, each of which containing exactly one bug; forfeiting the results. Barr proposes a taxonomy of bugs, from the logical bug to the off by one, and we must debug the programs with him.

Read the rest of this entry »


C++ Logging

21/12/2010

It seems that logging is something we do in about every program we write. Logging complements the standard output with richer messages and detailed information. And each time it seems like we’re asking ourselves how to do that exactly.

Of course, there are already existing logging frameworks out there, but I was wondering how much work it implied. I wanted something that would integrate seamlessly to the existing C++ streams: it had to behave exactly as a classical ostream from the programmer’s point of view, but had to insert timestamps and manage message priorities. The simplest way to do so is probably to have a class that inherits from ostream or similar and that already overloads all the operator<<s.

Read the rest of this entry »


Finding Your Way Home

14/12/2010

Like many of us, you may need to host stuff on your home computers and access it via the Internet. If you paid for a static address from your provider, you can map a domain name to it via your ISP’s DNS. But for the majority of us, getting a static address from our provider means paying a good deal more for little to nothing more. For example, my provider (which by the way offers excellent service) is so stable that my IP address changes once a year, or even less often. But for others, the IP address changes more often and it’s difficult to keep track of it.

Some services, like DynDNS, provide you with a script and a couple of tools to access your stuff via a virtual domain name (or something like that). The magic behind DynDNS maps your domain name to your ever-changing provider-specific IP address. But what if you just want to find your way home, without a domain name and without having to deal with an extra service provider?

Read the rest of this entry »