This file contains 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
#![feature(bench_black_box)] | |
use std::ptr::{read, write}; | |
use std::hint::black_box; | |
use std::mem::size_of; | |
use std::any::Any; | |
trait Animal: Any { | |
fn say(&self) -> &'static str; | |
fn name(&self) -> &'static str; |
This file contains 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
from tonsdk.boc import Builder, Cell, begin_dict | |
from tonsdk.utils import Address | |
import threading | |
import traceback | |
import hashlib | |
import base64 | |
import sys | |
This file contains 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
# Hell is Game Theory Folk Theorems | |
# https://www.lesswrong.com/posts/d2HvpKWQ2XGNsHr8s/hell-is-game-theory-folk-theorems | |
import random | |
import math | |
def minimize(prev_list, prev_temp): | |
return 30 |
This file contains 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
import { Address, beginCell, Cell, Dictionary, Contract, ContractProvider, contractAddress, Slice, TupleBuilder, toNano } from "ton-core"; | |
import { compileFunc } from '@ton-community/func-js'; | |
import { Blockchain } from "@ton-community/sandbox"; | |
const stdlib_fc_code = ` | |
;; Standard library for funC | |
;; | |
{- | |
# Tuple manipulation primitives |
This file contains 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
;; my_addr(MYADDR) get_jwa_method_id(103289) args(2) master_code ret(1) master_data | |
;; RUNVM +1 +4 +32 | |
;; address exitcode c4' c5' | |
slice vm::invoke_get_addr(cell master_code, cell master_data) asm | |
"MYADDR // mc md my_addr" | |
"103829 PUSHINT // mc md my_addr get_jwa_method_id" | |
"2 PUSHINT // mc md my_addr get_jwa_method_id args" | |
"2 3 BLKSWAP // my_addr get_jwa_method_id args mc md" | |
"1 PUSHINT // my_addr get_jwa_method_id args mc md ret" |