Skip to content

Instantly share code, notes, and snippets.

GregTech 5U :: Deuterium-Tritium Fusion Cycle

Ingredients

Deuterium

2000L of Hydrogen can be produced by electrolyzing 3000L of Water at 30 EU/t (LV) taking 100s (2000 ticks). This consumes 60,000 EU per 2,000L so 30 EU/L.

@depressed-pho
depressed-pho / mmap-with-hint.c
Last active February 17, 2022 07:47
NetBSD: hinted mmap(2) without MAP_FIXED gives up too early
% uname -a
NetBSD yukari.cielonegro.org 9.2 NetBSD 9.2 (GENERIC) #1: Wed Nov 24 12:01:38 JS
T 2021 [email protected]:/home/pho/sysbuild/amd64/obj/usr/src/sys/arch/
amd64/compile/GENERIC amd64
% ./a.out
page size: 4096 octets
length: 4096000 octets
mmap #0 succeeded: got 0x40000000
mmap #1 succeeded: got 0x3fc18000
mmap #2 succeeded: got 0x3f830000
@depressed-pho
depressed-pho / Makefile
Last active January 15, 2023 15:15
Binutils 2.39 on NetBSD-current
gnu-stack: merged.o
cc -o $@ merged.o
@{ readelf -e $@ | grep -A1 GNU_STACK; } || echo " $@ has no .note.GNU-stack"
merged.o: main.o sub.o sub2.o
ld -r -o $@ main.o sub.o sub2.o
@{ readelf -e $@ | grep -A1 GNU-stack; } || echo " $@ has no .note.GNU-stack"
.s.o:
cc -o $@ -c $<
@depressed-pho
depressed-pho / Makefile
Last active April 14, 2024 04:13
I thought there was an issue in TLS handling but it doesn't reproduce with this code...
.PHONY: run
run: dlopen-tls-test libtls.so
./dlopen-tls-test
.PHONY: clean
clean:
rm -f dlopen-tls-test *.so
dlopen-tls-test: main.c
cc -o $@ main.c