
My current project is about making an accounting engine that handles all the journal entries, transactions, portfolios etc. The communication with the engine is based on simple protocol, the things to be taken care of in the order are consistency, handling large data(performance) and availability. I came across a video lecture by Simon Peyton Jones where he gives an example from Financial domain (derivatives etc) to explain how haskell is being used and the advantages provided. I am interested in knowing if Haskell will be the right fit for my project. My requirements are transactional nature, which I believe is one of the strengths of functional programming, also handling large data set and being available. there is no such requirement for partitioning of data and the application is going to be centrally hosted on a single server. AFAIK OCaml and other functional languages are heavily used in financial domain, some of the reason are same as features I am looking for. I wanted some insight as to how Haskell is going to help me with my project. Also there has been some concerns because of lazy evaluation in Haskell and memory leaks associated with it. http://jlouisramblings.blogspot.com/2010/04/haskell-vs-erlang-for-bittorent-... Also, if you have any suggestions of the choice of programming language, we have been looking into other functional languages like Scala and Clojure. But we have not dig deep on the performance aspects of these languages, if someone can shed a light on the pros- cons of these languages, it will help us very much to come to a decision. -Regards, Amir

I don't think I can be of much help with regards to the questions, but
would you be able to post a link to the SPJ lecture?
Thanks :-)
On Tue, Jun 15, 2010 at 4:08 PM, Amiruddin Nagri
My current project is about making an accounting engine that handles all the journal entries, transactions, portfolios etc. The communication with the engine is based on simple protocol, the things to be taken care of in the order are consistency, handling large data(performance) and availability.
I came across a video lecture by Simon Peyton Jones where he gives an example from Financial domain (derivatives etc) to explain how haskell is being used and the advantages provided.
I am interested in knowing if Haskell will be the right fit for my project. My requirements are transactional nature, which I believe is one of the strengths of functional programming, also handling large data set and being available. there is no such requirement for partitioning of data and the application is going to be centrally hosted on a single server.
AFAIK OCaml and other functional languages are heavily used in financial domain, some of the reason are same as features I am looking for. I wanted some insight as to how Haskell is going to help me with my project. Also there has been some concerns because of lazy evaluation in Haskell and memory leaks associated with it. http://jlouisramblings.blogspot.com/2010/04/haskell-vs-erlang-for-bittorent-...
Also, if you have any suggestions of the choice of programming language, we have been looking into other functional languages like Scala and Clojure. But we have not dig deep on the performance aspects of these languages, if someone can shed a light on the pros- cons of these languages, it will help us very much to come to a decision.
-Regards, Amir
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

It should be somewhere here ->
http://www.haskell.org/haskellwiki/Video_presentations
-Amir
On Tue, Jun 15, 2010 at 1:42 PM, Lyndon Maydwell
I don't think I can be of much help with regards to the questions, but would you be able to post a link to the SPJ lecture?
Thanks :-)
On Tue, Jun 15, 2010 at 4:08 PM, Amiruddin Nagri
wrote: My current project is about making an accounting engine that handles all the journal entries, transactions, portfolios etc. The communication with the engine is based on simple protocol, the things to be taken care of in the order are consistency, handling large data(performance)
availability.
I came across a video lecture by Simon Peyton Jones where he gives an example from Financial domain (derivatives etc) to explain how haskell is being used and the advantages provided.
I am interested in knowing if Haskell will be the right fit for my
My requirements are transactional nature, which I believe is one of the strengths of functional programming, also handling large data set and being available. there is no such requirement for partitioning of data and the application is going to be centrally hosted on a single server.
AFAIK OCaml and other functional languages are heavily used in financial domain, some of the reason are same as features I am looking for. I wanted some insight as to how Haskell is going to help me with my
and project. project.
Also there has been some concerns because of lazy evaluation in Haskell and memory leaks associated with it.
http://jlouisramblings.blogspot.com/2010/04/haskell-vs-erlang-for-bittorent-...
Also, if you have any suggestions of the choice of programming language, we have been looking into other functional languages like Scala and Clojure. But we have not dig deep on the performance aspects of these languages, if someone can shed a light on the pros- cons of these languages, it will help us very much to come to a decision.
-Regards, Amir
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

Hi Amir, Amiruddin Nagri wrote:
My current project is about making an accounting engine...
Take a look at the related but different project "hledger". http://hackage.haskell.org/package/hledger http://hackage.haskell.org/package/hledger-lib
consistency, handling large data(performance) and availability... I am interested in knowing if Haskell will be the right fit for my project.
These things can certainly be achieved, and Haskell is a great platform for it. Reliability and assurance of correctness are very important for financial systems, and Haskell is especially good at providing them together with good performance. However, keep in mind that you are undertaking a very ambitious project. There are a lot of little design decisions to be made along the way which, if made without a lot of previous experience in whatever language you are using, could lead to serious problems later on in a large system like this. I recommend: o Start with a less ambitious version of the project - a simpler prototype with less requirements, or components that can be developed as a stand-alone and later integrated into your larger system. o Work closely with the community, on the #haskell IRC channel and the Haskell Cafe mailing list, to get guidance from experienced Haskellers. Share and discuss your code as you go along. (Or, if you select a different language that you are not very experienced in for developing large high-assurance commercial systems, do the same with that language's community.)
Also there has been some concerns because of lazy evaluation in Haskell and memory leaks associated with it.
The possibility for memory and performance leaks in large systems written in Haskell is no more or less than in any other mature programming language. As in any language, it takes experience and care to avoid them as your application scales up. Good luck, Yitz

