News for hackers. Stuff that matters.
Re:A CP Solution for XKCD NP Complete Restaurant Order by swannodette on Tuesday May 28, 2013 @11:42AM (#5780663)
In Clojure's core.logic it's also pretty succinct ;)

   (run* [mf ff ss hw ms sp]
     (fd/in mf ff ss hw ms sp (fd/interval 0 10))
     (fd/eq
       (= (+ (* mf 215) (* ff 275) (* ss 335)
             (* hw 355) (* ms 420) (* sp 580))
          1505)))
Also the post seems incorrect there seem to be two extra results that do not add up to $15.05?
Re:A CP Solution for XKCD NP Complete Restaurant Order by amouat on Tuesday May 28, 2013 @11:56AM (#5780746)
I wondered how long it would be until a core.logic version appeared :)

I think the original post has one of the prices wrong.

BTW thanks for working on this stuff swannodette - I hope to look into core.logic in the not too distant future...

EDIT: Yes, his price for salad is 3.25 instead of 3.35