Varun Ramesh's Blog

Blog Archive


2023

Evaluating Algebraic Expressions using Parser Combinators

August 23rd

In this post, I describe how parser combinators can be used to parse recursive languages, as well as deal with operator precedence and associativity.

An Introduction to Parser Combinators

June 25th

This post introduces parser combinators, a technique for building complex parsers through the composition of simple components.

ChatGPT is Good at Roleplaying Characters

May 6th

ChatGPT is really good at roleplaying as strange and unusual characters with minimal prompting.

2022

Simple Tips to Level Up Your Python Programming Skills

November 14th

Simple tips for beginners to level up their Python skills (with interactive code snippets).

2018

Thermomorph Postmortem

August 22nd

A postmortem for Thermomorph, an Alien-inspired horror game.

Proctor Postmortem

July 1st

This is a postmortem for Proctor, the first of three horror games that I recently released.

Loop, Autoplay, Muted, Playsinline - Say Goodbye to Animated GIFs

April 17th

Use HTML5 video tags instead of animated GIFs.

The Boehm GC Feels Like Cheating

March 15th

Integrating garbage collection into a C application was almost too easy.

No More Primitives - What Python and Java Get Wrong

March 14th

Many languages distinguish between primitives on the stack and objects on the heap. Others only have objects, and thus require primitives to aways be boxed. It turns out you can get the best of both worlds.

I Allowed All Web Push Notifications for a Week

March 11th

As an experiment, I decided to allow all push notifications for a week.

2017

Editing Gameplay Videos without Re-encoding using FFmpeg

December 26th

Editing gameplay videos in Premiere requires that you re-encode, thus losing quality. Instead, you can use FFmpeg to edit losslessly.

How I Structure GameObjects - Components and Mixin-based Inheritance

November 2nd

My recent game projects have used a GameObject architecture that unifies Component-based GameObjects and Mixin-based inheritance.

Lua Gotchas

October 20th

Lua is an awesome language, but it has some annoying features that have caused endless frustration for me.

Composable, Programmatic Animations for Games

September 4th

This post describes a method for creating animations in games programmatically, while still retaining composability.

Unifying Dynamic Type Tests and Type Refinement

September 3rd

Some typecheckers understand dynamic type tests, thus avoiding downcasting.

Stackless vs. Stackful Coroutines

August 18th

Coroutines can either be stackless or stackful. The terminology is somewhat confusing.

Spaced Out - CS148 Ray tracing Project

June 6th

A write-up for my CS 148 ray tracing image.

Automatically Promoting Constructor Parameters to Fields

March 30th

When writing object-oriented code, you frequently want a constructor that takes in values and assigns them to object fields. Some languages reduce the repetition required for this.

Runaway Robot - A Mobile Runner Game

March 29th

I made a mobile runner game for the CS194 class at Stanford.

Pulling a Page's Modified Date from Git

March 28th

When creating a static site, you can pull a page's modified date directly from git.

2014

Blue Screen - Ludum Dare 30 Entry

August 29th

Last weekend, I participated in Ludum Dare, a game jam where you make a game from scratch in under 48 hours.

ASCII Bell Character

August 17th

The other day, I accidentally printed a ton of binary data to my terminal. Upon doing so, my computer started to beep incessantly.

Simple Reloading Server in Bash

August 5th

A snippet for a reloading server in bash.

The Damned

July 20th

A couple weeks ago, I took part in a game jam on itch.io called the AGDG Microgame Jam.

2013

A Perk of Using WebGL

November 28th

WebGL games can use HTML/CSS for GUIs. It's a lot easier to use than most game engine UI frameworks.

Recent Hackathon Projects

November 28th

I write about some recent hackathon projects I worked on.

Designing a Cardboard Canoe

July 22nd

Every year, my high school holds a canoe race, where students from the Engineering, Physics, and Calculus classes compete to design, build and race a Canoe over the span of two weeks.