This file contains 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
// Copyright 2025 monomere | |
// MIT License | |
#ifndef SRVM_BITCODE_H_ | |
#define SRVM_BITCODE_H_ | |
#include <stdint.h> | |
#include <stddef.h> | |
#include <stdio.h> | |
enum srvm_instr_op : uint8_t { |
This file contains 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
# Some example programs in Om to showcase just how bad it is to program in. | |
# These are from my CS course. | |
$Task2 = { | |
@_ = $_; | |
/Cone = [ | |
$h = @_/input-float (@_/string "height"); | |
$r = @_/input-float (@_/string "little radius"); | |
$R = @_/input-float (@_/string "big radius"); | |
M/if ($h /less-than-or-equal-to 0/f) { @_ = @_; @h=$h;@r=$r;@R=$R; /do = [ |
This file contains 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
int f[10]={56,0,11,48,56,51,40,20,1972},x,y,j,b,d,w,k,sleep( | |
int),printf(const char*,...);long t,time(long*);char*s,*v,*g | |
,*ctime(long*);void p(int c){printf("\e[%sm%c",x<32&&y<5&&(( | |
x/4%3!=2&&x%4<3&&(j=v[x/4],d=f[j],d=0x7bff-16*j-2*(!d?d:d-64 | |
-j/6*3072+(16<<(1<<(((j+3)/4*3+1)/2)))),b=(d>>((4-y)*3+2-x%4 | |
))&1))||y%2!=0&&!((x+3)%12))?"31;7":"",c);x-=c==10?++y,x:-1; | |
}int main(){s="int f[10]={56,0,11,48,56,51,40,20,1972},x,y," | |
"j,b,d,w,k,sleep(\nint),printf(const char*,...);long t,time" | |
"(long*);char*s,*v,*g\n,*ctime(long*);void p(int c){printf(" | |
"\"\\e[%sm%c\",x<32&&y<5&&((\nx/4%3!=2&&x%4<3&&(j=v[x/4],d=" |
This file contains 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
// CC-BY-3 // monomere // A[1] = '█' // | |
#include <stdio.h> | |
int F[]={56,0,11,48,56,51,40,20,1972,0} | |
,x,y,i,j,b,d,D[6];char*A=" #";void p(){ | |
d=0x7bff-16*j-2*(!d?d:d-64-j/6*3072+(16 | |
<<(1<<(((j+3)/4*3+1)/2))));for(i=5;i--> | |
0;){b=d>>(i*3)&7;printf("%c%c%c\n",A[b/ | |
4],A[b/2%2],A[b&1]);}putchar('\n');}int | |
main(){for(j=10;d=F[j-1],j-->0;)p();}// |
This file contains 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
/** by monomere, under CC-BY-NC. last updated 4th of july, 2024. */ | |
const hindleymilner = () => (( | |
nextId = 1, | |
Err = e => (_, b = x => Err(x)) => b(e), | |
Ok = x => (a, _ = x => Err(x)) => a(x), | |
K = v => _ => v, | |
strty = ([kind, ...data], p = false) => ((P = x => p ? `(${x})` : x) => ({ | |
'fun': (lhs, rhs) => P(`${strty(lhs, true)} → ${strty(rhs)}`), | |
'meta': ([[s, t]]) => s ? strty(t) : `?${t}`, | |
})[kind]?.(...data) ?? `${kind[0].toUpperCase() + kind.slice(1)}`)(), |
This file contains 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
# by monomere | |
# Apache License 2.0 | |
# the code is horrible and undocumented, | |
# might change that later :P | |
# requires python >=3.12 | |
# requires the parsita python package (for parsing) | |
# you can remove the parser code and play around with the ast directly tho |
This file contains 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
# License: MIT | |
# Author: monomere | |
# Changelog: | |
# Note: With every update, the doc comment is almost always updated | |
# to reflect new additions/improvements to the language. | |
# Update 7.1 - 2024/09/13: | |
# - Fix variadic arguments not being passed. | |
# Update 7 - 2024/01/27: | |
# - Add changelog note. |
This file contains 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 python3 | |
# Original Author: monomere | |
# This is Public Domain, but would be cool if you still credit me :) | |
import os, inquirer, urllib.request, typing, json | |
IMGUI_REPO = 'ocornut/imgui' | |
T = typing.TypeVar('T') | |
TupleTagCommit = tuple[str, str] |