Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)E
Posts
26
Comments
377
Joined
3 yr. ago

DM for SimpleX

  • 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.

  • I always make sure to have my AAA g string on when I'm biking. If I land head first in a ditch, I know my ass is insured at least.

  • If you were a secretary, you could probably have some spare time during work hours to do what you like too!

  • 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.

  • And all the moderations should be down using optimized agentic workflows.

  • Holy fuck I forgot about this copypasta

  • Tell me what you think! Its my first real project.

  • Yeah I didn't want to just post it to some random platform, plus I wanted to contribute in some way so giving a torrenting guide seemed like the perfect choice!

  • Good bot

  • It's crazy how its robust to boxes being taken offline during training. That's honestly magic.

  • Does PIA stand for something?

  • Yeah me too, but I wanted to write a guide on torrenting and have a reason for people to potentially see my music in the process!

  • Piracy @lemmy.ml

    Learn how to Torrent by Downloading Something Legal

    files.catbox.moe /uycot5.torrent
  • Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ @lemmy.dbzer0.com

    Learn how to Torrent by Downloading Something Legal

    files.catbox.moe /uycot5.torrent
  • Yeah, it was a great outlet. Thanks for taking the time to listen!

  • A place to share your artwork, be it drawing, music, or something else! @lemmy.ml

    Kasr al Alaqa Album

    files.catbox.moe /uycot5.torrent
  • Obscure Music @piefed.social

    Kasr al Alaqa Album

    files.catbox.moe /uycot5.torrent
  • Music @beehaw.org

    Kasr al Alaqa Album

    files.catbox.moe /uycot5.torrent
  • Music @lemmy.world

    Kasr al Alaqa Album

    files.catbox.moe /uycot5.torrent
  • I think that would probably be a client implemented feature, not a Lemmy one. I also don't design social medias, so I don't really know.

  • Music @lemmy.world

    I made some songs and don't know the genre

  • Programming @programming.dev

    How have you made art with code?

  • Privacy @programming.dev

    Indeed Adds a Forced Arbitration Agreement to their Terms of Service

    www.indeed.com /legal
  • News @lemmy.world

    Nestlé dismisses CEO due to an inappropriate relationship with a subordinate

    apnews.com /article/nestle-ceo-inappropriate-relationship-c80cca44e9b4c76c9ed10aab00400bef
  • Privacy @programming.dev

    Consumer Rights Wiki

    consumerrights.wiki /Main_Page
  • Privacy @lemmy.ml

    FOSS Alternative to Privacy?

  • Rust @programming.dev

    How do you implement API Keys?

  • Waterfox @programming.dev

    What makes Waterfox different?

  • Rust @programming.dev

    How would you recommend rate limiting your own program?

  • Rust @programming.dev

    Do you know how to use Feedbacks in LibAFL?

    docs.rs /libafl/latest/libafl/feedbacks/index.html
  • Programming @programming.dev

    Making malware

  • Programming @programming.dev

    Good Computer Handbooks

  • Privacy @lemmy.ml

    Car Privacy is Shit

  • Linux @programming.dev

    Linux Server OSes?