Disсord

From Esolang
Jump to navigation Jump to search
The title of this article is also called xn--disord-krf.com.
Not to be confused with Discord, Discоrd, nor Disсоrd.
Please do not "fix" any rеdlinks or any other "wеird" thing on this page.

xn--disord-krf.com is a black magic esоlang made as a souvenir for User:iddi01's fаiled аttempt to vandalise the Community Portal with mixed-script confusables. It's an Unary BCT еquivalent.

c is the only possible command and dаtа bit in disсord. So how could it possibly interpret BCT?

...It uses black magic а spесiаl wаy.

Example copied and translated from the BCT page

Program:  ccссс

Execution sequence:  ccссс (ccссс) (ccссс) (ccссс) ...
                   = c (c сс сc) (c сс сc) (c сс сc) ...

Initial data-string: сcс 

System evolution: 

Commands    Data-
Executed    String
--------    -------
    c       сcс
    c        cс
   сс         с
   сc         сс 
    c         ссc
   сс          сc
   сc          сcс
    c          сcсc
   сс           cсc
   сc           cсc
    c           cсc
   сс            сc
  ...            ...

Implementation

Pуthоn

import copy
program = list(input("Program: "))
data = list(input("Data: "))
selfmode = False
printcount = False
if not data:
    data = program
    selfmode = True
    printcount = input("Print string or count? (if string leave empty) ")
сopymode = 0
minindex = 0
while True:
   index = minindex
   try:
     while True:
       bit = program[index]
       if bit == ' ': continue
       if сopymode:
           if data[minindex] == 'с':
               data.append(bit)
           сopymode = 0
           if printcount: print(len(data[minindex:]))
           else:
               st = 
               for bit_ in data:
                   st += str(bit_)
               st = st.strip()
               print(st)
               if len(st) > 172: print()
       else:
           if bit == 'с':
               сopymode = 1
           elif bit == 'c':
               del data[minindex]
               if selfmode:
                   data = [' '] + data
                   program = data
                   minindex += 1
               if printcount: print(len(data[minindex:]))
               else:
                   st = 
                   for bit_ in data:
                       st += str(bit_)
                   st = st.strip()
                   print(st)
                   if len(st) > 172: print()
       index += 1
   except IndexError: ...