Code_of_Kai

33.5K posts

Code_of_Kai banner
Code_of_Kai

Code_of_Kai

@Code_of_Kai

Follow me if you hate your feed. I post for the remnant.

Katılım Aralık 2021
7.5K Takip Edilen6.2K Takipçiler
Sabitlenmiş Tweet
Code_of_Kai
Code_of_Kai@Code_of_Kai·
This song is about the viral 'Faustian penguin' video meme that has taken Tiktok and X and every other social media (I'll post a copy below in this mini thread for those that haven't seen it). My song is called "PENGUIN, COME". It's from the POV of the mountain who beckons this Faustian penguin to come and climb into the heavens. I, like millions of others, was moved by this cute little guy.
English
13
29
162
58.7K
Byron Alley
Byron Alley@byronalley·
@Code_of_Kai Some good ideas there. I wonder how it could be structured as part of a larger Claude config
English
1
0
0
18
Code_of_Kai
Code_of_Kai@Code_of_Kai·
Ask Claude Code to add this to its memory if you are an Elixir Developer. Feel free to customise it, of course. **What Would @josevalim Do?** --- When designing any module, abstraction, or system in Elixir, ask: how would José Valim design this? **1. Behaviours over concrete implementations.** If you're writing a GenServer, ask whether you should be writing a behaviour that others implement. If two modules both follow the same interaction pattern — that's a behaviour, not two separate GenServers. **2. Protocols define the shape of interaction, not the content.** GenStage doesn't know what it's processing. Broadway doesn't know what it's batching. Plug doesn't know what HTTP framework it's serving. Ecto.Repo doesn't know what database it's talking to. Your abstractions shouldn't know either. **3. Compose, don't couple.** If two things share a pattern, extract the pattern first, then derive both as implementations. Don't build Thing A and Thing B separately and notice they rhyme later. Notice the rhyme first. **4. Pure core, effectful shell.** Each module does one thing. Pure functions at the center, side effects pushed to the edges. The core logic is testable without starting processes. This is how Enum, Stream, Ecto.Query, and Plug.Conn all work — pure data transformations with effects at the boundary. **5. The library is the unit of solution.** Before writing a new module, ask: does an existing library already solve this class of problem? Before writing a GenServer, check the list: - State machine? → **gen_statem / GenStateMachine** - Data pipeline? → **GenStage** or **Broadway** - Batch processing? → **Broadway** - Distributed processes? → **Horde** - Pub/sub? → **Phoenix.PubSub** - Background jobs? → **Oban** - One-off async work? → **Task** - Simple shared state? → **Agent** - ML inference? → **Nx.Serving** - Event sourcing? → **Commanded** - Graph traversal? → **libgraph** - Caching? → **Cachex** or **Nebulex** - HTTP client? → **Req** or **Finch** - Connection pooling? → **NimblePool** or **DBConnection** - Counters/flags? → **:counters**, **:atomics**, **:persistent_term** If yes, use it. If almost, wrap it. Only build from scratch when nothing fits. **6. Respect the ecosystem's grain.** Broadway replaced most Flow use cases. Nx replaced most data-parallel loops. The ecosystem evolves — don't reach for yesterday's tool when today's is better. When in doubt: Broadway for pipelines, Nx for computation, gen_statem for state machines, Phoenix.PubSub for messaging.
English
2
0
9
2K
Code_of_Kai
Code_of_Kai@Code_of_Kai·
No, problem. I’ll ask Claude Code to take into account the Strait of Hormuz on its next planning run.
Code_of_Kai tweet media
English
0
0
0
18
José Valim
José Valim@josevalim·
@Code_of_Kai If I had to summarize: 1. Find the correct boundaries (includes Pure core, effectful shell) 2. Do not abstract prematurely 3. Data > Modules > Processes
English
2
3
10
812
Code_of_Kai retweetledi
José Valim
José Valim@josevalim·
I'd say I'd give the opposite advice for 1, 2 and 3. :D I often say you only need a behaviour the third or fourth time you repeat yourself. I understand why you would have the opposite impression though: you are consuming all of the public behaviours/protocols that was defined, but behind them, there are many more which we explicitly chose not to expose! PS: The advice also changes depending if you are building a library or an application.
English
2
2
31
1.9K
Code_of_Kai retweetledi
Dev Shah
Dev Shah@0xDevShah·
The most important technological artifact from this decade would be a harness, and the most important cultural artifact from this decade would be a prompt. The most significant creative act of this decade will be someone specifying with extraordinary precision and taste exactly what they want an AI in a Harness to make. And the resulting artifact will be something no human could have made alone, and no AI would have made unprompted. The collaboration will be the ultimate art form, and the prompt will be the ultimate brush stroke. And the person will be someone who knows what to ask.
English
2
4
18
819
Code_of_Kai
Code_of_Kai@Code_of_Kai·
Dream well, art lovers
Code_of_Kai tweet media
English
0
0
1
75
Code_of_Kai
Code_of_Kai@Code_of_Kai·
@UGlobin36458 @EricMertz_KC @Archer83Able You are getting closer to making your point. People aren't mind readers. You might be experience and knowledge — fine, use to it make an explanatory argument. Or continue with smug snarkiness if that satisfies.
English
0
0
0
13
Unter Gleeton Gouten-Globin
@EricMertz_KC @Archer83Able Sigh. Think about the mission profile. Think about distance. Where are they being flown from? Think about the additional wear on an already elderly airframe. The whole idea behind aircraft carriers is force projection. Hitting maritime targets is the Navy’s job.
English
6
0
0
294
Status-6 (War & Military News)
Chairman of the JCS Gen. Dan Caine: "The A-10 Warthog is now in the fight across the southern flank and is hunting and killing fast attack watercraft in the Straits of Hormuz."
English
374
727
6.2K
1.6M
Code_of_Kai
Code_of_Kai@Code_of_Kai·
The Cartesian (Chomsky) The Content: Language is the presence of a biological Structure. The Invention: It isn’t "invented" at all; it is an evolutionary leap—a specific genetic mutation that provides the algorithm for complex thought. The Individual: A passive host for a biological system that "unfolds" like an organ. ________ The Empiricist (Everett) The Content: Language is the presence of a Social Tool. The Invention: It is a positive achievement of a community. Humans invent symbols and grammar to solve specific social and communicative needs. The Individual: An apprentice who acquires the sophisticated tools crafted by their ancestors. ________ The Realist (Deutsch) The Content: Language is the presence of Knowledge. The Invention: It is a continuous, creative act. The "program" isn't a tool sitting on a shelf or a gene in the cell; it is the active, software-based process of generating and testing new ideas. The Individual: The primary agent. They don't just "have" an organ or "use" a tool; they create the language-knowledge themselves to explain their world. This is a simplification as Deutsch sometimes adopts Everettian positions, but I think this is still useful way to criticise his ideas. Because in almost everything else David is a champion of the individual mind, not the community, as the ultimate source of knowledge, and if languages are inventions, this becomes a ‘battle ground’ (or playground) for Deutschians - whether they know it or not.
English
0
0
0
30
Code_of_Kai
Code_of_Kai@Code_of_Kai·
Building compute in space decentralises command and control infrastructure away from terrestrial threats. #geopolitics
English
0
0
0
35
Code_of_Kai retweetledi
George Guimarães
George Guimarães@georgeguimaraes·
Nx is heading toward 1.0 and needs $4000 to fund the next 6 months of development. That's less than a single SaaS tool per month. If your company use Elixir for ML or numerical computing, Nx is under the hood. Anyone can donate. every.org/erlang-ecosyst…
English
0
13
31
1.4K
José Valim
José Valim@josevalim·
We just shipped Distributed Python on top of the Erlang distribution, with full Elixir and Livebook integration: dashbit.co/blog/distribut… And much more: intellisense, zero-copy Apache Arrow, and more. Read the article for all the details. A huge thank you to NLnet Foundation for sponsoring our work. They are always looking for new ideas and you have until April 1st to join the next batch: nlnet.nl
José Valim tweet mediaJosé Valim tweet mediaJosé Valim tweet mediaJosé Valim tweet media
English
15
66
343
19.8K
Code_of_Kai
Code_of_Kai@Code_of_Kai·
iterative reevaluation 🤌
Byron Alley@byronalley

@Code_of_Kai This seems far more sensible. Honestly the idea that “great men” of history had no introspection seems like BS. There’s a difference between anxious self-doubting navel gazing and the value of iterative reevaluation. OODA is good: thought consistently leads to action.

English
1
0
1
43