March 2007 Archives
Thu Mar 29 14:49:41 CEST 2007
Redirecting ports
Suppose you have a service listening on port x, but unfortunately you can only connect to port y (probably because of some proxy or firewalls). You want to connect port y to port x so that a connection to port y gets redirected to port x. Right.
The proper way to do that is probably iptables, but it means you need to be root, you need to have uptables installed and working, you need to know how to use it.
Let's just do it with netcat then. We'll create a small script that connects to port x, then a netcat that listens to port y.
cat > redirThe 'while' is necessary because nc dies after each socket closing. Obviously you can also use this to connect to a different machine.
#! /bin/sh
nc localhost x
^D
chmod 755 redir
while true; do nc -l -p y -e ./redir ; done
Thu Mar 22 23:13:52 CET 2007
WTF is my O_STREAMING?!
It's 2007 and there is STILL no O_STREAMING in Linux?! What's the big idea? Am I doomed to have crappy behaviour as soon as I have a bittorrent running?
Sat Mar 17 16:08:42 CET 2007
Restaurant: Le Landreau
Landreau is a pasta factory in Tournefeuille near Toulouse. In 2006 they opened a restaurant which main theme is pasta.
The lunch menu will set you back 12.50EUR, for which you'll get starters and dish of the day, or dish of the day and dessert of the day. The evening or set meals are much more expensive and we've never really tried them. For 12.50, you get a reasonnably-sized portion that's generally rather nice (think meat in sauce and pasta and you won't be far from a standard dish of the day -- Yesterday's was seafood lasagna. (Homer voice) Hmmmm, lasagna.)
The room is nice, although usually a bit on the cool side. You get real napkins and tablecloth. It's all non-smoking.
Le Landreau: 25 avenue François Verdier, Tournefeuille. 05 34 52 01 88
Fri Mar 16 19:55:05 CET 2007
Of the importance of zoophilia
Apparently, inter-species hybridazation in animals is much more common that was thought so far.
Besides the funny implications of the story, there are more important ones. Among others, on of the creationnists' favourite argument is that mutations happen at a very slow rate, and are almost always negative. And they're right. Yet, it's the main argument so far in favour of evolution (mutation creates a vastly different individual (a new species), which then manages to strive through natural selection).
Now there is another way new species can be created.
Interestingly, a few decades ago biologists had a concept of races within species: species being the set of individual that can reproduce and create new full individual that presents the same properties (so the crossing of a horse and a donkey is not a new species because it's sterile), and races being a set of physical attributes genetically transmissible within a species (e.g. Chartreux cats' offspring is always gray and quiet; goldfish offspring is still goldfish; black African humans' offspring is always black; and so on). Later on, they started to back off off the concept of race as being too hard to define scientifically. Maybe in another few decades, even the difference between species will get blurred as it gets realised that genetic material is widely shared in many different ways.
Wed Mar 14 09:23:03 CET 2007
Restaurant: La table de belvédère.
Found the business card for a restaurant I went to with Olivier a couple of weeks ago: La table de belvédère.
That one's high up in a building overlooking the Garonne river, with many large windows. It is a very pretty place, despite the landscape being littered by many ugly buildings from the 60's.
The food errs on the fancy side, with the lunchtime meal at about 18EUR, and the dishes being very carefully presented.
Altogether, more of a special occasion restaurant than a day-to-day restaurant, but it's definitely worth a try if only for the view.
EDIT: forgot a pretty important detail: it's entirely non-smoking.
La table du belvédère: 11 Bd des Récollets,
8
Sun Mar 11 00:22:10 CET 2007
Salon de thé japonais
Right, I guess yesterday's post started a new category.
Today we went to an old favourite of ours: Okini, a tiny Japanese "salon de thé". Deep underground in a traditional Toulouse cellar, set up as a traditional Japanese tea salon, kick off your shoes and enjoy some nice tea or the dish of the day (at very affordable prices: 7 EUR for today's chicken special).
That one is completely non-smoking.
Okini: 19 rue des Tourneurs, 05 61 32 69 56
Sat Mar 10 00:18:57 CET 2007
Restaurant Le Djerba
Tonight we accidently went to the Djerba, a Tunisian restaurant. Nice place, nice staff, nice food, very reasonnably priced (52EUR for our 2 couscous, a bottle of wine, dessert and tea). To top it all off, the whole place was smoke-free the entire night. Only downside is, it's not actually non-smoking: we were just lucky.
EDIT: The interesting thing about the smoke is that there were smokers, but they went outside. Strange things are happening in France, let me tell you.
Le Djerba: Place Esquirol Impasse St Géraud, 05 61 21 80 12
Thu Mar 8 20:54:44 CET 2007
More on PHPBB anti-spam measures.
Time for a little update on spam posts on PHPBB. As I have explained three months ago, we had a spam problem on our PHPBB forum. I installed eXtreme anti-spam, and gave my opinion on CAPTCHA.
So, here we are three months later and the jury is out: we had two cases of spam in three months, and that because we accidently left two fora open for anyone to post. I.e. 0 case of spam in 3 months as opposed to several a day. eXtremem anti-spam works, and works very well.
You'll need to read my previous post to understand the rest of this.
Gavin posted a comment on improving CAPTCHA:
We have been chatting about this at work and one of the guys came up with the idea of a moving set of letters to fool the OCR algos. Would require some sort of animated gif or flash movie.This may seem like a good idea to me, but I think it's missing an important point.
To me, a good anti-spam system is one that is installed on every PHPBB, shipped with the standard distribution (like the simple CAPTCHA system is at the moment). I think it's ok to require some customisation from the user, as would be the case with a built-in eXtreme: you'd have to put a few pictures and questions in. This is fundamental, otherwise (as pointed out by CAPTCHA-fans) spammers will just teach the built-in pictures and questions to their spamming engines and the system will break.
This is why I think any CAPTCHA-based system is doomed. As soon as it's shipped with the standard PHPBB distribution, you can trust the spammers to start to try and break whatever system will be built in.
With eXtreme, no two sites would have the same pictures and questions. Unless they manage impressive research into AI, it just cannot be broken (and if they manage to break it, me thinketh the spammers would get better pay at any research lab :) ). With CAPTCHA, at best you'll end up with a customisable set of blurring algorithms. Gavin's colleague's idea is really just another blur.
And that's the problem: it's trivial to read a GIF frame by frame, and then you fall back in the usual OCR problem, which we've established can be made to be better than humans. A Flash movie might be vaguely harder to crack, but at the end of the day if you browser can display it, so can the spammer, and if your eye can recognise letters in it, so can a trained neural network (and that's not highly advanced AI).
Hence, I remain on my opinion that CAPTCHA cannot work, and that spam must be solved by some easily customisable challenge system.
Thu Mar 8 18:51:11 CET 2007
Democracies at war
I just read a very interesting article commenting Kant's statment that "democracies do not make war on one another." This argument had been used after the fall of USSR by one Fukuyama to predict the end of history.
Executive summary: It's bollocks. It's hard to define what democracy is, then you need to define what war is, and by the end you don't have enough samples to deduct anything.
My point of view: Indeed. Arguably the USA is a democracy yet they're attacking everyone they don't like (irrespective of those countries' government system). And anyway, there is no actual democracy on earth. At best, elective dictatorships.
Wed Mar 7 15:46:50 CET 2007
The Ultimate Language
I recently started using dc(1), which is a reverse polish notation desk calculator with stacks every which way. It's not only fun, it's also very powerful (if you forget you can do basically the same in any other reasonnable language).
And anyway: RPN is essentially the same as PN, which is essentially the basis of the other other Ultimate Language (the Other Ultimate Language is Perl of course): Lisp. It should be pretty easy to convert any Lisp program to a dc program. So think twice before criticizing dc. Arrr.