User:PythonshellDebugwindow/XShell

From Esolang
Jump to navigation Jump to search

Pyvix

Pyvix is an esolang usable by the XShell operating system (XOS).

Learn by examples

Hello World

get_os().exec("cat -c Hello World")

Or:

get_os().cmd("cat", "-c").exec("Hello World")

Or even:

get_os().cmd("cat", "-c").exec(get_os().cmd("bf", "-c").pipe("-[------->+<]>-.-[->+++++<]>++.+++++++..+++.[--->+<]>-----.---[->+++<]>.-[--->+<]>---.+++.------.--------."))

Truth-machine

n~typeint = convert:typestr(get_os().cmd("bf", "-c").pipe(",."), typeint)
while n ..
  get_os().cmd("echo").exec("1")
loop
get_os().cmd("echo").exec("0")

Running with XShell

pyvix filename.pyv

Or

pyvix -c code

Or

cmd | pyvix -c

XShell

The XShell operating system (XOS) is an OS.

Builtins

Builtin Effect Options
cat Print the contents of file $1 -c: Print $1 instead of the contents of file $1
nop No-op
pyvix Execute Pyvix file $1 -c: Run $1 as Pyvix instead of file $1
bf Execute brainfuck file $1 -c: Run $1 as BF instead of file $1
-i: Input on one line before program start, e.g. predefined STDIN
xenbln Execute XENBLN file $1 -c: Run $1 as XENBLN instead of file $1
eso2d Execute Eso2D file $1 -c: Run $1 as Eso2D instead of file $1
math Execute Algebraic Programming Language file $1 -c: Run $1 as Algebraic Programming Language code instead of file $1
fwrite Write ${2..∞} to file $1 -n: Write a newline as well
-o: Overwrite instead of write

bf's cells are wrapping unsigned bytes, and , returns 0 on EOF.

The -c option means code has to be only 1 line, therefore it doesn't make much sense to use it with eso2d.

Operators

  • Pipe operator |

Examples

Hello World

cat -c Hello World

Cat program

bf -ci +[,.]

Run main.bf as BF, then run its output as Pyvix:

bf main.bf | pyvix -c

Silence command output:

cat -c This won't be shown | nop
xenbln -c O"This also won't be shown" | nop