I hereby claim:
- I am sleibrock on github.
- I am sleibrock (https://keybase.io/sleibrock) on keybase.
- I have a public key whose fingerprint is 1406 3C8D 0ADD C7DB 2CC0 467B 36D7 98FF F8C6 90B9
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
fn solution(num: i32) -> i32 { | |
let mut acc = 0; | |
for x in 0..num { | |
match (x % 3, x % 5) { | |
(0, 0) => acc += x, | |
(0, _) => acc += x, | |
(_, 0) => acc += x, | |
_ => {} | |
} | |
} |
Using these maps to host a killing floor 2 server
kf_westlondon https://steamcommunity.com/sharedfiles/filedetails/?id=733191110&searchtext=
kf_manor https://steamcommunity.com/sharedfiles/filedetails/?id=682290186&searchtext=
unsigned char iter; | |
for(unsigned int y=0; y < h; y++) | |
{ | |
for(unsigned int x=0; x < w; x++) | |
{ | |
iter = 0; | |
z_re = 0; | |
z_im = 0; | |
z_re2 = 0; | |
z_im2 = 0; |
# character thing | |
weight_table = [ | |
(100, "Humans"), | |
(50, "Elves"), | |
(25, "Dragonborn"), | |
(20, "Changeling"), | |
] | |
def create_roll_table(): |
#lang racket/base | |
#| | |
String -> Procedure | |
A way to convert a Racket string into a procedure object. | |
This is done by hot-code evaluation. Since there's no built-in | |
method to convert anything to a procedure other than defining | |
the procedure itself, this lets us check if a string is indeed |
#!/usr/bin/env python | |
from math import cos, pi, sqrt | |
from itertools import product | |
test_matrix = [[90, 100], [100, 105]] | |
def dct(lst): | |
if len(lst) == 0: |
#lang racket/base | |
(define (start-bot) | |
(subprocess #f #f 'stdout | |
(find-executable-path "ssh") | |
"-p 2022" | |
"-o SetEnv TERM=bot" | |
"bot@0.0.0.0")) |
//! GNU Cat replacement, but with Zig I guess | |
/// -- made with love from @sleibrock | |
/// | |
/// Exists as a proof of concept of general C-like programming using Zig. | |
/// Compiles to about 62kb compared to GNU/cat's 39kb. | |
/// @requires "zig-0.8.1" | |
const std = @import("std"); | |
const io = std.io; | |
const fs = std.fs; |
#lang racket/base | |
; for-syntax means importing bindings for the macro-level generation phase | |
(require (for-syntax racket/syntax racket/base racket/string) | |
(only-in racket/string string-join string-split) | |
(only-in racket/port port->lines)) | |
(define-syntax (defrec stx) | |
(syntax-case stx () | |
[(_ id col-headers (fields ...) delim) |