Skip to content

Instantly share code, notes, and snippets.

View tom-huntington's full-sized avatar

tom-huntington

View GitHub Profile
@tom-huntington
tom-huntington / porth-idea.md
Last active October 21, 2021 04:51
Meta Macros in Porth

As the macro system has become so fundamental to Porth, Alexey sould double down with meta macros.

Meta macros would expand generators, providing similar functionality to while loops but for macros.

New keywords gen and meta would be introduced, and intrinsic generator iota:

gen enum_names A B C end

meta 
macro enum_names iota end
@tom-huntington
tom-huntington / std::execution.md
Last active July 3, 2022 02:35
How connect works for senders/receivers
@tom-huntington
tom-huntington / buffer_until.md
Last active July 21, 2022 21:24
RxCpp-v3 adaptor

Concepts

struct observable {
    void bind(observer);
};

struct observer {
    template<class T>
    void next(T);
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tom-huntington
tom-huntington / ScaleAction.ipynb
Created October 29, 2022 02:36
minimal reproducible example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Knowing when you don't need correctness is very expensive for developer productivity.

Skipping corners, not verifying correctness is necessary for productivity. There are multiple levels of correctness. Rubbish > Does Something > Reasonable > Justified > Correct > Omniscient optimal. The level of correctness needs to be observable.

Only Program what is minimally sufficient

Most of the time you programme more specific results than you actually need. Don't do this

Programming is an empirical discipline

Writing correct code the first time is economically unviable.

@tom-huntington
tom-huntington / python_notes.md
Last active December 25, 2023 01:54
Notes on 4HbQ's aoc solutions

complex for 2 vectors

Arithmatic operations broadcast unlike tuples

>>> complex(1,1) + complex(2,-2)
(3-1j)

Associative array :: T -> int

Use index/find on list or string

@tom-huntington
tom-huntington / haskell_state_monad.md
Last active December 30, 2022 23:11
Notes on state monad
@tom-huntington
tom-huntington / Create-o7-app.md
Last active March 13, 2023 22:36
Just noob questions
@tom-huntington
tom-huntington / script.py
Created August 29, 2023 10:04
files by chapter concatenated to chapterized file
import subprocess
import os
import re
def make_chapters_metadata(list_mp4: list):
print(f"Making metadata source file")
chapters = {}
for single_mp4 in list_mp4:
number = single_mp4.removesuffix(".m4a")