ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
hellstabber has quit [Quit: Connection closed for inactivity]
<FromGitter> <mattrberry> > because ofc you could use overloads on `a` to handle it, otherwise yea guess you just cant use that type in this context ⏎ ⏎ @Blacksmoke16 Not too reduced, no. This is the real example https://github.com/crystal-lang/crystal/pull/12671/files#diff-bc28f7dec142050c0b65d0ca3055ab62f8c3eb9006ed6ab2826ef70ed8eb4abbR272
<FromGitter> <Blacksmoke16> 👍
lanodan has quit [Ping timeout: 246 seconds]
lanodan has joined #crystal-lang
ur5us has quit [Ping timeout: 250 seconds]
_ht has joined #crystal-lang
walez has joined #crystal-lang
_ht has quit [Remote host closed the connection]
walez has quit [Read error: Connection reset by peer]
walez has joined #crystal-lang
Starfoxxes has quit [Ping timeout: 240 seconds]
Starfoxxes has joined #crystal-lang
wowi42 has joined #crystal-lang
hightower2 has joined #crystal-lang
hightower2 has quit [Ping timeout: 246 seconds]
taupiqueur has quit [Remote host closed the connection]
hightower2 has joined #crystal-lang
hightower2 has quit [Read error: Connection reset by peer]
taupiqueur has joined #crystal-lang
walez has quit [Quit: Leaving]
jmdaemon has quit [Ping timeout: 240 seconds]
Sankalp has quit [Ping timeout: 272 seconds]
Sankalp has joined #crystal-lang
<FromGitter> <noaheverett> Having a interesting issue with running a command with Process.new (or .run) and interacting with it via the input/output pipe (either passed or provided by .run |proc|)
<FromGitter> <noaheverett> If I run say "bash" and send in "pwd" via input and read the response via output, works great
<FromGitter> <noaheverett> but I have a specific "daemon" i'm running that generates output and also takes input that it's not taking any input (or at least not visibly responding)
<FromGitter> <noaheverett> if I set the input pipe to STDIN, it responds to my keyboard input
<FromGitter> <noaheverett> but if I set it to a custom pipe (i.e. reader,writer = IO.pipe) it doesn't seem to respond
<FromGitter> <noaheverett> is it possible the command I'm running is just not working correctly with a non-STDIN pipe or any way to debug this in Crystal I may not be thinking of? Tried variations of spawn loops, trying Process.new/Process.run and running with shell and without
<FromGitter> <noaheverett> Ex: this doesn't respond to input pipe ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=635bd6e7f00b697fec6217f5]
<FromGitter> <noaheverett> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=635bd70b9ee3ec22b4e408de]
hightower2 has joined #crystal-lang
<FromGitter> <noaheverett> However if I set input to STDIN, it captures my keystrokes and responds, but does not when sending in manually via a pipe
<FromGitter> <noaheverett> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=635bd75986407c265b939b34]
<FromGitter> <Blacksmoke16> what happens if you do `input: :inherit`?
<FromGitter> <noaheverett> @Blacksmoke16 gives error if I try to manually write to proc.input `Unhandled exception: Process#input cannot be nil (NilAssertionError)` but if I remove the manual input command it works with my keyboard input like I had set it to STDIN
<FromGitter> <Blacksmoke16> try `input: :pipe` then
<FromGitter> <noaheverett> @Blacksmoke16 in that case, it acts like the first code example and doesn't respond
<FromGitter> <noaheverett> thank you for your help btw, this is day two on debugging this ðŸĪŠ beginning to think maybe the `chs` command just isn't responding correctly to a non STDIN pipe but not for sure
<FromGitter> <Blacksmoke16> hmm
<FromGitter> <noaheverett> One other thought, the `chs` command is booting a VM and presenting the Linux login screen console, maybe the input isn't triggering the console "return" key like STDIN keyboard input? I've tried puts (which sends a newline) print with variations of \r or \n
<FromGitter> <Blacksmoke16> there any flags you need to pass to force it to use input IO when it sees its not a tty?
<FromGitter> <noaheverett> I'll check into that, I appreciate your help!
hightower2 has quit [Remote host closed the connection]
taupiqueur has quit [Ping timeout: 244 seconds]
taupiqueur has joined #crystal-lang
FromGitter has quit [Ping timeout: 260 seconds]
FromGitter has joined #crystal-lang
hellstabber has joined #crystal-lang
_ht has joined #crystal-lang
taupiqueur has quit [Remote host closed the connection]
taupiqueur has joined #crystal-lang
walez has joined #crystal-lang
taupiqueur has quit [Remote host closed the connection]
hellstabber has quit [Quit: Connection closed for inactivity]
taupiqueur has joined #crystal-lang
_ht has quit [Remote host closed the connection]
hightower2 has joined #crystal-lang
jmdaemon has joined #crystal-lang
scopesoft has joined #crystal-lang
scopesoft has quit [Quit: Client closed]
Sankalp has quit [Ping timeout: 272 seconds]
walez has quit [Ping timeout: 240 seconds]
Sankalp has joined #crystal-lang
ur5us has joined #crystal-lang