RSSAmplifier

Blog

Anmol Sarma

anmolsarma.inRSS feed ↗21 posts

Latest posts

A DIY USB Mouse Jiggler

The Great Pandemic Lockdown of 2020 forced companies to adopt remote work. With no existing provisions for WFH, bizarre ad-hoc setups emerged. A case in point, my roommate was issued two laptops: One for development and a second locked down machine to connect to production servers. The second laptop was configured with a very aggressive lock screen timeout with no way to change or disable it. This…

File Creation Time in Linux

The stat utility can be used to retrieve the Unix file timestamps namely atime , ctime and mtime . Of these, the benefit of mtime which records the last time when the file was modified is immediately apparent. On the other hand, atime 1 which records the last time the file was accessed has been called “perhaps the most stupid Unix design idea of all times” . Intuitively, one might…

Talk @ Netdev 0x13: Improved System Call Batching for Network I/O

My colleagues Rahul Jadhav , Zhen Cao and me had our talk for Netdev 0x13 accepted. Our basic idea is reducing the CPU cycles consumed by amortizing the system call overhead of network I/O operations. At the time we started our work, io_uring was not yet a thing. With the benefit of hindsight however, it is clear that io_uring is the way forward. Here’s the video of Rahul delivering the…

Books I Read in 2018

The Information: A History, a Theory, a Flood by James Gleick Eclectic, engrossing and thoroughly enjoyable. From Ada Lovelace and Charles Babbage to Maxwell and Einstein to Shanon and Turing: Gleick’s masterful prose captures both the ideas and personalities of the men and women who made the world what it is today. Apart from the lucid explanation of the foundations of information theory,…

Network Redirections in Bash

A few months ago, while reading the man page for recvmmsg() , I came across this snippet: $ while true; do echo $RANDOM > /dev/udp/127.0.0.1/1234; sleep 0.25; done And as advertised, it sends a UDP datagram containing a random number to port 1234 every 250 ms. I didn’t recall ever seeing a /dev/udp and so was a bit surprised that it worked. And as it happens, ls was not able to access the…

Stop Memsetting Structures

TL;DR: Use C99’s designated initializers instead. Because it’s 2019! Edit: This post was discussed on Hacker News , Lobste.rs and /r/c_programming . It has been updated to address some of the concerns raised by commenters. One of the little things that annoy me when reading code is the unnecessary use of memset() to zero-out a struct . Something I see frequently in networking code that…

Single-stepping through the Kernel

There may come a time in a system programmer’s life when she needs to leave the civilized safety of the userland and confront the unspeakable horrors that dwell in the depths of the Kernel space. While higher beings might pour scorn on the very idea of a Kernel debugger, us lesser mortals may have no other recourse but to single-step through Kernel code when the rivers begin to run dry. This…

Books I Read in 2017

The God of Small Things by Arundhati Roy A beautifully heart-rending exploration of the human condition. The prose is almost lyrical and the narrative is dreamlike and completely immersing. All the little details add up to symbolise something bigger. The book is part political satire, part social commentary part psychological drama and part fairy tale. In the midst of all this, it manages to…

Talk @ RFC's We Love: CoAPing with the Internet of Things

Gave an introductory talk on CoAP at the 5th RFC’s We Love meetup . Turnout was low, probably owing to the rains and the festive season. It was still fun and had great discussions.

DCCP: The socket type you probably never heard of

TL;DR: DCCP is a relatively newer transport layer protocol which draws from both TCP and UDP. Jump straight to the example C code . Background Historically, the majority of the traffic on the Internet has been over TCP which provides a reliable connection-oriented stream between two hosts. UDP has been mainly used by applications whose brief transfers would be unacceptably slowed by TCP’s…

Books I Read in 2015

India After Gandhi by Ramachandra Guha A thoroughly sourced, brilliantly written and mostly objective history of India. Guha’s scholarship and unbiased account really shines throughout the book. Save for one non-sequitur and one inaccurate and one might say unfair characterization there is nothing to complain about. The rare photographs included in the book are fascinating by themselves. Reading…

Lazy Performance Comparison of WordPress and Ghost

So, I switched to a new blogging platform. Again. After trying out a static approach, I moved back to a WordPress when I stumbled across OpenShift ( And their fantastic free plan ). That was well over two years ago. In the meantime, I hardly blogged and didn’t really run into any issues but the blog did feel a tad sluggish. Fast-forward to yesterday when I had a sudden impulse to try…

Art of Living Foundation's Kurshed Batliwala Debunked

A critical look at Khurshed Batliwala’s talk, “Technology of Spirituality” delivered at Ruia College, Mumbai. Mr. Batliwala makes a number of extraordinary claims about the state of ancient Indian science and technology. Most of them however, turn out to be exaggerations, misinterpretations or outright fabrications. He then attributes all scientific progress to ‘spirituality’. The talk is nothing…

Talk @ EmWare: Getting started with Linux

Gave an introductory talk on Linux, basically a rehash of the talk I gave at KLU a couple of years ago.

Talk @ EmWare: Getting Started with Git

Gave an introductory interactive tutorial on using Git. I couldn’t finish the slides on time but managed cover everything on the agenda. Now that the talk is done, I’m don’t feel especially inclined to complete the slides.

Defeating India's Central Monitoring System

The Government of India has rolled out the Central Monitoring System which will allow it to access any piece of data passing through an Indian service provider. This means the government can now read all your text messages, emails and call records. Because privacy does not bring in votes, it is highly unlikely that any political party will oppose this system. Circumventing this system however, is…

Hello Again, World!

Here it goes again: After a couple of attempts with Blogger, a dozen iterations with WordPress, a very brief tryst with Drupal and a false start with Bloggart, I’ve now decided to ditch dynamic content management systems and give Octopress a spin. I like the idea of a statically generated site I can deploy anywhere. I used Sphinx for a documentation once and the experience with was pretty good.…

Das Blinkenlights on the MSP430 Launchpad with Linux

TI’s MSP430 LaunchPad development kit offers some serious bang for the buck. You get two modern 16-bit microcontrollers, a programmer-cum-debugger with pins broken out and a USB cable for less than 5 USD inclusive of shipping. TI even provides two free (as in beer) IDE’s for Windows. Linux support though was a bit sketchy when the board was first released. Things of course have greatly improved…

Mole Nama: A Linux Fantasy Saga

Mole Nama A historical account of the Mole’ani people in the Free Lands -Inestimabel Montcastellus We Mole’ani are a Geekic people, who like millions of other races call the Free Lands home. However, our people originally came from the other side; the Dark Lands that shall not be named. The Dark Lands were under monopolistic rule of the Borg and their brethren. Piracy was common and so were the…

Talk @ KLU: Linux? Say whaat?!

Gave an introductory talk on Linux at Koneru Lakshmiah University , with Vamsi following up with a talk on Bugs and Hacks as a part of the ‘workshop’ organised by the KLU Linux Users Group. With about 150 newbish students in attendance, it was fun albeit in a masochistic kind of a way. Here’s a shitty picture from the talk, courtesy of Vamsi: And here are the sildes: Edit: I lost the slides. Only…

Hello, World!

This is the 11th iteration of my blog/homepage. I’ve finally found a setup that I like (Thanks to Bloggart!) and unless I run into any major issues, I’m probably going to stick with it. Maybe now I’ll finally stop resetting the site and get down to actually blogging! Watch this space!