Better HN
topnewbestaskshowjobs
Log inSign up

throwawaylinux

3,517 karma · joined Jul 23, 2021 (5y ago) · 2,823 submissions

Submissions

comment 3y ago · link · parent

I'm not a sea dog (or air dog), but even absent electronic calculation and navigation devices of the last half century or so, is there any real advantage to using nm vs any other unit? Other than for the presumably niche case of traveling exactly directly along the equator, that is.

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

I find it wonderful that they are learning to live with a nice successful society that is not in a state of constant exponential growth, and they've resisted doomers and deranged neoliberal calls to keep massively expanding population. Truly a leader in sustainability, a shining beacon to the world for what is actually possible as opposed to what "experts" (aka shills for billionaires) claim to be the case.

comment 3y ago · link · parent

No, a lot of animals kill for fun (not just "pure survival"), including early humans, some apes, and quite probably our common ancestors.

comment 3y ago · link · parent

And neither does the evolutionary drive to kill animals consider those things.

comment 3y ago · link · parent

Our ancestors who evolved to hunt did not "play fair", they killed animals any way they possibly could. Running them off cliffs, into pits, setting fire to the forest to burn them alive. Might as well say guns and knives aren't hunting, that you have to use your bare feet and hands and that's it.

comment 3y ago · link · parent

30mph across the entire fleet, 24x7? I don't live in a city with them but that sounds optimistic. 30mph seems like a decent average in a big city when you're on the move. Add stops to recharge, pick and drop fares, maintenance, and down time between fares, I'd not be surprised if it was half that or less.

comment 3y ago · link · parent

It's a local exploit, which are not uncommon in Linux.

comment 3y ago · link · parent

No.

comment 3y ago · link · parent

> The problem with sensor fusion is what do you do when the sensors disagree?

Like one sensor says you have a bus stopped in front of you and the other says it's all clear? And your choices are full steam ahead or prepare to not ram the apparent bus?

comment 3y ago · link · parent

Are you talking about asynchronous logic? I thought that already is pretty much a curiosity.

comment 3y ago · link · parent

> If you want to beat obesity start by buying just the ingredients and then cooking meals at home. It's not that hard. Then start walking to places instead of taking the car. Taking public transportation is also good because it frequently forces you to walk a non-negligible amount. Also stop eating while watching TV. You can go one step further and throw out the TV altogether.

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

> Isn’t tobacco use trending down anyways? How could you possibly tease out the drop in tobacco use from one change to packaging?

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

Well that's a bad criteria. A lot of people get hooked on "snake oil", and will even try to seek it out. Astrology, alternative medicines, crystals, vibes, etc., cults and other such religious beliefs, various social, economic, political and other beliefs that aren't supported by evidence. Lots of them aren't "zealots", they're pushed by fear, misconception, misinformation, desperation, FOMO, hype, etc.

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

I think anyone could have grievances with the system and reasonably feel it's not fair.

My issue are these outlandish made-up assertions and generalizations, calling peoples' lives "games", etc. Clowns like this are the crypto-bro of social commentary.

comment 3y ago · link · parent

> Married heterosexual motherhood in America, especially in the past two years, is a game no one wins,” wrote Amy Shearn in one of many New York Times op-eds

The absolute state of the intelligentsia.

comment 3y ago · link · parent

I'm the first to call journalists out of touch, but in this case it's you.

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

Not sure, the qsort is recursive and stack limitations were mentioned. But the point being that the reason they don't use their library functions because it's a constrained environment.

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

What are the outcomes for a person who was taught to sufficiently develop their "mathematical thinking", versus not?

comment 3y ago · link · parent

Conceptually at a high level yes (if the hardware was ~identical). Resuming from hibernation on the same machine resuming from hibernation is basically loading an image into memory and executing it that OP asked about too. But in either the resume or hypothetical hypernation migration cases, you can't just start running where the previous boot left off, you have to go through hibernation resume functions which basically do the same thing as boot in terms of configuring hardware.

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

> > you would have to bring up the rust runtime environment as part of the boot process

> 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

I'm not sure what part of my post you are addressing.

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

Simplistic answer is because hardware and firmware environment gets configured during boot, even for virtual machines.

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

It's not because of that. There exist countless BSD compatible code out there, and many are taken and used in projects like this. CRC codes being an obvious example. There is no reason sort code could not have been grabbed from somewhere, no "dependency management system" required. The FreeBSD kernel has its own existing sort libraries already in the code too -- https://cgit.freebsd.org/src/tree/sys/libkern/qsort.c?id=9a7...

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

My vet told me a lot of dogs have high pain thresholds and/or will hide their injuries, so they won't necessarily stop eating from mouth pain. He wasn't trying to upsell me, I was asking why my dog was avoiding food and wondering whether it could be a tooth problem (so unlikely to be the case).

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

Still wasteful and frivolous. Imagine how many more people the globe could support if we stopped being so greedy and thoughtless with entertaining ourselves.

comment 3y ago · link · parent

Do you have any idea how much CO2 it takes to create and hang a painting or photo?

comment 3y ago · link · parent

Not if possible implementations are specified, and especially if you can target machines of particular behavior. Which is of course how you can write endian and bit size portable code.

comment 3y ago · link · parent

> Great, except no implementation of the C abstract machine actually exists. So you can't test against it. All you have are compilers that use it to justify miscompiling your code.

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

Most modern architectures that target high performance implementations can do unaligned accesses, even ones crossing page boundaries.

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.

comment 3y ago · link · parent

Cheap, unique experience, not a cliche tourist trap, meet interesting people, learn about different cultures, fulfills the soul (if you donate or volunteer).

Well "AI" might be further along than I thought, that's actually a good and creative suggestion.

12345
95