Argomenti di tendenza
#
Bonk Eco continues to show strength amid $USELESS rally
#
Pump.fun to raise $1B token sale, traders speculating on airdrop
#
Boop.Fun leading the way with a new launchpad on Solana.
formatter shafu!
installa ed esegui il comando shafu sul tuo file solidity.
perché il codice bello è importante!

@Sabnock66 @lucasmanuel_eth ottima domanda! L'ho spiegato qui

11 lug 2025
Many people have asked me where my formatting style is from. It all started before I've ever written a single line of Solidity code.
I was a Machine Learning Engineer before and I did most things in numpy, pytorch and tensorflow. Don't use tensorflow, but that's for a different time.
Most of that code are chains of mathematical operations. This is where I picked up the symmetry thing.
Lining up equations just makes it so much easier to read. The symmetry is also just beautiful.
@jeremyphoward blog post was also very influential. READ IT!
Most of my work was in Jupyter Notebooks. I love JNs. Having illustrations and explanations live directly where my code lives totally makes sense to me. We probably should write Smart Contracts like that.
Imagine the Uniswap contract with all its visualizations just on top of the code. Great for people reading it and amazing for auditors.
Formatting by hand is also just a great way to re-read code. You can not automate that! Although maybe you could train an LLM on all my contracts and see what happens!
If you want to build a shafu formatter lmk! I would fund it.
forge fmt --shafu

8,97K
Principali
Ranking
Preferiti