Skip to content

Instantly share code, notes, and snippets.

View dilawar's full-sized avatar
🐕
w**king

Dilawar Singh dilawar

🐕
w**king
View GitHub Profile
@dilawar
dilawar / Brief review M Tech program in Microelectronics at IIT Bombay.md
Created January 14, 2026 16:56
Brief review M Tech program in Microelectronics at IIT Bombay

I took my Master of Technology in Microelectronics and VLSI in the Teaching Assistant category from IIT Bombay between 2007-2009. Although project work is an essential part of this program, it is more or less a taught degree. In the first two semesters, one is expected to do a certain minimum amount of course work and contribute to a project alongside the course work.

The first two semesters prepare students for their project, which they are expected to contribute to in the final two semesters. The former is assessed through examinations, while the latter is assessed through project reports and presentations. When I was a student, we had to give a presentation every semester (a seminar in the first semester and a progress report in the other semesters). This has now been reduced to one presentation per year. Students spend more time reading and writing for exams than working diligently on their project, although there are notable exceptions. Sometimes one wonders how so many people who excel in coursework ar

@dilawar
dilawar / Attraction of Factions.md
Created January 14, 2026 16:53
Attraction of Factions

There has been disagreement over what constitutes the basis of Indian society: caste or class. Both are very significant in our collective social life. However, a large part of our private lives is governed neither by caste nor class, but by factions. Factions are easily visible in the political domain, often forming around influential people in a political party. They are not limited to politics, but can be found in many other areas of our social life. Political scientists have paid attention to factions, but it doesn’t look like hat our sociologists have done significant empirical or theoretical work on them.

When not much data is available about a social process, people look to their own life experiences and common sense to understand the problem. Rural life — of which I have first hand experience — is simpler in terms of its organization. What matters most is personal relationships; rules are not as important. Since the community is small, this works well. People are able to take finer personal distincti

@dilawar
dilawar / Where Is The Center Of India dfbda6d68db948dfa0b793ce8d1d4040.md
Created January 14, 2026 16:52
Where Is The Center Of India dfbda6d68db948dfa0b793ce8d1d4040

Where Is The Center Of India?

Imagine yourself to be Krishna — he was fond of lifting mountains. You want to lift India on your fingertip. You have already sliced the country using a cosmic knife 1 km below sea level. Where would you keep your finger? Remember that it needs to be balanced. There is no perfect answer to this question. The estimates, however, are easier to make. One such calculation is below.

There are two markers on the map. The one in Madhya Pradesh (MP) is the middle point of the country. If you draw a map on paper, the center of the map is the centroid. But if you lift the country at the centroid, it won't be balanced. The Himalayas are heavy and make the country tilt to the north. If you do this, you will hit some Chinese heads. They won't be happy!

Two centers of India. The first one is the simple geometric mean of boundary points, and it falls inside the rightly named Madhya Pradesh, and the second is the

@dilawar
dilawar / An Example of boost fiber c8dcca5f268d4347b0147d131be62fd0.md
Last active January 14, 2026 19:30
An Example of boost fiber c8dcca5f268d4347b0147d131be62fd0

An Example of boost.fiber

Fiber is just a thread implemented in user space.

Fibers are easier to reason about and have perf advantage of much cheaper context switching.  Fibers are very well suited for handling concurrent IO operations where a processor mostly wait for data to become available, and threads usually have pretty big context switching cost. So multiple fibers running in a single thread is an effective solution.

Here is a simple program I wrote to explore fibers. You can find the full example below.

[playground/fiber.cpp at a5fba9f21ff121249c71bff75ee8964c1016aa3f · dilawar/playgroundThis works is available in public domain. Contribute to dilawar/playground development by creating an account on GitHub.https://github.com/dilawar/playground/blob/a5fba9f21ff121249c71bff75ee8964c1016aa3f/BOOST/fiber.cpp](https://github.com/d

@dilawar
dilawar / How to make fish default shell on MacOS 137e579bff8980209d11e4f662d4cb70.md
Created January 14, 2026 16:35
How to make fish default shell on MacOS 137e579bff8980209d11e4f662d4cb70

How to make fish default shell on MacOS

🍎

How to make fish default shell on MacOS

  • Find the path of fish using which fish
@dilawar
dilawar / Politics of Resentment 90d73e48acac48cc9d3fe970ffec52ed.md
Created January 14, 2026 16:28
Politics of Resentment 90d73e48acac48cc9d3fe970ffec52ed

Politics of Resentment

🏛️

Politics of Resentment

The disintegration of the Congress party over the last few decades is well-deserved. Many factors have contributed to this disintegration, including corruption, indiscipline, and the sheer ineptitude and lethargy of its aging leadership. Fortunately for the Congress, the old eventually die. The condition of Congress seems to be improving lately. In particular, its leadership's paralysis in the face of even the most trivial sorts of crises in interpersonal relations has been improving. The success of Congress in the 2023 assembly election in Karnataka has been ascribed to this which is welcome news for Indian democracy.

The BJP has done remarkably well in last few decades and most of its success is not because the Congress is weak. BJP even managed to resonate with people outside the Hindi heartland, especially in West Bengal and Karnataka. I found BJP's success in West Bengal quite surprising. A state that was in the firm grip of the Left party’s culture

@dilawar
dilawar / About 250e579bff8980c39a01e9a47b4bf5f6.md
Created January 14, 2026 16:16
About 250e579bff8980c39a01e9a47b4bf5f6

About

About

Hey, there! Currently, I pose as a Generalist System Engineer and “full-stack” developer. I speak Rust, C/C++, Python and PHP fluently, and TS/JS decently well. During my PhD (NCBS Bangalore), I worked on numerical computations and neural simulators. You can find my publications at https://scholar.google.com/citations?user=M8uppRgAAAAJ&hl=en. I have masters in Electrical Engineering (IIT Bombay) and I’ve done a fair bit of hardware design using Verilog/VHDL and Bluespec.

Currently, I am looking for opportunities that are fully remote or in north Bengaluru. If you are looking to evaluate my “technical/developer” profile, take a look at https://github.com/dilawar for proof of work and capabilities. I prefer working in small, capable teams.

@dilawar
dilawar / notion2blog.js
Last active September 6, 2022 14:01 — forked from mayneyao/notion2blog.js
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "dilawars.me"
const START_PAGE = "https://www.notion.so/dilawars/Dilawar-Singh-fbc9f970d6da463aa8b2a63ea42e8987"
const DISQUS_SHORTNAME = "dilawars-me"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
cube([200, 100, 2]);
translate([5,60, 3])
linear_extrude(2)
text("Congrats!", 30, "Arial");
translate([5,35,3])
linear_extrude(1.5)
text("Dr. Motu Mc Chotu!", 16, "Arial");
translate([5,15,3])
@dilawar
dilawar / README.md
Last active April 29, 2022 10:11
Docker compose file for RustDesk

Replace rustdesk.subcom.tech with your domain name or ip address.

At the time of writing, only demo option works for -m option. -m takes registered email but this feature was not implemented at the time of writing this gist.

I think RustDesk is planning for paid email subscription later.