3 ms·
Isn't this just a bunch of static object pools? That's extremely common in embedded programming. I'm glad to see someone recognized it could apply to a database
by aaaronic 4y ago
Isn't this just a bunch of static object pools? That's extremely common in embedded programming. I'm glad to see someone recognized it could apply to a database.
My students do this on the GameBoy Advance specifically so they don't need to learn about dynamic memory allocation to get useful things done early in my course. In fact, they only learn about dynamic memory allocation for academic reasons later on and never _need_ to use it in their games.
- schemescape 4y agoDo you mind sharing the name of the course? It sounds interesting. (I didn’t see anything in your profile.)
- LAC-Tech 4y agoIsn't this just a bunch of static object pools? That's extremely common in embedded programming. I'm glad to see someone recognized it could apply to a database. Zig in particularly makes this really approachable. Too dumb to pull it off in C myself, trivial in Zig. YMMV.
- idealmedtech 4y agoI do small projects statically all the time! Writing a simple bf interpreter can be done so statically that you don't even need to store the program in its own array; program text can just be taken directly as const char* https://github.com/ijustlovemath/bfi https://github.com/ijustlovemath/bfi You can also do ergonomically nice things using static allocation in many data structures, like linked lists (as a tiny example: https://github.com/ijustlovemath/linked-list/blob/master/ll.c#L102 https://github.com/ijustlovemath/linked-list/blob/master/ll....). That way you can focus on the concepts that matter; the data structures, and not frustrate newbies with opaque and difficult-to-reason allocation issues (at least not at first!)
- e12e 4y ago> My students do this on the GameBoy Advance This sounds interesting - Any information / course material available online? (I found nothing in your hn profile...)