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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!1.eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Fri, 11 May 2018 00:23:11 +0300 Organization: Tidorum Ltd Message-ID: References: <322f9b26-01de-4753-bb50-6ef2f3d993d8@googlegroups.com> <87a7th9pd1.fsf@nightsong.com> <87h8no1nli.fsf@nightsong.com> <874ljo1hvy.fsf@nightsong.com> <87vac4z2lh.fsf@nightsong.com> <87lgcszjdn.fsf@nightsong.com> <87sh6z1kkg.fsf@nightsong.com> <87k1sb1dt3.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net DWh1krUe7ADjGPWZr414DwORq/RP4soYf89MasMvp17CK+DHtW Cancel-Lock: sha1:tXTr8+M1k8B58FRAAmzcYOhIQKE= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: <87k1sb1dt3.fsf@nightsong.com> Xref: reader02.eternal-september.org comp.lang.ada:52215 Date: 2018-05-11T00:23:11+03:00 List-Id: On 18-05-10 23:00 , Paul Rubin wrote: > Dennis Lee Bieber writes: ... >> "Compiler is too slow" (something wrong with one's software >> development practices when the compiler speed is of more concern than the >> lifetime of a correct application) > > That was in the discussion of how to add more phrases to the CBSG, which > is to say, how to change its configuration in a deployment environment. > Randy's answer was to just include the Ada compiler as part of the > deployment, and add phrases by modifying and recompiling the Ada code. Ah, I think that answer/suggestion (embed the DSL in Ada) came from me, not initially from Randy. Clearly, if the SW is deployed on a system that is too small to run the Ada compilation quickly, that solution does not work, and one has to implement a non-embedded DSL (or simpler input format) that can be read and processed rapidly enough. Although the Ada language does not have standard support for that (well, beyond the 'Value attribute for enumeration types), there are libraries that help. I often use the OpenToken library where one defines the structure of the DSL in the Ada program itself, using an OpenToken-specific meta-DSL embedded in Ada, and the program is then immediately able to read and parse input text according to that DSL. A little like lex/yacc, but without the separate tools and steps to generate the lexer and parser code. > I think Ada programmers are used to the idea of the development > environment and the deployment environment being two different things. > A big slow development environment might be tolerable, but if the Ada > compiler is part of the deployment as well, then its size and speed have > to be considered again. The program takes 7 seconds to recompile on a > fast x86 box, and 1.5 minutes on an ARM server that I just tested. The CBSG could perhaps be redesigned to isolate the DSL part into separate packages so that only those packages would need to be recompiled. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .