Older blog entries for fzort (starting at number 205)

static const float WIRE_THICKNESS = .002; // IN ARBITRARY UNITS OF MY OWN DEVISING

It's great to code knowing that no one else will ever see what the hell you did.
7 Feb 2012 (updated 7 Feb 2012 at 12:30 UTC) »
cdfrey: Thank you. :-)

(Back when dinosaurs roamed the Earth, I wrote this useless toy C compiler that generated exactly the same assembly code for if (a) b; else c; and a?b:c. I guess the task was made somewhat easier by the fact that the only data types it knew about were int, pointers and arrays.)
6 Feb 2012 (updated 6 Feb 2012 at 21:32 UTC) »
SHUT THE F* UP

Some people at the office keep talking all day long. The only way I can get anything done is with headphones and mpg123 -z slayer_-_raining_blood.mp3. I'd rather listen to Philip Glass, honest, but I need something to cover the background noise. I'll go deaf in a few months if I keep this up.

There are times when I feel trapped in purgatory; a lifeless object, alive.

This is why I need to start my own business. Something related to games. Maybe a multiplayer strip poker operation, hosted on the Cayman Islands. Something classy like that.

DEAR C++ GURUS

Please explain why the commented out line is not allowed:


struct foo { };
struct bar : foo { };
struct baz : foo { };

foo *doit(bool which)
{
#if 0
return which ? new bar : new baz;
#else
if (which) return new bar; else return new baz;
#endif
}

Game development proceeds apace.

(I've been meaning to use the word "apace" for a long time.)

10 Jan 2012 (updated 10 Jan 2012 at 14:44 UTC) »
Recent spamming

This is an embarrassment, people. Srsly. Aren't we supposed to be hackers here?

A while ago I suggested adding e-mail confirmation for new accounts. But here's an even simpler idea: since these idiots can't even understand what nofollow means, why don't we just filter out hyperlinks for observer journal entries? Replace them with the text "[filtered]" or something.

I haven't touched the mod_virgule code in a while, but that would be a piece of cake to implement. I'd do that, if only I knew there would be a dim possibility of the patch getting considered.
9 Jan 2012 (updated 9 Jan 2012 at 23:07 UTC) »

So there's a new game demo development contest sponsored by Intel going on.

I started to work on something for the previous installment of the contest but failed to finish it before the deadline, even though I got a lot of coding done and, when the going got tough, didn't get much sleep for almost two months (while somehow managing to keep my day job). I shouldn't have gotten derailed experimenting with things that didn't add to the gameplay experience, like dynamic soft shadows.

But the biggest trap I got myself into was trying to work with other people, thinking that I wouldn't be able to handle everything by myself. "Artist" types. Hate them all. In the end they didn't get anything done other than complain and bug me about how they wouldn't be able to do anything unless I implemented normal mapping or whatever. I ended up doing the modeling myself (the player ship turned out okay for a coder, eh?), but by then it was already too late.

I've learned my lesson and will make it this year.

Why am I blogging about this here? It's not even a free software project. Ah well, I guess this is more topical than proclus' political ranting.

3 Jan 2012 (updated 3 Jan 2012 at 20:44 UTC) »

It's been a while. Oh crap, is it really 2012 already?

So what have I been up to?

I've been wasting investing a ridiculous amount of time trying to learn Japanese. It's a nutso language, especially the writing system. Seriously. And I used to think that English was weird. Being able to read, say, a sci-fi novel written in Japanese without a dictionary is looking more and more like a pipe dream. I should have gone with, say, Mandarin instead, which looks a lot more sane (and more useful these days). Anyway, along the way I wrote a couple of programs to help (?) me with my learning (??).

The first one (which I still use every day) was a flash card program to practice vocabulary and kanji. That one's not too interesting.

Then I wrote a Missile Command clone to practice kanji. Here's a YouTube video. And here's the code.

Then I wrote a typespeed clone with kanji. (YouTube video. Code.)

Then I wanted to try out Android programming and started to write a Tetris clone with kanji. (YouTube video. Code.) Yes, of course I'm not using Java. Java, as we all know, sucks. There's a tiny Java wrapper but most of the code is under the jni/ directory, and I can compile a stand-alone Linux version with SDL/OpenGL.

I started to use C++ for my personal coding, which is a lot more fun than C. Unfortunately my C++ code has yuck-inducing raw pointers all over the place (oh hi ncm).

This concludes our blogging for the year of 2012. Thank you, you've been a lovely audience.

(Actually, I have a Japanese-language blog somewhere else but I'm not telling you where it is! Muhahah!)

4 Oct 2011 (updated 5 Oct 2011 at 02:37 UTC) »
23 Mar 2011 (updated 24 Mar 2011 at 12:44 UTC) »

I uploaded my kanji Missile Command typing game thingie to GitHub (the ugly code is here). Is there a license like the WTFPL, but, er, nicer?

I really want to finish this game. However, my desktop machine at home decided to finally bite the dust this week, after many years of heroic struggle. Gah.

22 Mar 2011 (updated 23 Mar 2011 at 00:06 UTC) »
ncm: I thought that apenwarr's diary entry was a bit puzzling, too. I don't hold a candle to Avery's hacking superpowers, but isn't that, er, trivial?


parse_term()
{
  r = parse_factor();
  if (get_token() == '*')
    r *= parse_factor();
  else
    unget_token();
  return r;
}
parse_expr()
{
  r = parse_term();
  if (get_token() == '+')
    r += parse_term();
  else
    unget_token();
  return r;
}

Should make * have higher precedence than +, right?

196 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!