3,517 karma · joined Jul 23, 2021 (5y ago) · 2,823 submissions
comment 3y ago · link · parent
nm are great because charts and speeds are in units of nm and kt of course, but what does "real meaning" give you exactly?
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
This all seems pretty strange and won't make you lose weight. What will is just eating fewer calories. That's it. You don't have to change anything at all if you don't want to. You can drive to the store, you can eat in front the TV, you can eat your hamburgers and drink coke. Just eat less of it, and you'll lose weight.
The idea that people have to be "educated" to know this is ludicrous, such a typical "government" / "expert" notion. Eat too much = get fat has been known and understood for centuries. People knew this when they were illiterate peasants. School children tease each other about this. The obesity problem is not caused by lack of education, it's caused by lack of self-control (exacerbated by the refinement of food composition, improved cost and convenience, and marketing).
comment 3y ago · link · parent
Anything in the real world has many many factors affecting its consumption. What would it matter if it was trending down specifically? Or are you asking what models and statistical tools they use to make analyses like this when there are a complex set of factors at play?
comment 3y ago · link · parent
Also, even if some people in some usages get benefit out of it, does not mean that fuels hype and snake oil to try to sell it to uninformed people to use in inappropriate places. Baking soda is good for making bread, lots of people use it for that with great success. It is snake oil for curing cancer, however.
comment 3y ago · link · parent
There's a reason that cars and private-public transport like taxis and uber are so popular all around the world, even in cities with much better public transport than SF. A reason why quite poor people will often spend a lot of money to own cars.
Look at London or cities in the Netherlands or Japan. Car ownership rates around 50% per household, and use of taxi services from time to time would be far higher.
It's because even very good busses and trains don't offer the freedom and convenience of a car. And it doesn't require an outlandish value of a person's time for that $18 to $21 to look at lot more cost competitive with the public transport option.
comment 3y ago · link · parent
Maybe they could permit some of their sort library functions to be used in such a constrained environment, sure. Don't need rust to do that, just need to be happy that the implementation is suitable for purpose. Which they would have to do regardless of what language and runtime they were using.
comment 3y ago · link · parent
On virtual machines there probably isn't nearly so much real hardware to set up, and hypervisors can optimize virtual device setup. The machine image could also be provided via COW snapshot of memory. So I don't know, possibly at some corners it could be faster to do a resume type operation than a full boot. I haven't played with hypervisor guest boot at these kinds of speeds before.
comment 3y ago · link · parent
> Like the existing C runtime environment, this just isn't a big deal by the time we've got here. If you're the code for initialising the DRAM controller then sure, that's pretty intimidating. But this is all happening much later, we're part of an operating system, we were already loaded from disk.
I don't know what you're trying to say. The code which is written here that we are discussing is in a constrained environment where the regular kernel runtime facilities are not all available. This was cited as one of the reasons cited for open coding a very simple algorithm.
> > And evidently they do need a stable sort.
> How so?
From reading comments from patch author here.
comment 3y ago · link · parent
If you had a kernel written in Rust, you would have to bring up the rust runtime environment as part of the boot process. You don't just magically get it because that's the language you used, whether it is "core" or not. You can't even execute simple functions before you have set up stack, and in this case apparently there is a constraint on stack usage. And evidently they do need a stable sort.
In any case my main point is that it's not anything to do with dependency management, not quibbling about whether or not some language could support this function at this exact point of the boot.
comment 3y ago · link · parent
Some virtual machine environments do have facilities to snapshot the entire state of a machine and resume it (potentially on another machine), but if you look at what is involved with snapshot metadata it's more than just the state of memory, you have CPU and device state as well.
comment 3y ago · link · parent
The real reason is because this is an early boot environment with exact constraints that are unusual if not unique to FreeBSD where the facilities to support your general language / runtime environment is not up yet.
comment 3y ago · link · parent
That doesn't help much I know, just make sure you get advice from people you trust have a care about dog's quality of life.
comment 3y ago · link · parent
All C compilers implement the C abstract machine. It is not used to justify miscompiling code, it is used to specify behavior of compiled code.
> We need a C interpreter
Interpreter or not is not relevant, there must be some misconception. Any behavior you can implement with an interpreter can be implemented with compiled code. E.g., add a test and branch after each integer operation if you want to crash on overflow.
> that intentionally implements C machine features that don't correspond to any architectural feature - i.e. pointers are (allocation provenance, offset) pairs, integer overflow panics, every pointer construction is checked, etc.
As others have mentioned there are static and dynamic checkers (sanitizers) that test for such things nowadays. In compiled, not interpreted code, mind you.
> If only to point out how hilariously absurd the ISO C UB rules are and how nobody actually follows them.
It's not that bad.
> My personal opinion is that "undefined behavior" was a spec writing mistake that has been rules-lawyered into absurdity. For example, signed integer overflow being UB was intended to allow compiling C to non-twos-compliment machines. This was interpreted to allow inventing new misbehaviors for integer overflow instead of "do whatever the target architecture does."
The spec uses implementation defined behavior for that. Although you can argue that they went the wrong way on some choices -- signed integer overflow "depends on the machine at hand" in the first K&R, which you could say would be reasonable to call it implementation specific and enumerate the behaviors of supported machines.
C had a long history with hardware manufacturers, compiler writers, and software developers though, so the standard can never universally please everybody. The purpose of standardization was never to make something that was easiset for software development, ignoring the other considerations. So a decision is not an example of design by committee gone wrong just because happened to be worse for software writers (e.g., choosing to make overflow undefined instead of implementation dependent). You would have to know why such a decision was made.
comment 3y ago · link · parent
Less common is support for atomic RMW access to unaligned location. x86 does support it but crossing a cache line causes the operation to be very slow.