Skip to content

Instantly share code, notes, and snippets.

View lenary's full-sized avatar

Sam Elliott lenary

View GitHub Profile
@timothyham
timothyham / ipv6guide.md
Last active July 2, 2024 20:49
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

Introduction

This document provides a detailed exploration of how C++ standard library headers are used when building, testing, and using the LLVM libc++ library. It covers the different types of headers involved, the main header layouts used, and the importance of include paths and how they are constructed. It also dives into the specific include paths used in key scenarios on Linux and Apple platforms. The goal is to explain the key concepts and complexities around libc++ headers to support informed decision making about the library's header layout.

The Headers

There are several types of headers involved in the libc++ library:

@rrika
rrika / unscramble.py
Created September 5, 2023 20:54
ME: please show me the tweets in the order that they were liked COMPUTER: thats too hard. heres some tweets i think are good.
class Node:
capacity = 10
def __init__(self, index, count):
self.index = index
self.count = count
self.children = []
def __iter__(self):
return iter(self.children)
def __len__(self):
return len(self.children)
@Endilll
Endilll / clang+gcc+xcode.txt
Last active July 25, 2023 13:22
C++ compiler version history
Clang GCC Xcode
2023.03.17 16.0.0
2022.09.06 15.0.0
2022.03.25 14.0.0
2021.10.04 13.0.0
2021.06.01 9.4
2021.04.14 12.0.0
2020.10.12 11.0.0
2020.03.24 10.0.0
2020.03.04 8.4
@abey79
abey79 / dpx2x00.toml
Last active November 28, 2021 22:50
Roland DPX-2x00 config for vpype
# Notes from https://webmanual.rolanddg.com/contents/manuals/DPX-3700A+2700A_USE_E_R8.pdf
# * we use the default "DPX" origin system
# * paper_size: set to value from the X/Y columns (p.17)
# * for A3+ (where Xmm is paper long edge in mm and Ymm is paper short edge in mm):
# - x_range = (-Xmm * 20 - 480, Xmm * 20 - 480)
# - y_range = (-Ymm * 20, Ymm * 20
# * for A4:
# - x_range = (-Xmm * 20, Xmm * 20)
# - y_range = (-Ymm * 20 - 480, Ymm * 20 - 480)
# * origin_location: set to (-LLx, URy) from table on p. 17

Monads and delimited control are very closely related, so it isn’t too hard to understand them in terms of one another. From a monadic point of view, the big idea is that if you have the computation m >>= f, then f is m’s continuation. It’s the function that is called with m’s result to continue execution after m returns.

If you have a long chain of binds, the continuation is just the composition of all of them. So, for example, if you have

m >>= f >>= g >>= h

then the continuation of m is f >=> g >=> h. Likewise, the continuation of m >>= f is g >=> h.

Foreward

This document was originally written several years ago. At the time I was working as an execution core verification engineer at Arm. The following points are coloured heavily by working in and around the execution cores of various processors. Apply a pinch of salt; points contain varying degrees of opinion.

It is still my opinion that RISC-V could be much better designed; though I will also say that if I was building a 32 or 64-bit CPU today I'd likely implement the architecture to benefit from the existing tooling.

Mostly based upon the RISC-V ISA spec v2.0. Some updates have been made for v2.2

Original Foreword: Some Opinion

The RISC-V ISA has pursued minimalism to a fault. There is a large emphasis on minimizing instruction count, normalizing encoding, etc. This pursuit of minimalism has resulted in false orthogonalities (such as reusing the same instruction for branches, calls and returns) and a requirement for superfluous instructions which impacts code density both in terms of size and

@JMichaelTX
JMichaelTX / JXA Resources.md
Last active June 1, 2024 17:33
JavaScript for Automation (JXA) Resources

JXA Resources

Revised: 2019-11-28 16:16 GMT-6

JXA

This is a list of the key resources I have found useful. If you know of others, please post in a comment below, and I will add to this list.

I have tried to order this list in the order that, to me, is best for learning JXA from scratch. We all learn a bit diferently, so adjust to suit your style/needs. Please post if you have suggestions on learning JXA.

module Main
import Prelude.Algebra
record GCounter : Type where
MkGCounter : (value : Nat) -> GCounter
gcjoin : GCounter -> GCounter -> GCounter
gcjoin l r = (MkGCounter (maximum (value l) (value r)))