Skip to content

Instantly share code, notes, and snippets.

View LucasWolschick's full-sized avatar
🏃‍♂️

Lucas W. LucasWolschick

🏃‍♂️
View GitHub Profile
@LucasWolschick
LucasWolschick / lisp.py
Created June 8, 2024 19:21
Lisp but none of the fun parts
from dataclasses import dataclass
from typing import Literal
type LeftParen = Literal["("]
type RightParen = Literal[")"]
type Number = int
type Token = LeftParen | RightParen | NumberLiteral | Identifier | Def | Eof | If | StringLiteral | LogicLiteral
@dataclass
@LucasWolschick
LucasWolschick / brainfuck.c
Created March 12, 2022 21:34
brainfuck interpreter written in C
// Lucas Wolschick (C) 2022
// You should probably not use this as this has not been tested
// Usage: brainfuck [file]
//
// Try it with this code (available at en.wikipedia.org/wiki/Brainfuck, not mine!)
// ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
@LucasWolschick
LucasWolschick / tictactoe.rs
Created October 11, 2020 18:43
Very ugly implementation of a tic tac toe game in Rust
use std::io::Write;
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
enum Tile {
X,
O,
Empty,
}
impl Tile {