TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Probly – a Python-like language for quick Monte Carlo simulation

3 pointsby tadamczover 1 year ago
Hello! I&#x27;m Tom and I&#x27;ve been working on Probly. It&#x27;s a small language designed to make it easier to build simple Monte Carlo models.<p>(There are four code examples at the link, ranging from about 10 lines to 100+ lines of code.)<p>With this project, the hope is to make it feel less onerous to get started making calculations that incorporate uncertainty. Users don&#x27;t need to learn powerful scientific computing libraries, and boilerplate code is reduced.<p>Probly is much like Python, except that any variable can be a probability distribution.<p>For example, `x = Normal(5 to 6)` would make `x` normally distributed with a 10th percentile of 5 and a 90th percentile of 6. Thereafter `x` can be treated as if it were a float (or numpy array), e.g. `y = x&#x2F;2`.<p>Probly may be especially beneficial (over other approaches) for simple exploratory models. However, it has no problem with more complex calculations (e.g. several hundred lines of code with loops, functions, dictionaries...).<p>Probly is implemented in Go. It&#x27;s a simple modification of Starlark (a subset of Python originally designed for use as a configuration language). By the way, most but not all of it could have been implemented in Python by overloading operators, etc.

no comments

no comments