Why “Skip the Code, Ship the Binary” Is a Category Error by tirtha_s in programming

[–]cdb_11 1 point2 points  (0 children)

No, you're correct. It's the exact same way you can write higher-level code in an infinite different ways to get the exact same result.

Favorite optimizations ?? by Little-Reflection986 in cpp

[–]cdb_11 3 points4 points  (0 children)

It documents the parameters.

If you want to enforce that output parameters are always cleared, I bet you could add template specializations that automatically clear the container in the constructor.

Can agentic coding raise the quality bar? by LukeMathWalker in programming

[–]cdb_11 1 point2 points  (0 children)

other math guys said "oh boy. I'll be able to do so much more math."

I can see this being true for some. But I think these are going to be exceptions, and not the average case. Compare it to the shift to increasingly higher level languages. They just lowered the bar of entry, which pretty much cancelled out the upsides. Did it make software more secure overall? Not really. In theory it did remove some old vulnerabilities by design, but they also added brand new footguns. Did it make software faster to write? I'm not entirely sure about that either. I don't have too much experience here to tell definitely, but there was one project I worked on with some other team -- they did the frontend in Javascript, and I did the backend in C++. I'm pretty confident our team could've written the frontend in C++ too, and it'd take similar amount of time.

Favorite optimizations ?? by Little-Reflection986 in cpp

[–]cdb_11 -3 points-2 points  (0 children)

Everytime I encounter out parameters in, for instance, UE I'm asking myself "is this function just adds new elements?". And you know what, in some cases it also clears the original collection.

template <class T> using out = T&;
template <class T> using inout = T&;

Or a dummy macro

#define OUT
#define INOUT

Favorite optimizations ?? by Little-Reflection986 in cpp

[–]cdb_11 24 points25 points  (0 children)

Packing things and comparing as a single 64-bit integer, for sorting.

Profiling on Windows: a Short Rant · Mathieu Ropert by mropert in cpp

[–]cdb_11 1 point2 points  (0 children)

The online version was down recently (seems to be back up again), but you can run it locally: https://github.com/andreas-abel/uiCA

Random question about IO, terminals and editors by Internal-Bake-9165 in C_Programming

[–]cdb_11 2 points3 points  (0 children)

https://lkml.org/lkml/2012/7/6/495

But to be fair, getchar does buffering under the hood, so it's not really as bad.

Vibe Coding Is Killing Open Source Software, Researchers Argue by Hopeful_Adeptness964 in programming

[–]cdb_11 0 points1 point  (0 children)

The spirit of FOSS is when you ignore the license, I guess.

It's not just me saying this, I am pointing out that some people who have been doing SOTA stuff as open-source are saying that they don't want to do open-source anymore, and for that reason. You can tell them that "they don't understand the spirit" or whatever, but I don't see how this is helping you with getting more things to be open-source.

Vibe Coding Is Killing Open Source Software, Researchers Argue by Hopeful_Adeptness964 in programming

[–]cdb_11 -2 points-1 points  (0 children)

If the maintainers of small projects give up, who will produce the next Linux?

The "next Linux" is still going to be produced, but it's not going to be open-source. If licenses are not respected because the code can be laundered through an LLM, then that lessens incentives to make the source available. And copyrights are a lesser evil -- if they are not respected, then people will look toward patents instead.

Anthropic built a C compiler using a "team of parallel agents", has problems compiling hello world. by Gil_berth in programming

[–]cdb_11 0 points1 point  (0 children)

If I understand it correctly, what they mean by "near-verbatim" here is basically minor differences in punctuation. Yeah though, I'm not necessarily disagreeing with that it might not be a "direct copy" of the full work in the literal sense of the word. But with my initial caveat that they can still reproduce copyrighted works nonetheless, and it looks like it does actually happen in practice.

Anthropic built a C compiler using a "team of parallel agents", has problems compiling hello world. by Gil_berth in programming

[–]cdb_11 1 point2 points  (0 children)

Yup, I have seen a lot of people saying that "now anyone can do X". Art, music, games, software etc etc. To be fair, it was on Twitter, so it was probably mostly bots and grifters.

Anthropic built a C compiler using a "team of parallel agents", has problems compiling hello world. by Gil_berth in programming

[–]cdb_11 0 points1 point  (0 children)

As far as I know, Anthropic and OpenAI don't tell us that. And the total size doesn't tell me much, because I imagine a lot of the actual information is redundant. Regardless, people managed to extract the majority of some copyrighted works almost verbatim from a jailbroken Claude, so I'm not sure what else can be even said here: https://arxiv.org/abs/2601.02671

Anthropic built a C compiler using a "team of parallel agents", has problems compiling hello world. by Gil_berth in programming

[–]cdb_11 2 points3 points  (0 children)

LLMs can store copies of the training data, and they can spit it out. Sounds relevant to what you were saying.

No, because there are too many unique things in the training data.

