Bloux

From Esolang
Jump to navigation Jump to search

Bloux is an esoteric shell/file management system invented by User:iconmaster in December 2011. It implements a basic level of file management through stacking files in rectangular blocks.

Architecture

The workspace in which blocks are placed is called the Blockventory. In it are files encased on blocks, whose size is determined by how large the file is. Every time a new block is added to the Blockventory, it automatically puts the block down into the blockventory where the deepest empty spot is, whether or not it will actually fit. The Blockventory has a finite size determined by memory space. Other than the Blockventory is the Blocksack, which is a small (3-item by default) Stack that can hold blocks temporarily. If an Blocksack overflow occurs, all the items on the sack are put into the Blockventory. If there is no room to put a block into he Blockventory, the block is destroyed. Blocks are accessed by specifying a column number. The top block in that column is accessed. When a block is removed from the middle, gravity draws the upper blocks lower if possible. In addition to normal blocks, there are metablocks, in which other blocks are stored inside. You can make a metablock work as the current Blockventory, thus creating a simple hierarchy system.


Commands

All commands delivered to the Bloux shell are one-character symbols, optionally with colon-seperated arguments. Multiple commands are separated by spaces. Commands also have a 4-character mnemonic associated with them, but unused in the shell. Bloux's 16 commands are:

Command Mnemonic Arguments Description
! PEEK col Looks at the contents of a block specified by col.
? LOOK n/a Prints a graphical representation of the Blockventory.
+ GRAB col Puts the block at the specified column into the Blocksack.
- PLOP n/a Takes the top member of the Blocksack and puts it into the Blockventory.
* REND col Deletes the block at the specified column.
# SIZE col:wXh Re-sizes the block at the specified column and places it back into the Blockventory.
: FILL [wXh:]content Creates a new block, optionally of a specified size, with the specified content, into the Blockventory.
; MAKE wXh Creates a new metablock with the specified size and places it into the Blockventory.
= EXEC col Executes, as Bloux shell ode, the contents of the block at the specified column.
^ FLEE [col] If col is not specified, returns you to the parent Blockventory. If col is specified, it takes you into the metablock specified by col.
~ QUIT n/a Exits the Bloux shell.
$ TEAR col:axis:size Axis is either 'w' or 'h'. Size is the value in which the block at col will be split into 2 portions and places back into the Blockventory.
% JOIN col1:col2:axis Takes blocks specified by the 2 cols and joins them together along the specified axis, and places the new bigger bloc into the Blockventory.
& TACK col:content Appends content to the end of the block specified by col if there is spare room for data in the block.
| PROG subsym A bunch of sub-commands used for program logic.
@ SACK n/a Displays data concerning the stack.