conjure icon indicating copy to clipboard operation
conjure copied to clipboard

Hy client not showing output

Open madhat2r opened this issue 10 months ago • 5 comments

I tried executing something very simple '(+1 2)' it appears that it does not execute at all.

; Sponsored by @campbellr ❤
 ; --------------------------------------------------------------------------------
 ; "hy --repl-output-fn=hy.repr" (started)
 ; --------------------------------------------------------------------------------
 ; eval (current-form): (+ 1 2)

I can start a repl in terminal using same command and it works:

Hy 0.28.0 using CPython(main) 3.11.4 on Linux
=> (+ 1 2)
3
=> 

Do you have any idea why this is not working?

madhat2r avatar Apr 15 '24 17:04 madhat2r

have the same issue

zavvdev avatar Apr 18 '24 20:04 zavvdev

Looking into this now, I suspect it's due to a change in Hy but I'm not sure what yet. I'm reading through the changelog and seeing if I can get it to work again.

Olical avatar Apr 19 '24 11:04 Olical

https://github.com/hylang/hy/issues/2546 I think the existing code used the ps2 override feature, so that might be part of it.

Olical avatar Apr 19 '24 11:04 Olical

I think I fixed it on the develop branch? It's to do with recent changes to Hy and maaaaybe it's a Hy bug? I think the two required things are -i to force it to start a REPL even though we're not running it under a TTY and I seem to need to give it a piece of code to execute first before it'll drop into a REPL. I opted to do this with -c "Ready!", so it' evaluates that string THEN drops into a REPL.

Both options seem to be required now, I think really it should drop into a REPL with just -i and no -c but this works for us. Hope that helps!

Olical avatar Apr 19 '24 12:04 Olical

Thanks @Olical that did the trick for me.

madhat2r avatar Apr 19 '24 13:04 madhat2r