Skip to content

Instantly share code, notes, and snippets.

View theoparis's full-sized avatar

Theo Paris theoparis

View GitHub Profile
@theoparis
theoparis / readme.md
Last active July 13, 2025 01:20
Why Java Build Systems Suck

Gradle

  • Slow af
  • Causes issues with java functionality such as shutdown hooks
  • Tries to fetch a java runtime every time you open a project (which may not even run, e.g. on NixOS)
  • Can't build java code from source or patch existing software (causes JVM class loading errors with dependencies such as asm)

Maven

  • Slow af
  • Can't build java code from source or patch existing software (causes JVM class loading errors with dependencies such as asm)
@theoparis
theoparis / main.rs
Created July 10, 2025 08:57
Rust program that runs ffmpeg and generates a cursed video from the specified binary file
use std::fs::metadata;
use std::process::Command;
use std::f64;
fn main() {
let program_path = std::env::args().nth(1).unwrap_or_else(|| {
"/Applications/Ghostty.app/Contents/MacOS/ghostty".to_string()
});
let file_size = metadata(&program_path)
@theoparis
theoparis / log.txt
Created July 2, 2025 08:25
JJThunder To The Max errors on 1.21.5
[01:22:41] [Render thread/ERROR]: Carver: Failed to parse either. First: Not a string: {"air":["minecraft:cave","minecraft:cave_extra_underground","minecraft:canyon"]}; Second: Failed to parse either. First: Not a json array: {"air":["minecraft:cave","minecraft:cave_extra_underground","minecraft:canyon"]}; Second: Input does not contain a key [type]: MapLike[{"air":["minecraft:cave","minecraft:cave_extra_underground","minecraft:canyon"]}]
[01:22:41] [Render thread/ERROR]: Carver: Failed to parse either. First: Not a string: {"air":["minecraft:cave","minecraft:cave_extra_underground","minecraft:canyon"]}; Second: Failed to parse either. First: Not a json array: {"air":["minecraft:cave","minecraft:cave_extra_underground","minecraft:canyon"]}; Second: Input does not contain a key [type]: MapLike[{"air":["minecraft:cave","minecraft:cave_extra_underground","minecraft:canyon"]}]
[01:22:41] [Render thread/ERROR]: Carver: Failed to parse either. First: Not a string: {"air":["minecraft:cave","minecraft:cave_extra_unde
@theoparis
theoparis / default.nix
Created June 2, 2025 02:52
useWildLinker (WIP)
{
pkgs ? import ../nixpkgs { },
}:
let
lib = pkgs.lib;
# N.B. Keep in sync with default arg for stdenv/generic.
defaultMkDerivationFromStdenv =
stdenv:
(import ../nixpkgs/pkgs/stdenv/generic/make-derivation.nix {
@theoparis
theoparis / bionic-cmake.patch
Last active March 29, 2025 02:40
Android bionic cmake build patch
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..de6f6c9
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,33 @@
+cmake_minimum_required(VERSION 4.0)
+
+set(CMAKE_DISABLE_SOURCE_CHANGES ON)
+set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
@theoparis
theoparis / luau.scm
Created November 24, 2024 08:38
ugh
(define-module (luau-package))
(use-modules
(guix packages)
(guix download)
(guix build-system cmake)
(guix licenses)
(gnu packages cmake)
(gnu packages pkg-config)
(gnu packages ninja)
@theoparis
theoparis / configure.nu
Created November 16, 2024 05:56
llvm configuration script
(
cmake
-B build
-G Ninja
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-S llvm
-DHAVE_CXX_ATOMICS_WITHOUT_LIB=ON
-DHAVE_CXX_ATOMICS64_WITHOUT_LIB=ON
-DLLVM_USE_SPLIT_DWARF=ON
-DLLVM_CCACHE_BUILD=ON
@theoparis
theoparis / llvm.nix
Last active October 15, 2024 07:27
llvm-project git build with nix (without runtimes, clangir enabled, using mold as the linker)
{
src,
targets ? "host",
projects ? "clang;lld;mlir;libc",
stdenv,
cmakeMinimal,
ninja,
python313,
mold,
}:
@theoparis
theoparis / line.glsl
Created July 11, 2024 05:14
wavy aah line shader with glslViewer
// vim:ft=glsl
uniform float u_time;
uniform vec2 u_resolution;
float line(vec2 p, vec2 a, vec2 b) {
vec2 a2b = b - a;
vec2 a2p = p - a;
float h = clamp(dot(a2p,a2b) / dot(a2b,a2b), 0.0, 1.0);
vec2 p1 = mix(a, b, h);
@theoparis
theoparis / renderer.rs
Created July 10, 2024 03:16
Rusty renderer
use std::collections::HashSet;
use anyhow::{Context as _, Result};
use raw_window_handle::{HasDisplayHandle as _, HasWindowHandle as _};
use vulkanalia::{
loader::{LibloadingLoader, LIBRARY},
vk::{
self, DeviceV1_0 as _, Handle as _, HasBuilder, InstanceV1_0 as _,
KhrSurfaceExtension, KhrSwapchainExtension, PolygonMode,
},