Skip to content

Instantly share code, notes, and snippets.

View Mesabloo's full-sized avatar
🦐

Mesabloo Mesabloo

🦐
  • France
View GitHub Profile
@vanaur
vanaur / Makefile
Last active September 13, 2022 18:09
Generic makefile for C projects that follow the "app" + "include" + "source" configuration.
# Defines which shell command to use to clean the terminal, depending on the platform.
ifeq ($(OS), Windows_NT)
# Clean on Windows
clean_cmd = @del /s /q *.o > null
else
# Clean on UNIX systems
clean_cmd = @rm -f *.o
endif
# A recursive function that allows to list all files with a given extension, in folders and sub-folders, from a given source.
@felko
felko / Main.hs
Last active May 27, 2020 00:49
linear lambda calculus typechecker
{-# LANGUAGE
LambdaCase
, OverloadedLists
, OverloadedStrings
, RecordWildCards
, BlockArguments
, DeriveFunctor
, TypeApplications
, GeneralizedNewtypeDeriving
#-}
@felko
felko / adt.py
Last active April 1, 2020 18:26
#!/usr/bin/env python3.7
# coding: utf-8
import types
import functools
import abc
import typing
from contextlib import contextmanager
from collections import OrderedDict
@cheery
cheery / LAM.hs
Created August 2, 2019 10:51
Linear abstract machine interpreter steps in Haskell
-- The linear abstract machine
-- as described in the "The Linear Abstract Machine"
-- Environment is a representation of a canonical combinator
-- the canonical combinator u ⊗ v is represented by Ja, and 1 by Nil
-- the canonical combinator y ∘ v represented by Comb: y is piece of code.
--
-- Code is list of primitive instructions.
--
-- Sequential composition becomes concatenation (in opposite order),
@mikesmullin
mikesmullin / x86-assembly-notes.md
Last active June 22, 2025 19:15
Notes on x86-64 Assembly and Machine Code

Mike's x86-64 Assembly (ASM) Notes

Assembling Binary Machine Code

Operating Modes:

These determine the assumed/default size of instruction operands, and restricts which opcodes are available, and how they are used.

Modern operating systems, booted inside Real mode,