Article View: comp.lang.lisp
Article #28Re: REPL, streams, SBCL
From: steve g
Date: Thu, 15 Oct 2026 19:06
Date: Thu, 15 Oct 2026 19:06
67 lines
3500 bytes
3500 bytes
Lawrence DβOliveiro <ldo@nz.invalid> writes: > On Mon, 12 Oct 2026 17:32:46 -0400, steve g wrote: > >> I was interested in changing the REPL for SBCL. > > Probably easier to run it in an environment like Jupyter. Even without > a custom SBCL kernel, just the regular β%%script magicβ already lets > you do some useful things. > > β > %%script sbcl > (+ 2 2) > β > This is SBCL 2.6.4.debian, an implementation of ANSI Common Lisp. > More information about SBCL is available at <http://www.sbcl.org/>. > > SBCL is free software, provided as is, with absolutely no warranty. > It is mostly in the public domain; some portions are provided under > BSD-style licenses. See the CREDITS and COPYING files in the > distribution for more information. > * 4 > * > You probably want to turn off the startup banner message, and the β*β > characters from the default prompting for input by the REPL. The > `--script` option does this, but it also turns off automatic output of > expression values: Yes. again, this has changed my thinking; --script, like duh! You know they say the best way to check your documant is by getting someone else to read it; thank you for this. > β > %%script sbcl --script > (+ 2 2) ; produces no output > (princ (+ 2 2)) ; need to do explicit output > β > 4 This is very helpful. I did not even think about this. > This may be OK for running functional scripts, but it is not so > convenient for simple experimentation. > > Alternatively, the `--noinform` option turns off the startup banner. > You can then change the prompt to the empty string by setting the > SBCL-specific `sb-aclrepl:*prompt*` variable. To access this, you need > to `require` the `sb-aclrepl` package. To avoid spurious output, this > can all be done with `--eval` options on the command line: > > β > %%script sbcl --noinform --eval "(require 'sb-aclrepl)" --eval "(setq sb-aclrepl:*prompt* \"\")" > (+ 2 2) > β > 4 > > Gets a bit complicated, but at least itβs not always necessary ... agreed. thank you for your spare eyes and your time.
Technical Details
Message-ID:
<8733u6wzqe.fsf@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.32.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<87wlrmeha9.fsf@gmail.com> <11ajq5a$2i7p$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.32.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 15 Oct 2026 19:06:18 +0000 From: steve g <Sgonedes1977@gmail.com> Newsgroups: comp.lang.lisp Subject: Re: REPL, streams, SBCL References: <87wlrmeha9.fsf@gmail.com> <11ajq5a$2i7p$1@dont-email.me> Date: Thu, 15 Oct 2026 15:06:01 -0400 Message-ID: <8733u6wzqe.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:qqciwNnnmguUpN8diPWJWVy3zJs= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lines: 67 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-uaA5IASvW4XDw30zR0b7N8IOmKuB8NrmYbU77d2f2M0VGTYQMuYX/wLPoHHMH+IDTFS7sZUXLKDcRVc!mUEXyLq024HIyjYaZn4Lt/f3tfO2LLg5INYSGoUxe+ZatyY= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40