skysight-inc/HackerNews huggingface dataset:
The C/C++ language doesn't provide for a way for the compiler to see that you really meant this one check to take precedence over the implicit promise in another.

The reason why C++ is always relevant here (though C macros and inlining cause similar issues) is that generic programming being close to optimal is a language feature - and one of the ways that's possible is by letting you right reusable code that might be "called" from a context in which some of the checks or conditions just aren't necessary. It's by design that the optimizer gets to... well, optimize that kind of code.

There's a solid case to be made that the details of C's UB weren't well chosen and we should try to update them; but which decades old choices are perfect? Which are easy to change once there's this much legacy software in operation?

Don't forget that some of those UB's were chosen to deal with hardware realities of the day; i.e. that the "same" operation on different hardware would do different things. For example, eliminating signed integer overflow might allow a C compiler to use a signed register that's wider than necessary, which may help on hardware that doesn't have every possible register width, or where there are complex register usage limitations. I'm no hardware geek; I'm sure somebody here knows or real examples where UB allows portability, because that's the point: UB allows people to write portable, performant code - just don't do certain things, and you're fine... which leads us to today's situation, in which UB can feel like a minefield.
+1 for printing, which are a rare habit on social media era.

Virtually any image looks great on FB/Instagram/etc, but once you printed it big, you'll notice how good or bad actually it is.
> Buy cheap grounds in the biggest quantities you can store

> Buy a coffee maker where no hot water touches plastic. Just glass and steel.

> ... gets you most of the way to great coffee.

James Hoffman, who's credentials include winning the "World Barista Championship", publishing multiple coffee books, running a coffee roasting company, and so on, has significantly different advice.

