Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
TuxSH
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
121.
▲
by
TuxSH
1y ago
Speaking of Ruby, its usage has cratered down in the past decade: https://madnight.github.io/githut/#/pull_requests/2024/1
122.
▲
by
TuxSH
1y ago
Yes, it will be constructed at compile time. Not everything can be constinit.
123.
▲
by
TuxSH
1y ago
You use constinit. But this means constexpr constructor (easy with 2-phase init, not too much of a problem for singleton objects), and trivial destruction
124.
▲
by
TuxSH
1y ago
TIL about encapsulation symbols. Why not just use constinit (iff applicable), construct_at, or lessen the cost with -fno-threadsafe-statics?
125.
▲
by
TuxSH
1y ago
> Notable counterxamples (excluding e.g. Linux) These are mostly executables/end products, aren't they? GPL allows protecting the business logic by discouraging hostile forks: after all, forks of such projects can't relice
126.
▲
by
TuxSH
1y ago
> OTOH open source developers need not be annoyed by any GPL dependency since they can always use it without any trouble to themselves. Counterpoint: GPLv2-only is an absolute PITA to deal with but that's the point; GPL (especially
127.
▲
by
TuxSH
1y ago
It was nice for its Kobo integration and (for now - apparently Kobo is considering alternatives) there is no direct alternative.
128.
▲
by
TuxSH
1y ago
> or any other Free Software license That's not quite true of AGPL (and for this very reason some companies, e.g. in the database provider space, use it for free versions of otherwise paid products)
129.
▲
by
TuxSH
1y ago
If you are targeting armv4t/armv5/armv6k+vfp (or armv7 but not optimized for it) for Aarch32, or Armv8.0-A and are fine with newlib, then devkitARM and devkitA64, respectively, get the job done and ship GCC 15.1. There is also dev
130.
▲
by
TuxSH
1y ago
I know how freestanding works, and I agree that Rust's "nostd" is much more thought out than C/C++'s freestanding, however > This is roughly analogous to Rust's nostd. "freestanding" is actually wo
131.
▲
by
TuxSH
1y ago
> You don't get the standard library Why is that? Sure, allocating containers and other exception-throwing facilities are a no-go but the stdlib still contains a lot of useful and usable stuff like <type_traits>, <utility&g
132.
▲
by
TuxSH
1y ago
> Any established C codebase, for example the kernel or Postgres? Obviously you mean the Linux kernel, specifically. Also C++ has gotten a lot better since 2003 and before. Examples of C++ usage in commercial codebases: - anything Ninten
133.
▲
by
TuxSH
1y ago
- "All" C libraries use some form of namespacing (the typical mylib_dosomething kind of name); actual namespaces mean you don't write these prefixes over and over again when in the same namespace - "Most" C projects
134.
▲
by
TuxSH
1y ago
So do signed types (guaranteed to be 2's complement since C23, though all sane targets have been using that representation for a long time). Two's complement encodes -x as ~x + 1 = 2^n - x = -x (mod 2^n) and can therefore be mixed
135.
▲
by
TuxSH
1y ago
IMHO C++ scales far better for large, self-contained, personal projects though it requires slightly more initial investment. And if you're targeting PC, you might be better off using Python to begin with (if perf is not a concern)
136.
▲
by
TuxSH
1y ago
> As to 'vetting' the use of std library — I do not see how to do it without making a fork (or writing own "stripped down" version from scratch). E.g., you cannot simply decide not to use container allocator paramete
137.
▲
by
TuxSH
1y ago
About everything in std::initializer_list is noexcept, and builtin wrappers (type traits, bit_cast etc etc.) are 0-cost. You shouldn't try to avoid all of the stdlib, but rather vet what you use from it. Furthermore, stuff like LTO or
138.
▲
by
TuxSH
1y ago
You don't need LTO to trim static binaries (though LTO will do it), `-ffunction-sections -fdata-sections` in compiler flags combined with `--gc-section` (or equivalent) in linker flags will do it. This way you can get small binaries
139.
▲
by
TuxSH
1y ago
Heh, you're right, good catch: https://godbolt.org/z/3cEfbqM51 Looks like their (Rust) main motivator was readability. Whereas P3330R0 has that + performance on non-CAS hardware in mind. In any case, Rust's f
140.
▲
by
TuxSH
1y ago
Apologies for the style of my previous messages. > they explicitly support weak memory models. Sure, but memory ordering is orthogonal to LL/SC vs CAS. To me, fetch_update not being present from std::atomic's inception is major
141.
▲
by
TuxSH
1y ago
> It certainly wasn't. The idiomatic way to do RMW (outside simple stuff like fetch-increment) with std::atomic maps 1:1 with x64 assembly and since fetch_update isn't provided, it's the only way to do it. It's way
142.
▲
by
TuxSH
1y ago
Don't forget <tuple> not mandated to be trivial when it can be (and in fact never being trivial with GCC's stdlib), std::print performance issues (see P3107R5, P3235R3), etc. Heck, even std::atomic was designed with only x64
143.
▲
by
TuxSH
1y ago
Two-phase initialization also has the added benefit of usually making the object have a constexpr constructor (usually a default constructor) and therefore making it eligible for constinit. That said, construct_at also exists.
144.
▲
by
TuxSH
1y ago
Ah, you're right, thanks for correcting me! This also doesn't apply to heap-allocated variables, though I think p2795r2 should cover all these cases. I wonder if (for stack variables) this is due to an implementation detail in the
145.
▲
by
TuxSH
1y ago
Gcc already has [[gnu::uninitialized]] (clang doesn't, AFAIK), as well as -ftrivial-auto-var-init=pattern which exactly matches the new C++26 semantics, if I'm not mistaken
146.
▲
by
TuxSH
1y ago
> And I am one of the people saddened by the convergence on a single platform. Hardly surprising, though, social networks are prone to centralization (due to network effect), and GitHub & its competitors (anything that offers git rep
147.
▲
by
TuxSH
1y ago
Personally, I'm getting 15 tok/s on both RTX 3060 and my MacBook Air M4 (w/ 32GB, but 24 should suffice), with the default config from LMStudio. Which I find even more impressive, considering the 3060 is the most used GPU (on
148.
▲
by
TuxSH
1y ago
These day0/day1 patches and updates usually weigh a lot less than the base games, on Switch the appeal of cartridges is to avoid filling up storage. Before the Switch, save files were also stored on cartridges, making physical medium
149.
▲
by
TuxSH
1y ago
For ask/edit models: yes, but you have to enable them (which you don't get a choice over if it's an account managed by your company -- just saying) For completion models: no, they retired gpt-35-codex, leaving only 4o-copilot
150.
▲
by
TuxSH
1y ago
IANAL, however: > maybe also change the license to GPLv2 Without a CLA, that's not doable without the approval of all the contributors. Furthermore, the point of these libraries (libogc, libctru, etc.) are to be a FOSS SDK. Non-perm
More ›