Each data is represented as unsigned integer. 0-255 as such Byte, 256 as I, 257 as K, 258 as KI, 259 as read, 260 as next, 261 as out, n>=262 if n is even as N-th code, else n is odd as N-th previous item on data stack.
n>=262 where
| %.c: %.hs | |
| ( ../prog < $<; cat ../prog.c) > $@ || (rm $@; false) |
| ## Synopsis | |
| ./hello [-g] [-n num_repeats] [Args ...] |
| 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 |
| 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) |
http://www.p-nand-q.com/programming/languages/unbabtized.html
Tested for just Hello world and Fibonacci programs as in the link above; other features are not tested.
| .Dd May 25, 2023 | |
| .Dt CONVX2J.SH 1 | |
| .Os ShellShoccar-jpn/Parsrs | |
| . | |
| .Sh 名前 | |
| .Nm convx2j.sh | |
| .Nd XPath-valueテキストをJSONPath-valueに変換 | |
| . | |
| .Sh 書式 | |
| .Nm |
| 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 { |
| 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 |
| }_>_{|^>|!|||^^}|{*!}|^{^{{>_}*|*_}|^}|*_}*!|{|*{^^|>!}}_*^}}^^{*> | |
| *__>__{|!!!^>*^^_!_>|^*}**|{!}|^*{^}!{!*>^!_}{}^>!^|*!*_*{}|>^*^!| | |
| !|*|>>>{_{}{}_}{|*}|}|!_}|*>|^}^^>!|>!|{*{|*{}|^>_|^^>}|^{_!*!!>|*{* | |
| }^{!}_}|{|>__*!_*_**{>{_}{{!}_}*^{**{|>>>**>*>>>{}>^|*|_}^!|*_{{|{{_ | |
| {^>!{>>>}*|^^>_>{{!}**>|_}_*^^^|||_{{!{>}*|_}|{^!_>^|*{>||^!*|__>{_{> | |
| *_!}_}!*|*>!!*{>*}||>^}_{*>}*>^_^|||*^!_!_*>^{!^}>|**|!*_!_*!!^_}^>_| | |
| {*_}*!^_}!*|!|*{{_>{|}*{|}_*|{{!_>_}{{!{|!||}|_*_|{*^}!!>*!|}_>*^|!*^ | |
| }{|{_|}^>|}*!_*{_*^{|^||^}>!!^>^|}>||*{_{}>>^>|!^|^!{!_!*^*|}_^!{!}>{_ | |
| }}{>!*!^>|_>_^*^_^>^_!*{_}}!*{_^}{!_{_}}>^||_*|}!^!|!!>>|^^>*^!**_}^!| | |
| {}}*!^}_*_}>|*|*|>|_>}*!_!*_!|^!^>}!>{!|{{^*}{|>|}*!^^>!*!}>!_||!_}}>{^ |