- How to Cross Compile LLVM: https://llvm.org/docs/HowToCrossCompileLLVM.html
- Building LLVM with CMake: https://llvm.org/docs/CMake.html
- Hints from wasi-sdk Makefile: https://github.com/CraneStation/wasi-sdk/blob/master/Makefile
- Try compiling natively (needed for llvm-tblgen and clang-tblgen)
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;WebAssembly" -DLLVM_ENABLE_PROJECTS="lld;clang" ../llvm
- Try building LLVM with WASI:
- cmake -G Ninja -DCMAKE_AR=”/usr/local/google/home/binji/dev/llvm-project/build/bin/llvm-ar” -DCMAKE_RANLIB=”/usr/local/google/home/binji/dev/llvm-project/build/bin/llvm-ranlib” -DCMAKE_C_COMPILER="/usr/local/google/home/binji/dev/wasi-sdk-5.0/opt/wasi-sdk/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/google/home/binji/dev/wasi-sdk-5.0/opt/wasi-sdk/bin/clang++" -DCMAKE_CROSSCOMPILING=True -DCMAKE_INSTALL_PREFIX=/usr/local/google/home/binji/dev/wasi-clang -DLLVM_TABLEGEN=/usr/local/google/home/binji/dev/llvm-project/build/bin/llvm-tblgen -DCLANG_TABLEGEN=/
| #![allow(clippy::identity_op)] | |
| #![allow(dead_code)] | |
| #![allow(non_snake_case)] | |
| use std::collections::{hash_map, HashMap}; | |
| use std::collections::hash_map::DefaultHasher; | |
| use std::hash::{Hash, Hasher}; | |
| use rand::prelude::*; | |
| use std::time::Instant; |
This Gist provides a solution to periodically capture screenshots of your Mac, and create therefrom a searchable PDF archive so that you can always get an answer to the “what, when, and where” questions about your usages.
To use these scripts:
- Download the shell script
rewind, then:- put it under
~/bin(or other fixed path you prefer); - execute
- put it under
| // Copy-paste into your console (or minify and save as a bookmarklet) to see any DOM in an almost-sorta-working 3D stack of DOM elements. | |
| // The front faces are colored for debugging, if this gist can be fixed, they can return to their normal styling. | |
| (function () { | |
| const MAX_ROTATION = 180; | |
| const DEPTH_INCREMENT = 25; | |
| const PERSPECTIVE = 1000; | |
| const SIDE_FACE_CLASS = 'side-face'; | |
| const MAX_DOM_DEPTH = getMaxDepth(document.body); | |
| // Calculate color based on depth, ensuring lighter colors for deeper elements |
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
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:| import Control.Monad (forM_) | |
| import Data.Char (chr, ord) | |
| import Debug.Trace | |
| import Prelude hiding (LT, GT, EQ) | |
| import System.Environment (getArgs) | |
| import System.Exit (exitFailure) | |
| import Text.Parsec ((<|>)) | |
| import qualified Data.Map.Strict as M | |
| import qualified Text.Parsec as P |
| => | |
| |% | |
| +$ ulam | |
| $~ [%coin *coin] | |
| :: leaves | |
| :: | |
| $% [%coin =coin] :: atom, noun, or compound coin | |
| [%path =pith] :: hoon path syntax | |
| [%page =mark noun=*] :: %foo|bar, bar is coin blob | |
| :: |
The Interaction Calculus (IC) is term rewriting system inspired by the Lambda Calculus (λC), but with some major differences:
- Vars are affine: they can only occur up to one time.
- Vars are global: they can occur anywhere in the program.
- There is a new core primitive: the superposition.
An IC term is defined by the following grammar: