Follow

So frustrated, absolutely no idea how to write algos in Rust, behind startup work, fuck everything!

@jonn you mean "data structures with weird lifetime rules" problem?

@cloudfog I'm trying for everything to be mutable, that's when shit hits the fan. So far I have 300 lines of rc/refcells

@jonn right, mutability is not a problem if you can define single ownership processing. Immutable is pretty much just "free" RC in that sense. But yeah data structures are hard in Rust, you really want to abstract away that shit in a library and revisit as rarely as possible.

@cloudfog ok, I'll take it as a dare to rewrite my refcells to immutable!

@jonn haha, that was exactly the opposite of what I had in mind! :D But it should be fun and that is what matters.

@cloudfog yeah, it didn't work out either, for the same reason (duh).

I'll try again tomorrow with making Boxes or RefCells on the top-level.

Sign in to participate in the conversation
Doma Social

Mastodon server of https://doma.dev.