I hereby claim:
- I am truemedian on github.
- I am truemedian (https://keybase.io/truemedian) on keybase.
- I have a public key whose fingerprint is 2A0C 4D18 4D78 9EA1 171E EF5A 3961 06B2 BBCB 929F
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
local uv = require 'uv' | |
local bit = require 'bit' | |
-- Generates cryptographically secure integers in the range [min, max). | |
function math.uvrandom(min, max) | |
assert(min, 'expected lower bound') | |
assert(max, 'expected upper bound') | |
assert(max > min, 'expected max > min') | |
local range = max - min | |
local ffi = require 'ffi' | |
local bit = require 'bit' | |
local clock_gettime | |
if ffi.os == 'Windows' then | |
local UNIX_TIME_START = 0x019DB1DED53E8000LL | |
local TICKS_PER_SECOND = 10000000LL | |
ffi.cdef [[ |
$ zig build d01 -Drelease-fast | |
Benchmark File: | |
Time: 0s 0ms 261us 0ns | |
Memory: 0MB 4KB 96B | |
Benchmark Input: | |
Time: 0s 0ms 1us 600ns | |
Memory: 0MB 0KB 0B | |
Benchmark Part 1 & 2: |
#!/usr/bin/env bash | |
RUN_SESSION_NAME="discord" | |
RUN_COMMAND="./luvit bot" | |
RUN_ERRLOG="./stderr.log" | |
if [ -z $TMUX ]; then | |
if ! command -v tmux >/dev/null; then | |
echo "fatal: tmux not installed" | |
exit 1 |
local fs = require 'fs' | |
local json = require 'json' | |
local Database = {} | |
Database.__index = Database | |
function Database.load(path) | |
local self = setmetatable({}, Database) | |
self.path = path |
#!/bin/bash | |
base="$PWD" | |
file="$PWD/version.md" | |
git clone https://github.com/luvit/lit | |
git clone https://github.com/luvit/luvi | |
echo "" >$file |
local ffi = require 'ffi' | |
local Mutex = {} | |
Mutex.__index = Mutex | |
if ffi.abi('win') then | |
-- trust me on these, we treat CRITICAL_SECTION like an opaque pointer. | |
local sizeof_critical_section = ffi.abi('32bit') and 24 or 40; | |
local libc = ffi.load('msvcrt') |
local ffi = require 'ffi' | |
local fs = require 'fs' | |
local Process = {} | |
Process.__index = Process | |
if ffi.abi('win') then | |
local psapi = ffi.load('psapi') | |
ffi.cdef [[ |