ShortScript

From Esolang
Jump to navigation Jump to search

ShortScript (SS) is a work in progress programming language by User:YourDeathIsComing for code golfing, but you can also write "normal" programs well in it. It´s written in Batch.

Examples

Hello World

→Hello World

Cat

←Γ
→γ

Implementation

Save this as ShortScript.cmd:

@echo off
setlocal enabledelayedexpansion
echo @echo off>%~n1.cmd
echo setlocal enabledelayedexpansion>>%~n1.cmd
for /F "eol=# tokens=* delims= " %%a in (%1) do (
set x=%%a
set x=!x:↨= title !
set x=!x:¶= color !
set x=!x:↕= pause ^>NUL !
set x=!x:☼= exit !
set x=!x:→= echo !
set x=!x:►= echo. !
set x=!x:←= set/p!
set x=!x:↔= if !
set x=!x:↑= set !
set x=!x:↓= set/a!
set x=!x:^<= lss !
set x=!x:^>= gtr !
set x=!x:^|= equ !
set x=!x:∟= cls !
set x=!x:?=goto !
set x=!x:(= ( !
set x=!x:{=:╚!
set x=!x:\= set/aF_=!
set x=!x:}= ^& goto :eof!
set x=!x:$= call :╚!
set x=!x:§= goto :eof!
set x=!x:[=:¼LOOP!
set x=!x:]= goto ¼LOOP!
set x=!x:Α=A_=!
set x=!x:Β=B_=!
set x=!x:Γ=C_=!
set x=!x:Δ=D_=!
set x=!x:Ε=E_=!
set x=!x:Ζ=F_=!
set x=!x:α= %%A_%% !
set x=!x:β= %%B_%% !
set x=!x:γ= %%C_%% !
set x=!x:δ= %%D_%% !
set x=!x:ε= %%E_%% !
set x=!x:ζ= %%F_%% !
set x=!x:η1= %%1 !
set x=!x:η2= %%2 !
set x=!x:η3= %%3 !
set x=!x:η4= %%4 !
set x=!x:η5= %%5 !
set x=!x:η6= %%6 !
set x=!x:η7= %%7 !
set x=!x:η8= %%8 !
set x=!x:η9= %%9 !
set x=!x:η= %%1 !
set x=!x:θ= %%2 !
echo !x! >>%~n1.cmd
)
type stdSSLib.cmd >>%~n1.cmd

And this as StdSSLib.cmd:

goto :eof 
:╚H 
setlocal DISABLEDELAYEDEXPANSION
 echo Hello, World! & goto :eof & endlocal
:╚Q 
type %0 & goto :eof 
:╚M+ 
 set/aF_= %1 + %2  & goto :eof 
:╚M- 
 set/aF_= %1 - %2  & goto :eof 
:╚M* 
 set/aF_= %1 * %2  & goto :eof 
:╚M/ 
 set/aF_= %1 / %2  & goto :eof 
:╚M% 
 set/aF_= %1 %% %2  & goto :eof 
:╚M^ 
:╔ 
set /a Z__=Z__*%%1 
set /a X__=X__+1 
if %X__% lss %%2 goto ╔ 
 set/aF_=%Z__% & goto :eof 
:╚9 
 echo 99 bottles of beer on the wall, 99 bottles of beer. 
 echo Take one down and pass it around, 98 bottles of beer on the wall. 
 echo.  
 echo 98 bottles of beer on the wall, 98 bottles of beer. 
 echo Take one down and pass it around, 97 bottles of beer on the wall. 
 echo.  
 echo 97 bottles of beer on the wall, 97 bottles of beer. 
 echo Take one down and pass it around, 96 bottles of beer on the wall. 
 echo.  
 echo 96 bottles of beer on the wall, 96 bottles of beer. 
 echo Take one down and pass it around, 95 bottles of beer on the wall. 
 echo.  
 echo 95 bottles of beer on the wall, 95 bottles of beer. 
 echo Take one down and pass it around, 94 bottles of beer on the wall. 
 echo.  
 echo 94 bottles of beer on the wall, 94 bottles of beer. 
 echo Take one down and pass it around, 93 bottles of beer on the wall. 
 echo.  
 echo 93 bottles of beer on the wall, 93 bottles of beer. 
 echo Take one down and pass it around, 92 bottles of beer on the wall. 
 echo.  
 echo 92 bottles of beer on the wall, 92 bottles of beer. 
 echo Take one down and pass it around, 91 bottles of beer on the wall. 
 echo.  
 echo 91 bottles of beer on the wall, 91 bottles of beer. 
 echo Take one down and pass it around, 90 bottles of beer on the wall. 
 echo.  
 echo 90 bottles of beer on the wall, 90 bottles of beer. 
 echo Take one down and pass it around, 89 bottles of beer on the wall. 
 echo.  
 echo 89 bottles of beer on the wall, 89 bottles of beer. 
 echo Take one down and pass it around, 88 bottles of beer on the wall. 
 echo.  
 echo 88 bottles of beer on the wall, 88 bottles of beer. 
 echo Take one down and pass it around, 87 bottles of beer on the wall. 
 echo.  
 echo 87 bottles of beer on the wall, 87 bottles of beer. 
 echo Take one down and pass it around, 86 bottles of beer on the wall. 
 echo.  
 echo 86 bottles of beer on the wall, 86 bottles of beer. 
 echo Take one down and pass it around, 85 bottles of beer on the wall. 
 echo.  
 echo 85 bottles of beer on the wall, 85 bottles of beer. 
 echo Take one down and pass it around, 84 bottles of beer on the wall. 
 echo.  
 echo 84 bottles of beer on the wall, 84 bottles of beer. 
 echo Take one down and pass it around, 83 bottles of beer on the wall. 
 echo.  
 echo 83 bottles of beer on the wall, 83 bottles of beer. 
 echo Take one down and pass it around, 82 bottles of beer on the wall. 
 echo.  
 echo 82 bottles of beer on the wall, 82 bottles of beer. 
 echo Take one down and pass it around, 81 bottles of beer on the wall. 
 echo.  
 echo 81 bottles of beer on the wall, 81 bottles of beer. 
 echo Take one down and pass it around, 80 bottles of beer on the wall. 
 echo.  
 echo 80 bottles of beer on the wall, 80 bottles of beer. 
 echo Take one down and pass it around, 79 bottles of beer on the wall. 
 echo.  
 echo 79 bottles of beer on the wall, 79 bottles of beer. 
 echo Take one down and pass it around, 78 bottles of beer on the wall. 
 echo.  
 echo 78 bottles of beer on the wall, 78 bottles of beer. 
 echo Take one down and pass it around, 77 bottles of beer on the wall. 
 echo.  
 echo 77 bottles of beer on the wall, 77 bottles of beer. 
 echo Take one down and pass it around, 76 bottles of beer on the wall. 
 echo.  
 echo 76 bottles of beer on the wall, 76 bottles of beer. 
 echo Take one down and pass it around, 75 bottles of beer on the wall. 
 echo.  
 echo 75 bottles of beer on the wall, 75 bottles of beer. 
 echo Take one down and pass it around, 74 bottles of beer on the wall. 
 echo.  
 echo 74 bottles of beer on the wall, 74 bottles of beer. 
 echo Take one down and pass it around, 73 bottles of beer on the wall. 
 echo.  
 echo 73 bottles of beer on the wall, 73 bottles of beer. 
 echo Take one down and pass it around, 72 bottles of beer on the wall. 
 echo.  
 echo 72 bottles of beer on the wall, 72 bottles of beer. 
 echo Take one down and pass it around, 71 bottles of beer on the wall. 
 echo.  
 echo 71 bottles of beer on the wall, 71 bottles of beer. 
 echo Take one down and pass it around, 70 bottles of beer on the wall. 
 echo.  
 echo 70 bottles of beer on the wall, 70 bottles of beer. 
 echo Take one down and pass it around, 69 bottles of beer on the wall. 
 echo.  
 echo 69 bottles of beer on the wall, 69 bottles of beer. 
 echo Take one down and pass it around, 68 bottles of beer on the wall. 
 echo.  
 echo 68 bottles of beer on the wall, 68 bottles of beer. 
 echo Take one down and pass it around, 67 bottles of beer on the wall. 
 echo.  
 echo 67 bottles of beer on the wall, 67 bottles of beer. 
 echo Take one down and pass it around, 66 bottles of beer on the wall. 
 echo.  
 echo 66 bottles of beer on the wall, 66 bottles of beer. 
 echo Take one down and pass it around, 65 bottles of beer on the wall. 
 echo.  
 echo 65 bottles of beer on the wall, 65 bottles of beer. 
 echo Take one down and pass it around, 64 bottles of beer on the wall. 
 echo.  
 echo 64 bottles of beer on the wall, 64 bottles of beer. 
 echo Take one down and pass it around, 63 bottles of beer on the wall. 
 echo.  
 echo 63 bottles of beer on the wall, 63 bottles of beer. 
 echo Take one down and pass it around, 62 bottles of beer on the wall. 
 echo.  
 echo 62 bottles of beer on the wall, 62 bottles of beer. 
 echo Take one down and pass it around, 61 bottles of beer on the wall. 
 echo.  
 echo 61 bottles of beer on the wall, 61 bottles of beer. 
 echo Take one down and pass it around, 60 bottles of beer on the wall. 
 echo.  
 echo 60 bottles of beer on the wall, 60 bottles of beer. 
 echo Take one down and pass it around, 59 bottles of beer on the wall. 
 echo.  
 echo 59 bottles of beer on the wall, 59 bottles of beer. 
 echo Take one down and pass it around, 58 bottles of beer on the wall. 
 echo.  
 echo 58 bottles of beer on the wall, 58 bottles of beer. 
 echo Take one down and pass it around, 57 bottles of beer on the wall. 
 echo.  
 echo 57 bottles of beer on the wall, 57 bottles of beer. 
 echo Take one down and pass it around, 56 bottles of beer on the wall. 
 echo.  
 echo 56 bottles of beer on the wall, 56 bottles of beer. 
 echo Take one down and pass it around, 55 bottles of beer on the wall. 
 echo.  
 echo 55 bottles of beer on the wall, 55 bottles of beer. 
 echo Take one down and pass it around, 54 bottles of beer on the wall. 
 echo.  
 echo 54 bottles of beer on the wall, 54 bottles of beer. 
 echo Take one down and pass it around, 53 bottles of beer on the wall. 
 echo.  
 echo 53 bottles of beer on the wall, 53 bottles of beer. 
 echo Take one down and pass it around, 52 bottles of beer on the wall. 
 echo.  
 echo 52 bottles of beer on the wall, 52 bottles of beer. 
 echo Take one down and pass it around, 51 bottles of beer on the wall. 
 echo.  
 echo 51 bottles of beer on the wall, 51 bottles of beer. 
 echo Take one down and pass it around, 50 bottles of beer on the wall. 
 echo.  
 echo 50 bottles of beer on the wall, 50 bottles of beer. 
 echo Take one down and pass it around, 49 bottles of beer on the wall. 
 echo.  
 echo 49 bottles of beer on the wall, 49 bottles of beer. 
 echo Take one down and pass it around, 48 bottles of beer on the wall. 
 echo.  
 echo 48 bottles of beer on the wall, 48 bottles of beer. 
 echo Take one down and pass it around, 47 bottles of beer on the wall. 
 echo.  
 echo 47 bottles of beer on the wall, 47 bottles of beer. 
 echo Take one down and pass it around, 46 bottles of beer on the wall. 
 echo.  
 echo 46 bottles of beer on the wall, 46 bottles of beer. 
 echo Take one down and pass it around, 45 bottles of beer on the wall. 
 echo.  
 echo 45 bottles of beer on the wall, 45 bottles of beer. 
 echo Take one down and pass it around, 44 bottles of beer on the wall. 
 echo.  
 echo 44 bottles of beer on the wall, 44 bottles of beer. 
 echo Take one down and pass it around, 43 bottles of beer on the wall. 
 echo.  
 echo 43 bottles of beer on the wall, 43 bottles of beer. 
 echo Take one down and pass it around, 42 bottles of beer on the wall. 
 echo.  
 echo 42 bottles of beer on the wall, 42 bottles of beer. 
 echo Take one down and pass it around, 41 bottles of beer on the wall. 
 echo.  
 echo 41 bottles of beer on the wall, 41 bottles of beer. 
 echo Take one down and pass it around, 40 bottles of beer on the wall. 
 echo.  
 echo 40 bottles of beer on the wall, 40 bottles of beer. 
 echo Take one down and pass it around, 39 bottles of beer on the wall. 
 echo.  
 echo 39 bottles of beer on the wall, 39 bottles of beer. 
 echo Take one down and pass it around, 38 bottles of beer on the wall. 
 echo.  
 echo 38 bottles of beer on the wall, 38 bottles of beer. 
 echo Take one down and pass it around, 37 bottles of beer on the wall. 
 echo.  
 echo 37 bottles of beer on the wall, 37 bottles of beer. 
 echo Take one down and pass it around, 36 bottles of beer on the wall. 
 echo.  
 echo 36 bottles of beer on the wall, 36 bottles of beer. 
 echo Take one down and pass it around, 35 bottles of beer on the wall. 
 echo.  
 echo 35 bottles of beer on the wall, 35 bottles of beer. 
 echo Take one down and pass it around, 34 bottles of beer on the wall. 
 echo.  
 echo 34 bottles of beer on the wall, 34 bottles of beer. 
 echo Take one down and pass it around, 33 bottles of beer on the wall. 
 echo.  
 echo 33 bottles of beer on the wall, 33 bottles of beer. 
 echo Take one down and pass it around, 32 bottles of beer on the wall. 
 echo.  
 echo 32 bottles of beer on the wall, 32 bottles of beer. 
 echo Take one down and pass it around, 31 bottles of beer on the wall. 
 echo.  
 echo 31 bottles of beer on the wall, 31 bottles of beer. 
 echo Take one down and pass it around, 30 bottles of beer on the wall. 
 echo.  
 echo 30 bottles of beer on the wall, 30 bottles of beer. 
 echo Take one down and pass it around, 29 bottles of beer on the wall. 
 echo.  
 echo 29 bottles of beer on the wall, 29 bottles of beer. 
 echo Take one down and pass it around, 28 bottles of beer on the wall. 
 echo.  
 echo 28 bottles of beer on the wall, 28 bottles of beer. 
 echo Take one down and pass it around, 27 bottles of beer on the wall. 
 echo.  
 echo 27 bottles of beer on the wall, 27 bottles of beer. 
 echo Take one down and pass it around, 26 bottles of beer on the wall. 
 echo.  
 echo 26 bottles of beer on the wall, 26 bottles of beer. 
 echo Take one down and pass it around, 25 bottles of beer on the wall. 
 echo.  
 echo 25 bottles of beer on the wall, 25 bottles of beer. 
 echo Take one down and pass it around, 24 bottles of beer on the wall. 
 echo.  
 echo 24 bottles of beer on the wall, 24 bottles of beer. 
 echo Take one down and pass it around, 23 bottles of beer on the wall. 
 echo.  
 echo 23 bottles of beer on the wall, 23 bottles of beer. 
 echo Take one down and pass it around, 22 bottles of beer on the wall. 
 echo.  
 echo 22 bottles of beer on the wall, 22 bottles of beer. 
 echo Take one down and pass it around, 21 bottles of beer on the wall. 
 echo.  
 echo 21 bottles of beer on the wall, 21 bottles of beer. 
 echo Take one down and pass it around, 20 bottles of beer on the wall. 
 echo.  
 echo 20 bottles of beer on the wall, 20 bottles of beer. 
 echo Take one down and pass it around, 19 bottles of beer on the wall. 
 echo.  
 echo 19 bottles of beer on the wall, 19 bottles of beer. 
 echo Take one down and pass it around, 18 bottles of beer on the wall. 
 echo.  
 echo 18 bottles of beer on the wall, 18 bottles of beer. 
 echo Take one down and pass it around, 17 bottles of beer on the wall. 
 echo.  
 echo 17 bottles of beer on the wall, 17 bottles of beer. 
 echo Take one down and pass it around, 16 bottles of beer on the wall. 
 echo.  
 echo 16 bottles of beer on the wall, 16 bottles of beer. 
 echo Take one down and pass it around, 15 bottles of beer on the wall. 
 echo.  
 echo 15 bottles of beer on the wall, 15 bottles of beer. 
 echo Take one down and pass it around, 14 bottles of beer on the wall. 
 echo.  
 echo 14 bottles of beer on the wall, 14 bottles of beer. 
 echo Take one down and pass it around, 13 bottles of beer on the wall. 
 echo.  
 echo 13 bottles of beer on the wall, 13 bottles of beer. 
 echo Take one down and pass it around, 12 bottles of beer on the wall. 
 echo.  
 echo 12 bottles of beer on the wall, 12 bottles of beer. 
 echo Take one down and pass it around, 11 bottles of beer on the wall. 
 echo.  
 echo 11 bottles of beer on the wall, 11 bottles of beer. 
 echo Take one down and pass it around, 10 bottles of beer on the wall. 
 echo.  
 echo 10 bottles of beer on the wall, 10 bottles of beer. 
 echo Take one down and pass it around, 9 bottles of beer on the wall. 
 echo.  
 echo 9 bottles of beer on the wall, 9 bottles of beer. 
 echo Take one down and pass it around, 8 bottles of beer on the wall. 
 echo.  
 echo 8 bottles of beer on the wall, 8 bottles of beer. 
 echo Take one down and pass it around, 7 bottles of beer on the wall. 
 echo.  
 echo 7 bottles of beer on the wall, 7 bottles of beer. 
 echo Take one down and pass it around, 6 bottles of beer on the wall. 
 echo.  
 echo 6 bottles of beer on the wall, 6 bottles of beer. 
 echo Take one down and pass it around, 5 bottles of beer on the wall. 
 echo.  
 echo 5 bottles of beer on the wall, 5 bottles of beer. 
 echo Take one down and pass it around, 4 bottles of beer on the wall. 
 echo.  
 echo 4 bottles of beer on the wall, 4 bottles of beer. 
 echo Take one down and pass it around, 3 bottles of beer on the wall. 
 echo.  
 echo 3 bottles of beer on the wall, 3 bottles of beer. 
 echo Take one down and pass it around, 2 bottles of beer on the wall. 
 echo.  
 echo 2 bottles of beer on the wall, 2 bottles of beer. 
 echo Take one down and pass it around, 1 bottle of beer on the wall. 
 echo.  
 echo 1 bottle of beer on the wall, 1 bottle of beer. 
 echo Take one down and pass it around, no more bottles of beer on the wall. 
 echo.  
 echo No more bottles of beer on the wall, no more bottles of beer. 
 echo Go to the store and buy some more, 99 bottles of beer on the wall & goto :eof