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

Proper escaping when building a command with nested quotes

@dapz wrote: Hi, I was wondering if there is a “rule” to write commands with nested quotes that work. Here is an example with 3 nested commands (bash calling bash calling julia). My final goal is...

View Article


Image may be NSFW.
Clik here to view.

Problem installing JuliaPro on Linux Mint 19.1

@sbihorel wrote: Hi I am getting back to Julia after years of non-usage. I’ve tried to install JuliaPro on my Linux Mint 19.1 (ie, a flavor of Ubuntu 18.04) desktop using the following steps: Using...

View Article


Confused about Dimension Mismatch

@Tommaso_D_Amico wrote: I have the following code snip: a = Matrix(dR') b = W @show size(a),size(b) @show typeof(a), typeof(b) G = a*b This is the output/error I get: (size(a), size(b)) = ((1, 5), (5,...

View Article

Image may be NSFW.
Clik here to view.

JuliaPro, Authentication timeout, Token not found

@Aizzaac wrote: Hi I have just installed JuliaPro in a computer which ONLY has command line. I want to use the Knet package. But whenever I use the following command Pkg.add("Knet"), I get an error....

View Article

Code stability with for loop

@Egwene_al_Vere wrote: With for loops, @code_warntype can have one yellow/warning about union. Is it ok performance-wise or am I doing something wrong here? example function f(a) c = zero(eltype(a))...

View Article


"odd" behavior of module import in multi process environment

@Sijun wrote: Maybe odd only in the eye of novice user, but I would like to know why. So, I have the settings for multi process environment JULIA_NUM_THREADS = 4 number of precesses = 4 (-p4) Also, I...

View Article

Your friendly neighbourhood multithreaded Spiderman

@StevenSiew wrote: Hi I am your friendly neighborhood multithreaded spiderman Today, you have gain a new superpower with your new suit called julia-1.3 Before you go swinging high above the building...

View Article

Multithreading and for loops

@StevenSiew wrote: Why does this works using Base.Threads A = zeros(3,3) Threads.@threads for col = 1:3 for row = 1:3 A[row,col]=(col-1)*3+row end end display(A) But this does not work using...

View Article


Multithreading and rand within a specific range

@HelgavonLichtenstein wrote: Hello, I am trying to find parameters that make my model work using brute force. To do this I need to run my model many times varying the parameters each time. It works...

View Article


How to read NamedTtuples with JSON3?

@Elmer_Cusipuma wrote: I am trying to do the following using JSON3 struct data d::NamedTuple{(:a,:b,:c), Tuple{Symbol,T,T}} where T <: Union{Nothing,Real} end JSON3.StructType(::Type{data}) =...

View Article

PackageCompiler: Setting the number of threads

@scj wrote: Is it possible to set the number of Julia threads when building an executable using PackageCompiler? module Hello Base.@ccallable function julia_main(ARGS::Vector{String})::Cint...

View Article

Callbacks on parts of SharedArrays

@hcarlsso wrote: The problem I have is how to define functions that modify parts of SharedArrays. What I want to achieve is the following: using Distributed addprocs(2) @everywhere using SharedArrays...

View Article

How to define NamedTuple types in struct?

@Elmer_Cusipuma wrote: I can implement the next code: struct data p::NamedTuple{(:a,:b,:c,:d,:e), Tuple{Symbol,Bool,Any,Any,Any}} end q1 = data((a=:n,b=true,c="one",d=1,e=1.2)) q2 =...

View Article


Unable to evaluate parameters in Juno.@enter debugger

@venuur wrote: On Windows 10 with Juno 1.40.0 (I think, downloaded via Julia Pro 1.2), I’m trying to use the Juno debugger via Juno.@enter, but I am unable to evaluate the parameters of my function,...

View Article

Two @spawnat runs in the same thread

@Sijun wrote: The example below is from Julia 1.3 manual (with some prints added) @everywhere function count_heads(n) c::Int = 0 for i = 1:n c += rand(Bool) end c end a = @spawnat :any begin @async...

View Article


Custom modules usage

@kirtsar wrote: My LOAD_PATH looks like: ... ~/progs/dev I have two modules in dev folder. However, I can use using only for one module, and the second one seems “invisible” to Julia for some reasons…...

View Article

Image may be NSFW.
Clik here to view.

Feedback on new package

@venuur wrote: I’m still pretty new to Julia so I’m looking for advice on how share a package. It ports over Unix style shell pattern matching from the Python module fnmatch: GitHub venuur/FnMatch.jl...

View Article


@spawn and @btime/@benchmark causes Julia to "hang"...?

@braamvandyk wrote: I just set up a new machine with a CUDA GPU and started playing with the getting started examples from CuArrays.jl when I ran into a strange problem, not linked to CuArrays, but...

View Article

Completely puzzled why AdvancedHMC version went backwards

@StevenSiew wrote: Today I perform update on the packages for Julia-1.3 But I was extremely puzzled why the package AdvancedHMC version went BACKWARDS. No other package version has went backwards....

View Article

Image may be NSFW.
Clik here to view.

Best way to use repo in IJulia jupyter

@dcastel wrote: I’m trying to use code from a (frequently updated) git repository in a Jupyter notebook with Julia 1.3. What’s the best way to do it. Is it still as described here? Viewing the...

View Article
Browsing all 2795 articles
Browse latest View live