How to make FreeBSD talk to a Fujifilm X-E1

December 30, 2012 - Markus Hoenicka
Believe it or not, I finally bit the bullet and got myself a digital camera. I had to realize that my current state of affairs no longer allowed me to pursue a hobbyist's career as a large format photographer. I barely found the time to shoot negatives, and my current appartment does not allow to easily set up a large format darkroom. A recently unveiled system camera, Fuji's X-E1, finally convinced me to go digital. Problem is, how to access and process the images on my tried-and-true FreeBSD box?

Read more »

How to build the tesseract OCR engine on Windows/Cygwin

August 29, 2012 - Markus Hoenicka
Optical Character Recognition (OCR) comes in handy if you need to edit text which is not available in an editable format, e.g. scans of dead-tree documents. I needed an OCR solution which works both on my Unix boxes at home and on my Windows box at work. Tesseract ships a Windows version although it is a command-line tool. It seemed a better idea to build tesseract on Cygwin, and some success stories of previous versions on the web encouraged me to go ahead and try.

Read more »

FreeBSD: how PNG killed my touchpad

August 02, 2012 - Markus Hoenicka
I wanted to install R, a scientific software package for statistical analysis and data visualization, on my FreeBSD box real quick. R can output its graphs to PNG images, among others. libpng was bumped recently to a new revision using a new interface. I didn't expect this to be a great hassle, but I had to find out the hard way that just about every installed port depends on PNG support. As R pulled in the new version of libpng, I had to update all packages that depend on this library. Rebuilding these ports from the sources takes a day or two. This is not unusual. But in my case it had some interesting side effects.

Read more »

Import spreadsheet data into DocBook

March 19, 2011 - Markus Hoenicka
DocBook is a versatile XML vocabulary for technical documents, including grant proposals and theses in life sciences. Typing tabular data into an XML editor like Emacs + nxml is pretty cumbersome as there is a bad signal-to-noise ratio in terms of markup vs. data. In contrast, typing the same data into a spreadsheet like OpenOffice Calc is painless. Also, I'm used to keep my data in spreadsheets anyway, so I had to find a way to import these into DocBook files. Apparently there is no such tool on the market, so I dusted off my Perl skills and wrote a little script for this purpose.

Being a lazy person, I didn't build this script on Text::CSV but I rather used a lightweight approach to parse the input data. Best results are obtained if you save your spreadsheet data using tabs as column separators. As long as you don't insist on using tabs in your data as well, things will turn out fine.

See here for some more information including the download link. Maybe you find this tool as useful as I do while typing my "habil" thesis.

How to configure FreeBSD on an Acer TravelMate 8371

November 21, 2010 - Markus Hoenicka
In a previous post I've explained how to install FreeBSD 8.1-RELEASE on an Acer TravelMate 8371 and still be able to boot it. Now I'd like to share the details on the configuration which makes the OS usable in the first place. This is going to be pretty technical and a bit lengthy, and I'll make sure to include and explain all config files that I've created or edited. The reason why I'm elaborating on this stuff here is that The FreeBSD Laptop Compatibility List wouldn't let me create an entry.

Read more »

How to install FreeBSD on an Acer TravelMate 8371 ... and not brick it

November 18, 2010 - Markus Hoenicka
After about 5 years of almost daily use my laptop more or less fell apart. The built-in speakers have been mute for years, the battery plug was worn out, the battery itself barely lasted for 20 min when I unplugged the box, and the backlight no longer allowed to use any setting other than the lowest, making the box a nice companion for dark nights. This finally convinced me that it is about time to get a new one.

After a couple of weekends spent on surveying the market, I purchased an Acer TravelMate 8371 that seemed to suit my needs. Needless to say, it ships with an OS from Redmond that I simply don't care for. When I tried to install a far better replacement (aka FreeBSD), I almost bricked the box. Read on to see how to avoid this.

Read more »

Malaysians

August 16, 2010 - Markus Hoenicka
From a recruiting poster of the Japanese fast food chain MOS Burger, seen in Singapore:

"Housewives, students, retirees, and Malaysians welcome"

It is interesting though that the latter are missing in their job opportunities page on the web:

http://www.mosburger.com.sg/employment.php

How to run NTEmacs and Cygwin Emacs on the same box

