Skip to content

Instantly share code, notes, and snippets.

View sunny-g's full-sized avatar

Sunny Gonnabathula sunny-g

View GitHub Profile
@VictorTaelin
VictorTaelin / todays_refactor_kind2_sonnet.md
Last active August 7, 2024 15:57
Today's Kind2 refactor by Sonnet 3.5 - 1 hour of work

good morning! I'd like to ask your help factoring some Kind2 files. it is a proof lang like the CoC, very minimal. I just want to change the style of global definitions. please cat the from_to.txt file I just wrote

Good morning! I'd be happy to help you with factoring your Kind2 files. Let's start by looking at the contents of the from_to.txt file you've written.

'''sh
cat from_to.txt
'''
# OLD STYLE:
@python273
python273 / jitvis.py
Last active July 25, 2024 22:56
TinyJit vis WIP
from tinygrad import Tensor, TinyJit, nn
from tinygrad.helpers import JIT
from tinygrad.nn.optim import SGD
from tinygrad.nn.state import get_parameters
class TinyNet:
def __init__(self):
self.l1 = nn.Linear(784, 128, bias=False)
self.l2 = nn.Linear(128, 10, bias=False)
Urbit, as it lives and breathes
Segment 1: Bootstrapping
Urbit should be the easiest place to write any application. Excluding applications that require high performance, shrubbery already makes this very close to true. It needs a little more love and sanding down rough edges, but it’s extremely close
Result: The namespace is alive
Segment 2a: The “maximalism” in namespace maximalism
The most annoying part of working with Urbit is getting data in and out of the system. The solution to this is simple: Put everything inside the system. If all the data you could possibly want is bound somewhere, then a significant number of things we currently consider “applications” simply become transformations over the namespace. Moreover, this opens up the possibility of no-code shrubs because if the data already exists, then the necessity of marshaling shenanigans is a lot lower. We should leverage the network topology and provide stars incentives to republish data from the outside into their namespace.
Metabolized: Zapi
@OrionReed
OrionReed / dom3d.js
Last active December 9, 2025 17:22
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@Artefact2
Artefact2 / README.md
Last active December 11, 2025 15:06
GGUF quantizations overview
@gngchrs
gngchrs / compose.yaml
Last active April 8, 2025 07:31
Ollama Web UI and Tailscale with https. The config file below goes in your config/config.json. Once you have these files do `docker compose up` and go to `https://ollama-ui.<tailnet>.ts.net. First request will take a little longer to load`
services:
ts-ollama-ui:
image: tailscale/tailscale:latest
container_name: ts-ollama-ui
hostname: ollama-ui # http://ollama-ui.<tailnet>.ts.net
extra_hosts:
- "host.docker.internal:host-gateway" # important for ollama web ui to communicate with ollama running locally
environment:
- TS_AUTHKEY=<YOUR_OAUTH_KEY / YOUR_AUTH_KEY >
- "TS_EXTRA_ARGS=--advertise-tags=tag:container --reset" ## only needed if you use YOUR_OAUTH_KEY with owner tags
@Quodss
Quodss / urwasm.md
Last active November 2, 2024 06:54

urwasm: WebAssembly interpreter suite on Urbit


WebAssembly is a low-level language for a portable virtual machine. Wasm is designed to be a compilation target for a variety of programming languages and its design is hardware independent and relatively simple, making its support ubiquitous in modern browsers. Its simple design made it a perfect first candidate for a first emulator of an conventional computational system on a novel functional computer: Urbit. In this paper I discuss the current state of urwasm project and some technical details, as well as describe the strategy to jet the interpreter of a state machine in a functional environment.


Introduction

@VictorTaelin
VictorTaelin / sat.md
Last active October 16, 2025 10:51
Simple SAT Solver via superpositions

Solving SAT via interaction net superpositions

I've recently been amazed, if not mind-blown, by how a very simple, "one-line" SAT solver on Interaction Nets can outperform brute-force by orders of magnitude by exploiting "superposed booleans" and optimal evaluation of λ-expressions. In this brief note, I'll provide some background for you to understand how this works, and then I'll present a simple code you can run in your own computer to observe and replicate this effect. Note this is a new observation, so I know little about how this algorithm behaves asymptotically, but I find it quite

@VictorTaelin
VictorTaelin / itt-coc.ts
Last active January 26, 2025 18:02
ITT-Flavored Calculus of Constructions Type Checker
// A nano dependent type-checker featuring inductive types via self encodings.
// All computation rules are justified by interaction combinator semantics,
// resulting in major simplifications and improvements over old Kind-Core.
// Specifically, computable annotations (ANNs) and their counterpart (ANN
// binders) and a new self encoding based on equality (rather than dependent
// motives) greatly reduce code size. A more complete file, including
// superpositions (for optimal unification) is available on the
// Interaction-Type-Theory repository.
// Credits also to Franchu and T6 for insights.
@Quodss
Quodss / urwasm-todo.md
Last active September 10, 2024 02:41
urwasm TODO

Interpreter in Hoon

  • Change memory model: random access via (map page-number=@ page-array=@)
  • Revisit the model of block/loop/if and call/call_indirect execution: it appears that the current model causes unnecessary copies of the entire membuffer, slowing down the computation. So instead of cloning the core, interpreting an expression and back-propagating changes in the global state, I need to call an evaluating arm that will edit the global state in-place
  • Cache function fetching:
    • Have a gate fetch-operation within apply-instruction that takes term of an instruction as an argument and returns a number of operands to be consumed and a gate to be applied to the immediate arguments and consumed operands
    • Cache that gate
    • Fetching gate and operation gates must be defined outside of hwasm core
    • Use four letters for operators (shoudld speed things up since 4 letter term is a direct atom)
  • Floating point: verify roundings and such (iirc they are different in Wasm spec an