Trouble Using Cthulhu in VsCode Integrated Terminal

Hello,

I am trying to following along with this video here on performance in Julia. I’ve created a fresh environment with Cthulhu version 2.8.13. I did not add any other packages. I open vscode in my package directory and then set that as the Julia environment for Vscode to use.

I then start a Julia REPL by pressing shift and enter on the first line (see below).

using Cthulhu

add2(a, b) = a + b

Then I try to do @descend add2(1, 2) in the REPL that has opened in the integrated terminal but I get the following error. This does not occur when I go thru this process in a standalone REPL outside VsCode. This error does not make sense to me because I am not passing Nothing so I am not sure how it is getting that.

julia> @descend add2(1, 2)
ERROR: MethodError: no method matching +(::Nothing, ::Int64)
Closest candidates are:
  +(::Any, ::Any, ::Any, ::Any...) at operators.jl:591
  +(::T, ::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8} at int.jl:87
  +(::T, ::Integer) where T<:AbstractChar at char.jl:237
  ...

I’m assuming I am screwing something up with environments here? My Julia extension is version 1.38.2.

1 Like