Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hy client not showing output #568

Open
madhat2r opened this issue Apr 15, 2024 · 5 comments
Open

Hy client not showing output #568

madhat2r opened this issue Apr 15, 2024 · 5 comments
Labels
bug Something isn't working client-hy

Comments

@madhat2r
Copy link

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?

@zavvdev
Copy link

zavvdev commented Apr 18, 2024

have the same issue

@Olical Olical added bug Something isn't working client-hy labels Apr 19, 2024
@Olical
Copy link
Owner

Olical commented Apr 19, 2024

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
Copy link
Owner

Olical commented Apr 19, 2024

hylang/hy#2546 I think the existing code used the ps2 override feature, so that might be part of it.

Olical added a commit that referenced this issue Apr 19, 2024
@Olical
Copy link
Owner

Olical commented Apr 19, 2024

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!

@madhat2r
Copy link
Author

Thanks @Olical that did the trick for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client-hy
Projects
None yet
Development

No branches or pull requests

3 participants