Joined April 2015
769 Photos and videos
Sundeep 🌞 retweeted
A quick update on the Ebook: - I've updated the PDF with better styling - great to read on devices. - And, there is also an EPUB version available now.
Before jumping into books like DDIA or Database Internals, it helps to understand the systems layer these designs are built on. A lot of the design of such data-intensive systems is based on virtual memory: page tables, page faults, mmap, the page cache, swapping, NUMA placement, TLBs, and the tradeoffs between what the OS wants and what the database wants. My latest article is a ~25,000-word mini-book on virtual memory. It starts from first principles and goes all the way down to advanced topics like NUMA placement and performance debugging with tools like perf and /proc. I also wrote it differently: as a dialogue between a user-space process and the kernel. Most treatments of virtual memory are dry and fact-heavy. I wanted this one to feel more like a story, while still being technically deep. Link below.
3
10
117
11,604
Sundeep 🌞 retweeted
These days whenever I need a database I reach out for sqlite that comes preinstalled with most Linux. But most Unix systems have always shipped with a (non-relational) database library called dbm. It was written by Ken Thompson in 1979 and has shipped with all Unix and Unix like systems ever since. It is a simple C based library to read/write key-value pairs. Under the hood it uses a hash-based index and a binary file format. When BSD was being opensourced, they rewrote it and also added b-tree indexing. This later became Berkely DB.
2
24
200
10,384
Sundeep 🌞 retweeted
Awesome reddit thread about "unexpectedly" useful Linux commands - reddit.com/r/linux/comments/… Have been using the CLI for years and I still keep finding small things that make me think how have I never seen this before... My favorites from the thread: - tac - namei -l - less F/ G - fold
8
22
153
14,709
Sundeep 🌞 retweeted
crazy
1
10
3,139
Sundeep 🌞 retweeted
May 15
CLI text processing with GNU grep and ripgrep by Sundeep Agarwal is on sale on Leanpub! Its suggested price is $12.00; get it for $5.00 with this coupon: leanpub.com/gnugrep_ripgrep/… @learn_byexample #computer_programming
1
2
102
Sundeep 🌞 retweeted

2
8
139
19,410
Sundeep 🌞 retweeted
Took me almost a month, but it’s finally done. I completely rewrote the first chapter of linux-insides about the Linux kernel initialization process. Now it should be aligned with modern kernels (up to master). github.com/0xAX/linux-inside…
11
218
1,252
52,875
Sundeep 🌞 retweeted
Announcing Textual Diff View! Add beautiful diffs to your terminal application. ⭐ Unified and split view ⭐ Line and character highlights ⭐ Many themes ⭐ Horizontal scrolling github.com/batrachianai/text…
7
27
373
29,193
Sundeep 🌞 retweeted
I've been looking into autograd internals of Pytorch. While I was aware of how backward mode autodiff works, I didn't know there was also forward mode autodiff. I had to read up on that. There is a very comprehensive article from an MIT course on that, I highly recommend it.
8
40
600
28,802
Sundeep 🌞 retweeted
Decorators blueprint: a step by step explanation of the full decorator anatomy. Steal this for when you're writing your own decorators.
2
11
788
Sundeep 🌞 retweeted
🐍 Struggling with Python regular expressions? πŸ”₯ I wrote an interactive TUI app with 100 exercises, covering both `re` and `regex` modules! github.com/learnbyexample/TU…
1
5
14
1,209
Sundeep 🌞 retweeted
I just released v1.4 v1.5 of "mkdocs-quiz" this week with some fun new features: ✍️ Fill-in-the-blank quizzes (not just multiple choice) πŸ’Ύ QTI export for Canvas/Blackboard/Moodle ✨ Interactive terminal CLI quiz runner github.com/ewels/mkdocs-quiz
1
3
7
1,035
Sundeep 🌞 retweeted
My latest #Python book is now available in digital format
1
2
9
785
Sundeep 🌞 retweeted
This year I'm starting a habit of working on a book every day. I have to write at least a paragraph for it to count. (I set a small daily goal to make it RIDICULOUS for me to skip it.) I'm 15 days in. The progress accumulates fast!
2
1
5
1,128
Sundeep 🌞 retweeted
Python has a "suppress" decorator in contextlib, which catches and ignores exceptions of a given type. I didn't use this for the longest time. It felt like an import to do something so trivial. I didn't care too much about saving two lines. Lately though, I prefer it. Not for saving lines, but because it is self documenting. The "suppress" is clearer when scanning code. This can get lost in your mind's eye when scanning code: try: file.write(...) except OSError: pass This feels more explicit, and easier to read at-a-glance with suppress(OSError): file.write(...) This tweet brought to you from the "last humans still writing code" generation.
27
23
531
45,334
Sundeep 🌞 retweeted
You can use the module `json` to read and write data in the JSON format, which is very suitable to represent the most common Python built-in types: - lists - dictionaries - strings - integers - floats - Booleans.
2
1
5
952
Sundeep 🌞 retweeted
Wrote an essay on why time is such a hard problem in distributed systems. This week, I went down the rabbit hole of clock drift, NTP, PTP, logical clocks, vector clocks, and how systems like Spanner and CockroachDB deal with ordering and causality at scale. If you want to know how and why clocks break databases, why milliseconds matter, or how distributed systems deal with time, this essay will give you a solid mental model. Give it a read.
13
49
695
37,085
Sundeep 🌞 retweeted
First time seeing this and it is really great! abseil.io/fast/hints.html

2
19
201
41,858