March 24, 2010 - Markus Hoenicka
I've decided to switch to Cygwin Emacs from NTEmacs lately. As I had previously seen that the Cygwin X server may refuse to work at times, I wasn't ready to deinstall NTEmacs altogether (the X problems were certainly caused by my lack of understanding, or lack of maintenance, or both. Cygwin X in general is said to run smoothly). I rather figured it should be possible to run both Emacsen in parallel, without duplicating all efforts which go into maintaining your hand-crafted .emacs file. So I tried to come up with a way to share my existing .emacs with both versions. The major problem is that NTEmacs requires quite a lot of tweaks to make it cooperate with Cygwin bash, which is a far superior shell compared to Windows "cmd", whereas Cygwin Emacs requires at least as many tweaks to make it cooperate with native Windows tools like web browser or proprietary Windows programs. This is how I solved the problem.

Read more »

Speed comparison of NTEmacs and Cygwin Emacs

March 24, 2010 - Markus Hoenicka
I may have mentioned previously that I'm using a Windows XP box as a Netware client at work. As I prefer the Unix way of doing things otherwise, I've been installing lots of Unix software on this box. The two main components are Cygwin, which is essentially a Unix-like environment including all essential GNU tools, and the native GNU Emacs port. The latter is built with MinGW, the "Minimalist GNU for Windows" tools. The native port has been around for years, I must have been using it for more than a decade now. However, Cygwin has also provided an Emacs port for a while. This one either runs in your terminal (like MinTTY), or as a GUI app if you use Cygwin's X server. A speed comparison made me think twice about my previous choice.

Read more »

Emacs Photo Database now available

May 14, 2008 - Markus Hoenicka
This is to announce that Emacs Photo Database is now available as a SourceForge-hosted project. As outlined previously, this is a database holding film, negative, and print information for photographers who use real darkrooms instead of digital cameras and a "lightroom".

Photo database front-end, 2nd try

April 23, 2008 - Markus Hoenicka
I've reported previously that my attempts to create a simple photo database to manage my negatives and prints failed miserably with OpenOffice Base. I thought that installing a web frontend for SQLite might simplify adding and retrieving the data to a SQL database, but the results were not entirely to my taste. The tool simplified the database creation somewhat, and it is fairly easy to check the rows in the tables. However, there are two limitations:

Read more »

Installing SQLiteManager 1.2.0 on FreeBSD

April 16, 2008 - Markus Hoenicka
I've been into b/w photography for at least 15 years now, and I've got a serious collection of negatives and prints. A rule of thumb says: the larger the format, the fewer images. As I'm using my 4x5 as much as possible, there's only a handful of negatives to add each year. Still, I'd like to keep track of the negatives and the prints in an easier way than I used to do so far: I scribbled the data onto legal pads and waded through them if I needed to look up something. This calls for some sort of database.

Read more »

How to connect your liver to your heart with a toothpick

September 19, 2007 - Markus Hoenicka
Here's another one in our ongoing series of how to harm yourself by eating toothpicks.

A 55-year old man reported to the hospital with chest pain and a difficulty to breathe when not at rest. The pain was also noticeable when he was lying on his right side. The patient also suffered from a loss of appetite, accompanied by a loss of weight, and did not feel well in general. He was diagnosed with a massive pericardial effusion (a loss of blood from the heart to the surrounding tissue) and a constrictive pericarditis (an inflammation of the sac surrounding the heart). The patient was taken to a computer tomograph which confirmed the pericardial effusion and additionally detected an abscess of the left side of the liver. The scan also showed a tubular structure connecting the liver and the heart which was obviously of foreign origin. A laparotomy (surgical opening of the belly) revealed a wooden toothpick that somehow made its way out of the bowel, through the liver, and partially into the heart. The toothpick was removed and the patient recovered within a week.

The paper also contains a brief literature search which reveals that only 12% of the patients treated for symptoms of a toothpick gone the wrong way remember swallowing that toothpick. That is, only one in about 10 people eating toothpicks are aware of the fact. On the other hand, 80-90% of the cases where people remember swallowing a toothpick are uneventful. Clearly, there are situations that make you less aware of what you put in your mouth (think alcohol), but it still makes me wonder how absentminded you have to be in order not to notice. But then - shit happens.

Cutting Carbon VI

September 19, 2007 - Markus Hoenicka
Now that my electrical power is generated without carbon dioxide emissions, there is one last source of greenhouse gases that I can do something about: my car. I commute almost every weekend to see my kids, and unfortunately the only reasonable way to get there is to go by car.

