Lispy

Lispy implementation in C. Lispy is a small but robust programming language that inherits many features from Lisp. Lispy comes with an REPL as well as an interpreter. Like other Lisps, Lispy uses macros-like objects called Q-expressions to build out unevaluated code whose structure and content can manipulated and later evaluated. Lispy is built using bpt.

Example

; Fibonacci (this is a comment)
; `()` denotes a S-expression which will evaluate immediately
; `{}` denotes a Q-expression which will remain unevaluated
; Define a function `fib` taking an parameter called `n`.
; `fun` takes two Q-expressions the first being the name and parameters,
; the second is the body of the function
(fun {fib n} {
    ; `select` expressions evaluate the first element (here a S-expression),
    ; returning the evaluated the second element if the first evaluates to true
    ; continues until a selection is made, `otherwise` is reached or no 
    ; selection is made which result in an `error`.
    select
        { (== n 0) 0 }
        { (== n 1) 1 }
        { otherwise (+ (fib (- n 1)) (fib (- n 2))) }
})
; Create list of numbers and apply `fib` to each element
; Yielding a new list
(print (map fib {0 1 2 3 4 5 6 7 8 9}))
# Builds with bpt
bpt build -t build.yaml -o build
./build/bin/lispy ./examples/fib.lpy
{0 1 1 2 3 5 8 13 21 34}

Credit

Lispy is built from the language created by Daniel Holden in his Build Your Own Lisp Book/Blog. Most of the design of this implementation reflects that of the source code in his implementation. If you are interesting in creating your own programming language or even just learning C, I highly recommend giving it a read.

Pong

Simple Pong game written in C++ using SFML, Crank and built using Meson. This project is pretty hacky and mostly serves as a project to test the usage of the Crank state framework.

Screen Shots

Main Game

Main game screenshot

Start Screen

Start screen screenshot

Main Game Start

Main game, round start screenshot

Pause Menu

Pause menu screenshot

Controls Menu

Control menu screenshot

SV

SV is a simple sorting visualizer programming using C++20 and SFML. Users can run many different sorting algorithms with randomly generated starting values. It is built using C++, bpt and SFML.

Supported sorting algorithms

The included sorting algorithms in SV are:

  • Bubble sort

  • Bubble sort II

  • Bucket sort

  • Counting sort

  • Insertion sort

  • Introsort

  • Heapsort

  • Mergesort

  • Pancake sort

  • Quicksort

  • Radix sort

  • Selection sort

  • Shellsort

  • Timsort

  • SV - GitHub