Explore probabilistic programming and domain-specific languages in this Strange Loop Conference talk. Dive into Stan, a statistical modeling language, and discover ScalaStan, a novel Scala interface for Stan. Learn how ScalaStan leverages Scala's type system to ensure type-safety and prevent invalid code generation. Examine techniques for embedding domain-specific languages, enforcing scope, and type-checking input data. Gain insights into statistical modeling, Bayesian inference, and the intersection of programming languages and statistics through practical examples and in-depth explanations of key concepts.