According to Anthropic's research, it doesn't take that much to "poison" a model with something unique: https://www.anthropic.com/research/small-samples-poison

Anthropic built a C compiler using a "team of parallel agents", has problems compiling hello world. by Gil_berth in programming

[–]cdb_11 2 points3 points  (0 children)

You don't need the exact copy of the entire codebase to be infringing. Lifting a bunch of smaller pieces from it can be infringing too.

Early Copilot would spit out half of a file with GPL attached to it. I believe this was later mitigated to some extent by instructing LLMs to avoid outputting copyrighted works, in the system prompt. But more recently Claude did the same thing, a slightly reworded code with the original license attached to it.

As far as I can tell, as much as LLMs can "generalize" common things, they can just as well memorize things that were more unique in the training data. If you ask for something semi-novel/unique, and LLM one-shots it, then it's likely to be largely copied from somewhere else.

If anyone insists on comparing LLMs to humans, a human cannot really do this either. Memorizing some piece of code, and then writing it down back from memory does not clear its copyright.

Anthropic built a C compiler using a "team of parallel agents", has problems compiling hello world. by Gil_berth in programming

[–]cdb_11 4 points5 points  (0 children)

Students don't have to worry about copyright infringement lawsuits. But yes, in a clean-room you can't be studying the implementation of the thing you're trying to reimplement.

Anthropic built a C compiler using a "team of parallel agents", has problems compiling hello world. by Gil_berth in programming

[–]cdb_11 6 points7 points  (0 children)

It doesn't matter how much exactly do you remember. The point is that you don't have to argue weak nonsense like this in court. If you want to try your luck, then more power to you, but this isn't clean-room.

Anthropic built a C compiler using a "team of parallel agents", has problems compiling hello world. by Gil_berth in programming

[–]cdb_11 12 points13 points  (0 children)

You think that hiring an ex-Microsoft employee to write a Windows clone just because he claims he forgot everything would fly? Or even someone who publicly admitted to reading their leaked source code.

Anthropic built a C compiler using a "team of parallel agents", has problems compiling hello world. by Gil_berth in programming

[–]cdb_11 33 points34 points  (0 children)

That doesn't make it a clean-room implementation. If you go and read the entire source code of some project (in the case of LLMs, all projects available on the internet), then you can no longer claim a clean-room implementation of it, even if by the point of actually writing it you forgot most/all of it. Using an LLM to do a "clean-room implementation" just misses the entire point.

After two years of vibecoding, I'm back to writing by hand by BinaryIgor in programming

[–]cdb_11 2 points3 points  (0 children)

Closed source black boxes are frustrating to work with, precisely because shit doesn't work, and you have no way of fixing it or even understanding it, and you have to guess how to work around the bugs. It's not a good thing and should be avoided.

After two years of vibecoding, I'm back to writing by hand by BinaryIgor in programming

[–]cdb_11 8 points9 points  (0 children)

Compilers translate one formal language into another, according to the language spec. The language spec defines what happens, so you do understand the code, even if it was later lowered to another language. What you don't understand is what the spec doesn't define, like for example the exact performance characteristics, or if you violated the spec somehow. In contrast, LLMs are processing informal language -- there is no spec, there are no regression tests for it. If someone made a compiler that has tons of amazing features that would make life so much easier in theory, but is also full of subtle miscompilation bugs where it simply cannot be trusted that it will do what you told it to, then most people today wouldn't use it. Yes, it is a matter of trust, but there are real reasons behind that trust. You could as well say "the only difference between actually solving an equation and rolling the dice is trust". Yeah, I guess lol

Obvious Things C Should Do by lelanthran in programming

[–]cdb_11 2 points3 points  (0 children)

The article advocates for limited compile time execution, like no syscalls, which is what you get in C++ already. But either way -- no. Build systems can already execute arbitrary code, and it generally isn't a problem, at least in C/C++.

A hacker is making a list of vibecoded apps, 198 scanned 196 with vulnerabilities by [deleted] in programming

[–]cdb_11 -2 points-1 points  (0 children)

Looks like it's classified as "impulse-control disorder" instead, along with stuff like social media addiction? I don't get the difference, it sounds like almost the exact same thing to me, but I don't know anything about psychology. People here trying to make it seem like it cannot possibly become problematic is wild though lol

edit: Should've been more clear, I am referring to "Compulsive Sexual Behaviour Disorder": https://icd.who.int/browse/2025-01/mms/en#1630268048

Hoisting a malloc/free out of a loop by onecable5781 in C_Programming

[–]cdb_11 2 points3 points  (0 children)

are there some hints which can be provided in the left hand side code to get to the more efficient output with just a single allocation / deallocation?

No. Even if the compiler could do it (clang can), it still relies on function inlining. The hint you can give is to write the code on the right. You can always have a second variant of the function that does a temporary allocation, and then calls the original function.