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/)B
Posts
4
Comments
64
Joined
3 yr. ago

  • You don't need to be a dick about math just because billionaires use everything, including math, as a justification for their bullshit.

  • I'll attempt to give a more hand wavey approach, but one that is hopefully easier to understand.

    First, implement:

     c
        
    \\ find first index of `c` within string `str`.
    \\ returns true if found, sets `out` to result.
    \\ otherwise returns false.
    bool find(char* str, size_t len, char c, size_t* out)
    
      

    Now this can be used in a loop, where you supply a slice starting at the last line (or the beginning of the slice, on the first iteration), where len is the length of the original string minus the amount of characters consumed (index of the beginning of the slice, relative to the start of the original string).

    Note this requires calculating the string length beforehand, if this is a c-string (as in null terminated).

    This should be relatively simpler to understand and implement than what the standard library supplies, sadly the C standard library is not easy to use or very reliable, so you'll mostly have to make do yourself.

    I hope this helped, I'm currently away from a computer so i can't give a code example, good luck.

  • Damn

    Jump
  • the excretory organ

    You're so smart and mature for using such big words, definitely not vile and hateful.

  • In these kinds of times it can seem pointless, but please make sure you eat and rest well, grieving is taxing on the mind and body, take care.

    In the end all we can hope for is having given them a happy and comfortable life, I'm sure you did.

  • Seems like a good policy in general, open to changes, i hope this will make reviewers' job easier, considering how hard reviewing PR's for a university project with partners who insist on using LLMs for almost everything, i can barely imagine how frustrating this all must be.

  • I can see that, personally i dislike using C++, as it has so many different ways to solve the same problem, confining a project to use a specific subset of C++ is very difficult.

    Though mostly what i would like to be closer to other languages, is what is mostly standard across everything, like tuples, so i wouldn't have to do:

     c
        
    Err fallible(Arg argument, Out* output) { ... }
    
      

    But at least attributes allow me to warn if the error in this case is unused.

    Thing is, C can compile to anything, so i wonder if Zig/Rust can really be a drop in replacement in most use cases.

  • I don't know if I'd assume the same about them, as the way the argument was worded made it seem the new features aren't a positive, or are broken in some way, or at least gave the appearance of the actual reason being technical and not skill.

    I was originally thinking of the use case for C is when you need to have something in a closed ecosystem, as in no dependencies, so generics made sense as an example, and while I'm aware one can use rust, it usually enables (and in a sense encourages) pulling in many dependencies, which is not always desirable.

  • That's very fair for the linux kernel, I'm aware that they use more modern features of C, though i have no idea to what extent.

    It was part of the inspiration for asking this question to begin with.

  • If you're willing to share, are you talking about embedded?

  • C Programming Language @programming.dev

    Why do some C devs prefer using mainly C89 over C23?

  • Very nice read, the code examples were very clear :)

  • and megabool::Statistics

  • I'd say 2001 and 2006 purely because the scrollbar is textured in a way that make it seem dragable at first glance |=|.

    Which is standard by now but still, besides that 1998 has all the other visual cues to denote what's clickable and i would otherwise agree as i generally prefer flatter designs.

  • Yeah a good spicy soup does not take that much effort, and i live in a one room apartment (😭) and my kitchen has exactly one stove top (also 😭).

    Also south asian spices is a must.

  • We also cannot just block these websites, there are just too many of them, i hope some effective alternatives to search engine (or perhaps a modern community made index) will be developed soon

  • Yes.

  • Deleted

    Permanently Deleted

    Jump
  • Cover the bottom half of the face, this man isn't smiling using his eyes.

  • The right's real harm is framed as hypothetical, while the left's harm is made to look "just as bad, without giving an example, you probably know this but your friend is pretty much a right winger.

  • I really want to see what happens to the web at large if given a way to create websites using wasm instead of js.

    I'm also looking forward to seeing if any new frameworks (with hopefully better APIs, robustness or just better practices) will be developed for the web, I'm tired of inaccessible React (or React-like) applications that break easily.

  • Polyphemus treatment

  • Linux @lemmy.ml

    How would i go about creating themes for a desktop environment like Cinnamon or KDE Plasma?

  • Rust @programming.dev

    Inspired by madmo's post, my partner crocheted me a smaller but no less cute ferris :)

  • Rust @programming.dev

    This Week in Rust 632 · This Week in Rust

    this-week-in-rust.org /blog/2025/12/31/this-week-in-rust-632/