Is that Rust copypasta about C and string mutation really true bros? C(hads), what's our response?

Is that Rust copypasta about C and string mutation really true bros? C(hads), what's our response?

CRIME Shirt $21.68

Nothing Ever Happens Shirt $21.68

CRIME Shirt $21.68

  1. 1 month ago
    Anonymous
    • 1 month ago
      Anonymous

      Surely this can not be true

      • 1 month ago
        Anonymous

        It's true. String processing is not a strong suit for C.

        C was created to run on DSP and Kernel. It's a DSL for niche hardware. It's nonsensical to use it anywhere else.

      • 1 month ago
        Anonymous

        it is for null terminated strings, strings with explicit length are fine. Null terminated strings can be useful in other situations though.

    • 1 month ago
      Anonymous

      And what if he wants whole [0..3]?

      It's not uncommon to create custom string functions which do this. In the end, C's curse is its shitty standard library.

      • 1 month ago
        Anonymous

        You'd have to create a new string type to emulate Pascal/C++/Rust strings too.

      • 1 month ago
        Anonymous

        Null terminated strings are so weird to begin with given that array termination in C is just “passing the length” everywhere. Why not do the same for strings then?

        The problem is that many functions expect a null-terminated string now so they must all be rewritten.

        And yes, surprise surprise, a language that came out 50 years later that learned from all the mistakes of past does things better.

        Of course C is terribly designed by today's standard, and in 50 years Rust will be too as people learned more.

        • 1 month ago
          Anonymous

          >And yes, surprise surprise, a language that came out 50 years later that learned from all the mistakes of past does things better.
          >Of course C is terribly designed by today's standard
          C was already badly design by the standards of the early 1960s, ten years before it existed
          By the time it came out it was downright laughable
          It succeeded despite itself, the JavaScript of its time

          • 1 month ago
            Anonymous

            >how to tell people you're stupid without telling them you're stupid.

          • 1 month ago
            Anonymous

            It sacrificed design for performance.
            Of course ALGOL was much more pleasant to program in, but C was designed as a language wherein operating systems could conceivably be written which before that was all done directly in assembly and it was a big improvement in that sense.
            Nowadays after many new innovations Rust manages to have the same performance but avoids most of it's warts.

          • 1 month ago
            Anonymous

            >It sacrificed design for performance.
            It wasn't even as fast as other systems languages until increased uptake (and competition from LIL) pressured them to add optimizations
            The main reason they didn't have an optimizing compiler right out of the gate was that their real priority was keeping the implementation simple
            In fact, with B, they made it too simple, and it was useless
            C was the compromise

          • 1 month ago
            Anonymous

            >other systems languages
            Such as? There was BCPL, PL/S, BLISS, JOVIAL, and assembly. PL/S, BLISS, and JOVIAL were proprietary to IBM, DEC, and SDC respectively, assembly wasn't portable, which left BCPL, which was (a) the parent language of B and (b) also didn't have an optimizing compiler.

          • 1 month ago
            Anonymous

            Yeah you covered most of the ones that mattered
            BLISS definitely had at least one optimizing compiler by 1972 (not that anyone can keep track of how many architecture-specific dialects there were) and its design was plenty influential even though the language itself was basically a dead end
            Fortran was the king of speed demons for like 50 years, but obviously wasn't something you'd use to write a kernel
            Pascal, maybe not in its original form, but dialects of it were in fact used for that purpose (at Apple and some other places I can't remember) in the 70s and 80s
            Anyway what I was trying to say was that speed was not the selling point of C when it was young
            It spread because it was "free" and portable and easy to bootstrap
            BCPL and B spread for about the same reasons, and were used for all kinds of shit, but C beat them by being the Unix language

        • 1 month ago
          Anonymous

          >Null terminated strings are so weird to begin with given that array termination in C is just “passing the length” everywhere. Why not do the same for strings then?
          Uh, you can. Everyone already knows this. Null-termination is concise and works fine for most applications, but for the minority of cases where it isn't appropriate, it is piss easy to just use a char array and length.
          I'm sure most of the complaining about C-strings is low effort trolling, but anyone who actually feels restricted by it is either a moron who doesn't know how to do the most basic things with the language, or so implosively autistic he would also get hung up on shampoo instructions ("rinse, repeat... repeat... repeat...reeeee).
          These type of threads only serve to remind what a shithole this place has become.

          • 1 month ago
            Anonymous

            The point is that the standard library and many other functions don't observe this convention and expect a null terminated string or the behavior is undefined.

            This speaks like having no experience programming in C. One has to pass a null-terminated string or completely re-invent the wheel every time, and that means copying the entire buffer when making a subslice of a string except for slicing to the end.

          • 1 month ago
            Anonymous

            >and that means copying the entire buffer when making a subslice of a string except for slicing to the end.
            You also need a workaround for null characters that may be present in the middle of your not-null-terminated string.

          • 1 month ago
            Anonymous

            >the standard library
            see:

            >Null terminated strings are so weird to begin with given that array termination in C is just “passing the length” everywhere. Why not do the same for strings then?
            Uh, you can. Everyone already knows this. Null-termination is concise and works fine for most applications, but for the minority of cases where it isn't appropriate, it is piss easy to just use a char array and length.
            I'm sure most of the complaining about C-strings is low effort trolling, but anyone who actually feels restricted by it is either a moron who doesn't know how to do the most basic things with the language, or so implosively autistic he would also get hung up on shampoo instructions ("rinse, repeat... repeat... repeat...reeeee).
            These type of threads only serve to remind what a shithole this place has become.

            >anyone who actually feels restricted by it is either a moron who doesn't know how to do the most basic things with the language, or so implosively autistic he would also get hung up on shampoo instructions

          • 1 month ago
            Anonymous

            >The point is that the standard library and many other functions don't observe this convention and expect a null terminated string or the behavior is undefined.
            oh no! Whatever shall I do without my strlen or strcmp or strtok?

          • 1 month ago
            Anonymous

            Prove to me more you never actually programmed in C.
            Try using any library for about anything complicated. They pretty much all expect strings to be null terminated.

          • 1 month ago
            Anonymous

            A lot more libraries expect you to pass in a char/void/uint8_t array with explicit length

          • 1 month ago
            Anonymous

            Which ones?
            Xlib, glib, Qt, OpenSSL, they all demand null terminated strings everywhere.

            Like, do you even ever do basic things like open files which of course want null-terminated strings?

          • 1 month ago
            Anonymous

            Real C programmers obviously don't use any of those, that would be a mistake and real C programmers don't make mistakes

          • 1 month ago
            Anonymous

            >Muh real programmers don't use Xlib
            yeah, zero experience in actually using C code in any actual code base.
            Again, what library doesn't use null-terminated strings.

            Literal string constants include them anyway.

          • 1 month ago
            Anonymous

            >Null-termination is concise and works fine for most applications, but for the minority of cases where it isn't appropriate,
            >strlen is a minor case

          • 1 month ago
            Anonymous

            strlen is deprecated
            use strnlen

          • 1 month ago
            Anonymous

            C is deprecated
            Use Rust or C++.

          • 1 month ago
            Anonymous

            I don't know much about c or rust, I can just sort of hack things together in python. But, you are responding like a shook homosexual, so I assume you're wrong. C wins.

          • 1 month ago
            Anonymous

            >I don't know much about c or rust
            We know. Biggest C shills are nocoders themselves.

          • 1 month ago
            Anonymous

            >Null-termination is concise and works fine for most applications
            please stop coping

        • 1 month ago
          Anonymous

          >They must all be rewritten
          Implying dumping UNIX like the turd it is would be a bad thing

        • 1 month ago
          Anonymous

          >And yes, surprise surprise, a language that came out 50 years later that learned from all the mistakes of past does things better.
          Null-terminated strings were already bad 50 years ago. C did not learn from any mistakes of the past and ignored what was considered the good way to do things.

    • 1 month ago
      Anonymous

      The catposter is an obnoxious troll and the post contains multiple dumb mistakes but let's examine the actual claims
      >the string is null terminated
      Obviously true
      "String" is a strong word when we're discussing C, because they're basically just a convention, but if you write a string literal, it's null-terminated
      >In order to slice the original string, the newly created slice must have a at the end
      True, with caveats
      The main issue here is that most of the C standard library, and shitloads of system calls, expect strings to be null-terminated
      You CAN use an alternate string representation with explicit termination, and write your own string manipulation functions that understand whatever idiom you choose (slice length, end pointer, whatever)
      You CANNOT control what other code expects at API boundaries
      >even their compilers aren't written in C anymore
      Also true
      Clang and other major C compilers were written in C++, and GCC migrated from C to C++ years ago
      Fringe options like tcc and pcc produce slower code than the above alternatives, and since they can't compile C++, they're not even much use for bootstrapping or diverse double-compiling, which is probably why they're effectively unmaintained

    • 1 month ago
      Anonymous

      >not knowing how strings works internally so you know to create your own slice class to avoid unnecessary copies
      Look, I'm not saying this is a skill issue and crustaceans can't into low level programming, but you guys keep posting some pretty moronic shit lately and thinking your lack of expertise about how shit works counts as a W.
      You say rust is good because C++ lacks memory safety and you think that's a W for you. In reality, good programmers never have an issue with memory safety because we just know how pointers work. When you pick rust you're telling everyone you're too dumb to know the internals of programming and you need the compiler to hold your hand so you don't have a nice day in the foot. We just don't aim the gun at our own feet. It's that simple.

      • 1 month ago
        Anonymous

        Clockwork.

        • 1 month ago
          Anonymous

          Anon, you use memes to cope with your lack of real skill. It's pathetic. Why don't you go learn how to reverse a linked list without chat GPT.

          • 1 month ago
            Anonymous

            Not a meme.

        • 1 month ago
          Anonymous

          Fix that last line you fricking hack

    • 1 month ago
      Anonymous

      In that same thread you find picrel

      • 1 month ago
        Anonymous

        And yet morons here keep falling for OP's bullshit.

    • 1 month ago
      Anonymous

      you will only ever output one string, you can use char arrays and then copy them to the actual file you are handling strings for. All of this quality of life bullshit never has any real applications.

      >b-but slicing makes up for my lack of knowledge and will!
      you need to know the range of chars in the string anyways no? hardcode the values into the new string you fricking moron, thats what the compiler is doing anyway.

      • 1 month ago
        Anonymous

        >you need to know the range of chars in the string anyways no? hardcode the values into the new string you fricking moron, thats what the compiler is doing anyway.
        Wtf are you trying to say? How does slicing correlate to lack of """knowledge and will"""?
        Cniles always say the most moronic shit imaginable.

        • 1 month ago
          Anonymous

          >Wtf are you trying to say? How does slicing correlate to lack of """knowledge and will"""?
          nta
          but he prolly means that youre a mong moron

    • 1 month ago
      Anonymous

      >he doesn’t know about string indexing

      • 1 month ago
        Anonymous

        >indexing will accommodate for shitty char* representation

  2. 1 month ago
    Anonymous

    char whole[] = "Whole slice";
    char *slice = whole + 6;

    Here's your zero-copy null-terminated slice.

    • 1 month ago
      Anonymous

      And what if he wants whole [0..3]?

      • 1 month ago
        Anonymous

        struct string {
        char *slice;
        size_t n;
        } Black person;
        char whole[] = "Whole slice";
        Black person.slice = whole;
        Black person.n = 3;

        • 1 month ago
          Anonymous

          >struct string {
          > char *slice;
          > size_t n;
          >}
          lmao well done, you just discovered std::string. Dumb frick cnile.

          • 1 month ago
            Anonymous

            ok? i primarily write sepples

        • 1 month ago
          Anonymous

          Obviously. The issue is that the entire stdlib and so many other functions expect null-terminated strings that it doesn't do much.

  3. 1 month ago
    Anonymous

    C doesn't have proper strings. In C++ there are
    1) Cstrings (actually char arrays), and
    2) proper/real strings.

    C is very bad language for processing text. C++ is much better at that. Which is why you should actually write mostly C but you should always use C++ strings in your programs. Or just use Go or Rust.

    • 1 month ago
      Anonymous

      std::string is so completly worthless that it shoud never be used by anyone for any purpose.

      • 1 month ago
        Anonymous

        Then why do cstrings lead to so many bugs and security vulnerabilities??

  4. 1 month ago
    Anonymous

    Its true... its all true...
    FRICK

    • 1 month ago
      Anonymous

      Not a meme.

      Clockwork.

      Surely this can not be true

      https://i.imgur.com/R4Di31y.png

      Is that Rust copypasta about C and string mutation really true bros? C(hads), what's our response?

      Get a life samegay

      • 1 month ago
        Anonymous

        Not a meme.

        Anon, you use memes to cope with your lack of real skill. It's pathetic. Why don't you go learn how to reverse a linked list without chat GPT.

        Clockwork.

        How to kill a cnile with a stroke:
        >tell him to implement double linked lists in C

        • 1 month ago
          Anonymous

          >rustroon thinks double -linked lists are hard
          protip: add a pointer to the last element of your list so that you dont need to traverse the whole shebang to add an element

          • 1 month ago
            Anonymous

            >shebang
            troony word
            >calls others troony
            pottery

          • 1 month ago
            Anonymous

            >origin of the word: mid 19 century
            aaah, 1 googling away from self btfo.
            thats sloppy, anon. you can do better, i believe in you

          • 1 month ago
            Anonymous

            the way shebang is pronounced is effeminate and thus troonypilled

          • 1 month ago
            Anonymous

            that depends entirely on who pronounces it

          • 1 month ago
            Anonymous

            Fun fact: The word vegana comes from the Latin word for "sheath" or "scabbard". The Latin word vāgīna originally meant "sheath" or "scabbard". Tay tay has a wiener scabbard or wiener sheath between her legs and few men have had the privilege to introduce the peanus weanus there...

          • 1 month ago
            Anonymous

            geg. that was instructive. have a you

          • 1 month ago
            Anonymous

            >protip: add a pointer to the last element of your list so that you dont need to traverse the whole shebang to add an element
            >dewd I'm so smart I know that pointers exist, what now?!
            That's not a protip, moron.

          • 1 month ago
            Anonymous

            lol, seething
            have a walk. youre gonna end up with an ulcer

          • 1 month ago
            Anonymous

            Not everyone has dogshit homosexual ulcer genetics like you, troony. Now hush, keep quiet. You're embarrassing yourself and it's just sad, you know that?

          • 1 month ago
            Anonymous

            >i didnt crash until now, so i dont need your seatbelts
            geg. you do you, anon. i will even support you in that endeavour, why not?

          • 1 month ago
            Anonymous

            There's no need to project your anamnesis on me.

          • 1 month ago
            Anonymous

            im the one who originated that saying doebeightever

        • 1 month ago
          Anonymous

          It's not possible to implement a doubly linked list in Rust safely.

  5. 1 month ago
    Anonymous

    C string handling is shit and it's always been shit. Even before rust existed, I remember hearing jokes about how the first thing a new C programmer did is make their own proper C strings library. Because C is shit at handling strings.

    IDK why you'd need a rust copypasta to tell you what's sitting right before your eyes. I don't even dislike C and I'll admit it.

  6. 1 month ago
    Anonymous

    rust async is cancer but I think they'll find a way to make it sensible

  7. 1 month ago
    Anonymous

    WHY DOESNT C HAVE A BUILT IN JSON LIBRARY, HASH MAP LIBRARY, HTTP SERVER AND CLIENT, GARBAGE COLLECTION, LAZY EVALUATION, KEYWORD ARGUMENT AND MULTIPLE RETURN VALUES? CNILES SEETHING

    • 1 month ago
      Anonymous

      >he doesn't know about libgc

    • 1 month ago
      Anonymous

      N-NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO C CAN'T HAVE STRINGS BECAUSE..... BECAUSE IT'S TOO HIGH LEVEL OF AN ABSTRACT*Segementation fault (core dumped)*

      • 1 month ago
        Anonymous
      • 1 month ago
        Anonymous

        Underrated

      • 1 month ago
        Anonymous

        cbros.... not like this...

        • 1 month ago
          Anonymous

          group cope therapy

          • 1 month ago
            Anonymous

            >I-I'm not coping YOU are coping

    • 1 month ago
      Anonymous

      do these things on your own and you will be a better programmer.

      • 1 month ago
        Anonymous

        >just reinvent the wheel you will be a "better" programmer

        • 1 month ago
          Anonymous

          unironically, yes.
          at the most basic level, its called "practical knowledge"
          (nta)

          • 1 month ago
            Anonymous

            "Practical knowledge" doesn't increase if you reimplement the same problem for the 50th time. The word you are looking for is "memorization".

          • 1 month ago
            Anonymous

            >doesn't increase if you reimplement the same problem for the 50th time.
            it actually does.
            or someone is as moronic as you and doesnt know you can re-use code.
            youre making different implementations with different parameters otherwise. in whose you most likely will be re using code anyways...

          • 1 month ago
            Anonymous

            >whose
            which. esl at 5am moment

          • 1 month ago
            Anonymous

            't increase if you reimplement the same problem for the 50th time.
            >it actually does.
            No it doesn't. Maybe that's what you are taught in the shithole you are from but that's far from the reality.
            >you can re-use code.
            So you are saying there's no point on solving the same problem for the 50th time? Good to know. Don't argue for the sake of arguing.

          • 1 month ago
            Anonymous

            catastrophic reading comprehension failure

            [...]

        • 1 month ago
          Anonymous

          I mean you will probably learn something from doing it.
          Not worth the time though, not worth it by far.

          • 1 month ago
            Anonymous

            What is worth the time then? Caressing your dick while you watch your hoscii or whatever the frick play runescape? You have so many years dude

          • 1 month ago
            Anonymous

            Open a good textbook.
            Implementing a JSON parser just to learn more about parsers is a lot of time for very little gain compared to reading a good book about how parsers work.

          • 1 month ago
            Anonymous

            you learn more than just about parsers.
            you learn about data structures
            you learn about optimization techniques
            you practice the language

            well, not (you) per se. cuz youre dum.
            and it shows.

            and when you by heart your book
            writing what you learn makes it active learning,and improves efficiency by multiples
            youre ignorant. and dum. and prolly wont do anything about it ever.

          • 1 month ago
            Anonymous

            >broo you discover data structures by parsing json
            Where do this brainlets even come from?

          • 1 month ago
            Anonymous

            no, using various data structures (which can be pretty funky in C), well, gives you practice in using data structures
            no wonder youre getting replaced by indians. you get btfo'd by basic causality.

          • 1 month ago
            Anonymous

            You can practice solving real world problems instead of making a shitty reimplementation of a json library. I can tell you are a mediocre programmer with zero practical knowledge in the industry by your posts, because you never had a deadline to meet.
            You're probably a college dropout hobbyist C programmer just like the 99% of the C "programmers" in this board. Go back to desktop threads and LARP there. You will never make it.

          • 1 month ago
            Anonymous

            >You can practice solving real world problems instead of making a shitty reimplementation of a json library.
            real problems like... fizzbuzz?
            you really should go to a place more suitabke to you.

          • 1 month ago
            Anonymous

            >real problems like... fizzbuzz?
            I don't doubt that's your peak achievement. Go back to your containment thread.

          • 1 month ago
            Anonymous

            >cant comprehend irony
            you are sub 80 iq, arent you?

          • 1 month ago
            Anonymous

            The real irony here is you. Stop giving programming advice as a hobbyist programmer. You are in no place for that.
            Go ahead, write another shitty json parser that nobody uses. I'm sure you will land a job some day.

          • 1 month ago
            Anonymous

            >i was only pretending to be moronic
            >but while were at it, no u
            pick one

          • 1 month ago
            Anonymous

            Ah yes, the meme-speak deflection. I'll let you have the last reply as a pity, because that's the only validation that you will ever get.

          • 1 month ago
            Anonymous

            i dont need your validation.
            i make my money from my code, directly. im my own customer, my own employer. i consume the tools i create, and thats how i make my bread.
            its all the validation i will ever need, wagie

          • 1 month ago
            Anonymous

            Real problems like writing a Windows registry dumper that runs in under ten seconds on every boot

          • 1 month ago
            Anonymous

            im on loonix. its not a real problem for me.

    • 1 month ago
      Anonymous

      >WHY DOESNT C HAVE A BUILT IN JSON LIBRARY, HASH MAP LIBRARY, HTTP SERVER AND CLIENT, GARBAGE COLLECTION, LAZY EVALUATION, KEYWORD ARGUMENT AND MULTIPLE RETURN VALUES? CNILES SEETHING
      C has string functions in the standard library but they don't work. It's like a language that has a JSON library that works so badly that the people who use the language tell everyone to ignore it and write their own.

      • 1 month ago
        Anonymous

        >rust trannies use third party library for async

        • 1 month ago
          Anonymous

          Because there isn't one in the standard library. This does not match the post

          It's not possible to implement a doubly linked list in Rust safely.

          You can do it with reference counting or you can do it with indices into your own storage

        • 1 month ago
          Anonymous

          >cniles just don't use async
          I'm not sure which is better

  8. 1 month ago
    Anonymous

    Write your own string library

  9. 1 month ago
    Anonymous

    >C(hads), what's our response?
    "shut the frick up moron and go back to /lgbt/"

    because posting "struct str {char *start; char *end;};" didnt do it

  10. 1 month ago
    Anonymous

    String slicing feels like it shouldn’t be that difficult, it’s basically just taking a char[] and AND-operating it with all ones for the new size and shifted by the range, that is like 3 lines of assembly tops

    This isn’t abstract at all

  11. 1 month ago
    Anonymous

    No rustards just like to pretend that there is such a thing as a zero copy string. That only works if you strictly only read from the string. If you mutate the string in anyway then you'll need to perform a copy. C can mimic this behavior you just have to be more explicit which is a good thing because you are not hiding what you are doing behind compiler magic.

    • 1 month ago
      Anonymous

      >cnile brainlet hasn't discovered CoW yet
      It's over

      • 1 month ago
        Anonymous

        >I-I'm not coping YOU are coping

        >rustroon needs an inbuilt for
        struct moo {char *start; char *end;};

        • 1 month ago
          Anonymous

          >cnile has to reinvent strings every single time to work with string
          Humiliation ritual.

          • 1 month ago
            Anonymous

            >rustroon doesnt know you can re-use code
            ugh. you might wanna chill with the humiliation rituals.
            im feeling dirty. it feels like punching children

          • 1 month ago
            Anonymous

            >reuisng code from stdlib is le hecking bad
            >reusing code from some shitty reimplementation is hecking good
            Most intelligent cnile.

          • 1 month ago
            Anonymous

            >homebrew implementation beats stdlib several times over
            wat do???

          • 1 month ago
            Anonymous

            Find a better language

            You will never be a real string.

            You will never be a real programmer

          • 1 month ago
            Anonymous

            >find a better language
            write one.

            >Cniles dancing around the lack of slicing because their shitty char* is useless.
            Cultbrain

            >t. filtered by pointers

          • 1 month ago
            Anonymous

            Slice IS a pointer, your shitty null terminated trash can't slice because your trash lang APIs work on null bytes instead of len.

          • 1 month ago
            Anonymous

            *2 pointers.
            or a pointer and a len, but thats less efficient to work with

          • 1 month ago
            Anonymous

            also:
            >api
            lol. codemonky. we call that libs.
            and if you use libs for strings youre gay and deserve using the nullbyte

          • 1 month ago
            Anonymous

            An API is a programming interface exposed by a library. Learn to code. Teaching you basic terminology is not a good use of my time.

            >he doesn't know that you have to copy the string address
            >What rust brainrot does to a MOFO
            NGMI

            Copying the string address is a constant time operation, copying entire string is linear time.
            If you do not understand the difference between string address and the entirety of string you are not fit for this conversation.

          • 1 month ago
            Anonymous

            >Learn to code.
            its a life long process.
            but youre a codemonkey, so what would you know about that?

            No sorry I cannot read gibberish. "I taught that wanna be that there is no such as a zero copy slice." is not valid English.

            childish.
            you must have autism.

          • 1 month ago
            Anonymous

            >Rustoids moving the goalpost because they lost
            Zero copy means zero copy not kind of zero copy. How about you learn to read before trying to code.

          • 1 month ago
            Anonymous

            >same guy
            nope. im not a rustroon. i dont samegay

          • 1 month ago
            Anonymous

            So am I talking to 2 ESL subhuman Black folk?
            Not surprised.

          • 1 month ago
            Anonymous

            >humiliation ritual
            Maybe to a degenerate such as yourself. I view it as a divine process of optimization. I find myself returning and optimizing more and more. I grow closer with true algorithmic enlightenment as I ponder the flow of electrons through my computer. My zen is unimpeded by my compiler. My soul is free while yours is bound and owned by the rust compiler. Your mind trapped in a box of ownership you can never unwrap().

          • 1 month ago
            Anonymous

            >reimplementing the same string library is le divine optmization xd
            Ok schizo moron. Keep your fanfic to yourself.

            >Learn to code.
            its a life long process.
            but youre a codemonkey, so what would you know about that?

            [...]
            childish.
            you must have autism.

            You are the same guy? Why do you reply multiple times? Can't put your thought into words at once?

            >Rustoids moving the goalpost because they lost
            Zero copy means zero copy not kind of zero copy. How about you learn to read before trying to code.

            Zero copy slices means zero copy slices. I fail to see why are you being hard-filtered by such a simple concept that was being used in 1960.

          • 1 month ago
            Anonymous

            >Zero copy slices
            There is no such thing. You have to copy something from the original. You either have to copy the address and a length or copy the whole thing. In the end copying is still occurring. Which surprise surprise you can do this exact behavior in C its just not a language feature. You have to implement it yourself, but that is not hard at all.

          • 1 month ago
            Anonymous

            >You either have to copy the address and a length or copy the whole thing
            That's not how pointers work. Pointers point to the original address, a pointer to a pointer will also refer back to the original address.

            Why the frick am I even wasting time teaching these third worlders CS101 shit anyways? Get the frick out, you will never make it.

          • 1 month ago
            Anonymous

            omfg you copy your pointers to registers to do anything with them
            american cs courses everyone...
            and you pay through the ass for that. lmfao

            nowonderyoure getting replaced with h1bs.
            youre worthless. worse than worthless.
            youre actively damaging to the company you work with

          • 1 month ago
            Anonymous

            >Rustoid hallucinations
            When did I ever say pointer to pointer? I said you need to copy the address. A pointer is just a memory address. You need to point to the start of your slice with a pointer and then you need a length to dictate how long your slice will be. That is still copying something from the string.

            Are you the same third worlder samegayging again?
            > you copy your pointers to registers
            You don't do that in C either, it's done in the compiler level. The register keyword is nothing but a compiler hint.
            Slicing does not work by copying the pointer, it works by creating another pointer that refers to the original address.

            And none of this has to do with zero copy slicing. Do not argue with me for the sake of arguing. You are not smart, and your desperate attempt in muddying the water is very clear to anyone who has done more programming than you.

          • 1 month ago
            Anonymous

            >you don't do that in C either, it's done in the compiler level.
            lol what a moron
            were not talking about how things "look",were talking about how things "work"
            im at a fricking loss
            youre really sub fricking 80

            and again,no, im not samegayging
            id take a screenshot but im not sure i can get anything to workon this pos old hardware im currently using.
            and even then i could modify the html to forge the (you)s or lack thereof

          • 1 month ago
            Anonymous

            >it works by creating another pointer that refers it the original address
            You are so fricking dumb it hurts. Where is that address stored? The fricking ether. Its stored in the fricking pointer. You can't reference the original address without getting that address from somewhere holy shit you rustoid are dumb.

            >were not talking about how things "look",were talking about how things "work"
            I'm talking about what YOU do, not the compiler.
            When I say slices are zero copy, where the pointer to the pointer is stored is none of my business as the kernel will determine the location of the pointer.

            My business whether slices are zero copy or not, and indeed they are.
            And when I say copy, it's copying the original sequence that the slice is referring to, not the pointer address. Don't muddy the water.

          • 1 month ago
            Anonymous

            lel what an idiot
            the compiler does only what you ask of him.
            >im sorry but its not i who killed the child, it was the car i was driving
            what a fricking fool you are
            fricking room temp iq motherfricker lmao

          • 1 month ago
            Anonymous

            >the compiler does only what you ask of him.
            No it does more than that. You are not writing machine code, you are writing a high level language.

            Do not argue for the sake of arguing, you are not smart.

          • 1 month ago
            Anonymous

            ahahaha and when you drive a car you move the pistons by hand, right?
            you rustroons are a riot
            just the relaxation i need after a day (night) ofwriting code

          • 1 month ago
            Anonymous

            >lose argument in every single technical merit
            >fully devolve into allegory
            As I said, you are not smart. I'll let you have the last reply like I did for the other nocoder ITT because pretending to "win" in IQfy is the only form of success you will ever taste. I'm a generous person.

          • 1 month ago
            Anonymous

            i dont need to be smart when im right
            didnt i call you a prostitutealready?
            didnt it transmit the idea that youre less than dirt for me?
            then why you think i care about your opinion aboutme?
            are you dumbon top of being dishonest?

          • 1 month ago
            Anonymous

            >it works by creating another pointer that refers it the original address
            You are so fricking dumb it hurts. Where is that address stored? The fricking ether. Its stored in the fricking pointer. You can't reference the original address without getting that address from somewhere holy shit you rustoid are dumb.

          • 1 month ago
            Anonymous

            >it works by creating another pointer that refers it the original address
            You are so fricking dumb it hurts. Where is that address stored? The fricking ether. Its stored in the fricking pointer. You can't reference the original address without getting that address from somewhere holy shit you rustoid are dumb.

            here you go
            25 secs between the twoposts
            also old shit laptop is why the space doesnt always register

          • 1 month ago
            Anonymous

            >Zero copy slices
            There is no such thing. You have to copy something from the original. You either have to copy the address and a length or copy the whole thing. In the end copying is still occurring. Which surprise surprise you can do this exact behavior in C its just not a language feature. You have to implement it yourself, but that is not hard at all.

            This thread is a damn disaster the collective IQ between these two morons is below freezing.

          • 1 month ago
            Anonymous

            >ad homonem
            you code in rust.
            no need to deny or confirm, i know that you do.
            intellectual dishonesty is the signature of your community

          • 1 month ago
            Anonymous

            Let me clear this up for you two. You're technically right in the narrowest possible sense the MOVing an address is technically a copy. But if a MOV is a copy then an add is a copy + addition. You see how dumb this is and you've just twisted yourself into this pretzel because you don't want to cede an inch of ground to the Rusttard.

            >you don't do that in C either, it's done in the compiler level.
            lol what a moron
            were not talking about how things "look",were talking about how things "work"
            im at a fricking loss
            youre really sub fricking 80

            and again,no, im not samegayging
            id take a screenshot but im not sure i can get anything to workon this pos old hardware im currently using.
            and even then i could modify the html to forge the (you)s or lack thereof

            You're even dumber and have twisted yourself around the other guy's pretzel. In fact, you're so dumb that I can't even explain why you're wrong without writing an essay explaining pointers and the type system. A fat pointer is just a pointer to some memory + a length. There aren't eleventy-billion levels of pointer indirection added when you do complex string operations, slicing a string is just some addition to the pointer and subtraction to the length.

          • 1 month ago
            Anonymous

            >because you don't want to cede an inch of ground to the Rusttard.
            stfu you prostitute
            rustroon started with insults.now he can get fricked

            >you're so dumb that I can't even explain why you're wrong without writing an essay
            i accept yourconcession
            you can go away now

          • 1 month ago
            Anonymous

            Those "mathgays" you hate invented pointers. C shills are the dumbest people on earth.

          • 1 month ago
            Anonymous

            its a fricking joke you fricking autismo you
            learn to human, scrub

          • 1 month ago
            Anonymous

            Your thousands of posts are all jokes?

          • 1 month ago
            Anonymous

            >thousands
            youre giving me more credit than is due
            unless you mean everything i postedin the past 4 years
            also no, i though it was pretty clear were talking about the picrel

            bc of your anal autism i guess i have to specify that all of my posts arent serious either...

          • 1 month ago
            Anonymous

            >disaster level IQ
            You don't understand what you are talking about. The string and the slice are different variables. That means they each need their own pointer to the address. When you create a slice you alloc the space for the slice either on the stack or the heap. Then you get the address from the original string and apply an offset if it doesn't start from 0. That is the address of your slice. Then you do a check to see if the substring is long enough for the requested length if it is you store that in the length variable. In the end copying is still required as you got the address for your slice from the original string.

            [...]
            >were not talking about how things "look",were talking about how things "work"
            I'm talking about what YOU do, not the compiler.
            When I say slices are zero copy, where the pointer to the pointer is stored is none of my business as the kernel will determine the location of the pointer.

            My business whether slices are zero copy or not, and indeed they are.
            And when I say copy, it's copying the original sequence that the slice is referring to, not the pointer address. Don't muddy the water.

            >don't muddy the waters
            That's what I was saying from the beginning. You go on and on about low IQ, but you didn't even read the post correctly.

          • 1 month ago
            Anonymous

            Can you read? I told you that you're right in the most useless possible way that copying the address is technically a copy but it is completely distinct from C where copying a string means copying the whole damn thing. If taking a slice of a string is a "copy" then so is every other machine instruction.

          • 1 month ago
            Anonymous

            >So is every machine instruction
            No argument there. My issue with this entire copypasta is that it faults C for not embracing a language feature that rust chose to add. C can do this its just not explicitly a feature. I would argue that the application for a read only slice is a pretty narrow scope. I guess it could be said that it is a nicer abstraction over substring which I won't argue.

          • 1 month ago
            Anonymous

            nta but
            >C for not embracing a language feature that rust chose to add
            C actually chose not to add this feature because B didn't have any structs and they wanted to maintain a level of familiarity with B and BCPL. Pascal already had this feature which came out before C.

          • 1 month ago
            Anonymous

            The entire problem is the fact that C can't do slicing ergonomically which means that C and the rest of the computing industry are forced to use an objectively inferior string representation. I like C and I think this a valid criticism. I would like to hear the Rusttard explain what he thinks the difference between a pointer and an address is and what he thinks the OS has to do with it lol.

          • 1 month ago
            Anonymous

            When did I say pointer and addresses are two different things?

          • 1 month ago
            Anonymous

            [...]
            Are you the same third worlder samegayging again?
            > you copy your pointers to registers
            You don't do that in C either, it's done in the compiler level. The register keyword is nothing but a compiler hint.
            Slicing does not work by copying the pointer, it works by creating another pointer that refers to the original address.

            And none of this has to do with zero copy slicing. Do not argue with me for the sake of arguing. You are not smart, and your desperate attempt in muddying the water is very clear to anyone who has done more programming than you.

          • 1 month ago
            Anonymous

            [...]
            >Slicing does not work by copying the pointer, it works by creating another pointer that refers to the original address.
            IDK what exactly you think but this is what convinced me you have absolutely no clue what a pointer or a slice is. As I said in my earlier post, this is you wrapping yourself around the other guy's pretzel.

            What? I still don’t see where I said they’re different? Can you quote the exact line?rrkt

          • 1 month ago
            Anonymous

            Let's back up and pretend I never said that.

            [...]
            Are you the same third worlder samegayging again?
            > you copy your pointers to registers
            You don't do that in C either, it's done in the compiler level. The register keyword is nothing but a compiler hint.
            Slicing does not work by copying the pointer, it works by creating another pointer that refers to the original address.

            And none of this has to do with zero copy slicing. Do not argue with me for the sake of arguing. You are not smart, and your desperate attempt in muddying the water is very clear to anyone who has done more programming than you.

            >Slicing does not work by copying the pointer, it works by creating another pointer that refers to the original address.
            This shit make 0 sense and I want you to elaborate. When I initially read it I thought you you thought it created another level of pointer indirection but I really don't know what you actually think.

            Either way you're wrong about pointers or you're wrong about slices, I'm currently leaning toward both.

          • 1 month ago
            Anonymous

            Yes I meant another pointer indirection such as &&str

          • 1 month ago
            Anonymous

            You're wrong then. A slice of a slice of a slice is still a &str. All slicing is is one or both of these: an addition to the pointer or subtraction to the length.

          • 1 month ago
            Anonymous

            A string is reference to a vector of u8s. If you slice it, it’s a reference to that reference. Of course the compiler will optimise the extra indirection away. But I never said pointer and adddress are two different things.

          • 1 month ago
            Anonymous

            https://godbolt.org/z/vnzbnxjhd
            Optimizations can't be observable in code.

          • 1 month ago
            Anonymous

            >but you didn't even read the post correctly.
            What post? You are confusing zero copy slicing with zero copy aliasing.

          • 1 month ago
            Anonymous

            >rustard doesn't understand slices
            >doesn't realize you still need to copy the string address
            No such thing as a zero copy string rustard.

          • 1 month ago
            Anonymous

            >confuses zero copy slices with zero copy aliasing
            >AGAIN
            There is no way we aren't living in a simulation.

          • 1 month ago
            Anonymous

            When did I say pointer and addresses are two different things?

            >Slicing does not work by copying the pointer, it works by creating another pointer that refers to the original address.
            IDK what exactly you think but this is what convinced me you have absolutely no clue what a pointer or a slice is. As I said in my earlier post, this is you wrapping yourself around the other guy's pretzel.

          • 1 month ago
            Anonymous

            >Rustoid hallucinations
            When did I ever say pointer to pointer? I said you need to copy the address. A pointer is just a memory address. You need to point to the start of your slice with a pointer and then you need a length to dictate how long your slice will be. That is still copying something from the string.

      • 1 month ago
        Anonymous

        >rustard doesn't understand slices
        >doesn't realize you still need to copy the string address
        No such thing as a zero copy string rustard.

        • 1 month ago
          Anonymous

          >zero copy string
          zero copy SLICE you fricking subliterate mongrel brainlet.

          • 1 month ago
            Anonymous

            >when all else fails, just grammar nazi
            i dont think the other anon will accept this concession

          • 1 month ago
            Anonymous

            >reeeee
            Fricking cope rustoid. You know you lost and must return to the hells from whence you emerged.

          • 1 month ago
            Anonymous

            >reeeee
            Fricking cope rustoid. You know you lost and must return to the hells from whence you emerged.

            >get filtered by slices
            >y-you lost
            NGMI cnile

          • 1 month ago
            Anonymous

            >rustoid reduced to rewriting history
            NGMI, I taught that wanna be that there is no such as a zero copy slice. At the end of the day just like how you guys are dependent on soi for your nutrition you are also dependent on the compiler for your technical prowess. Your minds decay from the lack of use and you say silly things. C will always have a place because it rejects your silly notation of zero cost abstraction. Your language is the worse kind of footgun. The kind that makes you less intelligent for using it.

          • 1 month ago
            Anonymous

            >I taught that wanna be that there is no such as a zero copy slice.
            Just because your shitty representation does not support zero copy slices doesn't mean it is impossible.
            In fact it was possible to do zero copy slices in ALGOL 60 but cnile cult brainrot has completely damaged an entire generation of programmers perception of computing.

          • 1 month ago
            Anonymous

            >he doesn't know that you have to copy the string address
            >What rust brainrot does to a MOFO
            NGMI

          • 1 month ago
            Anonymous

            >reading comprehension failure
            this seems to be a pattern with you rustroons.

          • 1 month ago
            Anonymous

            No sorry I cannot read gibberish. "I taught that wanna be that there is no such as a zero copy slice." is not valid English.

          • 1 month ago
            Anonymous

            You will never be a real string.

      • 1 month ago
        Anonymous

        >CoW
        >COPY on Write

        • 1 month ago
          Anonymous

          ON WRITE
          N

          W
          R
          I
          T
          E

          • 1 month ago
            Anonymous

            glad we agree, because that's exactly what

            No rustards just like to pretend that there is such a thing as a zero copy string. That only works if you strictly only read from the string. If you mutate the string in anyway then you'll need to perform a copy. C can mimic this behavior you just have to be more explicit which is a good thing because you are not hiding what you are doing behind compiler magic.

            was saying :^)

          • 1 month ago
            Anonymous

            >readonly operations are fake news now
            AINTNOWAY this is not a simulation. You are a low functioning bot designed to see how I react to brainletism

          • 1 month ago
            Anonymous

            >That only works if you strictly only read from the string.
            lrn2read moron

          • 1 month ago
            Anonymous

            Your point being?
            >left turn doesn't exist if you are taking the right turn
            unreal bro

          • 1 month ago
            Anonymous

            anon, I legitimately hope you're pretending to be moronic, this is actually concerning. Reread the reply chain and think about what the initial posts said for a little bit. I'll give you a hint, we are not actually disagreeing on anything.

        • 1 month ago
          Anonymous

          >firetroony updoot in the beckground
          >you hav to restart now
          what a gay ass fricking browser.
          iminstalling braev

          anyhoo
          it was fun and relaxing
          cya around,rustroons

          lol. self btfo as a cherry ontopof this thread
          emperor bless you, anon

  12. 1 month ago
    Anonymous

    in c you use loops to do anything with strings.
    people just don't want to write for loop for some reason.

  13. 1 month ago
    Anonymous

    >Cniles dancing around the lack of slicing because their shitty char* is useless.
    Cultbrain

  14. 1 month ago
    Anonymous

    I know programmers that use strings and they are all cowards

  15. 1 month ago
    Anonymous

    Holy shit people on IQfy literally have no clue how the computer physically does things

    Literally the blind leading the blind

    • 1 month ago
      Anonymous

      Every other iteration of this thread some Cnile will reveal that they think that the C string representation is something intrinsic at the machine level. Now we've got a Rust homie in here with a misunderstanding of pointers so bad it's impossible to pinpoint what exactly he thinks pointers actually are. It really is bad.

      • 1 month ago
        sage

        The rust poster is moronic

      • 1 month ago
        Anonymous

        You don’t know what I think what pointers are and yet you’re saying what I think is wrong?

      • 1 month ago
        Anonymous

        >Now we've got a Rust homie in here with a misunderstanding of pointers so bad it's impossible to pinpoint what exactly he thinks pointers actually are. It really is bad.
        He didn't misunderstand pointers. He knows the difference between a pointer and a string. C shills don't know the difference between an address of a string and the string itself. When the Rust chad says pointers are not strings and copying the pointer does not copy the string, you can't even understand him.

  16. 1 month ago
    Anonymous

    I reported OP for instigating a flamewar. In before I get banned for announcing a report and OP's thread will make it to bump limit, filled with trolling and flaming.

  17. 1 month ago
    Anonymous

    >using C for string manipulation
    What kind of masochistic shit are you nibbas up to?

    • 1 month ago
      Anonymous

      nigo
      you write your code once and then you live happily ever after
      its like you high level gays forgot you can reuse code

  18. 1 month ago
    Anonymous

    Some rust programmer explain me this: Let's say I have a string slice, and I want to open a file with that slice. The linux syscall expects a null terminated string. How can rust do this without copying the string?

    • 1 month ago
      Anonymous

      The standard library makes a copy of the string.
      On Windows it'll even transcode it from WTF-8 to UCS-2.
      I expect the syscall itself is far more costly regardless.

      • 1 month ago
        Anonymous

        So the slices are zero-copy until they suddenly aren't?
        I don't get this then. If I'm writing my own code, I'll use pointer + length where it makes sense. Just like rust. If i need to make it a null terminated, either 1) copy it, or 2) just insert a NULL byte where it is needed, and after the operation write the original character back. Rust also copies it where needed. Seems to me it works the same.

        • 1 month ago
          Anonymous

          The nice thing is that all of the standard library already works like that and so do all the third-party libraries. You don't have to swim upstream for this. It just werks.
          There's no part of it that's impossible to roll yourself in C.

Your email address will not be published. Required fields are marked *