Skip to content

Instantly share code, notes, and snippets.

@s5bug
s5bug / 0_initial_brainstorming.md
Last active February 3, 2025 19:10
Hex Casting compiler ideas

Basic Control Flow

Given an arbitrary program:

@main def lcm(a: Int, b: Int): Int =
  if(a < b) (a * (b / gcd(b, a))
  else (b * (a / gcd(a, b))

def gcd(a: Int, b: Int): Int =
  if(b == 0) a
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active April 21, 2025 09:48
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@molpopgen
molpopgen / cppbinary.cc
Last active February 20, 2024 06:33
Basics of binary I/O in C++
/*
Example of how to write binary stuff in C++
Illustrates some of the various quirks/annoyances
*/
#include <iostream>
#include <fstream>
#include <string>
#include <vector>