Posts

Showing posts from March, 2011

Pros and cons of OCaml

The advantages and disadvantages of the OCaml programming language. Pros: More powerful type inference than any other language: OCaml even infers union and class types! Powerful module system lets you parameterize modules over other modules easily and safely with full compile-time checking and minimal run-time overhead. Structural typing of modules, polymorphic variants and classes improves brevity, closing the gap with dynamic languages, but can obfuscate error messages. Powerful integrated macro system lets you alter the language's syntax on-the-fly and write parsers quickly and easily. Good serial performance from the x64 code gen. Easy-to-use REPL. Lots of high-quality tools and libraries. Cons: No overloading can make numerical code over many different types (e.g. complex numbers, vectors and matrices) tedious. Poor multicore support means poor performance on today's computers. Some basic functionality missing (e.g. no 32-bit floats, no try .. finally construct...

Alternatives to Numerical Recipes

The Jet Propulsion Laboratory at Nasa once hosted an interesting web page listing better alternatives to the infamous book Numerical Recipes. Here is a copy courtesy of The Wayback Machine : There is no single alternative to Numerical Recipes. The authors of Numerical Recipes provide a superficial overview of a large amount of material in a small volume. In order to do so, they made many unfortunate compromises. It is naïve to hope that every computational problem can be solved by a simple procedure that can be described in a few pages of chatty prose, and using a page or two of Fortran or C code. Today's ambitions for correctness, accuracy, precision, stability, "robustness", efficiency, etc. demand sophisticated codes developed by experts with deep understanding of their disciplines. We have long ago outgrown the capabilities of the simplistic approaches of 30 years ago. Steve Sullivan has constructed a FAQ (Frequently Asked Questions) list on numerical analysis. ...