# Latest

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

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

**Page:** 1137

---

## [How to create symbolic rewrite rules with new variables?](https://discourse.julialang.org/t/how-to-create-symbolic-rewrite-rules-with-new-variables/75511)

<div class="topic-metadata">

**Author:** [@Zer0](https://discourse.julialang.org/u/Zer0)\
**Replies:** 1\
**Last updated:** [January 31, 2022, 2:28pm UTC](https://discourse.julialang.org/t/how-to-create-symbolic-rewrite-rules-with-new-variables/75511 "2022-01-31T14:28:26Z")

</div>

Hi all, I am not sure where to put this topic, and I am still fairly new to Julia. So I put it in “New to Julia”. :sweat\_smile: I was playing around with symbolic-utils a little. I like the straight forward rule-based …

---

## [Hessian Vector Products on GPU using ForwardDiff, Zygote, and Flux](https://discourse.julialang.org/t/hessian-vector-products-on-gpu-using-forwarddiff-zygote-and-flux/75306)

<div class="topic-metadata">

**Author:** [@RS-Coop](https://discourse.julialang.org/u/RS-Coop)\
**Replies:** 13\
**Last updated:** [January 31, 2022, 2:28pm UTC](https://discourse.julialang.org/t/hessian-vector-products-on-gpu-using-forwarddiff-zygote-and-flux/75306 "2022-01-31T14:28:10Z")

</div>

Hello, I am trying to compute the Hessian vector product of a Flux model (with some vector) on the GPU. This is giving me some errors, which I think are realted specifically to ForwardDiff. Any help would be greatly app…

---

## [3D plotting packages](https://discourse.julialang.org/t/3d-plotting-packages/75445)

<div class="topic-metadata">

**Author:** [@RickandMortyforever](https://discourse.julialang.org/u/RickandMortyforever)\
**Replies:** 25\
**Last updated:** [January 31, 2022, 2:05pm UTC](https://discourse.julialang.org/t/3d-plotting-packages/75445 "2022-01-31T14:05:47Z")

</div>

Hello, Guys! I am playing with images right now. Is there a way I can plot a 3D image of RBG? There must be I think.(cuz Julia is awesome!) I’ve tried this code to see what are the combinations. But I really like to…

---

## [Lookup in Dict{Int,Float64} allocates](https://discourse.julialang.org/t/lookup-in-dict-int-float64-allocates/75495)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 2\
**Last updated:** [January 31, 2022, 12:27pm UTC](https://discourse.julialang.org/t/lookup-in-dict-int-float64-allocates/75495 "2022-01-31T12:27:12Z")

</div>

I was surprised that the following code reports an allocation when looking up a Float64 value from a Dict{Int64,Float64} using BenchmarkTools n = 1\_000\_000 d = Dict(i=\>rand() for i in 1:n); @btime d\[42\] # 19.346 ns (1 …

---

## [Optimizing performance of 2D nonlinear diffusion UDE](https://discourse.julialang.org/t/optimizing-performance-of-2d-nonlinear-diffusion-ude/72113)

<div class="topic-metadata">

**Author:** [@JordiBolibar](https://discourse.julialang.org/u/JordiBolibar)\
**Replies:** 54\
**Last updated:** [January 31, 2022, 11:47am UTC](https://discourse.julialang.org/t/optimizing-performance-of-2d-nonlinear-diffusion-ude/72113 "2022-01-31T11:47:17Z")

</div>

I have a UDE based on a 2D nonlinear ice flow diffusion PDE. It works correctly both for the forward and backwards pass, but despite using a semi-implicit solver the memory usage for backpropagation is just too big for e…

---

## [How to create interactive sliders in a Pluto plot for variables of an ODE function?](https://discourse.julialang.org/t/how-to-create-interactive-sliders-in-a-pluto-plot-for-variables-of-an-ode-function/75484)

<div class="topic-metadata">

**Author:** [@virajvaidya](https://discourse.julialang.org/u/virajvaidya)\
**Replies:** 4\
**Last updated:** [January 31, 2022, 10:45am UTC](https://discourse.julialang.org/t/how-to-create-interactive-sliders-in-a-pluto-plot-for-variables-of-an-ode-function/75484 "2022-01-31T10:45:25Z")

</div>

Hello Julia community, and obligatory I-am-new-to-Julia-so-I-apologise-if-my-question-is-silly. I am attempting to build a basic SEIR epidemiological model of disease spread based off of this tutorial at Quant Econ. In…

---

## [Best way to improve local minimas in nonlinear optimization?](https://discourse.julialang.org/t/best-way-to-improve-local-minimas-in-nonlinear-optimization/75215)

<div class="topic-metadata">

**Author:** [@Kevin\_Shen1](https://discourse.julialang.org/u/Kevin_Shen1)\
**Replies:** 29\
**Last updated:** [January 31, 2022, 10:23am UTC](https://discourse.julialang.org/t/best-way-to-improve-local-minimas-in-nonlinear-optimization/75215 "2022-01-31T10:23:03Z")

</div>

I’m trying to reduce the number of times NLP is returning a local minima instead of global minima (I know theoretically this is impossible if the objective is difficult enough). Currently I’m just doing a for-loop where …

---

## [Julia jargon/terminology definitions - please check!](https://discourse.julialang.org/t/julia-jargon-terminology-definitions-please-check/75234)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [January 31, 2022, 9:35am UTC](https://discourse.julialang.org/t/julia-jargon-terminology-definitions-please-check/75234 "2022-01-31T09:35:38Z")

</div>

I am not sure these definitions are correct, so can you help me in checking them? Tk! primitive type: A type defined with the “primitive type” keyword. Objects of a primitive type have a given fixed memory size specif…

---

## [Norm of Number type I define](https://discourse.julialang.org/t/norm-of-number-type-i-define/75365)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 7\
**Last updated:** [January 31, 2022, 8:50am UTC](https://discourse.julialang.org/t/norm-of-number-type-i-define/75365 "2022-01-31T08:50:17Z")

</div>

I have implemented my own Type of Real (let’s call it My) Julia’s boast holds true: having defined “all” the operations for My, Julia is “unreasonably” effective at giving me all sorts of matrix algebra operations at ze…

---

## [C project utility scripts in Julia](https://discourse.julialang.org/t/c-project-utility-scripts-in-julia/75454)

<div class="topic-metadata">

**Author:** [@Gravlax](https://discourse.julialang.org/u/Gravlax)\
**Replies:** 6\
**Last updated:** [January 31, 2022, 7:39am UTC](https://discourse.julialang.org/t/c-project-utility-scripts-in-julia/75454 "2022-01-31T07:39:17Z")

</div>

Dear all, I was wondering if anyone has experience with the development of utility tools for a main code written in another language (e.g. C). Several activities around such code would require some kind of scripting (co…

---

## [Add package on remote worker](https://discourse.julialang.org/t/add-package-on-remote-worker/75489)

<div class="topic-metadata">

**Author:** [@guyvdb](https://discourse.julialang.org/u/guyvdb)\
**Replies:** 1\
**Last updated:** [January 31, 2022, 6:50am UTC](https://discourse.julialang.org/t/add-package-on-remote-worker/75489 "2022-01-31T06:50:27Z")

</div>

I am trying to install packages on a Distributed worker, but get errors during precompilation that don’t occur when running the same commands on the server manually. using Distributed pids = addprocs(\["server.edu"\]) rem…

---

## [How do I change the default location for animation files in Javis?](https://discourse.julialang.org/t/how-do-i-change-the-default-location-for-animation-files-in-javis/75479)

<div class="topic-metadata">

**Author:** [@BinChicken42](https://discourse.julialang.org/u/BinChicken42)\
**Replies:** 2\
**Last updated:** [January 31, 2022, 6:43am UTC](https://discourse.julialang.org/t/how-do-i-change-the-default-location-for-animation-files-in-javis/75479 "2022-01-31T06:43:34Z")

</div>

When I render a Javis animation, it creates a animation file in the same folder as the code file. Is there a way to change something so that all of my animation files are made in one location, such as a folder just for m…

---

## [Regarding the multithreaded performance of OpenBLAS](https://discourse.julialang.org/t/regarding-the-multithreaded-performance-of-openblas/75450)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 7\
**Last updated:** [January 31, 2022, 6:33am UTC](https://discourse.julialang.org/t/regarding-the-multithreaded-performance-of-openblas/75450 "2022-01-31T06:33:25Z")

</div>

I have been benchmarking some code and coming across all sorts of questions (see my other thread for in-depth details, I will post a progress update soon). However, I have an OpenBLAS question that I believe merits its …

---

## [GLMakie.jl - Font/graphics displaying incorrectly on M1 (ubuntu parallels) in GL window](https://discourse.julialang.org/t/glmakie-jl-font-graphics-displaying-incorrectly-on-m1-ubuntu-parallels-in-gl-window/75481)

<div class="topic-metadata">

**Author:** [@kathesch](https://discourse.julialang.org/u/kathesch)\
**Replies:** 3\
**Last updated:** [January 31, 2022, 5:55am UTC](https://discourse.julialang.org/t/glmakie-jl-font-graphics-displaying-incorrectly-on-m1-ubuntu-parallels-in-gl-window/75481 "2022-01-31T05:55:16Z")

</div>

Hi all, I was curious if anyone has had this graphical issue before or perhaps has any other insight as to what could be wrong. The GL window should be displaying crisper fonts/lines. It displays correctly in CairoMakie…

---

## [Simple Vector - UndefVar Error](https://discourse.julialang.org/t/simple-vector-undefvar-error/75419)

<div class="topic-metadata">

**Author:** [@chandras002](https://discourse.julialang.org/u/chandras002)\
**Replies:** 2\
**Last updated:** [January 31, 2022, 5:31am UTC](https://discourse.julialang.org/t/simple-vector-undefvar-error/75419 "2022-01-31T05:31:25Z")

</div>

I am trying to learn Vector implementation in Julia. (1.7.1) Following code gives :Candidate not defined" error. The code has taken from the question here. Stack overflow What is wrong here? what is the correct way…

---

## [Segfault and crash embedding when julia runs multithreaded gc](https://discourse.julialang.org/t/segfault-and-crash-embedding-when-julia-runs-multithreaded-gc/75221)

<div class="topic-metadata">

**Author:** [@xapkohheh](https://discourse.julialang.org/u/xapkohheh)\
**Replies:** 37\
**Last updated:** [January 31, 2022, 1:57am UTC](https://discourse.julialang.org/t/segfault-and-crash-embedding-when-julia-runs-multithreaded-gc/75221 "2022-01-31T01:57:55Z")

</div>

Hello! I’m very new to julia, but immediately tried to embed it into a node-based CG software (sidefx houdini) for geometry processing. everything worked perfectly fine, until i ran a multithreaded loop that did a bunch…

---

## [StanSample.jl can't find cmdstan?](https://discourse.julialang.org/t/stansample-jl-cant-find-cmdstan/75451)

<div class="topic-metadata">

**Author:** [@PeetoomHeida](https://discourse.julialang.org/u/PeetoomHeida)\
**Replies:** 6\
**Last updated:** [January 30, 2022, 11:57pm UTC](https://discourse.julialang.org/t/stansample-jl-cant-find-cmdstan/75451 "2022-01-30T23:57:16Z")

</div>

I am having trouble getting a Stan model to run through Julia. I have installed cmdstan following these instructions. cmdstan is now installed in /home/isaac/.conda/envs/stan-env/bin/cmdstan. I have added export CMDSTAN=…

---

## [Which is best package for integration(and differentiation)?](https://discourse.julialang.org/t/which-is-best-package-for-integration-and-differentiation/75461)

<div class="topic-metadata">

**Author:** [@matic\_lauko](https://discourse.julialang.org/u/matic_lauko)\
**Replies:** 6\
**Last updated:** [January 30, 2022, 11:44pm UTC](https://discourse.julialang.org/t/which-is-best-package-for-integration-and-differentiation/75461 "2022-01-30T23:44:46Z")

</div>

I’m new in Julia and have no idea of which are good packages for integration. I have checked juliapackages and observer, but everything is explained on a math level far above mine. Thank you for your advice.

---

## [Returning Arrays from Functions - Recommended Approach?](https://discourse.julialang.org/t/returning-arrays-from-functions-recommended-approach/75448)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 3\
**Last updated:** [January 30, 2022, 10:38pm UTC](https://discourse.julialang.org/t/returning-arrays-from-functions-recommended-approach/75448 "2022-01-30T22:38:03Z")

</div>

I have been working through an exercise of reviewing and re-reviewing some code I have that solves a one-dimensional system of coupled ODEs using finite differences (just as a toy problem to get better with Julia). I hav…

---

## [Problem in variable definition in loop](https://discourse.julialang.org/t/problem-in-variable-definition-in-loop/19752)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 11\
**Last updated:** [January 30, 2022, 10:35pm UTC](https://discourse.julialang.org/t/problem-in-variable-definition-in-loop/19752 "2022-01-30T22:35:23Z")

</div>

Dear all, I don’t understand this behaviour. How come “j” is not defined in the second round of the loop if it was defined on the first? julia\> for i in 1:2 if i == 1 j = 1 end pr…

---

## [What is \`N\` in \`Array{T,N}\`?](https://discourse.julialang.org/t/what-is-n-in-array-t-n/75476)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [January 30, 2022, 9:58pm UTC](https://discourse.julialang.org/t/what-is-n-in-array-t-n/75476 "2022-01-30T21:58:00Z")

</div>

As in the title, what is N in Array{T,N} ? When dealing with parametric types, the doc shows the parameter being a Type, but here it is an integer. The doc actually says: " it can be any type at all (or a value of any …

---

## [Defining a type that mirrors a built-in container](https://discourse.julialang.org/t/defining-a-type-that-mirrors-a-built-in-container/75472)

<div class="topic-metadata">

**Author:** [@rpmuller](https://discourse.julialang.org/u/rpmuller)\
**Replies:** 4\
**Last updated:** [January 30, 2022, 9:14pm UTC](https://discourse.julialang.org/t/defining-a-type-that-mirrors-a-built-in-container/75472 "2022-01-30T21:14:33Z")

</div>

I’d like to define a type that mirrors a built-in type. Normally when I want to do this, I just define a struct with a member l that has the type I want: struct mylist1 l::Array{Int32} end and then define some meth…

---

## [Plotting two distributions on same plot](https://discourse.julialang.org/t/plotting-two-distributions-on-same-plot/75475)

<div class="topic-metadata">

**Author:** [@CentraCep](https://discourse.julialang.org/u/CentraCep)\
**Replies:** 1\
**Last updated:** [January 30, 2022, 9:13pm UTC](https://discourse.julialang.org/t/plotting-two-distributions-on-same-plot/75475 "2022-01-30T21:13:56Z")

</div>

I am trying to plot two probability distributions onto the same plot. One is a uniform distribution with area under the curve = 1 and the other is a chi distribution (or to be more specific, a Maxwellian) with three degr…

---

## [Array dimensions don't match](https://discourse.julialang.org/t/array-dimensions-dont-match/75442)

<div class="topic-metadata">

**Author:** [@chunquan](https://discourse.julialang.org/u/chunquan)\
**Replies:** 2\
**Last updated:** [January 30, 2022, 8:22pm UTC](https://discourse.julialang.org/t/array-dimensions-dont-match/75442 "2022-01-30T20:22:05Z")

</div>

Hello, I used x, y =MNIST.testdata() and then did this “x = (x .- mean(x,dims = 2)) / std(x .- mean(x,dims = 2))” And I get 282810000 Array{Float64, 3}. But actually I need an Array 784\*10000, which means this shoul…

---

## [Why Plots standalone window closed automatically and load slowly?](https://discourse.julialang.org/t/why-plots-standalone-window-closed-automatically-and-load-slowly/75471)

<div class="topic-metadata">

**Author:** [@varvir](https://discourse.julialang.org/u/varvir)\
**Replies:** 2\
**Last updated:** [January 30, 2022, 6:29pm UTC](https://discourse.julialang.org/t/why-plots-standalone-window-closed-automatically-and-load-slowly/75471 "2022-01-30T18:29:36Z")

</div>

I play the tutorial of Plots package. using Plots x = 1:10; y = rand(10); # These are the plotting data p1 = plot(x, y) gui(p1) # dispaly(p1), default(show=true), plot(x,y,show=true) I can plot this in Julia REPL mode…

---

## [Profiling Tool from Juliacon 2018](https://discourse.julialang.org/t/profiling-tool-from-juliacon-2018/75447)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 0\
**Last updated:** [January 30, 2022, 4:19am UTC](https://discourse.julialang.org/t/profiling-tool-from-juliacon-2018/75447 "2022-01-30T04:19:58Z")

</div>

I was watching this video by Jameson Nash from Juliacon 2018 where he showcases a profiling tool (starts around 6:20 in the video). I really liked what he showed you could do with it, I imagine it could be very useful in…

---

## [\[RFC/ANN\] Restacker.jl: A workaround for the heap-allocated-immutable problem?](https://discourse.julialang.org/t/rfc-ann-restacker-jl-a-workaround-for-the-heap-allocated-immutable-problem/35037)

<div class="topic-metadata">

**Author:** [@tkf](https://discourse.julialang.org/u/tkf)\
**Replies:** 11\
**Last updated:** [January 30, 2022, 6:22pm UTC](https://discourse.julialang.org/t/rfc-ann-restacker-jl-a-workaround-for-the-heap-allocated-immutable-problem/35037 "2022-01-30T18:22:11Z")

</div>

I generalized and packaged up a workaround I’ve been using in Transducers.jl (see below for an explanation) to avoid using heap-allocated immutables when they contain some heap-allocated objects. It’s not registered yet…

---

## [GLM - inconsistency with R on ISLR dataset?](https://discourse.julialang.org/t/glm-inconsistency-with-r-on-islr-dataset/75427)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 2\
**Last updated:** [January 30, 2022, 5:31pm UTC](https://discourse.julialang.org/t/glm-inconsistency-with-r-on-islr-dataset/75427 "2022-01-30T17:31:11Z")

</div>

I am teaching a class using the (well-known) book Intro to Statistical Learning in R (ISLR). For the Lab example in Chapter 3, there is an example using polynomial regression in GLM. According to documentation, the wa…

---

## [Performance of Computation of Expectation of slow function](https://discourse.julialang.org/t/performance-of-computation-of-expectation-of-slow-function/74961)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 13\
**Last updated:** [January 30, 2022, 4:48pm UTC](https://discourse.julialang.org/t/performance-of-computation-of-expectation-of-slow-function/74961 "2022-01-30T16:48:35Z")

</div>

Hi! I am trying to optimize this section of code. Basically, there are two functions. The first one solves a linear programming problem over a convex set. The second function computes a Monte Carlo experiment over S tria…

---

## [Finding the right JuMP package to solve a mixed-integer convex program](https://discourse.julialang.org/t/finding-the-right-jump-package-to-solve-a-mixed-integer-convex-program/75350)

<div class="topic-metadata">

**Author:** [@merlion](https://discourse.julialang.org/u/merlion)\
**Replies:** 3\
**Last updated:** [January 30, 2022, 3:29pm UTC](https://discourse.julialang.org/t/finding-the-right-jump-package-to-solve-a-mixed-integer-convex-program/75350 "2022-01-30T15:29:51Z")

</div>

I have a fairly straightforward optimisation problem that looks like this: \\max \\ \\log(a \\cdot x) + b \\cdot x \\\\ s.t. \\ x \\in \\{0,1\\}^n \\text{ and } \\sum\_{i \\in \[n\]}x\_i \\leq 10, for some a, b \\in \\mathbb{R}^n. I’d li…

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

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