标签:#ha
找到 14601 篇相关文章
Package Managers need global hooks
Gas Optimization That Doesn't Break Security: Storage, Calldata, and the Traps
Gas optimization is satisfying. You shave a few thousand gas off a function and feel clever. But some optimizations trade away safety in ways that are not obvious, and I have seen "optimized" contracts that introduced vulnerabilities. Here are the gas wins that are genuinely free, the ones that cost you safety, and how to tell the difference. Where gas actually goes Before optimizing, know what is expensive. Storage operations dominate. Writing a fresh storage slot ( SSTORE from zero to non-zero) costs a lot; reading storage ( SLOAD ) is cheaper but still meaningful; computation in memory is cheap by comparison. So the highest-leverage optimizations are about touching storage less. Free win 1: cache storage reads in memory If you read the same storage variable multiple times in a function, each read is an SLOAD . Read it once into a local variable instead: // WASTEFUL: reads storage `total` three times function distribute() external { require(total > 0, "empty"); uint256 share = total / count; emit Distributed(total); } // OPTIMIZED: one SLOAD, two memory reads function distribute() external { uint256 _total = total; // single storage read require(_total > 0, "empty"); uint256 share = _total / count; emit Distributed(_total); } This is free in the sense that it changes nothing about correctness. The value is identical; you just read it once. Pure win. Free win 2: calldata instead of memory for read-only arrays For external function arguments you only read (never modify), calldata is cheaper than memory because it skips the copy: // memory copies the whole array into memory function process(uint256[] memory ids) external { ... } // calldata reads directly from the transaction data, no copy function process(uint256[] calldata ids) external { ... } Again, free. If you do not mutate the array, calldata is strictly better. Free win 3: storage packing Solidity packs multiple variables into one 32-byte slot if they fit and are adjacent. Order your storage variables so smal
TerraPower in Deal with Meta for Eight Natrium 345 MW Advanced Nuclear Plants
A website that lists websites to submit your website to
Uber and Lyft Use Artificial Intelligence to Price Rides
Hunter-gatherers in Siberia died of a plague outbreak 5,500 years ago
We can't blame the Neolithic Transition for the plague anymore.
Silicon Valley’s Elite Financial Advisers Say This Era of Wealth Is Different
The rich are getting richer. Here’s what wealth advisers are telling their tech clients right now.
Building a robotics research setup that lives next to my desk
Quick framing, since the post is long: I did robotic manipulation research at OpenAI from 2017–2020, and the tabletop setup back then cost roughly 10x this one and took a team to run. This project is me testing whether a single person can now do meaningful work on the same class of problems: starting with physical and software setup. A few decisions I'm least settled on, and would love some pushback/feedback on: - single arm vs. bimanual (I went single for cost/space, knowing it rules out things
Launch HN: TesterArmy (YC P26) – Agents that test web and mobile apps
Hey HN - we’re Oskar, Szymon, and Piotr, and we’re building TesterArmy ( https://tester.army ). TesterArmy is an agentic testing platform that runs end-to-end checks before deployment and in production. Instead of wasting hours on manual testing or maintaining static scripts, we let you specify your tests in natural language and handle everything in between. We've built the platform fully around agents. Our agent will reliably execute the tests, but your coding agent can manage everything in our
What was nice about the UI of Windows 2000
ACLU: Do Automatic License Plate Readers violate privacy under the 4th Amendment
Migrate from OpenClaw
TypeScript 7.0 RC
Godot 4.7 Release
Ubiquiti: Enterprise NAS, Built on ZFS
Usbliter8: an A12/A13 SecureROM Exploit
https://www.macrumors.com/2026/06/18/a12-and-a13-chips-facin...