chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error: unbound variable: readline#make-readline-port


From: Damien MATTEI
Subject: Re: Error: unbound variable: readline#make-readline-port
Date: Mon, 2 Mar 2020 13:56:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

thank Vasilij, it works now with both

with linenoise, adding that in .csirc:


(use linenoise)
(current-input-port (make-linenoise-port))

(set-history-length! 300)

(load-history-from-file "/home/mattei/.chicken-scheme-history")

(let loop ((expr (linenoise "> ")))
              (cond ((equal? expr "(bye)")
                             (save-history-to-file "/home/mattei/.chicken-scheme-history")
                             (exit))
                    (else
                        (display (eval (read (open-input-string expr))))
                        (newline)
                        (history-add expr)
                        (loop (linenoise "> ")))))


and with readline:

(use readline)
(current-input-port (make-readline-port))

(install-history-file #f ".chicken-scheme-history")


Damien

Le 02/03/2020 à 12:41, Vasilij Schneidermann a écrit :
Hello Damien,

You'll want to `(use readline)` and `(use linenoise)` with CHICKEN 4.
While `(import readline)` can be used, its purpose is different as it
only loads bindings and doesn't load the shared library.  With CHICKEN 5
this behavior has been consolidated, you'd use `(import readline)` and
`(import linenoise)` there (assuming there was a readline egg).

Vasilij



reply via email to

[Prev in Thread] Current Thread [Next in Thread]