[go: nahoru, domu]

Skip to content

Instantly share code, notes, and snippets.

@travisallison
travisallison / hvm3_atomic_linker.md
Created November 2, 2024 21:44 — forked from VictorTaelin/hvm3_atomic_linker.md
HVM3's Optimal Polarized Atomic Linker

HVM3's Optimal Atomic Linker (with Polarization)

Atomic linking is at the heart of HVM's implementation: it is what allows threads to collaborate towards massive parallelism. All major HVM versions started with a better atomic linker. From slow, buggy locks (HVM1), to AtomicCAS (HVM1.5), to AtomicSwap (HVM2), the algorithm became simpler and faster over the years.

On the initial HVM3 implementation, I noticed that one of the cases on the atomic linker never happened. After some reasoning, I now understand why, and

@travisallison
travisallison / materials.md
Created October 31, 2024 03:04 — forked from VictorTaelin/materials.md
materials

Company:

Theory:

@travisallison
travisallison / dps_sup_nodes.md
Created August 30, 2024 20:56 — forked from VictorTaelin/dps_sup_nodes.md
Accelerating Discrete Program Search with SUP Nodes

Accelerating Discrete Program Search

I am investigating how to use Bend (a parallel language) to accelerate Symbolic AI; in special, Discrete Program Search. Basically, think of it as an alternative to LLMs, GPTs, NNs, that is also capable of generating code, but by entirely different means. This kind of approach was never scaled with mass compute before - it wasn't possible! - but Bend changes this. So, my idea was to do it, and see where it goes.

Now, while I was implementing some candidate algorithms on Bend, I realized that, rather than mass parallelism, I could use an entirely different mechanism to speed things up: SUP Nodes. Basically, it is a feature that Bend inherited from its underlying model ("Interaction Combinators") that, in simple terms, allows us to combine multiple functions into a single superposed one, and apply them all to an argument "at the same time". In short, it allows us to call N functions at a fraction of the expected cost. Or, in simple terms: why parallelize when we can sha

@travisallison
travisallison / fast_dps_add_carry.md
Created August 4, 2024 01:37 — forked from VictorTaelin/fast_dps_add_carry.md
Fast Discrete Program Search with HVM Superpositions (SUP nodes) - finding ADD-CARRY

HOC's Fast Discrete Program Search (DPS)

HOC will soon (EOY?) launch an API for our DPS solution. The interface will be simple:

  • You give us a set of examples (input/output pairs)

  • We'll give you a (Python?) function that models it

And that's it. It will be an universal function finder.

@travisallison
travisallison / hoc_historical_overview.md
Created July 20, 2024 04:47 — forked from VictorTaelin/hoc_historical_overview.md
Higher Order Company: Complete Historical Overview - WIP

Higher-Order Company: Complete Historical Overview

This document is a complete historical overview of the Higher Order Company. If you want to learn anything about our background, a good way to do so is to feed this Gist into an AI (like Sonnet-3.5) and ask it any question!

My Search for a Perfect Language

It all started around 2015. I was an ambitious 21-year-old CS student who, somehow, had been programming for the last 10 years, and I had a clear goal:

I want to become the greatest programmer alive

@travisallison
travisallison / CoC.ml
Created December 28, 2023 21:31 — forked from hirrolot/CoC.ml
How to implement dependent types in 80 lines of code
type term =
| Lam of (term -> term)
| Pi of term * (term -> term)
| Appl of term * term
| Ann of term * term
| FreeVar of int
| Star
| Box
let unfurl lvl f = f (FreeVar lvl)
@travisallison
travisallison / CoC.ml
Created December 28, 2023 21:31 — forked from hirrolot/CoC.ml
Barebones lambda cube in OCaml
(* The syntax of our calculus. Notice that types are represented in the same way
as terms, which is the essence of CoC. *)
type term =
| Var of string
| Appl of term * term
| Binder of binder * string * term * term
| Star
| Box
and binder = Lam | Pi
@travisallison
travisallison / with-editor-debug.txt
Created December 21, 2016 00:48
Output from M-x with-editor-debug
with-editor: /home/travis/.emacs.d/elpa/with-editor-20161201.925/with-editor.el
emacs: /usr/local/bin/emacs (24.5.1)
system:
system-type: gnu/linux
system-configuration: x86_64-unknown-linux-gnu
system-configuration-options:
server:
server-running-p: nil
server-process: #<process server>
server-use-tcp: t