Saurabh Sharma

1.5K posts

Saurabh Sharma

Saurabh Sharma

@itsjzt

Developer

India Katılım Mayıs 2017
507 Takip Edilen168 Takipçiler
Arpit Bhayani
Arpit Bhayani@arpit_bhayani·
I am showing how you can build Redis from scratch and nobody cares 😅 I will start posting commentaries and rants. Wahi dega views. This is my worst, absolute worst, performing series.
Arpit Bhayani tweet media
English
203
47
2.3K
76.4K
SudoX7
SudoX7@sudox7·
a Python list isn't a list. it's an array of pointers. calling it a "list" is the most misleading name in programming. it's not cache-friendly and also it's not compact. it's an array of addresses scattered across RAM. numpy fixes this by doing what C does: storing the actual values contiguously.
SudoX7 tweet media
English
39
19
317
32.4K
Saurabh Sharma
Saurabh Sharma@itsjzt·
@sean_j_roberts For crud apps, go is just as overkill as rust. For networking related stuff making load balancers, CDNs it makes a lot of sense
English
0
0
1
18
Sean Roberts
Sean Roberts@sean_j_roberts·
hot take: Go would be the greatest programming language on earth if it had enums and union types. they simplified their way into having to do really weird stuff just to represent reality. you should still probably use it though.
flowstate@k_flowstate

banger articles you should read

English
97
34
1.1K
149.9K
Saurabh Sharma
Saurabh Sharma@itsjzt·
@SumitM_X who uses MR? and what platform are they using certainly not github[.]com
English
0
0
0
365
SumitM
SumitM@SumitM_X·
Do you call it PR or MR ?
English
23
0
27
8.8K
Ashok Sahoo
Ashok Sahoo@ashoKumar89·
ORMs make development faster. But can hide inefficient queries. Why do teams still rely on them heavily?
English
19
3
54
10K
Puneet Patwari
Puneet Patwari@system_monarch·
Candidate Studying: - CAP theorem - Kafka internals - microservices - How to train LLMs Interviewer: What’s the difference between a library and a framework? Candidate: Gives a shallow answer, panics when question is twisted. Sometimes, the most tricky questions can come from fundamentals.
English
10
10
211
18.9K
Harish Uthayakumar
Harish Uthayakumar@curiousharish·
Someone please build a wrapper on AWS! Most confusing interface ever.
English
246
27
878
98.1K
avrl ☘
avrl ☘@avrldotdev·
So I accidentally initialised array in java as `int n[] `instead of `int[] n` & it compiled which made me curious. What I found was cool (for me): - java allowed `int n[]` for C/C++ devs to be at home - the parser rewrites both into the same AST node - arrays in Java are first-class types(int[] is a real type) - both compile to the same bytecode (newarray int) - the type descriptor at JVM level is [I for both - the JVM only sees the normalised type Mixing styles is where it gets ugly: int[] a, b[]; gives a: int[] & b: int[][] So Official Java Docs recommend writing [] to make the syntax uniform. So yeah, no runtime magic here. This is purely a compile-time normalisation decision. Pretty cool tbh.
avrl ☘ tweet media
English
10
5
79
8.9K
Saurabh Sharma
Saurabh Sharma@itsjzt·
@arpit_bhayani I worked on exactly the same thing a while back, happy to chat if my experience can be helpful to what you're trying to achieve.
English
0
0
0
276
Arpit Bhayani
Arpit Bhayani@arpit_bhayani·
Now that I am working on full-fledged AI systems at Razorpay and building them from the ground up, two things are pretty clear... 1. The workflow of AI systems is genuinely different. You have to think AI first from the start - how execution flows, how skills are composed and invoked, sub-agent orchestration, active and passive evals, etc. The only way to develop that intuition is to build a lot of prototypes and know SDKs and patterns inside out. Reading about it does not get you there. 2. System design and low-level design are more crucial than ever. The harness around these systems demands serious system design, no exaggeration here. Features like pause and resume workflows, serving, checkpoints, pipelines, sync async invocations, observability, cost tracking, versioning, rate limiting, quota management - just to make your long-running executions work without hiccups at any scale is a super interesting challenge. Apart from this, the importance of low-level design is very high because of extensibility, and over-abstraction - that we all joke about - is actually super critical. Think of external systems that you connect to for your workflows, downstream systems that need to interface and fall back from one system to another, etc. To be honest, I am not as AI-pilled as some of the other folks in the org, but I am getting there :) And it has been an insane learning curve. But yes, building production AI applications is so much fun. There is a lot to learn. That part never changes.
English
45
78
1.5K
71K
Saurabh Sharma
Saurabh Sharma@itsjzt·
@iavins I refuse to believe that google doesn't use a hashmap of the remaining usernames to do O(1) checks and O(1) deletions when a username is taken
English
0
0
1
1.7K
Saurabh Sharma
Saurabh Sharma@itsjzt·
@iavins That’s really interesting. Btw I learned about Gossip Glomers from you the other day, and I’ve started working through the exercises. It’s challenging but enjoyable.
English
0
0
1
25
v
v@iavins·
@itsjzt yeah, i work on rewriting sqlite in rust, and adding modern features on top, like encryption, sync, io_uring
English
2
0
1
59
v
v@iavins·
We use asserts all the time in Turso DB and also in the Turso Server. They're in release builds and shipped to production. And yes, they could crash the server. Asserts are my favorites, and I use them whenever possible. Just yesterday I merged a PR that contained asserts and nothing more. So when do you use them? Use asserts for checking invariants. If that invariant has failed, then something must have gone horribly wrong; I'd prefer to crash the server than continue. Like this made-up example: let a = 5; let b = 7; assert!(a < b, "likely the world has ended"); Asserts help quickly catch logical bugs and prevent something catastrophic. In a database, if some invariant isn't holding up, it could lead to corruption, data loss, or failure of ACID guarantees. Crashing is preferred over proceeding. However, it's incorrect to use them as error handling. 1. You can assert that a write txn has the exclusive write lock before it writes 2. When you read a page from disk, if the read is successful, you can assert that the page exists in the buffer pool 3. Like in MVCC, you can assert that the row's timestamp is less than the txn's (i.e., a txn cannot read rows from some future txn) In practice, we have two macros: `assert` and `debug_assert`. We have a friendly wrapper on top of these. `debug_assert` is fatal in debug builds and logs the condition and message as an error in release builds. `assert` is shipped in both - it's fatal on failure. Rust has a rich type system. Sometimes types help, but most of the time we need asserts. Last year I spent a lot of time writing state machines and used plenty of asserts to check conditions. For example, if the code isn't supposed to be in state X without condition A being true, that's checked with an assert. Asserts also go well with Deterministic Simulation Testing. DST is the one strong reason that we have asserts all over the place. DST is that magical testing philosophy which lets you reproduce the super hard bugs easily. I keep running the simulator, let the asserts fail and then fix the logical bug. We don't use asserts for data from user inputs or S3 (we assume S3 could get corrupted), and for tenant-specific cases we raise errors instead since we're multi-tenant.
v tweet media
v@iavins

