A programming weblog by Hao Lian. • A long walk through an angry forest. • A series of memory leaks brought on by senility.

I made these mountains in OpenGL just for you. (And this project.)

Results of procedurally generation

Don’t worry, it didn’t take me long. I randomly, procedurally generated them and then colored it with shaders. And those red things? Oh, you know, just some biplanes.

What’s that? You didn’t get me anything? That’s fine, I assure you, that’s fine, and you’re fine as well.

[(3y, 8mo, 3w, & 6d ago) .]

Perl, a fun and exciting place to be.


[(3y, 10mo, 2w, & 2d ago) .]

How to do quick Linux network programming Perl and gain blackmail material at the same time.

[(4y, 1mo, 1w, & 4d ago) .]

Avery Pennarun dives into the three ways of file locking on *nix and OS X: flock, fcntl, and lockf. He resurfaces, horrified.

[(4y, 1mo, 2w, & 5d ago) .]

(Today, bor.borygmus tries to be LWN.) Mike Galbraith has checked in his SCHED_AUTOGROUP patch into Linux with impressive, photogenic results. What SCHED_AUTOGROUP does is it automatically configures a rarely used Linux feature (cgroups) to group together related processes so that, under heavy load, certain processes still remain performant under the kernel scheduler. For example, if you’re parallel building the kernel, you still want the browser to smooth-scroll. Building is going to constantly vie for the CPU whereas smooth-scrolling will only require the CPU every now an then. A bad scheduler will allocate very few time slots to smooth-scrolling, thinking that it’s unimportant. Whereas this heuristic is mostly correct for the server environment where long-running, non-UI processes should be scheduled like this, it’s less clear on the Linux desktop since laggy scrolling means far worse user experience. In any case, SCHED_AUTOGROUP is a small elegant patch that figures out how to build cgroups that isolate these UI loads away from CPU-intensive loads. This has made quite a few Linux desktop users happy. Even this guy.

[(4y, 2mo, 2w, & 1d ago) .]

Poignant and funny tales of engineering woes.

[(4y, 3mo, 3d, & 20h ago) .]

Rob Pike makes the strong argument that basing a programming language on orthogonal building-block features is key to the expressiveness and simplicity of Go, even though Go is not a small language. I wish more programming language designers gave talks like this. (PDF)

[(4y, 3mo, 2w, & 4d ago) .]

It’s not as easy as you think. It’s also not as hard as you think. In any case, it’s my favorite kind of algorithms writing: Smart, lots of examples, lucid, and fun—plus a Python coda.

And we’re all following Frederick Akalin’s programming weblog, right? OK. Just wanted to make sure we were all on the same page.

With that in mind, you should be able to solve the first question to the 2010 Greplin Programming Challenge.

[(4y, 3mo, 3w, & 2d ago) .]