Hacker News new | ask | show | jobs
by medo-bear 1870 days ago
thanks for this. there is also Probabilistic Models of Cognition [0] by one of the authors. I wish however that they stuck to Church language [1]

[0] https://probmods.org/

[1] http://web.stanford.edu/~ngoodman/papers/POPL2013-abstract.p...

2 comments

I too preferred church, though I understand why the authors of dippl chose a more popular language (javascript) for their book. Church (a dialect of Scheme, which is a dialect of Lisp) also ties probabilistic programming back to its intellectual roots in McCarthy's amb operator [1].

That said, you can get pretty far with probabilistic programming in any language with decent monad support [2]. I did most of my probabilistic programming work in Scala. (You lose the ability to do really fancy inference if you go the monad route, as you can't analyze the program structure, but a lot of the time, this is fine.)

[1] http://community.schemewiki.org/?amb

[2] http://mlg.eng.cam.ac.uk/pub/pdf/SciGhaGor15.pdf

I wish I could have Church as a Jupyter notebook/lab Kernel.

Would make it much easier to play around with the language when trying to wrap my mind around the church version of probmods.

Not exactly the same thing but try clojure with anglican in nextjournal to see if it fits your needs.
Last time I tried putting a lisp into jupyter as a playground for church, I realized that I was missing all the plotting features to really get anywhere and before I realized it, I had to stop my self from reimplementing church’s standard library.

I’ll have a look on google on the names you mentioned :)

In nextjournal you can plot clojure output trivially with plotly or vega-lite. It’s just a matter of adding metadata to your output, like this:

    ^{:nextjournal/viewer :plotly}
    {:data [{:x '(0 10 20 30 40)} 
            {:y '(5 10 15 20 25)}]
     :layout {:autosize false :width 800 :height 400 
              :xaxis1 {:title "year"} 
              :yaxis1 {:title "revenue"}}}
See the result here:

https://nextjournal.com/kommen/plotting-from-clojure

Regarding anglican, here is a link. It’s basically a church port:

https://probprog.github.io/anglican/