🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Alexander Schreiber Sat, 28 Nov 2026 11:38
Re: read-file for sbcl
#78
Author: Alexander Schreiber
Date: Sat, 28 Nov 2026 11:38
29 lines
2004 bytes
steve g <Sgonedes1977@gmail.com> wrote:
> --==-=-=
> Content-Type: multipart/mixed; boundary="=-=-="
>
> --=-=-=
> Content-Type: text/plain
> Content-Transfer-Encoding: quoted-printable
>
>
> 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.

Exactly how is that supposed to be "more accurate that stat"? How do you
think the kernel figures out the file size returned by stat? It is not
"eyeballing" the file and going "yeah, looks about 1234 bytes, give or 
take a few", it reads that fromt the inode. Same source of truth it uses
when you lseek to the end of the file.

Kind regards,
           Alex.
-- 
"Opportunity is missed by most people because it is dressed in overalls and
 looks like work."                                      -- Thomas A. Edison
Re: read-file for sbcl
#92
Author: steve g
Date: Mon, 30 Nov 2026 00:02
43 lines
2722 bytes
Alexander Schreiber <als@usenet.thangorodrim.de> writes:

> steve g <Sgonedes1977@gmail.com> wrote:
>> --==-=-=
>> Content-Type: multipart/mixed; boundary="=-=-="
>>
>> --=-=-=
>> Content-Type: text/plain
>> Content-Transfer-Encoding: quoted-printable
>>
>>
>> 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.
>
> Exactly how is that supposed to be "more accurate that stat"? How do you
> think the kernel figures out the file size returned by stat? It is not
> "eyeballing" the file and going "yeah, looks about 1234 bytes, give or 
> take a few",


> it reads that fromt the inode. Same source of truth it uses
> when you lseek to the end of the file.


no shit.

> Kind regards,
>            Alex.


read 2 lseek. it is very fast and uses very little memory. I don't
fucking care if you use my code or not, your attitude is that of a 5
year old child. Why don't you do some research an tell me the difference
between stat and lseek. At some point you take starting pos and
substract ending pos. This is not very difficult.

Always remeber, never trust people that give a shit.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads