quantified-uncertainty / squiggle

An estimation language
https://squiggle-language.com
MIT License
148 stars 22 forks source link

Function charts lengthen infinitely in preview #3124

Open OAGr opened 3 months ago

OAGr commented 3 months ago

Description of suggestion or shortcoming:

image

When I hover over a function chart variable, it expands forever, similar to what happened before with dists. I assume a similar fix should work here.

https://github.com/quantified-uncertainty/squiggle/issues/3013

OAGr commented 3 months ago

Huh, I'm having trouble replicating it now. Seems sporadic. Will keep an eye out for a replicable example.

OAGr commented 2 months ago

Here's a replication: https://www.squiggle-language.com/playground?v=dev#code=eNptjcEKwjAQRH9lySnBWtpiBQue9Au8iVEIZAPFdlvSiJTSf3cbDwoKexh23sxMwqIzjyYcOouiEkMwPsAejiZg2po7yiIrNgnw5UoTkv1jbt%2BmJkcy1C1WcIk9yQ%2BZ5wt6VVwyaQKwtXOsQ3dG44cYhjXEsFr8kd%2FNeOIWpqjzrWnkBH1ZwTpLiwT6HcssLWGOuKHhiZ5RmcPqK6zgFqc%2BjKZZk5hfbJtNuA%3D%3D

start = Date.make(2024, 4, 1)
end = Date.make(2024, 6, 1)

fn(time: [start, Date.make(2024, 11, 1)]) = {
  diff = toYears(time - start)
  yearlyRate = normal({ p5: -0.2, p95: 0.5 })
  answer = (1 + yearlyRate) ^ diff
  answer
}