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
let number-regexp = | |
do | |
hex-digit := "[0-9a-fA-F]" | |
bin-digit := "[01]" | |
oct-digit := "[0-7]" | |
fn re-or (...) | |
let result = | |
.. "(" | |
va-lifold "" | |
inline (index _. value computed-result) |
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
using import enum | |
@@ memo | |
inline member-typeof (T member) | |
let result = | |
static-if ((T < Struct) or (T < CStruct)) | |
field-count := (countof T) | |
let result = | |
va-lfold none | |
inline (_ignore value computed-result) |
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
fn test-color (style-kind) | |
let style-code = (default-styler style-kind "") | |
let styled-name = (default-styler style-kind (style-kind as string)) | |
let color-code = | |
do | |
let code = (lslice style-code ((countof style-code) - (countof "\x1b[0m"))) | |
match code | |
case "\x1b\[30m" | |
0 | |
case "\x1b[31m" |
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
local filename = arg[1] | |
local output = | |
[[ | |
using import struct | |
struct FNTCharInfo plain | |
id : i32 | |
x : i32 | |
y : i32 | |
width : i32 | |
height : i32 |
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
local field = {} | |
local field_width = 10 | |
local field_height = 10 | |
local field_position_x = 100 | |
local field_position_y = 100 | |
local n_mines = 15 | |
local size_square = 30 | |
local start_time = 0 | |
local play_time = 0 | |
local is_game_over = false |
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
# | |
in: console VRAM | |
320x240 palletized pixel data | |
16-color (subject to change) pallete in RGB 24-bit format | |
using import glsl | |
using import glm | |
#shader constants | |
let +palette-width+ = 4 |
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
include | |
(import sokol) | |
""""#define SOKOL_NO_ENTRY | |
#define SOKOL_IMPL | |
#define SOKOL_GLCORE33 | |
#include "include/sokol/sokol_app.h" | |
#include "include/sokol/sokol_gfx.h" | |
include | |
(import C) |
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
#!/usr/bin/lua | |
expr = io.read() | |
--tokenize | |
tokens = {} | |
local current_number = nil |
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
#!/bin/fish | |
#wmctrl returns a list of windows with their ids as hexadecimal. | |
set -l XEPHYR_WINDOW_ID (wmctrl -l | grep "Xephyr on :1.0" | grep -Eo "0x[0-9a-f]+") | |
set -l CURRENT_WINDOW_ID (xdotool getactivewindow) | |
xdotool windowfocus $XEPHYR_WINDOW_ID; | |
sleep 0.25s; | |
xdotool key ctrl+shift key super+ctrl+r key ctrl+shift; | |
sleep 0.25s; |
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
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\1\1\1\1\0\0ÇA\0\0\0\0\0\0\0?\0\0\0\0\1\1\1\1\0\0\0B\0\0\0\0\0\0\0?\0\0\0\0\1\1\1\1\0\0@B\0\0\0\0\0\0\0?\0\0\0\0\1\1\1\1\0\0ÇB\0\0\0\0\0\0\0?\0\0\0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