I spent 5-15 January visiting U Penn and attending PADL, POPL, and Plan-X in Charleston, SC...

Interesting trip report.

I encourage you to lure Philip into a LtU discussion...

Modeling Genome Evolution with a DSEL for Probabilistic Programming sounds interesting, I'll have to look it up.

And talking about possible applications for Links, doesn't building a Google-Web Services APIs-AJAX DSL sound like a cool application for Links? Think about it as the easiest way to program an AJAX applications based on web services APIs, and automatically integrated into the Google universe (think Google maps etc.) If anyone from Google is reading this - this might be a cool "20 percent time" project... I won't go on since I am sure you can all imagine the possibilities (e.g., think about it is a scripting language for writing widgets for a future incarnation of a "Google Pack").

Comment viewing options

groupBy in list comprehension?

Erik Meijer posed me the problem of how to integrate groupBy neatly into a list comprehension. I think I found a neat answer based on "Theorems for Free". Watch this space!

I remember a group by operation in Grust's "Comprehending Queries," split a list on a key, aggregate the seperated lists and put them back together (that's how I remember it)...is that something wrong with that approach?

Not really a list comprehension

Grusts approach relies on set comprehensions rather than ordinary list comprehensions - maybe that's the issue?. (btw, the relevant paper is actually "Monad Comprehensions").

Basically, given a group by query:
 select f x, agg (g x) from xs as x group by f x 

then the list comprehension:
 [(f x, agg [g y | y ← xs, f y == f x ]) | x ← xs] 

almost gives us the equivalent semantics - the only problem is that the result is likely to contain duplicates. Grust uses a set comprehension instead to solve that problem.

(note: 'agg' is the aggregate function you want to apply, eg. sum)

A DSEL for Probabilistic Programming

That was my presentation at PADL. I've got to frankly say that I never expected to see myself, one way or the other, hit the front-page of Lambda the Ultimate. :)

Incidentally, the relevant the paper is on-line

The best way to predict the future...

Google-Web Services APIs-AJAX DSL... the easiest way to program an AJAX applications based on web services APIs, and automatically integrated into the Google universe (think Google maps etc.) If anyone from Google is reading this - this might be a cool "20 percent time" project... I won't go on since I am sure you can all imagine the possibilities (e.g., think about it is a scripting language for writing widgets for a future incarnation of a "Google Pack").

Then came GWT.

This is the obvious next step.