ldx

yoda (from yoda stories, 1997)

@ldx

adam le doux

makin' games & game makin' tools


I didn't include this pic in my latest batch of game boy camera photos but I like how surly he looks lol


I went back and edited this post to see if I could get the photo to be pixelated instead of blurry, since I think that looks nicer

it turned out ok! I ended up using a <div> with the image encoded as a datauri and set to the background using css (at first I tried to put the datauri in the src of an <img> tag, but that didn't work - maybe that feature is disabled on cohost?)

the one thing I still had trouble getting to look the way I wanted is the image size - ideally it would fill the post, regardless of how the page layout changes, but I was having trouble figuring out how to make that happen...

anyone got any tips or suggestions on how to improve this?



i don't know why, but for some reason i've always written pointers in C "wrong"

everyone declares a pointer like:

type *pointer= NULL

but i have always written them like

type* pointer = NULL

which has always felt more natural to me. they both work, so it doesn't really matter, but i've been thinking about it because i've been working on some tutorials and i need to standardize my code style. i conceptualize the * as being part of the type and not part of the variable, partly because when you later reference the pointer you reference it like

pointer->member

and not like

*pointer->member

so the pointer operator isn't part of the name.

and you can't do something like

type variable = (type){0}

*variable->member

that's a compile error. not that i can't think of a reason you'd want to do that, but the pointer operator isn't just a thing you can use in-place like any other operator.

i know (at least part of) why you're supposed to write it the normal way, because of a situation like this:

char* pointer = calloc(1, sizeof(type));
*pointer = "c" // this sets a pointer to the string "c"
pointer = "c" // this sets the pointer to the memory address 0x63, which will contain functionally random memory

in this situation, the syntax is inconsistent for the correct behavior. maybe i just haven't written enough C, but i have literally never had to write code that looks like this.

anyone else write pointers wrong? anyone have surprisingly strong opinions about C pointer declaration syntax? i'm probably just going to go back and fix all my pointers to the "correct" syntax before i publish this tutorial.


I've always preferred type* pointer = NULL; because it seems most readable to me

you could probably get a whole DnD alignment chart out of C pointer declaration styles: type *pointer = NULL; is lawful good, type* pointer = NULL; is chaotic good, type * pointer = NULL; is true neutral... declaring everything as null *pointer and casting everywhere is chaotic evil >:P



Birdie Wing is an anime about a golf hustler from the wrong side of the golf tracks who has a chance meeting with a golf heiress. they fall in golf love; in order to have a golf date with her, she ends up indebted to the golf mafia. this debt she repays by defeating a golf assassin in a sudden death golf match played in an underground golf bunker.


the hero with a thousand faces (1949)