Monday, May 27, 2013

Wednesday, May 22, 2013

SimpleHTTPPutServer in python

Sometimes a small HTTP server which can be used with
$ curl -T dafile dahost.local
is handy. You can use it to upload small logfiles etc without any authentication, so something like tftp.

Python's own SimpleHTTPServer is a simple webserver, but it only supports GET and HEAD requests.
By simply deriving from that class you can create a small server supporting PUT.

Sunday, May 5, 2013

Mozilla's rust in Fedora's PPA Copr

Copr is Fedora's answer to Ubuntu's PPA - IIUIC, so don't nail me on the definition.
Slavek give's a nice introduction into how Copr works and what it does.

Now - Copr can be used to create public repositories for 3rd-party packages like rust - which can not (yet) land in the official Fedora repos (in rusts's case because of the bundling other libs).
I had to uploaded a source rpm of rust and point Copr to it, so Copr can pick it up and do a chroot build.
Best is that Copr is also creating the appropriate repository and you only need the following repo file to install rust with dnf or yum.

# Add the following repo file
$ cat rust.repo 
name=Rust packages (unofficial)

# And install it
$ sudo dnf install rust

In general Copr seems to be nice - it's still abit rough around the edges, but that's expected. It can surely imagine that t's going to fit well into our existing infrastructure.

[Update] The copr landing page for rust and the package rust-0.6-2.fc18.x86_64.rpm link.

ORBX.js - is no open codec


I'm by no way an expert, but until now ORBX.js is - to me - not much more than a tech demo and not "the future".

ORBX seems to be a propietary video codec, which operates highly parallel - that there is ORBX.js - a javascript decoder for this codec - doesn't help the fact that it's proprietary. So I wonder what the fuzz is all about. As said: To me ORBX.js is currently not much more than a tech demo to illustrate JavaScript's (or more it's interpreters) capabilities. And currently I couldn't find any hint that ORBX - the codec - is going to be opened - which is also not as easy, as this would involve some sort of patent audit to sort out it's patent status.

At last I at least like the fact that it's now shown that there can be highly parallel video codecs, which can utilize the GPU from a high level language.
I wonder if this can be done with Dirac.

Thursday, May 2, 2013

Parallel static python checks with Makefiles

Parallel Ripples

To make testing fun I looked at improving the speed of static syntax checks.
The latest incarnation is now using make targets to represent a specific checks. The nice thing about this is, that you can use Make's -j switch to run those tests in parallel.

So basically it looks like this:

check-static-pep8: $(PYTHONSOURCES:%=%.pep8)
 @echo Passed $@

 PYTHONPATH=. pep8 -r "$*"

The complete makefile is here and the numbers:

 Passed check-local

real 0m22.875s
user 0m20.466s
sys 0m2.158s

And in parallel:
 Passed check-local

real 0m11.459s
user 0m34.780s
sys 0m3.325s

There is so much that can be done.