spent some time today refining the architecture of my matching engine. refactored the order book so each side owns its own behavior instead of one class doing everything.
implemented:
- order book with separate bid and ask sides
- price based comparators for each side
- methods to fetch the best bid and best ask
next, i'll implement matching engine to process an incoming order, find the best resting order on the opposite side, and execute its first trade.
started building matching engine for central exchange from scratch.
implemented so far.
- value objects for OrderId, OrderPrice and OrderQuantity.
- partail fill support via remaining quantity
- unit tests around domain behavior
- inital orderbook with separate bid and ask sides
next:
introduce price-time priority.
we'll initially use arrays and sorting to maintain:
- bids in descending order (highest price first)
- asks in ascending order (lowest price first)
for orders at the same price, FIFO(First-In-First-Out) will determine priority.
starting with arrays intentionally to keep the design simple and validate correctness before optimizing.
@kirat_tw
Ashish π§βπ» retweeted
Bro I'm so sick of pretending this isn't weird.
The internet spent 20 years creating tutorials, open-source projects, blog posts & answers for free.
AI companies turned all of it into products worth billions.
And now the same people who created that knowledge are being told they're replaceable.
We built the library.
Someone else started charging admission.
Ashish π§βπ» retweeted
I have so much gratitude to people who wrote extremely complex software character-by-character. It already feels difficult to remember how much effort it really took.
Thank you for getting us to this point.
Ashish π§βπ» retweeted
I tweeted so much about Galgotiyas, and I'll be doing myself and my country a disservice if I didn't talk about @SarvamAI .
It's batshit insane that these man have done with 105 B parameters what deepseek did with 671B. The levels of optimization is not something that we see often and I am fucking proud of my countrymen and their achievements.
May the smart ones keep achieving higher highs.
Ashish π§βπ» retweeted
π¦ Rust Tokio isnβt the only game in town.
Compio is a new Rust Async runtime built around completion-based I/O (io_uring), not readiness (epoll).
If you care about runtime design, this thread is a goldmine:
- I/O model: readiness (epoll) vs completion (io_uring)
- Execution model: work-stealing vs thread-per-core
reddit.com/r/rust/comments/1β¦
#rust #rustlang
Ashish π§βπ» retweeted
this guy is a βdating coachβ on Instagram and has 13k followers.
all his advice is basically just βalpha maleβ bs when he looks like this (after looksmaxxing)
we need to bring back bullying to calm these retarded edgelords.
Ashish π§βπ» retweeted
Replying to @wojakcodes
I think a lot of men need to understand that having sex with lots of women doesn't make them great with women.
Ashish π§βπ» retweeted
Prompt and supervise.
This is how software development is evolving. Just like the labor industry went through automation and assembly lines, coding is undergoing (or has already undergone) a similar transformation.
If evolution has taught us anything, it is this: every advancement replaces repetitive work and pushes us to use more of our brains.
Spend your time building a rock-solid product mindset, learning to communicate crisply (with people and machines), and understanding the domain with a touch of internals and nuances. Let AI handle the laborious tasks.
Ashish π§βπ» retweeted
useAiMakeNoMistakes redd.it/1nwqsif





























