Thursday, September 26, 2013

Ralink RF3070 USB wireless support finally added to Linux

For a long time, these cheap Chinese USB wifi adapters didn't work in Linux. Believe it or not, I wiped my old laptop's Linux partition and tried FreeBSD and OpenBSD just to see if they supported it - but they didn't either.
So I reinstalled Linux and eventually produced a patch back in June to add support for the device, but for whatever reason it was ignored.

Now, though, one of the maintainers has implemented a proper patch and it looks like the RF3070 will soon work out-of-box in Linux.

Yay!

Monday, May 13, 2013

OpenCV build: "Could NOT find JNI" (Ubuntu)

While trying to build OpenCV so I could use the new Java bindings, I kept getting this somewhat confusing message:
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY)

What does it mean - did I need to set environment variables for the AWT and JVM libraries? Surely they're both already installed. What does it even mean to say "Could NOT find JNI", since JNI is a part of Java which is installed?

Turns out I needed to manually set the JAVA_HOME environment variable:
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
Why Ubuntu doesn't automatically set this when you install the openjdk7 package, I have no idea.

Sunday, February 24, 2013

Eye queue

This comment by "Cabochon1360" on one of David Mitchell's Youtube videos struck me today (far more than the video), and sums up my own feelings better than I could have.
In my teens, I was proud of my allegedly high IQ. But decades of failures and other humbling experiences have shown me it's just one personal characteristic, and not the most important one.
Another thing to bear in mind is that telling your kids they did well on a test because they're smart hinders their future performance. Perhaps counter-intuitive but it's been demonstrated in a number of studies (even when performed on adults, AFAIK).

Friday, July 20, 2012

What did I miss about modern Linux?

After running Windows alone for a couple of years, I had to install a Linux distro yesterday since the CUDA API in Windows is pretty ridiculous, flat out refusing to work with MinGW (the Windows port of gcc/g++ and pals).

Although I wasted a lot of time trying to get my dumb Medion PC (MS-7358 mainboard) to boot from two different USB keys, eventually a blank CD turned up and Ubuntu 12.04 landed on it. The install was quick, and this time (unlike on the old Acer laptop my kid uses) the Nvidia card was supported better, giving a usable display.

I needed to install some tools first before getting the CUDA API/SDK/drivers on Ubuntu:
The following NEW packages will be installed:
  build-essential dpkg-dev freeglut3-dev g++ g++-4.6 libalgorithm-diff-perl
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl libdrm-dev
  libgl1-mesa-dev libglu1-mesa-dev libice-dev libkms1 libpthread-stubs0
  libpthread-stubs0-dev libsm-dev libstdc++6-4.6-dev libtimedate-perl
  libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev libxext-dev
  libxi-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev
  x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev
  xorg-sgml-doctools xtrans-dev
0 upgraded, 36 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.3 MB of archives.
...
Fetched 15.3 MB in 3s (3,835 kB/s)
...
Setting up build-essential (11.5ubuntu2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
$
Now I really wish I'd prefixed this with the "time" command, because it took far less than a minute - maybe 15 to 30 seconds to install all of this... the C++ compiler, X11 libraries and a bunch of other stuff.

In contrast, it took a good 5 minutes just to install Visual Studio 2010 on my Windows 7 laptop (a 64-bit box with a better CPU than this desktop) and the library problems cost me a couple of hours of headbanging which was never resolved.

There are still serious driver problems in Linux, but the whole experience has improved so much since I started with a Red Hat install back in 1998.
Being able to install any number of programs and libraries rapidly, with a single command, is so much more relaxing than trying to hack things together in Windows. Try it!

Sunday, June 17, 2012

Terrorist postcards

(from BBC news)
It has been dubbed a "snooper's charter" by civil liberties groups but the Home Office says new powers are needed to keep pace with how criminals and terrorists are using new technology.
Postcards are new technology now? It hardly seems like the most secure and timely way to communicate, though, does it?

Do they really think they can catch terrorists and other criminals by reading people's postcards - or are they just a pack of nosy bastards?

Wednesday, May 30, 2012

Simple Heuristics that Make Windows Dumb

C:\U\O\Documents\c\...\src> .\patch.exe --help
Access is denied.

C:\U\O\Documents\c\...\src> ren patch.exe piss.exe

C:\U\O\Documents\c\...\src> .\piss.exe --help
Usage: .\piss.exe [OPTION]... [ORIGFILE [PATCHFILE]]

...Fuck you very much, Windows.

Tuesday, April 17, 2012

Gluap: not-really-useful-yet PushGP in Lua

After abandoning this for a while, I decided to update my pet project Gluap, a PushGP-based genetic programming library for Lua. While I was at it, I opened a Github account and uploaded the project to a new repo. If you like, try it out, figure out why it's not performing well and improve it! :)