Hey Twitter Fam!
I built a minimal, toy programming language, Mod (or ModLang) using C++ and STL. It is dynamically typed and interpreted and its syntax is a blend of that of C++, Python and JavaScript.
Code: https://t.co/DFMKfuWAZV
Blog: https://t.co/ME9N9QzkBd
#cpp#programming
SYSTEM DESIGN PLAYBOOK
Giveaway Alert!!!
โข System design fundamentals.
โข Condensed notes to read before system design interview.
โข Must know concepts from real-world software engineering case studies.
To get it for free:
1 Retweet & Follow @systemdesignone
2 Reply "Playbook"
Then I'll DM you the details.
Now that code is being shipped faster than ever with Claude Opus, we would need Claude Thanos in a few years to remove 50% of code to clean up all the mess.
#AI#Claude#Code
This is either brilliant or scary:
Anthropic accidentally leaked the TS source code of Claude Code (which is closed source). Repos sharing the source are taken down with DMCA.
BUT this repo rewrote the code using Python, and so it violates no copyright & cannot be taken down!
๐ ๐๐ฎ๐๐ฎ ๐๐ผ๐ป๐๐ถ๐๐๐ฒ๐ป๐ฐ๐. ๐ฆ๐ถ๐บ๐ฝ๐น๐ถ๐ณ๐ถ๐ฒ๐ฑ. ๐ ๏ธ
Distributed systems can suffer from "๐๐ถ๐น๐ฒ๐ป๐" ๐ฑ๐ฎ๐๐ฎ ๐น๐ผ๐๐ when the database and the message broker aren't perfectly in sync.
If your business logic updates the DB but the event fails to fire (or vice versa), your system is left in an inconsistent state.
I just wrapped up a project tackling this head-on by implementing a high-performance ๐ง๐ฟ๐ฎ๐ป๐๐ฎ๐ฐ๐๐ถ๐ผ๐ป๐ฎ๐น ๐ข๐๐๐ฏ๐ผ๐ ๐๐๐ฒ๐ป๐ ๐ฅ๐ฒ๐น๐ฎ๐ using a dual-dispatch mechanism (๐ฃ๐ผ๐น๐น๐ถ๐ป๐ด and ๐๐๐), it seamlessly supports both ๐๐ฝ๐ฎ๐ฐ๐ต๐ฒ ๐๐ฎ๐ณ๐ธ๐ฎ and ๐ฅ๐ฒ๐ฑ๐ถ๐ ๐ฆ๐๐ฟ๐ฒ๐ฎ๐บ๐! ๐
By using the ๐ข๐๐๐ฏ๐ผ๐ ๐ฃ๐ฎ๐๐๐ฒ๐ฟ๐ป, we ensure that events are captured ๐ฎ๐๐ผ๐บ๐ถ๐ฐ๐ฎ๐น๐น๐ within the same business transaction. Here is how I implemented two different ways to move that data from the outbox to the stream:
1๏ธโฃ ๐ง๐ต๐ฒ ๐ฅ๐ฒ๐น๐ฎ๐ ๐ฆ๐ฒ๐ฟ๐๐ถ๐ฐ๐ฒ (๐๐ผ ๐ฃ๐ผ๐น๐น๐ถ๐ป๐ด):
A custom microservice that polls the outbox table. Simple, highly configurable, and great for legacy support where broker-specific CDC isn't an option.
2๏ธโฃ ๐ง๐ต๐ฒ ๐๐๐ ๐๐ป๐ด๐ถ๐ป๐ฒ (๐๐ฒ๐ฏ๐ฒ๐๐ถ๐๐บ):
By pairing with ๐๐ฒ๐ฏ๐ฒ๐๐ถ๐๐บ, we eliminate polling-to-publish lag and ensure ๐๐ฒ๐ฟ๐ผ-๐ฑ๐ฎ๐๐ฎ-๐น๐ผ๐๐ event streaming by reading directly from the database's ๐ช๐ฟ๐ถ๐๐ฒ-๐๐ต๐ฒ๐ฎ๐ฑ ๐๐ผ๐ด (๐ช๐๐).
โ๏ธ ๐ง๐๐ ๐ง๐ฅ๐๐๐-๐ข๐๐:
โข ๐ฅ๐ฒ๐น๐ฎ๐ ๐ฃ๐ผ๐น๐น๐ถ๐ป๐ด: Lower infrastructure overhead, but introduces polling latency.
โข ๐๐ฒ๐ฏ๐ฒ๐๐ถ๐๐บ ๐๐๐: Near-instantaneous streaming and complex transformations, but requires more infrastructure management.
๐ฅ ๐ง๐๐๐๐ก๐๐๐๐ ๐๐๐๐๐๐๐๐๐ง๐ฆ:
โ ๐๐๐ฎ๐น-๐๐ฟ๐ผ๐ธ๐ฒ๐ฟ ๐ฆ๐๐ฝ๐ฝ๐ผ๐ฟ๐: Switch between ๐๐ฎ๐ณ๐ธ๐ฎ (Enterprise scale) and ๐ฅ๐ฒ๐ฑ๐ถ๐ ๐ฆ๐๐ฟ๐ฒ๐ฎ๐บ๐ (Low latency) with a single config flag.
โ ๐๐๐ฏ๐ฟ๐ถ๐ฑ ๐๐ถ๐๐ฝ๐ฎ๐๐ฐ๐ต๐ถ๐ป๐ด: Choose between a custom ๐๐ผ ๐ฅ๐ฒ๐น๐ฎ๐ (๐ฃ๐ผ๐น๐น๐ถ๐ป๐ด) or ๐๐ฒ๐ฏ๐ฒ๐๐ถ๐๐บ (๐๐๐) depending on your consistency needs.
โ "๐๐ ๐ฎ๐ฐ๐๐น๐-๐ข๐ป๐ฐ๐ฒ" ๐๐๐ฎ๐ฟ๐ฎ๐ป๐๐ฒ๐ฒ๐: I implemented the ๐๐ป๐ฏ๐ผ๐ ๐ฃ๐ฎ๐๐๐ฒ๐ฟ๐ป on the consumer side for absolute deduplication.
โ ๐ฃ๐๐ฟ๐ฒ ๐๐๐ ๐๐น๐ผ๐: Zero-lag streaming directly from ๐ฃ๐ผ๐๐๐ด๐ฟ๐ฒ๐ฆ๐ค๐ ๐ช๐๐ (Write-Ahead Log) to Kafka or Redis.
โ ๐ฃ๐น๐๐ด๐ด๐ฎ๐ฏ๐น๐ฒ ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ: Infrastructure-agnostic designโeasy to run locally or scale out is a snap.
Link to Code: https://t.co/QxBeO98l4c
#DistributedSystems #SystemDesign #Microservices #Golang #Kafka #Redis
Gemini 3.1 Pro is here: A smarter model for your most complex tasks.
Building on the Gemini 3 series, 3.1 Pro is a step forward in reasoning. It's designed for tasks where a simple answer isnโt enough, taking advanced reasoning and making it useful for your hardest challenges.๐งต
Huge thanks to @calcsam and the team at @mastra for shipping me a paper copy of 2 incredible books on Al Agents.
I started on the first one, "Principles of Building Al Agents', and can already feel the rare blend of fundamental principles and practical real-world application in it.
#AI #AIAgents #Engineering