#361 in Computers & technology books
Use arrows to jump to the previous/next product

Reddit mentions of Pearls of Functional Algorithm Design

Sentiment score: 7
Reddit mentions: 9

We found 9 Reddit mentions of Pearls of Functional Algorithm Design. Here are the top ones.

Pearls of Functional Algorithm Design
Buying options
View on Amazon.com
or
    Features:
  • Cambridge University Press
Specs:
Height9.61 Inches
Length6.69 Inches
Number of items1
Weight1.6093745126 Pounds
Width0.69 Inches

idea-bulb Interested in what Redditors like? Check out our Shuffle feature

Shuffle: random products popular on Reddit

Found 9 comments on Pearls of Functional Algorithm Design:

u/tel · 49 pointsr/haskell

To first approximation, everything with the words "functional pearl" in it. A short list of ones I've read and enjoyed

  • Brent Yorgey's Monoids: Theme and Variations
  • Janis Voigtlander's Bidirectionalization for Free!
  • McBride and Patterson's Applicative programming with effects
  • Gibbons, Lester, and Bird's Enumerating the Rationals (I talked about this one here)
  • Mark Jones' Composing Fractals
  • Conor McBride's i am not a number--i am a free variable
  • Stephanie Wierich's Type-Safe Cast
  • Koen Claessen's A Poor Man's Concurrency Monad
  • Ralf Hinze's Explaining binomial heaps
  • M. Douglas McIlroy's Power series, power serious
  • Hutton and Meijer's Monadic parsing in Haskell
  • Gerard Huet's The Zipper
  • Jeremy Gibbons' The Third Homomorphism Theorem
  • Stephan Dolan's Fun with Semirings

    Also the entirety of Bird's book Pearls of Functional Algorithm Design is great. For an example, take a look at his sudoku solver

    And more...
u/edwardkmett · 19 pointsr/haskell

Types and Programming Languages by Benjamin Pierce covers type theory, and systems of type inference that we can have, and the ones we can't and why.

Pearls of Functional Algorithm Design by Richard Bird covers how to think equationally about code. It is probably the best guide out there on how to "think" like a Haskeller. Not directly about a discipline of math you can apply, but the mindset is invaluable.

Wadler's original papers on monads are probably when they finally clicked for me.

The original Idiom paper is also a golden resource for understanding the motivation behind applicatives.

Jeremy Gibbons' The Essence of the Iterator Pattern motivates Traversable, which so nicely encapsulates what folks meant by mapM over the years.

Uustalu and Vene's The Essence of Dataflow Programming captures a first glimmer of how and why you might want to use a comonad, but it can be fairly hard reading.

Awodey's Category Theory is probably the best general purpose category theory text book.

For folks weak on the math side Lawvere and Schanuel's Conceptual Mathematics can be used to bootstrap up to Awodey and provides a lot of drill for the areas it covers.

Dan Piponi's blog is excellent and largely set the tone for my own explorations into Haskell.

