Quantcast
Channel: First steps - JuliaLang
Browsing all 2795 articles
Browse latest View live

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 Article


Fail 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 Article


Thread-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 Article

Extracting 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 Article

Mutating 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 Article


Pluto - 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 Article

Plot 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 Article

Image may be NSFW.
Clik here to view.

Problems 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 Article


How 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 Article


AMDGPU 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 Article

Weird 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 Article

How 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 Article

How 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 Article


Find 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 Article

Pluto.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 Article


Image may be NSFW.
Clik here to view.

Problem 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 Article

Column/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 Article


Image may be NSFW.
Clik here to view.

Struggling 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 Article

Image may be NSFW.
Clik here to view.

Squeeze 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 Article

Print 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
Browsing all 2795 articles
Browse latest View live