BugSophia

From Esolang

Jump to: navigation, search

The real-proper-and-all-absolute name for this article is actually bugSophia


bugSophia (bS for short) is a concurrent fungeoid with heavy usage of the Unicode character set. The language represents data as characters/numbers being carried by bugs through a 2D field of tunnels. Each bug can carry only one character. When a bug reaches an intersection it creates copies of itself that travel down each possible path. Unary operations occur when bugs travel over commands. Binary (and higher-nary) operations occur when multiple bugs travel over commands at the same time.

The exact specification is currently described in the author's notebook, and hasn't been placed on the web yet...

Contents

[edit] IO

the bugSophia specification includes support for communication with files, data from URLs, sockets of all flavors, memory buffers, and concurrently running coprograms. Each of these IO streams are assigned to a unique Unicode character with the address/filename/URL being defined by a mini-language called the "pre-librarian" (whose instructions are encoded entirely as Ogham runes). Once assigned, the Unicode character can be placed anywhere in the program to represent the stream. The Unicode character used to represent each stream explains the type of that stream: Unihan characters are coprograms, Malaysian characters are files/URLs, Dingbats are datagram sockets, Unified Canadian Aboriginal Syllabic characters are stream sockets, Ethiopic characters are raw sockets, the various Phillipine scripts (Tagalog, Hanunóo, Buhid, Tagbanwa) represent memory streams, and the stan rune (ᛥ) is the programs main IO stream (either to other coprograms, or to the standard IO if it's the "main" program.)

[edit] Example programs

(Note: Parts of these examples are in Unicode, so they may vomit out little blocks (or question mark) if you don't have the right font.)

[edit] Hello, World!

 "+-+-+-+-+-+-+-+-+-+-+-+-+
  ` ` ` ` ` ` ` ` ` ` ` ` `
  H e l l o ,   W o r l d !
ᛥ'<-<-<-<-<-<-<-<-<-<-<-<-<

[edit] Cat

   "v-<
    .ᛥ'
    >-^

[edit] 99 bottles of beer (truncated lyrics)



             ">v                     
              |<
              +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` |
                b o t t l e s   o f   b e e r   o n   t h e   w a l l . |
           ᜀ'<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<

                         >-v
                         | |       <---counter
                       ᜁ' (
                         ^-<-c`-"    


                                    >-v
                                  ᜀ. ?
                                    ^-+
                                    | |
           @                        #ᛥ'
   "  ᜁ   |                        |           
   >--.---~g------------------------|
   |       ~       main loop        |           
   |       +v-"                     |           
   |       ^<                       |
   ^--------------------------------<

Personal tools