An aggressively minimized, bootable NixOS ISO, continuing where natkr's "NixOS but smol" left off. The post took a stock minimal ISO from 458 MiB → 183 MiB. This takes that 183 MiB result and pushes it much further while keeping it a real NixOS system that boots to an autologin root shell.
This file contains hidden or 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
| diff --git a/cc_core.c b/cc_core.c | |
| index 1890595..cddb43b 100644 | |
| --- a/cc_core.c | |
| +++ b/cc_core.c | |
| @@ -273,13 +273,16 @@ void function_call(struct token_list* s, int is_function_pointer) | |
| emit_push(REGISTER_BASE, "Protect the old base pointer"); | |
| emit_push(REGISTER_LOCALS, "Protect the old locals pointer"); | |
| - emit_move(REGISTER_TEMP, REGISTER_STACK, "Copy new base pointer"); | |
| - |
This file contains hidden or 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/env nix-shell | |
| #! nix-shell -i bash --pure | |
| #! nix-shell -p qemu gcc "pkgsCross.mips-linux-gnu.stdenv.cc" "pkgsCross.mips-linux-gnu.stdenv.cc.libc.static" "pkgsCross.s390x.stdenv.cc" "pkgsCross.s390x.stdenv.cc.libc.static" | |
| #! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/ac62194c3917d5f474c1a844b6fd6da2db95077d.tar.gz | |
| # Big-endian testing with QEMU user-mode emulation and Nix cross-compilers. | |
| # Reproduces: https://www.hanshq.net/big-endian-qemu.html | |
| set -euo pipefail |
This file contains hidden or 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
| { lib ? (import <nixpkgs> {}).lib }: | |
| with lib; | |
| let | |
| # Fourth-order Runge-Kutta method | |
| rk4 = f: x0: y0: z0: h: | |
| let | |
| k1_y = z0; | |
| k1_z = f x0 y0 z0; |
This file contains hidden or 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
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| /** | |
| * @title Owner | |
| * @dev Set & change owner | |
| */ | |
| contract Owner { |
This file contains hidden or 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
| ((\f. (\x. (f \v. ((x x) v)) \x. (f \v. ((x x) v))) \r. \n. i(n,o,m(n,(r d(n))))) x) |
This file contains hidden or 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
| -- Call-by-value lambda calculus in cool | |
| (* | |
| data Expr = Var Str | |
| | Abs Str Expr | |
| | App Expr Expr | |
| | Sub1 Expr | |
| | Mul Expr Expr | |
| | Add Expr Expr | |
| | Ifz Expr Expr Expr | |
| *) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| {-# LANGUAGE ConstraintKinds #-} | |
| {-# LANGUAGE DeriveFunctor #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE OverlappingInstances #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| module ExtALaCarte where |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder