The skeleton of the Decwar-playing robots is turning out to have other uses. It's now also the skeleton of an automated Tape Bridge between the local system and the DEC-10, in action within Project UTEXAS as tape.py in the msc folder.
The tape.py code automatically copies files from the local filesystem into the DEC-10 filesystem. It's as quick and simple as possible, for doing fast iterations around editing local files using modern tools and then smoothly syncing those edits onto the DEC-10. It's almost a fully automated filesystem sync between the local system and the DEC-10, and in fact could be made into such by scheduling periodic runs. It runs in the Docker container where the DEC-10 lives. The container is effectively an intermediary environment between the local system and the DEC-10. The local files are available live within the container and tape.py sees and copies them there. To use tape.py, work within a terminal session connected to the container. To schedule periodic runs for example, do that in the container, not in the local system. This is necessary because the tape drive and the mounted tape live in the container as part of the DEC-10, not in the local system. In other words, the hardware is in the container. The tape exists as a .tap file within the container's environment, and meanwhile the local system is simply a place for using modern tools to edit source code.
Execution begins in the container, where tape.py creates a temporary folder and copies in all necessary files. It then executes back10, named after the DEC-10 backup utility, to convert the temporary folder into a tape image with the TOPS-10 tape format. This step generates a standard tape archive .tap file and verifies its integrity by listing its contents. If tape.py is executed with a --simple argument it terminates here, leaving the tape ready for use, and this is in fact the route taken during startup of the container when the tape is initially mounted on the drive. There is one tape mounted on the drive from container startup onwards. What tape.py can do at any time is replace the contents of the tape. One tape, many writes to it, many restores from it within the DEC-10. This one tape is the bridge between the local filesystem and the DEC-10, and many files can pass over it at various times during its lifetime. More tape drives and tapes are possible. One alone is minimalist simplicity.
When not in --simple mode the code transitions into the restoration phase, utilizing the pexpect library to establish a programmatic telnet connection to the DEC-10. With pexpect, the code sends text and monitors terminal output for expected responses. To the DEC-10 the code is indistinguishable from a human user telnetting in. The code is a robot and the overall setup is a kind of Turing Test. As long as the robot acts like a human, everything is fine. This system was developed from late 2024 for the Decwar-playing robots. The full Decwar robots are more complex, but the essential skeleton was directly adapted into tape.py in roughly an hours work. The robot opens a telnet connection and logs in, then uses the standard TOPS-10 tape utility BACKUP to restore from the tape. The tape.py code here is actually a guide on how to use BACKUP, for whenever a restore needs to be done manually. It then gracefully logs out and closes the telnet connection.
No comments:
Post a Comment