Older blog entries for wwwwolf (starting at number 25)

Nothing significant from the hack front.

Ecept that I spent some 5 hours to make one smallish (only 424 lines!) program for...

...Nethack logfile summarization.

I haven't yet put that to my home page. One thing is sure: I now know how to mess with really complicated things in java and also use Hashtable, Vector, Calendar and DateFormat classes efficiently. (Java hypespeak sentence:) I now have a good, 100% Pure Java reusable codebase for developing advanced Nethack logfile analysis packages.

It's just that 5 lines of Perl, taking about 3 minutes, would have been required to make that "Monster high scores list" I wanted to put to my home page... =)

Yes, I'm insane.

Hey, I think Advogato took the concept of "black home page" a bit too far. Yes, things have been bad. Yes, great losses have been experienced. I just wish I won't lose my damn eyesight too. (I often hate myself for my ocassional cynicism, especially when it can ocassionally annoy people. Bear with me.) Believe me, even when none of the tragedies seen today have touched me personally, they did affect me. For non-code-related babble on the day's stuff, see my diary entry in Kuro5hin.org.

Aww, what the hell I'm whining about black backgrounds - I turned on the Goth theme for the day in E2, too. At least E2 had white letters, too...

Enough rambling already!

The coding stuff: I put some extremely rudimentary DocBook documentation stuff to the Schedulist CVS server... It shall, yes it shall, be Two Documents, one for the Developers and one for the Users, one day.


You know, the new semester starts next week, so I decided to fix my amazing schedule generator, schedulist, before I get too busy to work on it. The problem with it was that HTML table generation didn't work at all. =(

Well, now it does work again... basically, the code had a few off-by-one counting errors and that made the HTML tables appear completely whacked. My expert opinion: HTML table syntax stinks. There should be a more easily-approachable way to this!

To Do Before 1.1 Release: I think I need to build a few more table generators (for LaTeX?) and finish the Website Meta Language support...

27 Aug 2001 (updated 27 Aug 2001 at 23:07 UTC) »
Journeyer? Well, I guess I need to get used to the idea, even though I'm not a Great Leader of A Minor Product. Maybe there should be a Mad Tinkerer qualification for people who do all sorts of wicked stuff of debatable usefulness for common good =)