For lenses the material is a bit more sparse. The best theoretical work in this space I can point you to is by Mike Johnson and Bob Rosebrugh. (Pretty much anything in the last few papers linked at Michael's publication page at Macquarie will do to get started). I have a video out there as well from New York Haskell. SPJ has a much more gentle introduction on Skills Matter's website. You need to signup there to watch it though.

For comonads you may get some benefit out of my site comonad.com and the stuff I have up on FP Complete, but you'll need to dig back a ways.

u/OddInstitute · 9 pointsr/math

It’s not particularly trendy right now in the programming world, but algebraically deriving efficient programs from their implementations is the primary thing Richard Bird has done in his career.

It usually goes under the name Algebra of Programming and you can see it described and used in the books [Pearls of Functional Algorithm Design](Pearls of Functional Algorithm Design https://www.amazon.com/dp/0521513383/ref=cm_sw_r_cp_api_i_dmFWCbX54E4G1) and [The Algebra of Programming](The Algebra of Programming (Prentice-hall International Series in Computer Science) https://www.amazon.com/dp/013507245X/ref=cm_sw_r_cp_api_i_-fFWCbRYRZ6W8).

The basic idea is that you can specify your problem with a naive functional program and apply algebraic transformations to that program which preserve the behavior while improving the runtime.

Jeremy Gibbons is also doing exceptionally good work in this area (and presently leads the research group linked above). You can see a taste of this sort of thinking here as well.

u/apfelmus · 4 pointsr/haskell

In my opinion, "Algebra of Programming" is really a book about understanding optimization algorithms like dynamic programming, greedy algorithms, divide-and-conquer etc. in a unified manner, guided by category theory.

In other words, it is intended to be applied to problems like [linear paragraph formatting][1] or counting word numbers, though the style is a lot more abstract in the book. This is extremely interesting stuff, but also a little niche.

I can't say anything about Elements of programming, because I have never heard of this book.

If you want a more down-to-earth version of "Algebra of Programming", I would recommend Richard Bird's [Pearls of functional algorithm design][3]. It covers different material, but Bird has a very mathematical/structured approach to programming that is definitely worth learning from.

[3]: http://www.amazon.com/Pearls-Functional-Algorithm-Design-Richard/dp/0521513383

[1]: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.33.7923

u/gregK · 4 pointsr/haskell

>For this reason, if we want to convey the usefulness of FP to the imperatives amongst us, we need to focus on elegant solutions to real world inputs and outputs. We need to show how our I/O-libraries, often overlooked or thought of as mere “helpers”, are superior in efficiency and leads to cleaner and more maintainable code.

There are plently of articles and blog posts on the web on how to do IO, Effects, etc in haskell. I am all for learning to do practiacal stuff like writing to a file. BUT learning to get the most of pure funtions would probably yield the biggest wins in terms of code quality and ability to reason about it. Having worked for most of my career with imperative langauges, getting the most out of FP requires a whole new skill set. It's not enough to understand the concepts, you need to practice and read a lot of good functional code.

That's why I love books like Pearls of Functional Algorithm Design. We need more books and articles like that. Just the sudoku solver in there is an eye opener.

u/ReinH · 3 pointsr/haskell

Try Bird's Introduction to Functional Programming using Haskell, which this seems to be an update of! One of the best books on FP ever written IMO. And his Pearls of Functional Algorithm Design. And (it's a bit pricey though!) his Algebra of Programming.

u/ryanplant-au · 2 pointsr/learnprogramming
u/htedream · 2 pointsr/Clojure

most of the algorithms books are for any programming language as long as they are imperative.

as far as functional languages go, there are:

u/binarybana · 2 pointsr/haskell

It sounds like you may want to take the same approach you mentioned in your C++ code, but in a functional way. I'd recommend taking a look at some of Bird's functional pearls such as [1] or look in his book [2] for a great variety, as he often takes the approach of: "okay, lets start with the obvious and (often) intractable approach of generating all possible graphs, and then filter that list." Then he goes one step at a time to generate the solutions more efficiently by taking advantage of the properties of the problem until he often arrives at quite efficient (and elegant) solutions.

Haskell's laziness can be a great benefit here as Flarelocke mentioned: you only generate functions as your filter evaluation function needs them. So the essence of your program might be: filter graphPass efficientGenerateGraph.

I also recommend you look at the Inductive graph library [3] as it is a much more mature graph library as evidenced by Ivan's wonderful supporting libraries such as graphalyze [4], graphviz, . It took me a bit of a learning curve to wrap my head around it, but once you get it (just ignore all the monadic interfaces at first for instance) then it is a joy to work with.

To see some 'real' code that uses fgl then you can look at my code which does some computational biology inference/modeling using it. I've tried to document the code, but I could have done a better job. [5]

[1] - http://www.cs.tufts.edu/~nr/cs257/archive/richard-bird/sudoku.pdf

[2] - http://www.amazon.com/Pearls-Functional-Algorithm-Design-Richard/dp/0521513383

[3] - http://hackage.haskell.org/package/fgl

[4] - http://hackage.haskell.org/package/Graphalyze-0.11.0.0

[5] - https://bitbucket.org/binarybana/grn-pathways