I like the idea of plotting inside the web browser. However, in the current scheme it looks like the idea is to serve some html/js using d3 to create static plots sequentially in the web REPL. This is probably a nice simple way to get some basic plotting working, but it seems hard to extend so that one can "hold on" and put multiple plots on the same axes, or to update an existing plot to see time-varying behavior for example.
To me, it makes more sense in the long term for julia to include a text-based REPL through some network protocol maybe, as well as a separate data interface. Inside julia we could make data available to the outside world with something like publish(x,"some descriptive name for x")
whenever we have updated the x variable and are ready for those changes to be seen in a plot. Then a client can see the published data (shared via maybe JSON?) and plot it, or use the mtime to poll and update plots, etc. To keep the analogy with matlab, the plot() command can be a wrapper that combines the publishing with a network call to the client that suggests the graphical client should now plot y against x. Matlab xlabel, ylabel, title, etc can also be implemented as hints that are sent to the client regarding a suggested data view (created with a figure() command maybe).
This kind of data publishing interface of course could be useful for more than just visualization. It could provide a simple data sharing interface between different Julia sessions, a poor man's database but tied to computation instead of storage.
I like the idea of plotting inside the web browser. However, in the current scheme it looks like the idea is to serve some html/js using d3 to create static plots sequentially in the web REPL. This is probably a nice simple way to get some basic plotting working, but it seems hard to extend so that one can "hold on" and put multiple plots on the same axes, or to update an existing plot to see time-varying behavior for example.
To me, it makes more sense in the long term for julia to include a text-based REPL through some network protocol maybe, as well as a separate data interface. Inside julia we could make data available to the outside world with something like
publish(x,"some descriptive name for x")whenever we have updated the x variable and are ready for those changes to be seen in a plot. Then a client can see the published data (shared via maybe JSON?) and plot it, or use the mtime to poll and update plots, etc. To keep the analogy with matlab, the
plot()command can be a wrapper that combines the publishing with a network call to the client that suggests the graphical client should now plot y against x. Matlab xlabel, ylabel, title, etc can also be implemented as hints that are sent to the client regarding a suggested data view (created with afigure()command maybe).This kind of data publishing interface of course could be useful for more than just visualization. It could provide a simple data sharing interface between different Julia sessions, a poor man's database but tied to computation instead of storage.