Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"Ninety percent of baseball is half mental." -- Yogi Berra


devel / comp.lang.lisp / Q: How can i check, if a file exists with SBCL ?

SubjectAuthor
* Q: How can i check, if a file exists with SBCL ?Jens Kallup
+- Re: Q: How can i check, if a file exists with SBCL ?Lieven Marchand
`* Re: Q: How can i check, if a file exists with SBCL ?Spiros Bousbouras
 `* Re: Q: How can i check, if a file exists with SBCL ?Jens Kallup
  `- Re: Q: How can i check, if a file exists with SBCL ?Tom Russ

1
Q: How can i check, if a file exists with SBCL ?

<k06998F66h2U1@mid.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: kallup-dev@web.de (Jens Kallup)
Newsgroups: comp.lang.lisp
Subject: Q: How can i check, if a file exists with SBCL ?
Date: Sat, 17 Dec 2022 17:32:41 +0100
Lines: 15
Message-ID: <k06998F66h2U1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: individual.net FHoZUyyL7q3IMPtmw5I8mwv15VS9HK3SsQ4s938tHeudAj483v
Cancel-Lock: sha1:UWYeSTYKez5SgxBSwuCmkwOmaIE=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.0
Content-Language: en-US
X-Antivirus: Avast (VPS 221216-4, 16.12.2022), Outbound message
X-Antivirus-Status: Clean
 by: Jens Kallup - Sat, 17 Dec 2022 16:32 UTC

Here the code, that result me always the format message:

(defvar *ex*)
(handler-case
(progn
(setq *ex* (open "aquicklisp" :if-exists :error))
(print "QuickLisp missing, try to install ..."))
(error (c)
(progn
(format t "Information: QuickLisp exists.~%")
(exit))))

--
Diese E-Mail wurde von Avast-Antivirussoftware auf Viren geprüft.
www.avast.com

Re: Q: How can i check, if a file exists with SBCL ?

<87edsy2cda.fsf@wyrd.be>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.23.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 17 Dec 2022 16:57:20 +0000
From: mal@wyrd.be (Lieven Marchand)
Newsgroups: comp.lang.lisp
Subject: Re: Q: How can i check, if a file exists with SBCL ?
References: <k06998F66h2U1@mid.individual.net>
Date: Sat, 17 Dec 2022 18:01:21 +0100
Message-ID: <87edsy2cda.fsf@wyrd.be>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:1HlwrlU+8jhmg/e6wKIsF5EQ5eE=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Lines: 6
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-Jt9LJPAtctZhVssrkvIli35Lmv8x1rzVeOqLIaTeXLDSX5dQcdnDhwFOiWYSGi3qYYpK9e4RQu12zWS!e4uNXq0LgT98UGUV0Fat9vqrA0LgHTuq1r0ooGTQBw==
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
X-Received-Bytes: 1420
 by: Lieven Marchand - Sat, 17 Dec 2022 17:01 UTC

There is a standard function PROBE-FILE that checks for the existence of
files.

--
Laat hulle almal sterf. Ek is tevrede om die wêreld te sien brand en die vallende
konings te spot. Ek en my aasdier sal loop op die as van die verwoeste aarde.

Re: Q: How can i check, if a file exists with SBCL ?

<0WrgQhFvZWyB=hsrA@bongo-ra.co>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.lisp
Subject: Re: Q: How can i check, if a file exists with SBCL ?
Date: Sat, 17 Dec 2022 19:25:20 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <0WrgQhFvZWyB=hsrA@bongo-ra.co>
References: <k06998F66h2U1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 17 Dec 2022 19:25:20 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="77df1860c24f123305fb8450030de443";
logging-data="3915440"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18m5jzeLJk1i4nTExfrxubV"
Cancel-Lock: sha1:iQlSM3YPAeJ3UlAuv1SqkzgRrPE=
X-Organisation: Weyland-Yutani
In-Reply-To: <k06998F66h2U1@mid.individual.net>
 by: Spiros Bousbouras - Sat, 17 Dec 2022 19:25 UTC

On Sat, 17 Dec 2022 17:32:41 +0100
Jens Kallup <kallup-dev@web.de> wrote:
> Here the code, that result me always the format message:
>
> (defvar *ex*)
> (handler-case
> (progn
> (setq *ex* (open "aquicklisp" :if-exists :error))
> (print "QuickLisp missing, try to install ..."))
> (error (c)
> (progn
> (format t "Information: QuickLisp exists.~%")
> (exit))))

CLHS says on OPEN :
:if-exists

if-exists specifies the action to be taken if direction is :output or :io
and a file of the name filespec already exists. If direction is :input,
not supplied, or :probe, if-exists is ignored.

You may get a more informative error message if you just do
(setq *ex* (open "aquicklisp" :if-exists :error))

Also exit is not standard Common Lisp. It is helpful if you mention it when
you use constructs which are specific to some implementation.

--
vlaho.ninja/prog

Re: Q: How can i check, if a file exists with SBCL ?

<k06nanF84fqU1@mid.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: kallup-dev@web.de (Jens Kallup)
Newsgroups: comp.lang.lisp
Subject: Re: Q: How can i check, if a file exists with SBCL ?
Date: Sat, 17 Dec 2022 21:32:23 +0100
Lines: 80
Message-ID: <k06nanF84fqU1@mid.individual.net>
References: <k06998F66h2U1@mid.individual.net> <0WrgQhFvZWyB=hsrA@bongo-ra.co>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: individual.net sy5RGSeB6I0cEy9xcMIhcA4kDiDC9m4HU3Dbe4UQ0x1YEq3s3Y
Cancel-Lock: sha1:P1FO85H92hE4cbSAh/QZRnVxatQ=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.0
Content-Language: en-US
In-Reply-To: <0WrgQhFvZWyB=hsrA@bongo-ra.co>
X-Antivirus: Avast (VPS 221216-4, 16.12.2022), Outbound message
X-Antivirus-Status: Clean
 by: Jens Kallup - Sat, 17 Dec 2022 20:32 UTC

Am 17.12.2022 um 20:25 schrieb Spiros Bousbouras:
> Also exit is not standard Common Lisp. It is helpful if you mention it when
> you use constructs which are specific to some implementation.

I have the code below, but the quickstart line produce error:
I have remove all components that was installed from the install setup
of quicklisp.

(handler-case (progn
(with-open-file (stream "./quicklisp/"
:direction :input
:if-does-not-exist :error))
(print "111"))
(error (c) (progn
(format T "QuickLisp missing, try to install ...~%")
(load "quicklisp.lisp")
(quicklisp-quickstart:install) ; <-- here
(print "222")
)))

E:\SBCL\1>sbcl --script test1.lisp

Unhandled SB-C::INPUT-ERROR-IN-LOAD in thread

#<SB-THREAD:THREAD "main thread" RUNNING {1001DD0003}>:
READ error during LOAD:

Package QUICKLISP-QUICKSTART does not exist.

Line: 20, Column: 33, File-Position: 575

Stream: #<SB-SYS:FD-STREAM for "file E:\\SBCL\\1\\test1.lisp"
{1001DC0E53}>

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1001DD0003}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SB-C::INPUT-ERROR-IN-LOAD
{1001DC7083}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<SB-C::INPUT-ERROR-IN-
LOAD {1001DC7083}>)
2: (INVOKE-DEBUGGER #<SB-C::INPUT-ERROR-IN-LOAD {1001DC7083}>)
3: (ERROR #<SB-C::INPUT-ERROR-IN-LOAD {1001DC7083}>)
4:
(SB-C:COMPILER-ERROR SB-C::INPUT-ERROR-IN-LOAD :CONDITION #<SB-
INT:SIMPLE-READER-PACKAGE-ERROR "Package ~A does not exist."
{1001DC7023}> :STREAM #<SB-SYS:FD-STREAM for "file E:\\SBCL
\\1\\test1.lisp" {1001DC0E53}>)
5: (SB-C::%DO-FORMS-FROM-INFO #<FUNCTION (LAMBDA (SB-KERNEL:FORM &KEY
:CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-INT:LOAD-AS-SOURCE
{1001DC61CB}> #<SB-C::SOURCE-INFO {1001DC6183}> SB-C::INPUT-ERROR-
IN-LOAD)
6: (SB-INT:LOAD-AS-SOURCE #<SB-SYS:FD-STREAM for "file E:\\SBCL
\\1\\test1.lisp" {1001DC0E53}> :VERBOSE NIL :PRINT NIL :CONTEXT
"loading")
7: ((LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) #<SB-SYS:FD-STREAM for
"file E:\\SBCL\\1\\test1.lisp" {1001DC0E53}> NIL)
8: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<FUNCTION (LABELS SB-FASL::LOAD-
STREAM-1 :IN LOAD) {5FF3BB}> #<SB-SYS:FD-STREAM for "file E:\\SBCL
\\1\\test1.lisp" {1001DC0E53}> NIL #<SB-SYS:FD-STREAM for "file
E:\\SBCL\\1\\test1.lisp" {1001DC0E53}>)
9: (LOAD #<SB-SYS:FD-STREAM
for "file E:\\SBCL\\1\\test1.lisp" {1001DC0E53}> :VERBOSE NIL :PRINT
NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT)
10: ((FLET SB-IMPL::LOAD-SCRIPT :IN SB-IMPL::PROCESS-SCRIPT) #<SB-
SYS:FD-STREAM for "file E:\\SBCL\\1\\test1.lisp" {1001DC0E53}>)
11: ((FLET SB-UNIX::BODY :IN SB-IMPL::PROCESS-SCRIPT))
12: ((FLET "WITHOUT-INTERRUPTS-BODY-11" :IN SB-IMPL::PROCESS-SCRIPT))
13: (SB-IMPL::PROCESS-SCRIPT "test1.lisp")
14: (SB-IMPL::TOPLEVEL-INIT)
15: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
16: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
17: (SB-IMPL::%START-LISP)
18: ("foreign function: #x140034DE5")
19: ("foreign function: #x1400051E0")

--
Diese E-Mail wurde von Avast-Antivirussoftware auf Viren geprüft.
www.avast.com

Re: Q: How can i check, if a file exists with SBCL ?

<c8e7c2d7-f9a9-4daf-b493-3cd73f3c2d7fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
X-Received: by 2002:a37:46cd:0:b0:6fb:7c45:bd5 with SMTP id t196-20020a3746cd000000b006fb7c450bd5mr85028388qka.304.1671473218829;
Mon, 19 Dec 2022 10:06:58 -0800 (PST)
X-Received: by 2002:a9d:7ad2:0:b0:672:434d:b7f5 with SMTP id
m18-20020a9d7ad2000000b00672434db7f5mr1391591otn.73.1671473218357; Mon, 19
Dec 2022 10:06:58 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.lisp
Date: Mon, 19 Dec 2022 10:06:58 -0800 (PST)
In-Reply-To: <k06nanF84fqU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2603:8000:7603:1703:49e4:97a9:eaab:6460;
posting-account=05zmAwoAAAAJZM-3jv1hCWLHGZQceqwA
NNTP-Posting-Host: 2603:8000:7603:1703:49e4:97a9:eaab:6460
References: <k06998F66h2U1@mid.individual.net> <0WrgQhFvZWyB=hsrA@bongo-ra.co> <k06nanF84fqU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c8e7c2d7-f9a9-4daf-b493-3cd73f3c2d7fn@googlegroups.com>
Subject: Re: Q: How can i check, if a file exists with SBCL ?
From: taruss@google.com (Tom Russ)
Injection-Date: Mon, 19 Dec 2022 18:06:58 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2195
 by: Tom Russ - Mon, 19 Dec 2022 18:06 UTC

On Saturday, December 17, 2022 at 12:32:29 PM UTC-8, Jens Kallup wrote:
> Am 17.12.2022 um 20:25 schrieb Spiros Bousbouras:
> > Also exit is not standard Common Lisp. It is helpful if you mention it when
> > you use constructs which are specific to some implementation.
> I have the code below, but the quickstart line produce error:
> I have remove all components that was installed from the install setup
> of quicklisp.
>
> (handler-case (progn
> (with-open-file (stream "./quicklisp/"
> :direction :input
> :if-does-not-exist :error))
> (print "111"))
> (error (c) (progn
> (format T "QuickLisp missing, try to install ...~%")
> (load "quicklisp.lisp")
> (quicklisp-quickstart:install) ; <-- here
> (print "222")
> )))

Perhaps try
(load "quicklisp.lisp" :verbose t :print t)
to get more information about the loading process?

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor