Armé el PRIMER tutorial en español sobre @official_fe 🛠️
Si vienes de Solidity, te interesa: vemos setup, tu primer "Hola Mundo" y sus conceptos clave.
Míralo acá 👇
https://t.co/oxV3hIriZ6
#FeLang#EVM#Web3
Solady's LibMap/LibBitMap is beautifully hand-tuned assembly. It also shouldn't have to exist.
Every line works around one missing Solidity feature: const generics. In Fe the same thing is ~60 lines, no assembly, same gas. 🧵
Enter Fe: Both problems collapse into a single compile-time solution.
Since bit-width is a const generic parameter, there is zero code duplication. One `StoragePackedArray<BITS>` covers every width we want to support.
Because BITS is known at compile time, the slot derivation, lane width, and bitmasks fold into immediate constants. The high-level Fe code compiles down to the same gas as the assembly Solady writes by hand.
No assembly needed.
Solady's LibMap is hundreds of lines of hand-tuned assembly. The same thing in Fe: ~60 lines, no assembly, same gas.
@cburgdorf breaks it down for us 👇
Solady's LibMap/LibBitMap is beautifully hand-tuned assembly. It also shouldn't have to exist.
Every line works around one missing Solidity feature: const generics. In Fe the same thing is ~60 lines, no assembly, same gas. 🧵
Anon. What's your excuse for not hacking the ETH that's been sitting on Fe written contracts on the Ethereum Mainnet already? Are your agents to weak or is Fe too strong?
@official_fe looks very similar to how comptime in zig works. it's a good idea that allows you to show how the sausage is made and makes the code more auditable, while the bytecode stays is the same optimized shape as if you had hardcoded the magic values.
Same idea runs deeper than user code. Fe's compiler doesn't actually know what "Solidity ABI" is.
The mapping that says u256 encodes as the string "uint256" is stdlib. Event topic0 hashes, 4-byte selectors, ABI sizes are all derived from these stdlib const fns.
No compiler magic. The std library is the source of truth.
Every smart contract dev knows them: the 32-byte magic numbers at the top of files. Storage slots. Type hashes. Selectors. Fancy math. Returned as constants from build scripts, or copy-pasted from somewhere.
Taking @Uniswap 's tick math as an example.
Fe has a different answer 🧵
The strict rules make this safe:
A `const fn` can have mutable state, loops with break/continue, match, operator overloads but no effects, no with and only const-to-const calls. Pure by construction.
You can't accidentally make your constant non-constant.
If you want to participate make sure to join our channel before:
💻 https://t.co/JQkI6fDDIS
if you just want to follow along tune in here:
📺 https://t.co/tjfrmN6JgG
Check out Bountiful here:
🔗 https://t.co/kwdFJ99ssn