archives

Is it ok...

I was planning on asking for peoples comments about a parser generator I recently made. Is that appropriate for LtU?

Light(er) Reading Suggestions?

There's plenty of reading suggestions for authoritative references on various topics, and a few from LtU threads of which I've used. However, sometimes, you just want to read a book, away from your computer without doing exercises or programming at the same time. In fact, in my case, I prefer to do most of my reading this way.

For example, a book like SICP or TAPL isn't exactly something that you lay down on the couch with and just read. Unfortunately, most of the books that are the page-turning type are the "popular" math or compsci books that don't really challenge your brain enough. Is there a happy middle ground here? Any suggestions on titles that might fill this apparent void? Ideally, while I may not get all the details of some topic covered, when later encountered in a more formal text, I'll have already been exposed enough to it to make the full understanding that can only come from solving problems and running/modifying sample code far easier.

I'm mainly interested in functional programming, PLT, and related mathematical topics.

The Genuine Sieve of Eratosthenes

Melissa E. O’Neill, The Genuine Sieve of Eratosthenes.

A much beloved and widely used example showing the elegance and simplicity of lazy functional programming represents itself as "The Sieve of Eratosthenes." This paper shows that this example is not the sieve and presents an implementation that actually is.

Starting with the classic one-liner sieve (p : xs) = p : sieve [x | x <- xs, x ‘mod‘ p > 0] O'Neill proceeds to show why this standard rendition of the Sieve of Eratosthenes does not in fact "cross-off" the multiples of each prime in the same way the "real" Sieve does.

She notes that "Some readers may feel that despite all of these concerns, the earlier algorithm is somehow “morally” the Sieve of Eratosthenes. I would argue, however, that they are confusing a mathematical abstraction drawn from the Sieve of Eratosthenes with the actual algorithm. The algorithmic details, such as how you remove all the multiples of 17, matter."

A fun read.

JetBrains releases MPS (Meta Programming System)

JetBrains has released their Meta Programming System (MPS). It will be a free product, with much of it under an open source license.

User guide and tutorials are here and here