Rasmus​.krats​.se

This page in English

Inlägg taggade ”hack”

Skriverier då och då, på webben sedan 1994.

Detect encoding-tags in python

Posted 2012-04-22 19:50. Tagged , , , .

When iterating over a set of input files in Python, how to decode the lines of each file with the correct encoding?

I wrote a hook for the fileinput module to look for a -*- coding: foo -*- marker in the first lines of each file.

Read whole Detect encoding-tags in python.

FreeBSD på en Dell Latitude D600

Publicerad 2006-07-23 21:50. Taggat , .

Jag har nyligen skaffat en (begagnad) Dell Latitude D600. På den här sidan tänkte jag beskriva hur jag bär mig åt för att få mitt favorit­operativ­system, FreeBSD, att fungera ordentligt på den. Men det verkar som om sidan mer blir en lista över saker som bara fungerar …

Jag använder FreeBSD 5.5, eftersom varken jag eller någon annan har fått Arla att fungera med 6.x än.

Läs hela FreeBSD på en Dell Latitude D600.

I’m on the scene

Posted 2006-03-05 11:30. Last updated 2006-03-07 10:07. Tagged , , .

Apparently, I’m on the scene. I went to deadline harakiri to take a look, mainly since elmindreda, Dicander, Psychad and some other people reawoke my interest in 3d graphics and the demo scene in general.

Update 2006-03-07 10:07: Thou shalt not overwrite your files before they have entered the state of backup. Since I did just that, causing the demo to be null and void for a while, I have now rewritten the demo from biological memory.

Read whole I’m on the scene.

Optimizing a C++ program

Posted 2005-03-26 12:00. Tagged , , , .

A small case study of how to optimize a C++ program.

Read whole Optimizing a C++ program.

12 takter ChucK

Publicerad 2005-01-06 12:00. Taggat , .

ChucK är ett livekodningssystem för musik. Cool!

Här kommer en enkel bluestolva som kodexempel.

Läs hela 12 takter ChucK.

Föreläsning om XML och XSLT

Publicerad 2004-09-16 12:00. Taggat , , .

På torsdag 16/9 kommer jag att hålla en föreläsning om XML och XSLT, klockan 18:45 i sal Q2 på KTH.

Ett Stacken-arrangemang, alla är välkomna.

Här är mina anteckningar för föreläsningen (PDF).

Bli först att kommentera.

Iostream performance in gcc 3.4

Posted 2004-07-21 12:00. Last updated 2004-07-23 12:00. Tagged , , , .

I did a small performance test of gcc 3.4 compared to earlier versions. I think it is safe to say that standard c++ iostreams performance is greatly improved in gcc 3.4.

Update 2004-07-23: Implemented the tests in c as well, as a comparison.

Read whole Iostream performance in gcc 3.4.