doing a bit of website development. going to write a c program to make pages next.


done a bit more work. i have an index page that is automatically generated now.

it doesn't look like much, but it's working :) now i need to actually manage memory instead of never freeing anything :/

luckily 9 has no valgrind so nothing to shout at me :P

@foura weird, it looks like it added a Z at the end of the path

@neauoire im guessing it's because the rings aren't full circles. they are each 4 bezier curves and it seems to be jumping between them. it works on the linux netsurf though :/

@foura out of curiosity, is that all running on 9front?

@spk for most of them, the left window is drawterm connected to my 9front servers, and the right window is just firefox. the post where i complain about netsurf breaking my svg is all 9front.

@foura I was partly curious because I was fairly sure that was Firefox in the right window :) drawterm + FF on OpenBSD?

@spk not openbsd sadly :( on linux mint atm because of software i needed. i need to reinstall openbsd.

> website generation in C ftw ✊
In a talk, Rasmus Lerdorf said PHP was originally created because he couldn't convince people to use C in HTML generation, and had to make a language for it. Pretty big DSL now!

@foura Does it just generate the web pages and then exit? If so why do you need to free memory? Just let the kernel do it when the program exits ;p

@foura It's a legitimate memory management strategy! I was talking about it earlier with some others. malloc() is memory safe but free() is when things start to go wrong, plus it's faster this way (unless you start swapping, which I assume this is simple enough not to).

@sirvertalot @foura It's actually the approach GCC and other compilers take as well; there's no need to free the memory unless you intend to reuse it.

@ndpi @sirvertalot huh ok. maybe i'll just free the page text once im done with it. no reason to hold my entire site content in memory.

@foura good to see that ACME freaks are still around! (:

@sirmacik acme is great :) its in drawterm, i'm writing plan 9 c

@foura never had much use for plan 9 but liked the ideas behind it. I've written much code with acme though

Sign in to participate in the conversation
Mastodon @ SDF

"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko