I freaking hate the CHAR type in C. Give me a normal string I'm begging you. I'll do anything.

@neauoire Devine I don't want to count characters anymore I don't want to deal with pointers pointing at things I just want to :sadlinux:

@thomasorus then don't count characters, just make a string type that doesn't rely on counting each character and checking if they're null. Just make that type and give it a length and that's it. It will be more like javascript

@neauoire Wouldn't giving a fixed masive length to this type consume a lot of memory and be the total opposite of using C? 😅

@thomasorus the length would be exactly the length of the string, and the char* would just point to where the string starts in your memory :)

@thomasorus honestly, i went down that road myself, and I had to turn back. Do you know why a string ends with a \0? Are you familiar with the ascii table?

@neauoire Yeah I remember reading stuff about this. Tbh I don't really want to go that road too. I'll stop for now and go back once I'm calmed down. There's probably something I missed and the solution is super simple.

@thomasorus once you get it, it's like clarity, you stop thinking of strings as words and letters, but just as a series of numbers from 0-255.

@neauoire Ok actually I'm a dumbass and I fixed it in 20 minutes.

Sign in to participate in the conversation

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.