Skriverier då och då, på webben sedan 1994.
Posted 2012-04-22 19:50. Tagged python, unicode, hack, fileinput.
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
.
Publicerad 2006-07-23 21:50. Taggat hack, freebsd.
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
favoritoperativsystem, 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
.
Posted 2006-03-05 11:30. Last updated 2006-03-07 10:07. Tagged fractal, demo, hack.
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
.
Posted 2005-03-26 12:00. Tagged c++, hack, performance, neural network.
A small case study of how to optimize a C++ program.
Read whole Optimizing a C++ program
.
Publicerad 2005-01-06 12:00. Taggat music, hack.
ChucK är ett livekodningssystem för
musik. Cool!
Här kommer en enkel bluestolva som kodexempel.
Läs hela 12 takter ChucK
.
Publicerad 2004-09-16 12:00. Taggat Stacken, xml, hack.
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.
Posted 2004-07-21 12:00. Last updated 2004-07-23 12:00. Tagged c++, hack, iostream, performance.
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
.