comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: for S'Image use Func??
Date: Wed, 12 May 2010 06:16:05 -0700 (PDT)
Date: 2010-05-12T06:16:05-07:00	[thread overview]
Message-ID: <199e07cb-2e93-40fc-974d-000b83b6000f@s29g2000yqd.googlegroups.com> (raw)
In-Reply-To: q1ip1jsw4xjl$.jsh38rslpg0t.dlg@40tude.net

On 11 Maj, 23:46, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:

> > OK, next step: what's exactly being inefficient in buffering in
> > buffered input?
>
> Machine instructions to execute.

Yes - by proper use of buffering I can *reduce* the number of machine
instructions to execute and therefore make the program run faster.

Note also that the number of machine instructions is only a partial
problem - another is delays introduced by some of them. Sometimes it
is better to execute more instructions that keep the pipeline full
than to execute less of them, but with delays or blocks.

> Why an Ada program handling texts need to be aware of your system?

Because it is running on my system. It's a pretty good idea to have
some local awareness.

> Ada.Text_IO provides an OS-independent abstraction of a text.

The above is not even wrong. Ada.Text_IO cannot even *name* all the
files that I have on my hard drive.

Even assuming that I can open some file, the whole "abstraction of a
text" is severely limited. I cannot, for example, read the second
paragraph of the third chapter of the book that is in the file.
This "abstraction" is really a stream on steroids, nothing fancy.

> > Unfortunately, in Ada the formatting and I/O are entangled in Text_IO.
>
> No. See A.10.8(18) and F.3.3.

Wrong. They do not relate to Text_IO.

Even assuming wider context, formatting without I/O is trivial, but I
cannot have I/O without formatting. Text_IO gives me both.
But on the other hand, I'm not sure how I/O without formatting would
look like - that would have to be a plain stream. Which means that
your "abstraction of a text" is little more than a bit of formatting
glued on top of a stream.

> The problem of Text_IO is columns.

Not only. It cannot detect the end of stream without blocking, for
example.

> 2. Stream I/O is unsuitable for a custom Text_IO. It simply won't work in a
> system deploying native record-oriented files.

I'm OK with that. The whole thing is so unportable already that
limiting it further to only those systems that I will ever want to use
is not a problem for me.

--
Maciej Sobczak * http://www.inspirel.com

YAMI4 - Messaging Solution for Distributed Systems
http://www.inspirel.com/yami4



  reply	other threads:[~2010-05-12 13:16 UTC|newest]

Thread overview: 154+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-06 17:10 for S'Image use Func?? Warren
2010-05-06 17:23 ` Dmitry A. Kazakov
2010-05-06 20:05   ` Warren
2010-05-06 17:58 ` Adam Beneschan
2010-05-06 19:52   ` Warren
2010-05-07  8:12     ` stefan-lucks
2010-05-08  5:26       ` Stephen Leake
2010-05-10 15:16       ` Charmed Snark
2010-05-07  2:10   ` Randy Brukardt
2010-05-07 18:24     ` Keith Thompson
2010-05-06 18:14 ` Yannick Duchêne (Hibou57)
2010-05-06 20:04   ` Warren
2010-05-06 20:19     ` Robert A Duff
2010-05-06 20:56       ` Yannick Duchêne (Hibou57)
2010-05-06 21:11         ` Robert A Duff
2010-05-07  8:40           ` J-P. Rosen
2010-05-07 12:21             ` Robert A Duff
2010-05-07 13:37               ` Georg Bauhaus
2010-05-07 14:25                 ` Robert A Duff
2010-05-07 15:46                   ` Yannick Duchêne (Hibou57)
2010-05-07 17:38                     ` Dmitry A. Kazakov
2010-05-07 20:15                       ` Yannick Duchêne (Hibou57)
2010-05-07 20:28                         ` Jeffrey R. Carter
2010-05-07 21:16                           ` Randy Brukardt
2010-05-07 22:18                             ` Jeffrey R. Carter
2010-05-09  0:06                               ` Randy Brukardt
2010-05-09  0:31                                 ` Jeffrey R. Carter
2010-05-07 20:31                     ` Robert A Duff
2010-05-07 20:51                       ` Yannick Duchêne (Hibou57)
2010-05-07 21:07                         ` Robert A Duff
2010-05-07 21:25                       ` Randy Brukardt
2010-05-07 22:16                       ` Jeffrey R. Carter
2010-05-10 15:48                   ` Warren
2010-05-10 16:31                     ` Dmitry A. Kazakov
2010-05-10 16:52                       ` Warren
2010-05-10 17:55                         ` Dmitry A. Kazakov
2010-05-10 18:50                           ` Warren
2010-05-10 19:20                             ` Niklas Holsti
2010-05-10 20:16                               ` Warren
2010-05-10 20:38                                 ` Simon Wright
2010-05-10 20:52                                   ` Warren
2010-05-11 17:38                                     ` Jeffrey R. Carter
2010-05-11 18:19                                       ` Yannick Duchêne (Hibou57)
2010-05-11 20:36                                       ` Warren
2010-05-11  7:34                                 ` Niklas Holsti
2010-05-11  7:56                                   ` Yannick Duchêne (Hibou57)
2010-05-11 16:56                                     ` Warren
2010-05-13 18:53                                     ` Niklas Holsti
2010-05-11 16:49                                   ` Warren
2010-05-11  8:26                             ` Dmitry A. Kazakov
2010-05-11  9:49                               ` J-P. Rosen
2010-05-11 17:06                                 ` Warren
2010-05-12  5:00                                   ` J-P. Rosen
2010-05-12 14:39                                     ` Yannick Duchêne (Hibou57)
2010-05-12 16:52                                       ` Warren
2010-05-13 18:20                                     ` Niklas Holsti
2010-05-17 10:00                                       ` J-P. Rosen
2010-05-20  9:31                                         ` Niklas Holsti
2010-05-21  6:56                                           ` Niklas Holsti
2010-05-11 14:27                               ` Robert A Duff
2010-05-11 15:03                                 ` Dmitry A. Kazakov
2010-05-11 15:45                                   ` Yannick Duchêne (Hibou57)
2010-05-11 15:23                               ` Yannick Duchêne (Hibou57)
2010-05-11 16:59                                 ` Dmitry A. Kazakov
2010-05-11 17:05                               ` Warren
2010-05-11 17:54                                 ` Dmitry A. Kazakov
2010-05-11 20:50                                   ` Charmed Snark
2010-05-11 19:03                                 ` Yannick Duchêne (Hibou57)
2010-05-11 20:53                                   ` Warren
2010-05-10 20:56                           ` Maciej Sobczak
2010-05-10 20:24                             ` Georg Bauhaus
2010-05-11  7:42                               ` Maciej Sobczak
2010-05-10 21:30                             ` Ludovic Brenta
2010-05-11  8:35                               ` Dmitry A. Kazakov
2010-05-11 13:35                                 ` Maciej Sobczak
2010-05-11 14:24                                   ` Dmitry A. Kazakov
2010-05-11 20:18                                     ` Maciej Sobczak
2010-05-11 21:46                                       ` Dmitry A. Kazakov
2010-05-12 13:16                                         ` Maciej Sobczak [this message]
2010-05-12 14:33                                           ` Yannick Duchêne (Hibou57)
2010-05-12 15:58                                           ` Dmitry A. Kazakov
2010-05-12 22:14                                             ` Maciej Sobczak
2010-05-13  7:31                                               ` Dmitry A. Kazakov
2010-05-13 13:16                                                 ` Warren
2010-05-14 21:03                                                 ` Maciej Sobczak
2010-05-15  8:35                                                   ` Dmitry A. Kazakov
2010-05-15 20:50                                                     ` Maciej Sobczak
2010-05-16  7:48                                                       ` Dmitry A. Kazakov
2010-05-16 20:56                                                         ` Maciej Sobczak
2010-05-16 21:31                                                           ` Dmitry A. Kazakov
2010-05-11 15:56                                 ` Yannick Duchêne (Hibou57)
2010-05-11 17:15                                   ` Dmitry A. Kazakov
2010-05-11 18:48                                     ` Yannick Duchêne (Hibou57)
2010-05-10 22:24                             ` Yannick Duchêne (Hibou57)
2010-05-11  7:58                               ` Maciej Sobczak
2010-05-11 15:54                                 ` Yannick Duchêne (Hibou57)
2010-05-11 20:23                                   ` Maciej Sobczak
2010-05-10 22:39                             ` Yannick Duchêne (Hibou57)
2010-05-11 17:17                               ` Warren
2010-05-11 17:59                                 ` Dmitry A. Kazakov
2010-05-11 20:56                                   ` Warren
2010-05-11 22:06                                     ` Dmitry A. Kazakov
2010-05-12 13:27                                       ` Warren
2010-05-12 16:03                                         ` Dmitry A. Kazakov
2010-05-11 18:57                                 ` Yannick Duchêne (Hibou57)
2010-05-11 21:08                                   ` Warren
2010-05-11 19:56                               ` Gautier write-only
2010-05-12 13:33                                 ` Warren
2010-05-07 15:35                 ` Yannick Duchêne (Hibou57)
2010-05-07 20:33                   ` Robert A Duff
2010-05-07 21:27                     ` Randy Brukardt
2010-05-07 21:36                       ` Robert A Duff
2010-05-07 22:09                       ` Yannick Duchêne (Hibou57)
2010-05-09  0:17                         ` Randy Brukardt
2010-05-07 19:56               ` J-P. Rosen
2010-05-07 20:14                 ` Robert A Duff
2010-05-07 20:17                 ` Yannick Duchêne (Hibou57)
2010-05-07 20:41                   ` Robert A Duff
2010-05-06 21:20         ` Dmitry A. Kazakov
2010-05-10 15:26       ` Ada & gdb (was: for S'Image use Func??) Warren
2010-05-10 18:02         ` John B. Matthews
2010-05-10 19:52           ` Warren
2010-05-06 22:33     ` for S'Image use Func?? Jeffrey R. Carter
2010-05-06 23:22       ` Yannick Duchêne (Hibou57)
2010-05-07  2:17         ` Randy Brukardt
2010-05-07 12:27           ` Robert A Duff
2010-05-07 15:19             ` Yannick Duchêne (Hibou57)
2010-05-07 20:19               ` Robert A Duff
2010-05-07 21:11             ` Randy Brukardt
2010-05-10 16:05             ` Warren
2010-05-19  6:26               ` Randy Brukardt
2010-05-07 15:21           ` Yannick Duchêne (Hibou57)
2010-05-10 16:03       ` Warren
2010-05-06 18:50 ` Jeffrey R. Carter
2010-05-06 19:50   ` Warren
2010-05-06 20:22     ` Robert A Duff
2010-05-06 21:25       ` Dmitry A. Kazakov
2010-05-07  2:20         ` Randy Brukardt
2010-05-07  7:28           ` Dmitry A. Kazakov
2010-05-07 10:15         ` Stephen Leake
2010-05-07 15:07           ` Yannick Duchêne (Hibou57)
2010-05-08  5:38             ` Stephen Leake
2010-05-07 19:29           ` Simon Wright
2010-05-07 20:10             ` Robert A Duff
2010-05-07 19:44               ` Georg Bauhaus
2010-05-07 20:53                 ` Robert A Duff
2010-05-07 21:59               ` Simon Wright
2010-05-09  0:20                 ` Randy Brukardt
2010-05-07  8:53 ` Georg Bauhaus
2010-05-10 16:18   ` Warren
2010-05-10 17:54     ` Georg Bauhaus
2010-05-10 19:57       ` Warren
2010-05-10 19:09     ` Yannick Duchêne (Hibou57)
2010-05-10 20:01       ` Warren
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox