Skip to content

Instantly share code, notes, and snippets.

@intsuc
intsuc / tick_order.md
Last active September 14, 2020 15:22
work in progress

Tick Order

version

Icons

⏲ push profiler
⏱ increment counter
@intsuc
intsuc / .md
Last active August 2, 2020 01:17

Nested calls as contexts

  • fibonacci
    • Set fibonacci to F(n)
  • ackermann
    • Set ackermann to A(m, n)
  • call
    1. Push ctx
    2. Call the function with tag
    3. Pop ctx
@intsuc
intsuc / items.json
Created July 14, 2020 15:27
20w28a
{
"values": [
"minecraft:air",
"minecraft:stone",
"minecraft:granite",
"minecraft:polished_granite",
"minecraft:diorite",
"minecraft:polished_diorite",
"minecraft:andesite",
"minecraft:polished_andesite",

mcfunction

#> is_nan
scoreboard players operation is_nan!1 _ += is_nan!1 _
execute store result score is_nan _ if score is_nan!1 _ matches -16777214..-2
#> eq
(define-sort Int32 () (_ BitVec 32))
(declare-const a Int32)
(declare-const b Int32)
(declare-const two-pow (Array Int32 Int32))
(assert (= (select two-pow #x00000000) #b00000000000000000000000000000001))
(assert (= (select two-pow #x00000001) #b00000000000000000000000000000010))
(assert (= (select two-pow #x00000002) #b00000000000000000000000000000100))
(assert (= (select two-pow #x00000003) #b00000000000000000000000000001000))
(assert (= (select two-pow #x00000004) #b00000000000000000000000000010000))
@intsuc
intsuc / stccn.pdf
Last active June 29, 2020 13:54
A note on simply typed closure calculus with names
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@intsuc
intsuc / .md
Last active February 5, 2021 13:13

monomorphic accessors

@intsuc
intsuc / .md
Last active June 14, 2020 10:50

source

foo  = λx.0
bar  = λx.λs.λy.(x + (s y))
main = bar 1 foo 2

tagged

foo  = λ⁰x.0
@intsuc
intsuc / .md
Last active June 10, 2020 13:38
command block chain using a function tag
  • ==> a : unconditional
  • >=> a : conditional
scoreboard objectives add _ dummy
gamerule maxCommandChainLength 2
function #execute
{
"values": [
"pre_main",
"main",
"post_main"
]
}