The idea of reading and writing to a REPL by reading and writing unframed
inputs and output over a UNIX-style stream pair is fundamentally broken.
The biggest issue is that the REPL interaction is fundamentally
message-oriented while streams are, by definition, not. There's also the
issue that you need much more than "just a send a chunk of code and get a
result back" because sometimes there's no result to send back – it's an
error instead, and there are many kinds of errors, including ones where the
input was incomplete or irrecoverably incorrect. This is inherent to the
problem of REPL style interaction. You can either handle the problem in an
incomplete way and live with the brokenness of it, or you can do it right
and live with the fact that it's complex. This is emphatically not some
unnecessary complexity that Julia has foisted on you – if you want
something that acts like a REPL, you have to implement the front end of a
REPL.


On Fri, Jul 4, 2014 at 2:20 PM, Terence Copestake <
[email protected]> wrote:

> I'm not convinced I've understood this thread 100%, but the issue caught
> my interest so I went away and had a play. I've put together a gist of a
> .juliarc.jl file that ended up being a retake on things already mentioned
> here, so it's possible that it's still not the solution you're looking for.
>
> The gist is up at https://gist.github.com/tcopestake/3b3c0891d4ca29df9f09
>
> (Note that I've been testing this in a REPL opened with the --color=no
> option)
>
> Typing commands in the REPL, I can see output on the screen and it's also
> logged in the julia-stdout.txt file.
>
> Is this not what you're looking for? Perhaps if you can point out what my
> code doesn't do that you need it to do, I can have another look into it.
>
> Stay safe.
>

Reply via email to