Vaibhav Kurhe (@vaibspidy) header
Vaibhav Kurhe (@vaibspidy) profile picture

Principal Member of Technical Staff at Oracle (Database Transactions) | MTech CSE from IIT Delhi | Interested in Systems Research

Bengaluru, India
Joined July 2015
Photo by Vaibhav Kurhe (@vaibspidy)Photo by Vaibhav Kurhe (@vaibspidy)
Vaibhav Kurhe retweeted
In January, @jonhoo, @jjgort, and I returned to @MIT_CSAIL to teach Missing Semester, a class on topics missing from most CS programs—tools and techniques that everyone should know, like Bash, Git, CI/CD, and AI tools. Today, we’re releasing the course for free online!
16
209
18
1,482
90,736
Vaibhav Kurhe retweeted
Turso, the next evolution of SQLite (previously codenamed "Limbo") reaches its first alpha milestone and first official release. We are so confident in our foundations, that we are offering you $1,000 if you find any data corruption bugs through our partnership with @algoraio (more details below) We understand that you love SQLite because of its legendary reliability. Which is why we wrote Turso with two layers of Deterministic Simulation Testing to generate the most improbable combinations of corner cases and surface every bug: our own, built-in to the project, and our partnership with @AntithesisHQ that catches every bug that survives the simulator. Including bugs in the simulator itself. We are rewriting SQLite because we believe that despite its incredible track record, SQLite could be more. And the secret to unlocking this is an open community of contributors that can unleash the true power of Open Source. In the months leading up to the alpha, Turso has already counted more than 120 contributors. And we are hoping you are next. For the upcoming beta, work has already started on features like concurrent writes, better schema changes, and change data capture. All features we constantly hear from people are sorely needed in SQLite. Performance was not the focus of our alpha. Yet, some workloads already perform a lot better on Turso. Which is why companies like @spice_ai are reaching for Turso as a replacement for SQLite to accelerate AI workloads. Lastly, we are testing Turso, A LOT. It would be a lot harder to do this without the high performance CI infrastructure that @useblacksmith provides. Learn more about Turso 👇
17
55
9
437
87,820
Vaibhav Kurhe retweeted
Week 20, Chapter 20 ✅ #PostgreSQL14Internals #BookClub
1
1
8
566
Vaibhav Kurhe retweeted
Automatic Generation of Debug Headers through BlackBox Equivalence Checking sorav.compiler.ai/pubs/debug… International Symposium on Code Generation and Optimization (@CGOconf) 2022 Vaibhav Kiran Kurhe, Pratik Karia, Shubhani Gupta, Abhishek Rose, Sorav Bansal (@bsorav)
1
7
21
"Putting the You in CPU" - a 16,000 word dive into how CPUs run programs, is out! I'm 17 and worked with @hackclub to write the guide I wish I had. it spiraled from a rabbit hole into a mini-book with kinda adorable illustrations. I hope you love it!👇cpu.land
36
386
50
1,513
259,112
Vaibhav Kurhe retweeted
I was digging through the CPython source code and found out how it uses polymorphism to implement objects. Yes, C is not an object-oriented language, but you can still mimic polymorphism with one clever trick. Let's see how CPython does it. Before learning about the "how," let's talk about the "why." In complex systems such as interpreters/compilers, you typically have many types that derive from a more abstract type. For example, if you are implementing an Abstract Syntax Tree (AST), you will have various concrete node types, such as function call nodes and identifier nodes. However, you will also have many generic functions that do not need to know the exact concrete type of the node. In an object-oriented language, this is straightforward because each concrete ASTNode type would subclass an abstract ASTNode class. However, since C is not object-oriented, would you go around copy-pasting those functions for each Node type in your AST? No, you can still mimic a limited form of polymorphism in C. Now let's talk about the "how." A struct is just a sequence of bytes laid out in memory. If I define a struct `foo` with a single int field, it will take 4 bytes in memory (on my x86_64 machine). ```c struct foo { int a; }; ``` If I declare another struct `bar`, which contains `foo` as a field and another int, it will take 8 bytes (4 for `foo` and 4 for the `int` field). ```c struct bar { struct foo foo_instance; int x; }; ``` When I hold a pointer to `struct bar`, I can read all of the 8 bytes at that address. However, I can also typecast `struct bar *` to `struct foo *`, and it will be a valid thing to do. The only difference is that now I can read only the first 4 bytes of memory pointed to by that pointer. And since the first 4 bytes contain the data for `foo`, the typecast to `foo *` is valid. Now I can pass this pointer to any function that accepts `foo *`. CPython employs the same trick. It defines a struct called `PyObject`, which is used as the first field of every concrete Python object struct. In other words, the PyObject struct is a universal type for all the object types implemented in CPython. The PyObject type contains some metadata about the object, such as its reference count and the object type, which is common across all the concrete types. Every other object type struct defined in CPython embeds the PyObject struct as its first field. Most of the functions in the CPython source code expect objects of type `PyObject *`. In order to call those functions, these structs representing concrete Python objects (such as `int`, `double`, `complex`) are typecasted to `PyObject *`. The attached illustration shows some examples of this. 1. You can see the definition of the PyObject struct defined in object.h. 2. As an example of a concrete Python type, you can see the C definition of the complex type, which has the first field as the PyObject type. 3. Finally, as an example of how these concrete object types are passed to functions expecting pointers to PyObject type, you can see arraymodule.c. The getarrayitem function expects a parameter of type PyObject *. When the array_item function calls it, it typecasts the object of type arrayobject * to PyObject *. PS: I've ignored details like padding and alignment when talking about how structs are packed in memory to keep things simple.
4
71
3
380
81,624
Please check out this short video on our paper! #cgo2022 #research #compilers #debugging
This six-minute video by @vaibspidy explains how debug headers can be auto-generated using a blackbox equivalence checker. The debug info generated by a modern compiler can be 75% incomplete and our tool fills in the missing debug entries auto-magically: youtu.be/FAvCRAVWSvw
3
6
Happy to share that I will be presenting our paper - "Automatic Generation of Debug Headers through BlackBox Equivalence Checking" at CGO 2022. @CGOconf (Tuesday, April 5th, 1:05 PM - 1:20 PM) [UTC - 4:00] Please check out my talk if you're attending the event! #compilers
1
4
Vaibhav Kurhe retweeted
I did a talk in my department today, as a part of the faculty research seminar series -- this series is a way of letting colleagues and students know about the research work of the department faculty members. Link to the talk video: youtu.be/sqj_Xp7x-7w
2
28
Vaibhav Kurhe retweeted
I will talk on superoptimization and equivalence checking at LLVM Social Bangalore (meetup.com/Bangalore-Compile…) next Saturday at 5.30pm IST. You are welcome to drop-by. Personally I am looking forward to doing a high-level overview talk on our research.
1
2
26
Vaibhav Kurhe retweeted
I am offering a course on Advanced Compiler Techniques (iitd.github.io/col874/) during Aug-Dec this year. The first meeting will be held tomorrow at 8am IST. Please send me a note if you are interested in attending and I could share a meeting link ith you. All are welcome.
10
23
116
Vaibhav Kurhe retweeted
If you want to master something, teach it. The more you teach, the better you learn. Teaching is a powerful tool to learning.
94
3,512
245
16,138
Vaibhav Kurhe retweeted
Our group’s work on CRDTs and collaboration software is built explicitly upon a philosophy of trying to shift power away from cloud providers, and back towards end users. More on this in our paper-cum-manifesto on “local-first software” inkandswitch.com/local-first…
6
44
6
264
Vaibhav Kurhe retweeted
Nationalist TV Channels were busy asking people to #BoycottChineseProducts, while also hosting ads for Chinese products on their channels. ✍️ @Memeghnad newslaundry.com/2020/06/17/l…
4
19
80
This gave me pause and reminded me of just what we are not talking enough about during this pandemic.
1
34
6
98
Arjun Menon of @iitmadras talked about the exciting work of the Shakti Project, an open-source processor development initiative by the RISE group at @iitmadras. Read more about the Shakti Project here: buff.ly/2Pehgm7 #RISCVSummit
12
38