> `julia> write(STDIN, "\njulia> ")`
this is sometimes valid, but was really just a typo from coding at 4am.
generally it's sufficient to just use orig_stdout

> Where can I find the differences between entering commands into the Julia
console and writing them in Julia programs?
I put this code in a begin...end block so it would act the same at the
julia console and a julia program.

> For example, you use eval(REPL_ENV, ex) with two parameters
You can also use the one-arg form. I was playing around with different
ideas. The two-arg form should be added to the documentation.

> ERROR: no method _fd(TTY)
Can you open an issue? it seems there's a missing method on windows for this


On Mon, Mar 10, 2014 at 6:18 PM, Laszlo Hars <[email protected]> wrote:

> Jameson, Thanks, for the code sample. I tried it, but nothing visible
> happens. As far as I can tell, the program already exits at the first line
> of the infinite loop [the command write(STDIN, "\njulia> ")], with some
> error message, which I cannot see because of the redirected STDERR.
> Probably it is:
>
> ERROR: no method _fd(TTY)
>  in redirect_stdout at stream.jl:897
>
> It is very hard to write a program something like this for a noob, or just
> to understand it. E.g. If I try to redirect STDOUT in the Julia console
> (what your code does at the fourth last command), I just get an error:
> ~~~
> julia> redirect_stdout(STDOUT)
> ERROR: no method _fd(TTY)
>  in redirect_stdout at stream.jl:897
> ~~~
>
> Also, in the console I cannot write something to STDIN, either, but the
> error massage is different:
> ~~~
> julia> write(STDIN, "\njulia> ")
> ERROR: write: broken pipe (EPIPE)
> ~~~
>
> Yet, these could work in your code. Why?
> Where can I find the differences between entering commands into the Julia
> console and writing them in Julia programs?
>
> For example, you use eval(REPL_ENV, ex) with two parameters. The help()
> and Julia.pdf does not tell what it does. I can guess, but how could I get
> the exact meaning and how would I be able to write code with that? Do I
> have to look into the source code of the language? It could really help, if
> someone can point me to some extra documentation.
>
>

Reply via email to