🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.lisp
Article #75

Re: read-file for sbcl

#75
From: George Neuner
Date: Sat, 28 Nov 2026 05:11
43 lines
2648 bytes
On Thu, 26 Nov 2026 09:45:59 +0530, Madhu <enometh@meer.net> wrote:


>* steve g <87ld6gl8ah.fsf@gmail.com> :
>Wrote on Wed, 25 Nov 2026 19:56:38 -0500:
>
>> I am working on a project and came across the need to read files very
>> easily. I created this package for SBCL. If you need or want a rather
>> fast read-file function; Just run make, load, the compile.
>>
>> I know this is not a binary group, I'll try try and attach the base64.
>>
>> I have been using this version of file-length-by-name for quite some
>> time. It seems more accurate that stat. It just uses lseek.
>
>"more accurate" ? when are they never equal?

I have never found them different, but ...


lseek() is not guaranteed to work with special files - only open(),
close() and stat() are guaranteed for them.

lseek() may work for special files currently - or it may work in
whatever disto Steve happens to be using ... but it is not guaranteed
by any documentation, and it may not continue to work in the future.

I wouldn't rely on it.

Also you can stat() a file without opening it.


>> The attachments should be alright. Let me know if you have any questions
>> or unexpressed anger...
>
>1. "sbcl-only" is a virtue only for claude code customers
>2. if sbcl-only then why the posix c sharedlib, just use cffi for
>syscalls
>3. iolib uses posix for io (maybe it loses to your code because of
>streams)
>4. i cant imagine in 2020s linux hw where this would make a practical
>difference
>
Technical Details
Message-ID: <srnkgl5hcm1k3845p58jfrot5d6shrpb14@4ax.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <87ld6gl8ah.fsf@gmail.com> <m3wlq0ut1c.fsf@pison.robolove.meer.net>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: George Neuner <gneuner2@comcast.net>
Newsgroups: comp.lang.lisp
Subject: Re: read-file for sbcl
Date: Sat, 28 Nov 2026 00:11:18 -0500
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <srnkgl5hcm1k3845p58jfrot5d6shrpb14@4ax.com>
References: <87ld6gl8ah.fsf@gmail.com> <m3wlq0ut1c.fsf@pison.robolove.meer.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 28 Nov 2026 05:11:20 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2405424"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18Us0fh6MFDNJs8Q8NyycPRUFZCV0eovio="; posting-host="ef0a5556a89fe38283dc37bd03d00e0a"
User-Agent: ForteAgent/8.00.32.1272
Cancel-Lock: sha1:Zkqdrm5uc0xcatICa9+IRx+ny40= sha256:zmcRjuHz7vLLfDAlZFkF4SEj6T9YUcAtVTuYlxOGn2Y=
	sha1:X+uZ0mti4x//qpFWA57X4g49hgk= sha256:KgLu+2O2fJv2psrgc8DKlaq45jpX8M0HJBp8Iqsau1A=