June 21, 2008 10:09 PM :: Greece 

June 21, 2008 10:09 PM :: Greece 
June 21, 2008 08:50 AM :: Greece 
My server, mindstab.net, runs Hardened Gentoo. I like it. It provides nice features from grsecurity and PaX like memory randomization, non executable writable memory, etc. However, it really doesn't get along so well with Lisp. Lisp in general seems to like executable and writable memory, and SBCL at least also doesn't like randomized memory. So it took a bit of work to get Lisp onto my server.
Approach 1: Failure
I spent a bunch of time trying to patch the build process in portage to coax SBCL into building. First, of course, I used gcc-config to disable the hardened gcc profile, and just use the vanilla one. Then I created a suid root shell script to call "paxctl -m -p -r -e $1" so that the sandboxed build process could disable PaX features on the SBCL binaries. I added the command to the ebuild, and created a patch to insert the command into SBCL's build process. The process goes like this, portage download's the SBCL source and a pre-compiled SBCL binary. The patched ebuild then calls my suid root script which disables PaX on the pre-compiled binary so it actually runs (as opposed to crashing under PaX) and then a new SBCL binary is built from the source and the pre-compiled binary builds a core file from the SBCL lisp source. The patched SBCL make.sh then again calls the suid root script on the new binary, so it will run. Then it should load the new core and recompile the system for itself. Sadly, while it runs at least, it chokes on the core file and hangs while using 100% cpu. I couldn't get past this so I eventually gave up. If anyone has any suggestions that'd be great.
Approach 2: Success
So the actually solution was as follows: Download the most recent precompiled SBCL binary from the website (1.0.15 for x86), run "paxctl -p -e -m -r -x -s " on src/runtime/sbcl (to cover all the bases). Then run "sh install.sh" to install SBCL to /usr/local. That's it.
The problem with this is you can't emerge lisp packages in portage, you have to install them by hand (unless maybe you want to fake inject the package into the portage database).
I downloaded a copy of slime, untarred it and popped it in my .emacs and I had a full lisp environment ready to go, and on my hardened machine no less. Not so bad.
June 21, 2008 07:07 AM :: British Columbia, Canada 
Bus 006 Device 007: ID 08ff:1600 AuthenTec, Inc.
# layman -a wschlich-testing
# echo =app-misc/fprint_demo-0.4 >> /etc/portage/package.keywords/general
# echo =media-libs/libfprint-0.0.6 >> /etc/portage/package.keywords/general
# echo =sys-auth/pam_fprint-0.2 >> /etc/portage/package.keywords/general
# emerge -av fprint_demo pam_fprint
$ fprint_demo
auth sufficient pam_fprint.so
auth sufficient pam_unix.so try_first_pass likeauth nullok
June 20, 2008 08:18 PM :: Italy 
revolver ~ # lspci
00:00.0 Host bridge: Intel Corporation Mobile Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile Integrated Graphics Controller (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation Mobile LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation Mobile IDE Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation Mobile SATA AHCI Controller (rev 03)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
02:00.0 Network controller: Intel Corporation Unknown device 4229 (rev 61)
05:00.0 SATA controller: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)What I have not tried yet:
I needed to add "options snd-hda-intel model=lenovo" to /etc/modules.d/alsa and update modules.
June 20, 2008 05:38 PM :: Italy 
June 20, 2008 02:49 PM :: Germany 