I think Haskell would be an excellent choice. Several reasons come to mind: Given the arbitrary complexity of such projects, an EDSL describing book entries etc would be a very good fit for the project. As people have said once or twice, Haskell is a great fit for EDSLs If you want to get ambitious and scale this up to a multithreaded, multiuser environment, STM would be a very good concurrency model. This pretty much just leaves Haskell or Clojure. Finally, the type system of haskell is hugely useful to this project. Jane Street Capital (ocaml users and damned good at it) has a programming motto: make illegal transactions unrepresentative. The type systems of Haskell and OCaml let you structure this kind of project in a way to catch most of your bugs at compile time. So, I think Haskell is the perfect intersection of EDSL support, Concurrency, and powerful, static typing for the project. Good luck, keep us informed of your progress. Max On Jun 15, 2010, at 5:34 PM, Yitzchak Gale wrote:
Hi Amir,
Amiruddin Nagri wrote:
My current project is about making an accounting engine...
Take a look at the related but different project "hledger".
http://hackage.haskell.org/package/hledger http://hackage.haskell.org/package/hledger-lib
consistency, handling large data(performance) and availability... I am interested in knowing if Haskell will be the right fit for my project.
These things can certainly be achieved, and Haskell is a great platform for it. Reliability and assurance of correctness are very important for financial systems, and Haskell is especially good at providing them together with good performance.
However, keep in mind that you are undertaking a very ambitious project. There are a lot of little design decisions to be made along the way which, if made without a lot of previous experience in whatever language you are using, could lead to serious problems later on in a large system like this.
I recommend:
o Start with a less ambitious version of the project - a simpler prototype with less requirements, or components that can be developed as a stand-alone and later integrated into your larger system.
o Work closely with the community, on the #haskell IRC channel and the Haskell Cafe mailing list, to get guidance from experienced Haskellers. Share and discuss your code as you go along.
(Or, if you select a different language that you are not very experienced in for developing large high-assurance commercial systems, do the same with that language's community.)
Also there has been some concerns because of lazy evaluation in Haskell and memory leaks associated with it.
The possibility for memory and performance leaks in large systems written in Haskell is no more or less than in any other mature programming language. As in any language, it takes experience and care to avoid them as your application scales up.
Good luck, Yitz _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Amiruddin Nagri wrote:
My current project is about making an accounting engine that handles all the journal entries, transactions, portfolios etc. The communication with the engine is based on simple protocol, the things to be taken care of in the order are consistency, handling large data(performance) and availability.
I came across a video lecture by Simon Peyton Jones where he gives an example from Financial domain (derivatives etc) to explain how haskell is being used and the advantages provided.
I am interested in knowing if Haskell will be the right fit for my project. My requirements are transactional nature, which I believe is one of the strengths of functional programming, also handling large data set and being available. there is no such requirement for partitioning of data and the application is going to be centrally hosted on a single server.
Keep in mind that you have to invest some time in learning Haskell before you can reap the benefits. For an example of the latter, see also Paul Hudak, Mark P. Jones. Haskell vs. Ada vs. C++ vs. Awk vs. ..., An Experiment in Software Prototyping Productivity http://haskell.org/papers/NSWC/jfp.ps In a sense, you have to learn programming anew.
AFAIK OCaml and other functional languages are heavily used in financial domain, some of the reason are same as features I am looking for.
A key philosophy of Haskell compared to other functional programming languages like OCaml or Clojure is that Haskell is pure , i.e. functions do not have side-effects. Incidentally, purity is the only way to implement software transactional memory with the proper static guarantees. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com

Hi,
Keep in mind that you have to invest some time in learning Haskell before you can reap the benefits. For an example of the latter, see also
Paul Hudak, Mark P. Jones. Haskell vs. Ada vs. C++ vs. Awk vs. ..., An Experiment in Software Prototyping Productivity http://haskell.org/papers/NSWC/jfp.ps
This paper was very interesting to me. Does anyone know if the full source code for the Haskell prototype is available somewhere? Patrick -- ===================== Patrick LeBoutillier Rosemère, Québec, Canada

On 17 June 2010 16:12, Patrick LeBoutillier
This paper was very interesting to me. Does anyone know if the full source code for the Haskell prototype is available somewhere?
Chapter 8 of Paul Hudak's School of Expression contains a version of the "region algebra", there's also an ML version by Samuel Kamin where the region combinators generate C++ code: Samuel Kamin - Standard ML as a Meta-Programming Language: http://loome.cs.uiuc.edu/pubs.html http://loome.cs.uiuc.edu/pubs/ml-meta.pdf

Thanks, I'll try to look it up.
I have a question about the representation. In the paper, the authors
define a Region as:
type Region = Point -> Bool
type Point = (Float,Float)
I understand the idea that representing Regions as functions is quite
interesting when it comes to combining and manipulating them.
But what if one wants to calculate the area of a Region or render it
in some fashion?
Thanks,
Patrick
On Thu, Jun 17, 2010 at 11:24 AM, Stephen Tetley
On 17 June 2010 16:12, Patrick LeBoutillier
wrote: This paper was very interesting to me. Does anyone know if the full source code for the Haskell prototype is available somewhere?
Chapter 8 of Paul Hudak's School of Expression contains a version of the "region algebra", there's also an ML version by Samuel Kamin where the region combinators generate C++ code:
Samuel Kamin - Standard ML as a Meta-Programming Language:
http://loome.cs.uiuc.edu/pubs.html http://loome.cs.uiuc.edu/pubs/ml-meta.pdf _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- ===================== Patrick LeBoutillier Rosemère, Québec, Canada

Hi Patrick Rendering is easy - Region is a characteristic function - so apply it to all the coordinates in a bitmap (i.e. indexes in a 2D array) - you'll get a black-and-white picture. Conal Elliott's Pan and Jerzy Karczmarczuk's Clastic do this with an extend "colour characteristic" function -@ type Picture = Point -> RGB @- to make colour bitmaps rather than b&w ones. Area, I'm not sure about. Maybe you good integrate the function through a space, but this might not be a good idea. Best wishes Stephen

On 17 June 2010 19:58, Stephen Tetley
Area, I'm not sure about. Maybe you **good** integrate the function through a space, but this might not be a good idea.
Ahem, swap 'good' for 'could' in that bit... Antony Courtney used a dual representation for his vector graphics program - Haven. Images were both a "colour characteristic function" and proper/plain characteristic function for regions. I think this was so that "point in polygon" calculations could be made easily. type Image = (Point -> Color, Region) Perhaps, it might not be too much of a stretch to model regions both with a characteristic function and a more concrete representation that allows area to be taken more easily. The region combinators would become more complicated though.
participants (7)
-
Amiruddin Nagri
-
Heinrich Apfelmus
-
Lyndon Maydwell
-
Max Cantor
-
Patrick LeBoutillier
-
Stephen Tetley
-
Yitzchak Gale