Wednesday, July 20, 2011

wireless on suspend/resume

had a problem with some ubuntu upgrades hosing my ath5k wifi after resuming from a sleep. something was messed up with the power getting turned back on, i think, and it seemed to be something that would get fixed and rebroken judging from the dmesg errors and bugposts on kernel.org. downgrading my kernel didn't fix the problem. fortunately, i found that turning it off and on with rfkill avoided the problems, so i put it into a script to do it automatically. /etc/pm/sleep.d/50_wireless:
#!/bin/sh case "${1}" in suspend) #date >> /tmp/pm.log #echo ' suspend' >> /tmp/pm.log /usr/sbin/rfkill block wlan ;; resume) #date >> /tmp/pm.log #echo ' resume' >> /tmp/pm.log /usr/sbin/rfkill unblock wlan ;; hibernate) # nothing ;; thaw) # nothing ;; esac

Thursday, July 7, 2011

cygwin-ports

cygwinports seems to be just what i was looking for to get packages that don't come with the standard set. they have rtmpdump and mplayer, and i'll check back there before trying to compile stuff again.

android sdk, avd, !*&$!$%^

tried to get android emulator working on my admittedly underpowered netbook. it works... sort of. the 3.1 platform was _really_ slow. i tried the snapshot method to make it at least boot faster; no dice. maybe 2.2 would be better, but i think what i'll really try (if i do again) is the android-x86 iso on a flash drive. or just wait -- google and/or intel seems to be coming out with x86 native android later this year.

kindle on linux

followed these instructions to get kindle for pc running on my ubuntu netbook with wine:
sudo add-apt-repository ppa:ubuntu-wine/ppa

sudo apt-get update

sudo apt-get install wine1.3
after installation, just run wine on the installed Kindle.exe in ~/.wine/drive_c/ etc.

Saturday, May 7, 2011

karnickel: macros in python

not sure when exactly a macro would be useful in python. i remember seeing such a thing in some cython code, to deal with a c++ template, though karnickel deals with the python ast so probably not useful for that. but, there it is, if the need arises.

Thursday, May 5, 2011

python embedded in gdb

version >=7 of gdb has an embedded python interpreter. here's a tutorial on it. very handy if i need to debug c or c++. i'm guessing a million new debugger guis will be built on top of this.

Tuesday, April 26, 2011

compressive sampling

just came across a new take on an old problem: compressed sensing. here's a gentle introduction to the subject. looks like youtube has some interesting lectures on this, too, especially linking compressive sensing or sampling to information theory. one thing that occurred to me is that the sparseness object expressed by the '0-norm' requires the part of the domain where the function goes to zero to do so faster than the norm parameter. otherwise, the 0^0 would be 1, just like x^0==1 for x!=0. so, something like lim x->0 exp(-1/x)^x. maybe i can think of it as an epsilon-norm, where epsilon is infinitessimal for all non-zero quantities but not exactly zero for the norm of zero.