The carbon dioxide emissions of a car are directly linked to its fuel consumption. I should probably explain two terms here. In continental Europe, the gas consumption is expressed as liters of fuel per 100km. That is, a fuel-efficient car consumes less fuel to get you 100km from here. In the US, and afaik in Great Britain as well, you determine the mileage, that is the distance that you can travel with a gallon of fuel. Thus a fuel-efficient car has a higher mileage.

There have been a few serious attempts by the car industry to build fuel-efficient cars. One of them is a nice example of how not to do it. The Volkswagen company used to build a small car called the Lupo. In 1999 the Lupo 3L hit the market. "3L" doesn't denote the engine size here (which was 1.2 liter, by the way), but the fuel consumption per 100km. The 3 cylinder turbo diesel engine thus had a US mileage of 78. This translates to a carbon dioxide emission of 81g per kilometer.

This was indeed a technical feat, but the car didn't exactly sell well:

- it was very small. You could use either four seats and essentially have no trunk, or you'd use two seats and fold down the back seat to create a trunk large enough to hold a few shopping bags.
- it was tricky to drive at times as the car was too light when occupied by a single person. Early models had to be retrofitted with lead weights in the rear bumper to put enough weight on the rear axle.
- it was butt ugly, as if it had written "don't buy me" across the hood.

Technically this was the car that the Smart should have been, but the Volkswagen managers apparently tried to sell it only to those who'd otherwise be eco-friendly enough to walk by foot. In any case, the Lupo 3L was discontinued in 2004 after merely 27000 units were sold. At around the same time, Volkswagen introduced the luxury sedan Phaeton (the top model sporting a 6 liter engine that consumes 14,5 liter gas per 100km / 17 miles per gallon, releasing 348g carbon dioxide per kilometer) and the luxury SUV Touareg (top model: same engine, using 15,7 liter per 100km / 15.5 miles per gallon, releasing 382g carbon dioxide per kilometer). Both of them were considered a success, and especially the latter sold well. So much about us fighting the climate change.

My Ford Mondeo station wagon was about 10 years old and due for a replacement anyway. Not that it was broken down, but the corrosion got noticeable and a lot of minor things like the shocks and the muffler would eventually have to be replaced. I went shopping for a preowned car that fulfilled these requirements:

- about 2-3 years old with no more than about 30000km (approx. 19000 miles)
- large enough to transport a bicycle without hassles
- Euro 4 or better emission standard
- lowest fuel consumption / highest mileage of its class

It was pretty clear from the start that my new car would be quite a bit smaller than the Mondeo, and that I'd have to switch to a diesel engine to get the lowest fuel consumption possible. It was also clear that only a station wagon would be suitable for my purposes. There were a few cars to consider:

- Opel Astra
- Renault Laguna
- Ford Focus
- Skoda Octavia

And the winner is... disclosed in a future post.

Cutting Carbon V

April 30, 2007 - Markus Hoenicka
Call me stupid, but last week I went to my utility company and asked them to charge more for my electricity. The reason is not a terminal loss of common sense, but I wanted to switch to a tariff that is based solely on renewable energy sources. The default tariff that I had paid for so far uses an energy mix consisting of 34% nuclear power (this alone was a reason to switch), 45% fossil fuels (mainly coal and gas), and only 21% renewable sources like water, wind, or solar energy. The new tariff, which takes effect on May 1st, uses 100% renewable sources throughout. I've calculated that I'll have to pay an extra EUR 2.50 (approx. USD 3.00) each month for this extra peace of mind. Think about that. The equivalent of one glass of beer a month.

Of course, switching the tariff doesn't make my radio blast louder or change the light from my light bulbs. Also, it's not like all "good" electrons arrive in my household and the "bad" ones in my neighbor's. Most utilities don't run all power plants themselves, but they purchase some or all electric power as needed from companies running such plants. Now that I pay more for the same amount of electrical power, the company is obliged to purchase more power from a supplier that runs on renewable energy sources only. Last year's bill shows that I consume approx. 740kWh of electrical power per year (before I started to cut my carbon dioxide emissions). Switching the tariff thus avoids 0.37 gram (0.013oz) of radioactive waste (there is no secure storage facility in Germany, so each milligram is one too much) as well as 169.5 kg (374lb) of carbon dioxide emissions per year. In other words, 18 Euro-Cent (approx. 23 US-Cent) keep 1 kg of carbon dioxide from entering the atmosphere.