Skip to content

Instantly share code, notes, and snippets.

View femtomc's full-sized avatar
🍳
Let them cook.

McCoy R. Becker femtomc

🍳
Let them cook.
View GitHub Profile
@femtomc
femtomc / privacy-policy.md
Created November 24, 2025 05:39
Privacy Policy for GitHub PR Assistant GPT

Privacy Policy for noface

Last Updated: November 24, 2025

Overview

This custom GPT ("noface") is a personal tool that integrates with GitHub via OAuth to create pull requests on repositories owned by the authenticated user.

Data Collection

@femtomc
femtomc / icp.mojo
Created June 6, 2025 13:29
Mojo parse failure
from gpu import thread_idx, block_idx, warp, barrier
from gpu.host import DeviceContext, DeviceBuffer, HostBuffer
from gpu.memory import AddressSpace
from memory import stack_allocation
from layout import Layout, LayoutTensor
from math import sqrt
from sys import sizeof
from algorithm import parallelize
alias float32 = DType.float32
[[package]]
name = "absl-py"
version = "1.2.0"
description = "Abseil Python Common Libraries, see https://github.com/abseil/abseil-py."
category = "main"
optional = false
python-versions = ">=3.6"
[[package]]
name = "alabaster"
@femtomc
femtomc / CollapsingTowers.scala
Created July 30, 2022 21:19 — forked from TiarkRompf/CollapsingTowers.scala
compilation by interpreting* staged interpreters
/* collapsing multiple levels of interpreters */
object TestMeta3 {
abstract class Exp
case class Lit(n:Int) extends Exp
case class Sym(s:String) extends Exp
case class Var(n:Int) extends Exp
case class App(e1:Exp, e2:Exp) extends Exp
case class Lam(e:Exp) extends Exp
# Recursively wraps function calls with the below generated function call and inserts the context argument.
function remix!(ir, hooks = false)
pr = IRTools.Pipe(ir)
new = argument!(pr)
for (v, st) in pr
ex = st.expr
ex isa Expr && ex.head == :call && begin
if !(ex.args[1] isa GlobalRef && (ex.args[1].mod == Base || ex.args[1].mod == Core))
args = copy(ex.args)
ex = Expr(:call, :remix!, new, ex.args...)
@femtomc
femtomc / interactive.sh
Last active May 13, 2020 14:43
A command line tool for watching Julia src and executing arbitrary files.
#!/usr/bin/env julia
# Check if Revise is installed.
using Pkg
try
Pkg.status("Revise")
catch e
error("\n\033[0;31mRevise not installed to your global environment. Please install Revise.\033[0m\n\033[0;32mUse 'using Pkg; Pkg.add(\"Revise\")' at REPL.\033[0m\n")
end
using Revise
module ReverseModeADwithContexts
using Cassette
Cassette.@context J; # J is the notation for the function which generates pullbacks (the lambda terms you see below)
# Equivalent to gradient tape.
mutable struct ReverseTrace
gradient_tape::Array{Function, 1}
ReverseTrace() = new([])
-- Autodiff using algebraic effects
-- Simple reverse mode with a gradient tape
use .base
ability Differentiable where
cos : Float -> Float
sin : Float -> Float
exp : Float -> Float