Articles
Articles are single-page pieces that give a whirlwind tour of a specific topic.
They’re different from series, which go very in-depth, taking many detours.
An ooc quine
While preparing my next post about ooc documentation yet again, I stumbled upon an old ooc quine of mine. Here it is in integrality for your pleasure:
q := 34 as Char
l := [
"q := 34 as Char"
"l := ["
"]"
"for (i in 0..2) {"
" l[i] println()"
"}"
"for (i in 0..12) {"
" q print(); l[i] print(); q println()"
"}"
"for (i in 2..12) {"
" l[i] println()"
"}"
]
for (i in 0..2) {
l[i] println()
}
for (i in 0..12) {
q print(); l[i] print(); q println()
}
for (i in 2..12) {
l[i] println()
}
oocdoc, Part 2 — brummi
In the previous article, we saw how to use NaturalDocs, a language-agnostic documentation generator. Today we’ll see how to use brummi, a tool specific to ooc, written by Friedrich Weber.
Generating .json files
The first step to generate docs using brummi is to use rock,
to generate a set of .json files describing the code. The --backend
command-line option allows to select which backend you want rock to use
(the C backend is the default).
oocdoc, Part 1 — NaturalDocs
Documentation in ooc land has sucked for quite some time. The standard response is pretty much: “use the code, Luke!” — which is fine when doing small projects that don’t matter much, but not so when you want to get serious.
So when a newcomer, beoran, asked how to generate documentation, and later told us he got NaturalDocs to work, naturally, I had to see for myself how well it worked.
Experiments in happiness
If you’re a regular, you might’ve noticed the place has changed around a little. Thing is, I’ve been spending time playing around with a radical new concept: happiness.
The year and a few months that I’ve spent working for a start-up were actually a pretty gloomy time for me, both for professional and personal reasons. It took me a while to get out of this hole and start thinking positive again.
Isaac rubs his back on non-existent doors
Haven’t blogged in a while. Life’s fine, project are a-plenty, but I just wanted to make a more lasting post about one particular issue that struck me as funny when programming Paper Isaac.
Bugs, bugs, bugs
What’s infuriating when letting others play an early prototype is that you hear constantly the same things. Some bugs are non-trivial to fix, some you’re just not motivated to fix now… sometimes you just have your head elsewhere, gotta focus, or are elbow-deep in some other piece of code and the damn walls can wait.
Things I struggle with
Putting thoughts in bits
I think about lots of things but when it comes down to writing them, drawing them, implementing them, it’s not that easy. Even with years of practice in each of these trades, it’s still an uphill battle.
Which is why I am not going to read that article after I wrote it and will go straight to publication.
Not assuming nobody cares
Next power of two
While looking to write a pure ooc version of ftgl, I was reading the source of ftgl-gl3 and I stumbled upon this piece of code:
static inline GLuint NextPowerOf2(GLuint in)
{
in -= 1;
in |= in >> 16;
in |= in >> 8;
in |= in >> 4;
in |= in >> 2;
in |= in >> 1;
return in + 1;
}
This is needed because dealing with power-of-two textures (32x32, 64x64, 128x128, etc.) is more efficient with OpenGL (some implementations don’t even support non-power-of-two textures!).
rock 0.9.6 is on the loose!
Just 8 days after the last release, rock 0.9.6 is out.
To update, run git pull && make rescue
as usual. To install from scratch,
clone the repo, cd into it, and run make rescue
from there - it’ll download the latest bootstrap, compile itself from
C, then recompile itself from ooc.
Running rock -V
should give you something like this:
rock 0.9.6 codename loki, built on Wed Feb 20 15:09:08 2013