User:Xenon dichloride/Terminal: Difference between revisions

From Infinite Nomic Wiki
No edit summary
mNo edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
Terminal is a nomic taking place entirely within a filesystem. Actions are submitted as terminal commands.
Terminal is a nomic taking place entirely within a filesystem.  


The following represents the initial state:
~/                  # owner: e
    boot/            # owner: su
        instances
        files
        users
        players
        commands
        winning
    commands/        # owner: su
        mk
        cp
        mv
        rm
        rn
        et
        run
        kill
        sudo
    players/        # owner: su
== ~/boot/instances ==
The system must reboot to enact any changes to contents of ~/boot/. Each week 3 new instances are created, with the contents of the files in ~/boot/ directory at the end of the previous instance comprising the rules for the instance:
Instance I: Sunday, Monday
Instance II: Tuesday, Wednesday, Thursday
Instance III: Friday, Saturday
The rules must be continuously obeyed by all players.
== ~/boot/files ==
A file is a document containing data such as text, formatting, tables or images. Anything that can be added to an [[Main Page|Infinite Nomic Wiki]] page is valid content for a file. Every file has an owner, which is 'su' unless otherwise specified.
== ~/boot/users ==
A user can own files and execute commands. Every player is a user. Additionally, 'su' references the superuser, with absolute control of the system. 'e' references every user.
== ~/boot/players ==
A player must be a member of the IN discord server.
Any person may become a player by posting a message setting forth their intent to do so in the channel ⁠#game-actions, provided they have not been a player at any point in the past seven days. A player may cease being a player by sending a message that sets forth their intent to do so in #⁠game-actions.
When a player joins, the following file is created at ~/players/ named {player name}:
id = {Discord ID}
is_player = true
is_su = false
privileges = 2
If that file already exists (the player has the same id), is_player = true. If a player's name contains "/" characters, they are replaced by "|". If multiple players would have files of the same name, subsequent player files have an integer appended to their name to represent their place when joining.
When a player ceases being a player, is_player = false. If a player or ex-player leaves the server, they are no longer a player and their file is removed.
== ~/boot/commands ==
A command is a formatted set of instructions that can be sent to alter the system. Every command must have a file in ~/commands/ with the name of the command as its name. The file must describe the syntax for the command and provide a description for what it should do.
{| class="wikitable"
{| class="wikitable"
|+
|+Concatenation of ~/commands/
!Command
!Command
!Alternative
!Alternative
Line 10: Line 64:
|mk
|mk
|make
|make
|mk {location or if blank: ~/} {name} {dir/file or if blank: file} {owner or if blank: you, if e or all: all players} {if file: contents as attached .txt file or code block}
|mk {location} {name (no "/")} {contents as attached .txt file or code block} {owner or if blank: you}
|Creates a file or directory at the specified location
|Creates a file at the specified location.
|-
|mkdir
|make_directory
|mkdir {location} {name (no "/")} {owner or if blank: you}
|Creates a directory at the specified location.
|-
|-
|cp
|cp
|copy
|copy
|cp {name}
|cp {location} {location}
|
|Copies a file or directory from one location and places the copy in another location.
|-
|-
|mv
|mv
|move
|move
|
|mv {location} {location}
|
|Moves a file or directory to a new location.
|-
|-
|rm
|rm
|remove
|remove
|
|rm {location}
|
|Deletes a file or directory.
|-
|-
|nm
|rn
|rename
|rename
|nm {location} {new name}
|rn {location} {new name (no "/")}
|Changes the name of a file or directory.
|Changes the name of a file or directory.
|-
|ct
|cut
|
|
|-
|-
|et
|et
|edit
|edit
|et {file location} {write/append or w/a} {new contents attached as .txt file or code block}
|Changes the contents of a file.
|-
|run
|
|
|run {file name}
|Executes the code in a file. Actions performed by this code are considered to have been done by you.
|-
|kill
|
|
|kill {reply or links to messages or message ids or if blank: all active}
|Terminates active processes ran by you.
|-
|-
|run
|sudo
|
|
|run {file name}
|sudo {command}
|Executes the code in a file.
|Executes a command as su. All players may vote (👍 or 👎) on whether or not permission is granted. After 48 hours, permission is granted if there are more 👍 than 👎 votes.
|}
|}
sudo can be purchased, not always accessed
Each player may perform a number of commands per instance equivalent to their privileges value.


You cannot perform a command on a file or in a directory that you are not the owner of, unless you use sudo.
A player cannot perform a command (excluding sudo) unless they are the owner of the file and directory being affected.


when a player joins, a file is created at ~/Players/ named {player name}. If that file already exists, isplayer is set to true. When a player ceases being a player, this is set to false. If a player or ex-player leaves the server, they are no longer a player and their file is removed. A player must be a member of the IN discord server.
== ~/boot/winning ==
The first player to become a 'superuser' (is_su = true) wins the cycle.

Latest revision as of 02:48, 3 April 2024

Terminal is a nomic taking place entirely within a filesystem.

The following represents the initial state:

~/                   # owner: e
    boot/            # owner: su
        instances
        files
        users
        players
        commands
        winning
    commands/        # owner: su
        mk
        cp
        mv
        rm
        rn
        et
        run
        kill
        sudo
    players/         # owner: su

~/boot/instances[edit | edit source]

The system must reboot to enact any changes to contents of ~/boot/. Each week 3 new instances are created, with the contents of the files in ~/boot/ directory at the end of the previous instance comprising the rules for the instance:

Instance I: Sunday, Monday

Instance II: Tuesday, Wednesday, Thursday

Instance III: Friday, Saturday

The rules must be continuously obeyed by all players.

~/boot/files[edit | edit source]

A file is a document containing data such as text, formatting, tables or images. Anything that can be added to an Infinite Nomic Wiki page is valid content for a file. Every file has an owner, which is 'su' unless otherwise specified.

~/boot/users[edit | edit source]

A user can own files and execute commands. Every player is a user. Additionally, 'su' references the superuser, with absolute control of the system. 'e' references every user.

~/boot/players[edit | edit source]

A player must be a member of the IN discord server.

Any person may become a player by posting a message setting forth their intent to do so in the channel ⁠#game-actions, provided they have not been a player at any point in the past seven days. A player may cease being a player by sending a message that sets forth their intent to do so in #⁠game-actions.

When a player joins, the following file is created at ~/players/ named {player name}:

id = {Discord ID}
is_player = true
is_su = false
privileges = 2

If that file already exists (the player has the same id), is_player = true. If a player's name contains "/" characters, they are replaced by "|". If multiple players would have files of the same name, subsequent player files have an integer appended to their name to represent their place when joining.

When a player ceases being a player, is_player = false. If a player or ex-player leaves the server, they are no longer a player and their file is removed.

~/boot/commands[edit | edit source]

A command is a formatted set of instructions that can be sent to alter the system. Every command must have a file in ~/commands/ with the name of the command as its name. The file must describe the syntax for the command and provide a description for what it should do.

Concatenation of ~/commands/
Command Alternative Syntax Description
mk make mk {location} {name (no "/")} {contents as attached .txt file or code block} {owner or if blank: you} Creates a file at the specified location.
mkdir make_directory mkdir {location} {name (no "/")} {owner or if blank: you} Creates a directory at the specified location.
cp copy cp {location} {location} Copies a file or directory from one location and places the copy in another location.
mv move mv {location} {location} Moves a file or directory to a new location.
rm remove rm {location} Deletes a file or directory.
rn rename rn {location} {new name (no "/")} Changes the name of a file or directory.
et edit et {file location} {write/append or w/a} {new contents attached as .txt file or code block} Changes the contents of a file.
run run {file name} Executes the code in a file. Actions performed by this code are considered to have been done by you.
kill kill {reply or links to messages or message ids or if blank: all active} Terminates active processes ran by you.
sudo sudo {command} Executes a command as su. All players may vote (👍 or 👎) on whether or not permission is granted. After 48 hours, permission is granted if there are more 👍 than 👎 votes.

Each player may perform a number of commands per instance equivalent to their privileges value.

A player cannot perform a command (excluding sudo) unless they are the owner of the file and directory being affected.

~/boot/winning[edit | edit source]

The first player to become a 'superuser' (is_su = true) wins the cycle.