News for hackers. Stuff that matters.
Re:Criticizing Hare language approach for generic data struc... by BaculumMeumEst on Wednesday May 04, 2022 @08:34AM (#31259558)
Do you remember what the reason that you went with a linked list in that case? I’ve been learning hare and was curious about where to use them.

Also, did you use a nullable pointers to represent the next node element in the linked list? Or a tagged union of ( ptr | void)? Or something else?

Re:Criticizing Hare language approach for generic data struc... by ddevault on Wednesday May 04, 2022 @08:44AM (#31259652)
Yep. I used it in a kernel to create a linked list of statically allocated data structures in a context where dynamic allocation was off the table. You can see the code here:

https://git.sr.ht/~yerinalexey/carrot/tree/master/item/conso...

Went with nullable pointer types, which is also a rarely used feature in Hare.

Re:Criticizing Hare language approach for generic data struc... by BaculumMeumEst on Wednesday May 04, 2022 @08:58AM (#31259760)
Cool, thanks for the link and info