June 20, 2008 09:55 AM :: Germany 
I’m releasing part of the code developed during my PhD. Those are tools useful in the field of convex processing, and more precisely to solve a problem called convex feasbility problem.
This is based on Qt4, and released mostly under the GPL (with an added restriction : you must cite my work if you use this). Oh.. and there are unit tests, examples, and documentation, too.
caution : rest of the post is for those mathematically oriented people, and no more related to free software.
The convex feasbility problem is to find a point in the intersection of closed convex sets inside a Hilbert space. Believe it or not, quite some real-life problems can be formulated as such, for examples some image reconstruction problems in medical imaging, or also in the field of signal processing.
There are a lot of algorithms to solve this, you can find more information about those in the bibliography of my papers, or those from my PhD advisor M. Combettes.
This code provides the necessary tools to play and test those algorithms. Besides all elementary methods on Euclidian/Hilbert Space, it provides a way to compute projections on different interesting convex sets. There are also the needed tools to experiment with tomography, which is one of the main application in my PhD. You can compute the radon transform of an image and use this as data in convex feasibility formulation.
This is of course mostly of interest for those working in convex optimization and/or tomography. I want to highligh the fact that sharing such kind of code is very rare in this community. I would have gained a lot of time at the beginning of my thesis if other people had provided such code.
June 19, 2008 04:45 PM :: Germany 
# vim: set sw=4 sts=4 et :
# Copyright: 2008 Gentoo Foundation
# Author(s): Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
# License: GPL-2
#
# Immortal lh!
#
June 19, 2008 07:44 AM :: Uttar Pradesh, India 
What's the Common Lisp version of Perlmonks or Ruby-forum? I have yet to find it.
comp.lang.lisp is largely crap. 50% of the traffic on that list is spam about shoes and fake watches. The other half is equally split between:
The Common Lisp community (if you can call it that) is a bunch of really smart guys, but they all live isolated in hermit shacks up in the mountains and they spend their time doing magic tricks with Lisp that few people ever see, and if you wander too close they throw rocks at you.
What's the Common Lisp equivalent of perldoc or rdoc? We have the Hyperspec. It's an impressive document, but it's a bunch of painful HTML that looks like it was created in the early 90's, probably because it was. It reads like a dusty, dry, technical document probably because it is. What it's not, is friendly or easily readable.
Perl has CPAN, Ruby has rubygems, what does Lisp have? Either a hand-rolled system definition script, or if you're lucky an ASDF install file. ASDF is the semi-standard Lisp way of installing libraries, except that it doesn't quite work in Windows, it doesn't check dependencies or handle different versions of a package very well, and it doesn't work the same on all Lisp implementations. Many people in the so-called community think it's not very good.
The fellow running Lispcast makes another good point. Where can you download Lisp? It's not obvious.
You could say "OK Brian, good idea, now get to work!" The problem is that even if I had the time or willpower, I'm not the smartest guy in the world. I honestly don't think I could design and run and maintain a CPAN. And even if I did, would anyone use it? But I do know that there ARE plenty of smart, enthusiastic people using Lisp. Yet high-quality friendly code is largely not being produced.
Peter Christensen wrote about "langauge snobs" and the importance of community. One point made is that some really ugly, horrific languages have been extremely successful simply because they've been accessible and fun. An example given is the scripting language in Second Life, which has over 2.5 billion lines of code written in by tens of thousands of amateurs and has accurately modeled a realistic 3D environment with thousands of users at any given time. All in an ugly language some guy invented AND implemented in one week. The developers admit that the language is total crap, but it doesn't matter. 1) It has very good and accessible documentation, 2) it has a very newbie-friendly community, and 3) and it's easy to pick up, throw together some code and get immediate results. Three things Common Lisp lacks.
This is something I've said myself many times: an active, supportive, enthusiastic community is essential for the health of any programming language. Common Lisp simply doesn't have one and it's a shame.
I still secretly hope that Clojure or NewLisp or Arc turn out to be a huge success. They are the kinds of things Lisp needs today.
June 18, 2008 07:47 AM :: Pennsylvania, USA 
They asked for it - they got it… a nice DDoS
(spreadfirefox.com and mozilla.com were unreachable for a couple of minutes after 17:00 UTC).
Anyway… go ahead and download it, it’s a good piece of software. I tried out beta3 and the RCs, and I like the new version so much, that I’m now using Firefox as my default browser again (after more than two years with Konqueror as my default browser).
Nice birthday present by the way, Mozilla! Thanks! ![]()
June 17, 2008 06:17 PM :: Shanghai, China 
The best browser ever, landed on earth today but while big daddy was busy asking everyone to do their homework to get ready for the party, he failed to do his own.
First and foremost, as all of us came know a little later, the download day was not just 17th June, 2008; it was 17th June 2008 at 10:00 am PDT. No one ever cared to inform that important piece of shit. All big daddy wanted was a 1 million downloads in 24 hours, he didn't care how frustrated you would be to find out that you don't see your download at 12 am of June 17th, local time. And no Sir, I am not asking you to take care of all the time zones here, a simple countdown timer on the website would have been enough. Moral of the story: Big Daddy, you came up with something really impressive, you made us do our homework, but you failed to do your own!
Now, everyone knows that the digg effect is not just limited to sites on Digg's front page. Anyone can feel it; especially when you want 1 million downloaders to come to your site when you release the most anticipated browser ever, what on earth were you thinking ?! It's never going to be a breeze. Everyone knows that! Again, you failed to do your homework! Moral of the story: You promised us all the good things on June 17th, and all the good things you did give, but; the overall experience was somewhat dissapointing :(
Ok, now that my rant is over, I am off to start enjoying my brand new browser :)
June 17, 2008 06:04 PM :: India 
I purchased my MacBook back in November of 2007, shortly after the Santa Rosa chipset update. I'd use Mac OS X a little previously, mostly in the form of trying out OSX86 on my old laptop. After using it for several months as my primary mobile platform, I decided it was time for something different.
OS X is nice and all. User-friendly, intuitive, and works fantastic with the hardware Apple ships. I still feel it's lacking in some areas where Linux excels, such as configurability and the space for customization. Not to mention that there's essentially no decent games out for OS X. I can install Linux and throw on a native version of UT2004 and play away now.
Installation wasn't horribly difficult, but Mac OS X was needed at least initially, and I didn't realize this. Gentoo now boots without an issue on the MacBook. All that I need to finish doing is installing the programs I need and setting up the WiFi.
I'm hoping that I have all the hardware working correctly in the next week or so, and that includes the web cam and touchpad. My only other concern is battery life. It'd be fantastic if I get the same amount or more battery out of the machine with Linux.
June 17, 2008 04:29 PM :: Uttar Pradesh, India 
Friday a guy on the phone said he'd call me back Monday or Tuesday to give me an update on when / whether they're ever going to send me my monitor. Monday came and went with no call. Not really surprising.
I filed a complaint with the BBB today. We'll see how that goes. At the BBB Westinghouse has around 150 complaints in the past 36 months, but 133 of them were supposedly solved "satisfactorily" and Westinghouse somehow still has the highest possible rating at the BBB. I've read some things about the BBB not being an entirely neutral entity itself, but who knows. I'll start filing complaints with other consumer groups if I need to.
A good handful of people have left comments here at my blog saying they aren't going to buy anything from Westinghouse themselves, which is great to hear. I may mention my blog to Westinghouse next time I call them, if there is a next time. Is not sending me the monitor I paid for really worth losing a bunch of customers?
The sad thing is that I really do need a monitor with component and composite inputs, and they are somewhat rare (the local store had none except Westingcrap brand). However I have found a Gateway model that has them, so maybe that'll work out. I'd gladly take a refund from Westinghouse rather than a monitor at this point.
June 17, 2008 07:56 AM :: Pennsylvania, USA 
I've spent almost the whole last week testing different mail clients because I somewhat wasn't happy with mutt (especially the address book functionality sucks). Also, now that there are new methods in categorizing data, via tags/labels for example, the possibilities of processing my mails effectively with mutt seemed limited.
Until now I've used my INBOX as a staging area to organize tasks which are associated around the projects I am involved. I simply kept mails which required action on my behalf in my INBOX. Be it that I just have to reply or that I have to look at something or fix a bug, you get the picture. Since I get lots of emails (~1000 on an average week) things got quite messy in times and I sometimes forgot about some of those mails/tasks. What I ideally wanted to have is a way to label messages and then search my INBOX for mails which have a certain label assigned, or limit the number of mails I see by certain key words. The IMAP protocol supports user defined labels which would be a starting point, but mutt doesn't support them
(it should be noted here that mutt wasn't designed to work with IMAP in the first place).
I first took a look at sup. Sup is written in Ruby and promises a completely new approach to mail. Most of it's features are inspired by gmail and mutt. It supports labeling of messages, vim style key bindings and some really nifty quoting features like auto folding in mailing list threads. It's usage is quite intuitive when you come from mutt and I've used it exclusively over the last week. But, all those nice shiny features aside, sup has some major drawbacks. To allow labeling of messages it manages it's own index where it keeps all the related meta data. The problem with that, is that it doesn't update the mail status on the server side. Means, mails that appear as read in sup are still unread in the INBOX on the IMAP server. You also cannot move mails between IMAP folders, sup provides it's own folder mechanism though. Also, if you access your INBOX from another mail client and change things, like moving mails to folders etc. sup won't start anymore because you have to sync it's local index again with the IMAP account.
The other client I've tried was cone which is part of the courier-mta project. This mail client is designed from the ground to deal with IMAP accounts (it supports POP3 as well), therefore it allows labeling of messages. It also allows you to store it's configuration settings on the IMAP server itself and supports IMAP address books. That all would fit perfectly if it's user interface wouldn't be that crappy (IMO at least). Well, I have to say that I am quite used to have vim key bindings everywhere possible, browser, shell, editor (hah!) and preferably in my mail client as well. Also the way how mailinglist threads are visually presented in the INBOX listing is not satisfactory once you're used to the nice thread view mutt offers.
So it seems I won't get 100% lucky anytime soon. I didn't try alpine, because form what I've seen on some screenshots it doesn't provide a nice thread view. And before someone now says “gmail”, I don't like to have my private mail on a machine I have no control over whatsoever
.
At least I was able to solve my todo crisis. Tante mentioned remember the milk lately on friendfeed as being a nice tool to manage ones todo lists. While I have heard of it multiple times, I haven't tried it until two days ago. I have to say it's quite nice. I love the fact that you can navigate your online todo list with the keyboard only
and especially that you can mail new tasks, which then appear in your task INBOX (hah! another one). Though I would prefer not to have to process new tasks which I've send by mail in my task INBOX again.
So I think for now I'll stay with mutt, although it's IMAP support is somewhat limited.
What mail clients to you use and why? Do you have any suggestions? Did I miss one (ncurses/command line clients only)? Is there a nifty tool to integrated IMAP address books in mutt (I've searched but with no luck)?
UPDATE: Ok, it seems I was a little quick on this one, because cone has a nice threading view. You can enable it by using $ + T. I'll use cone now for the upcoming week and see if I can get used to it's different key bindings (I constantly hit ”j” and ”k” to navigate around but it doesn't work
). Anyway, the better IMAP support will probably be worth it.
June 15, 2008 08:49 PM :: Germany 
So we now all have broadband connections and everything is great, right? Well, not quite. Some providers have better services than others. My connection seems rather fragile at times and tends to die about once in three-four days. When that happens, no amount of resetting the equipment helps to get it working again. It’s an upstream issue that I have no control over.
But there is another problem. Once the cable modem starts working again, the router (which receives an IP address from my provider, and serves LAN and wifi locally) doesn’t seem to know this and doesn’t automatically re-establish a connection. Or I’m not really sure what it does, it’s a black box and there is a web interface to it, where there’s a button to press to do this, which sometimes works. But what really is happening, who knows. There seems to be a weird timing problem to the whole thing, where if I kill the power for both the modem and the router and they both come back at the same time, it generally works. However, if the modem is taking longer to negotiate a link, the router will be disconnected. And apparently doesn’t try to reconnect on its own, so I’ve been stuck rebooting the two a few times until the timing is right. Resetting them separately for some reason doesn’t seem to work.
So what can be done about it? Well, the router does have that stupid web interface, so it’s possible to make those clicks automatically if we’re disconnected. Python’s urllib makes this very easy to do. First we login with router_login, which submits a form with POST. Then we check the state of the internet connection with check_router_state, which just reads out the relevant information from the page. And if it’s disconnected we run renew_router_connection to submit another form (ie. simulating the button click on the web page).
More than just testing if the router has a connection to the provider, broadband connections sometimes have connectivity problems. Even if you can get a connection, the provider sometimes has problems on his network, meaning your connection doesn’t work anyway.
So I came up with a test to see how well the connection is working. It’s an optimistic test, so that first we assume we have a fully functional connection and ping yahoo.com. It doesn’t matter what host we use here, just some internet host that is known to be reliable and “always” available. For this to work these conditions must be met:
dns1 in the code) to look up the host “yahoo.com”.So first we ping yahoo.com. If that fails, it could be because dns lookup failed. So we ping the provider’s nameserver. If that fails, the provider’s internal routing is probably screwed up, so we ping the gateway. And if that fails too then we know that although we have an IP address, the connection is dead (or very unstable).
#!/usr/bin/env python # # Author: Martin Matusiak <numerodix@gmail.com> # Licensed under the GNU Public License, version 3. import os import re import sys import time import urllib ip_factory = "192.168.2.1" password = "" inet_host = "yahoo.com" def write(s): sys.stdout.write(s) sys.stdout.flush() def grep(needle, haystack): if needle and haystack: m = re.search(needle, haystack) if m and m.groups(): return m.groups()[0] def invoke(cmd): (sin, sout) = os.popen2(cmd) return sout.read() def ping(host): cmd = 'ping -c1 -n -w2 ' + host + ' 2>&1' res = invoke(cmd) v = grep("rtt min/avg/max/mdev = [0-9.]+/([0-9.]+)/[0-9.]+/[0-9.]+ ms", res) if v: return int(float(v)) def find_lan_gateway(): cmd = "route -n" res = invoke(cmd) v = grep("[0-9.]+\\s+([0-9.]+)\\s+[0-9.]+\\s+UG", res) if v: return v def load_url(url, params=None): data = None if params: data = urllib.urlencode(params) f = urllib.urlopen(url, data) return f.read() def router_login(): form = {"page": "login", "pws": password} load_url("http://%s/login.htm" % ip, form) def check_router_state(): state = { "conn": None, "gateway": None, "dns1": None } router_login() s = load_url("http://%s/js/js_status_main.htm" % ip) if s: v = grep("var bWanConnected=([0-9]);", s) if v == "1": state['conn'] = True elif v == "0": state['conn'] = False if state['conn']: g = grep('writit\\("([0-9.]+)","GATEWAY"\\);', s) if g and g != "0.0.0.0": state['gateway'] = g g = grep('writit\\("([0-9.]+)","DNSIP"\\);', s) if g and g != "0.0.0.0": state['dns1'] = g return state def renew_router_connection(): router_login() form = {"page": "status_main", "button": "dhcprenew"} s = load_url("http://%s/status_main.htm" % ip, form) return s ip = find_lan_gateway() if not ip: ip = ip_factory write("LAN gateway detection failed, using factory ip %s for router\\n" % ip_factory) else: write("Router ip: %s\\n" % ip) while True: try: router = check_router_state() t = time.strftime("%H:%M:%S", time.localtime()) if router['conn']: hosts = [(inet_host, inet_host), ("dns1", router['dns1']), ("gateway", router['gateway'])] connectivity = "" write("[%s] Connected " % t) for (name, host) in hosts: delay = ping(host) if delay: write("(%s: %s) " % (name, delay)) break else: write("(%s !!) " % name) write("\\n") else: write("[%s] NOT CONNECTED, attempting reconnect\\n" % t) renew_router_connection() except Exception, e: cls = grep("<type 'exceptions.(.*)'", str(e.__class__)) write("%s: %s\\n" % (cls, e)) time.sleep(3)
Download this code: renewip.py
June 15, 2008 07:20 PM :: Utrecht, Netherlands 
Finally got Sender Policy Framework support added to my Postfix install like I said I would. HowtoForge was a big help, but I had to use g-cpan to generate Mail::SPF ebuilds. Just one of those things I was surprised wasn’t already in Gentoo.
Next up: testing that SpamAssassin supports SPF and penalizes failures. I think I have had everything in place to do that properly for a while, now, but I never actually checked…
June 15, 2008 04:45 PM :: Wisconsin, USA 
As some of you might know, I had to finish my Ph.D. and it took me a lot more time than previously planned. I’m happy to tell you that it is now finished. I’m officially a doctor in the field of applied mathematics, and I have more time to dedicate to free software.
One of my first goals is to release the sleeping code for yzis. There sure are a lot of issues with this code, and the KDE kpart is still unfinished, but I think we can release basic, working, tested applications. This would mean the curses-based nyzis and the qt4-based qyzis, both for Linux, Mac OS X, windows, and maybe some other platforms like the *bsd.
We created a project on freehackers redmine project manager to handle this new development. We expect to release 1.0-alpha1 next week-end (june 22th), and keep on testing/fixing bugs until 1.0. Then we should focus on the real fun stuff : kpart and other embeddings.
Oh, and, meanwhile, we moved the code from subversion to mercurial.
redmine project for bug reports
view yzis source under mercurial (you can also clone the repository from this url)
June 15, 2008 02:56 PM :: Germany 
jojo@host:~/svn/test$ svn add git-talk.pdf
A (bin) git-talk.pdf
jojo@host:~/svn/test$ svn commit -m ‘First file’
Adding (bin) git-talk.pdf
Transmitting file data .
Committed revision 1.
jojo@host:~/svn/test$ du -sh ../test-repo
6.5M ../test-repo
jojo@host:~/svn/test$ cp git-talk.pdf git-talk2.pdf
jojo@host:~/svn/test$ svn add git-talk2.pdf
A (bin) git-talk2.pdf
jojo@host:~/svn/test$ svn commit -m ‘Second file’
Adding (bin) git-talk2.pdf
Transmitting file data .
Committed revision 2.
jojo@host:~/svn/test$ du -sh ../test-repo
13M ../test-repo
I rest my case. Now some of you (those who know git and know why they use it) might say “so what, that is no secret” while others may flip over backwards. The second group of people is the one I wanted to reach ;)
June 15, 2008 10:02 AM :: Germany 
Following in the footsteps of Sean Potter I took a photo of my desk.
My desk itself sucks, but I'm moving again in a year or so and didn't want to invest in a good one yet. I'm missing one of my big monitors (thanks Westinghouse) and in the meantime I have to settle for that old Apple display as my second monitor.
My mousepad is an Icemat; can you believe the green ones were cheaper than all the other colors? That shade of green is clearly the best. And my keyboard is a tasty Saitek Eclipse II, which is one of the most comfy keyboards I've found to type on (and it glows in the dark). Nothing too exciting beyond that.
June 15, 2008 02:32 AM :: Pennsylvania, USA 
People are stupid. We're blinded by our own prejudices and biases and preconceptions. It's kind of understandable because no one has enough time to really collect enough information to have an informed opinion about everything. So we end up extrapolating or relying on expert opinion or turning to our gut feeling. Inevitably we end up being wrong some of the time.
This leads to two problems. One is that being a person myself, I'm also stupid, meaning there are almost certainly some beliefs I currently hold that are wrong. The second is that from my perspective, I appear to be right about everything. This is trivially true of everyone; as soon as a person decides they're wrong, they change their mind right away and become right again. The problem then is how can I tell when I'm wrong and when I'm right? I quick objective glimpse at reality suffices most of the time, but sometimes we're still tricked.
Those two things in combination are a problem for everyone. I think the best anyone can do is to realize that this is the case, be open to being wrong, and to take some efforts to rectify it. At least minimize the damage, try to be as right about as many things as you can.
This is why e.g. I started learning Emacs even though I love Vim, and why I stick with it even though it's unpleasant at first. A lot of smart people say good thing about Emacs. My opinion of it is much different now than before I'd used it a lot. I think many things people say about it are wrong, but many are also right. There is some good stuff there.
For the same reason, I've decided to learn Python. I've been wanting to for quite a while anyways. In spite of the pain I've had trying to use it in the past, and my generally low opinion of the language, there may just be something worthwhile there. A lot of smart people say good things about it, and a lot of good programs are written in it. The community is large and active and enthusiastic.
My first shot was to try some of the stuff at Python Challenge. It's an interesting site full of puzzles that you need a programming language to solve; many of them are geared toward Python or toward libraries available in Python, but you can use any good language for many of them. I got through 17 of the puzzles last night, but I did look at "hints" on the forum for about half of those. A lot of them require sort of specialized knowledge apart from knowledge of Python, on a wide variety of subjects, so it's pretty fun.
My first pet peeve (of many to come, I'm sure): why doesn't python --help or python --version work? Instead you have to use python -h and python -V (capital V). This is non-standard. It worries me when people do things like this differently. But we'll see.
June 14, 2008 07:14 PM :: Pennsylvania, USA 
Device Drivers --->
Input device support --->
<*> Event interface
#echo 'INPUT_DEVICES="evdev keyboard mouse synaptics"' >> /etc/make.conf
#emerge -av1 xorg-server
Section "ServerLayout"[...]InputDevice "Mouse0" "AlwaysCore"InputDevice "TouchPad" "SendCoreEvents"EndSectionSection "InputDevice"Identifier "Mouse0"Driver "mouse"Option "Protocol" "auto"Option "ZAxisMapping" "4 5 6 7"EndSectionSection "InputDevice"Driver "synaptics"Identifier "TouchPad"Option "SendCoreEvents"Option "Protocol" "auto-dev"Option "SHMConfig" "on"EndSection
June 14, 2008 02:13 PM :: Italy 
Stimulated by the success of my previous foray into the regex arcana of Postgres, I finally took on a problem that has been bothering me for a long time. When I merge persons, shortlinks to the old person_fk may still be hanging around in sources and events. It’s not a matter of great concern, because the link from the old person to the new person will always remain in the database. But I still like to have the links pointing to the “right” person. To clean up in this, I decided to write a script that hunts through the entire database and updates shortlinks to merged persons. I used Perl for this one, because it’s the kind of problem that lends itself well to Perl’s inbuilt search-and-replace syntax (and because I really need some practice with the Perl db interface):
#! /usr/bin/perl
# update_shortlinks.pl
# finds notes and sources with shortlinks to merged persons
# and replaces old_person with new_person
# (C) leifbk 2008
use strict;
use DBI;
my $database = "DBI:Pg:dbname=pgslekt";
my $dbh = DBI->connect("$database") or die $DBI::errstr;
my $get_merged = $dbh->prepare("SELECT old_person_fk, new_person_fk FROM merged");
my $get_source = $dbh->prepare("SELECT source_id, source_text FROM sources WHERE source_text SIMILAR TO ?");
my $put_source = $dbh->prepare("UPDATE sources SET source_text = ? WHERE source_id = ?");
my $get_event = $dbh->prepare("SELECT event_id, event_note FROM events WHERE event_note SIMILAR TO ?");
my $put_event = $dbh->prepare("UPDATE events SET event_note = ? WHERE event_id = ?");
$get_merged->execute();
while (my ($old_person, $new_person) = $get_merged->fetchrow_array()) {
my $regex = "%\\[p=" . $old_person . "[\\|\\]]%”;
$get_source->execute($regex);
while (my ($source_id, $source_text) = $get_source->fetchrow_array()) {
print “Source $source_id, $source_text ($old_person -> $new_person)\n”;
$source_text =~ s/(\[p=)$old_person([\|\]])/$1$new_person$2/g;
$put_source->execute($source_text, $source_id);
}
$get_event->execute($regex);
while (my ($event_id, $event_text) = $get_event->fetchrow_array()) {
print “Event $event_id, $event_text ($old_person -> $new_person)\n”;
$event_text =~ s/(\[p=)$old_person([\|\]])/$1$new_person$2/g;
$put_event->execute($event_text, $event_id);
}
}
$get_merged->finish;
$dbh->disconnect;
Don’t forget to backup your database before you start to play around with scripts of this kind.
June 14, 2008 01:22 PM :: Norway 
I intend to use this blog to give insights about my free software development stuff, which is mainly related to Qt/KDE, gentoo, and the linux kernel.
i’ve been puting off a lot of things lately. at the top of my list is to give some just attention to this little web space of mine. its not because i don’t have time anymore. its just that, i felt the need to explore some de-stressing activities other than writing my thoughts and rants down. i always found writing rather emotionally helpful, but during those carefree college days, i rarely
did anything to the point of exhaustion.
but im bringing my hiatus onto a peaceful end. good day! gentoo powerpc land!
June 14, 2008 03:37 AM :: Zamboanga, Philippines 
python -m SimpleHTTPServer which gives you exactly what it says, a simple HTTP server with the current dir as webserver root. No fancy-shmancy config necessary.June 13, 2008 09:24 PM :: Germany 
June 13, 2008 03:16 PM :: Greece 
June 12, 2008 05:09 PM :: Utah, USA 
Nowadays it seems that superkaramba works well, in the past it was heavy and buggy and I used to have conky. There are no particular reasons that made me switch to superkaramba , other than moving from Gnome to Kde.
My superkaramba monitor is based on the dual cpu monitor by Loacoon, I changed it a little to show some useful stuff , some of them gentoo specific ( last sync, last emerges, currently emerging….. genlop is a dependency).
Here’s the code, on my system superkaramba themes are in ~/.kde3.5/share/apps/superkaramba/themes/
June 12, 2008 03:21 PM :: Italy 
I finally took the plunge and had a car stereo installed in my 1998 Chevy Prizm. It's a cheap Sony model, but it has a detachable faceplate and front auxiliary input. The auxiliary input is what I was after, however. Unlike my old car, a Dodge Stratus, the Prizm doesn't have a tape deck or CD player. I was forced to play my music over an FM transmitter that ate two AAA batteries every two-to-three days. Modern technology, eh?
I eventually broke the transmitter and started listening to the radio, which gets repetitive. Amanda suggested getting a car stereo, so I finally gave in and had it done. Rather than spending a few hours putting the wiring hardness together, I had the fine folks at Circuit City do it for a small fee.

It works great. Now I just need to fix my air conditioning or buy a new car. Greeat.
Your website's RSS feed is as important as your business card, as your "real" website, actually it's replacing your real website more and more. Having a broken or nonfunctional RSS feed is probably even worse than having none: If you have none some people might not check your site regularly but at least you don't look incompetent.But what about your own blog?
June 11, 2008 02:04 PM :: Germany 
I have been doing a bit of refactoring again. This time, I’ve moved the link_expand function from PHP into Postgres. That’s the function that takes a piece of text like [p=123|John Smith] and transforms it to a fullblown internal link like <a href=”./family.php?person=123″>John Smith</a>. It’s very convenient to write links this way. Now, regular expressions work a bit different in Postgres than they do in eg. Perl. The Postgres regex engine is actually ported from Tcl, as explained in the documentation. So, there’s some relearning to do for an old Perl regex punk. Notably, the difference between greedy and non-greedy expressions is subtle and easy to miss. Note the expression E’\\[p=(\\d+?)\\|(.+?)\\]‘ below. In Perl syntax, you shouldn’t have to make the (\d+) atom (any old integer in plain language) non-greedy, but it’s required here.
Here’s the full link_expand function in glorious plpgsql:
CREATE OR REPLACE FUNCTION link_expand(TEXT) RETURNS TEXT AS $$
DECLARE
str TEXT;
tmp TEXT;
BEGIN
-- the easy part: replace [p=xxx|yyy] with full link
str := REGEXP_REPLACE($1, E’\\[p=(\\d+?)\\|(.+?)\\]‘,
E’<a href=”./family.php?person=\\1″>\\2</a>’, ‘g’);
— the hard part: replace [p=xxx] with full link
WHILE str SIMILAR TO E’%\\[p=\\d+\\]%’ LOOP
str := REGEXP_REPLACE(str, E’\\[p=(\\d+?)\\]‘,
E’<a href=”./family.php?person=\\1″>#\\1#</a>’);
tmp := SUBSTRING(str, E’#\\d+?#’);
str := REPLACE(str, tmp, get_person_name(BTRIM(tmp, ‘#’)::INTEGER));
END LOOP;
RETURN str;
END
$$ LANGUAGE plpgsql STABLE;
(if you picked up an early version of this blog post, you may have noticed the subsequent “folding” of the three lines:
p := BTRIM(tmp, '#')::INTEGER;
name := get_person_name(p);
str := REPLACE(str, tmp, name);
into one:
str := REPLACE(str, tmp, get_person_name(BTRIM(tmp, '#')::INTEGER));
and, as a consequence, I’ve dropped the two superfluous vars p and name. It’s more compact, but of course also a little more obscure.)
The “hard part” still looks somewhat circumventious, but at least it works. And I do think that it’s a lot cleaner than the old PHP function with its forest of backslashes.
The main reason why I did this refactoring is not about code purity, though. There seems to be a bug in the PHP preg_replace() function that will only allow it to replace about fifty of my shortlinks in a given text. Given more shortlinks, it will just drop the entire text in the bit bucket. That may seem a lot, but, hey, do you remember the old “640K should be sufficient for everyone” meme? When you try to link up every person in a lenghty probate transcription, preg_replace() will run out of steam. It’s probably a memory allocation thing. However, I do expect the Postgres RE engine to be a lot more sturdy than the PHP one.
June 11, 2008 09:40 AM :: Norway 
Way back in March I sent in my L2410NM monitor for RMA to Westinghouse. This is June and I don't have it back yet. Last I heard they sent my case to their corporate office. I called again this week, call #16 or 17, I lost count, and I was told that they put in a request for a "status update", but having heard any update on it. I'm always promised a return call, but I've yet to receive even one of those. As of now they've promised to send me a new monitor and have given up hope of ever recovering my legendary lost monitor, and supposedly they even created the order in their system that will initiate the monitor-sending process, complete with a long string of letters and numbers representing my fates.
I almost wish they would say "Ha ha, just kidding, screw you customer, you're not getting anything from us" so that I'd feel justified in filing a complain with the BBB. But no, they keep the carrot dangling in front of my nose, inching closer and closer to resolving this issue. Likely I'm going to do so soon though. Not sure if it'll actually help anyways.
I've already ensured that my friends and family will never buy anything from them, nor will my place of employment, and hopefully some people reading this will also refrain. The real problem is, what company is any better? I keep a mental list of companies that have screwed me over, but that list is becoming so large that I'm running out of companies I can actually buy things from. I can at least prioritize according to the level of suckiness. Westinghouse tops the list at the moment.
June 11, 2008 02:55 AM :: Pennsylvania, USA 
June 11, 2008 12:44 AM :: Australia 
June 11, 2008 12:06 AM :: Australia 
Just finished a small howto explaining how to use a Vodafone PCMCIA UMTS card with (Gentoo) Linux. Works very well and will work in less than 5 minutes. If you own this nice piece of hardware give it a try.
Go directly to the Howto
Thanks to Matthias for supplying me with many information's on this topic.
June 10, 2008 09:06 PM :: Germany 
June 10, 2008 11:05 AM :: Utah, USA 

June 09, 2008 09:34 PM :: Germany 
June 09, 2008 07:58 PM :: Germany 

