Installing Libfreenect from Homebrew without the fuss

I managed to get my hands on a Kinect and I’m now playing with it. While in Ubuntu a simple 3 line command sequence allowed me to play with OpenKinect without problems,

$ sudo add-apt-repository ppa:arne-alamut/freenect
$ sudo apt-get update
$ sudo apt-get install freenect

in the Mac (10.5.8), things got rough. The problem? Well, the problem was compiling cmake… It failed constantly.

The solution for those that couldn’t install openkinect in Leopard (might work also for other versions)?

Download cmake directly from their website

Install Homebrew (it’s better than Macports and Fink)

Download the Formulas

cd /usr/local/Library/Formula
curl --insecure -O \
  "https://github.com/OpenKinect/libfreenect/raw/master/platform/osx/homebrew/libfreenect.rb"
curl --insecure -O \
  "https://github.com/OpenKinect/libfreenect/raw/master/platform/osx/homebrew/libusb-freenect.rb"

And now it is a bit different from what the tutorial says. Instead of running the brew install command use brew edit

$ brew edit libfreenect

This will open your favorite editor and then comment the line that has the cmake dependency (add # at the beginning of the line)

#  depends_on 'cmake'

Now save and install with

$ brew install libfreenect

This was the way I solved it… may not work for all of you trying to use the Microsoft Kinect with OpenKinect, but at least might help some to bypass the problems.

2 Things worrying me right now!

  1. Companies doing traffic shaping in HTTP only access. This is happening in France according to the owners of megaupload. Every day we’re witnessing gross sale companies trying to enter the commodity market. This is wrong and brings to an idea that I heard somewhere. If big infrastructure companies are trying to get out of the gross market, maybe there’s an opportunity for local communities to own infrastructure. Real physical infrastructure and then charge big companies for their pass rights through these infrastructures. Maybe there’s something here that I don’t know, but what we’re seeing now is that on the pretext of profit we’re loosing neutrality and independence.
  2. Amazon dictating the prices of their Android App Store? This is another proof that App store are the stupidest thing and that in the end they will hurt developers more that they will make them rich. Programmers / developers role and importance in the software production chain is now being relegated to second places and if they can’t even define the price of their own work, they’ll be doomed in the long run. And as this works in feedback loops, this will bite the App stores back, but until then… guess who’s making NO money?

Producer-Consumer: Google’s File System

Appending data and reading it efficiently is the key to achieving good performance. Many clients may append data to a single file concurrently and its important to achieve this at low synchronization cost. Google employs producer-consumer algorithm to design such system http://en.wikipedia.org/wiki/Producer-consumer_problem .via Web Space: A simplistic view of Google’s File System.

This semester I am teaching Concurrent and Parallel programing at ISCTE-IUL. One of the challenges I have is to get real application examples that don’t look “fake” or being invented just for the purpose of that class. Students need to understand the importance of those concepts as they are then applied in solving real life problems. One of such problems is the producer-consumer coordination problem that google has to solve in order to implement its file system. There’s also a paper dedicated to the Google File System by Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung

Lithium battery charge recovery strategy for MacBook Pro

Lithium batteries don’t really like to be full discharged and they don’t really like to be used fully charged. Their sweet spot lays somewhere in the middle. To keep the battery of my Macbook Pro healthy I sometimes adopt a regular discharge / charge cycle, (but we should completely discharged it).

I use the following bash script, that I then put in into a cronjob running every 10 min and this alerts me every time the battery charge is lower than 40% or higher than 80%! Lithium batteries don’t have memory, so If you’re like me and have the Laptop used mainly as a Desktop, instead of having it always plugged in, use this strategy some times during the month. It will revitalize the maximum charge of your battery. Then, once per month or every 30/40 cycles you should do a calibration of the sensors by letting it fully discharge followed by a full charge.

1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash
low="Battery charge is to low, please charge it"
high="Battery charge is to high, please unplug it"
 
bat=`pmset -g ps | grep -o -e [0-9]*% | sed -e 's/%//g'`
 
if [ $bat -lt 40 ]; then
	say $low &
elif [ $bat -gt 80 ]; then
	say $high &
fi

On the other hand if you’re going to use the laptop always plugged to the power outlet, you might consider taking the battery off. To do this let it go to 40% before removing the battery. This will help the longevity of the charge and the health of the battery if you latter use it again.

My next computer will be a ThinkPad

This could be a rambling about Apple computers, the search for new CFO, or the just opened App Store for the Mac. Honestly? I don’t really care anymore. The business model of it might be great, but as I’m not a stock holder I don’t care either.

My next computer will be a Tank, something built with Chobam armour that I can lug around, throw away, an still be confident that it will work. And I want something that can run linux as my primary desktop full time (not part time as I’m doing now).

After much thought only one name came to mind: ThinkPad

Are We Ready for The Next Net?

The moment the “net neutrality” debate began was the moment the net neutrality debate was lost.via Shareable: The Next Net.

And from FOSS to the Internet itself. Is it time to invent the new internet? An internet that is really decentralized? As more and more commercial and political interests take their share of the internet, more persons will need their own private decentralized network. Building an infrastructure from scratch might be impossible, and probably using some sort of P2P encrypted layer on top of the existing infrastructure can be a way to achieve this free for all internet again.

Outra Ensitel: Apple Support Company Sues Customer For Complaint

An Apple authorized Service Provider called Stemgraph is suing a customer who complained online about poor service from them. The customer Dimitrios Papadimitriadis took his iMac to them because he was seeing gray spots on his LED panel. (…)via Apple Support Company Sues Customer For Complaint – Slashdot.

Afinal não é só a Ensitel que tem problemas com os comentários dos clientes… os gregos são tramados. Esperemos que isto acabe como no caso Português. Em todo o caso parece que processar os clientes insatisfeitos é a nova moda para combater a crise. O cliente entra e sem saber já está a pagar indemnizações! É bela esta sociedade.