VS CODE not launching SVG Picture

I managed to install VS Code and the julia extension and am working through “think julia how to think like a computer scientist” am on page 36 where the turtle draws a line but when i execute the code no SVG page comes up displaying the line.

Any ideas anyone ?

The package ThinkJulia.jl seems to have its last commit 2 years ago. I’m not sure whether they have any updates.

If you want to draw pictures and visualize on your PC maybe you can go with Makie.jl or something else. According to my experience with Makie, the safest way to view a picture is to save them as a local file. Then in any way you can open them with your local software.

And, there are also other good learning resources if you’re starting to learn julia.

I asked grok and it said to check the julia extension, found a path in there to store plots.
julia>plots:Path which i set, then got errors so modified the code to this.

using ThinkJulia
function main()

🐢=Turtle()



println("start")

@svg begin
    pendown(🐢)
    forward(🐢,100)
    turn(🐢,-90)
    forward(🐢,100)
end
println("finishd")

end

main()

it now creates a svg file, i downloaded pixodesk to view it and it just shows a blank canvas, i put the pendown command in thinking that would solve it but no luck

Agreed - it’s caused problems in the past and I don’t know how many were fixed.

There are turtles here

if you want. But there’s no instructions on how to use VS-Code or Jupyter to write Julia code. For that you’ll want an up to date introduction to Julia.

ok, thanks everyone. figure it just a bug, found the books now online so presume they discontinued the support. Will read through the book and then hopefully find some stuff not using .svg.

Maybe will try the code in julia instead of using VS CODE

Once again, thanks everyone for your time on this problem.

Regards

Jason Palmer

UPDATE

I tried the code in the book just from the Julia prompt outside of VS Code and get an error message so the problem is obviously not VS Code.

UPDATE

I have emailed Ben Lauwens about the bug, when i tried working through the book a few years ago it worked fine so presume it a new bug in the package.

Will see what he says and if provides a fix will come and post it on here in case anyone else gets the problem in the future.