This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env rust-script | |
//! | |
//! Implements a tail-calling interpreter in Rust. | |
//! | |
// Ideally we would create a State struct to hold the state variables and pass that along, | |
// but the compiler won't pass it through registers. We also can't use a macro to avoid | |
// repeating all the registers, as this would | |
// We want the dispatch table, program counter and vm state to be passed in registers as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S deno run --allow-read --allow-env --allow-net | |
// Note: Deno is almost self-contained, but you need to create a deno.json file to make it work. | |
// This file should contain `{"nodeModulesDir": "none"}` | |
import { MetaTransactionData, OperationType } from 'npm:@safe-global/types-kit' | |
import SafeApiKit from 'npm:@safe-global/api-kit' | |
import Safe from 'npm:@safe-global/protocol-kit' | |
const chainId: bigint = 480n // World Chain | |
const provider = 'https://worldchain-mainnet.g.alchemy.com/public' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S uv run --script | |
# /// script | |
# dependencies = [ | |
# ] | |
# /// | |
# <https://gist.github.com/recmo/af5935fc8a40c54050a691301eaacdaa> | |
import random | |
import time | |
def miller_rabin(candidate, repeats=128): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object "Claim" { | |
code { | |
datacopy(0, dataoffset("Runtime"), datasize("Runtime")) | |
return(0, datasize("Runtime")) | |
} | |
object "Runtime" { | |
code { | |
// Memory layout | |
// 0..192: ModExp precompile calldata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load using the following command in SageMath: | |
# | |
# load("https://gist.githubusercontent.com/recmo/6393218cab40baa78e44766772d1ec34/raw/GaloisRing.sage") | |
# | |
# Get the latest version from https://gist.github.com/recmo/6393218cab40baa78e44766772d1ec34 | |
from sage.structure.richcmp import richcmp | |
class GaloisRingElement(CommutativeRingElement): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){window.renderMath=function(){renderMathInElement(document.body,{delimiters:[{left:'$$',right:'$$',display:true},{left:'$',right:'$',display:false}],throwOnError:false});};if(!window.katex){css=document.createElement('link');css.rel='stylesheet';css.href='https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css';css.crossorigin='anonymous';script=document.createElement('script');script.src='https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js';script.async=false;script.crossorigin='anonymous';copyTex=document.createElement('script');copyTex.src='https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/copy-tex.min.js';copyTex.async=false;copyTex.crossorigin='anonymous';autoRender=document.createElement('script');autoRender.src='https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js';autoRender.async=false;autoRender.onload=window.renderMath;autoRender.crossorigin='anonymous';document.head.appendChild(css);document.head.appendChild(script);document.head.appendChild(copyTe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DUP2 899407 | |
PUSH1 718627 | |
PUSH2 718557 | |
ADD 686328 | |
JUMPDEST 573198 | |
POP 457984 | |
JUMPI 436369 | |
MSTORE 328876 | |
SWAP1 326765 | |
MLOAD 315104 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![cfg(all(target_arch = "aarch64", target_feature = "sha3"))] | |
use core::arch::asm; | |
const RC: [u64; 24] = [ | |
0x0000000000000001, | |
0x0000000000008082, | |
0x800000000000808a, | |
0x8000000080008000, | |
0x000000000000808b, | |
0x0000000080000001, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony. | |
The following are my contribution signatures: | |
Circuit: semaphore16 | |
Contributor # 250 | |
Hash: c293791b 1806dea5 2b5eb5df 876a8690 | |
1bd6fd3b 642e1193 066254c2 53932eb5 | |
53e990b7 6dd80e26 a5b9e65e f8fd90b7 | |
94a06997 000dc2ad 4e4032f1 a87718fc | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[book] | |
authors = ["Remco Bloemen"] | |
language = "en" | |
multilingual = false | |
src = "src" | |
[build] | |
create-missing = false | |
[preprocessor.html] |
NewerOlder