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: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: comp.lang.ada Subject: Re: 4 beginner's questions on the PL Ada Date: Sun, 11 Aug 2013 14:16:57 +0200 Organization: Aioe.org NNTP Server Message-ID: <87d2pks9qe.fsf@VLAN-3434.student.uu.se> References: <87ob96ajv6.fsf@VLAN-3434.student.uu.se> <877gfucton.fsf@VLAN-3434.student.uu.se> <87pptmb4p9.fsf@VLAN-3434.student.uu.se> <88cb99c6-df8b-49f8-ac53-54b737a02c34@googlegroups.com> <87eha1787k.fsf@VLAN-3434.student.uu.se> NNTP-Posting-Host: SWN/nubmpQxYKwY7hPy4YA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:zh53dA+oExaeTO2YWA2+2A6leYY= X-Original-Bytes: 2695 Xref: number.nntp.dca.giganews.com comp.lang.ada:182959 Date: 2013-08-11T14:16:57+02:00 List-Id: Simon Clubley writes: > Would you rather implement, say, a communications protocol by > looking at a existing implementation only, or would you rather > work from a design specification which will include the > background and overview as well as explain the reason for why > certain things are done in the way they are? Again, those CS models - if your task is to implement one of those - of course you need to study the model/specification. Naturally, in all those cases, it is as you describe. My layman's attempt to define what constitutes a protocol would be: 1. The message format, including its OH fields and what they carry. For example, in a CAN bus message, there are 11 bits of message ID (which is also used as priority), and after that, ... 2. How the communication should be conducted. For example, the dance steps of the TCP/IP, with ack's back and forth: how it is done, and what it means, and when, and in what order, ... For 1., I'd use a data structure, and for 2., ordinary control flow logic, perhaps in a PL with IPC support (Ada tasks with entry - accept, perhaps? but I'm new at Ada). All this is just examples, but it is clear that: *no*, you can't, and shouldn't, write a single line of code until you have the specification, and have studied it in detail. Still, while interesting, it is not really what I tried to, um, "communicate". -- Emanuel Berg - programmer (hire me! CV below) computer projects: http://user.it.uu.se/~embe8573 internet activity: http://home.student.uu.se/embe8573