User:Aadenboy/xml maybe

From Esolang
Jump to navigation Jump to search

I devised this language back on October 11, 2023. It was never finished, but it looks really cool nonetheless.

the lang is run with sheets
sheets are double-bordered, and cells are single bordered

io between sheets is done with single-border lines

commenting is any non-line character

value declaration (2 rows):
╔═╤╗
╟─┼╢
║ │║
╚═╧╝

top row: value type
height 0: boolean
height 1: float
height 2: character

middle row: value
width 0: noop/end/float declarator/nextchar
width n: value n

the sheet above is the value true

examples:
╔═╤╗ ╔═╤════╤╗ ╔═══════╤══╤╤══════╤═════════╤╤════════╤═════════╤╗
╟─┼╢ ║ │    │║ ║       │  ││      │         ││        │         │║
║ │║ ╟─┼────┼╢ ║       │  ││      │         ││        │         │║
╚═╧╝ ║ │    │║ ╟───────┼──┼┼──────┼─────────┼┼────────┼─────────┼╢
true ╚═╧════╧╝ ║       │  ││      │         ││        │         │║
     14        ╚═══════╧══╧╧══════╧═════════╧╧════════╧═════════╧╝ 
               "HEY"

double noop is a 0

╔══╤╤╤════════╤╗
║  │││        │║
╟──┼┼┼────────┼╢
║  │││        │║
╚══╧╧╧════════╧╝   
208      


io (1 row):
files are opened/closed
closing a file reverts to stdio

╔╗    ╔═╗
║║    ║ ║
╚╝    ╚═╝   
close open

╔╤╗  ╔╤═╤╗ ╔╤══╤╗ ╔╤═╤╗ ╔╤═╤╤═════╤╗
║│║  ║│ │║ ║│  │║ ║│ │║ ║│ ││     │║
╚╧╝  ╚╧═╧╝ ╚╧══╧╝ ║│ │║ ╚╧═╧╧═════╧╝
read read  read   ╚╧═╧╝ read from
all  line  line   read  line 1 to
     1     2      char  line 5
                  1

╔═╤╗  ╔═╤╗    ╔═╤═╤╗ and so on...
║ │║  ║ │║    ║ │ │║
╚═╧╝  ║ │║    ║ │ │║
write ╚═╧╝    ╚═╧═╧╝
to    replace replace
      file    line 1

note about opening and closing:
by default reading and writing will use stdio
opening a file will read and write the inputted file instead
closing reverts it back to stdio

reading all from stdio will instead read whatever the user inputs (halting the program as it does)

close program (0 rows):
═ (yep, that’s it)

example so far:

╔═╤═╤══╤╤═╤╤╤═════╤╤════╤══════╤╤═╤═╤══════╤╤═╤══╤╤╤╤═╤═╤══════╤╗
║ │ │  ││ │││     ││    │      ││ │ │      ││ │  ││││ │ │      │║
║ │ │  ││ │││     ││    │      ││ │ │      ││ │  ││││ │ │      │║ open pi.txt
╟─┼─┼──┼┼─┼┼┼─────┼┼────┼──────┼┼─┼─┼──────┼┼─┼──┼┼┼┼─┼─┼──────┼╢ ╔═╗
║ │ │  ││ │││     ││    │      ││ │ │      ││ │  ││││ │ │      │╟─╢ ╟─┐
╚═╧═╧══╧╧═╧╧╧═════╧╧════╧══════╧╧═╧═╧══════╧╧═╧══╧╧╧╧═╧═╧══════╧╝ ╚═╝ │
create the string "pi.txt"                                            │
                                                          ╔═╤╗ ╔╗ ╔╤╗ │read pi.txt then
                                                        ═─╢ │╟─╢╟─╢│╟─┘close pi.txt
                                                          ╚═╧╝ ╚╝ ╚╧╝
                                                          write the contents
                                                          to stdio


file management (1 row):
╔══╗  ╔══╤╗  ╔══╤═╗ ╔══╤══╗ ╔══╤═══╗ ╔══╤════╗
║  ║  ║  │║  ║  │ ║ ║  │  ║ ║  │   ║ ║  │    ║
╚══╝  ╚══╧╝  ╚══╧═╝ ╚══╧══╝ ╚══╧═══╝ ╚══╧════╝
enter create delete copy    paste    rename
path  file   file   file    file     file


arithmetic and logic (3 rows):


top row: operation
(if the first column has 0 width)
height 0: not
height 1: and
height 2: or
height 3: xor

values are automatically converted to their binary counterpart

“HEY” → 1001000 1000101 1011001
50    →  110010

xor operation:
    100100010001011011001
XOR                110010
-------------------------
    100100010001011101011

increase the height of the first column by 4 lines to repeat the smaller value across the bigger value

xor operation (with repeating)
    100100010001011011001
XOR 010110010110010110010
-------------------------
      0010000111001101011

after performing the operation, the result is converted back to the first value’s type

00000100 00001110 01101011 → ␄␎k
as you can see, this is a very helpful output

(if the first column has 1 width)
height 0: add
height 1: subtract
height 2: multiply
height 3: divide
height 4: modulus

similar idea here where values are automatically converted to their numerical counterpart, with the option of adding 5 to the height to repeat for each value

“HEY” → 72 69 89
50    → 50

multiply (with repeats)
  72   69   89
x 50 x 50 x 50
---- ---- ----
3600 3450 4450

convert back to first value’s type
3600 3450 4450 → (mod 255) ␞çs
very helpful once again