# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1654

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 1655

---

## [Type stability when a branch can throw an exception](https://discourse.julialang.org/t/type-stability-when-a-branch-can-throw-an-exception/45223)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 1\
**Last updated:** [August 19, 2020, 9:04pm UTC](https://discourse.julialang.org/t/type-stability-when-a-branch-can-throw-an-exception/45223 "2020-08-19T21:04:26Z")

</div>

Is a function considered type stable if it has a branch that can throw an exception? Here’s an example: function foo(x::Int) if x \< 0 error("Oops.") else 2x end end @code\_warntype doesn’t se…

---

## [Multithreading with dynamic scheduler](https://discourse.julialang.org/t/multithreading-with-dynamic-scheduler/45187)

<div class="topic-metadata">

**Author:** [@lucas711642](https://discourse.julialang.org/u/lucas711642)\
**Replies:** 10\
**Last updated:** [August 19, 2020, 8:35pm UTC](https://discourse.julialang.org/t/multithreading-with-dynamic-scheduler/45187 "2020-08-19T20:35:31Z")

</div>

I have an expensive function that I need to evaluate for several inputs. To use multithreading, I usually use the following workflow: inputs = collect(deepcopy(input) for \_ = 1 : Threads.nthreads()) Threads.@threads for…

---

## [\[ANN\] Javis.jl](https://discourse.julialang.org/t/ann-javis-jl/45212)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 5\
**Last updated:** [August 19, 2020, 7:57pm UTC](https://discourse.julialang.org/t/ann-javis-jl/45212 "2020-08-19T19:57:18Z")

</div>

We (@TheCedarPrince and @Wikunia ) are happy to announce Javis.jl. Javis is a framework on top of the awesome packages Cairo.jl and Luxor.jl and makes it easy to animate small scenes and potentially some mathy YouTube V…

---

## [Variable scope/function usage](https://discourse.julialang.org/t/variable-scope-function-usage/45226)

<div class="topic-metadata">

**Author:** [@trathi](https://discourse.julialang.org/u/trathi)\
**Replies:** 2\
**Last updated:** [August 19, 2020, 7:54pm UTC](https://discourse.julialang.org/t/variable-scope-function-usage/45226 "2020-08-19T19:54:05Z")

</div>

A variable declared outside a function is recognized inside a function without actually passing it as an argument to it. For e.g. the script below runs perfectly. const y = 3 function operate(x) println(x^2+y) end o…

---

## [CUDA.jl tests on windows](https://discourse.julialang.org/t/cuda-jl-tests-on-windows/43378)

<div class="topic-metadata">

**Author:** [@anj](https://discourse.julialang.org/u/anj)\
**Replies:** 25\
**Last updated:** [August 19, 2020, 7:48pm UTC](https://discourse.julialang.org/t/cuda-jl-tests-on-windows/43378 "2020-08-19T19:48:24Z")

</div>

Trying to migrate to CUDA.jl. However can’t make tests passing (both with artifact download and local). Not 100% sure if this is a bug in CUDA.jl or I missed something. Any idea if tests meant to pass on Windows (I under…

---

## [Running several versions of Julia](https://discourse.julialang.org/t/running-several-versions-of-julia/45221)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 3\
**Last updated:** [August 19, 2020, 6:56pm UTC](https://discourse.julialang.org/t/running-several-versions-of-julia/45221 "2020-08-19T18:56:52Z")

</div>

Hi, tl;dr What’s the best way to easily switch back and forth between multiple Julia versions? System Config First, my setup… I have a Linux machine with a julia directory containing chad@boondoggle:~/julia ➤ tree -L …

---

## [Query @select nested in a function](https://discourse.julialang.org/t/query-select-nested-in-a-function/45218)

<div class="topic-metadata">

**Author:** [@elalaouifaris](https://discourse.julialang.org/u/elalaouifaris)\
**Replies:** 0\
**Last updated:** [August 19, 2020, 3:53pm UTC](https://discourse.julialang.org/t/query-select-nested-in-a-function/45218 "2020-08-19T15:53:38Z")

</div>

Hi, I have an issue using Query @select using a function call parameter to select columns: using Query, VegaDatasets iris = dataset("iris") iris |\> @select(startswith("petal")) # This works of course function get\_da…

---

## [Understanding distributed computing taxonomy](https://discourse.julialang.org/t/understanding-distributed-computing-taxonomy/45210)

<div class="topic-metadata">

**Author:** [@Joao\_Barata](https://discourse.julialang.org/u/Joao_Barata)\
**Replies:** 1\
**Last updated:** [August 19, 2020, 4:15pm UTC](https://discourse.julialang.org/t/understanding-distributed-computing-taxonomy/45210 "2020-08-19T16:15:23Z")

</div>

Hi, I’m doing my first steps in terms of distributed computing and I was going through the distributed computing page in the julia documentation. I’ve also done a bit of research into parallel computing in general. The…

---

## [Scrypt.jl key derivation algorithm](https://discourse.julialang.org/t/scrypt-jl-key-derivation-algorithm/45067)

<div class="topic-metadata">

**Author:** [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Replies:** 12\
**Last updated:** [August 19, 2020, 7:48am UTC](https://discourse.julialang.org/t/scrypt-jl-key-derivation-algorithm/45067 "2020-08-19T07:48:22Z")

</div>

Just for fun/learning, I created an implementation of the scrypt key derivation algorithm in pure Julia. I had previously made a highly optimized C++/C# variant which used compiler intrinsics to work directly with CPU…

---

## [The Julia Language x GSoD x JSoD 2020](https://discourse.julialang.org/t/the-julia-language-x-gsod-x-jsod-2020/45216)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [August 19, 2020, 3:29pm UTC](https://discourse.julialang.org/t/the-julia-language-x-gsod-x-jsod-2020/45216 "2020-08-19T15:29:28Z")

</div>

The Julia Language is proud to announce that we had 5 individuals selected to participate in our inaugural year of GSoD: Google Season of Docs | Google for Developers Project 1 Project name: Documentation for the Ju…

---

## [Unable to access the homepage of Plots](https://discourse.julialang.org/t/unable-to-access-the-homepage-of-plots/45200)

<div class="topic-metadata">

**Author:** [@heniancheng](https://discourse.julialang.org/u/heniancheng)\
**Replies:** 3\
**Last updated:** [August 19, 2020, 1:20pm UTC](https://discourse.julialang.org/t/unable-to-access-the-homepage-of-plots/45200 "2020-08-19T13:20:57Z")

</div>

Unable to access this site “docs.juliaplots.org”

---

## [Larger than memory table format with lazy reads?](https://discourse.julialang.org/t/larger-than-memory-table-format-with-lazy-reads/45123)

<div class="topic-metadata">

**Author:** [@sairus7](https://discourse.julialang.org/u/sairus7)\
**Replies:** 5\
**Last updated:** [August 19, 2020, 12:33pm UTC](https://discourse.julialang.org/t/larger-than-memory-table-format-with-lazy-reads/45123 "2020-08-19T12:33:09Z")

</div>

Let’s say, I have some storage with a table-like data in it. For example, it is a single big binary file with serialized array of StoredRow structures: struct StoredRow a::Float64 b::Float64 c::UInt16 end A…

---

## [How to make animated bar chart in julia?](https://discourse.julialang.org/t/how-to-make-animated-bar-chart-in-julia/45168)

<div class="topic-metadata">

**Author:** [@hafez\_ahmad](https://discourse.julialang.org/u/hafez_ahmad)\
**Replies:** 2\
**Last updated:** [August 19, 2020, 12:03pm UTC](https://discourse.julialang.org/t/how-to-make-animated-bar-chart-in-julia/45168 "2020-08-19T12:03:21Z")

</div>

I like to make an animated (gif) bar plot year wise. I have attached the gdp per capita.csv. I can make it using python Matplollib but how I can make it in Julia plot makie ? thanks in advance :blush: :blush: :blush: …

---

## [Problem understanding multi-threading](https://discourse.julialang.org/t/problem-understanding-multi-threading/45202)

<div class="topic-metadata">

**Author:** [@Albert\_de\_montserrat](https://discourse.julialang.org/u/Albert_de_montserrat)\
**Replies:** 3\
**Last updated:** [August 19, 2020, 12:02pm UTC](https://discourse.julialang.org/t/problem-understanding-multi-threading/45202 "2020-08-19T12:02:50Z")

</div>

I fail to see why the following peace of code does not show the appropriate results. For every i-th iteration, the values of A B C D are correct, but the matrix FF sometimes contains the values that do not match the val…

---

## [Why is reduce with concatenation type unstable?](https://discourse.julialang.org/t/why-is-reduce-with-concatenation-type-unstable/45023)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 2\
**Last updated:** [August 19, 2020, 10:22am UTC](https://discourse.julialang.org/t/why-is-reduce-with-concatenation-type-unstable/45023 "2020-08-19T10:22:45Z")

</div>

reduce(vcat, arr) returns a scalar or an array depending on the length of the array. julia\> reduce(vcat, \[1\]) 1 julia\> reduce(vcat, \[1,2\]) 2-element Array{Int64,1}: 1 2 julia\> @code\_warntype reduce(vcat, \[1,2\]) Vari…

---

## [Ensemble simulations with "paired" trajectories](https://discourse.julialang.org/t/ensemble-simulations-with-paired-trajectories/45194)

<div class="topic-metadata">

**Author:** [@Lachlan-Bn](https://discourse.julialang.org/u/Lachlan-Bn)\
**Replies:** 5\
**Last updated:** [August 19, 2020, 10:07am UTC](https://discourse.julialang.org/t/ensemble-simulations-with-paired-trajectories/45194 "2020-08-19T10:07:49Z")

</div>

I’m interested in doing something roughly like the following: Choose a (possibly random) initial condition u0 From u0, take a (possibly random) “perturbation” of u0, say, x0 = u0 + s Integrate both trajectories, and ev…

---

## [ApproxFun for vector-valued function](https://discourse.julialang.org/t/approxfun-for-vector-valued-function/45135)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 11\
**Last updated:** [August 19, 2020, 10:00am UTC](https://discourse.julialang.org/t/approxfun-for-vector-valued-function/45135 "2020-08-19T10:00:30Z")

</div>

Hello, I have a vector-valued and nonlinear function f:\\mathbb{R}^n \\xrightarrow{} \\mathbb{R}^m with n, m \\sim 50. I am only interested in the local behavior of this function about a n-dimensional interval \[a\_1, b\_1\] \\…

---

## [JuMP 0.21.1: CPLEX Error 1811: Attempt to invoke unsupported operation](https://discourse.julialang.org/t/jump-0-21-1-cplex-error-1811-attempt-to-invoke-unsupported-operation/36605)

<div class="topic-metadata">

**Author:** [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Replies:** 8\
**Last updated:** [August 19, 2020, 9:31am UTC](https://discourse.julialang.org/t/jump-0-21-1-cplex-error-1811-attempt-to-invoke-unsupported-operation/36605 "2020-08-19T09:31:19Z")

</div>

Dear folks, I try to add LazyConstaintCuts in a MIP model using MOI v0.9.12, CPLEX 12.9 (and it seems generic callbacks are used by default). After several cuts are added the solving procedure stops with the message in …

---

## [Fancy indexing in ITensor](https://discourse.julialang.org/t/fancy-indexing-in-itensor/45201)

<div class="topic-metadata">

**Author:** [@volkerkarle](https://discourse.julialang.org/u/volkerkarle)\
**Replies:** 0\
**Last updated:** [August 19, 2020, 9:21am UTC](https://discourse.julialang.org/t/fancy-indexing-in-itensor/45201 "2020-08-19T09:21:27Z")

</div>

Hi folks, As I elaborated here, I think I just missed it in the docs of ITensor, but I do not see an easy way to do “fancy” indexing. Lets us consider the following example i = Index(10,"i") j = Index(20,"j") k = Index…

---

## [Change Gtk.jl button icon](https://discourse.julialang.org/t/change-gtk-jl-button-icon/45195)

<div class="topic-metadata">

**Author:** [@kobied](https://discourse.julialang.org/u/kobied)\
**Replies:** 0\
**Last updated:** [August 19, 2020, 6:37am UTC](https://discourse.julialang.org/t/change-gtk-jl-button-icon/45195 "2020-08-19T06:37:38Z")

</div>

hello, i’m building a GUI using Gtk.jl and i need to change a button icon once pressed. To create the button with an icon i use: rec\_icon = load(img\_path) rec\_btn = Button(Image(Pixbuf(data=rec\_icon, has\_alpha=false))…

---

## [Is it time to migrate to CUDA.jl?](https://discourse.julialang.org/t/is-it-time-to-migrate-to-cuda-jl/44203)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 10\
**Last updated:** [August 19, 2020, 6:01am UTC](https://discourse.julialang.org/t/is-it-time-to-migrate-to-cuda-jl/44203 "2020-08-19T06:01:10Z")

</div>

From documentation of corresponding packages: CuArrays are deprecated in favor of CUDA.jl CUDA.jl only works on Julia 1.4 latest LTS version of Julia is 1.0 From these facts I conclude that the only way to keep backwa…

---

## [Minimizing Allocations - How to? Resources?](https://discourse.julialang.org/t/minimizing-allocations-how-to-resources/45182)

<div class="topic-metadata">

**Author:** [@loki](https://discourse.julialang.org/u/loki)\
**Replies:** 5\
**Last updated:** [August 19, 2020, 2:35am UTC](https://discourse.julialang.org/t/minimizing-allocations-how-to-resources/45182 "2020-08-19T02:35:10Z")

</div>

Hello, inspired by the conclusion of JuliaCon I wanted to try to push myself to achieve consistent 0 allocation programs. There was a talk that gave recommendations, in addition to referencing the performance guide, on h…

---

## [Colormap with an alpha channel](https://discourse.julialang.org/t/colormap-with-an-alpha-channel/45122)

<div class="topic-metadata">

**Author:** [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Replies:** 1\
**Last updated:** [August 19, 2020, 12:46am UTC](https://discourse.julialang.org/t/colormap-with-an-alpha-channel/45122 "2020-08-19T00:46:11Z")

</div>

does anyone knows how to get a colormap, i.e. viridis with an alpha channel ? (with transparencies).

---

## [Variable statement](https://discourse.julialang.org/t/variable-statement/45174)

<div class="topic-metadata">

**Author:** [@mamo](https://discourse.julialang.org/u/mamo)\
**Replies:** 1\
**Last updated:** [August 18, 2020, 8:18pm UTC](https://discourse.julialang.org/t/variable-statement/45174 "2020-08-18T20:18:58Z")

</div>

‘’‘@variable(model,PRDint\[o in O, f in F, p in P\[f\],j in U, t in TIME\], lower\_bound=0, upper\_bound=1000, Int)’‘’ ‘’‘@variable(model,PRD\[o in O,f in F, p in P\[f\], j in U, t in TIME, o\<=23 && f\<=13 && p\<=45\]==PRDint\[o,f,p…

---

## [Flux gpu gradient failing](https://discourse.julialang.org/t/flux-gpu-gradient-failing/45127)

<div class="topic-metadata">

**Author:** [@victorialena](https://discourse.julialang.org/u/victorialena)\
**Replies:** 5\
**Last updated:** [August 18, 2020, 7:48pm UTC](https://discourse.julialang.org/t/flux-gpu-gradient-failing/45127 "2020-08-18T19:48:16Z")

</div>

Hi, I have been using Flux for about 2 months now and my NN got to the point where GPU usage would be great to speed things up however I am running onto some weird issues: I get an error of CuArray only supports bits t…

---

## [Question about findmax](https://discourse.julialang.org/t/question-about-findmax/45149)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 14\
**Last updated:** [August 18, 2020, 7:36pm UTC](https://discourse.julialang.org/t/question-about-findmax/45149 "2020-08-18T19:36:59Z")

</div>

this is my code: using StatsBase,DelimitedFiles #function Characteristics(Data,) global max\_index\_mean\_var=Matrix{Matrix{Float64}}(undef,4\*size(Data,1),size(Data,2)) # global mean\_var=Matrix{Matrix{Float64}}(unde…

---

## [Speed up parallel maximum across columns](https://discourse.julialang.org/t/speed-up-parallel-maximum-across-columns/45006)

<div class="topic-metadata">

**Author:** [@fyang](https://discourse.julialang.org/u/fyang)\
**Replies:** 1\
**Last updated:** [August 18, 2020, 7:06pm UTC](https://discourse.julialang.org/t/speed-up-parallel-maximum-across-columns/45006 "2020-08-18T19:06:42Z")

</div>

Hi Julia community! I need help on speeding up a function with parallelization. Here’s a MWE. using Distributed; n\_cores = 3; addprocs(n\_cores) @everywhere using SharedArrays, BenchmarkTools M = 10000; N = 10000; k = 2…

---

## [For loop in 2D array](https://discourse.julialang.org/t/for-loop-in-2d-array/45175)

<div class="topic-metadata">

**Author:** [@Renan\_Rabelo](https://discourse.julialang.org/u/Renan_Rabelo)\
**Replies:** 2\
**Last updated:** [August 18, 2020, 7:05pm UTC](https://discourse.julialang.org/t/for-loop-in-2d-array/45175 "2020-08-18T19:05:02Z")

</div>

How do I use a for loop to iterate in a 2D array only in a specific row or column? pseudo code a = \[1 2; 3 4\] for x in a only row\[1\] println(x) end output 1 2 Thanks!

---

## [Precompilation error using HPC](https://discourse.julialang.org/t/precompilation-error-using-hpc/17094)

<div class="topic-metadata">

**Author:** [@zymbuzz](https://discourse.julialang.org/u/zymbuzz)\
**Replies:** 20\
**Last updated:** [August 18, 2020, 4:42pm UTC](https://discourse.julialang.org/t/precompilation-error-using-hpc/17094 "2020-08-18T16:42:01Z")

</div>

Hi! I am running a Julia code on university’s HPC and actually it works fine unless I run the same code using two different nodes at the same time. I get this precompilation error, which I don’t how to solve. I guess it…

---

## [FreeCAD with Julia](https://discourse.julialang.org/t/freecad-with-julia/44966)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 10\
**Last updated:** [August 15, 2020, 4:16pm UTC](https://discourse.julialang.org/t/freecad-with-julia/44966 "2020-08-15T16:16:11Z")

</div>

Looks like the FreeCAD community has taken an interest in supporting Julia computations: https://forum.freecadweb.org/viewtopic.php?f=8&t=42400

[Previous page](https://discourse.julialang.org/latest.md?page=1653)

[Next page](https://discourse.julialang.org/latest.md?page=1655)
