Archive for 2005
Relaunching, soon.
December 19th, 2005 • 2 comments General
It’s been a long two weeks since I last posted, and yes it’s absolutely my fault. I had to remove one of my “wise” teeth, and you know you’d never want to do that, it hurts like hell. I’ve spent the first week trying to concentrate on anything but the pain in my jaws but to no avail, it’s impossible.
In all honesty, I realize this blog hasn’t come a long way since it last started, it’s not crammed with entries, it’s not amazingly popular, and it’s definitely not an A-blog (save for my two popular entries Do You Gentoo? and Iterators in PHP5).
On the other hand, this blog has mostly served me as a place to jot down my thoughts, only in public. That is, things I like, and things I don’t, things I’m pissed off, ideas from here and there, etc. And I can’t really count the times when I came back to my own blog to remember something I forgot; eating your own dog food, huh?
Looking down on the couple of years I’ve spent semi-blogging and barely contributing anything useful, I came to realize that it’s time for a change. I’m not exactly sure what kind of change I’m talking about, but I still sense that I need this blog to be something else, a certain reference if you may, a tiny little knowledge base.
Things change, I’ve changed and this blog will change. So hopefully, it won’t take long to relaunch this blog. I’m going to keep the links and feeds exactly where they are, so if you’re subscribed to any of my feeds you wouldn’t need to worry about this relaunch. The rest is going to change, soon.
(oh shit, what have i got myself into?!)
Doom in DHTML
November 29th, 2005 • 1 comment Mozilla
Canvascape 3D Walker is an impressive demo of what Firefox’s new canvas can do. Oh yeah, it’s supported in Firefox, Safari and Opera.
Must.. resist… 3D Web… fantasies…
Configuring nVidia Drivers on Ubuntu
November 27th, 2005 • 4 comments Linux
I’ve been fiddling around with Ubuntu Breezy lately, it seems like a solid system, more or less. I’m going to get to that later on, but now I’m going to document how to properly install nVidia drivers on Ubuntu.
Ubuntu’s Wiki has many out-dated documents on how to do that, and they all say that it’s as easy as running:
apt-get install nvidia-glx nvidia-glx-config enable
After rebooting, nVidia drivers should be installed. If you want to check, run:
glxgears -printfps
On my GeForce 6800 Ultra I’m getting around 14,000 FPS, I’m sure I can speed it up with more tweaking, but I don’t really have the time for it.
The thing is, enabling nVidia GLX drivers isn’t enough to get the performance these drivers are capable of. So here’s what you need to do:
First, check whether you’re using AGPGART or NVIDIA AGP drivers:
$ cat /proc/driver/nvidia/agp/status Status: Enabled Driver: NVIDIA AGP Rate: 8x Fast Writes: Disabled SBA: Enabled
If it says AGPGART instead of NVIDIA then you should add nvidia-agp
to your /etc/modules just before the line that says nvidia
(assuming you already run nvidia-glx-config enable).
This tells the system to load nVidia AGP drivers on start-up, but that’s not it,
you need to also disable loading AGPGART, nvidia-agp doesn’t work
with AGPGART loaded, so add it to hotplug’s blacklist:
$ tail /etc/hotplug/blacklist # snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much # hardware on its own (Ubuntu bug #2011, #6810) snd_intel8x0m # causes failure to suspend on HP compaq nc6000 (Ubuntu: #10306) i2c_i801 amd64_agp agpgart
I had to blacklist amd64_agp too because it depeneds on agpgart.
Note that this doesn’t prevent AGPGART from loading again, but this makes sure
that NVIDIA AGP is loaded before it.
Next, you should add a few performance-enhancing options to your /etc/X11/xorg.conf.
Just above the line that says Driver "nvidia" add these:
Option "NoLogo" "true" # Disables nVidia's logo on start-up
Option "NvAGP" "1" # Tries internal nVidia AGP drivers first
Option "RenderAccel" "true" # Duh :)
Option "CursorShadow" "true" # Adds an alpha-shadow to your cursor
Option "AllowGLXWithComposite" "true" # Mostly used for cool effects
Note that using AllowGLXWithComposite can cause the system to
act a little flaky when you enable Composite extension. This is used for cute
Vista-like effects, like transparent windows, drop-shadows, etc. Use with caution.
Well, I hope that’s it. I didn’t have to recompile my kernel or nVidia drivers, most went out smoothly, except for the fact that I had to search a lot for this information.
One last tip, try to install an optimized kernel as soon as possible. Ubuntu
comes with linux-386 package, try to upgrade it to linux-686
or linux-k7, depeneding on your hardware, you’ll notice a performance
increase.
Best of luck.
P.S. Turns out most of my performance gripes with Ubuntu was because of nVidia’s “inproper” installation. Like I said nvidia-glx-config enable didn’t quite do the trick.
Is Ubuntu Really Breezy?!
November 21st, 2005 • Linux
I don’t know what got into me, but Debian’s apt-get really does something to me, so as soon as Breezy was released I decided to give Ubuntu a second chance.
Boy was I wrong…
In all honesty, I simply don’t get it. I tried and tried to fix whatever’s wrong with its Gnome defaults to no avail. It’s too damn slow! Yes, really. I’ve heard about a Firefox issue eating up all the CPU on Breezy and that it should be fixed with a simple install of the latest binary from Mozilla.org, but it’s not just the browser, everything in the system feels sluggish as hell.
I thought maybe I did something wrong, maybe I installed a package I shouldn’t have, maybe I unleashed the wrath of “humanity”, I’m really not sure, so I reinstalled. Then, I reinstalled again. One more time, reinstalled. I still kept coming back to the same issues over and over again. Even Hoary wasn’t this slow.
I even downloaded and installed OpenSuSE (I’m sorry about the caps, I’m still not sure hOw tO sPEll SuSe :), Slackware with Dropline, did a Stage3 Gentoo installation, even FreeBSD delivered great performance. I’m astonished. How could a distribution this cool release a version this crappy?!
They say Droopy Drapper is going to be the be-all-end-all distribution, and I have to give Ubuntu guys their credit, they’ve done some really hard work until now, after which I can’t explain this sudden decline in quality. They’ve already released their first nightly of Dapper. Now guys, why on earth would you be working on a newer release when you still haven’t fixed the old one?
Remember how Ubuntu used to toot their own horn about a periodic 6-month release? Come to think about it now, I believe it’s a bad idea. Maybe Ubuntu devs felt some pressure to release and they just had to go for it. Well, I’d be much happier if you do a 6-year release period but do it right, I mean really right.
I’m not sure what to think right now about Ubuntu. They’ve impressed me once, but they can’t seem to do it again.
Wish you best of luck Ubuntu team. Hopefully, you won’t need it.
Aspect-Oriented Programming
November 15th, 2005 • PHP
I found this on PHC’s website, must be the cleanest explanation I’ve seen of aspect-orient programming:
Aspect oriented programming is a relatively new programming paradigm. The standard example to explain what AOP does for you is the following. Suppose you have a script with a series of functions. Say you want to start and end every function with a call to some logging function:
<?php function some_function { log("some_function: begin"); /* do whatever the function should do */ log("some_function: end"); } ?>And say you want to do that in each and every function, for example for debugging purposes. It’s a lot of work to do that manually for every function. And when you no longer need it, it is a lot of work to remove it again. This is what’s known as a cross-cutting concern: something you need to implement (in this example, logging), that “cross-cuts” (affects) a lot of code. With AOP, you can write this concern as a single “aspect”. You then run your program through an “aspect weaver”, which will insert the necessary code at the start and end of each function, thus saving you a lot of work.