conjure icon indicating copy to clipboard operation
conjure copied to clipboard

GNU Guile Scheme REPL not showing output

Open francium opened this issue 1 year ago • 8 comments

I'm trying to do some very simple Scheme REPL work.

I've got a very simple config and almost everything is working except for,

(display "Hello, World!")

Which is just giving me, when I do <leader>ee,

; --------------------------------------------------------------------------------
; eval (current-form): (display "Hello, World!")
; Empty result

Here's my relevant config,

Plug 'https://github.com/Olical/conjure'
let g:conjure#filetype#scheme = "conjure.client.guile.socket"
let g:conjure#client#guile#socket#pipename = ".guile-repl.socket"

And the script for creating the REPL and socket,

#!/usr/bin/env bash

SOCKET=$(git rev-parse --show-toplevel 2> /dev/null || pwd)/.guile-repl.socket

echo "$(tput bold)$SOCKET$(tput sgr0)"

if [ -f $SOCKET ]; then rm $SOCKET; fi
guile --listen=$SOCKET

rm $SOCKET

In the guile command line REPL, I get the expected result,

scheme@(guile-user)> (display "Hello, World!")
Hello, World!scheme@(guile-user)> 

Contrast this with ConjureSchool,

  (print "Hello, World!")

Here doing <leader>ee on this form results in,

; --------------------------------------------------------------------------------
; eval (current-form): (print "Hello, World!")
; (out) Hello, World!
nil

The (out) Hello, World! as expected.

So is this perhaps a GNU Guile limitation?

I'm very new to Lisp, Scheme, Guile and Conjure, so hopefully I'm not making some very obvious novice mistake. If I am please let me know.

francium avatar Sep 11 '22 02:09 francium

I think you need a newline at the end of the display call? Which isn't ideal, but that should work?

This is something that would probably be fixed by the future stdio client support rewrite.

Olical avatar Sep 11 '22 09:09 Olical

So this right,

(display "Hello, World!\n")

Then <leader>ee gives,

; --------------------------------------------------------------------------------
; eval (current-form): (display "Hello, World!\n")
; Empty result

francium avatar Sep 11 '22 16:09 francium

I tried out vim-slime with this config,

Plug 'https://github.com/jpalardy/vim-slime'
let g:slime_target = "tmux"
let g:slime_paste_file = tempname()

That was working without any issues, so may just be an issue with with stdio client in conjure as you mentioned.

So it's not too urgent for me. I can work with vim-slime for my very basic needs and use conjure if I play around with another Lisp at some point.

conjure is really great compared to vim-slimebtw based on my very brief experience using both.

francium avatar Sep 11 '22 16:09 francium