complex_doit "man --recode UTF-8 ./\Q$orig\E > \Q$tmp\E";
To
complex_doit "man ./\Q$orig\E > \Q$tmp\E";
Now you should be able to create DEB packages with “pkg-buildpackage -d” (the -d disables the dependency checks which is probably what you want since your dpkg database will be empty)
]]>Most of the time I keep Skype open, but as soon as someone sends me a message or I open a Skype window it steals the sound. I have to quit my audio player (or whatever else was using the sound) and Skype and start them both up to get sound back to where I want it.
I had been holding off installing Pulseaudio for a while because to my knowledge a lot of apps didn’t support it yet, and I though crappy sound was better that no sound. I gave it a try anyway.
The compatibility with OSS and ALSA seems superb. Banshee built with Pulseaudio support and WINE built with alsa works flawlessly side-by-side with my sound-card using the OSS driver. I’m sure I could have don’t this with ALSA, but I doubt it would have done it as well or as easy.
So to all the people that are complaining about Pulseaudio: Shut up and give it a try. It’s not really evil, quite the opposite.
]]>In this example I created a list of 1000 numbers (0-999) and randomly choose a number from that list, which I then give to my 3 search functions, linear_search, binary_search and python_search. Each search function returns the number of iterations needed to find the item in the list (or None if its not in there, which would be worrying) and a function decorator prints the time it took.
Value we are searching for is '760' Performing linear search linear_search took 0.668 ms Found test value in 760 iterations Performing binary search binary_search took 0.085 ms Found test value in 26 iterations Performing python search python_search took 2.234 ms Found test value in 0 iterations
linear_search iterates through each item in the list one by one. binary_search (I call it binary_search, but its not really, it uses a custom algorithm) starts at the middle and heads in which ever direction makes the most sense, if it is heading in the right direction it speeds up, and if not it changes direction and slows down. python_search just uses the following code:
def python_search( list, value ):
if value in list:
return 0:
return None
python search failed miserably, and this is the recommend way to determine if a value is in a list so you’d think it would be the fastest. linear_search came second which really surprised me, as I was certain it would come last. But wow, binary_search really killed both of them.
Why doesn’t python use something like this internally to speed this kind of thing up?
]]>If these things were fixed, then it would be seamless.
]]>Take the following code for example.
class MyClass( object ):
def __init__( self ):
self.dict = {}
def __getitem__( self, name ):
return self.dict[name]
def __setitem__( self, name, value ):
self.dict[name] = value
myclass = MyClass()
myclass["list"] = ["foo"]
myclass["list"].append( "bar" )
You’d think that myclass[”list”] now contains [”foo”, “bar”]. It actually contains None (the append methods return value).
]]>I built my own GPE image using OpenEmbedded, It’s based on the Angstrom distribution so there’s a package manager (ipkg) with plenty of apps ready to try out, pretty cool. Wifi in this image seems far more stable than any other image I’ve tried.
GPE has one of the best mobile browsers I’ve ever used, and some excellent PIM apps, but seems to lack an app for making use of phone functionality.
I’m currently investigating adding support to Conduit for syncing GPE devices.
What works:
What doesn’t:
How to install:
To run Linux, just start haret. Feedback much appreciated.
]]>What rocked:
What didn’t:
All in all it was a pretty good first Guadec for me, I will definitely be going next year.
]]>