Andrey Listopadov

Projects that I made or worked on

I do a lot of stuff, and that’s primarily the reason why I decided to create this blog, so I could keep my thoughts a bit more organized and occasionally write about stuff I’ve built. Below are some projects of mine in arbitrary order, some of which I consider finished, and some of which are still in the phase of active development. You can think of this as a portfolio of sorts if you want, though I wouldn’t call it that.

Clojure(Script)

Clojure is my main language at work, and I did a few hobby projects in it in my spare time:

Libraries

I haven’t written many libraries for Clojure, mostly because the language already has a lot of quality solutions for most of the problems I have to deal with. I did, however, explore the language a lot while working on Fennel, porting Clojure’s standard library and other core libraries.

This resulted in the creation of pipeline-extras, a supplementary library for clojure.core.async, that provides a fix for the ASYNC-163 bug in the pipeline-async function, as well as unordered pipeline variants. You can find the explanation of the off-by-two error in pipeline-async in the following post.

As a joke, I made a JSON parsing library, called cheat-json. This library was a fun idea at first, but I used it to toy around with a mixed Java/Clojure project.

ClojureScript demos

ClojureScript was my first point of contact with Clojure. Not because I wanted to be a web developer, but because I wanted to create something visual, and JVM isn’t exactly friendly for web distribution.

I made the wave function collapse - an implementation of the WFC algorithm that I’ve also explained in a post. The demo page features a basic tile-based editor, and some examples to try.

And here’s my first project in CLJS: basic raycasting engine. It’s a small raycasting demo and a tutorial on how it was done.

Other stuff

There are more projects I made in Clojure, mostly for fun

  • time-control - a CLI app I made as a practice with GraalVM, and used for a while to keep track of how much time I spent on various activities. It was built in a rush, so it’s not the greatest example of my Clojure skills.
  • CljLox - an interpreter from the first half of the Crafting Interpreters book implemented in Clojure. It features a fully immutable and extendable parser, tokenizer, and interpreter.

Fennel

I’ve been working on the Fennel language for some time as well as on various libraries for it, or just stuff I found fun. Fennel brings together the simplicity and expressiveness of Lua with the flexibility of the Lisp macro system and does so in a very smart way.

Games

Fennel is great for making games. There are several simple game engines you can try it with, and overall I find it a bit better than Lua because of extra expressive power. I made a few demos:

  • LÖVE Raymarching - an example implementation of the raymarching algorithm done in Fennel language using LÖVE2D game engine. Post link.
  • LÖVE F.A.B.R.I.K. - implementation of Forward and Backward Reaching Inverse Kinematics algorithm in Fennel using LÖVE game engine.
  • Brick Game with a Twist - an entry to the first Fennel game jam.
  • Game1 - a small demo of a platformer I tried to make during my personal game jam challenge.
  • Game3 - an attempt at making a shoot-em-up game in TIC-80.

Clojure libraries for Fennel

These libraries are very much Clojure-inspired:

  • lazy-seq - lazy sequence manipulation library for Fennel and Lua.
  • itable - immutable table library for Lua and Fennel.
  • fennel-cljlib - a general-purpose library for Fennel language that brings functions and macros from Clojure’s core namespace. It integrates both lazy-seq and itable to provide an experience very similar to what you can get from Clojure.
  • async.fnl - A core.async port for Fennel.
  • fennel-test - a Clojure-inspired unit testing library for Fennel.
  • fnl-http - a clj-http-inspired HTTP/1.1 client with asynchronous interface through async.fnl.

These libraries aim to make Clojure programmers more comfortable with Fennel by providing a set of features they already know. The result may not be idiomatic Lua, but it isn’t always the target to pursue.

Lua

I’m not the biggest fan of the Lua language, it’s just that I like its virtual machine characteristics. Most stuff I’m making for it is done in Fennel because it is a better language.

  • lua-inst - A simple implementation of ISO 8601 date parser for Lua.

Zig

I like the Zig programming language. After years of writing C, this feels both fresh and

Rust

The Rust programming language was what finally motivated me to move away from C to some other language and to start this blog. I liked the concepts behind the borrow checking system, and overall Rust seemed pretty fun.

For self-exercise purposes, I’ve written GRScheme - a small scheme-like interpreter in Rust. Here’s the series of articles in which I go into implementation details. Looking at it today, I understand that this approach is naive, the code isn’t particularly great, and I wouldn’t recommend judging me by this project. I still keep it close to my heart, as I think of this as a milestone in my programming journey.

Emacs

My main text editor, which I use both to write code, this blog, notes, agenda, mail, and other stuff. My configuration is quite extensive, and I’m trying to extract useful stuff from it into packages:

  • ob-fennel - Org Babel support for the Fennel language (merged to fennel-mode)
  • isayt.el - indent s-expressions as you type. Basically does what the name says.
  • fennel-mode - major mode for the Fennel language. I’m a co-maintainer of this package.
  • region-bindings.el - not to be confused with region-bindings-mode. This is another implementation of the same feature, which works better for my use cases. It was a part of my config for a long time, but I decided to move it into a separate package.
  • common-lisp-modes.el - a mode for enabling common modes for various lisps.
  • infinite.el - experimental windowing system with infinite workspace.

Kakoune

I’ve used this text editor for some time, heavily configured it, and developed this set of plugins over time:

Vim

I’ve used Vim (and NeoVim) for a very long time, and it was my first experience with a hackable text editor. The following plugins were originally meant for personal use, but I’ve published those anyway.