MessiahAndrw wrote:
Then it raises more complicated questions - should the output be interactive (e.g. a graph you can play with the variables, a 3D chart you can rotate), and if you did have executable, interactive code running in the frontend - can it communicate to the backend? (Like a web browser and a server?)
I was thinking of one way to make this interactive - your application would print markout to the terminal - that means it could print tables, images, buttons, input fields, etc. There's no reason that it can't print commands using this markup, which includes modifying what it's already printed, for example:
Code:
<remove id="mybutton"/><set id="myinput" field="disabled" value="true"/>
Likewise, events such as a button click, keydown, etc. could be sent back via stdin.
For example:
Code:
Enter your name: <input type="text" id="name" value=""/>
<button on_click="button_clicker_handler">Click Me</button>
You click it, and the terminal writes to stdin:
Code:
button_click_handler.
Your program writes:
Code:
<query id="query234897" id="text" property="value" />
The terminal sends back:
Code:
resp.query234897.MessiahAndrw
Then the application can print:
Code:
Hello MessiahAndrw
You could even send pipe this over a network!