Skip to content

Instantly share code, notes, and snippets.

View wezm's full-sized avatar

Wesley Moore wezm

View GitHub Profile
@snej
snej / missing_includes.rb
Created October 2, 2023 16:19
Script to find missing std #includes in C++ headers
#! /usr/bin/env ruby
#
# missing_includes.rb
# By Jens Alfke <jens@couchbase.com>
# Version 2.0 -- 2 Oct 2023
# Copyright 2021-Present Couchbase, Inc.
#
# This script scans C++ header files looking for usage of common standard library classes, like
# `std::vector`, without including their corresponding headers, like `<vector>`. It similarly looks
# for standard C functions like `strlen` that are used without including their header (`<cstring>`.)
@NovaAndrom3da
NovaAndrom3da / template.py
Last active September 8, 2023 03:46
chimera-linux/cports: rust-nightly
pkgname = "rust-nightly"
pkgver = "1.72.0"
pkgrel = 0
hostmakedepends = [
"cmake",
"curl",
"pkgconf",
"python",
"llvm-devel",
"llvm-tools",
@brendanzab
brendanzab / bidir-stlc.rs
Last active June 21, 2023 07:18
Bidirectional type checker for a simple functional language, in Rust
//! Bidirectional type checker for a simple functional language
use std::rc::Rc;
#[derive(Clone, PartialEq, Eq)]
enum Type {
Bool,
Int,
Fun(Rc<Type>, Rc<Type>),
}
@elfmimi
elfmimi / README.md
Created February 3, 2023 14:58
Old patch for OpenSK targeting Raytac MDBT50Q-RX dongle

Old patch for OpenSK targeting Raytac MDBT50Q-RX dongle

The revision I tried was the Initial commit (f91d2fd) .

OpenSK is using Tock as one of its submodules.

So you need to clone OpenSK and its submodules recursively.

After you have cloned it successfully, you should be able to find this directory.

@bramus
bramus / bookmarklet.md
Last active August 3, 2023 16:56
Mastodon User Page Bookmarklet
@TOTBWF
TOTBWF / MicroTT.ml
Last active November 30, 2022 05:29
A simple single-file elaborator for MLTT
(** Core Types *)
module Syntax =
struct
type t =
| Local of int
| Hole of string
| Let of string * t * t
| Lam of string * t
| Ap of t * t
| Pair of t * t

So it's been a while since I set up a #FreeBSD desktop from scratch, and things have gotten easier? :rising-intonation: :confused-dog-face: Curious? Read on!

Maybe I overcomplicated things last time (you can see the script here https://bit.ly/freebsd-bootstrap), it seems some steps are now redundant. Anyway, here's the simplest way I know to get a capable desktop system set up.

I'm doing this on an M1 Mac with VMware Fusion Tech Preview and FreeBSD 13.1-RELEASE. After (or during) install create a user and add it to the groups video, wheel and operator with

% pw usermod $USER -G wheel,operator,video
(** {0 An implementation of a small dependently typed language}
This is an implementation simple dependently typed language where types are
first-class and where the output types of functions may depend on the inputs
supplied to them.
Type checking is is implemented in terms of an {i elaborator}, which checks
and tanslates a user-friendly {i surface language} into a simpler and more
explicit {i core language} that is more closely connected to type theory.
Because we need to simplify types during elaboration we also implement an
require "open-uri"
r = -> { URI(_1).read }
post_dates = r.("https://daringfireball.net/archive/")
.scan(%r{<small>(.+?)</small>})
.map { |(x)| Date.parse(x.gsub("&nbsp;", " ")) }
link_dates = r.("https://daringfireball.net/linked/")
.scan(%r{href="(.+?/linked/20\d\d/.+?)"})
@grahamperrin
grahamperrin / freebsd-wifi-adaptors.md
Last active May 4, 2024 13:35
FreeBSD: Wi-Fi: suggested adaptors

FreeBSD: Wi-Fi: suggested adaptors

There are numerous suggestions, I'm not yet aware of any other collection.

If the list below grows to become useful, someone might like to adapt its content for the FreeBSD wiki.

Suggestions, in chronological order

https://forums.freebsd.org/posts/381779 (2018-03-17)