Arguably, Go doesn't have asserts because, well, Pike doesn't like them 🥲

English
11
6
139
46.8K
Saurabh Sharma
Saurabh Sharma@itsjzt·
@immasiddx This is why I think everyone should speak english. 90% of that file size is translation files
English
0
0
0
18
sid
sid@immasiddx·
670 MB for an email app is insane.
sid tweet media
English
488
267
13.3K
780.1K
Anurag Hazra ⚛
Anurag Hazra ⚛@anuraghazru·
I never imagined that JS devs would one day piss of both Rust and C# community at once.
English
4
0
28
1.4K
Grant Slatton
Grant Slatton@GrantSlatton·
"design tinyurl" is still unparalleled as a systems design question despite being the most popular for all these years you simply can't fake it, there's too many rabbit-holes if you just memorize the answer, you'll always trip up and get caught by a good interviewer
English
66
118
3.6K
699.8K
Anton Zolotov
Anton Zolotov@azolotov·
I think speed/performance is the ultimate measure of user experience, and I love that Ghostty focuses on that. Amazon invests in the things that won't change. No one's going to say, "I wish my order took longer to deliver," or "I wish this app were slower." Speed is objective and easy to measure. I'd rather look at how long it takes someone to get the outcome they want than debate stylistic preferences. I was able to install Ghostty and use it out of the box with zero configuration to work on a project. That's fast. And delightful. 🙂
English
1
0
6
2.8K
Mitchell Hashimoto
Mitchell Hashimoto@mitchellh·
Thanks @antirez. I'm going to share this whenever anyone scoffs at me and says "`cat` performance doesn't matter". This stuff matters, it has real productivity implications. I smiled at this because we worked hard on this and I'm glad someone I respect so much noticed. For what it's worth I gave a lightning talk on some parts of how we do this: youtu.be/cPaGkEesw20?t=… (timestamp link) Usually the "scoffers" will be snarky and say: you should pipe it to a file or pager. Sometimes yes, but if you don't have to... why? Also, I don't know about you but I've routinely accidentally dumped a ton of text to my terminal unintentionally. With Ghostty it's just a total non-issue. Love this.
YouTube video
YouTube
Mitchell Hashimoto tweet media
English
33
75
1.6K
88.8K
Saurabh Sharma
Saurabh Sharma@itsjzt·
🔥 5 Tweaks to Boost Conversions! 1️⃣ Interactive GIFs instead of images 2️⃣ ‘Video-in-hover’ for previews 3️⃣ Competitor price comparisons 4️⃣ Add to Wishlist popup 5️⃣ FAQ based on visitor clicks 🌱 Eco impact display #Shopify
English
0
0
2
77