Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Equal bytes for women.


devel / comp.lang.lisp / Learning the REPL

SubjectAuthor
* Learning the REPLDaniel Cerqueira
+- Re: Learning the REPLSpiros Bousbouras
`* Re: Learning the REPLJulieta Shem
 `* Re: Learning the REPLDaniel Cerqueira
  +- Re: Learning the REPLJulieta Shem
  +- Re: Learning the REPLSpiros Bousbouras
  `- Re: Learning the REPLLawrence D'Oliveiro

1
Learning the REPL

<87mssh5opo.fsf@brilhante.top>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17966&group=comp.lang.lisp#17966

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dan.list@brilhante.top (Daniel Cerqueira)
Newsgroups: comp.lang.lisp
Subject: Learning the REPL
Date: Sat, 03 Feb 2024 19:31:47 +0000
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <87mssh5opo.fsf@brilhante.top>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="870f23d3ae3d6cf131fa3aefaee452ba";
logging-data="3431515"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/IdmJFbdupciTggq+RMQOSaSZ8Vsad3AQ="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:MvlrMFDn1idrxRIn/doNRAJOf7M=
sha1:I/ObC/1BPqYvSli2ajMuAEno6sI=
 by: Daniel Cerqueira - Sat, 3 Feb 2024 19:31 UTC

Hi.

I am learning Common Lisp, and I use SBCL as my implementation.

Are there any books about the REPL? SBCL's in my case.

I can see that the REPL is a very powerful tool, but I don't know yet
how to use it properly. I would feel more confident, if I knew how to
recover from an error, and, specially, how to debug Common Lisp code.

Is there any place on the Internet, or any book, that can teach me this?

Thanks

Re: Learning the REPL

<TyJyEIf6ld4za2Ubn@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17968&group=comp.lang.lisp#17968

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.lisp
Subject: Re: Learning the REPL
Date: Sun, 4 Feb 2024 11:02:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <TyJyEIf6ld4za2Ubn@bongo-ra.co>
References: <87mssh5opo.fsf@brilhante.top>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 4 Feb 2024 11:02:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="66b27d709fd000019d961a87827c8bca";
logging-data="3813445"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ltd1r4QA1lamkzO8z9MFC"
Cancel-Lock: sha1:lSGz5ykvjuPvcxprtHVOcAlOmnE=
In-Reply-To: <87mssh5opo.fsf@brilhante.top>
X-Server-Commands: nowebcancel
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Sun, 4 Feb 2024 11:02 UTC

On Sat, 03 Feb 2024 19:31:47 +0000
Daniel Cerqueira <dan.list@brilhante.top> wrote:
> Hi.
>
> I am learning Common Lisp, and I use SBCL as my implementation.
>
> Are there any books about the REPL? SBCL's in my case.
>
> I can see that the REPL is a very powerful tool, but I don't know yet
> how to use it properly. I would feel more confident, if I knew how to
> recover from an error, and, specially, how to debug Common Lisp code.
>
> Is there any place on the Internet, or any book, that can teach me this?

I don't think that the subject is anywhere near complicated enough to
require a book. For REPL outside the debugger , you simply normally enter
Common Lisp code , there's nothing special. Within the debugger there are
some special debugging commands which you can see by typing h .I think
they are self-explanatory but if you don't know what some of them mean ,
ask here. But basically , once you have something non trivial to debug ,
you experiment with the commands and see which you find most useful. Note
that the anount of information some of the debugging commands offer also
depends on the settings that were used to compile the code.

Standard variables *PRINT-LEVEL* and *PRINT-LENGTH* are not specific to
the debugger but perhaps their values are most relevant there.

Re: Learning the REPL

<875xz4z4ff.fsf@yaxenu.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17969&group=comp.lang.lisp#17969

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jshem@yaxenu.org (Julieta Shem)
Newsgroups: comp.lang.lisp
Subject: Re: Learning the REPL
Date: Sun, 04 Feb 2024 11:31:48 -0300
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <875xz4z4ff.fsf@yaxenu.org>
References: <87mssh5opo.fsf@brilhante.top>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="b81c3683401a7274d948adffbc0003e3";
logging-data="3881524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wmDHeUQz+93Xte+9DNT/9drUqYuXsQo8="
Cancel-Lock: sha1:jPelUc/PX7/QN0ELN0N3YccPUUQ=
sha1:OOwhFONLyTMSRJQ4XEEq9ro4trY=
 by: Julieta Shem - Sun, 4 Feb 2024 14:31 UTC

Daniel Cerqueira <dan.list@brilhante.top> writes:

> Hi.
>
> I am learning Common Lisp, and I use SBCL as my implementation.
>
> Are there any books about the REPL? SBCL's in my case.

When you say SBCL's REPL, it seems you're using the REPL directly and
not through another software such as the GNU EMACS, say. If you use the
program rlwrap (readline-wrap), that's already an improvement to SBCL's
REPL because you get GNU readline support.

But you're using the GNU EMACS, so why not go with SLIME? It's, after
all, the *superior* lisp interaction mode. Screenshot at

https://slime.common-lisp.dev/

> I can see that the REPL is a very powerful tool, but I don't know yet
> how to use it properly. I would feel more confident, if I knew how to
> recover from an error, and, specially, how to debug Common Lisp code.

My SBCL debugger tells me what to do.

$ sbcl
This is SBCL 2.3.7, 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.
* (error 'x "hello")

debugger invoked on a SIMPLE-ERROR in thread
#<THREAD tid=7816 "main thread" RUNNING {10013A8003}>:
odd-length initializer list: ("hello").

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.

(SB-KERNEL:ALLOCATE-CONDITION X "hello")
0] 0
* (format t "hello~%")
hello
NIL
*

> Is there any place on the Internet, or any book, that can teach me this?

Peter Seibel's ``Practical Common Lisp'' guides you with the GNU EMACS
and SLIME. Chapter 2. I use the GNU EMACS and SLIME. It's wonderful.

I saw a bundle of EMACS these days that I can't remember the name. It
came with the GNU EMACS, SBCL and SLIME ready to be used for studying
Common Lisp. Found it---it's called Portacle.

https://portacle.github.io/

You could use it right away while you learn how to set up SLIME on your
own GNU EMACS and take it from there.

Re: Learning the REPL

<87a5og5k6y.fsf@brilhante.top>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17972&group=comp.lang.lisp#17972

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dan.list@brilhante.top (Daniel Cerqueira)
Newsgroups: comp.lang.lisp
Subject: Re: Learning the REPL
Date: Sun, 04 Feb 2024 15:21:41 +0000
Organization: A noiseless patient Spider
Lines: 79
Message-ID: <87a5og5k6y.fsf@brilhante.top>
References: <87mssh5opo.fsf@brilhante.top> <875xz4z4ff.fsf@yaxenu.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="d0cc5d39c64faabd5b9aed3b3dd24316";
logging-data="3894681"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bZWwg7Z8FCIZTziaG5zmJ1dKagVjXjUw="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:HcoPB8iyuM3merNYDExsmuHrEQI=
sha1:uoRCM6LiEwvyrlICN/lZsaTVEoY=
 by: Daniel Cerqueira - Sun, 4 Feb 2024 15:21 UTC

Julieta Shem <jshem@yaxenu.org> writes:

> Daniel Cerqueira <dan.list@brilhante.top> writes:
>
>> Hi.
>>
>> I am learning Common Lisp, and I use SBCL as my implementation.
>>
>> Are there any books about the REPL? SBCL's in my case.
>
> When you say SBCL's REPL, it seems you're using the REPL directly and
> not through another software such as the GNU EMACS, say. If you use the
> program rlwrap (readline-wrap), that's already an improvement to SBCL's
> REPL because you get GNU readline support.
>
> But you're using the GNU EMACS, so why not go with SLIME? It's, after
> all, the *superior* lisp interaction mode. Screenshot at
>
> https://slime.common-lisp.dev/
>
>> I can see that the REPL is a very powerful tool, but I don't know yet
>> how to use it properly. I would feel more confident, if I knew how to
>> recover from an error, and, specially, how to debug Common Lisp code.
>
> My SBCL debugger tells me what to do.
>
> $ sbcl
> This is SBCL 2.3.7, 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.
> * (error 'x "hello")
>
> debugger invoked on a SIMPLE-ERROR in thread
> #<THREAD tid=7816 "main thread" RUNNING {10013A8003}>:
> odd-length initializer list: ("hello").
>
> Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
>
> restarts (invokable by number or by possibly-abbreviated name):
> 0: [ABORT] Exit debugger, returning to top level.
>
> (SB-KERNEL:ALLOCATE-CONDITION X "hello")
> 0] 0
> * (format t "hello~%")
> hello
> NIL
> *
>
>> Is there any place on the Internet, or any book, that can teach me this?
>
> Peter Seibel's ``Practical Common Lisp'' guides you with the GNU EMACS
> and SLIME. Chapter 2. I use the GNU EMACS and SLIME. It's wonderful.
>
> I saw a bundle of EMACS these days that I can't remember the name. It
> came with the GNU EMACS, SBCL and SLIME ready to be used for studying
> Common Lisp. Found it---it's called Portacle.
>
> https://portacle.github.io/
>
> You could use it right away while you learn how to set up SLIME on your
> own GNU EMACS and take it from there.

Well, sorry for causing confusion. I use GNU Emacs, not SBCL on a
command line. The difference is that, I use M-x run-lisp , instead of
SLIME. SLIME does not let it's users create lisp images, and that put me
off. Besides that important missing feature, if Emacs already has that
feature, why install an extra package?

What I specifically am looking for, is how to use the SBCL debugger. It
has a lot of features, and I am looking for some hand-guiding on this
(maybe a book? or an web page?).

Also, it would be great if I just knew how to set up breakpoints on lisp
code (using GNU Emacs), that would take me to the SBCL debugger, when
reached.

Re: Learning the REPL

<87ttmoqhzz.fsf@yaxenu.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17973&group=comp.lang.lisp#17973

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jshem@yaxenu.org (Julieta Shem)
Newsgroups: comp.lang.lisp
Subject: Re: Learning the REPL
Date: Sun, 04 Feb 2024 14:03:28 -0300
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <87ttmoqhzz.fsf@yaxenu.org>
References: <87mssh5opo.fsf@brilhante.top> <875xz4z4ff.fsf@yaxenu.org>
<87a5og5k6y.fsf@brilhante.top>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="b81c3683401a7274d948adffbc0003e3";
logging-data="3934608"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Gmwprnek2BzGB4V7jv+9wwcyLtyW/YP0="
Cancel-Lock: sha1:PT/6M8AaFS6CsC1i2wSp9r/yg04=
sha1:OZjbuMCON933Fsarn4NF5/1Xb/M=
 by: Julieta Shem - Sun, 4 Feb 2024 17:03 UTC

Daniel Cerqueira <dan.list@brilhante.top> writes:

> Julieta Shem <jshem@yaxenu.org> writes:
>
>> Daniel Cerqueira <dan.list@brilhante.top> writes:

[...]

> Well, sorry for causing confusion. I use GNU Emacs, not SBCL on a
> command line. The difference is that, I use M-x run-lisp , instead of
> SLIME. SLIME does not let it's users create lisp images, and that put me
> off. Besides that important missing feature, if Emacs already has that
> feature, why install an extra package?

Beginner here. I don't even know if SLIME can't create images. I think
you want to create your own images of SBCL as changed by the REPL? The
images I usually create here are just executable programs.

$ cat build-exe.lisp
(load "~/.sbclrc")
(ql:quickload :package :silent t)
(sb-ext:save-lisp-and-die #P"package.exe"
:toplevel #'package:main
:executable t)

$ cat Makefile
exe: package.lisp build-exe.lisp
sbcl --script build-exe.lisp

$ make exe
sbcl --script build-exe.lisp

$ file package.exe
package.exe: PE32+ executable (console) x86-64, for MS Windows

> What I specifically am looking for, is how to use the SBCL debugger. It
> has a lot of features, and I am looking for some hand-guiding on this
> (maybe a book? or an web page?).
>
> Also, it would be great if I just knew how to set up breakpoints on lisp
> code (using GNU Emacs), that would take me to the SBCL debugger, when
> reached.

I'll let the experts advise you on all of this.

Re: Learning the REPL

<5=nij8WB++p+y16HQ@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17975&group=comp.lang.lisp#17975

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.lisp
Subject: Re: Learning the REPL
Date: Sun, 4 Feb 2024 18:50:00 -0000 (UTC)
Organization: To protect and to server
Message-ID: <5=nij8WB++p+y16HQ@bongo-ra.co>
References: <87mssh5opo.fsf@brilhante.top> <875xz4z4ff.fsf@yaxenu.org> <87a5og5k6y.fsf@brilhante.top>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 4 Feb 2024 18:50:00 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="1711790"; posting-host="9H7U5kayiTdk7VIdYU44Rw.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
Cancel-Lock: sha256:tOMs8EbnDLPf/AwCKca25Qdunki0n3X3CCZ2PL6iPe0=
X-Server-Commands: nowebcancel
X-Notice: Filtered by postfilter v. 0.9.3
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Sun, 4 Feb 2024 18:50 UTC

On Sun, 04 Feb 2024 15:21:41 +0000
Daniel Cerqueira <dan.list@brilhante.top> wrote:
> Also, it would be great if I just knew how to set up breakpoints on lisp
> code (using GNU Emacs), that would take me to the SBCL debugger, when
> reached.

Within Common Lisp code
(invoke-debugger (make-condition 'error))

will do it. Any other condition object will work equally well.

Re: Learning the REPL

<upp39k$3s4nc$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17976&group=comp.lang.lisp#17976

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.lisp
Subject: Re: Learning the REPL
Date: Sun, 4 Feb 2024 22:32:20 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <upp39k$3s4nc$1@dont-email.me>
References: <87mssh5opo.fsf@brilhante.top> <875xz4z4ff.fsf@yaxenu.org>
<87a5og5k6y.fsf@brilhante.top>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 4 Feb 2024 22:32:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="29ee133c86c3ce52220b03c91f891a2d";
logging-data="4068076"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19akAiajgIhRHZ5+fY1iSfo"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:JMq7fdom2TYoQYklL1xR8746sTE=
 by: Lawrence D'Oliv - Sun, 4 Feb 2024 22:32 UTC

On Sun, 04 Feb 2024 15:21:41 +0000, Daniel Cerqueira wrote:

> What I specifically am looking for, is how to use the SBCL debugger.

<http://sbcl.org/manual/index.html#Debugger>

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor