Skip to content

Instantly share code, notes, and snippets.

@Tpaefawzen
Tpaefawzen / 20250729--grass.txt
Created July 29, 2025 09:16
Idea of compiling Grass esolang
T is unsigned integers type
Program ::= /* */ | Program Cmd
Var = Local T | Param T | Globl T | Wtf
App = [2]Var
Abs = struct { args: T; len: T; body: [len]App; }
Cmd = App | Abs
In var union, T indicates 0-indexed variable index
@Tpaefawzen
Tpaefawzen / 34-asm.c
Created July 26, 2025 08:03
Inline assembly for AArch64 in C program when you want to call system call on Linux
static
long long os_write(long long fd, void *buf, long long len) {
register long long x0 __asm__("x0") = fd;
register long long x1 __asm__("x1") = (long long)buf;
register long long x2 __asm__("x2") = len;
register long long x8 __asm__("x8") = 64;
__asm__ volatile (
"svc 0"
: "+r"(x0)
: "r"(x1), "r"(x2), "r"(x8)
@Tpaefawzen
Tpaefawzen / README.md
Created May 15, 2025 11:47
The UNBAPTIZED programming language implementation in Python 3
.Dd May 25, 2023
.Dt CONVX2J.SH 1
.Os ShellShoccar-jpn/Parsrs
.
.Sh 名前
.Nm convx2j.sh
.Nd XPath-valueテキストをJSONPath-valueに変換
.
.Sh 書式
.Nm
@Tpaefawzen
Tpaefawzen / malbolge.zig
Created May 11, 2025 06:14
Ben Olmstead's Malbolge language (1998) implementation in Zig language; kinda translated C implementation into Zig
const std = @import("std");
pub const xlat1 =
"+b(29e*j1VMEKLyC})8&m#~W>qxdRp0wkrUo[D7,XTcA\"lI"
++ ".v%{gJh4G\\-=O@5`_3i<?Z';FNQuY]szf$!BS/|t:Pn6^Ha";
pub const xlat2 =
"5z]&gqtyfr$(we4{WP)H-Zn,[%\\3dL+Q;>U!pJS72FhOA1C"
++ "B6v^=I_0/8|jsb9m<.TVac`uY*MK'X~xDl}REokN:#?G\"i@";
pub fn main() !void {
@Tpaefawzen
Tpaefawzen / DisMath.lua
Created February 17, 2025 09:04
Lua library to implement some arithmetic things for esoteric programming language Dis
return function(base, digits)
local t = {
base = base;
digits = digits;
End = base ^ digits;
Max = base^digits - 1;
};
function t.is_representable(x) return 0<=x and x<=t.Max end
This file has been truncated, but you can view the full file.
}_>_{|^>|!|||^^}|{*!}|^{^{{>_}*|*_}|^}|*_}*!|{|*{^^|>!}}_*^}}^^{*>
*__>__{|!!!^>*^^_!_>|^*}**|{!}|^*{^}!{!*>^!_}{}^>!^|*!*_*{}|>^*^!|
!|*|>>>{_{}{}_}{|*}|}|!_}|*>|^}^^>!|>!|{*{|*{}|^>_|^^>}|^{_!*!!>|*{*
}^{!}_}|{|>__*!_*_**{>{_}{{!}_}*^{**{|>>>**>*>>>{}>^|*|_}^!|*_{{|{{_
{^>!{>>>}*|^^>_>{{!}**>|_}_*^^^|||_{{!{>}*|_}|{^!_>^|*{>||^!*|__>{_{>
*_!}_}!*|*>!!*{>*}||>^}_{*>}*>^_^|||*^!_!_*>^{!^}>|**|!*_!_*!!^_}^>_|
{*_}*!^_}!*|!|*{{_>{|}*{|}_*|{{!_>_}{{!{|!||}|_*_|{*^}!!>*!|}_>*^|!*^
}{|{_|}^>|}*!_*{_*^{|^||^}>!!^>^|}>||*{_{}>>^>|!^|^!{!_!*^*|}_^!{!}>{_
}}{>!*!^>|_>_^*^_^>^_!*{_}}!*{_^}{!_{_}}>^||_*|}!^!|!!>>|^^>*^!**_}^!|
{}}*!^}_*_}>|*|*|>|_>}*!_!*_!|^!^>}!>{!|{{^*}{|>|}*!^^>!*!}>!_||!_}}>{^
@Tpaefawzen
Tpaefawzen / totp.1
Last active January 6, 2025 10:05
Manual page for angt/totp: A tiny command line utility to generate OTP tokens https://github.com/angt/totp?tab=readme-ov-file
.Dd January 6, 2024
.Dt TOTP 1
.Os
.Sh NAME
.Nm totp
.Nd A tiny command line utility to generate OTP tokens
.Sh SYNOPSIS
.Nm
.Sh DESCRIPTION
Reads a line of binary secret to output a six-digit TOTP code;
お言葉ですが逆に、人に迷惑をかけずにどうやって助けを求めるものなのでしょうか
そういう方法が学校のカリキュラムにありますか
例をください
私が通っていた工業分野の高専でさえありませんでした
また、人に迷惑をかけることが必ずしも悪事に該当するというのは物事の一面しか見ていないことになると存じますがいかがでしょうか
事実として、私の母の兄は重めの身体知的障害者であり、当然ながらだれかのケアを持ちながら(一部自分でできることは自分でやりながら)生きる必要があります
その最たる例は車椅子に乗せてもらうこと、トイレなどです
アフリカメソッドとなったこと恐縮ではありますが余談をさせていただきました
私は人に迷惑をかけないようにした結果相談すべきことを相談できずに自己崩壊して今に至ります
最たる例として、2019年はBFDIシリーズ界隈にいて、当時のツイッターの人たちはカップリングの話とかで盛り上がってるように見えました。あの雰囲気に勝てそうになくて私はツイッターを退会するしかなく母の父とその家族と当時の主治医に対する怒りの中言う事やることをこの世の全ての教えとして遵守するしかありませんでした
@Tpaefawzen
Tpaefawzen / gist:a294723f5c5aa3e276ec9d3bba4ace44
Created June 28, 2024 11:20
Every case that is truthy for YYMMDD, MMDDYY, DDMMYY
['010101', '010102', '010103', '010104', '010105', '010106', '010107', '010108', '010109', '010110', '010111', '010112', '010113', '010114', '010115', '010116', '010117', '010118', '010119', '010120', '010121', '010122', '010123', '010124', '010125', '010126', '010127', '010128', '010129', '010130', '010131', '010201', '010202', '010203', '010204', '010205', '010206', '010207', '010208', '010209', '010210', '010211', '010212', '010213', '010214', '010215', '010216', '010217', '010218', '010219', '010220', '010221', '010222', '010223', '010224', '010225', '010226', '010227', '010228', '010301', '010302', '010303', '010304', '010305', '010306', '010307', '010308', '010309', '010310', '010311', '010312', '010313', '010314', '010315', '010316', '010317', '010318', '010319', '010320', '010321', '010322', '010323', '010324', '010325', '010326', '010327', '010328', '010329', '010330', '010331', '010401', '010402', '010403', '010404', '010405', '010406', '010407', '010408', '010409', '010410', '010411', '010412', '01