Skip to content

Instantly share code, notes, and snippets.

View appcypher's full-sized avatar
:octocat:
What's up?

Stephen Akinyemi appcypher

:octocat:
What's up?
View GitHub Profile
@appcypher
appcypher / crystal_compiler_types_and_methods.txt
Created October 26, 2017 00:05 — forked from asterite/crystal_compiler_types_and_methods.txt
All types and methods instantiated when compiling the Crystal compiler
This file has been truncated, but you can view the full file.
|=== <Program> ===|
#__crystal_get_exception(Pointer(LibUnwind::Exception))
#__crystal_malloc(UInt32)
#__crystal_malloc_atomic(UInt32)
#__crystal_personality(Int32, LibUnwind::Action, UInt64, Pointer(LibUnwind::Exception), Pointer(Void))
#__crystal_raise(Pointer(LibUnwind::Exception))
#__crystal_raise_string(Pointer(UInt8))
#__crystal_realloc(Pointer(Void), UInt32)
#__crystal_sigfault_handler(Int32, Pointer(Void))
#_fiber_get_stack_top()
@appcypher
appcypher / Link.md
Last active November 18, 2018 12:20
Link
@appcypher
appcypher / libwasmer.py
Created January 10, 2019 14:52
Speculative Example in Python Using Ctypes
from ctypes import cdll, c_int, c_uint, c_void_p, CFUNCTYPE
# Load library and get library
lib = cdll.LoadLibrary('./libwasmer.so')
# Get compile function
compile = lib.compile
compile.restype = c_void_p # vmctx_addr
# NOTE: Ideally we will pass import objects
@appcypher
appcypher / syscall.wast
Created January 30, 2019 15:26
A syscall webassembly example
(module
(type $t1 (func (param i32)))
(type $t2 (func (param i32 i32 i32) (result i32)))
(type $t3 (func (param i32) (result i32)))
(type $t4 (func (param i32 i32) (result i32)))
(func $putchar (import "env" "putchar") (type $t1))
(func $printf (import "env" "printf") (type $t4))
(func $sys_open (import "env" "sys_open") (type $t2))
(func $sys_read (import "env" "sys_read") (type $t2))
(func $sys_close (import "env" "sys_close") (type $t3))
@appcypher
appcypher / wire.md
Last active February 26, 2019 11:52
Wire

POST /api/incidents

{
    "subject": "incident payload",
    "description": "kernjgknejrngkjerngnkre",
    "location": {
        "name": "herer",
        "centre": "ewfewf",
        "country": "eferf"
@appcypher
appcypher / latex-test.md
Last active June 10, 2019 12:59
Latex Test
GIF

SVG
@appcypher
appcypher / ai-path.md
Last active June 12, 2019 10:30
The AI Journey

PROBABILITY

Case Study:

  • A cinema contains 100 people.
  • 50 men and 50 women.
  • 25 women have long hair.
  • 2 men have log hair.
@appcypher
appcypher / unicode-math.md
Last active June 10, 2019 19:22
Unicode Math

Unicode Math Experiment

@appcypher
appcypher / small.md
Last active September 16, 2019 18:31

Test

Test

Test

Test

Test

@appcypher
appcypher / echo.wat
Created October 9, 2019 11:30
WASI WAT EXAMPLES
(module
(import "wasi_unstable" "fd_write" (func $fd_write (param i32 i32 i32 i32) (result i32)))
(import "wasi_unstable" "fd_read" (func $fd_read (param i32 i32 i32 i32) (result i32)))
(memory 10)
(export "memory" (memory 0))
;; prompt __wasi_ciovec_t struct
(data (i32.const 0) "\08\00\00\00") ;; buf: pointer to prompt string
(data (i32.const 4) "\02\00\00\00") ;; buf_len: 2 characters