From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c689b55786a9f2bd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.weisnix.org!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: for S'Image use Func?? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1qcb6z4i20dyb.1dz2hd4c0vx69.dlg@40tude.net> <87632vwikr.fsf@ludovic-brenta.org> <112n6z3554srr$.tjzjtg467xfo.dlg@40tude.net> <1fv8frriu1h4s.g9jy78q1c0io.dlg@40tude.net> <7a31eab7-1a1c-4653-bf49-ff1498e318f9@b18g2000yqb.googlegroups.com> <199e07cb-2e93-40fc-974d-000b83b6000f@s29g2000yqd.googlegroups.com> <16vlvmzpbalm5.1chuumyyuyb2j$.dlg@40tude.net> <1fe63c27-207f-4a73-a823-3ec1410e35e8@j35g2000yqm.googlegroups.com> <1g82ubkc0t0pf$.nuj3gqp1buh6.dlg@40tude.net> <5715ce4b-3ddc-4f50-8b4d-094e93db657a@e21g2000vbl.googlegroups.com> Date: Sat, 15 May 2010 10:35:50 +0200 Message-ID: <1o1jj8ho00vti.18z26rwdv3apb.dlg@40tude.net> NNTP-Posting-Date: 15 May 2010 10:35:50 CEST NNTP-Posting-Host: 7e15e63d.newsspool4.arcor-online.net X-Trace: DXC=W09nD4h38G_U6b:FjPaGjQ4IUKCE;:T X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:11628 Date: 2010-05-15T10:35:50+02:00 List-Id: On Fri, 14 May 2010 14:03:17 -0700 (PDT), Maciej Sobczak wrote: > On 13 Maj, 09:31, "Dmitry A. Kazakov" > wrote: > >>> I am pragmatic here. >> >> I am too. I know that Windows does exist and that LF /= CR LF. > > > > This is an added value? I call it a trivial stream filter with barely > one bit of state in the finite-state machine. Nothing to cheer about. Do you want to say that text files are Turing complete? (:-)) Maybe they are. Maybe they are not. Consider an experiment. Let us generate random files containing CRs, LFs and other characters. Show the file to several people asking them to count lines... >> Al this mess is abstracted away by Ada.Text_IO. > > This "abstraction" is peanuts. Like in > Ada.Stream_IO_With_Trivial_Filter. :-) If it were, there would be no discussions about it. >> (And OpenVMS exists too) > > I guess that the Commodore 64 emulator for iPhone has a wider user > base - please do not refer to effectively non-existing systems just to > keep the discussion going. It's wasteful. Ada never was popular. >>> So what is a text, really? >> >> It is not a book. > > A scientific paper, perhaps? Or a CV? A memo, minutes etc. > If you stick to the concept of "text" as defined by Text_IO > (completely unstructured sequence of lines), then effectively the only > use-case that you will cover without problems is... config files. + source codes, which nicely covers 90% of my tasks. I don't need Ada.Document_IO. Especially because it is a far bigger mess than stupid LFs in UNIX files. >> Browser renders texts. It means that text is not the input, but the output >> of. The input of a browser is a program written in some ugly language named >> HTML. > > Wrong. I use the browser to read .txt files, too. No HTML is > necessary. Then some other encoding is used. That changes nothing. Browser renders LFs according to some rules, the result you see is the text (or one of many possible). >>> Yet everybody is dead focused on the concept of text files that are >>> composed of lines. There are no lines, really. >> >> Of course there are, see //-comments in C++. > > The C++ source code is not a text for me. Then you shall not use text editors with it. >>> Translation: Text_IO cannot detect the end of text without blocking. >> >> No, the translation is: stream does not have an end. > > That's your arbitrary definition and you did not provide any reference > for it. It does not mean that no stream may have it. It is only a negation that every stream does. Anyway, if you tried to define the stream end, you could not do in terms of its elements, You will need some "non-functional," "out-of-band" return codes, exceptions etc. Blocking is just among others. You could say: it ends when blocked. Not very nice, but, in fact, widely used in network communication protocols. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de