Skip to content

Instantly share code, notes, and snippets.

View retokromer's full-sized avatar
💭
My research assistant was raped to death during the October pogrom.

רטו\רעטאָ\רֵיטוֹ • Reto retokromer

💭
My research assistant was raped to death during the October pogrom.
View GitHub Profile
@retokromer
retokromer / ackermann_stack.c
Last active April 12, 2020 12:31
Ackermann function computed with stack simulation
/*
* Copyright (c) 2020 by Reto Kromer
*
* Ackermann function:
*
* A(0,n) = n+1
* A(m,0) = A(m-1,1) if m > 0
* A(m,n) = A(m-1,A(m,n-1)) if m > 0 and n > 0
*
* where m and n are non-negative integers
@retokromer
retokromer / ackermann_recursive.c
Last active April 12, 2020 12:30
Ackermann function computed recursively
/*
* Copyright (c) 2020 by Reto Kromer
*
* Ackermann function:
*
* A(0,n) = n+1
* A(m,0) = A(m-1,1) if m > 0
* A(m,n) = A(m-1,A(m,n-1)) if m > 0 and n > 0
*
* where m and n are non-negative integers
@retokromer
retokromer / Basilisk_II_Compilation.md
Last active May 26, 2019 13:50
Basilisk II Compilation

Basilisk II Compilation

On macOS

You need cvs, autoconf and automake. If you don’t have them installed yet, then you can install them e.g. via Homebrew:

brew install cvs
brew install autoconf
brew install automake
@retokromer
retokromer / Fuji3513.cube
Last active February 17, 2018 14:16
3D log LUT for Fuji 3513 film stock
TITLE "Generate by Resolve"
LUT_3D_SIZE 33
0.0000000000 0.0000000000 0.0117650000
0.0039220000 0.0000000000 0.0117650000
0.0078430000 0.0000000000 0.0117650000
0.0156860000 0.0039220000 0.0156860000
0.0196080000 0.0078430000 0.0156860000
0.0274510000 0.0117650000 0.0156860000
0.0352940000 0.0156860000 0.0156860000
@retokromer
retokromer / Kodak2383.cube
Last active February 17, 2018 14:15
3D log LUT for Kodak 2383 film stock
TITLE "Generate by Resolve"
LUT_3D_SIZE 33
0.0000000000 0.0000000000 0.0000000000
0.0039220000 0.0000000000 0.0039220000
0.0117650000 0.0000000000 0.0039220000
0.0196080000 0.0039220000 0.0078430000
0.0274510000 0.0078430000 0.0078430000
0.0352940000 0.0156860000 0.0078430000
0.0431370000 0.0196080000 0.0117650000
@retokromer
retokromer / txt_output.asm
Created January 3, 2017 11:41
Display the byte in A (8-bit value) in hex form. AF will be corrupt at exit.
.txt_output equ &bb5a
.print_hex_byte
push af
rrca
rrca
rrca
rrca
call print_byte_digit
pop af
@retokromer
retokromer / Привет_Марс
Created November 26, 2016 16:45
«Hello, Mars!» in Рапира, a procedural programming language from the USSR (implemented e.g. on Агат-9, an Apple II clone).
ПРОЦ СТАРТ()
ВЫВОД: 'Привет, Марс!'
КОН ПРОЦ
@retokromer
retokromer / signature.p6
Created January 15, 2016 13:39
Testing signature
use v6;
my @array = (0, 1, 1, 2, 3, 5, 8, 13);
for @array -> $x {
say $x;
}
@retokromer
retokromer / Ackermann.p6
Created December 20, 2015 11:01
Some more Perl 6 testing.
use v6;
say 'Ackermann function: A(m,n)';
print 'Enter m = ';
my $M = $*IN.get;
print 'Enter n = ';
my $N = $*IN.get;
sub A($m, $n) {
$m == 0 ?? $n + 1 !!
@retokromer
retokromer / Lazy_Fibonacci.p6
Created December 20, 2015 10:43
Testing Perl 6
use v6;
print 'Fibonacci number: ';
for $*IN.get {
my @fib = 1, 1, *+* ... *;
say "Fibonacci number #$_ is @fib[$_-1]";
}