RSSAmplifier

Blog

kart's blog

Broadly interested in programming languages and systems programming.

blog.vashishtha.inRSS feed ↗9 posts

Latest posts

Keymashed: motivating your internet by mashing your keyboard

Since making the internet faster is a hard research problem, keymashed instead worsens the internet and then eases up proportional to how fast you mash the keyboard. It features: an overengineered network protocol a from-scratch video codec based on JPEG humor The project README on GitHub contains all the detail - all some 2000 words of it.

"Why Rust" - Presentation at Purdue Hackers

These are slides I used to present Rust to an audience that hadn't interacted with Rust before. I'm putting these here since I've heard from a bunch of people they really liked the slides and the presentation. I presented these at a session at Purdue Hackers . If you have trouble viewing the embed below, you can use this link .

Investigating a possible Linux bug: small-sized sbrk calls unexpectedly succeed despite low RLIMIT_AS

This article documents the investigatory process in detail. Skip to the patch for a summary of the situation. Background § I assume knowledge of the differences between the heap and the stack, along with experience using malloc to allocate memory. Each process on Linux is given its own address space with the layout: +-----------+ <- Largest memory address (0xfffffffff..) | Stack | +-----------+ <-…

Temporary Values, Borrowing, and Lifetimes

Problem § Prior to Rust v1.61.0 , the std::io::stdio::Stdin::lock function had a signature that looked like this: pub fn lock ( & self ) -> StdinLock < ' _ > Lifetimes un-elided , it looks like: pub fn lock < 'a > ( & 'a self ) -> StdinLock < 'a > which translates to the following: The returned StdinLock is valid for the lifetime &#x27;a The lifetime &#x27;a originates from a borrow of a Stdin…

Beginner-Intermediate Rust Error Handling

This article assumes you&#x27;ve read most of the The Rust Programming Language book. Pre-Introduction § There are mainly two styles of error handling you&#x27;ll need using Rust, or for that matter, most languages: Application level error handling, where you don&#x27;t care as much about handling errors than propagating them. Library level error handling, where it&#x27;s imperative that you have…

"It works on my machine" - The Motivation for Containers

It works on my machine. § Have you ever heard someone say, "It works on my computer" in response to a complaint about software not working? It&#x27;s no surprise. Software is inherently complex, with myriad dependencies that are often updated or out-of-date. Wouldn&#x27;t it be a joyous thing to develop stuff on your computer, and be secure in the knowledge that you can deploy it to servers…

How I Wrote This Blog

The Journey: § I&#x27;d gotten the itch to write stuff of my own sometime last year after reading way too many technical blogs for "fun and profit". One of said blogs was cuervo&#x27;s blog , which I really liked - their theme felt easy on the eyes. Their website also included a RSS feed, which I loved . (Since I use RSS with Thunderbird to keep up with blogs) The first step was getting acquainted…

(Basic) Segment Trees

Problem Introduction § Given an array of length $N$, we want to: Query the maximum value of a range $[l, r]$ Change a particular index&#x27;s value For example, we want to be able to: Query the minimum value in the array in the range $[1, 3]$ Then change the value of the second element ( arr[2] ) to 5 ... and repeat that many times. Possible approaches: We could maintain the array as is - query…

Hello World!

Hello World! First off, this blog uses Zola, a static site generator written in Rust, and a modified version of this theme. As an icebreaker, here&#x27;s a nice picture of a tree I took a few a years ago: Though don&#x27;t worry; this isn&#x27;t a photography blog... yet.