Details
-
AboutPassionate about C just as much as I am about U 😉
-
LocationWouldn't you like to know~
Joined devRant on 4/24/2024
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Lol, I find it funny that it's specifically the LARGEST fish that becomes the female.
Just goes to show xD -
@Demolishun Because usually it's them who's racist? By a LARGE margin.
-
@electrineer Huh? What do you mean?
-
@godisded Fuck yourself so hard till you bleed to death, trash.
Scum. -
What's your evil villain plan?
-
Oh, yeah, namespaces are neat, basically that's how containers work.
You're not actually becoming root, it's a bit different, but yeah, "root". -
@devRancid Well, that's the same question of what I'm asking, why are there only 10% (Don't know if it's the actual number but some small percentage) women in CS education?...
-
@awesomeest First, I'm not a dude(Tch..)
But I am aware of Arduino (wanted to say ofc, but perhaps it's not as common nowadays).
But those two are completely different platforms, and they excel at solving completely different problems/projects.
RPi is a whole computer, with an OS and is useful for when you want/need a cheap PC to do some task, for example some sort of server, "NAS", file IO, something that requires daemons or existing utilities/programs/services in an OS, etc'.
Arduino is a board, just a processor with some memory and the option to connect peripherals and sensors and the such. It's more suited for much lower level projects like working directly with signals, robotics, pure computation(Without the need of an OS or file I/O or libraries)
They are similar in appearance but either is great at what the other is less suited for. -
@thebiochemic I thought you were meme-ing at first but wow, banana pi is a thing.
Thanks -
@lorentz Well, such things should be properly documented. At least I do so... For example if I write a function that returns a malloc'ed pointer I make sure to write that it's the user's responsibility to free the pointer, or if there's a structure that contains allocated pointers and there's a close/free/release function for it, I make sure to document it in the function that initializes the structure, and if I'm not sure how best to convey ownership/borrowing/responsility to the user in the docs I usually just open STL docs of some function that does something comparatively similar and look how they document it and take inspiration.
I know writing docs and warnings and stuff like that can be hard, but that's something that just has to be done. -
@Liebranca Well... What you said about realloc is clearly defined in the documentation, and in every website that details the STL (Like cppreference for example), and in the K&R book... It is very CLEARLY documented how realloc works, and that what you described happens, so I see no reason why this should be a surprise or a "bug out of nowhere". If someone's code stopped working because of this it means they half-assed it or just copy-pasted from stack overflow... In which point I also expect there to be stuff like skipped failure checks and the code probably SEGFAULTs on every third incorrect sneeze.
You don't even need to know memory(Tho I would greatly advise it when working in any low level context) you just gotta know how to read.
Like it's not even an edge case, that's the normal behaviour. -
@Lensflare I'm not sure I agree(About people who start from higher languages)
I started from Java and C#, and I didn't really struggle with comprehending pointers when I learned C. If anything, a lot of Java's OOP stuff suddenly became much clearer and simpler to understand after doing C for a while. In a "Ohhh, so this is how the magic works, it's simpler than it looks" kinda way. -
@retoor if the string concat by realloc stopped working after a few thousand times my first guess is forgetting to free?
sizeof(Pony) instead of sizeof(pony) since sizeof(pony) is size of a pointer, which is just 8 bytes(usually), so it "works" because usually the memory right next to malloc'd memory is not used and not proteceted or anything, until one of the times the memory right next to the malloc'd one is protected or "not yours" or whatever and then accecing any field of Pony that is beyond the first 8 bytes would access that memory and SEGFAULT.
And I don't really know python but I would assume reading a python book doesn't really make you a python expert either?