4 ms·
As you mentioned, there are pros and cons to inventing the Stan DSL. Originally, we wanted a language that was not too different from the BUGS language because
by bengHN 11y ago
As you mentioned, there are pros and cons to inventing the Stan DSL. Originally, we wanted a language that was not too different from the BUGS language because the BUGS family was what most applied Bayesians were using (if they weren't using some specialized MCMC algorithm for their problem).
And programmatic manipulation (while not impossible) of a Stan program was not high on our priority list. Since the underlying language is C++, you can bypass the Stan language and write (or generate) the C++ directly with a lot of effort. It uses standard (including Eigen) data structures.
- dj-wonk 11y ago> you can bypass the Stan language and write (or generate) the C++ directly with a lot of effort Did you mean "without" a lot of effort? :)
- bengHN 11y agoUnfortunately no, but a few brave souls have done so. It is slowly getting easier.
- eggy 11y agoClasp [1] could be used to write a Common Lisp version, and as most know, CL makes it easy to write DSLs, interface with C++ (with Clasp), and manipulate code as data, even more so than Julia. I may look into this soon. Very exciting. Great work by the Stan team by making it available across so many popular languages! [1] https://drmeister.wordpress.com/2014/09/18/announcing-clasp/ https://drmeister.wordpress.com/2014/09/18/announcing-clasp/