Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
TuxSH
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
91.
▲
by
TuxSH
1y ago
Context limits (regardless of hard limits) are a show stopper IMO, the models completely fail assignments with >= 30k LoC (or so) codebases. You're better off feeding them a few files to work with, in isolation, if you can.
92.
▲
by
TuxSH
1y ago
> For bounds checking, sure I think the performance penalty is so small that it can be done. Depends on how many times it's inlined and/or if it's in hot code. It can result in much worse assembly code. Funny thing: C++17
93.
▲
by
TuxSH
1y ago
> TLD for .god Sounds like a good TLD for an "identity and access management" system :)
94.
▲
by
TuxSH
1y ago
> Every modern commercial OS Every +*general-puprose OS. Nintendo's 3DS OS and Switch 1+2 OS are bespoke and strictly microkernel-based (with the exception of DMA-330 CoreLink DMA handling on 3DS if you want to count is as such), an
95.
▲
by
TuxSH
1y ago
> But today you can just use std::sync::LazyLock which lets you say OK, the first time somebody wants this thing we'll make it, and subsequently it just exists forever. This corresponds to a C++ feature that has been added in C++11
96.
▲
by
TuxSH
1y ago
> Still, I see Rust as the natural progression from C++ I don't; Rust has its niche but currently can't replace C++ everywhere. From what I'm aware of, Rust has poor ergonomics for programs that have non-hierarchical owner
97.
▲
by
TuxSH
1y ago
> Also span had no bounds checking While there was no reason not to have .at(), lack of bound checks by default isn't a bad thing, as inlined bound checks have the potential to highly pessimize code (esp. in loops); also standard li
98.
▲
by
TuxSH
1y ago
Indeed, LLMs cannot do truly novel thinking, and the laundering analogy is spot-on. However they're able to do more than just regurgitating code, I can have them explain to me the underlying (mathematical or whatever) concept behind th
99.
▲
by
TuxSH
1y ago
> Why bother with this category? The code exercising it is buggy either way Because it is an actual security vulnerability if you cross privilege boundaries (infoleaks/(K)ASLR bypass, etc.), and one people often miss at that. Say yo
100.
▲
by
TuxSH
1y ago
> EDIT: ironically modules (as a concept) would (could?) solve the header problem, but they've not exactly been a success story so far. Because they are little different from precompiled headers. Import std; may be nice, but in a la
101.
▲
by
TuxSH
1y ago
> quite literally, everything better Like retained mode GUIs, games, intrusive containers or anything that can't be trivially represented by a tree of unique_/shared_ptr?
102.
▲
by
TuxSH
1y ago
> Speaking more abstractly even if there isn't an explicit interface/implementation separation perhaps compilers could pick out and make available interface information "ahead of time" to alleviate/possibly elimi
103.
▲
by
TuxSH
1y ago
> That's the fundamental limitation of modules systems that supposedly prevents this scaling? Not the person you're replying to but I can see a problem with some dependency chains. Let's say you have: stdlib <- A.hpp &l
104.
▲
by
TuxSH
1y ago
In particular, std::thread constructor's (the non-default one) has a workaround against LTO optimizing the pthread call away: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-... > Par
105.
▲
by
TuxSH
1y ago
> named structure assignment Is a thing since C++20 > sane treatment of the void type If you're talking about conversion rules, explicit cast from void* to T* makes more sense than implicit since it is a downcast. > VLAs IMO
106.
▲
by
TuxSH
1y ago
What parts of it can't just be compiled as C++ code? (unless it has to do with the subtle difference in implicit lifetime object rules) IMO it's much easier to write resleaks/double-frees with refcounted objects in C than it
107.
▲
by
TuxSH
1y ago
Switch 2 to an extent too (it's basically a much improved Switch 1)
108.
▲
by
TuxSH
1y ago
You can write stuff like this: void *operator new(std::size_t sz, Foo &foo, Bar &bar) { return foo.m_Buffer; /* should be std::max_align_t-aligned \*/ } and force all coroutines of your Coroutine type to take (Foo &
109.
▲
by
TuxSH
1y ago
> C++ coroutines turned out quite the mess (are they actually usable in real world code by now?). They are, they are extensively used by software like ScyllaDB which itself is used by stuff like Discord, BlueSky, Comcast, etc. C++ corout
110.
▲
by
TuxSH
1y ago
> Making destructors implicitly virtual in polymorphic classes Not sure what to think of this one. Either one introduces a new keyword to opt out (not great), or all public destructors of an abstract base class are implicitly marked virt
111.
▲
by
TuxSH
1y ago
> classic enums have too many implicit conversions They're fairly useful still (and since C++11 you can specify their underlying type), you can use them as namespaced macro definitions Kinda hard to do "bitfield enums" wit
112.
▲
by
TuxSH
1y ago
> classic enums have too many implicit conversions They're fairly useful still (and since C++11 you can specify their underlying type), you can use them as namespaced macro definitions
113.
▲
by
TuxSH
1y ago
> For example, modern compilers will very rarely introduce conditional moves For conditionally-selected data that lives in registers (and occasionally, on the stack), GCC seems to always use cmov (as it is much cheaper than a branch with
114.
▲
by
TuxSH
1y ago
C++ "magic statics" handle that use case (but with hidden atomic flag load (& more) costs at each access)
115.
▲
by
TuxSH
1y ago
Header-only is simpler to integrate, so it makes sense for simple stuff, or stuff that is going to be used by only one TU there. However, the semantics of inline are different between C and C++. To put it simply, C is restricted to static i
116.
▲
by
TuxSH
1y ago
Agreed, but article's author mentioned this as an issue, I would have expected him to find about and mention these flags as well.
117.
▲
by
TuxSH
1y ago
These options can easily be found by a Google Search or via LLM, whichever one prefers > they can be counter-productive Rarely[1]. The only side effect this can have is the constant pools (for ldr rX, [pc, #off] kind of stuff) not being
118.
▲
by
TuxSH
1y ago
> How can they be expected to learn this It's the first thing Google and LLMs 'tell' you when you ask about reducing binary size with static libraries. Also LTO does most of the same.
119.
▲
by
TuxSH
1y ago
> This design decision at the source level, means that in our linked binary we might not have the logic for the 3DES building block, but we would still have unused decryption functions for AES256. Do people really not know about `-ffunct
120.
▲
by
TuxSH
1y ago
> If you call a method that returns an unsigned int, how do you safely pass it to a method that accepts an int? Mandate 2's complement be used. > Unsigned integer types are only really necessary when dealing with low-level bit m
More ›