Half-Broken Car in Heavy Web Traffic

From Esolang
Jump to navigation Jump to search

Half-Broken Car in Heavy Web Traffic is an esolang by User:BoundedBeans as a derivative of Half-Broken Car in Heavy Traffic. If implemented, it would allow for Half-Broken Car in Heavy Traffic to be used on the web.

New commands

. Output the cell immediately, rather than waiting until the program ends. The ending output will be done after this output.
, Input the cell immediately, instead of at the beginning. The initial input will be only the first line, but this command is capable of grabbing more. Newline characters are included, and in fact, if any more input is actually given, the first character that will be input will always be either a newline or a carriage return, depending on which format is used in the input. EOF inputs -1.
$ Open a server socket with the port of the current cell. Change the . and , commands to use the socket buffer instead.
% Close the existing socket. Change the . and , commands back to stdin and stdout.
` Move the data pointer to the right repeatedly, accumulating characters into a string until -1 is reached. When -1 is reached, execute the string as Javascript (probably using eval or something). The pointer ends on the -1 before moving to the next command. Note that this will require a line containing @evaljs, otherwise it will throw an error. This is to allow things using code in this language to check whether it could run malicious code, and use caution.