dsy

Post Your Heart Out! 💚

Hi! I'm Daisy 🌼🏳️‍⚧️


Heartbreaking Xrd Millia. Sometimes I post about things I enjoy. I also gpose with my FFXIV WoL. Mostly I'm here to chill and watch the feed. You are welcome to hang around and see what falls out.


icon by amphypop on twitter (hey, remember twitter?)

header courtesy of @cindervision

A blinking GIF which has a dithered Sailor Jupiter and reads "This website is FREE but if you like it you can pay for it"

GIF by @westfailia [OP]


Anywhere else
I'll see you on the road

i think my "begrudging acceptance that a popular thing is in fact good/fun" moment of the night is Rust lol

I'll ramble a bit since cohost is responsible


there was some post1 a few days ago about Consumer Reports stepping in to an apparent memory safety battle - I read about half of that whitepaper and thought "interesting! i wonder what Rust is like"

so far it's fun?? setting up to a point where things seem to be compiling was easy, and the Rustlings tutorials are a pretty clever approach to getting you looking at code and learning from it while reading the book on the side. like jeeeeeez that's all just officially supported from the front page

anyways i think im still in the "getting to know each other" type beat but it's been nice so far. don't know what i'd make yet but i'm not worrying about it too much.

  1. here's my pitch to get you to upvote search the "liked posts" feed on the support forum:

have you noticed that the liked posts are strictly chronological, and not ordered by the time you liked them? if something from November came across your feed right now and you liked it, went to bed, and then wanted to pull it up tomorrow morning, you'd probably have an easier time going back through the homepage than checking the liked posts page! bummer!

... now picture I said words about search! you know how searching works! i'm going to bed!

alright!

think about it!


You must log in to comment.

in reply to @dsy's post:

i tried to build a thing for my friend to bench on his cpu but it turns out it's just impossible turbo-hell to do anything like that from my repo on windows any more. c++ is a barren hellscape apparently*

but rust's intrinsics support is actually fabulous

including runtime support detection

and even an experimental feature for portable intrinsics

and there's libraries for shit i couldn't even find anything for in c++ just, lying around

so i've decided to pull the trigger, gonna have a good time with this and make my first project be a dastardly unsafe piece of shit data structure that i've written four other times already in other languages and nobody else has seemingly done with these features anywhere i can ever find

*i mean deep down i knew this already for a long time but lmao

lots of implementations of k-d search trees (for things like nearest-neighbor searches in multiple dimensions) out there, but strangely none of them are made to be modified on the fly. nobody seems to have written much about how. but i did it, it's honestly not that hard. idk why everyone else is fighting with forests and amortized total rebuilding just to be able to delete nodes from the tree or whatever

you can find very rare mentions of how to delete a node from a k-d tree, but (like this example) they are often average O(log n), because in order to find the node with the minimum value on the discriminant axis you may have to search most of the subtree (or even all of it). this also does nothing to improve tree balance, and you might have to recurse to pick another replacement again, because the node with the least discriminant (you have to replace the deleted node with that one!!) might not even be a leaf!

but if you store the discriminant split value separately from the point, you actually don't have to worry about that at all. you can just completely ignore it and put literally any descendant node in the deleted node's place. you can actually just find the deepest leaf in average O(1) time and use that, and it always improves the balance of that subtree. then you just balance the whole tree in a scapegoat fashion and it just works™