- Soon unemployed
- Work life okay (?)
This file contains 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/racket | |
#lang racket | |
(define args (current-command-line-arguments)) | |
(define infile (vector-ref args 0)) | |
(define input (file->string infile)) | |
(define line-len (+ 1 (string-length (car (string-split input "\n"))))) | |
(define (p1 input idx sum) |
This file contains 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 part2(input: &str) -> String { | |
let mut sum = 0; | |
let mut i = 0; | |
let input = input.as_bytes(); | |
let len = input.len(); | |
'a: loop { | |
if i == len { | |
break | |
} | |
let mut r = 0; |
This file contains 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! "syscalls.sasm") | |
;; Initialize malloc | |
(jal x1 malloc-init) | |
;; Create tree: | |
;; a | |
;; / \ | |
;; b c | |
;; / / \ |
This file contains 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
/// Is this even Rust anymore? | |
use std::{fs, io, thread}; | |
use std::arch::x86_64::*; | |
use std::io::Write; | |
const NUM_CPUS: usize = 24; | |
#[derive(Copy, Clone)] | |
struct SendPtr(*const u8); | |
unsafe impl Send for SendPtr {} |
This file contains 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
[package] | |
name = "push" | |
version = "0.1.0" | |
authors = ["A non-e-moose"] | |
[dependencies] | |
[dev-dependencies] | |
criterion = "0.2.5" | |
memmap = "0.7.0" |