annotate bin/fromroman @ 12436:a626721f5556 draft

<b_jonas> python3 -cn="/hackenv/bin/("; s=open(n).read(); s=s.replace(\' canary\',\' -- "$HACKENV/canary"\'); open(n,"w").write(s); print(s);
author HackEso <hackeso@esolangs.org>
date Sat, 11 Dec 2021 21:49:11 +0000
parents 00ccb2fe8c08
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5643
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
1 #!/usr/bin/perl
12420
00ccb2fe8c08 <wib_jonas> python3 -cn="/hackenv/bin/fromroman";s=open(n).read();o=s.replace(\'{(sh\',\'{uc((sh\').replace(\'0]}\',\'0])}\');print(o);open(n,"w").write(o);print("write successful");
HackEso <hackeso@esolangs.org>
parents: 5643
diff changeset
2 sub k{my$t;$t=~y/IVXLC/XLCDM/,$t.=("",I,II,III,IV,V,VI,VII,VIII,IX)[$_]for/./g;$r{$t}=$_;$t}k for s""\$"..4e3;print $r{uc((shift=~/(\w+)/)[0])},$/