Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
midjji
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
241.
▲
by
midjji
5y ago
Pedantic is for the older C++ standard, its not pedantic for the latter e.g c++11, I think this changed.
242.
▲
by
midjji
5y ago
There is absolutely undefined behaviour there. Undefined behaviour is defined not as nasal daemons but as: The compiler implementer does not guarantee that this behaviour will be hardware, circumstance, compiler version, or os consistent,
243.
▲
by
midjji
5y ago
No: from https://en.cppreference.com/w/cpp/language/union . The union is only as big as necessary to hold its largest data member. The other data members are allocated in the same bytes as part of that largest
244.
▲
by
midjji
5y ago
All undefined behaviour is well defined for each compiler, what it really means is implementation defined and subject to change without notice or documentation with every compiler version or host os what flags are enabled or a thousand othe
245.
▲
by
midjji
5y ago
Yeah they should have upgraded to some restricted subset of C++ or new restrictive language ages ago. I mostly buy the arguments against having exceptions, perhaps even against polymorphism in general, but the argument against destructors,
246.
▲
by
midjji
5y ago
You are practically guaranteed to invoke undefined behaviour if you do. Just use a map on a std::array of e.g. std::byte
247.
▲
by
midjji
5y ago
Constexpr unions is the sane/safe way to use them. Its great, because accessing a member which isnt the last one written, constexpr will explicitly prevent it compile time. Whereas all other examples here are explicitly undefined beha
248.
▲
by
midjji
5y ago
This is also known as the most common invocation of undefined behaviour in game programming. If you do this, write to y, then read from [1]. You are invoking undefined behaviour, and compilers doing different things here between windows, li
249.
▲
by
midjji
5y ago
If you write to either, accessing the other, even on the overlap, is undefined behaviour
250.
▲
by
midjji
5y ago
Use a enum in a namespace, or anonymous namespace
251.
▲
by
midjji
5y ago
There are two kinds of undefined behaviour being invoked in using this. Its a horrible idea and a horrible code smell, get rid of it if you ever see something like this.
252.
▲
by
midjji
5y ago
This is probably a terrible idea, remember that if you have written one member of a union, all other members remain public, yet accessing any of them in any way is undefined behaviour. This is made way worse by most compilers mostly choosin
253.
▲
by
midjji
5y ago
Assuming the soil type and waterlevels are sustainable, the carbon capture would be proportional to the land level increase over the bedrock plus farm runoff. I would outright discard the latter as its more of environmental hazard than a be
254.
▲
by
midjji
5y ago
I got mine at a local mixed tech/gimmic store for 20$, not sure about the exact model but it looks alot like: https://www.amazon.se/SOONHUA-%C3%B6ronkamera-borttagningssa... I'm pretty happy with it, but I would e
255.
▲
by
midjji
5y ago
Get a earcamera with a scraper, its cheap, instantly effective, and far superior.
256.
▲
by
midjji
5y ago
Sometimes they work far worse than water, they can cause a very thin hard film to coat the eardrum which is almost impossible to get rid of, and which can get infected. Finally got a usb ear cam with a scraper to remove it, but it was weeks
257.
▲
by
midjji
5y ago
I dont understand why this would be hard. The amount of carbon stored is directly proportional to the height the land rises year by year due to the buried plant matter. Simply use a high accuracy gps lidar combo, compensate for the landmove
258.
▲
by
midjji
5y ago
No, its C11 too
259.
▲
by
midjji
5y ago
The appropriate way to mark something as known compiletime is to make it constexpr, nothing else.
260.
▲
by
midjji
5y ago
Its better to make it constexpr than const or static.
261.
▲
by
midjji
5y ago
Its better to make it constexpr.
262.
▲
by
midjji
5y ago
Deep learning has a lot of problems. Energy cost is not one of them.
263.
▲
by
midjji
5y ago
I think the film is really good, though I suspect a film critic might disagree. I'll look up the bok, thanks for the tip:)
264.
▲
by
midjji
5y ago
Soft tissues and hair need not survive for its imprint to survive on the surrounding clay. I think its strange we dont have more neanderthal finds than we do, but suspect part of the reason is most aren't distinguishable from cro magno
265.
▲
by
midjji
5y ago
There is a similar idea about Conan and there is a bit of ambiguity in the collected stories of the oc. There are ancient kingdoms and fallen empires of creatures that are described like apes or furless apes, notably gorillas and similar cr
266.
▲
by
midjji
5y ago
One really cool thing with global warming is the old stuff frozen in the glaciers and ice slowly being unearthed. There might just be a neanderthal or two, or some of the other early hominids. It would answer a great many questions and prov
267.
▲
by
midjji
5y ago
It makes for a good story to be sure, but probably little else. Much like the popular myth of the noble savage influencing academics of the time, contemporary popular disdain for the people and cultures of the past colors many contemporary
268.
▲
by
midjji
5y ago
Oh that must have hurt. Heh I remember back when linux supported longer names than windows and people would come in with huge important and utterly unversioned projects which someone copied/mved on windows with some buggy forcy linux s
269.
▲
by
midjji
5y ago
No its on a x free server. rm, mv, cp dont work. I agree the low level stuff should never care, they are always just binblobs in kernel, and should be. Though there are certainly still bugs caused by encoding changes of some conf file gets
270.
▲
by
midjji
5y ago
Thanks, that did help. I still cant get around when the standard made mistakes though -_-'but I suspect most of it might be compiler fixable. Pity clang does not allow more inlining control, its been the fix for too many gcc clang perf
More ›