
avrl ☘
17.5K posts

avrl ☘
@avrldotdev
Backend dev | I love to write | Open Source Contributor Medium: https://t.co/mtXbyXMyq0
192.168.29.72 Katılım Kasım 2024
313 Takip Edilen7.2K Takipçiler
Sabitlenmiş Tweet

one of the best articles on why undo/redo is so complex. it covers:
- possible approaches
- ropes as a data structure
- operations on ropes
- structural sharing & immutability
- optimisations (cursor)
- other impl's: piece table, gap buffers & finger trees
do save & comment!
avrl ☘@avrldotdev
English

@ramxcodes I also need to do this, smaller and byte sized exercise to keep me in the game.
English

It took me 35 minutes to implement debouncing in TS
without AI.
It took me 54 minutes to implement array flattening or the array.flat method from scratch
but it was good. I’m like no ai.
It’s almost like you know what you’re doing, but just can't write it.
Now I need suggestions from you guys
should i make videos on problems I’m solving?
With good depth
eg- for debouncing you need to learn:
This
Apply
Callback
Event loop architecture
timeout
closure and spread
English

In 12th grade, I had a really good friend. We both didn't do well in JEE. I joined a tier-3 private college, while he took a drop year.
During his drop year, he would often tell me that he was aiming for IIT Delhi or any IIT for CSE. I assume things didn't go as planned because, a year later, he joined the same college as me. Ironically, he became my junior.
But that's where our paths started to look very different.
He became the president of some amazing clubs, built incredible hardware projects, made drones, and won hackathons.
Watching his journey made me realize something important. I always blamed my college for not offering enough opportunities, but he proved me wrong. Sometimes, the limiting factor isn't the college. It's what we choose to do with the opportunities that are already there.
English

That's a set union.
To union 2 sets quickly ( and eventually n sets)
1. Allocate an array, results, sizeof len(set1) + len(set2)
2. Generate a hashmap of the smaller set (call it set1)
3. While generating the hashmap, copy all values which aren't duplicates in set1 into results (you will know this based on if the hash key collides and the value is already loaded: skip, otherwise add)
4. Iterate over all members of larger set, set2. If the hash of the item is NOT PRESENT in hashmap1, add it to results.
5. realloc results list to now calculated size
6. Return unique union, and apply against the next set.
This will be a few ms per set you need to merge. As far as I am aware, there is no faster approach.
English

@BertoldVdb We need to build it for scale, 100k was just a number, they needed an engine to handle all kinds of load and distributedness
English

@avrldotdev 100K is not a lot. Can't you just insert them into a hashmap (does the dedupe) and then forward the locally deduped lists to a central node doing the same operation to make the final list?
English

@devXritesh Your in detail answer: x.com/i/status/20538…
avrl ☘@avrldotdev
Applied System Design (Real Scale) 17 How Zoom/GMeet survive bad Wifi? Problem You're on a Google Meet call on your phone and walk into an elevator. The bandwidth drops from 50Mbps to 100Kbps. The video blurs out, but you can still hear your manager clearly. How?
English

System Design Interview Question:
You're building a Zoom-like video conferencing platform for enterprises.
Requirements :
Support 1 million concurrent participants globally.
Meetings can have up to 500 participants.
Users should automatically connect to the nearest region for low latency.
If a regional data center fails, meetings must continue with minimal disruption.
Support screen sharing, chat, recording, and real-time captions.
Video quality should automatically adapt to changing network conditions.
End-to-end latency should stay below 200 ms.
How would you design the architecture?
Explain your High-Level Design 👇

English

fuck man kal se firse classes. but ykw even tho classes are boring and pretty much just end up fucking the day, i like how busy i am throughout the day. like there's never a moment's hestitation as to "should i work now???" because i know on the days ive got my classes i barely get any time to work, so whatever time i do get, i'd much rather spend it on working over pretty much whatever the fuck else i can do. + you get to meet and interact w loads of people between classes and breaks, even if it's just a simple "wassup wassup". good stuff
back to work ^^
English

Morning. The last 48 hours of Codex and ChatGPT Work have been intense! Three important updates:
- Temporarily removing the 5 hour usage limit restriction for all Plus, Business and Pro plans
- Rolling out changes that will make GPT 5.6 Sol more efficient across the board and that will be reflected in less usage being used so that it can take you further. Exact impact to be quantified and shared
- We hit 6M active users, and are landing a usage reset in the next hour
Go do things
English

@proxy_vector @avrldotdev This should always have been more marketable anyway
English

@DonaldBough It is async but near realtime based on the size to dedupe. After a limit, do it in background & return the result later
English

@avrldotdev Just ran through the full question w/ChatGPT grilling me for 30 minutes:
- 2s SLA is a trap. Assume 100 file paths per request, each with up to 500k rows per file, avg row of 500 bytes, then network speed for 25GB in 2s isn’t realistic
- Assuming async job, it was map reduce
English

@The_AtulMishra Ofc thats given, but they needed a basic idea before pinning down ghe details
English

@avrldotdev I'd push back on the question — ask for QPS, data skew, and exact vs approx dedup before sketching diagrams.
English

@avrldotdev Local bloom filter to create single list with unique items in each node, then bloom filter to combine multiple lists across nodes into global single unique list.
English


