Hacker Newsnew | past | comments | ask | show | jobs | submit | biimugan's commentslogin

Yup. I never even use activate, even though that's what you find in docs all over the place. Something about modifying my environment rubs me the wrong way. I just call ``./venv/bin/python driver.py`` (or ``./venv/bin/driver`` if you install it as a script) which is fairly self-evident, doesn't mess with your environment, and you can call into as many virtualenvs as you need to independently from one another.

``uv`` accomplishes the same thing, but it is another dependency you need to install. In some envs it's nice that you can do everything with the built-in Python tooling.


And when you control the installation, you can install multiple python versions with `make altinstall` into the same prefix, so you don't even need to pass 'project/bin/python, you can just call 'python-project' or 'project.py' or however you like.


Yep. (Although I installed into a hierarchy within /opt, and put symlinks to the binaries in /usr/local/bin. Annoyingly, I have to specify the paths to the actual executables when making venvs, so I have a little wrapper for that as well....)


In addition to what others have mentioned, it also just makes it easier to come back later to a code base and make changes, especially refactoring. In many cases you don't even really have to add many type hints to get benefits from it, since many popular libraries are more-or-less already well-typed. It can also substitute for many kinds of unit tests that you would end up writing even 5 years ago. If you're an infrastructure engineer or data scientist that's usually just writing a lot of glue code, then it greatly helps speed up your output (I've found)


This

Without typing it is literally 100x harder to refactor your code, types are like a contract which if are maintained after the refactor gives you confidence. Over time it leads to faster development


I agree somewhat with the proposition that YAML is annoying for configuring something like a workflow engine (CI systems) or Kubernetes. But having it defined in YAML is actually preferable in an enterprise context. It makes it trivial to run something like OPA policy against the configuration so that enterprise standards and governance can be enforced.

