Hacker News new | ask | show | jobs
by ShaneWilton 3204 days ago
This is a great introduction to monoids. The shape example actually appeared in a study performed in the early 90s [0]. I'm not convinced that you can draw too many valuable conclusions from the study, but it's a fun, quick paper to read.

[0] "haskell vs. ada vs. c++ vs awk vs ... an experiment in software prototyping productivity" - http://www.cs.yale.edu/publications/techreports/tr1049.pdf

1 comments

The shape example reminds me of how traditional raytracing renderers work: the entire scene is a function whose input is [x,y] view space coordinates and output is [r,g,b] color. To produce an image, you call the function for each pixel and store the results.

Could be an interesting tutorial to see a raytracer explained in terms of monoids.