Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Prefix julia> in online examples is not understood #344

Closed
juliohm opened this issue Mar 13, 2024 · 3 comments
Closed

Prefix julia> in online examples is not understood #344

juliohm opened this issue Mar 13, 2024 · 3 comments

Comments

@juliohm
Copy link

juliohm commented Mar 13, 2024

For instance, consider the GR examples:

julia> # Create example point data
julia> x = 8 .* rand(100) .- 4
julia> y = 8 .* rand(100) .- 4
julia> z = sin.(x) .+ cos.(y)
julia> # Draw the contour plot
julia> contour(x, y, z)
julia> # Create example grid data
julia> x = LinRange(-2, 2, 40)
julia> y = LinRange(0, pi, 20)
julia> z = sin.(x') .+ cos.(y)
julia> # Draw the contour plot
julia> contour(x, y, z)
julia> # Draw the contour plot using a callable
julia> contour(x, y, (x,y) -> sin(x) + cos(y))

In previous versions, we could simply copy/paste the example as is. Now we get an error:

ERROR: UndefVarError: `julia` not defined
@KristofferC
Copy link
Owner

KristofferC commented Aug 5, 2024

In previous versions, we could simply copy/paste the example as is.

What version?

I've been trying to copy paste this back to Julia 1.8 without OhMyREPL and it doesn't work. I get

julia> # Create example point data
       julia> x = 8 .* rand(100) .- 4
> (generic function with 1 method)

@juliohm
Copy link
Author

juliohm commented Aug 5, 2024

I don't recall the version of Julia + OhMyREPL.jl, but I remember this used to work, not sure.

@KristofferC
Copy link
Owner

but I remember this used to work, not sure.

Went back to Julia 1.0 and still doesn't work without OhMyREPL.jl at least.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants