Readit News logoReadit News
xroche commented on Regulators OK largest dam demolition in history to restore salmon habitat   oregonlive.com/environmen... · Posted by u/DoreenMichele
rapsey · 3 years ago
I don't understand how it makes sense to make these decisions one-sided. I have no opinion if demolition is right or not, but should it not make sense to also in the same bill fund a project to replace the lost power? Same goes for the Diablo canyon power plant and those plans for phasing it out.
xroche · 3 years ago
It is somehow addressed, but with unreliable wind power sources that ca'n't be controled:

> We’re closing coal plants and building wind farms and it all just has to add up in the end. It’s not a one-to-one

And of course this won't cover the loss of energy, so let's pretend we can do that through "energy efficiency"

>You can make up that power by the way you operate the rest of your facilities or having energy efficiency savings so your customers are using less

Tl;Dr for the energy side: Smoke and mirrors.

xroche commented on Mass of transactions leaving crypto.com wallets   thechainsaw.com/defi/cryp... · Posted by u/thm
Renaud · 3 years ago
The problem might be different here, but all the exchanges I have used have ended up dead, and I consider myself very lucky not to have lost everything I had.

First there was MtGox where I happily sold BTC and then waited weeks for a bank transfer that never came. I was lucky to be able to re-purchase some of the BTC (at a loss) and transfer them out. That was just a few weeks before MtGox fell.

Then there was ANX/ANXPro. Everything was fine for a while. Over time, they ceased trading and at some point app and website stopped being functional. I had left some crypto there, at time it wasn't worth much. I panicked once the value shoot up and I couldn't find a way to recover them.

Fortunately, I had chosen ANX because they were local. I went to the listed address there in person, expecting it to be closed. I found the place, it was nondescript, no sign, no-one in sight. I was shaking when I pressed the bell and a guard came to answer. Fortunately, the company was still running in some fashion. There was a counter and I was able to transact my crypto out. Had I not been local, I would have probably lost it all.

Then there was FTX... I traded cautiously last year for a little while, never leaving too much for too long, then decided that crypto was all too nerve-wracking for me and sold everything I had. Probably the best thing I ever did. I have friends who lost big in the FTX debacle and will probably never recover a dime.

The morale of the story is that I wouldn't trust ANY exchange. They move so much money that the temptation is too great not to use it for something else. Despite claims, I don't trust any to have the structure and oversight necessary to avoid misusing funds that don't belong to them.

xroche · 3 years ago
> The morale of the story is that I wouldn't trust ANY exchange

Or, more generally, don't trust unregulated financial businesses and/or operating in shady offshore countries.

FTX was both unregulated and based in Bahamas.

xroche commented on io_uring_spawn: Launching New Processes with io_uring   phoronix.com/news/Linux-L... · Posted by u/goranmoomin
the_duke · 3 years ago
What kind of workloads spawn so many processes that saving microseconds becomes relevant?

I guess shells (eg with xargs) would be one example.

Edit: the talk mentions build systems as a motivating use case.

xroche · 3 years ago
> What kind of workloads spawn so many processes that saving microseconds becomes relevant?

With a huge process, you have a timeframe between the child is spawned and it executes exec*() where you typically "do stuff" (such as closing a lot of fd)

During this timeframe the parent process has its universe COW'ed, and each write will trigger a page fault.

The performance impact can be concerning in the _parent_ process.

xroche commented on Oscar Niemeyer’s French communist party headquarters   interiordesign.net/projec... · Posted by u/davikr
diego_moita · 3 years ago
I worked for 3 months in a building projected by Oscar Niemeyer. It was an horrible experience.

The building is on this foto [1], the Jetsons-like structure in the front didn't exist back then. It was just the long white slab on the back, without windows. Behind there is a preserved rainforest. The place is very humid and, for aesthetic reasons, the building had no windows and horrible ventilation. It was cold and very moldy and respiratory diseases were very common among the staff.

As some people say in Brazil, as an architect, Niemeyer was a very good sculptor.

