This might be the exact moment where programming went to shit - /g/ (#106149214) [Archived: 267 hours ago]

Anonymous
8/5/2025, 3:07:39 PM No.106149214
1730270530292845
1730270530292845
md5: 76299171040b9a7c439767562677ceb1🔍
The invention of this noob tool
Replies: >>106149225 >>106149240 >>106149496 >>106154430 >>106159157 >>106159898 >>106160900
Anonymous
8/5/2025, 3:08:52 PM No.106149225
>>106149214 (OP)
Skill issue linked to wrong race.
Replies: >>106158100 >>106160981
Anonymous
8/5/2025, 3:09:56 PM No.106149240
>>106149214 (OP)
True memory copy should be done using language constructs-
Replies: >>106149337 >>106152269
Anonymous
8/5/2025, 3:19:41 PM No.106149337
>>106149240
If you have to copy memory, your software is already curry shitfest that I don't ever want to touch.
Replies: >>106149363 >>106159161
Anonymous
8/5/2025, 3:22:18 PM No.106149363
>>106149337
post code faggot
Replies: >>106149447
Anonymous
8/5/2025, 3:31:14 PM No.106149447
>>106149363
Fuck off tranny, why don't you invent something for once without copying others? Oh no, would that make you realize that you're a low IQ faggot who's not all that intelligent if you tried to do that? Awww, are you gonna cry and piss and shit yourself now? Thought so you spastic faggot.
Replies: >>106149522 >>106149543 >>106150225
Anonymous
8/5/2025, 3:36:29 PM No.106149496
>>106149214 (OP)
the problem with it is not that it's a "noob tool", but rather the fact that it was "noob-proofed" by being implemented as a memmove().. sometimes.. on some platforms.. in some implementations.. in some architectures.
it's is this kind of mix of under-specification, and randomly chosen implementation-specific behavio(|u)r that caused a lot of bugs to show up.. some of the time.. in some......
but there are no real coders. so i will leave this thread to continue to shit itself with nocoder talk, including from yourself.
Replies: >>106150519
Anonymous
8/5/2025, 3:38:34 PM No.106149522
>>106149447
>nocodeshitter
i expected that
Replies: >>106149551
Anonymous
8/5/2025, 3:40:07 PM No.106149543
>>106149447
>current year
>rustrannies still haven't written a single piece of original code
Those guys are just as pathetic as jeets
Replies: >>106149551
Anonymous
8/5/2025, 3:40:40 PM No.106149551
>>106149543
>>106149522
Go ask a LLM to vomit some free code for you, that's the only thing you deserve, H1B faggot.
Replies: >>106149583
Anonymous
8/5/2025, 3:44:00 PM No.106149583
>>106149551
>still no code
why do you make threads if youre so retarded you cannot project yourself 5 mins into the future
why do you talk about programming when youre a nocodeshitter?

are you trolling?
Replies: >>106149602
Anonymous
8/5/2025, 3:45:38 PM No.106149602
>>106149583
LLM will write as much free code as you want. Quality might match the price, but you weren't planning to pay me, were you?
Replies: >>106149634
Anonymous
8/5/2025, 3:49:13 PM No.106149634
>>106149602
>dances around the issue
ok, youre a nocodeshitter talking out of your ass
Anonymous
8/5/2025, 4:33:32 PM No.106150081
confuscat
confuscat
md5: ea3ae1315c68ae45345566016c0fb5b7🔍
What? What's wrong with memcpy now? Performance? Safety? What the fuck is the point this shitty thread is trying to make ?
Replies: >>106150368 >>106156203
Anonymous
8/5/2025, 4:47:12 PM No.106150225
GvfKdhnWgAAmCbl
GvfKdhnWgAAmCbl
md5: 861ff0e6e267918cdb6c7ba2f75f97a5🔍
>>106149447
Also this is quite a retarded post. If you actually invented anything, or have immersed yourself in the works of someone who seemingly invents things, you'd know basically everything is always derivative, and incremental improvement or a remix of existing inventions.
OP must be like a 16 year old faggot or something.
Replies: >>106150433
Anonymous
8/5/2025, 5:05:22 PM No.106150368
>>106150081
i'm not sure myself there are two faggots bickering about god knows what not realizing software couldn't even exist without copying memory
Anonymous
8/5/2025, 5:12:42 PM No.106150433
>>106150225
Yes, I didn't invent a computer, but at least my code isn't as shit as yours, go fuck yourself, moron.
Replies: >>106158156
Anonymous
8/5/2025, 5:19:24 PM No.106150519
>>106149496
nobody has ever implemented memcpy as memmove. What might vary between implementations is the size of the chunks that get moved at once, whether it moves bytes at a time, words, dwords, etc. But only a retard would depend on an implementation detail at that level, they can't blame the implementation for their fuck up.
Replies: >>106154126 >>106158112
Anonymous
8/5/2025, 7:37:47 PM No.106152269
>>106149240
memcpy, in the way it's implemented does a lot of things. On most modern OS, it will copy pages using CoW which will reduce memory usage and prevent useless copy if you didn't plan to modify the copied data anyway, though that only applies for large chunks.

Also there's a benefit of having memcpy as a library feature instead of as a language construct. Say you have a compiled program for bare minimum x86 cpu. Then at runtime the memcpy implementation may choose a more suited alternative targeted for your specific instruction set. Windows has a feature to dynamically choose which function you want to use for each symbol. Elf does something similar with IFUNC

extern void memcpy(unsigned *data, size_t len);

void memcpy_c(unsigned *data, size_t len) { /* ... */ }
void memcpy_sse42(unsigned *data, size_t len) { /* ... */ }
void memcpy_avx2(unsigned *data, size_t len) { /* ... */ }

extern int cpu_has_sse42(void);
extern int cpu_has_avx2(void);

void memcpy(unsigned *data, size_t len) __attribute__((ifunc ("resolve_memcpy")));

static void *resolve_memcpy(void)
{
if (cpu_has_avx2())
return memcpy_avx2;
else if (cpu_has_sse42());
return memcpy_sse42;
else
return memcpy_c;
}
Replies: >>106159876
Anonymous
8/5/2025, 9:45:24 PM No.106154126
>>106150519
wrong on all accounts. and even if you're a nocoder (which is the case obviously), you would have known that you're wrong if you bothered with a little bit of searching. if you did, you would have found THOUSANDS of related search results. Here is one sample:
https://lwn.net/Articles/414467/
hell, you only had to be an average user from the era where libflashplayer.so had to be binary patched replacing memcpy() with memmove() to have heard about this.
but you are the typical zoom zoom kido nocoder with the typical "just don't write bad code" and "real programmers(TM) would never do this" nocoder retarded insights.
Replies: >>106158319 >>106159181 >>106159876
Anonymous
8/5/2025, 9:51:54 PM No.106154227
wtf does this even mean
Anonymous
8/5/2025, 10:06:56 PM No.106154430
>>106149214 (OP)
It should just be assignment and the actual code is generated by the compiler for the specific type.
Anonymous
8/6/2025, 12:34:04 AM No.106156203
>>106150081
Some retard seems to think it is possible to never copy memory in at least the large majority of code. I'm guessing that he's having a bad trip as a result of too much meth and acid.
OP is deranged. News at 11.
Anonymous
8/6/2025, 4:27:40 AM No.106158097
std::copy if you aren't unemployed
Replies: >>106159172
Anonymous
8/6/2025, 4:28:47 AM No.106158100
>>106149225
fpbp
Anonymous
8/6/2025, 4:30:47 AM No.106158112
>>106150519
lol
lmao even
Anonymous
8/6/2025, 4:36:51 AM No.106158156
>>106150433
Only due to the trivial case (you've never written any)
Anonymous
8/6/2025, 4:59:46 AM No.106158319
>>106154126
you have an impressive amount of confidence for someone who has no cue what he's talking about
>libflashplayer.so had to be binary patched replacing memcpy() with memmove()
I'll spoonfeed you: fixing something by replacing memcpy with memmove does not mean that the original memcpy implementation was a memmove. As I said, it definitely wasn't because that would be retarded
Replies: >>106159181
Anonymous
8/6/2025, 7:24:48 AM No.106159157
>>106149214 (OP)
Easily the best thing about C. Other languages can only cope.
Anonymous
8/6/2025, 7:25:49 AM No.106159161
>>106149337
>t. confirmed nocoder (and very unaccomplished bait poster)
Anonymous
8/6/2025, 7:26:50 AM No.106159172
>>106158097
Name 10 C++ codebases that aren't absolute dogshit.
Anonymous
8/6/2025, 7:28:07 AM No.106159181
>>106154126
>>106158319
Schizo samefag.
Anonymous
8/6/2025, 9:39:46 AM No.106159876
>>106154126
They didn't patch it by modifying the binary.
ELF, has a feature called IFUNC where you can customize the resolution logic for the runtime linker. I explained it in this post >>106152269

They patched glibc instead, any program that was made for glibc < 2.14 will have it's memcpy resolve to memmove. The reason is that developers copied overlapping buffers which is incorrect since memcpy expects restrict parameters, however due to the implementation of memcpy at the time, it created no issue. However, with modern memcpy implementations copying large chunks at a time, the source and dest must absolutely not overlap.

Here's what memcpy's man says:
In glibc 2.14, a versioned symbol was added
so that old binaries (i.e., those linked against glibc versions
earlier than 2.14) employed a memcpy() implementation that safely
handles the overlapping buffers case (by providing an "older"
memcpy() implementation that was aliased to memmove(3)).
Anonymous
8/6/2025, 9:44:13 AM No.106159898
>>106149214 (OP)
>memcopey
It's in the name
Anonymous
8/6/2025, 12:37:50 PM No.106160900
>>106149214 (OP)
>mov edi, <dest>
>mov esi, <src>
>mov ecx, <n>
>rep mov[sb]
Anonymous
8/6/2025, 12:50:42 PM No.106160981
>>106149225
fpbp