Skip to content

Instantly share code, notes, and snippets.

View iacore's full-sized avatar

iacore

View GitHub Profile
@iacore
iacore / main.c
Last active October 12, 2023 09:53 — forked from sogaiu/main.c
sh/exec-slurp via janet_dostring (assuming spork is installed)
// build:
//
// gcc -O0 -g main.c -I$HOME/.local/include -L$HOME/.local/lib -ljanet
// run:
//
// export LD_LIBRARY_PATH=$HOME/.local/lib
// ./a.out
#include "janet.h"
@iacore
iacore / testimg.nim
Created June 30, 2022 09:40 — forked from demotomohiro/testimg.nim
Realtime pixel drawing
import std/[strformat, strutils, bitops]
import pixie, chroma
# define `nort` when opengl or windows system is not available.
when not defined(nort):
import nimgl/[glfw, opengl]
proc `{}`(image: var Image, x, y: int): var ColorRGBX =
## Accessing any pixels outside the bounds of the image is error
when not defined(danger):