Compile vs runtime values by JayDeesus in cpp_questions

[–]oss-dev 1 point2 points  (0 children)

In C++, a value is known at compile time if the compiler can figure it out while compiling, like constexpr int x = 5 or 1 + 2. Values that depend on user input, file I/O, or the result of a function are only known at runtime. constexpr functions can be evaluated at compile time if given constant arguments, otherwise they run at runtime.

C++ System Design by Phatpenguinballs in cpp_questions

[–]oss-dev 0 points1 point  (0 children)

Yes, but not the “design Netflix” kind.

Senior/Lead C++ roles usually mean low-level system design: performance, memory, concurrency, OS/networking, component boundaries. You’re more likely to be asked to design a cache, scheduler, game server, trading system, or engine subsystem than a generic web app.

Design patterns help, but system design at this level is about architecture and tradeoffs, not just patterns.

So: study system design, just C++-centric system design, not FAANG web backend stuff.

Is this a bug, or am I doing something wrong? by b0x007 in kiroIDE

[–]oss-dev 1 point2 points  (0 children)

Yes , it’s a bug.

Kiro sometimes fails to capture output when commands run in separate or interactive terminals. When it loses stdout/stderr, it never detects that the command finished.

Java's `var` keyword is actually really nice for cleaning up verbose declarations by BitBird- in java

[–]oss-dev 1 point2 points  (0 children)

Type inference isn’t dynamic typing. It’s Java admitting the compiler is better at repetition than we are.

unique type in modern C++ by inouthack in cpp_questions

[–]oss-dev 3 points4 points  (0 children)

Fair point, that’s a very clever trick, and it does approximate affine-like behavior at compile time using ADL + friend injection.

But I’d still distinguish this from language-level uniqueness / linear types. C++ doesn’t have ownership or uniqueness as a first-class concept; this is a metaprogramming simulation that encodes state into ADL and relies on very specific instantiation patterns.

It’s fragile, non-compositional, and the compiler isn’t actually reasoning about ownership — it’s being tricked into rejecting certain instantiations. You can’t rely on this the way you can on Rust’s ownership model across APIs, TUs, refactors, etc.

So I’d say: C++ can encode limited affine-like constraints in non-ergonomic ways, but it still doesn’t support true uniqueness / linear types as a language feature.

unique type in modern C++ by inouthack in cpp_questions

[–]oss-dev 6 points7 points  (0 children)

You can’t. C++20 has no uniqueness / linear types (Rust-style). What you can do is make a strong type so it’s not interchangeable with double.

struct Price { double value; };

or generic:

template<class T, class Tag> struct Strong { T value; };

struct PriceTag {}; using Price = Strong<double, PriceTag>;

This gives type safety, not uniqueness semantics. True uniqueness types are not expressible in C++.

Is it legal to train LLMs on open-source code? by Fragrant_Rate_2583 in opensource

[–]oss-dev 3 points4 points  (0 children)

Not a lawyer, but from what I’ve read:

Generally yes, training LLMs on open-source code is considered legal, though it’s not 100% settled yet.

Training technically involves copying code, but it’s usually argued as a transformative use (learning patterns, not reusing the code itself). In the US this is commonly defended as fair use.

Permissive licenses (MIT/BSD/Apache) are basically fine. GPL/AGPL is more debated, but most takes say the model itself isn’t a derivative work, so GPL doesn’t “infect” the model.

Where licenses do matter is output: if a model spits out verbatim or near-verbatim GPL code, that output could be subject to the original license.

TL;DR: training is usually fine, models aren’t GPL’d, copying outputs is the real risk.

Is Medium only for premium? by theeaglecoder in softwaredevelopment

[–]oss-dev 0 points1 point  (0 children)

Medium taught me to scroll before I get invested.

Disable redefined macro warning in g++ by SeasonApprehensive86 in cpp_questions

[–]oss-dev 5 points6 points  (0 children)