However, some brazilian disciples of him (e.g: Ruy Ohtake) are actually careful about the comfort and well being within their projects.

[1] https://curitibaspace.com.br/wp-content/uploads/2016/08/Muse...

xroche · 3 years ago
> As some people say in Brazil, as an architect, Niemeyer was a very good sculptor.

We indeed have a lot of those fancy buildings from famous architects, mostly from the 70s.

They all share a common pattern:

- a repressed artist who became an architect

- a beautiful piece of concrete modern art on the outside and that makes fancy design magazine photos

- an oppressive building and a complete failure in term of comfort/ergonomy

Another example is the "Espaces d'Abraxas". But there are even worse examples when you look at brutalist architecture.

xroche commented on Why are nuclear power construction costs so high?   constructionphysics.subst... · Posted by u/spenrose
xroche · 3 years ago
> Because nuclear plants are expensive, and they take a long time to build, financing their construction can also be a significant fraction of their cost, typically around 15-20% of the cost of the plant. For plants that have severe construction delays and/or have high financing costs (such as the Vogtle 3 and 4 plants in Georgia), this can be 50% of the cost or more.

This is why nuclear power plants should be state-sponsored projects. States typically have loans at 0% rate, or even negative interests.

xroche commented on Fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid   gist.github.com/nicowilli... · Posted by u/__s
evmar · 4 years ago
In Ninja, which needs to spawn a lot of subprocesses but it otherwise not especially large in memory and which doesn't use threads, we moved from fork to posix_spawn (which is the "I want fork+exec immediately, please do the smartest thing you can" wrapper) because it performed better on OS X and Solaris:

https://github.com/ninja-build/ninja/commit/89587196705f54af...

xroche · 4 years ago
The issue with posix_spawn is that you can't close all descriptors before exec. This is especially an issue as most libraries are still unaware they need to open every single handle with the close-on-exec flag set.
xroche commented on Fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid   gist.github.com/nicowilli... · Posted by u/__s
harry8 · 4 years ago
Fork with cow is inefficient.

Compared to what? In what dimension? Any numbers on that? Where is the trade-off? To what extent does anyone need to care and on what circumstances?

xroche · 4 years ago
It's inherently inefficient because while the child process does its initialization (pre-exec) stuff, the parent gets page faults for every thread writing into the memory due to COW. This will basically stall the parent and can cause funny issues.
xroche commented on Wordlexpr: Compile-Time Wordle in C++20   vittorioromeo.info/index/... · Posted by u/ingve
fathyb · 4 years ago
Wondering what happens if you allocate a chunk of uninitialized memory inside a constexpr? Could this be used for a quick constexpr RNG seed?
xroche · 4 years ago
You simply can't. The constexpr environment won't let you have uninitialized variables/memory anywhere. It won't let you access dangling/out-of-bounds pointers either, overflow two-complement types, etc.
xroche commented on Moving the Linux Kernel to Modern C   lwn.net/SubscriberLink/88... · Posted by u/chmaynard
kllrnohj · 4 years ago
Of those structures only vector benefits from realloc anyway. And if you really want it, it's not terribly hard to write. You can static assert that the template type is trivially movable which would make it safe to realloc.

But this is assuming you have a malloc implementation that does something other than implement realloc as just malloc+memcpy+free. Which not many do, not unless the allocation is so large as to be in its own dedicated mmap or similar.

That aside, sure would be great if you elaborated on these unsuitable, unresolved for kernel language issues? Exceptions and rtti are the only two I'm aware of and both have had off switches for decades.

xroche · 4 years ago
> And if you really want it, it's not terribly hard to write

Sure, but basically it means rewriting all structures that rely on a bucket of stuff.

By the way maps often use a large bucket, and rehash in-place can be preferable.

> Which not many do, not unless the allocation is so large as to be in its own dedicated mmap

Do you know a modern operating system that does not have a mremap equivalent ?

On Linux you pretty much use it as soon as you reach large blocks.

u/xroche

KarmaCake day1279April 12, 2013View Original