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: 103376,24d7acf9b853aac8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!news.netfront.net!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: S-expression I/O in Ada Date: Sun, 08 Aug 2010 13:34:36 -0700 Organization: Netfront http://www.netfront.net/ Message-ID: References: <547afa6b-731e-475f-a7f2-eaefefb25861@k8g2000prh.googlegroups.com> <1qk2k63kzh7yv$.3jgc403xcqdw$.dlg@40tude.net> <8ae8e899-9eef-4c8c-982e-bfdfc10072f1@h17g2000pri.googlegroups.com> <258zlxrv4fn6.1vszho1rtmf48$.dlg@40tude.net> <984db477-973c-4a66-9bf6-e5348c9b95f2@n19g2000prf.googlegroups.com> <5d0747cf-3226-4048-beb4-78b617fc19c9@v15g2000yqe.googlegroups.com> NNTP-Posting-Host: 75.211.253.91 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: adenine.netfront.net 1281299679 79494 75.211.253.91 (8 Aug 2010 20:34:39 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Sun, 8 Aug 2010 20:34:39 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 In-Reply-To: Xref: g2news1.google.com comp.lang.ada:12967 X-Original-Bytes: 6122 Date: 2010-08-08T13:34:36-07:00 List-Id: On 08/08/2010 06:11 AM, Natacha Kerensikova wrote: > > Well actually the requirements were presented in the beginning: I've > got a S-expression configuration file, a directory of static files, a > directory of S-expression templates and a directory of S-expression > data to populate the templates. And I want to respond to HTTP request > with either a static file or an expanded template. Now I might > misunderstanding the word "requirements", but what I actually consider > as requirements is the above without any "S-expression" occurrence, > the rest being implementation choices. "S-expression" might be part of > the requirements to use existing data, but then again another format > can be chosen provided a converted from S-expression is also coded. Most of what you presented seem more like implementation decisions (S-expressions for the configuration information, S-expressions for the page templates) than requirements. Even discussion of files and directories might be premature, depending on the higher level requirements. A web server that can be used in an embedded system as the external interface as well as as a stand-alone system would need a more abstract view of permanent storage, for example. Of course, sometimes implementation decisions are made by others and become part of one's requirements, but I wouldn't expect that in a personal project. And the existence of an existing library can be an important factor when masking such decisions. I wasn't saying that implementing an S-expression library, or deciding to use it at a low level in your project, was a bad thing. I was viewing this project as a separate thing from your S-expression library. > Thanks for the pointer, however I'm already afraid learning only Ada > is too much for me (I've tried with C++ and it's a language much too > complex to fit in my head (especially the STL), and I hope Ada is > simple enough), learning both Ada and AWS at the same time will > probably be way too much. However I haven't decided yet whether I will > actually begin with this project, I might try to code something > simpler before that (which will also need S-expressions, hence my > beginning with that library). In that case, I might be confident > enough in my Ada before starting the web project, and then go for AWS. I think something like AWS would help you learn Ada. You need to look at existing code as well as write your own. Starting with the library has good and bad points. It's a fairly small, contained project, which is good. On the other hand, the first things you write in Ada are probably not going to be great. In a few months you'll probably look at the library and want to make significant changes to it. Ada is simpler than C++. It's also fairly well designed, so most features are orthogonal, which simplifies learning the language. > Actually, that's very similar to what I thought too. It's just that > I've already thought so much about this project that I'm further down > the road, and I tried to fit everything in the one-dimension of a > text. I'm glad to hear that. Perhaps I simply misinterpreted your presentation. > That's actually a pretty strange thing I've never encountered yet in > other coders I know, I first spend a lot of time thinking before > writing the first line of code (or that particular case, before even > managing to install the compiler). I also spend much less time > debugging, though I can't tell whether they are related or whether one > of them is more efficient than the other. Excellent. The whole point of Ada is thinking before coding, so you'll probably find that Ada supports your way of doing things. It's a common experience that if you did think first, by the time you get your code to compile, it works correctly. Ada people don't do a lot of debugging; I can't remember the last time I used a debugger. When we do have problems, they tend to be logic errors rather than typos. > Unless I'm very misunderstanding and/or vary naive, I've got the > feeling our approaches are not that different, and differ mostly in > the order of implementation, which indeed doesn't change that much in > the final result. You may well be right, in which case you'll likely find Ada to be a good fit for your way of approaching things. -- Jeff Carter "I wave my private parts at your aunties." Monty Python & the Holy Grail 13 --- news://freenews.netfront.net/ - complaints: news@netfront.net ---