2 ms·
Text isn't executable in plan 9 but it plays a major role in the design of how you interact with the system. The functionality you describe sounds like a mixtu
by MisterTea 6y ago
Text isn't executable in plan 9 but it plays a major role in the design of how you interact with the system.
The functionality you describe sounds like a mixture of Acme(1) text editor and the plumber(4) file server.
Acme editor allows you to exec highlighted text so long as the highlighted portion is a valid command string. For example: if you wanted the date printed in the Acme window from date(1) all you do is type <date, highlight it, middle click it, and date's stdout is redirected into the editor and the highlighted text is replaced with the output of date. Without the '<', the output would redirect to a new window. You can also put commands into the tag bar and right click them to execute. So when I'm writing plan 9 programs, I put mk into the tag bar of the programs directory and just click mk. Of course Acme works hand in hand with the plumber and you can send plumb messages from Acme too. Right clicking text in Acme plumbs it.
The plumber is a really neat program. All it does is listen for messages that are plain old text, tries to match the message to a rule, and that rule has an associated action. You load the rules by simply copying the rule file to the plumber rule file. So for example, you send a url to plumber, it's rule looks for http:// http://, matches it to a rule that says open mothra or netsurf and use the url as an argument and the website open in the browser. If you're inside acme and right click a header file in acme, plumber then just tells acme to open that file (assuming acme is in your rules file for text)
- mst 6y agoDo you know of a good video of this in action? I've managed to get a much better handle on smalltalk and slime by watching videos of people using them, but I dunno where to find one for acme (I looked, the ones I found didn't quite help me get my brain around it).
- mburns 6y agohttps://www.youtube.com/watch?v=dP1xVpMPn8M https://www.youtube.com/watch?v=dP1xVpMPn8M