# Latest

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

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

**Page:** 1745

---

## [InexactError: trunc(Int64, NaN) while using theme(:mute) in plots](https://discourse.julialang.org/t/inexacterror-trunc-int64-nan-while-using-theme-mute-in-plots/39640)

<div class="topic-metadata">

**Author:** [@SarthakDsh](https://discourse.julialang.org/u/SarthakDsh)\
**Replies:** 2\
**Last updated:** [May 17, 2020, 8:08pm UTC](https://discourse.julialang.org/t/inexacterror-trunc-int64-nan-while-using-theme-mute-in-plots/39640 "2020-05-17T20:08:41Z")

</div>

I have the following code using Plots gr() theme(:mute) x1 =200:0.1:300.0 plot(x1,rand(length(x1))) which produces the following error InexactError: trunc(Int64, NaN) Stacktrace: \[1\] trunc at .\\float.jl:703 \[inline…

---

## [How to implement a plugin system in Julia](https://discourse.julialang.org/t/how-to-implement-a-plugin-system-in-julia/39591)

<div class="topic-metadata">

**Author:** [@tisztamo](https://discourse.julialang.org/u/tisztamo)\
**Replies:** 4\
**Last updated:** [May 17, 2020, 7:27pm UTC](https://discourse.julialang.org/t/how-to-implement-a-plugin-system-in-julia/39591 "2020-05-17T19:27:55Z")

</div>

TL;DR: Does multiple dispatch allow for a better alternative to plugins? If no, then a code generation gimmick is needed. I am working on a framework and I would like to move most of the code into plugins. A plugin alte…

---

## [Debugging Multi-Threaded Application](https://discourse.julialang.org/t/debugging-multi-threaded-application/39473)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 1\
**Last updated:** [May 17, 2020, 6:04pm UTC](https://discourse.julialang.org/t/debugging-multi-threaded-application/39473 "2020-05-17T18:04:32Z")

</div>

Hey Community :slight\_smile:, Just a quick question. Has anybody experience with debugging in a multi-threaded application? Is there a way to switch between different task/ threads for example in Juno? Thank you

---

## [Julia in action book not published?](https://discourse.julialang.org/t/julia-in-action-book-not-published/39643)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [May 17, 2020, 5:08pm UTC](https://discourse.julialang.org/t/julia-in-action-book-not-published/39643 "2020-05-17T17:08:14Z")

</div>

Does anyone know what happened to this book? Why was it not published?

---

## [Primitive drawing in array (Luxor & JuliaImages)](https://discourse.julialang.org/t/primitive-drawing-in-array-luxor-juliaimages/39580)

<div class="topic-metadata">

**Author:** [@JuliaIncomplete](https://discourse.julialang.org/u/JuliaIncomplete)\
**Replies:** 3\
**Last updated:** [May 17, 2020, 5:08pm UTC](https://discourse.julialang.org/t/primitive-drawing-in-array-luxor-juliaimages/39580 "2020-05-17T17:08:34Z")

</div>

I’m trying to do some probabilistic programming and generate some ellipses to look like the target image. In theory this can work but it is quite slow as the way I’m drawing ellipses is using Luxor. As far as I can see, …

---

## [Can't access large SparseMatrix using index](https://discourse.julialang.org/t/cant-access-large-sparsematrix-using-index/39599)

<div class="topic-metadata">

**Author:** [@saulo.giovani](https://discourse.julialang.org/u/saulo.giovani)\
**Replies:** 2\
**Last updated:** [May 17, 2020, 4:14pm UTC](https://discourse.julialang.org/t/cant-access-large-sparsematrix-using-index/39599 "2020-05-17T16:14:35Z")

</div>

Hey! I am trying to access a large SparceMatrix (205440×102400) using the code below and it gives me a “BoundsError”. For small values of N = 4 and M = 4, I don’t have any problem. Could someone help me? Thanks!! using …

---

## [Plot Labelling](https://discourse.julialang.org/t/plot-labelling/39632)

<div class="topic-metadata">

**Author:** [@Longblackcoffee](https://discourse.julialang.org/u/Longblackcoffee)\
**Replies:** 4\
**Last updated:** [May 17, 2020, 1:49pm UTC](https://discourse.julialang.org/t/plot-labelling/39632 "2020-05-17T13:49:44Z")

</div>

Hi everyone, I’m trying to make a graph of covid-19 case numbers in 3 countries. I’m having trouble with getting the labels to cooperate. Unlike what’s shown below, I want something like blue: AUS, orange: UK, etc… T…

---

## [Adding environment to library LOAD\_PATH](https://discourse.julialang.org/t/adding-environment-to-library-load-path/39597)

<div class="topic-metadata">

**Author:** [@yoh-meyers](https://discourse.julialang.org/u/yoh-meyers)\
**Replies:** 6\
**Last updated:** [May 17, 2020, 12:55pm UTC](https://discourse.julialang.org/t/adding-environment-to-library-load-path/39597 "2020-05-17T12:55:44Z")

</div>

Hello, I am possibly trying something impossible by design of Julia. Am trying to load a dependency of a project into a library that project is using. By trying so, I get following error: ┌ Warning: Package Dance doe…

---

## [Du\[i\] not the same as integrator(t,Val{1})? DifferentialEquations.jl](https://discourse.julialang.org/t/du-i-not-the-same-as-integrator-t-val-1-differentialequations-jl/39616)

<div class="topic-metadata">

**Author:** [@ANasc](https://discourse.julialang.org/u/ANasc)\
**Replies:** 2\
**Last updated:** [May 17, 2020, 12:49pm UTC](https://discourse.julialang.org/t/du-i-not-the-same-as-integrator-t-val-1-differentialequations-jl/39616 "2020-05-17T12:49:59Z")

</div>

Hi All, I am playing with a basic SIR disease model and would like to make the transmission rate (Beta) depend on the rate at which the number of disease-related deaths changes. (e.g., when few deaths are occurring tr…

---

## [Crashes and high utilization while training with Flux with GPU](https://discourse.julialang.org/t/crashes-and-high-utilization-while-training-with-flux-with-gpu/39626)

<div class="topic-metadata">

**Author:** [@PeterKeffer](https://discourse.julialang.org/u/PeterKeffer)\
**Replies:** 2\
**Last updated:** [May 17, 2020, 12:40pm UTC](https://discourse.julialang.org/t/crashes-and-high-utilization-while-training-with-flux-with-gpu/39626 "2020-05-17T12:40:27Z")

</div>

Hey there lovely Julia community! I’m quite new to Julia, but I’m so excited about all the awesome packages and the wonderful community. I’ve already used PyTorch a lot, also with GPU on several machines, and got it alw…

---

## [How do I speed this up?](https://discourse.julialang.org/t/how-do-i-speed-this-up/39577)

<div class="topic-metadata">

**Author:** [@scotts](https://discourse.julialang.org/u/scotts)\
**Replies:** 6\
**Last updated:** [May 17, 2020, 11:22am UTC](https://discourse.julialang.org/t/how-do-i-speed-this-up/39577 "2020-05-17T11:22:57Z")

</div>

I’ve translated some code from a Matlab script into Julia, but I’m finding it running much slower… The culprit loop is: for i::Int16 = 1 : n\_acts n\_ages::Int16 = m\["max\_age"\]\[i\] if n\_ages \> 1 idx…

---

## [\[ANN\]: CMAEvolutionStrategy.jl](https://discourse.julialang.org/t/ann-cmaevolutionstrategy-jl/39411)

<div class="topic-metadata">

**Author:** [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Replies:** 6\
**Last updated:** [May 17, 2020, 10:56am UTC](https://discourse.julialang.org/t/ann-cmaevolutionstrategy-jl/39411 "2020-05-17T10:56:29Z")

</div>

From the README: The CMA Evolution Strategy is a stochastic method for derivative-free optimization of potentially non-linear, non-convex or noisy functions over continuous domains (Hansen 2016). A brief discussion of…

---

## [Fast floating point quantisation / rounding](https://discourse.julialang.org/t/fast-floating-point-quantisation-rounding/39439)

<div class="topic-metadata">

**Author:** [@jackf](https://discourse.julialang.org/u/jackf)\
**Replies:** 3\
**Last updated:** [May 17, 2020, 8:51am UTC](https://discourse.julialang.org/t/fast-floating-point-quantisation-rounding/39439 "2020-05-17T08:51:07Z")

</div>

I have a large number of Float32s in an array. I want to apply the transformation f(x) = round(Int16, x \* a + b, RoundToZero) where a and b are constants. I also need to apply the inverse transform (but multiplication by…

---

## [Potential memory leakage in function definition using multiple threads in linux?](https://discourse.julialang.org/t/potential-memory-leakage-in-function-definition-using-multiple-threads-in-linux/39613)

<div class="topic-metadata">

**Author:** [@samuel\_okon](https://discourse.julialang.org/u/samuel_okon)\
**Replies:** 0\
**Last updated:** [May 17, 2020, 3:15am UTC](https://discourse.julialang.org/t/potential-memory-leakage-in-function-definition-using-multiple-threads-in-linux/39613 "2020-05-17T03:15:39Z")

</div>

julia\> versioninfo() Julia Version 1.4.1 Commit 381693d3df\* (2020-04-14 17:20 UTC) Platform Info: OS: Linux (x86\_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz WORD\_SIZE: 64 LIBM: libopenlibm LL…

---

## [Error in compiling DifferentialEquantions on chromebook](https://discourse.julialang.org/t/error-in-compiling-differentialequantions-on-chromebook/38834)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 32\
**Last updated:** [May 17, 2020, 6:35am UTC](https://discourse.julialang.org/t/error-in-compiling-differentialequantions-on-chromebook/38834 "2020-05-17T06:35:07Z")

</div>

I upgraded to julia 1.4.1 in chromebook, but I got a problem with DifferentialEquations: julia\> Pkg.add("DifferentialEquations") Resolving package versions... Updating \`~/.julia/environments/v1.4/Project.toml\` \[no…

---

## [Tell if a key is present in a dict](https://discourse.julialang.org/t/tell-if-a-key-is-present-in-a-dict/39587)

<div class="topic-metadata">

**Author:** [@Laszlo\_Nagy](https://discourse.julialang.org/u/Laszlo_Nagy)\
**Replies:** 14\
**Last updated:** [May 17, 2020, 6:22am UTC](https://discourse.julialang.org/t/tell-if-a-key-is-present-in-a-dict/39587 "2020-05-17T06:22:30Z")

</div>

This is a very beginner question. I would like to check if a key exists in a dictionary. julia\> 1 in Dict(1=\>'a', 2=\>'b') ERROR: AbstractDict collections only contain Pairs; Either look for e.g. A=\>B instead, or use the…

---

## [Numerical instability of partial differential equations](https://discourse.julialang.org/t/numerical-instability-of-partial-differential-equations/39603)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 6\
**Last updated:** [May 17, 2020, 5:15am UTC](https://discourse.julialang.org/t/numerical-instability-of-partial-differential-equations/39603 "2020-05-17T05:15:40Z")

</div>

Probably I should have asked this on a mathematical forum, but since I will present julia code and there are a lot of experts in this forum, probably I can get better help here. I am trying to solve a differential equat…

---

## [What's the best way to optimize findmax with a function?](https://discourse.julialang.org/t/whats-the-best-way-to-optimize-findmax-with-a-function/39606)

<div class="topic-metadata">

**Author:** [@bobcassels](https://discourse.julialang.org/u/bobcassels)\
**Replies:** 8\
**Last updated:** [May 17, 2020, 2:04am UTC](https://discourse.julialang.org/t/whats-the-best-way-to-optimize-findmax-with-a-function/39606 "2020-05-17T02:04:12Z")

</div>

maxlength(l) = findmax(map(length, l)) When I look at the compiled code, I see a reference to collect\_similar, so it is materializing the map result. I don’t want that inefficiency. I know I can write the equivalent us…

---

## [Atomic operations issue on StaticArrays with CUDAnative](https://discourse.julialang.org/t/atomic-operations-issue-on-staticarrays-with-cudanative/39576)

<div class="topic-metadata">

**Author:** [@jeremiedb](https://discourse.julialang.org/u/jeremiedb)\
**Replies:** 2\
**Last updated:** [May 17, 2020, 12:52am UTC](https://discourse.julialang.org/t/atomic-operations-issue-on-staticarrays-with-cudanative/39576 "2020-05-17T00:52:31Z")

</div>

Trying to perform a basic per element sum of two Vector of SVector works fine, but using the atomic\_add! resulted in an error. I’m aware that in this particlar case, an atomic operation isn’t needed, but it’s a MWE from …

---

## [What are the guarantees of LTS Julia versions?](https://discourse.julialang.org/t/what-are-the-guarantees-of-lts-julia-versions/39572)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 11\
**Last updated:** [May 17, 2020, 12:34am UTC](https://discourse.julialang.org/t/what-are-the-guarantees-of-lts-julia-versions/39572 "2020-05-17T00:34:28Z")

</div>

I will support Julia LTS versions (currently 1.0.5) for all my packages. But I wanted to know if LTS comes with an guarantees like supported for at least 10 years etc. I can’t find any info on what LTS meant on the down…

---

## [Open a REPL at the stack frame of an error (for debugging)?](https://discourse.julialang.org/t/open-a-repl-at-the-stack-frame-of-an-error-for-debugging/39608)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 0\
**Last updated:** [May 17, 2020, 12:10am UTC](https://discourse.julialang.org/t/open-a-repl-at-the-stack-frame-of-an-error-for-debugging/39608 "2020-05-17T00:10:09Z")

</div>

When an eror happens, we get a stack trace. But I realized that for debugging it could be extremely useful to ask that the REPL stay at the stack frame where the error happened rather than returning immeditaly to the top…

---

## [This is how to call finite difference gradcheck on a model](https://discourse.julialang.org/t/this-is-how-to-call-finite-difference-gradcheck-on-a-model/39607)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 0\
**Last updated:** [May 17, 2020, 12:05am UTC](https://discourse.julialang.org/t/this-is-how-to-call-finite-difference-gradcheck-on-a-model/39607 "2020-05-17T00:05:16Z")

</div>

I learned of the undocumented gradcheck function in a recent question, but it was not clear how to apply it to a model (rather than an array). It requires the use of Flux.destructure., as mentioned in the recent pull req…

---

## [Running macros with expression as an argument](https://discourse.julialang.org/t/running-macros-with-expression-as-an-argument/39584)

<div class="topic-metadata">

**Author:** [@wiktorkujawa](https://discourse.julialang.org/u/wiktorkujawa)\
**Replies:** 4\
**Last updated:** [May 16, 2020, 10:45pm UTC](https://discourse.julialang.org/t/running-macros-with-expression-as-an-argument/39584 "2020-05-16T22:45:36Z")

</div>

I’ve got errors on “local first\_parameter”. If I try to mess something without any sense, sometimes I get error at “local arg1” line. macro howToRunThis(fun::Expr) local first\_parameter = fun.args\[1\] local name = fi…

---

## [How to debug \`Pkg.build("....")\`?](https://discourse.julialang.org/t/how-to-debug-pkg-build/39601)

<div class="topic-metadata">

**Author:** [@Xing\_Shi\_Cai](https://discourse.julialang.org/u/Xing_Shi_Cai)\
**Replies:** 0\
**Last updated:** [May 16, 2020, 9:47pm UTC](https://discourse.julialang.org/t/how-to-debug-pkg-build/39601 "2020-05-16T21:47:32Z")

</div>

I have some trouble building a package ArbNumberics.jl. (See here.) So I tried to use Debugger.jl to debug it by Using Debugger, Pkg @enter Pkg.build("ArbNumercis") 1|debug\> bp on error 1|debug\> c But this seems to ta…

---

## [Can the preexisting uuid for a package be calculated with Julia 1.4?](https://discourse.julialang.org/t/can-the-preexisting-uuid-for-a-package-be-calculated-with-julia-1-4/39573)

<div class="topic-metadata">

**Author:** [@wherrera](https://discourse.julialang.org/u/wherrera)\
**Replies:** 5\
**Last updated:** [May 16, 2020, 8:43pm UTC](https://discourse.julialang.org/t/can-the-preexisting-uuid-for-a-package-be-calculated-with-julia-1-4/39573 "2020-05-16T20:43:42Z")

</div>

It seems that in Julia 1.4 that Pkg.METADATA\_compatible\_uuid is dropped in favor of just creating a UUID randomly with UUIDs.uuid4(). However, when creating a Project.toml file for a package, we need to know the uuid t…

---

## [Why start domain-specific scientific projects as Packages?](https://discourse.julialang.org/t/why-start-domain-specific-scientific-projects-as-packages/34752)

<div class="topic-metadata">

**Author:** [@ElectronicTeaCup](https://discourse.julialang.org/u/ElectronicTeaCup)\
**Replies:** 16\
**Last updated:** [May 16, 2020, 6:28pm UTC](https://discourse.julialang.org/t/why-start-domain-specific-scientific-projects-as-packages/34752 "2020-05-16T18:28:23Z")

</div>

Hi everyone, I’ve been trying to establish a good workflow while using Julia (Coming over from MATLAB) for my doctoral work. I’m at the beginning so I have some time set things up. So far I’ve been quite comfortable wit…

---

## [Nvidia TF32 format](https://discourse.julialang.org/t/nvidia-tf32-format/39515)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 2\
**Last updated:** [May 16, 2020, 5:44pm UTC](https://discourse.julialang.org/t/nvidia-tf32-format/39515 "2020-05-16T17:44:21Z")

</div>

I guess we have all see they hype avbout the A100. Is this going to be useful for Julia GPU?

---

## [Weird font displaying in Plots](https://discourse.julialang.org/t/weird-font-displaying-in-plots/39590)

<div class="topic-metadata">

**Author:** [@mjyshin](https://discourse.julialang.org/u/mjyshin)\
**Replies:** 0\
**Last updated:** [May 16, 2020, 4:25pm UTC](https://discourse.julialang.org/t/weird-font-displaying-in-plots/39590 "2020-05-16T16:25:25Z")

</div>

I am not sure what happened, since I have been using Plots for years without too many issues. But since a few days ago, my plots have been displaying this strange font. All I remember doing right beforehand was updating …

---

## [Defining a function using the output of another function](https://discourse.julialang.org/t/defining-a-function-using-the-output-of-another-function/39589)

<div class="topic-metadata">

**Author:** [@Himanshu\_Chaudhary](https://discourse.julialang.org/u/Himanshu_Chaudhary)\
**Replies:** 1\
**Last updated:** [May 16, 2020, 4:00pm UTC](https://discourse.julialang.org/t/defining-a-function-using-the-output-of-another-function/39589 "2020-05-16T16:00:24Z")

</div>

I have a function that takes an array and returns its derivative. function dy(y, δx) N = length(y) dy = zeros(N) for j = 4:N-3 dy\[j\]=( 5\*(y\[j+1\] - y\[j-1\]) + 4\*(y\[j+2\] - y\[j-2\]) …

---

## [Is this a bug? \`\`Some(\[\]) != Some(\[\])\`\`](https://discourse.julialang.org/t/is-this-a-bug-some-some/39541)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 7\
**Last updated:** [May 16, 2020, 3:45pm UTC](https://discourse.julialang.org/t/is-this-a-bug-some-some/39541 "2020-05-16T15:45:42Z")

</div>

I know that there are a couple of open discussions about how to compare general structs by default. However for the concrete type Some, Some(\[\]) == Some(\[\]) should return true, shouldn’t it? But it returns false… Usi…

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

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