Skip to main content

Sudarshan's Blog

Cloning boxed traits in Rust

I enjoy coding with Rust’s composition system. It’s nice to also have generics. It makes adding and incorporating changes rather nice. I recently ran into a problem when I wanted to copy a group of boxed traits.

Lets start from the beginning. Imagine we have an http client that makes requests give a URL. Like so…

A little code generation in Go in 2020.

Perl gives me headaches. But I’m fond of one of Larry Wall’s three virtues: Laziness. This is a story of how sometimes laziness lets you do fun things. Distributed systems and microservices are as ubiquitous as the coronavirus in 2020. This results in a requirement for a lot of integration. And a nice way to maintain the glue code is to use SDKs rather than have multiple services write the transport glue themselves.

How I got a 100 Dollar toy drone to follow me around.

It’s that time of the year again when I decide to add to my blog. It was my birthday last week and I decided to buy myself a small DJI drone to hack with. I wanted to get something lightweight, cheap and easily replaced. The DJI Tello so far has turned out to be delightfully sufficient for my criteria. The video is here. The experiment I set out to do is to have the Tello latch on to a face and follow it.

Why types are elegant

I’ve been working with Go(for work) and Rust(for fun) lately. I got pulled into the two languages for different reasons (easy concurrency and memory safety respectively) and ended up staying for a totally different reason altogether. Their type systems. Composition instead of inheritance feels elegant, right and very readable. I’m going to talk about something that happened today when I was very thankful for composition and typing itself. A colleague and I ran into a problem that quickly devolved into an argument and as it is with professional software engineers, wanton namecalling.

Training a simple gender classifier with Python and Predicting with Go

Ever since Tensorflow released Bindings for Go, I’ve been itching to give it a go. The ease of deployability with Go and microservice friendliness and even simple http performance improvements make it really handly to build a working prediction application with Go. The immediate and apparent downside for anyone who’s tried to train a model is how unintuitive scoping is with Tensorflow for Go.Python’s a lot easier to train models with for a newcomer because of a lot of things: