[Top][All Lists]

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

Re: How to get a useful repl with Chicken 5?

From: Daniel Ortmann
Subject: Re: How to get a useful repl with Chicken 5?
Date: Thu, 30 Jan 2020 12:28:20 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

How about: rlwrap csi

It has been good to me, saving the history into ~/.csi_history

On 1/30/20 12:01 PM, Matt Welland wrote:
Line editing and saving history make using a repl much more productive for me. With chicken 4 I was able to get a useful repl with something like this sequence of calls:

(import extras) ;; might not be needed?
(import readline)
(import apropos)
;; my imports here ...
(install-history-file (get-environment-variable "HOME") ".some_history")
(current-input-port (make-readline-port "someprog> "))

I've tried linenoise but don't see how to save the history:

(import linenoise)
(set-history-length! 300)
(load-history-from-file historyf)
(current-input-port (make-linenoise-port))
;; (save-history-to-file historyf) ;; doesn't work :(

I've read the docs on linenoise and breadline but I'm not seeing how to get a useful editable repl.

Any pointers or suggestions would be appreciated.
Complexity is your enemy. Any fool can make something complicated.
It is hard to keep things simple. - Richard Branson.

reply via email to

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