Subscribe to this list via RSS Blog posts tagged in functional programming
Two great articles on implementing classic languages: FORTH and Lisp I am currently reading through two very interesting articles on implementing classic programming languages in assembler: Implementing a FORTH interpreter in i386 assembler Implementing Lisp in assembler for the Raspberry Pi Both these are not really articles - they are in fact extremely well-commented source code, but so well commented that they are, effectively, an article with the occasional bit of assembler.  Both are very worth reading, even if you have no prior assembly, FO...
An Overview of elements of functional programming in C++ (ending) Part III.  Where it is told about the technics to manipulate the call signatures of functional objects   Currying There is not only a functional language named after Haskell Curry, but also a functional operation—converting a function from many arguments to a set of functions, each of which has one argument.   “This Is the House That Jack Built” A World known British nursery rhyme  can give you an intuitive notion of currying concept. This cumulative tale  s...
An Overview of Elements of Functional Programming in C++ (continuation) Part II.  Where it is told about closures and "functional containers" - data structures that can store pointers to functional objects of various types std::function While the functional paradigm proclaims that "everything is a function," in imperative programming we sometimes encounter the need to manipulate functions like with ordinary objects. Usually this happens by creating a pointer to the address of the procedure or method. However, in this case and others, high-level language...
An Overview of Elements of Functional Programming in C++ Hello everybody! This article is a brief introduction to the functional programming style when using an imperative language like C++. In particular, we will use C++Builder, a C++ development environment that can target many platforms, to show examples for how functional programming can work. I'll start with some arguments about the role of functional programming in the object-oriented paradigm. Many of the statements here are controversial, so do not forget that "in a dispute, truth is born"....

Posted by on in Blogs
On Learning Programming and Math at Coursera Coursera, Udacity, MIT Open Courseware, and other such sites are useful to me because they decouple the desire to learn college-level material from the expense and regulations of earning (another) diploma. The latter isn't compelling to me today, but the former certainly is. I've now taken three Coursera courses: Functional Programming Principles in Scala, Social Network Analysis, and Coding the Matrix: Linear Algebra Through Computer Science Applications. I also tried to take Calculus: Singl...

Posted by on in Blogs
Strange Loop Crossword I wrote a 15*15, NYT-style crossword puzzle for Strange Loop. On the NYT difficulty scale, it's roughly a Wednesday-level puzzle. However, it was written for Strange Loop and thus does presume familiarity with functional programming and math, and has a few "inside jokes." You can find the puzzle and the solution on the Strange Loop wiki....

Posted by on in Blogs
A Functional View of A Web Server A few days ago, I opined that, "Web applications, as a class, are extremely easy to debug." I'm going to further explain why I think that is true by introducing a useful abstraction which you can employ when you are debugging a web application which doesn't seem to do what is is intended to do. When a web application misbehaves, one of the first things you'll need to do is determine if the problem is in the browser/client (e.g., buggy JavaScript, attempting to use CSS on IE 6, etc.) or in the...

Posted by on in Blogs
Functional Programming in Delphi 2009 Video The video of my CodeRage III presentation on Functional Programming in Delphi 2009 is available for download. You'll want to grab the source code first, so that you can follow along during the presentation. Delphi 2009 includes several new features well suited to a functional style of programming. We'll explore the use of generics, anonymous methods, and new RTL types while introducing concepts from functional programming. By the way, comments on this blog should be fixed now; the spam filter ...
My CodeRage Presentation: Functional Programming in Delphi 2009 I'll be speaking at the CodeRage III virtual conference, on the subject of functional programming in Delphi 2009.  Here's the (rather bland) abstract: Delphi 2009 includes several new features well-suited to a functional style of programming.  We'll explore the use of generics, anonymous methods, and new RTL types while introducing concepts from functional programming. If you've been following my blog over the past few months, you might have a fair idea of what to expect.  As you can tell from...

Posted by on in Blogs
Implementing Memoize in Delphi 2009 My last series on Delphi 2009's generics was self-consciously investigating a corner case.  This post, however, is going to bring us back to Earth very quickly, so prepare for a steep descent!  I'm going to implement a useful, higher-order function, Memoize, using Delphi 2009's generics and anonymous methods. Memoization is a generic solution to the problem of caching function results. The function Memoize accepts a function as an argument and returns a function which does exactly the same th...

Check out more tips and tricks in this development video: