Simple REPL for a DPL including a file watcher. <h...
# devlog-together
g
p
Impressive! Have you considered writing the output and probe values back to the diagram, so when saving in draw-io, the server reads the diagram, runs the program and then saves the outputs back into that diagram? So the output would be visible within the diagram too. On a sidenote, the frontend part is not probably relevant, but i've found building similar barebones interfaces rewarding with htmx with the websocket extension.
g
Interesting. I know nothing about HTMX yet, but, I'm quite interested in what use-case you see in being able to inject data through probes.
p
I did not mean to inject data via the probes, but to write the probe output as well as program output back to the draw.io file. The programmer would then see values in the diagram change when saving their work. If the draw.io file is both the input and output, then draw.io can be the IDE in itself. Just a thought i had.
g
@Pietu Instead of asking a question, let me paraphrase what I think you are suggesting as a way of checking to see if I understood what you meant (I'm blinkered by my biases, forgive me if I've still got it wrong). I think you mean to get rid of the HTML IDE window on the right and just display everything on the draw.io diagram? I don't know how easy that is to accomplish with draw.io (nor, if it has a programming API to help with such a thing. Draw.io has the graphical elements needed, but, I don't know if I could can them from the outside. I haven't explored what it means to embed the draw.io editor in an HTML page - maybe that would be the way to proceed?). No, I hadn't thought of that - thanks! My main goal was to see if I could build a usable REPL in 1/2 hour for "any" programming language (not just the DPL shown here, using draw.io) that would help me debug source code I'd written in that language (for a larger project). I'm on day 3 now, so I've failed at the original goal, but, this path of thinking is suggesting many other quirky possibilities, so I keep poking at it.
p
I think you mean to get rid of the HTML IDE window on the right and just display everything on the draw.io diagram.
You got it right!
My main goal was to see if I could build a usable REPL in 1/2 hour for "any" programming language (not just the DPL shown here
I missed this part, thanks for clarifying!
this path of thinking is suggesting many other quirky possibilities, so I keep poking at it.
It's a lot of fun wrapping existing software speaking stdio and providing an alternative interface for them. I've done similar work. My experiments differ from the one in your video in that I've usually attempted to map the messages from the html frontend to the application stdin. This only works for CLI-tools that support a REPL mode, so your approach is more general. Anyway, thanks for sharing!