When experimentally comparing the glass, plastic, and ceramic V60s, he found that the plastic was easier to preheat and sucked less heat out of the grounds, resulting in better brews (https://youtu.be/1oB1oDrDkHM?t=480).

What reasoning do you have for avoiding plastic? How can it change the brew other than through its thermal properties (which are pretty clearly beneficial compared to glass and steel, right?)

He also recommends getting grinding beans very shortly before brewing.

I personally can easily taste the difference between freshly ground and stale grinds, and can notice the difference in extraction and flavor from varying grind size, so I'm personally quite dubious of your claims. I have yet to ever make "great coffee" from pre-ground beans bought from the super-market, only mediocre coffee.

Can you not taste any different between fresh grinds and pre-ground coffee? From fiddling with the grind size to find the right extraction for what you personally prefer?
Have you ever seen someone jaywalk who isn't?
> just let it overflow

I agree with this. Making integer overflow UB is ridiculous.

> and don't fuck up any bounds checks

But I disagree with this. That's just normal UB-based optimization, one of the point of having UB at all is to do such optimization.
You can read the link above, from the city of Albuquerque; the building built in 1927 had swastikas incorporated in its decoration at that time.

quote:
"Information about the swastikas at the KiMo Theater.

Swastika and skulls detail at KiMo Theater

The KiMo was designed and built in 1927 using the style and designs that were very common to several Native American cultures in the American southwest at that time.

Now on the National Register of Historic Places, the design elements of the KiMo Theatre are preserved for their original cultural significance.

Although today the swastika can evoke negative emotions, the KiMo invites visitors to remember that the original meaning of this ancient sacred symbol is one of life and prosperity.
"
No.

Seeing advertisement and agencies thoughout all over place made me stop caring about human at all.

Destruction is in action.
For D it looks like:

for (thing; things) { ... }

which is rewritten as:

for (auto r = things; !r.empty; r.popFront) { auto thing = r.front; ... }
It's not about what your CPU does.

These days undefined overflow for signed integers is mostly used by compilers to be able to assume that eg 'a + 1 > a' is always true, and thus eliminate redundant checks.

(And you wouldn't typically write code like 'a + 1 > a', but you can get either from code generation via macros etc or as a intermediate result from previous optimization passes.)
Shitcoin project tests the limits of cringe by building $600k statue of Elon
What you're talking about is a "random kicker" and the rules specifically say there aren't any. Every flop card hits someone's hand, in terms of rank, if not suit.

This makes it significantly easier. Got it in 3, could have gotten it in 2 except I had a 50/50 on the suit of the last card and I picked the wrong 50.
This isn’t a problem: No random kickers on the board - The rank of each board card will alway be a part of at least one player's hand in at least one phase.

Rules page 2
More than two years ago, Apple told the FBI that it planned to offer users end-to-end encryption when storing their phone data on iCloud, according to one current and three former FBI officials and one current and one former Apple employee.

Under that plan, primarily designed to thwart hackers, Apple would no longer have a key to unlock the encrypted data, meaning it would not be able to turn material over to authorities in a readable form even under court order.

In private talks with Apple soon after, representatives of the FBI’s cyber crime agents and its operational technology division objected to the plan, arguing it would deny them the most effective means for gaining evidence against iPhone-using suspects, the government sources said.

When Apple spoke privately to the FBI about its work on phone security the following year, the end-to-end encryption plan had been dropped, according to the six sources.
> The language design intentionally trades programmer’s sanity for ease of implementation.

There's nothing "easy" at all about UB-exploiting performance optimizations in modern C compilers, and "ease of implementation" is absolutely not why those optimization passes have been included. In fact, the easiest thing for the compiler to do, when it sees an int * int operation, is to emit an IMUL assembly instruction (or the equivalent for your CPU architecture) and not worry about deleting overflow checking code. Which is what C compilers did before the extent of UB exploitation became excessive.
It is not really about communists roots or anything. Old Chinese people believe in herbs, and believe anything unnatural is bad for your body. Especially old people, they believe doing less to your body is best for you, just let the nature take care of it.

As for your grandparents, I don't think anything should be trusted blindly. It is very personal thing. For an Asian to take something 1/10000 of death/or other rate, it is not worth it. That's why many Asian still wear masks.

The best way to understand developing world is to compress 4 generations or even more into two generations, like comparing the thoughts of your great great granddad to yourself, that's how fast developing world has developed, and the gap between generations can be so big.
DolphinScheduler Predicts the Netherlands will be the FIFA World Cup champion!
I’m one of the zealous fans who crave to see which team will bring the cup home this year. I take action right away and make a Machine Learning prediction model by DolphinScheduler to forecast the champion of FIFA World Cup 2022 and get a betting strategy every day, in a few hours.

This is not a complex job, it takes only 3 steps to finish the predictions actually, and I share on GitHub how to do the prediction: https://github.com/jieguangzhou/FIFA-World-Cup-2022/tree/mas...
To hammer it home: UB isn't restricted to a variable having a funny value. Your C program is allowed to play Nethack on startup, if the compiler can prove that a few hours into your program, there would be UB.
> C standards fault.

I take issue with this sentence, since it makes it sound like there's something wrong with the C standard for it, which isn't the case.
What I immediately noticed was the similarity between this extension's logo/icon and the Microsoft logo (https://www.logodesignlove.com/wp-content/uploads/2012/08/mi...) - four colored squares arranged like window panes. It even uses the same colors, albeit in a different order. IANAL, but that might get you into trouble with Microsoft...
Indeed. But still a good idea to run at least your test-suite with it. And also with address sanitizer and clang's memory sanitizer, etc. Whatever you can find.
I also record a tutorial on YouTube: https://youtu.be/pXBINJR2l5Y
CC is a transcription. They are not translations.
`-fno-strict-overflow`
But tether is propping up btc. Most large btc holders desperately want tether to hold together
That's not going to happen anytime soon.
Emulating it is a non trivial affair and the hardware to properly do that is going to be expensive and the mini console is going to cost more than just $100.
Games were also relatively big so then you have the added cost of storage for those 40 or so games you would not include.
That's fair. But then your investment thesis is based on the value given to gold by large institutions that can/will create a price floor. Which yes, is absolutely based on trust-in-future-value, but in the case of gold that trust is widespread and tied to large, centralized financial institutions and thus regulations and eventually fiat (because in the end you will have to convert to fiat).

I can see that getting replicated for BC, but other crypto, not so much. A better, digital, asset than gold makes sense, but distributed, slow, state machines? Still don't get those...
Which only do bounds checking in debug builds, or when explicitly use the compiler switches to enable them in release builds, good luck trying to advocate for using at() everywhere instead of braces.

Before C++ got the STL, all collections libraries shipped with compilers used to have bounds checking enabled by default, apparently that is too much performance loss for the standard library.

Walter's proposal added bounds checking being used unless explicitly disabled, like in any sane systems language.
SCO OpenServer (1997)
Triboluminescence
Those are also dual digital not analog fyi.
I like to watch movies in their native tongue, with English subtitles. Then, I attempt to learn the language by comparing the two.

After watching a hundred hours of Norwegian shows, I now know that "tahk" means "thanks".
I really miss the 'loudness compression' that was present on many DVD playback applications.
We have a family routine of watching a movie together each friday night.
I sit next to the stereo, as the 'grumpy dad',
and twist the volume control up and down,
depending on whether there is character dialogue, or things are exploding.

If I turn it up enough for character dialogue to be audible, the 'exploding cars' parts are deafening. And if the exploding cars are tolerable, character dialogue is inaudible.

DVD players used to have a hack typically called 'dynamic range compression' or similar.
If I had a professional movie theater, the wild dynamic range would be cool.
But in your basement without hifi dampening on your walls, it doesn't behave well :-/
Singapore branches out onto internet of trees
He did harden the code by having an explicit range check.
C has a specification and weird stuff doesn't happen as long as you follow it. Doing so is very hard at times, but if a project cares about unpredictable optimizations, then it probably also cares about other kinds of unpredictable behavior. Which unfortunately eliminates a lot of languages that make no guarantees about their semantics.
Show HN: WisniaLang – Compile binaries 41x faster and 27x lighter than Rust
Blog post: https://belijzajac.dev/wisnialang-compiler-project/

Due to a lack of time, I haven't yet begun optimizing IRs and machine code to speed up the runtime, and the compiler still lacks many features that are far behind the originally proposed grammar for the language (such as loops, classes, and more data types). Despite these limitations, the compiler is functional, and example programs can be found in the tests/programs directory. Both code and blog post feedback are welcomed.
… is it a surprise that after 6 months of the above people are tired? Do we now need sources that can also time travel?
I have the same issue with Java and Go. (Which I brought up as well.)

Yet, they still compare favourably with C in this regard. Almost anything does.
It's free but why so critical?

It's a blog, it's not like your handling sensitive information.
question about the condition removal he's lamenting

his code would have gotten an overflow at

int32_t i = x * 0x1ff / 0xffff;

where it not optimized away

so it seems gcc is maintaining the code behaviour, only reporting a wrong debug line for it due code being shifted around.
You should package up Hare in nixpkgs. It would be nice to be able to play with it that way.
Don't forget about "modernizing" the design. It needs to be modern. AKA it needs weeks of design people to copy what some popular website or app did that they personally think looks rad.
> The moment you enter a compilation unit (assuming no link optimizations) with a state which at some point will run into undefined behavior all bets are of. [...] Yes, UB can "time travel"

Close, but not quite. This is a common misconception in the reverse direction.

Abstractly, what UB can do is performing the inverse of the preceding instructions, effectively making the abstract machine run in reverse. However, this is only equivalent to "time-traveling" until you get to the point of the last side effect (where "side effect" here refers to predefined operations in the standard that interact with the external world, such as I/O and volatile accesses), because only everything since that point can be optimized away under the as-if rule without altering the externally visible effects of the program.

As a concrete, practical example, this means the following: if you do fflush(stdout); return INT_MAX + 1; the compiler cannot omit the fflush() call merely because the subsequent statement had undefined behavior. That is, the UB cannot time-travel to before the flush. What the program can do is to write garbage to the file afterward, or attempt to overwrite what you wrote in the file to revert it to its previous state, but the fflush() must still occur before anything wild happens. If nobody observes the in-between state, then the end result can look like time-travel, but if the system blocks on fflush() and the user terminates the program while it's blocked, there is no opportunity for UB.
Hare is available in nixpkgs to the best of my knowledge.
A common use of git notes is tacking metadata onto commits.

Once a commit cements itself in git’s history—that’s it. It’s impossible to amend a commit message buried deep in a repo’s log1.

But git notes enable you to amend new information about old commits in a special namespace. And they’re capable of so much more.

The article has an answer to this in the second paragraph.
It can, but then most don't use it, even though Windows and Android have proven you can ship that into production with hardly any noticeble performance loss.
Concrete example from my firefox url bar -

type 'for' - forums.overclockers.co.uk appears, this is where I'm going, I go here once on most days

type 'forums', because my fingers didn't get the memo to stop - forums.samygo.tv appears at the top, a site I haven't visited (on purpose) in almost a decade, mostly because I don't have that tv any more.

Massively annoying.
I love the optimism about human nature implied by the use of the phrase "not realising".
Interesting how the notion of symmetric contact can be seen as a positive or negative relationship.
It draws from the (growing in popularity) approach of tagged unions/result types among many languages, but generalizes it a bit and makes it easier to use in an ad-hoc manner.
Before you can go out there and do a corporate charity donation drive, you need to decide the venue, the personnel, the fundraising methods, and the beneficiaries and make sure that you have the support of your company management, as their support will mean a lot for the success of your drive.
Note that the author of the article is using "shitcoin" in place of the name of the actual crypto currency in order to not contribute to the attempted pump of the coin by the stunt.

So, sadly, there isn't a shitcoin. Or perhaps there is?
Pretty sure it's meant as "they're pricing in a (low single-digit) percentage of theft" and not "every week someone grabs 90% of the deodorant".
Ok well yes, technically as soon as the compiler doesn't treat the overflow as UB anymore the second part is not applicable anymore. Badly worded on my side.
Good grief this was informative!

Thank you for taking the time to share that.
Probably the leeching and your health
Well, if we're talking about "House of the Dragon", there were a few episodes where they attempted day-for-night [1] production and did a horrible, horrible job of it. This particular f*ckup has little to do with monitor capability or dynamic range, and everything to do with poor judgment through multiple stages of the production pipeline. I honestly don't know how such a high budget production ends up with these shots.

[1] https://en.wikipedia.org/wiki/Day_for_night
> It is never the case [...] that an out of the blue theory developed for no reason other than mathematical “beauty” ends up overturning the old order

Well, Paul Dirac for one did predict the antimatter counterpart of the electron because of mathematical beauty, didn't he?
It's funny because this is the same kind of properties that appealed to me in FP. You compose stuff without having to "encode" parameters. Lighter (unnecessary) information for my brain.

And to a point.. pointfree in haskell is an extreme of that, albeit at some point you start having to remember more information if you stack too many operators.
The absolute fucking worst offender here is iPhone search.
Those look rather inconvenient. Is there a sane way to keep things infix at least without having to crack open a spew of operator overloading?

Something like #pragma come_on_be_reasonable ?

(This is rhetorical. They point is it shouldn't be every coders personal responsibility to make the tool not be openly hostile. You may take pride in personal mastery of an unreasonable thing but that doesn't make it more acceptable)
srsly.

how about they take small fraction of the often ridiculous out-of-place special effects budget and put it towards giving us good audio.

like, just because you can do special effects doesn’t mean you need to jam them in literally everywhere to wow us..

i want to be able to watch a movie with my living room theater and have the audio match my system or in my bedroom and have it be clear on basic ass tv speakers.

take some of that stupid special effects budget and give us proper audio tracks.

sorry this is one of my pet peeves. there is no reason in 2022 that audio needs to be this muffled. they can do both theater quality and basic but they dont—drives me up the wall.
Fun thing there is rust feeds into the same optimisation pipeline as C or C++, so there's a definite risk of it inheriting some of their semantics via errors in the compiler implementation.
That's ok, the chances of several intentional saboteurs on a single image sample are presumably pretty low.

i.e. even if the saboteur rate was as high as 10%, and I only showed images three times, only 10% * 10% * 10% = 0.1% of data would have three people intentionally picking the wrong answer. I suspect the rate is much lower, and 99%+ people just want to pick the right answer to get the captcha program to go away as quickly as possible.

Images with less than 3/3 matching results in this example would presumably be retested until you got the desired confidence level.

Then assuming your ML model isn't overfit/overtrained, you could even then assess your original input data to detect/flag anomalies for manual review.
You seem quite hell-bent on denouncing containers. Yet, a good container with a plastic seal on the lid will keep your food completely clean and be pretty airtight to keep it fresh for a while.
Is this a troll? I immediately get hit with a "You win!" popup telling me I took 6 guesses without even getting to play.
This is bad because few programs are built to deal with two positive numbers being multiplied returning a negative result.
Note: language isn't Rust.
The biggest issue I have with CC is that it ruins comedy. You can literally see the punchline coming, but don’t really get the effect because you miss the timing, and all the vocal subtlety.
I agree on the top compilers but there are dozens if not hundreds architectures with their own proprietary C compilers maintained by a dinosaur and a couple intern dino chicks if they’re lucky. I postulate any other language wouldn’t be implemented or would be defanged to C-level of (non)safety anyway in a way similar to mrustc.
For the same reason we don't need more than a few sample pieces of beef to use in our matter replicators to use in our holo-suites.

(i.e., we can't grow lab beef yet, you're talking about science fiction.)
At least give some previews. I'm not going to subscribe to something I don't know about. Very sketch.
Apple does this, a lot. The number of times I have incorrectly called somebody on FaceTime because I clicked on a contact at the same time FaceTime decided to update the list should be embarrassing for them. I have zero idea how this doesn't get fixed. It should be a trivial change to make sure the list is updated however they'd like before showing it to the user. As it is right now, given that it's slower or about as fast as me clicking something on the screen, it seems updating the list is the very last thing they do.
> On the other hand, there seem to be so many cases like this one where the “undefined behavior code deleter goes brrrrrr” really overextends its usefulness.

I would simply not depend on invoking UB as part of my program's behavior (?).
I guess there's always an exception.
> For an example of what's possible, have a look at all the great techniques employed to make JavaScript as fast as possible. They have basically no static types to work with at all.

I’m sure people will be very happy with a C JIT. That’s definitely what they use C for.

JIT-ed code is full of runtime type and range assertions which bail if the compiler’s assumptions are incorrect.
I think Rust doesn't allow integer overflow either, unless you specifically use the wrapping_* operations. Probably the same kind of thing will also happen to Rust.
I've been programming since my teens and professionally for 15-odd years. I think programming really only "clicked" in the last few years. Now I know with reasonable certainty how I will structure a project and how much time it will take.

What made it click? There wasn't a specific point, but I think it was when I started to seriously branch out into multiple languages. I've dabbled in other languages before, but when I seriously started working with other languages and made larger projects in them did I understand how to structre the code so it's not terrible.
If you want to understand exposure, look no further than Fred Parker's Ultimate Exposure computer:

https://www.reddit.com/r/AnalogCommunity/comments/t2bi0y/fre...