RSSAmplifier

Blog

Mikail Khan

¯\_(ツ)_/¯

/RSS feed ↗10 posts

Latest posts

Moved to blog.mikail-khan.com

This site has moved to https://blog.mikail-khan.com

Representing Data Structures with First Class Functions

I was talking to my roommate about how all data structures can be emulated through function compositions the other day so I thought I’d prove it.

Writing a JSON Interpreter

A few days ago, I wrote Javascripth, a lispy scripting language that uses JSON as its concrete syntax. It’s a single phase treewalk interpreter, so its abstract syntax tree is also JSON, but technically that’s true of any interpreter written in JavaScript. Here’s an example of some Javascripth code to calculate the 10th fibonacci number:

Writing a simple API Wrapper in Elixir using GenServer

Recently I’ve been writing an wrapper for the TD Ameritrade API. I’ve been learning Elixir as an alternative to Python recently, and I thought that this would be a good use case. I was right.

Backfire G2

My Backfire G2 arrived today. I’ve been longboarding since quarantine started and inline skating since before then, but this is my first electric skateboard.

Modeling an AST in Different Languages

Abstract Syntax Trees (ASTs) are an interesting data structure because their representation varies widely across type systems. While I’m writing about ASTs specifically here, in this post an AST is essentially a proxy for any sort of polymorphic tree. Modeling a polymorphic tree structure is one thing, but traversing said tree often requires a set of mutually recursive functions (or a single…

Writing a Tiny Stack VM in Rust

A few days ago I wrote a super simple postfix expression evaluator to demonstrate how stacks could be used to a friend. Afterwards, I decided to finally get around to learning how full stack VMs work so I expanded it into a full stack VM for which you could theoretically write a compiler. It turned out to be super concise and pretty fast.

Using Const Generics To Model An Electronics Graph

A few days ago, I started working on a digital electronics/logic simulator along the lines of https://github.com/SebLague/Digital-Logic-Sim.

I Accidentally Wrote A Lua Game Engine

Lately I’ve been working on SIMple Physics, a set of educational physics simulators meant to help teach and learn physics intuitively without expensive lab equipment or in person classes. Each simulator allows users to import and export scenes and potentially add some more advanced functionality through Lua.

From Go to Haskell + Svelte

This post was originally written for https://levelup.gitconnected.com/from-go-to-haskell-svelte-1ad5ff4a0520, and I lazily copy pasted it here so some of the formatting is probably off and the images are removed.