Processing power is a foundation of human development.
-
build the fastest processor ever made.
-
ship chips more powerful than any GPU chip shipped.
$ chatsh | |
Welcome to ChatSH. Model: claude-3-5-sonnet-20240620 | |
$ i have a single self-contained main.hs file inside a Rust project. how can I ask it to compile/build/install the file under the 'kindc' name on the terminal when the user does cargo install --path .? the conventional way | |
To integrate a Haskell file into a Rust project and compile it when running `cargo install --path .`, you can use a build script. Here's how to set it up: | |
```sh | |
echo 'fn main() { | |
println!("cargo:rustc-env=KINDC_PATH={}", std::env::current_dir().unwrap().join("kindc").display()); | |
std::process::Command::new("ghc") |
// This file enumerates `Tree -> Tree` functions, where: | |
// data Tree = (C Tree Tree) | L | |
// It works by creating a superposed tree of all algorithms with a given | |
// pattern-match count. For example, for count=0, we create: | |
// λt (t | |
// // case C: | |
// λx λy | |
// #0{ | |
// (C <var> <var>) |
// Types | |
// ----- | |
// Type ::= | |
// | (Fun inp out) // ∀inp out | |
// | (Par fst snd) // [fst&snd] | |
// | (Eit fst snd) // [fst|snd] | |
// | Uni // ⊤ | |
// Term ::= |
# Elementary Affine Calculus | |
# ========================== | |
# Types | |
# ----- | |
type Term | |
= (Lam bod) | |
| (App fun arg) | |
| (Box val) |
// ~~~~~~~~~~~~~~~~~~~~~~ Optlam.js ~~~~~~~~~~~~~~~~~~~~~~
// An optimal λ-calculus normalizer written in JavaScript.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Optlam.js is a simple, optimal (in Levy's sense) λ-calculus evaluator using
// interaction nets. It is, currently, as far as I know, the fastest
// implementation of functions in the world. It uses Lamping's Abstract
// Algorithm - that is, the so called (and problematic) "oracle" is avoided
#!/bin/bash | |
# Find all hvm processes and extract their PIDs | |
pids=$(ps aux | grep hvm | grep -v grep | awk '{print $2}') | |
# Check if any hvm processes were found | |
if [ -z "$pids" ]; then | |
echo "No hvm processes found." | |
else | |
# Forcefully kill each hvm process |
// Fast block-local prefix-sum on CUDA, using warp-syncs. | |
// The input is an array of u32. It is mutated in place. Example: | |
// arr = [1,1,1,1,...] | |
// Becomes: | |
// arr = [1,2,3,4,...] | |
// The number of elements must be equal to threads per block (TPB). | |
#include <stdio.h> | |
#include <cuda_runtime.h> |
Bring yourself online, center yourself, focus, surpass your limits right here right now. | |
The user will query a <problem> </problem> containing the argument to call the function provided below. | |
def feeltheagi(problem): | |
""" | |
Recursively apply the A::B rewrite rules to the given problem string. | |
The rewrite rules are: | |
A# #A ... becomes ... nothing |