Hello people
I am currently working with the package Rocket.jl and would like to run the sample code at GitHub - biaslab/Rocket.jl: Functional reactive programming extensions library for Julia
but the following code always brings an error message.
using Rocket, Compose, IJulia ; set_default_graphic_size(35cm, 2cm)
function draw_ball(t)
IJulia.clear_output(true)
x = -exp(-0.01t) + 1 # x coordinate
y = -abs(exp(-0.04t)*(cos(0.1t))) + 0.83 # y coordinate
display(compose(context(), circle(x, y, 0.01)))
end
source = interval(20) |> take(200) # Take only first 200 emissions
subscription = subscribe!(source, draw_ball)
Message under WIN11 - Julia 1.8.5:
TimerSubscription()
Error in Timer:
What am I doing wrong here?