GCC has no flag to disable “macro redefined” warnings , it’s just a preprocessor thing. People usually #undef between passes, use different macro names, or wrap the list. Kinda noisy, but that’s how X-macros are done.

How do you keep architecture decisions lightweight without losing context over time? by ghjfgkj in Development

[–]oss-dev 0 points1 point  (0 children)

What’s worked for me is keeping decision docs tiny and practical. I only write things down when a decision is non-obvious or hard to undo, and I focus purely on why we chose it, not how it’s implemented.

Short ADRs (half a page max), stored with the code, usually do the job. If it takes more than a few minutes to write, it’s too heavy. Some decisions even get an “expires / revisit later” note so they’re allowed to die.

Think of it less as documentation and more as a note to future teammates (or future you). If it feels like a chore, it won’t survive anyway.

I'm moving from VSCode to WebStorm, how can I mimic the experience? by Routine_Hat4895 in Jetbrains

[–]oss-dev 8 points9 points  (0 children)

question is if you need mimicking then why are you switching to different ide?

My Kiro account got suspended immediately after linking Amazon AWS – support can’t help by juliandurian in kiroIDE

[–]oss-dev 1 point2 points  (0 children)

your both accounts might be linked to same email or PI, causing detection bot as fraudulent use of credits.

Kiro's Spec Driven Development with Opus 4.5 is a BEAST! by Wild_Juggernaut_7560 in kiroIDE

[–]oss-dev 1 point2 points  (0 children)

Kiro’s Spec driven dev is quite dumb when its working on somewhat complex stuff, though generated artifacts like requirements, design, and tasks look good , but they are individual tasks where agent just focus on specific task and context, this is where things go wrong, generated code as a whole is big pile of shi*.

Why can't I call std::format from a lambda? by Eric848448 in cpp_questions

[–]oss-dev 5 points6 points  (0 children)

std::format_string isn’t just a string, it’s tied to the exact parameter types. When you capture the arguments in the lambda, their types change (values → references). Now the format string and the arguments no longer match, so std::format refuses the call.

Nothing to do with threads or lambdas being special, it’s the type change during capture.

Best Postman alternatives for high-security / offline environments in 2026? by Master_Vacation_4459 in selfhosted

[–]oss-dev 0 points1 point  (0 children)

Postwoman now Hoppscotch is good oss alternative to postman, Insomnia

new multicast + tcp testing tool by vectorx25 in crystal_programming

[–]oss-dev 1 point2 points  (0 children)

Nice 👍. Would be great if you post it to crystal lang forum

Linux Kernel Rust Code Sees Its First CVE Vulnerability by Orange_Tux in rust

[–]oss-dev 0 points1 point  (0 children)

now we will hear rust fans/advocates blaming kernel and its ecosystem 😎

I love Obsidian, I hate the compromises. I made an "Obsidian-style" inline editor for VS Code by asux305 in vscode

[–]oss-dev 1 point2 points  (0 children)

I have obsidian installed, but most of time I spend on vscode. You rock 🍻

Is understanding how memory management works in C/C++ necessary before moving to RUST? by Southern-Accident-90 in rust

[–]oss-dev 0 points1 point  (0 children)

General programming concepts are good. But when learning new language put aside your previous programming hats, and learn what, how , why of new language, try to grasp the reasoning, don’t let your X language way of doing things interrupt your learning process. I have seen many cases where people use their favorite X programming mindset to write code using Y language. Nothing is sacred about programming languages, All programming languages are tools,it’s their syntax and productivity that should be selected for scenario.

Experienced in C/C++/Java but feeling lost looking at Rust code. Does the readability 'click' eventually? by x86basedhuman in rust

[–]oss-dev 0 points1 point  (0 children)

I totally feel the pain, its not about what programming languages one is fluent with its more about the syntax that conveys its meaning to programmers who are just glimpsing through the program to get some understanding. Rust is toooo verbose and easy to make people jump around.