Keno / REPL.jl

Pure-julia REPL implementation
Other
3 stars 4 forks source link

Running/testing on windows #7

Closed quinnj closed 11 years ago

quinnj commented 11 years ago

Hey Keno,

I'd love to test/run this on Windows. I've tried digging into everything the past couple of days, but haven't quite gotten the REPL to run yet. I've been trying to follow different discussions and implement code snippets scattered throughout, but I think everything has been changing so fast that the code quickly becomes deprecated.

I'm on Windows 8, 64-bit. I have a ncurses library that seems to work find (I can dlopen) that I got from here (see very bottom of the page).

But when I actually try to run the repl, it seems I'm having trouble getting the STDIN, STDOUT TTY's setup correctly.

julia> using REPL

julia> REPL.run_repl(Terminals.Unix.UnixTerminal("xterm",Base.TTY(STDIN;readable=true),Base.TTY(STDOUT),Base.TTY(STDERR)))
ERROR: no method TTY(Array{Any,1},Pipe)WARNING: 
backtraces on your platform are often misleading or partially incorrect

julia> Base.TTY(STDIN;readable=true)
ERROR: no method TTY(Array{Any,1},Pipe)

julia> REPL.run_repl(Terminals.Unix.UnixTerminal("xterm",Base.TTY(STDIN),Base.TTY(STDOUT),Base.TTY(STDERR)))
ERROR: I/O object not initialized
 in isopen at stream.jl:241
 in check_open at stream.jl:247
 in write at stream.jl:643

julia> t = Base.TTY(STDOUT)
TTY(uninit, 0 bytes waiting)

julia> t.status
0

I realize this is all very expiremental and if you just want to close and say wait for things to mature, I totally understand.

Keno commented 11 years ago

I haven't tried it on Windows yet. Will do so soon. Shouldn't be too difficult, it might just be missing a couple definitions.

Keno commented 11 years ago

This works fine to me with the latest version of all code involved:

julia.bat -e "require(\"REPL\"); REPL.run_repl(Terminals.Unix.UnixTerminal(\"xterm\",STDIN,STDOUT,STDERR))"