Skip to content

Instantly share code, notes, and snippets.

View kivikakk's full-sized avatar
🐰

Asherah Connor kivikakk

🐰
View GitHub Profile
function ZZZ -d "multi-host rebuilder"
# Multi-host Nix rebuilder.
# Force a rebuild on targets even if a new version wasn't pulled.
set -f force 0
if test "$argv[1]" = -f
set -f force 1
set -e argv[1]
end
function vyxnix -d "vyxos nix3 launcher"
# Principal nix3 launcher.
#
# "develop" and "shell" are treated specially:
# vyxnix develop -> nix develop --command fish
# vyxnix develop x y z -> nix develop x y z --command fish
# vyxnix develop x -- y z -> nix develop x --command fish -c "y z"
# vyxnix develop x --command y z -> nix develop x --command y z
# "d/s" below refers to these cases.
#
a: 8 bit address
i: 3 bit input address
o: 3 bit output address
v: 1 bit value
@kivikakk
kivikakk / (:.rs
Last active March 24, 2023 08:51
pub fn rtrim_slice_a(i: &[u8]) -> &[u8] {
let mut len = i.len();
while len > 0 && isspace(i[len - 1]) {
len -= 1;
}
&i[..len]
}
pub fn rtrim_slice_b(mut i: &[u8]) -> &[u8] {
let mut len = i.len();

Dawnscape - Xacla

(lyrics sampled from Neverland by Central Seven)

Don't make a sound all around
Silence is everywhere
Fills in the clouds

There is a way across the time
Future is coming up

tapioca ~/C/s/jekyll $ bundle exec jekyll new --force --skip-bundle .
bundle install
New jekyll site installed in /Users/kameliya/Code/scratch/jekyll.
Bundle install skipped.
The dependency tzinfo (~> 1.2) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency wdm (~> 0.1.1) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x8
; Function Attrs: nobuiltin nounwind sspstrong
define internal fastcc i16 @main.0(%std.builtin.StackTrace* nonnull %0) unnamed_addr #1 !dbg !1611 {
Entry:
%StackGuardSlot = alloca i8*, align 8
%1 = call i8* @llvm.stackguard()
call void @llvm.stackprotector(i8* %1, i8** %StackGuardSlot)
%result = alloca i16, align 2
%sub_var = alloca %S, align 8
%2 = alloca %S, align 8
call void @llvm.dbg.declare(metadata %S* bitcast ({ { { i32, [4 x i8] }, i1, [7 x i8] } }* @59 to %S*), metadata !1615, metadata !DIExpression()), !dbg
tapioca ~/C/s/z/se (master|…) $ ~/Code/zig/build/bin/zig build-exe example.zig
tapioca ~/C/s/z/se (master|…) $ lldb example
(lldb) target create "example"
Current executable set to '/Users/kameliya/Code/snep/zy/se/example' (x86_64).
(lldb) run
Process 61165 launched: '/Users/kameliya/Code/snep/zy/se/example' (x86_64)
hi
hi
hi
Process 61165 stopped
fn cpuid(leaf_id: u32) [16]u8 {
var result: [16]u8 = undefined;
asm volatile (
\\ cpuid
\\ movl %%eax, 0(%[leaf_ptr])
\\ movl %%ebx, 4(%[leaf_ptr])
\\ movl %%ecx, 8(%[leaf_ptr])
\\ movl %%edx, 12(%[leaf_ptr])
:

Brian, the Formula 1 Grand Prix is currently less interesting than the video game that's based on it. The cars go round in a circle, they get Murray Walker off the ceiling. The race itself is a procession! You can't get past! The car in front at the beginning wins the race! The whole thing is decided by who's going to have a pit stop! They're the fastest cars on earth and the key element, Brian, is not racing, it's parking!