Anyway, today's cool stuff, really cool stuff: I've been banging the OpenGL maze hack (it now has a web page! Well, it has had that for a while but it's not been linked to from anywhere...) I got the goddamned viewing transformation to "work". (I don't know what's up. (literally.) The up vector is 0,0,1, when it obviously should work when I say 0,1,0 - saying the 0,1,0 as the up vector turns the whole thing to horizontal state...)

I did some math: I succeeded in solving the really hard mathematical problem® ("if I stand at point (x,y), look at direction α, and walk d units forward, where (x1,y1) do I get to?") and that enabled me to make the walking routine AND the gluLookAt thing (though the 3d environment creation itself, it seems, and the viewpoint thing for some parts, is having more of the quality of the concept "buggy" than we usually say...)...

Here's a screenshot! I know, it doesn't look like much yet.... yet.

I need to make the walls cooler, implement collision detections, textures, atmospheric effects/fog, culling of faces outside player's viewing range, and so on... Ack, maybe I first make the thing actually work at some basic level... =)

PS. Oh, yeah, forgot: I dumped GLUT and switched to SDL. Hm, is there an object-oriented C++ wrapper for it somewhere?

PPS. Yeah, gnuplot really is a handy debugging tool (used it to debug my walking paths using the calculator thing when the view didn't work) - get it today! =)

Haven't had much time to hack the hedge maze thing, because I did something I thought was pretty neat...

I made a small comparision of of programming language types. It explains differences between different sorts of languages... well, it's sillier than most explanations, but more interesting than "how to count from one to ten" in millions of languages. This has several implementations of That Ol' Silly Stutter/Feedback Algorithm.

The creation of this thing was fun. Well, mostly. I finally wrote a Perl version of the program. I made a Lisp version. I made a Forth version. I thought of making a Fortran 77 version but I screamed and ran when I saw the string handling capabilities of that language. I tried Haskell but just tonight spent good three hours trying to figure out how to take slices of arrays / substrings of strings, so I think I'll stick with Lisp for my functional programming needs, thanks.

And it got 2 cools and 11 upvotes overnight. Gives a warm fuzzy feeling™.

Yesterday, I coded my maze generator hack all over. Well, actually, I just ported the C program of mine to use C++ and to use the basic facilities of the language (C version of the maze generator was so stand-alone that I complied it with cc65 to produce a working C64 binary in no time!)...

(Yeah, I haven't used C++ much, but now I first time noticed that templates do have a bit awkward syntax. Anyway, I can tolerate that - vector<vector<char> > is almost a tolerable way of making a multi-dimensional character array, compared to C way with the dreaded malloc() and some calculations... =)

It now uses OpenGL to do the display stuff, and it's going to be a fully three-dimensional maze exploration program!

The only problems I've had so far:

  • "Hedge" geneator should churn out cubes. It creates a huge bunch of triangles instead. Weird, that.
  • Yeah, the user-perspective view doesn't work at all =( either I get a blank view, or interesting "viewpoint" to the location I'm looking at. Looks like I still need to learn more of the viewing/modelview transformations.

I have read the whole red book, but that won't help me much, I guess - I haven't actually written too much OpenGL code. Plus, I suck at math. =( I think I am able to survive this, one day - I'm doing this mostly just to prove that I'm able to do insane things. In C++. With OpenGL. In Glorious 3D. =)

Maybe I should focus my stuff on stuff that actually does something worthwhile... =/

Been a while since I coded anything on my own free time.

Well, today I did something: A small CGI script called "Package Office".

This just because I-Drive, like many other online file storage services, decided to shut down the free service and concentrate on corporate data housing.

Now, I'm not whining - maintaining a huge datacenter needs money, yeah - but AFAIK there aren't too many "network drive" providers here that I would pay for. Foreign payments are co$tly for those without credit cards.

My ISP and the university gives nice slice of webspace for me to use, and I can put temporary stuff on some directory and people can read it there. But one problem: People can't upload their files to me.

The script solved that part.

I'm not releasing the script yet. I must implement the "quota" thing (to keep the upload directory reasonably sized) and take all security viewpoints into account.

Hmphf. What a way to spend the midsummers... Well, at least I'm having fun in my own way =)

(Not much happened meanwhile - I did boring stuff, I got a Mysterious NDA-bound Job™, and stuff like that.)

My "Maze Hack Project" (a "project" to explore the possibilities and theory behind mazes) continues... today, the C64 project continued when I got cc65, a rather neat freeware C cross-compiler for 6502 processor family...

I had earlier made a C program that generates and solves a maze. It was written to be simple and compact because I wanted to port it to Commodore 64 assembly one day. I used this C thing to show myself the theory and practice of maze generation. (The generator uses randomness, "sets" and depth-first search to generate maze - not perharps too efficient, but it generates pretty neat mazes. The solver is just a depth-first search - the same what xmaze screen saver uses =)

The port hasn't happened (because I have had cooler things to do, and as with all other assembly-related things, "you need to invent the gun, bullets and powder first before you can shoot yourself to foot"). So, I decided to take this compiler and see what it does.

The only problem I had was that it didn't know what the heck time() does (there was a prototype in headers for that but no implementation in the standard library). I made a simple wrapper for it to take the time from clock() function instead (the time was only needed for the random number generator that sucked anyway). Then it compiled fine. And then...

I loaded it.

I ran it.

It did what advertised.

I guess I know how to write more or less efficient and portable code - because under VICE, this thing generates the maze in about 8-10 seconds and solves it in about 1-3, both times seem fairly reasonable. And yes, it runs just as nicely as the real thing. =) Well, I guess the generator could use

The bad thing? The Linux binary was 6912 bytes - and the C64 binary was 7218 bytes. This is what we in the industry call "bloat". =( (Real Men Don't Need a "Library". =)

Now I have finally found a C compiler where I may find the asm(...); a joy to use. Assuming, of course, that this assembler supports such things =)

Today, LeanWebLog (the below-mentioned news application) improved again a bit. It has a working GUI tool now for sending news. Which means, I can now add pointless comments to my web cam page much, much more easily. Really, really, really nerdy.

YiffCam was also updated to use Gtk::GladeXML. Gtk::GladeXML is sort of cool compared to glade2perl, because it

  • doensn't require any automatically generated stuff,
  • has its own UI generator (just say $app = new Gtk::GladeXML("program.glade"); and we have application instance)
  • widgets can be referenced much more "intuitively" $app->get_widget('some_text_entry')->get_text();

Very cool. Plus, glade2perl needs to be fetched from CPAN, Gtk::GladeXML is available as a Debian package! =)

I also updated Vocoditor to use Gtk::GladeXML, but that one is not yet completely done... Tooltips are not changed the way they should. Need to focus...

I should now

  1. Update XMMS Infopipe (a couple of feature requests and patches from users have arrived...)
  2. Start tinkering with schedulist again
  3. "Ship" that damn YiffCam already =)

Other Cool Stuff That Happened: I'm now a M-Noder in E2 - that is, I have written 1000 writeups. Woohoo™.

Today's Excellent Adventures:

The Day: I made a simple script with Python, just to show that I'm a tolerant person and not a Perl Zealot. However, what I now think of Python probably just enforces my Perl Zealot appearance. =)

The script was fairly simple: It processed every cached file under /var/spool/squid and extracted URLs out of them. The script is available at my home page.

So, um... Some things I found out:

  1. Python doesn't support anonymous subroutines? So I can't do Perl-style @result = map { many; lines; ofunction; here; } @list; and instead I must do def processingfunction: doweirdthingshere return whatever... result = map(processingfunction,list). That was sort of weird.
  2. The lack of curly braces is sort of strange too, because it forces me to write while 1: pass to make infinite loop (this one wasn't in that program, it was in other smaller one). Dammit, in Commodore 64 assembly this thing was simply LABEL: JMP LABEL... "Brothers of Camel, Python IS more verbose than assembly!"
  3. Uh, I didn't check the library references, but my signal handler that I set up needed two arguments. And in C, there's maximum of one argument. Well, I s'pose there's a good explanation for this, but...
  4. Weird Behavior: When used normally the script worked fine. When I said squidls | grep "something", Python died with broken pipe. HUH? What was even more weird that it started working once I added one command to place that was never executed normally.

The Night: I hesitate to touch Gtk::GladeXML, because it's not that well documented... signal handlers sometimes don't get ANY arguments! Weird... Or was it just the night-time blurriness?

I wrote a small hack to assist me in making signal handlers straight out of the Glade file.

I must sleep

16 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!