From: Jesper Quorning <jesper.quorning@gmail.com>
Subject: Re: String view of file
Date: Sun, 1 Jan 2023 15:36:59 -0800 (PST) [thread overview]
Message-ID: <10f5dfec-32fb-4333-a9b6-2ee71c1871c0n@googlegroups.com> (raw)
In-Reply-To: <d1d4d819-8da2-4442-8bf9-a00c7ab6b4a5n@googlegroups.com>
The original post was a bit of a mess, and I am not quite new to Ada. But I lack some skills regarding software construction and software engineering.
What I want goes something like this:
- Zero copy access to a (read-only) file.
- Get lines of file one by one as a stream of lines.
- Use a package instance as file representation.
- Stretch goal: Multiple implementations of File Instance (Standard, Fast, Compatible ..)
Refined version:
```Ada
package File
is new File_Instance
(Filename => "whatever",
Implementation => Standard);
---
for Line of File.As_Line_Stream loop
Parse (Line);
end loop;
```
I think Dewar has written something about string view of some data. I saw some tricky tricks in the GNAT.Snobol implementation. Links to papers anyone?
Sorry for the late follow-up.
/Jesper
next prev parent reply other threads:[~2023-01-01 23:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 8:30 String view of file Jesper Quorning
2022-11-21 13:01 ` G.B.
2022-11-21 13:48 ` Jeffrey R.Carter
2022-11-21 15:52 ` Niklas Holsti
2022-11-21 16:42 ` Jeffrey R.Carter
2022-11-21 17:29 ` Niklas Holsti
2022-11-21 15:18 ` Dmitry A. Kazakov
2022-11-21 16:11 ` Marius Amado-Alves
2022-11-21 17:29 ` Qunying
2022-11-21 21:43 ` Gautier write-only address
2023-01-01 23:36 ` Jesper Quorning [this message]
2023-01-02 18:57 ` Stephen Leake
2023-01-03 16:37 ` Jeffrey R.Carter
2023-01-03 17:02 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox