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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,865c3d125a8dbc3b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.velia.net!noris.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 04 Jun 2009 14:14:33 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Howto read line from a stream References: <83317a97-dae5-4c84-a1ac-88a87833cf3f@q14g2000vbn.googlegroups.com> <1a90e055-44a3-4d00-b4cd-64798c731a55@e24g2000vbe.googlegroups.com> <709e8a12-f967-43db-b76b-4852cf1db08b@v4g2000vba.googlegroups.com> <196d124vj6gin.16zf5y40t9tr$.dlg@40tude.net> <4a26d249$0$31865$9b4e6d93@newsspool3.arcor-online.net> <4a26f4a3$0$32674$9b4e6d93@newsspool2.arcor-online.net> <1x2tgzxiay4t3$.rvhjms1ggu3h.dlg@40tude.net> <4a2796d2$0$30234$9b4e6d93@newsspool1.arcor-online.net> <1unigz9o798hk$.y1vxsdvq2uwg.dlg@40tude.net> In-Reply-To: <1unigz9o798hk$.y1vxsdvq2uwg.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a27baa9$0$32663$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 04 Jun 2009 14:14:33 CEST NNTP-Posting-Host: d10d5358.newsspool2.arcor-online.net X-Trace: DXC=OXKC5[UnQVGk:C4l9A;OcOA9EHlD;3YcB4Fo<]lROoRA^YC2XCjHcbI^\lXWe7=Z9B;9OJDO8_SKFNSZ1n^B98iJa>^LgWmek0K X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6232 Date: 2009-06-04T14:14:33+02:00 List-Id: Dmitry A. Kazakov schrieb: > On Thu, 04 Jun 2009 11:41:38 +0200, Georg Bauhaus wrote: > >> Dmitry A. Kazakov schrieb: >> >>> The point is, either the configuration is trivial and you don't need any, >>> or else it is non-trivial and then a representation of it as a tree does >>> not work. >> What would be the reason that trees don't work? > > Because non-trivial configuration cannot be reasonably represented by a > tree. BTW, Ada program as a configuration for some processor. Why do we use > Ada instead of XML? *We* use Ada instead of XML, but *we* are the front end in program production, wheras an Ada compiler's middleware does *not* use Ada as a data representation format. To the best of my knowledge, it uses a format that works well with compilers: lists or trees! XML uses graphs BTW. >> I notice that alternative formats have tree structure, such as >> >> Name.Space.This = 123 >> Name.Space.That = foo >> Another.Thing = bar > What about a constraint that Name.Space.This cannot be 123 when > Another.Thing is not bar? I was referring to XML editting customized to leading to consistent and only to consistent configurations. I think the last time they tried to capture much more than syntax with the help of a grammar was Algol 68. >>> XML is rooted in dark ages of computing, >> The dark ages of configuration are not over, and they will >> not be over as long as we are here; remember the >> protocols being written in quality C? ;-) > > At least they were properly documented Every proper XML grammar is documented. In addition, there are standard ways of documenting the grammar. On the other hand, programmer behavior cannot be caused by XML. >From what I learn, a negative attitude towards XML is frequently articulated by programmers who know little about XML, about grammars, or about a diligent selection of names and whose impression of XML is largely based on XML spit. (That's internal data structures, as offered by some persistence/serialization frameworks that, by default, just frame every component with its name... Again, not the fault of XML, the cause is elsewhere.) > and didn't contain 2K keywords, As does a good XML grammar. > (The > configuration of a device that yields 8 values is 993 lines long.) I don't know how a ratio of 993:8 is representative of the technical properties of XML's grammars. It might be representative of get-the-job-out-the-door management strategies. >>> from the times when people didn't >>> really understand that there is no data. Because data without behavior is >>> noise. >> Data and behavior can have a *separate* representation >> when moving between parts of a technical process. > > Data and behavior don't exist without each other. They cannot have separate > representations. They can be represented as (data, behavior) or, without wanting to imply too much, > >>> It does not add any value. >> Config data does not need to *add* value. > > Right, that is why I don't need config data. > >> Just *provide* values. Valid values. XML validation >> is a start, and can be performed anywhere. > > XML validation does not validate the values. It validates *itself*. Self-validation is not sensible. How could it. XML validation performs language defined checks. Nothing more, nothing less. XML can be used in integration. When some input in whatever format is lifted over some wall (middleware), you need programs that deal with the delivery. Proper packaging helps with the transport. >> Here in the chain XML can add value to some technical >> production process. > > I don't see how XML can add a value to the process without knowing how the > process functions and how to influence the process. XML is a "Ding an > sich", it has no technical purpose. XML has rules. It does not magically provide the rules of a specific technical process. Ad hoc example: Either pipes for water, or wires for electric current, but not both! Water through wires? An error that can be prevented grammatically. Naturally, the logic of an entire application cannot be the same as some XML document. Your remaining responsibility here is to mention syntax errors to the other end. Your problem becomes their problem.