skysight-inc/HackerNews huggingface dataset:
This article on undefined behavior looks pretty good (2011?)

https://blog.regehr.org/archives/213

A main point in the article is function classification, i.e. 'Type 1 Functions' are outward-facing, and subject to bad or malicious input, so require lots of input checking and verification that preconditions are met:

> "These have no restrictions on their inputs: they behave well for all possible inputs (of course, “behaving well” may include returning an error code). Generally, API-level functions and functions that deal with unsanitized data should be Type 1."

Internal utility functions that only use data already filtered through Type 1 functions are called "Type 3 Functions", i.e. they can result in UB if given bad inputs:

> "Is it OK to write functions like this, that have non-trivial preconditions? In general, for internal utility functions this is perfectly OK as long as the precondition is clearly documented."

Incidentally I found that article from the top link in this Chris Lattner post on the LLVM Project Blog, "What Every C Programmer Should Know About Undefined Behavior":

http://blog.llvm.org/2011/05/what-every-c-programmer-should-...

In particular this bit on why internal functions (Type 3, above) shouldn't have to implement extensive preconditions (pointer dereferencing in this case):

> "To eliminate this source of undefined behavior, array accesses would have to each be range checked, and the ABI would have to be changed to make sure that range information follows around any pointers that could be subject to pointer arithmetic. This would have an extremely high cost for many numerical and other applications, as well as breaking binary compatibility with every existing C library."

Basically, the conclusion appears to be that any data input to a C program by a user, socket, file, etc. needs to go through a filtering and verification process of some kind, before being handed to over to internal functions (not accessible to users etc.) that don't bother with precondition testing, and which are designed to maximize performance.

In C++ I suppose, this is formalized with public/private/protected class members.
Toyota are more reliable AND they have a great supply chain with cheap parts.

You are suggesting a cause-and-effect that is nonsense. Make an unreliable 4WD with great supply chain, and they won’t sell. Your implied assumption is that drivers in harsh environments (say outback Australia) care more about supply chain for parts than reliability - ummmm no - they have experience in what is reliable and they intelligently buy accordingly, even though Toyota is not the cheapest to buy.

Toyota is one of the few brands that actually mean something about quality of reliability: https://www.yourmechanic.com/article/the-most-and-least-expe... is a 2016 article about older cars that shows reliability (Toyota doesn’t appear on the no-start list) and “Toyota’s Tacoma and Highlander are also on the low-cost leaderboard, even though the list is dominated by compact and mid-sized sedans. Toyota completely avoids the the most expensive models list.”.
Nah, considering one has well understood risks and has been practiced for thousands of years, while the other approach is brand new, I think it's reasonable. It can also be a selling point for lab-grown meat, the fact that it is safer and free of bacteria.
And in the end the love you take is equal to the love you make

- Beatles
Fortunately, this post includes a link to an excellent 45min talk on undefined behavior which does go into a fair bit of the detail you were looking for. I encourage you to click it -- it's right in the post's introduction.

The purpose of this post and other "falsehoods" posts is to shine a light on the existence of a misconception or set of misconceptions. By that point, there are usually plenty of other high-quality posts about "why / how / when" etc. but for a variety of social dynamics reasons those posts by themselves did not have the wide distribution and readership they deserved. After shining a light on the misconception, interested readers are generally able to continue the learning process both through the sparked discussion and through doing their own searching.

Here's a specific example of such a post with even more details:
https://blog.llvm.org/2011/05/what-every-c-programmer-should...
If someone cloned some mammoth or giant sloth cells and grew them, I'd be interested in tasting what my prehistoric ancestors got to eat.
Scale, here, could also mean decommodifying our time so that we feel more free to spend it with those we love.
Lately going on HN is like walking into my local gun shop ...
Yet by pure numbers they are def doing more miles than ships.
Most people use dive computers in range of 200-300$, so a subscription based 700$ Apple device isn't democratizing anything, it's just bringing rent seeking to another market.
In 2nd year of college, one of my friends and I figured this out on our own, which was a really rewarding experience. The code did look pretty hairy, though.

Details for anyone interested:
The CS course project was to write a game solver for a variety of games with perfect information (e.g: tic-tac-toe), and they highly suggested we use object-oriented design and recursion + backtracking. They also let us pick any language we wanted, and being computer engineers, between the two of us, we were most comfortable with C.
So we kind of started writing our project and implementing the first game, and when we got to the second, we were scratching our heads like, "Is it possible to just... take a pointer to a function?" "Yeah, it's just somewhere in memory, right?" And then everything fell into place, and we just had to define a struct with pointers to game state and "methods", and our TA was baffled that we did the project in C but we got a great grade.
Don't?

I often now wake up at 3 or 4am. I just get up, do things, and perhaps have a nap later. That's the nice thing about working from home.
Or I don't have a nap, but go to bed super early (8pm!!), that way, 3 or 4am still give me 6+ hours sleep anyway.

I get my best work done early in the morning too. I can work until perhaps 11, and I can then goof off, take the dogs for a long walk, go fishing etc. Then perhaps sit back at my desk later mid afternoon on for another couple of hours.
False. If a program triggers UB, then all behaviors of the entire program run is invalid.

> However, if any such execution contains an undefined operation, this International Standard places no requirement on the implementation executing that program with that input (not even with regard to operations preceding the first undefined operation).

-- https://devblogs.microsoft.com/oldnewthing/20140627-00/?p=63...
Solving Cloudwatch Synthetic Canary self-signed certificate error
nice! you're right. Apparently Google just doesn't index files within nixpkgs anymore, so my usual "hare nixpkgs" query came up empty. Thank you :)
Strict aliasing allows you to convert between a pointer to a struct and a pointer to its first member, since two objects exist at that address, one with the type of the struct and one with the type of the first member.

> A pointer to a structure object, suitably converted, points to its initial member (or if that member is a bit-field, then to the unit in which it resides), and vice versa. There may be unnamed padding within a structure object, but not at its beginning.
I'm not religious myself, but by that statement you're insinuating that religions in general are hoaxes.

IMHO religions are just religions. As much as you can't scientifically prove the existence of god, you can't disprove it either. It's not necessarily a hoax.
You can directly enable the use of Metal with the drawingGroup() API.

https://www.hackingwithswift.com/books/ios-swiftui/enabling-...

You can also embed a UIViewRepresentable to "manually" embed a metal kit view inside a SwiftUI hierarchy. Basically use SwiftUI to manage most of it, but use metal to handle a bottleneck somewhere. Here is an example:

https://developer.apple.com/forums/thread/119112
TLB and Pagewalk Coherence in x86 Processors
I remember vividly when Flamin' Hot Cheetos came out (where I lived) and the ruckus they caused at my middle school. We inexplicably had vending machines full of junk food in the main lobby and kids would line up to empty the machines within minutes of lunch hour starting since, at the least, they only turned them on at lunch. They were eventually banned because some administrator discovered that kids were getting "high" from them, and replaced with regular Cheetos. Good job.
Our modern way of raising animals for slaughter is just that - modern. Not thousands of years. We have not been pumping steroids into the meat we eat for thousands of years.

We give our food substances that fatten them up as quickly as possible, and we're surprised we're getting fat.
From a certain point of view lab grown meat is a high risk yolo solution.

Animals have a highly effective immune system pumping out hunter killer nano bots to actively fight off invasive microorganisms, lab grown meat doesn’t. Similarly it’s far easier to tell of an animal is extremely infected.
I keep wondering, if flat is the new hot thing, why don't people just use libXaw to build their modern, cutting-edge UIs and not hobble my computer's performance in the process?
None of this is a problem in copyright litigation today, in which anyone can copy anyone else's work and lie about it. They will have to use evidence to prove whatever claims they made. The difficulty isn't in distinguishing between the works.
> C specification says a program is ill-formed if any UB happens. So yes, the spec does say that compilers are allowed to assume UB doesn't happen.

I disagree on the logic from "ill-formed" to "assume it doesn't happen".

> I think you're conflating "unspecified behavior" and "undefined behavior" - the two have different meanings in the spec.

I admit I don't differentiate those two words. I think they are just word-play.
Try tempah or mushrooms. (You might want to pan fry the mushroom first.) You could also try shelled edamame.

They aren't a one-to-one replacement for meat, but even when I've tried the impossible or beyond meat replacements, I find they taste like tofu instead of real meat.
> I imagine that future iterations of AVX will likely ditch CPU throttling. I'm guessing it was a "our current design can't handle this and we need to ship!" sort of solution. (If they haven't already? Do current CPUs throttle AVX-512 instructions?)

exactly what it looks like to me, and it was already fixed in Ice Lake and probably doesn't exist at all in Zen4. Just nobody cares about Ice Lake-SP when Epyc is crushing the server market.

https://travisdowns.github.io/blog/2020/08/19/icl-avx512-fre...

and some measurements of Skylake-X displaying the effect, note the voltage swings in particular: https://travisdowns.github.io/blog/2020/01/17/avxfreq1.html

the whole thing looks very much to me like "oops we put not just AVX-512 but dual AVX-512 in our cores and on 14nm it can hammer the chip so hard we need more voltage... guess we're gonna have to stop and swing the voltage upwards".

not only is that less of a problem with higher-efficiency nodes, but the consumer core designs drop the idea of dual-AVX 512 entirely which reduces the worst-case voltage droop as well...
I use Zig every day and I consider Zig's vector type and SIMD support a good stepping stone to the destination of just writing the intrinsics.

Competing efforts including std::simd or Highway are either unusable because they don't expose pshufb or more difficult to use than the tools they are abstracting away.
Weren't all those ape NFTs brought with monopoly money anyway?

I mean, buying a $1M ape NFT with real money makes no sense - but if you were Sam Bankman-Fried and you had an unlimited supply of coins you knew to be worthless, you're just swapping something worthless for something maybe-worthless, which is much easier to explain.
I think the concern is feeding them other cows, growth hormones, and antibiotics to make them put weight on faster.
It's more (iii) the narrative.

Give us your money to invest in this new, fresh face that's going to change the world.

If you're an old face - why haven't you changed the world already?

The story isn't as catchy.

It has nothing to do with what makes sense. For a large subset of VC (obviously not all) - it's more about what you believe you can sell to others than what you believe is actually going to succeed.
They’d be bad enough at it without presidential malfeasance https://www.nbcnews.com/news/amp/ncna1055451
Mutual Recursion in Language
I hope this propagates to the EU if it's truly safe. It's been more than a decade and I still miss meat when the weather gets cold.
An operating system and a desktop environment written (mostly) in java/javafx, with a focus on security.
RxSwift
Not particularly. It does not allow the compiler to assume true infinite loops can terminate.

It only allows the compiler to assume loops with non-constant expressions can terminate. (And a bunch of other exceptions where it cannot.) A true infinite loop has a constant expression as the conditional and cannot be optimized away based on this rule.

What this rule allows the compiler to do is to optimize away loops where number of iterations are known ahead of time if it has a non-constant expression condition.
The @document and other at-rules mentioned in the article are related to user styles. https://en.wikipedia.org/wiki/Stylish was popular back in the days. As more and more websites moved towards generated CSS classes, it's become more difficult to maintain custom styles.
This is a nonsensical comment.

Culturing meat is entirely about minimizing resource and land usage, and curbing the serious environmental impacts of the beef industry, which is of course truly infamous for methane emissions and deforestation.
It will be animal cells differentiated into muscle tissues on collagen scaffolds initially. The technology comes from attempts to grow functional organs (ie, liver) that are biocompatible in the body serum proper. If there aren't health effects from transplantation within the animal type you can probably eat the animal tissues just fine. It's the same thing. It's meat. It's just without the animal suffering. And hopefully it'll eventually be cheaper than growing animals too.
It may be strictly UB, but given that any operating system written in C relies on this behavior being well-defined (e.g. the container_of macro widely used in the Linux kernel) you're probably pretty safe.

Note that there is sort of an active war between the OS folks, who are probably the main users of pure C nowadays, and the UB nazis among the compiler folks who are mostly worried about efficiently optimizing complex template code in C++ and don't care whether their computers continue to run :-)
I'm not sure muscles that haven't been "used" will taste the same as flesh that is grown and hasn't been out walking around. The texture is sure to be different.
Alternatives are not competition in a highly state-controlled environment. It’s an appearance of competition. Exactly what the Chinese government wants.
Imagine thinking modern factory farming is anything as simple as “putting a cow in a field”.
What reason do you theorize the USDA wasn't present in Wuhan?
What idea? The idea of "centralised actor" isn't even an idea, it's gibberish.
One could argue that the act of 'curation' happens before the stores even begin to offer anything, because anyone with a sense of self-preservation in a regime that likes heavy political censorship will have an instinct for what is within acceptable bounds. And that is before we get to people on boards that keep hands on the pulse and so on.

I guess what I am saying is: "Absolute number of stores does not equal better access to anything." For all my beef with Apple and Android ecosystems, there are ways to bypass most of it ("control over market"). I am not sure, it is an option in China despite having 5 stores as opposed to 2.
It's kind of absurd the level of failure in crypto lending. Putting aside anyone with criticisms of all things crypto these should all be based on the very basic and long established business model of taking deposits, making loans, and paying interest. There shouldn't be anything inherently difficult or "scammy" in that and it should be a successful business pillar in the crypto space. Besides the basic business your two other main priorities should be risk mitigation and dealing with liquidity issues. Surely long term some well run company ought to be able to sort this out.
The author specifically mentions static websites, which wouldn't have the functionality to alter the HTML.
I'm 23 and have lived most of my life without having close friends. I'd say I'm very extroverted and can strike up engaging conversations with most people I meet. I'm easy going and don't really have a fear of talking to new people.

The problem is that I end up with dozens of friends that I regularly have good banter with, but it just never feels like one of those "best friend" or "close friend" situationships. Most of my own problems or vulnerabilities are dealt with by myself, internally, perhaps with some advice from others if I discuss it. It feels like you need to lean on people emotionally in order to actually become closer.

What OP has mentioned does actually work and I have used some similar approaches, without knowing it, to improve my friendships. But you also need to attach a high value to regular conversation and communications. If you don't keep in contact on a regular basis, the friendship will diminish, regardless of the closeness.
Great stuff, hope they found time for a longitudinal study as well!
I often wake up at about 4am. In most cases I just accept it as a sign that body had enough sleep (I usually go to sleep 9pm-10pm) and proceed to my business. This usually means making a cup of tea and working.

The hours between 4am-8am (kids get up at ~8am) are usually the most productive for work.
I agree that Bitcoin has chosen some trade-offs against mass adoption, like limiting block size. I think this is a bad move, since security is more than enough.

Lightning is not viable, because it requires "watchtowers" to check for early state commit attacks. Not everyone will be able to run such a server.

But, for instance, Bitcoin Cash has larger blocks (the reason for the first fork of Bitcoin). However, in spite of its technical advantages, adoption severely lagged compared to Bitcoin. I wonder why that is.
Safe to eat is not the same thing as healthy.

Further long term nutrition studies required
Wasn't Dave's Insanity Sauce banned in the EU for a while?
Controversial Opinion: Elder Care/Hospice + Childcare + A lot teaching is "infrastructure" and should probably be done on Debt spending.

It should be marginally cost optimized in that it should not give in to consultant + contractor + admin bloat driven cost diseases, but worrying about cost "effectiveness" here seems to be defeating the point, as you laid out in your example.
Me too. Aside from the environmental improvements, there's some pretty cool stuff they could in theory do with this tech. Making consistent, perfect cuts of meat with little waste. It's early days, but this is pretty promising tech and I'm excited to see where it goes.
Unfortunately I don't think that's possible because of the relatively short half-life of DNA.
Reading this, I wonder about all the UIs that I come across today and feel like they're usually on a scale from flawed to awful (see also: store reviews of software, especially after an update). Not being from the software development world, can anyone who is confirm whether this type of user testing still takes place at all? Or is it perhaps confined to big redesigns, specific user groups (like beginning computer users, even for developer tools like vmware), or other such constraints?

Edit: reading further, this is a great example: "Separate UI for Beginners [...] [various problems mentioned] [...] For these reasons and others, we abandoned the idea". These reasons translate directly, one-to-one, to Android's simple homescreen variant that my grandma kept finding somehow, clicking on, and then not being able to use various things on her phone anymore. Nor getting more comfortable with the proper UI. Nor was it consistent with other apps. Android added this feature when, a decade earlier, it was already spotted (long before release, I should note) that such a variant wouldn't help people at all. This doesn't appear to have been thought about or tested in the real world, and I think Android is the most-used OS on the planet. (Not sure if all vendor's shells have this feature as well, but I'm fairly sure it was stock android or at least commonly implemented a few versions ago.)
> And then someone else has to come behind you to support your custom framework.

Are you asserting that developing an understanding for a vanilla web codebase is somehow worse than figuring out how to upgrade an Angular2 project to Angular8?

The biggest reason we use "custom" framework is because all the "standard" frameworks change too rapidly to support our business model. They also fall out of support before our B2B contracts expire, creating very difficult situations at due diligence time. We sell software to banks, so we don't get much room to work with regarding our 3rd parties.
No, just interesting.
I also had this same problem to solve about a year ago. What I ended up doing was to build an iaq_board, and then plot the data in grafana.

https://esphome.io/cookbook/iaq_board.html
https://github.com/nkitanov/iaq_board
> We're talking about different ends of the market

I am quite specifically talking about price. Maybe you still carry confusion. Maybe you replied to the wrong thread. Maybe you're desperate for that argument you hoped I was engaging in. But whatever it is, we're not talking about that. That is certain.
They might be referring to eg. the `_Nonnull` annotation being added to memset. The result is that this:

if (ptr == null) {
set_some_flag = true;
} else {
set_some_flag = false;
}
memset(ptr, 0, size);

Will never see `set_some_flag == true`, as the memset call guarantees that ptr is not null, otherwise it's UB, and therefore the earlier `if` statement is always false and the optimizer will remove it.

Now the bug here is changing the definition of memset to match its documentation a solid, what, 20? 30? years after it was first defined, especially when that "null isn't allowed" isn't useful behavior. After all, every memset ever implemented already totally handles null w/ size = 0 without any issue. And it was indeed rather quickly reverted as a change. But that really broke people's minds around UB propagation with modern optimizing passes.
The first form has no undefined behavior. Since p may be NULL, in general the compiler is not allowed to make that transformation unless it can prove bar never gets called with p=NULL and n=0 (which it probably can't).

If the compiler has some special knowledge of the target architecture which makes the second form behave as if the first form was executed (such as if NULL is a valid address on the target architecture), it may make the transformation, but that still wouldn't cause undefined behavior, because it must behave as if it had the first form.
I'm biased to appreciate that F-Droid even exists but providing a default list is not cognitive dissonance, and what you've said suggests that you may have missed the author's point.

You can connect whatever "collection of apps" source you desire but you're correct that you do get the "F-Droid List" out of the box.

It may feel odd to show no apps when initially using F-Droid but, in theory, one improvement may be to have the user explicitly choose a source list and maybe the "F-Droid List" is first in the list among others.

Going in that direction would also help expose that particular feature as I wasn't even aware that you could add / change sources for F-Droid, which sounds like if easy enough to add may be an easier avenue to self publish apps than the major app stores.