

I’ve never thought about what swapping out allocators would do in an async environment like that. Very readable and interesting!
DM for SimpleX


I’ve never thought about what swapping out allocators would do in an async environment like that. Very readable and interesting!


Stable variadic functions is cool AF!


Because you don’t have a lot of experience with this type of stuff, I would not recommend exposing all your applications to the open web unless you also are willing to install and maintain some sort of security dashboard or traffic analyzer with alerts in case someone is trying to do something malicious to your services. You can always tunnel in with a VPN at the flip of a switch. This would only expose the VPN to the open web, which is a much smaller attack surface than all your services. You could also use something like Tailscale to keep all the devices connected but not exposed to the open web.
I would recommend going this route as a beginner hobbyist just so you don’t have to be worried about the security of your server as much. Hope that helps!


What’s komodo? I’m thinking of starting a home server so learning how to harden/automate updates (which is what it sounds like you’re saying) is what I want to learn.


What’s your goal with switching languages? You need to figure out what business requirements are fulfilled more effectively given that technical change before making that change. I mostly say this because I don’t hear a clear reason for the switch in your post.
For the rust ecosystem in general, reading through the cargo help output to see what tooling is there is a great start. You can see what functionality is already baked into the native language tooling, which should guide you on the right path. Off the top of my head, theres ways to test and lint your code already built in. Best practices are usually crate dependent, especially when working with something (I think) is macro heavy like dioxus(I don’t do a lot of UI in rust). Make sure to go through the provided dioxus code examples because those will probably cover most use cases you’ll be going for.


Yeah what I wrote was just something to get the idea out, about having a list of Allowables.
I just fully read your code, and I like how you changed the Allowable api to have a deny and allow function instead of it being at the AllowList level. Honestly, I did not know mem::take was a function. I like how you got around cloning too.
Also, just so you know, you come off pretty rude. Just want to make sure you know that if you’re not aware.


Also sorry, I realized I worded my response a little rude earlier. Didn’t mean it like that, I was just speaking matter of factly!


How is it a code smell? I’m pretty sure interior mutability is a well established design pattern. I’m not really familiar with the pattern you’re describing using Ref/RefMut wrapping, could you show me what you mean?
Yeah I didn’t want to pour a bunch of time into wrangling borrow checker stuff for a small code snippet.


Finally got around to writing the code, here’s the link to the Rust playground with it. I was too lazy to do the unsafe stuff, but where I call clone in the deny and accept functions are where you’d rewrite and do unsafe magic to swap out elements without the clone overhead.
I also tried to implement a take function (like in Option) for the Allowable enum. Transferring ownership like with take would keep you in safe land and get what you want done.
Keep in mind I am not a game dev. I don’t do cache optimizations. I have no idea how this code would function in a game context, but this is just my first idea for implementation of what you asked.


I don’t think you need a mutex for this situation.


What are the conditions for T to be accessed? You could potentially wrap each instance of T in an enum that has two states, Allow and Deny, where if you encounter a Deny you just don’t access that one. If you have a slice of this enum where each enum owns T, you can always just swap out a Deny for an Allow or vice versa depending on how you want to do it. If you go this route, you might want to make a struct that owns the vector mutably, can return an immutable borrow to the slice, and change permissions on the slice. Now that I’m thinking about it, you can also implement a gets function on the struct that would return a Result<T> depending on whether it was an allow or a deny. I don’t think you’d need unsafe with this.
The solution mostly depends on the context surrounding how you’re managing what can access T and at what time. I can see the solution I proposed not working if you need more specific permissions than allow or deny, or if the permissions are based on the caller.
Edit: I’m going to come back in a few hours and write code about what I mean in the first paragraph.


Good bot
I use LMMS as my DAW. Its FOSS and has support for most things I’ve needed.


I think some people are being a bit of privacy freaks, so they don’t want to leave their data online. I still think its stupid tho cuz Ive posted questions, get a good response but forget after a while. Then when I do go back to remind myself, its deleted.


Just curious, but why 480?
I use LMMS although I’m planning on switching to reaper once I find out how to properly configure it and bring my LMMS presets in.
To use the latest version of LMMS, you have to click on the alpha or latest release version on the downloads page instead of whatever the main release is. If you ever want help figuring out LMMS, feel free to reach out.


Im saving this comment for sure


Honestly I never thought about the latency issue, but I probably won’t do it because of that now that you mention it. Much appreciated.


Ooh wireguard sounds like a great option
I get the want to not use boxes but, in my experience, I got over that by realizing that using boxes is basically just using malloc in C. Once I realized how often we malloc in C, I slowly was able to get over the Box bump. Also there’s some really cool features like dyn types and the type erasure pattern which I only learned a few months ago. It makes a lot of more complicated rust cpdebases make sense once I figured that out.