SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
Cuchulainn
Topic Author
Posts: 61589
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Behold the Lambda Calculus

November 29th, 2015, 8:56 pm

Java loves the Observer pattern but look here, they want it deprecated QuoteObserver Pattern is intuitively wrong: The Object to be observed knows who is observing (Subject<>--Observer). That is against real-life (in event-based scenarios). If I scream, I have no idea who is listening; if a lightening, hits the floor... lightning doesn't know that there is a floor till it hits!. Only Observers know what they can observe.Corollary: MVC should also be deprecated since it is a special case of Observer.Microsoft got it right.
Last edited by Cuchulainn on November 28th, 2015, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Cuchulainn
Topic Author
Posts: 61589
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Behold the Lambda Calculus

November 30th, 2015, 6:27 am

QuoteOriginally posted by: outrunI think what we did wasn't observer, it was more of a job-queue, we bound args to functions, not calling member functions of objects. More functional than OO. The ::bind does create an object, but that indeed has a different scope and lifetime. A bind copies arguments of the function to be called, it doesn't reference them.?Loose coupling.That is a much better solution than Observer indeed, the latter being heavy into inheritance. If you ever have time, trying signals2 on the same problem is good IMO. BTW signals2 supports priority by putting functions into groups. You don't need to implement queues..
Last edited by Cuchulainn on November 29th, 2015, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Polter
Posts: 2526
Joined: April 29th, 2008, 4:55 pm

Behold the Lambda Calculus

November 30th, 2015, 2:50 pm

Cuch: Hatley & Pirbhai's book looks interesting, thanks for the reference!Incidentally, talking about observable & event-based programming, Rx is one take on this:Quote- Rx.NET: The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators.- RxJS: The Reactive Extensions for JavaScript (RxJS) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in JavaScript which can target both the browser and Node.js.- RxCpp: The Reactive Extensions for Native (RxC) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C and C++.http://rxcpp.codeplex.com/http://github ... xCppCppCon 2014: Kirk Shoop "Async sequences and algorithms to compose them" 2015: Sumant Tambe "Reactive Stream Processing in Industrial IoT using DDS and Rx.cpp"'s also .NET-based http://IntroToRx.comThoughts?
Last edited by Polter on November 29th, 2015, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Topic Author
Posts: 61589
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Behold the Lambda Calculus

November 30th, 2015, 2:59 pm

You're welcome. It's stood the test of time. I use with groups for the drink vending machine DVM prototype to learn design patterns.And it could be useful for quants.As front-end to HP I use my Domain Architecture (Wiley 2004). I need system decomposition ASAP before being swamped in a sea of objects. We do get lakes and puddles but they are small.Code for DVM protos in C# and C++ is here
Last edited by Cuchulainn on November 29th, 2015, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Cuchulainn
Topic Author
Posts: 61589
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Behold the Lambda Calculus

November 30th, 2015, 3:35 pm

(double)
Last edited by Cuchulainn on November 29th, 2015, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Cuchulainn
Topic Author
Posts: 61589
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Behold the Lambda Calculus

November 30th, 2015, 3:49 pm

QuoteOriginally posted by: CuchulainnPolter,This is also very good by Michael Jackson.It can be specialized (as in my DVM code) to give a kick-start to designing policy-based design applications, esp. context diagram and external interfaces. Jackson's problem frame categories are almost 1:1 with the 5 canonical domain architectural types. So, one can spend 10% of project budget at this level and the benefits are appreciable. At least that's what I have seen. Bottom-up OOP is awful painful. But they meet 'in the middle'. //here is the very first app I made (in 1996, cough) using this hybrid design approach.I see the Hatley-Pirbhai/Jackson/Duffy combined methods as subsuming PBDIt's getting easier.====See the steps here (!)Combine Hatley-Pirbhai/OO
Attachments
Boiler.zip
(83.81 KiB) Downloaded 23 times
Last edited by Cuchulainn on November 30th, 2015, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On