Do something when value is stated as top-level
Is there any way to create a hook that is called when some values (say, values of a certain type) are stated as top-level? Perhaps by overloading the eval function? 3 posts - 2 participants Read full...
View ArticleFail to precompile RCall package
R_HOME directory is all set and R installation is all good, but the precompiling step didn’t work. julia> using RCall [ Info: Precompiling RCall [6f49c342-dc21-5d91-9882-a32aef131414] ERROR:...
View ArticleThread-local `Dict` for each thread?
How can I change my code to go from using a single global Dict to having a different thread-local Dict for each thread? For example, suppose I have a package that looks like this: module MyModule...
View ArticleExtracting hashtags from text: Flattening in Query.jl
Hi everyone! I’m currently trying to use extract hashtags from text. While I’ve figured out a working solution, I can’t shake the feeling there’s a more elegant solution. I’m used to the Tidyverse in...
View ArticleMutating global variable during precompilation
Hi, I am trying to register items in a top-level global variable from include()d files and modules, and am seeing behavior I am not able to explain. Here is a minimal code: File main.jl: module MyPkg...
View ArticlePluto - UndefVarError
Hi, I am using Pluto and got an UndefVarError I cannot reproduce in VSCode. If I run the following code in Pluto I get an error that foo is not defined: begin foo = [1,2,3] all_foos = [] for i in 1:5...
View ArticlePlot level curves without Pyplot package and gr()
(topic withdrawn by author, will be automatically deleted in 24 hours unless flagged) 1 post - 1 participant Read full topic
View ArticleProblems with level curves
Dear all I have the following code to plot the level curves: using Plots plotly() import Contour: contours, levels, level, lines, coordinates f(x,y) = y^2 + x^2 xs = ys = range(-5, stop=5, length=100)...
View ArticleHow to get started to contribute to Julia and packages
I have coded in Julia for a little month and I am very excited about many things. Since it is a programming language in its freshman year, improvements are to be made. And I would like to contribute...
View ArticleAMDGPU install errors
Hi, first time poster here… not that that means anything… in need of a little help. Whilst building AMDGPU I am getting errors as below: ┌ Error: Error building AMDGPU: │ WARNING: redefinition of...
View ArticleWeird constructor error
Hi, I’m getting an error when calling a constructor and I can’t figure out what’s wrong. It used to work but after fiddling with the code a bit (I honestly don’t know what I changed exactly anymore...
View ArticleHow to avoid supplying exact types in a Dict constructor?
Hi, When I have a type hierarchy where TC is a concrete implementation of type T and I have defined a struct as follows: struct Foo d::Dict{T,Any} end What do I need to do to be able to call the...
View ArticleHow to merge arrays in julia
Hello, I have two arrays like this: ulia> soln1 retcode: Success Interpolation: Automatic order switching interpolation t: 5-element Array{Float64,1}: 0.0 0.23056783545255075 1.117776876821525...
View ArticleFind index of maximum value of array
I have an array and I woul dlike to find the index of the maximum value. I tried with: julia> X = [0,0,0,0,0,0,0,0,5,0,0,0,0,1] 14-element Array{Int64,1}: 0 0 0 0 0 0 0 0 5 0 0 0 0 1 julia>...
View ArticlePluto.jl not being updated
Pluto v0.12.16 should be out. This is what I get in the REPL: julia> Pkg.status(“Pluto”) Status ~/.julia/environments/v1.5/Project.toml [c3e4b0f8] Pluto v0.12.12 julia> Pkg.update(“Pluto”)...
View ArticleProblem using Plots
Hi. I need some help here. I tried adding the Plots pakage in julia and got an error. I have windows 7 and 1.5.3 Julia version. It seemes like an error in the path but I don’t know how to fix it....
View ArticleColumn/row-wise norm
Sorry if this has been posted a bunch but my googling has failed me. I have a 2D array, and want to treat each row (or column) as a vector and find norm of it. I’m looking for something like N =...
View ArticleStruggling to access packages with new Julia install
Hi, First, apologies, and a request for patience, my techie skills comprise small islands of knowledge in a sea of empty space. My problem is that I am trying to get Julia running on my laptop. I have...
View ArticleSqueeze disappeared (removing dimensions which are equal to 1)?
I found old questions about using squeeze but the function seems to have disappeared. Did it move into another library ? I need it because I’m attempting to translate some matlab code 3 posts - 2...
View ArticlePrint debugging output only if some condition holds
I want to introduce some checks in my function. In my real code, the check is time-consuming. So, I want that part to run only when some global environment variable is set (e.g. ENV["JULIA_DEBUG"] =...
View Article