The potential for unchecked "growth" and potentially fatal infection vaguely reminds me of the terrifying aspects of prion based diseases. Thanks for giving me another theoretical nightmare scenario to worry about in the back of my mind! :-)
Related:
Technical Report on Mirror Bacteria: Feasibility and Risks (stanford.edu)
Prions are real. Don't eat mad cow. Rememeber that boiling prions would not kill them, but burning them to ashes will.
Mirrored bacterias are still just scifi. It's too hard to make one of them for now and some normal bacterias will eat them anyway becuase there are a lot of weird bacterias that can eat some specific varity of crap. One of them will save us [1].
The normal bacterias can have trouble eating the reversed proteins, RNA, DNA and even sugars. But oil/fat don't have this problem! In the worst case, normal bacterias will just steal all the oil and fat from the reversed bacterais and kill them, and we will have to sweep the discarded reversed proteins and burn them.
I find it slightly heartening to consider that all biological life is already a long-running Gray Goo apocalypse, and one of the inheritors of that legacy are towering trillion-unit megastructures with eldritch hiveminds were call "people."
And a full environmental collapse is not even strictly necessary to end civilization. If the climate perturbation is large enough it will cause a mass migration and an economic disaster, either of which is enough to cause a war.
Can humanity peacefully deal with things like half of China becoming uninhabitable by humans? Dunno but if I had to pit humanity against this or the mirror bacteria I'd choose the latter.
I've read multiple times (over the years) that swifts are known for sleeping while in flight during their migrations between Africa and Europe. The best reference I could find right now is https://www.nationalgeographic.com/science/article/three-swi... which doesn't confirm but strongly implies (presuming a bird cannot go for 200 days without sleeping, and it was apparently up in the air all that time, it must have been taking "power naps" in mid-air).
I use the same heuristic for when I should switch from shell to Python :-). Arrays (especially associative ones, at least for me) are a good indication that a more advanced language like Python might be more appropriate than shell.
malloc/free are for heap based allocations. The grand parent explicitly mentioned he was referring to stack based allocations, which are kind of automatic (implicit).
The stack is fully automatic arbitrary memory and has nothing to do with registers. You can allocate as much as you want (including e.g. bytearrays), until you run into the allocated stack limit. That limit can be arbitrary, and some languages even dynamically scale the stack.
That you also have access to manual memory on the heap doesn’t matter. You can also do manual memory management in Rust if you want, as one has to do at times.
Ok. Then manual memory applies to just heap memory management.
It's not rocket science. If you are calling malloc/free to maintain your memory you're doing manual memory management.
> You can also do manual memory management in Rust
You can do Garbage Collection in C, it doesn't make it Garbage Collected language.
You're confusing default memory management with what's possible.
By your logic, Arena allocators can be used in many different languages, including GC ones like Java. So that means GC languages like Java are manually memory managed. Which is defeats the definition of it.
> It's not rocket science. If you are calling malloc/free to maintain your memory you're doing manual memory management.
Sure, and when I do the same in Rust I'm also doing manual memory management. So by your definition, both Rust and C are manual memory languages.
> You're confusing default memory management with what's possible.
Ah, so we care about the default, which I pressume is what the language semantics themselves provide, rather than focusing on what the standard libraries can provide you?
In that case C is an automatic memory language, because the language semantics only provide you stack memory. malloc/free are just random functions in the standard library after all, just like Rust's `Box::new` and `std::alloc`.
See, the point is that you're opting into manual memory management in C from an automatic model. We are so used to the stack that we forget that it's the OG fully automatic zero-cost memory management system, and in case of C++, can be used to implement fully automatic heap memory as well - in which case you never need to call malloc/free/new/delete.
(And no, it doesn't count that your smart pointer calls new/delete, because then you also need to count Box::new calling std::alloc)
> By your logic, Arena allocators can be used in many different languages, including GC ones like Java.
Uh, even in bog standard Java without any shenanigans you are using an "arena allocator". A GC doesn't change how allocators work, it just responsible for calling free.
(Caveat about moving vs. non-moving garbage collectors and ones that have multiple arenas, but that's not relevant here and an entire topic of its own.)
> You're being very thick on purpose. In Rust you need to reach for foreign functions to implement malloc/free.
I think you're mistakenly thinking of calling out to the (rust-lang maintained) libc crate's malloc/free functions. That's not the case - the standard library provides `std::alloc`, which is the allocator also backing Box and Vec.
> No. By my definition what is the default semantics determines if it's manual or automatic. It's CS 101.
Your definition of default semantics - "in C it's not what the language does but what happens when you call random library functions, while in Rust it's the opposite" - makes no sense at all.
C isn't considered a manual language because of default semantics, but because people have chosen to mainly rely on such paradigm.
> No, no you aren't. At least not explicitly. I assume you mean GC, if it has or doesn't have arenas is implementation detail.
Yes, whether any allocator has an arena is an implementation detail.
Whether you call `malloc` or `new`, or you have Go or Java do a heap allocation for you (which, to nitpick, is not actually the job of the garbage collector), the use of an arena is an implementation detail. In case of GC, the availability of optimizations also depend heavily on whether it's a moving GC.
> That's not the case - the standard library provides `std::alloc`, which is the allocator also backing Box and Vec.
Again, emphasis on the word, default. How are you using Box and Vec. Are you by default encouraged to drop them manually via Allocator?
No, you aren't. You're heavily discouraged via usage of `unsafe`, you are discouraged because the compiler does automatic `alloc`/`drop`.
You have to go out of your way to do manual memory management.
> Your definition of default semantics
I showed you what happens when you apply the non-default semantics of a language to C. You end up with nonsensical statements like C is a GC language. Just because a style is possible in language X doesn't mean language X is of that style.
> C isn't considered a manual language because of default semantics, but because people have chosen to mainly rely on such paradigm.
And why is that? Because the default affordance of the language makes it so that way of usage is the most natural to most users. You could put everything in the stack, but that would be extremely torturous for most users, so they use malloc/free.
You give people a knife, of course they will grab it by the handle.
allocates a byte on the stack, binds it to a variable named x, sets it to 1, then deallocates it from the stack. There is no explicit allocation or deallocation.
As an optimization it can be put into a register instead of the stack, again without explicit allocation and deallocation (this is done by the compiler playing musical chairs with registers).
I would not consider this manual. Manual would instead be something like in embedded programming
int8_t* y = (int8_t*)0xB4DC0FF3;
*y = 1;
because one needs to keep track of used memory locations (do allocation management)
Compliments to the author for clearly explaining all of the steps involved. I've never gone this deep, although I have previously converted remote headless Linux servers to full disk encryption using similar techniques. Thanks for sharing!
If you make a bookmarklet to look up the current page on archive.is you'll never have this problem again :-). Here's the link for this article: https://archive.is/9QF2j
Thanks. I use the archive a lot, and I’ll try a bookmarklet. Just couldn’t resist the irony of a “health” article being soft-paywalled. And IIRC, some graphics don’t render in some archived pages.
A lot of people are on the losing side of the digital divide, and no doubt need some information more than the tech-savvy or those who can afford the many subscriptions. Just like cable tv did, there’s no picking and choosing.
Unless you go the clandestine route (this is not an endorsement) then it’s a raft of subscriptions to get what you want. I thought that micropayments would open up the web, silly me. And that those inflated monopolistic fees that ISP’s charge would buy a bunch of tokens for “premium” content.
What’s more mind-boggling is paying for scientific papers that are readily available at arxiv or at university sites. Oh well, now you know why I wanted (and needed) a chuckle this morning.
Have a sip with dinner, and read the article after dinner.
I got into fermented foods to improve my health, and quite a few of these are acquired tastes for me (and surely also for lots of other people). Milk kefir, water kefir, kombucha, tempeh, koji, natto, these things challenge the taste palate of someone who grew up in the Western world without exposure to fermented foods (e.g. a strong sourness to foods and drinks). I grew to appreciate and in some cases love them because I know what they do for my health. Nowadays I regularly crave fermented foods, but when I started taking them I had to force myself to get accustomed to them.
I don't mean to come off as ignorant (so please correct me if I am wrong) but could it be that the so-called "two-party system" in the US is to blame for some of the polarization implied in your message?
As someone living in the Netherlands and being used to dozens of political parties with various ideologies and convictions, the two-party system of the US has always surprised me as being extremely limiting (e.g. if you don't naturally identify with Democratic ideologies you vote Republican or vice versa).
Edit: None of this is to imply that Western Europe or the Netherlands doesn't have major political issues, for example I'm quite disillusioned about the uptick in popularity of populist political parties (throughout Western Europe but also specifically in the Netherlands).
It certainly doesn’t help! The underlying culture war tension (IMO) is growing out of city vs rural politics and economic issues, and the two party system naturally lends itself to splitting along those lines.
And having two parties means it’s easy to play us vs them on topics.
Almost anything can be ‘maximally polarized’ into exactly two poles with enough work though - including immigration, male/female issues, business policies, import/export policies, foreign policies (isolationist vs interventionist), etc.
Populism in general is being driven by the same factors everywhere IMO, and many of them are macroeconomic.
A 'Second Tree of Life' Could Wreak Havoc, Scientists Warn (nytimes.com)
https://news.ycombinator.com/item?id=42403886