When something is written in a real programming language (that doesn't just compile down to YAML or some other data format), this becomes much more challenging. What should you do in that case? Attempt to parse the configuration into an AST and operate over the AST? But in many programming languages, the AST can become arbitrarily complex. Behavior can be implemented in such a way as to make it difficult to discover or introspect.

Of course, YAML can also become difficult to parse too. If the system consuming the YAML supports in-band signalling -- i.e. proprietary non-YAML directives -- then you would need to first normalize the YAML using that system to interpret and expand those signals. But in principal, that's still at least more tractable than trying to parse an AST.


> If the system consuming the YAML supports in-band signalling -- i.e. proprietary non-YAML directives -- then you would need to first normalize the YAML using that system to interpret and expand those signals.

cough CloudFormation cough


Just run the code and see the output.

There are multiple ways to safely run untrusted code.

I for one enjoy how build.rs in rust does it: you have a rust code that controls the entire build system by just printing stuffs on stdout.

There are other ways of course


Just run the code that provisions the infrastructure? Sandboxing is the least of your problems. You would need to fully mock out all function executions and their results to have a hope to properly execute the code let alone govern what's happening without affecting a live environment. And even still, there would be ways to fool this kind of introspection, as I mentioned. In an enterprise environment where this kind of governance is mandatory, that's not acceptable.

In any case, regardless whatever clever method you try to use, even if you're successful, it's not as straightforward and easily understood and extensible as OPA policy. Let's say you succeed in governing Rust code. OK, but now I have developers who are writing in Python and Java and TypeScript. What now? Develop a new, customized solution for each one? No thanks


Are we already forgetting the Lebanon pager incident? It only happened last year. It seems perfectly rational to question the home country of a spyware company (of all things) when that country has in recent memory infected the supply chain of commodity electronics to booby-trap pagers and walkie talkies to explode and kill their putative enemies.

Let's also not forget that that country's paid spokesmen (both Israeli and American) were joking for months about those explosions, even lobbing it as a threat to their perceived enemies -- on live TV no less!


I think people should be highly skeptical of articles like this, even without knowing anything about the subject in question. No byline/author. No citations/links to the studies in question. Confirmation of preconceived notions that people would like to be true (e.g. the sun as a wellness remedy instead of damaging to skin), including unfounded "just so" stories and claims about evolution, diabetes, and other unrelated topics. Named individuals seem to "specialize" in sunlight as a wellness remedy (seems like a big red flag to me). No actual physical theory as to how it could be true (more vitamin D reduces death by up to 50%? how? your body only needs so much vitamin D and it's not actually all that much).

And sure enough, if you look up any details on the studies in question, they are highly questionable. Vastly different populations studied with very weak controls. For example, sunscreen use -- both chemical and physical, i.e. hats -- was not controlled for. Seems like a big problem since that's the primary claim being made! And it seems like such an obvious thing. It makes one wonder why it was omitted.

The facts of the "status quo" of sun exposure dangers, on the other hand, have quite a lot more going for them, both in terms of study quality and in terms of physical explanation/interpretation. UV radiation physically damages DNA, even when you don't burn. Tanning is a response to skin cell damage, so any additional melanin production in your skin is indication that your DNA is being damaged. Damaged DNA means when your cells reproduce, they reproduce the damage and/or otherwise mutate. If that damage or mutation happens to be cancerous, then you have a big problem. Tanning, contrary to what people seem to think, doesn't inoculate you against skin cancer or damage. It merely helps absorb a higher percentage of UV radiation -- meaning your skin is still getting damaged, just at a slightly lower rate (a helpful, though marginal, evolutionary advantage).


Sure but you should also be highly skeptical of people telling you that sunscreen is always required to go outside. A lot of the studies are funded by sunscreen companies which stand to make a lot of money.

> Tanning is a response to skin cell damage

I don't think this is true in any meaningful sense. Damage is part of life. Your body repairs minor damage and it is usually a good thing to trigger the repair pathways once in a while. This is also the basis for exercise - your muscles and tendons are damaged when you work out, but they get rebuilt stronger. Your DNA is also repaired, and turning repair pathways on can sometimes improve tissue quality/collagen production or get rid of imperfections - this is the basis of microneedling and cosmetic techniques, some of which involve light exposure. UV therapy is also a treatment for psoriasis (skin inflammation).

If any amount of sunlight is bad, ask yourself why melanoma typically occurs on the trunk region (in men) or legs (women) rather than say the face or arms. Those are regions that are normally hidden, but are then suddenly exposed when you go shirtless/at the beach.

The most dangerous thing is to go straight from non-exposure to high exposure. But if you gradually increase exposure, the body has many ways of dealing with non-overwhelming amounts of damage. Damage can in fact trigger repair which is often beneficial, as this article alludes to.

Most importantly, the more beneficial UV rays (UVB) for vitamin D production are weaker than the more harmful ones (UVA), so any sunscreen or glass that "blocks UV" necessarily blocks all UVB before you get close to blocking all UVA. Nothing can actually block 100% of UVA. But let's say you slather sunscreen on every time you go out. Now imagine one day you forget it or run out of it or for whatever emergency reason can't apply it. Now your pale unready skin is exposed to a large dose which could actually do more damage than your body is ready to repair.

The best time to get UVB is actually around solar noon. So, depending on your skin type, the best thing to do is to expose yourself to sunlight for short amounts of time (start with 1 minute if you want) without sunscreen before applying sunscreen. Then gradually increase the non-sunscreen time as your skin turns up repair pathways (and you get tanner).


> This is also the basis for exercise - your muscles and tendons are damaged when you work out, but they get rebuilt stronger

This is an outdated view, evidence shows muscle/tendon growth/adaptation occurs primarily via mechanical tension and metabolic stress, with damage playing a minimal or even counterproductive role. hypertrophy happens despite it, not because of it.

[The development of skeletal muscle hypertrophy through resistance training: the role of muscle damage and muscle protein synthesis. Schoenfeld et al., 2017](https://pubmed.ncbi.nlm.nih.gov/29282529/)


That’s interesting, thanks for the link.

Nevertheless, exercise turns on repair pathways in multiple tissue types.

Molecular mechanisms of exercise contributing to tissue regeneration (2022) https://www.nature.com/articles/s41392-022-01233-2

Exercise Promotes Tissue Regeneration: Mechanisms Involved and Therapeutic Scope (2023) https://pmc.ncbi.nlm.nih.gov/articles/PMC10164224/


Solar noon sunlight microdose is now on my todo list for tomorrow, thanks.


Are you sure about this? I always heard about Australians (especially surfers) that had a high melanoma incidence and that it had made it clear that even if you are adapted (tanned) cancer risks still rises with exposure time.


It matters what type of skin you have, there’s a genetic component. Most “Australians” are of Irish/British descent and not ready for that much sun even with a bit of a tan/priming. Indigenous Australians do not have high melanoma incidence.

Although skin color is an obvious visual indicator, two people with the same shade of skin can have very different responses to sunlight because there are non-tan-related genes which affect rapid DNA/tissue repair on your skin:

Clinical and Biological Characterization of Skin Pigmentation Diversity and Its Consequences on UV Impact https://pmc.ncbi.nlm.nih.gov/articles/PMC6163216/

So what I said is especially applicable to people who are not the palest on earth. If you are mixed like me (French and Iranian combo) then you can push it more than a say “pure” Irish person.

Thankfully the paler you are the less time in the sun you need to make vitamin D. But I will bet that some sun exposure is still better than none.


> No byline/author.

This is The Economist; they don't use bylines, and their articles are all anonymous.


+1

The byline is “The Economist”, and the lack of links is the house style, like a printed newspaper.

A relic from the times when the name and reputation of the institution alone was enough to earn your trust.

Personally I still find them a high-quality source, especially because they are a weekly publication based in the UK and distanced (but not entirely removed) from the bullshit of the US media cycle.


It's a foolish tradition of theirs not to provide hyperlinked citations in online articles. It would cost them little.


The Economist a few years back did an article on Steon (free energy engine) but it was essentially a PR piece soliciting investors… so take them with a grain of salt


Journalists fucked up massively when they allowed sponsored content to masquerade as editorial content. Now people don't trust media as much as they used to and are moving to other sources to get their information. What journalists around the world need to do is come together and build consensus in the industry on separating sponsored content from their own. A tiny, fine print at the bottom of a full page sponsor is grossly insufficient. It has to be more explicit. Perhaps reserve colors and styles exclusively for indigenous content or frame all sponsored content in a clearly identifiable manner. One way or another, they need to figure out how to reclaim their reputation.


I canceled my subscription to the local daily over this. Not only were they presenting advertisement as if they were editorial content, they weren’t even reading it themselves. If they were, they would have noticed that they’d printed, on actual paper, an unreadable article full of broken html fragments. That was the last straw for me. Stunning disrespect for the people who pay for the paper.


Or even better, allow people to pay to remove ads.


How few average people care about any of this any more? Especially the incoming generation. There's not care about quality.


    > bullshit of the US media cycle
The UK has their own media cycle. With the exception of Financial Times, the quality of newspapers has fallen dramatically in the last 30 years. Even the FT prints low quality "political swamp reporting" articles. I am always surprised how poor is their reporting on national UK politics. As a result, I avoid those articles. Even the BBC News is much worse than 10 years ago.


This is the Lindqvist and Weller paper: https://link.springer.com/article/10.1007/s43630-025-00743-6


So it’s a narrative review, the op ed of journals. Basically worthless.


Very simple, studies all confirm that people who spend more time outdoors have better eyesight at youth (avoids myopia) and health (exercise), use sunscreen (avoid skin cancer). No need to speculate more.


No, it’s not very simple.

I’ve spent on average 15 hours outside as a kid, still -6. So take all those “studies” with a grain of salt, they might be not applicable to you.


It is very simple. You can't expect to be the average member of every cohort you are part of.


True. And same applies to everything in life, so just because some article says "sun is good for you all" doesn't mean you won't end up dying from skin cancer.


But is that cause or correlation?

Kids with bad sight or health might be more drawn to indoor pursuits.



>Tanning is a response to skin cell damage

That might be true, but it is also true that the positive health effects of aerobic exercise (e.g., increased fitness, increased insulin sensitivity) are responses to the oxidative damage caused by the exercise.


the economist doesn't have bylines, never has. you go by the reputation of the publication, which is top notch for science reporting!


> The only difference was leadership.

That's quite the leap though, and is just confusing correlation and causation. Maybe the previous leadership was simply getting in the way of the engineers and managers that had the good ideas. And the new leadership was more hands-off, or focused in other areas like marketing. Or those cases are just flukes. For every case like the ones you cite, I could find two where the exact opposite happened.

If you're downing a shot of vodka every morning, and suddenly stop, then yeah, your health is going to improve.

In my opinion, many (if not most) of these CEOs are business-focused people with no technical (or even non-technical) knowledge of anything they purport to manage. And on the whole, they really don't affect the value of the company one way or the other.


Jobs created 3 fortunes. One you could attribute to luck. Two is getting hard to say any schmuck could have done that. 3 means Jobs was a unicorn.


I'm not saying any schmuck could have done that. I'm saying that the engineers and managers at Apple (to use your example) are just as (if not more) responsible for the success than Jobs. Those lower-level engineers and managers also explain the repeated successes. And that, I would say, is the case in most market successes. The CEO is not remotely deserving of all the credit, or even most of the credit, in most situations. They don't really deserve to be paid what they're paid.

There's this certain anti-historical proclivity to create heroes for worship. Because it's a simple story to tell and it gives you the opportunity to put yourself in the hero's shoes. But the simple story is almost always wrong.


> You don’t have to randomize the first part of your object keys to ensure they get spread around and avoid hotspots.

From my understanding, I don't think this is completely accurate. But, to be fair, AWS doesn't really document this very well.

From my (informal) conversations with AWS engineers a few months ago, it works approximately like this (modulo some details I'm sure the engineers didn't really want to share):

S3 requests scale based on something called a 'partition'. Partitions form automatically based on the smallest common prefixes among objects in your bucket, and how many requests objects with that prefix receive. And the bucket starts out with a single partition.

So as an example, if you have a bucket with objects "2025-08-20/foo.txt" and "2025-08-19/foo.txt", the smallest common prefix is "2" (or maybe it considers the root as the generator partition, I don't actually know). (As a reminder, a / in an object key has no special significance in S3 -- it's just another character. There are no "sub-directories"). Therefore a partition forms based on that prefix. You start with a single partition.

Now if the object "2025-08-20/foo.txt" suddenly receives a ton of requests, what you'll see happen is S3 throttle those requests for approximately 30-60 minutes. That's the amount of time it takes for a new partition to form. In this case, the smallest common prefix for "2025-08-20/foo.txt" is "2025-08-2". So a 2nd partition forms for that prefix. (Again, the details here may not be fully accurate, but this is the example conveyed to me). Once the partition forms, you're good to go.

But the key issue here with the above situation is you have to wait for that warm up time. So if you have some workload generating or reading a ton of small objects, that workload may get throttled for a non-trivial amount of time until partitions can form. If the workload is sensitive to multi-minute latency, then that's basically an outage condition.

The way around this is that you can submit an AWS support ticket and have them pre-generate partitions for you before your workload actually goes live. Or you could simulate load to generate the partitions. But obviously, neither of these is ideal. Ideally, you should just really not try and store billions of tiny objects and expect unlimited scalability and no latency. For example, you could use some kind of caching layer in front of S3.


Yep, this is still a thing. In the past year I’ve been throttled due to hot partitions. They’ve improved the partitioning so you hit it less, but if you scale too fast you will get limited.

Hit it when building an iceberg Lakehouse using pre existing data. Using object prefixes fixed the issue.


This is my understanding too, and this is particularly problematic for workloads that are read/write heavy on very recent data. When partitioning by a date or by an auto-incrementing id, you still run into the same issue.

Ex: your prefix is /id=12345. S3, under the hood, generates partitions named `/id=` and `/id=1`. Now, your id rolls over to `/id=20000`. All read/write activity on `/id=2xxxx` falls back to the original partition. Now, on rollover, you end up with read contention.

For any high-throughput workloads with unevenly distributed reads, you are best off using some element of randomness, or some evenly distributed partition key, at the root of your path.


Presumably the superior solution is the product that bears the same name as this blog post. Which I take it is in the process of being released since I can't find many technical details about it.


That builders can't construct housing in whatever form-factor they want and whatever part of a municipality they want might be a problem. But the analysis of why these kinds of restrictions exist, to my mind, is not correct.

Do niche interest groups have influence on housing policy? Sure. But these niche interest groups don't usually have a monetary interest in the outcomes they're promoting. But individual homeowners (who often band into interest groups of their own) and large real estate conglomerates do have such a monetary interest. They consider certain types of housing built in a certain way to have *more value* and be worth more. So they promote politicians who introduce zoning and other rules to protect that value.

For someone looking to make a profit off of housing (or even to invest in housing), what is more appealing? A traditional U.S. suburb? Or a Kowloon walled city? One is denser, cheaper per capita, and (if you're not careful) unappealing to look at. In other words, it's worth less. So there is a great monetary pressure from people who already own homes to prevent "mixing" this type of housing into existing planned communities. People who need homes, on the other hand, are a little bit less discerning (to say the least). They don't have a monetary interest necessarily. They're primarily looking for a permanent residence.

So I just don't buy this "abundance" stuff in general. If you remove all of these restrictions, will some companies start building housing? Some will. But my guess is most will say the juice is not worth the squeeze -- the profit margins and the long-term values of these properties will make it unappealing. Just like it's unappealing for grocery stores to set up in big urban areas. Or for hospital providers to set up in rural areas. Food deserts don't exist because of too much government intervention. A lack of rural hospitals is not a problem because of too much government intervention. It's because those things are not profitable.

So in my opinion, if you want to reform zoning rules or things of that nature, it's only really going to be effective if you *force* (or if you want to be politically correct, "incentivize") housing companies to build in these areas too.

I don't really consider this an "anti-trust" argument. It can be equally true if there's a lot of competition in the housing market and if there's next to no competition. It's more of an incentives argument. This is an argument that, like with medical care, we're treating something that is a fundamental need of every living human to have a stable and peaceful and fruitful life as if it were a standard market commodity. And when you do that, you get poor outcomes. We need to support the building of housing *even if* it's unaffordable or has low (or even non-existent) profit margins


I'll just note that this seems entirely predictable. So much so that I can't help but see it as purposeful. The federal court system itself only has about 25,000 employees. SCOTUS has 9 judges plus a couple dozen clerks and other assistants. Lower courts already do not have enough employees to contend with an executive branch made up of millions of individuals, especially when that executive is ordering its employees (seemingly) to just ignore or purposefully misinterpret laws, leading to an ever-increasing number of lawsuits. To further reduce the power of lower courts at this time (which this SCOTUS seems to do in almost every decision involving the executive) means even more cases for SCOTUS and even less time for arguments.

Conveniently, we have the shadow docket. A way to issue diktats without any arguments before the court and in many cases without any reasoning whatsoever.

And conveniently, lower courts can then interpret a lack of details from a shadow docket decision however they want. So that the executive can appeal yet again, to get another thumbs down from SCOTUS (without any explanation), and round and round we go. The executive gets to keep the plates spinning while it essentially does whatever it wants.

With this situation, why shouldn't we simply pack the courts? If SCOTUS is going to take more cases than it can handle and not provide any real guidance to lower courts, then clearly they need more employees.


The rise of the “shadow docket” is driven by changing behavior of litigants and the district courts. The main reason cases get on the shadow docket is litigants seeking, and district courts granting, TROs and preliminary injunctions against major executive or legislative actions without trials or often even full briefing. It can’t possibly be true that a district court can block a major action within days but the Supreme Court can’t correct it until years later through the regular appeal and certiorari process.


> Live by the sword, die by the sword.

I'm not seeing how that applies. There's a clear asymmetry between lower courts issuing temporary restraining orders and preliminary injunctions on the basis of well-established precedent, vs. the Supreme Court overturning those with little or no explanation or justification.

When the executive or legislative action is "major", that would seem to make it more reasonable that the lower courts put the changes on hold pending a trial. Drastic changes should be implemented only with strong justification, and when a drastic change seems to be very clearly in violation of existing law, it is in dire need of checks and balances with teeth.

It certainly isn't the Supreme Court's job to help the executive pull off major changes more quickly.


The complaint isn’t about the “asymmetry,” it’s about the symmetry. A hastily issued district court order should be (and is) subject to being overturned by the higher courts just as quickly as it was issued.

The precedent may be binding, but injunctions—unlike final judgments—are discretionary relief. The district court doesn’t have to grant discretionary injunctive relief based on precedents that are in doubt, and if they do, it’s perfectly fine for the Supreme Court to overrule that.

> Drastic changes should be implemented only with strong justification

That’s exactly backwards. The elected branches don’t have a “mother may I” relationship with the courts. That’s not the design, and that wasn’t the practice for most of the history of the republic. Injunctions are by definition “extraordinary relief” reserved for the most unusual cases.

Go read Marbury v. Madison again. The Supreme Court bent over backwards to avoid having to enjoin the Secretary of State to perform what it concluded was a “ministerial,” non-discretionary action (delivering a letter that had already been signed by the outgoing President). Most injunctions against executive action in the recent decades would have been considered unfathomable overreach by the founding generation.


> The elected branches don’t have a “mother may I” relationship with the courts.

That "mother may I" phrase implies asking for pre-approval for routine stuff, which obviously isn't what's at issue here.

> Injunctions are by definition “extraordinary relief” reserved for the most unusual cases.

The unusual and extraordinary may have become quite common of late, but that doesn't mean it starts being wrong for a lower court to intervene when the president tries to fire an FTC Commissioner in clear violation of precedent about firing FTC Commissioners. A president ignoring the law is definitely sufficiently "extraordinary" to justify temporary injunctions, and the fact that he's doing it a lot only reinforces the need for the checks and balances.

> A hastily issued district court order should be (and is) subject to being overturned by the higher courts just as quickly as it was issued.

Don't be ridiculous. The entire concept of temporary injunctions is built on the fact that many situations need to be slowed down and the potential harm prevented until serious legal questions can be properly considered. The lower courts aren't being "hasty" in the sense that they're issuing these orders on a whim with too little justification, they're being hasty in the sense of acting with commensurate speed to the executive actions of questionable legality that the courts need to keep in check. But the Supreme Court shadow docket decisions do come across as insufficiently thought out.

> The district court doesn’t have to grant discretionary injunctive relief based on precedents that are in doubt,

A lot of these precedents really aren't in doubt, except to the extent that it's clear the current Supreme Court doesn't like them. But until such time as the Supreme Court furnishes the proper decision overturning existing case law (not just hinting at a willingness to do so in the future), it's reasonable for lower courts to continue applying that case law when it is extremely obviously applicable.


> That "mother may I" phrase implies asking for pre-approval for routine stuff, which obviously isn't what's at issue here.

There is no relevant “routine” versus “non-routine” distinction in either the constitution or the law. Obviously, the folks who had just overthrown their government and created a new one contemplated elected branches that could make dramatic changes!

> A president ignoring the law is definitely sufficiently "extraordinary" to justify temporary injunctions, and the fact that he's doing it a lot only reinforces the need for the checks and balances.

It’s not, actually. The primary check on the elected branches is elections, not lawsuits. The courts exist primarily to vindicate personal rights, not to manage national policy. The framers never even envisioned that courts could enjoin the President for discretionary acts. Even Marbury rejects that notion.

Here, the personal right—someone’s employment as an FTC Commissioner—is the tail that’s wagging the dog. It’s not “extraordinary” because losing your job is such a grievous injury. It’s just a proxy for the government policies the FTC Commissioner has the power to execute. So the courts are being invoked in a battle over policy, which is exactly where the power of the courts is the weakest (by design).


> why shouldn't we simply pack the courts?

We need deeper reform.

I’m personally a fan of choosing by lot, from the appellate bench, a random slate of justices for each case. (That court of rotating judges would be the one in which “the judicial Power of the United States, shall be vested” [1].) You could do this entirely through legislation—nothing in the Constitution requires lifetime appointments to a permanent bench.

[1] https://constitution.congress.gov/constitution/article-3/


There are arguments before the court on the shadow docket—in written briefs.


We only have one Supreme Court. "Packing the court" (more justices) will not equal more cases heard.


> "Packing the court" (more justices) will not equal more cases heard

By choice. It's only laws--not the Constitution--that requires the entire bench hear and decide on every case.


True, but that's not what's usually meant by "packing the court".


The democrats are just not interested in being as opposed to this as they morally should because a large portion are bought biy the same capitalist forces that buy republicans.

Whats more likely are states to shift policies to ignoring the federal courts and localize.

The essential problem is the federal government is attacking the most fortified jurisdictions while choking their own support structures.

That doesnt mean theyll fail, the same way shitty policies dont prevent Taliban rule.


Capitalism is not why this is broken...


Money in politics seems to be a huge part of it.


Politics seems to attract the rich even under systems where money isn't supposed to exist :)


Capitalism is the diffusion of responsibility. It's the trolley problem.

Trump may be pulling the lever to switch the tracks, capitalism is standing there doing nothing.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: