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!.POSTED!not-for-mail From: "Alejandro R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Ada-Oriented GUI Date: Sat, 24 Mar 2018 12:36:13 +0100 Organization: A noiseless patient Spider Message-ID: References: <9ed9edb1-3342-4644-89e8-9bcf404970ee@googlegroups.com> <26a1fe54-750c-45d7-9006-b6fecaa41176@googlegroups.com> <656fb1d7-48a4-40fd-bc80-10ba9c4ad0a4@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 24 Mar 2018 11:36:13 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="50ef9e05021f9734962db7899bebeb78"; logging-data="6671"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/695k23FguedppW2QPHeBy" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: Content-Language: en-US Cancel-Lock: sha1:n+/6ixFCqpuAdmJESjuwC9DdTZA= Xref: reader02.eternal-september.org comp.lang.ada:51190 Date: 2018-03-24T12:36:13+01:00 List-Id: On 23/03/18 13:59, Dmitry A. Kazakov wrote: > On 23/03/2018 13:31, Alejandro R. Mosteo wrote: > >> I (humbly) think that people not knowing Rx but arguing against it are >> barking at the wrong tree. > > Yes, but this is a natural defense reflex against snake oil sellers. Just like Ada enthusiasts pestering C/C++/Rust/... people are seen? ;-) >> To me, Rx vs imperative [for suitable problems] it's like tasking in >> Ada vs other languages. Ada is in entirely another league wrt >> simplicity and safety. > > If you mean comparing languages with no tasking support to Ada, that is > not like imperative vs. declarative. [Event-controlled is not really > declarative] I mean, e.g., Ada vs Java Thread/Runnable; it was not a technical analogy anyway. Just a gut-feeling one. The primitive tasking facilities of most popular languages, 20+ years after Ada, is one of the things that most amazes me (in a bad way). >> I'm really not an Rx expert, so I'm not sure what kind of research is >> being done on it that could be relevant for safety-minded people. What >> I know is that the principles are simple and elegant, and my instinct >> says that it would interact very well with Ada protected objects, so I >> would be surprised if nothing good could be deducted starting from there. > > If principles are simply and elegant they certainly could be explained > in a few words understandable for residents of comp.lang.ada. Hehe. I'd say: it's simple enough, and there's so much information available, that anyone with genuine interest can get its bearings in the time spent arguing here, and with better explanations than mine using mere ASCII. But since you ask (or not) I will give the bare minimum and then some quickly triaged links: ----8<---- Rx Observer contract: OnNext* (OnCompleted | OnError)? Events arrive once, thread-safely (OnNext call). End of sequences is notified once with success or failure, so cleanup is trivial. The emitter of events is an Observable. The consumer is an Observer. Combinations of both are Operators. There are many predefined Operators to make life easy, addressing most needs that would be otherwise complex (e.g. tasking ones). For my own specification package: https://goo.gl/WQfpeV ----END---- Links (in somewhat loose reading order): 1) Original reference: https://go.microsoft.com/fwlink/?LinkID=205219 Sections 4.1 - 4.3 focus on the essentials. They're very short. The rest is only useful when you already know the basics and jargon. 2) 2-minute intro to Rx: https://medium.com/@andrestaltz/2-minute-introduction-to-rx-24c8ca793877 2.5/3.5, can't decide) Marble diagrams: https://medium.com/@jshvarts/read-marble-diagrams-like-a-pro-3d72934d3ef5 3) The whole http://reactivex.io site. I'd start by: http://reactivex.io/intro.html http://reactivex.io/documentation/contract.html http://reactivex.io/documentation/operators.html Never) I have a paper on my RxAda implementation. Section 2 attempts to be an introduction to Adaists not knowing Rx: Paper: https://www.researchgate.net/publication/318135797_RxAda_An_Ada_implementation_of_the_ReactiveX_API Slides: https://www.auto.tuwien.ac.at/~blieb/AE2017/presentations/RxAdaSlidesShort.pdf ... Since you asked about TreeViews elsewhere, I see they somehow do it (but don't ask me how. It's probably ugly JS): https://react.rocks/tag/TreeView > [There is nothing simple or elegant in event-controlled architectures. > Doing this for 20+ years (this is state of the art in automation > systems), I am pretty sure of.] The most elegant designs can turn ugly once things get real, that's for sure...