Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.lisp > #61739
| 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 | 2026-10-15 15:06 -0400 |
| Message-ID | <8733u6wzqe.fsf@gmail.com> (permalink) |
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.
Back to comp.lang.lisp | Previous | Next — Previous in thread | Find similar | Unroll thread
REPL, streams, SBCL steve g <Sgonedes1977@gmail.com> - 2026-10-12 17:32 -0400
Re: REPL, streams, SBCL Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-12 23:23 +0000
Re: REPL, streams, SBCL steve g <Sgonedes1977@gmail.com> - 2026-10-15 15:06 -0400
csiph-web