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
import { ml_kem1024 } from '@noble/post-quantum/ml-kem.js'; | |
//import { randomBytes } from '@noble/post-quantum/utils.js'; | |
function stringToUint8Array(inputString) { | |
// Use TextEncoder to encode the string into a Uint8Array | |
const encoder = new TextEncoder(); | |
return encoder.encode(inputString); | |
} | |
const myString = 'û黤¼S¨rW÷nè/8T[ÍÊ3¢½¿1ÏüìÔ8_ÒZ~tô4±ZËkì¥'; //41 |
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
require "http/server" | |
require "base64" | |
# require "yaml" | |
# data = <<-YAML | |
# --- | |
# multi line string: ''' | |
# one line | |
# second line | |
# third line |
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
require "json" | |
# Remember depth and key's name of JSON object | |
class GlobalContext | |
property global_context = {} of Float32 => String | Int32 | Float64 | JSON::Any | |
property key_or_value = {} of String => String | |
def start(parsed) | |
global_context[0.0] = parsed.first_key | |
# https://crystal-lang.org/api/1.16.3/Enumerable.html#each%28%26%3AT-%3E%29-instance-method |
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
mklink /d "C:\Users\pszen\AppData\Local\.dartServer" "D:\AppData\Local\.dartServer" |
To coś ma podobno pomóc przyszłym twórcom piszącym rozszerzenia do Ardoongi.
Ostrzeżenie: Istnieją minimum 4 grupy ludzi.
- Ci którzy mają pomysł na swój świat i spisują go w Wielkiej Księdze Zasad.
- Ci którzy nie mają dobrych pomysłów, więc wolą skopiować gotowe rozwiązanie na nowe urządzenia.
- Gracze.
- I Ci którzy myślą sobie tak:
- Skoro gracze fabularni i mechaniczni mogą żyć obok siebie.
Zawsze uważałem, że Twine ma najlepszy format plików opowieściowych. Więc kiedy zachciało mi się zrobić coś w stylu retro lochów. Powstało takie coś.
extern char* word[] = {
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
module Main | |
let log = (b: Number, x: Number) => { | |
for (let mut i = 0; i < 1000; i += 1) { | |
if (b ** i == x) return i | |
} | |
return 0 | |
} | |
print(log(2, 16)) |
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
@[Link("iwasm")] | |
lib LibWasm | |
struct WASMModuleCommon | |
buffer : UInt8* | |
binary_file : UInt32 | |
io_error : LibC::Char* | |
io_error_bytesize : UInt32 | |
end | |
struct WASMModuleInstanceCommon |
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
run = "crystal run main.cr" | |
# crystal build main.cr --cross-compile --target wasm32-unknown-wasi | |
# wasm2wat main.wasm -o main.wat | |
## wasm2c main.wasm --no-debug-names -o main.c | |
## gcc -O3 -march=native -c main.c -o main.o | |
entrypoint = "main.cr" | |
[nix] | |
channel = "stable-23_11" |
NewerOlder