# Latest

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

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

**Page:** 694

---

## [Histogram with Y-axis in log-scale](https://discourse.julialang.org/t/histogram-with-y-axis-in-log-scale/99183)

<div class="topic-metadata">

**Author:** [@parf](https://discourse.julialang.org/u/parf)\
**Replies:** 1\
**Last updated:** [May 21, 2023, 2:10pm UTC](https://discourse.julialang.org/t/histogram-with-y-axis-in-log-scale/99183 "2023-05-21T14:10:22Z")

</div>

Hi all, I want to plot histogram with Y-axis in log-scale. So, I do the following: using Plots gr() histogram(r\_pos\*L/n, normed=:pdf, bins=0.0:0.012:0.8, yaxis=:log10, ylim=(1e-3,10)) How to make the bins filling …

---

## [Area of Surface of Revolution Integral too Hard to be Computed By JULIA' SymPy and Python' SymPy](https://discourse.julialang.org/t/area-of-surface-of-revolution-integral-too-hard-to-be-computed-by-julia-sympy-and-python-sympy/92981)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 10\
**Last updated:** [May 21, 2023, 1:04pm UTC](https://discourse.julialang.org/t/area-of-surface-of-revolution-integral-too-hard-to-be-computed-by-julia-sympy-and-python-sympy/92981 "2023-05-21T13:04:46Z")

</div>

Hi all, I want to get the numerical answer of the area integral. the curve is y =( x^6 + 2)/(8x^2) with 1 \\le x \\le 3, revolved about x-axis. the formula is: A = 2 \\pi \* \\int\_{a}^{b} f(x) \* \\sqrt{1 + f'(x)} dx Julia…

---

## [Probablistic modeling of multiagent systems?](https://discourse.julialang.org/t/probablistic-modeling-of-multiagent-systems/95689)

<div class="topic-metadata">

**Author:** [@DanielV](https://discourse.julialang.org/u/DanielV)\
**Replies:** 5\
**Last updated:** [May 21, 2023, 12:44pm UTC](https://discourse.julialang.org/t/probablistic-modeling-of-multiagent-systems/95689 "2023-05-21T12:44:14Z")

</div>

I have a simple agents.jl sim where at each step with some probability agents are added or change state or are removed. Agents are not independent, e.g., there is a finite “capacity” resource which might prevent an agent…

---

## [Compact display of Floats with @show?](https://discourse.julialang.org/t/compact-display-of-floats-with-show/97554)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 4\
**Last updated:** [May 21, 2023, 11:17am UTC](https://discourse.julialang.org/t/compact-display-of-floats-with-show/97554 "2023-05-21T11:17:25Z")

</div>

julia\> Base.active\_repl.options.iocontext\[:compact\]=true true julia\> e = exp(1) 2.71828 julia\> @show e; e = 2.718281828459045

---

## [Solving Ax = b s.t. x contains all positive values](https://discourse.julialang.org/t/solving-ax-b-s-t-x-contains-all-positive-values/99138)

<div class="topic-metadata">

**Author:** [@dleather](https://discourse.julialang.org/u/dleather)\
**Replies:** 4\
**Last updated:** [May 20, 2023, 8:00am UTC](https://discourse.julialang.org/t/solving-ax-b-s-t-x-contains-all-positive-values/99138 "2023-05-20T08:00:11Z")

</div>

I am solving an asset pricing equations via discretizing an underlying Markov process, X \\in R^d, resulting in \\tilde{X} \\sim \\Pi, where \\Pi is a transition matrix whose rows sum to unity, and all entries in \[0,1\]. Let \\…

---

## [Create matrix, such that each row is the difference of an array with one of its values](https://discourse.julialang.org/t/create-matrix-such-that-each-row-is-the-difference-of-an-array-with-one-of-its-values/86040)

<div class="topic-metadata">

**Author:** [@elii17](https://discourse.julialang.org/u/elii17)\
**Replies:** 3\
**Last updated:** [May 21, 2023, 10:06am UTC](https://discourse.julialang.org/t/create-matrix-such-that-each-row-is-the-difference-of-an-array-with-one-of-its-values/86040 "2023-05-21T10:06:02Z")

</div>

Hey ! I was wondering if there was an efficient if given an array a = \[x\_1,...,x\_i\] to get a matrix that is given by M = \[\[x\_1-x\_1,x\_2-x\_1,...,x\_i - x\_1\],\[x\_1-x\_2,x\_2-x\_2,...,x\_i - x\_2\] ,etc.\] The only thing I ha…

---

## [Copy button in documentation copies prompt and result along with code](https://discourse.julialang.org/t/copy-button-in-documentation-copies-prompt-and-result-along-with-code/98963)

<div class="topic-metadata">

**Author:** [@chunjiw](https://discourse.julialang.org/u/chunjiw)\
**Replies:** 5\
**Last updated:** [May 21, 2023, 9:34am UTC](https://discourse.julialang.org/t/copy-button-in-documentation-copies-prompt-and-result-along-with-code/98963 "2023-05-21T09:34:33Z")

</div>

Proud Julia user here, but I am quite surprised that copy buttons in, for example, docs for joinpath gives such result, e.g. julia\> joinpath(\["/home/myuser", "example.jl"\]) "/home/myuser/example.jl" To me it makes much…

---

## [Vscode language server crashes](https://discourse.julialang.org/t/vscode-language-server-crashes/99176)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 1\
**Last updated:** [May 21, 2023, 4:28am UTC](https://discourse.julialang.org/t/vscode-language-server-crashes/99176 "2023-05-21T04:28:22Z")

</div>

vs code language server crashes when started I reinstalled the extension (first removed the extension and also deleted its directory) I’m running code (and Julia) in WSL-2 (Ubuntu 22.04) in Windows 11 I’ve seen severa…

---

## [Software engineer @ CliMA (Pasadena, California)](https://discourse.julialang.org/t/software-engineer-clima-pasadena-california/96674)

<div class="topic-metadata">

**Author:** [@simonbyrne](https://discourse.julialang.org/u/simonbyrne)\
**Replies:** 1\
**Last updated:** [May 21, 2023, 12:49am UTC](https://discourse.julialang.org/t/software-engineer-clima-pasadena-california/96674 "2023-05-21T00:49:55Z")

</div>

We’re hiring! Come help build climate modeling tools in Julia. Feel free to contact me if you have any questions, or apply here:

---

## [Does a package extension need its deps installed directly?](https://discourse.julialang.org/t/does-a-package-extension-need-its-deps-installed-directly/99148)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 3\
**Last updated:** [May 20, 2023, 11:07pm UTC](https://discourse.julialang.org/t/does-a-package-extension-need-its-deps-installed-directly/99148 "2023-05-20T23:07:31Z")

</div>

I was trying out writing a package extension to use with Makie. GitHub - jkrumbiegel/MakiePkgExtTest In my testing, it appeared that the extension did not load when I had only CairoMakie and SomePackage installed in the…

---

## [Storing collections of heterogeneous data](https://discourse.julialang.org/t/storing-collections-of-heterogeneous-data/99159)

<div class="topic-metadata">

**Author:** [@bvanderbeek](https://discourse.julialang.org/u/bvanderbeek)\
**Replies:** 7\
**Last updated:** [May 20, 2023, 9:55pm UTC](https://discourse.julialang.org/t/storing-collections-of-heterogeneous-data/99159 "2023-05-20T21:55:38Z")

</div>

I’m writing some Julia code in which I need to loop over a collection of observations. The observations are not all of the same type and each type of observation is defined in a specific structure. I need to then perform…

---

## [Implementing Gibbs sampler for ODE parameter estimation](https://discourse.julialang.org/t/implementing-gibbs-sampler-for-ode-parameter-estimation/99132)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 2\
**Last updated:** [May 20, 2023, 8:58pm UTC](https://discourse.julialang.org/t/implementing-gibbs-sampler-for-ode-parameter-estimation/99132 "2023-05-20T20:58:14Z")

</div>

I would like to use a Gibbs sampler for a model that looks like this (in Turing.jl): @model function fit\_burger2(data::AbstractVector, prob) # Prior distributions σᵣ = 1.5e6 Aₘ ~ truncated(Normal(0.1, 0.05); lo…

---

## [Where is the memory leak in how I am rendering text in SDL?](https://discourse.julialang.org/t/where-is-the-memory-leak-in-how-i-am-rendering-text-in-sdl/99166)

<div class="topic-metadata">

**Author:** [@enderw88](https://discourse.julialang.org/u/enderw88)\
**Replies:** 1\
**Last updated:** [May 20, 2023, 4:32pm UTC](https://discourse.julialang.org/t/where-is-the-memory-leak-in-how-i-am-rendering-text-in-sdl/99166 "2023-05-20T16:32:30Z")

</div>

I am building a simulator using SDL. I need to render text to show values of some parameters. The entire thing is stable for hours, unless I start rendering the text data. I cobbled together my method of rendering tex…

---

## [How to disable automatic formatting options in vscode?](https://discourse.julialang.org/t/how-to-disable-automatic-formatting-options-in-vscode/75157)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [May 20, 2023, 4:32pm UTC](https://discourse.julialang.org/t/how-to-disable-automatic-formatting-options-in-vscode/75157 "2023-05-20T16:32:14Z")

</div>

I’m referring especially to the indentation and the stripping of trailing semicolons, which I find a bit annoying tbh, but I wonder how to disable any of the automatic formatting settings in vscode? I have looked through…

---

## [Implementation of graphical lasso with Cholesky factor](https://discourse.julialang.org/t/implementation-of-graphical-lasso-with-cholesky-factor/99016)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 2\
**Last updated:** [May 20, 2023, 3:47pm UTC](https://discourse.julialang.org/t/implementation-of-graphical-lasso-with-cholesky-factor/99016 "2023-05-20T15:47:02Z")

</div>

Hello, I am working on an implementation of the graphical Lasso (Glasso) (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3019769/pdf/kxm045.pdf) in pure Julia. In the algorithm, we have to use a square root of sample cova…

---

## [Copy array elements by index](https://discourse.julialang.org/t/copy-array-elements-by-index/99127)

<div class="topic-metadata">

**Author:** [@Simon\_Exner](https://discourse.julialang.org/u/Simon_Exner)\
**Replies:** 5\
**Last updated:** [May 20, 2023, 3:03pm UTC](https://discourse.julialang.org/t/copy-array-elements-by-index/99127 "2023-05-20T15:03:13Z")

</div>

Hi, MWE: function y\_from\_x!(y, x) interesting\_indices = \[7, 2, 4\] for i in keys(interesting\_indices) y\[i\] = x\[interesting\_indices\[i\]\] end end a=collect(2:9) b=zeros(3) y\_from\_x!(b,a) then b is \[8.0…

---

## [Doesn't Julia automatically delete the source code of a package?](https://discourse.julialang.org/t/doesnt-julia-automatically-delete-the-source-code-of-a-package/99152)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 8\
**Last updated:** [May 20, 2023, 1:09pm UTC](https://discourse.julialang.org/t/doesnt-julia-automatically-delete-the-source-code-of-a-package/99152 "2023-05-20T13:09:25Z")

</div>

Why can I still find the source code of a package named xxx in the directory C:\\Users\\name\\.julia\\packages after running rm xxx to delete the package in Julia’s package management mode? Doesn’t Julia automatically delete…

---

## [Strange results when using seed kwarg in solve function](https://discourse.julialang.org/t/strange-results-when-using-seed-kwarg-in-solve-function/99128)

<div class="topic-metadata">

**Author:** [@stochasticguy](https://discourse.julialang.org/u/stochasticguy)\
**Replies:** 2\
**Last updated:** [May 20, 2023, 12:58pm UTC](https://discourse.julialang.org/t/strange-results-when-using-seed-kwarg-in-solve-function/99128 "2023-05-20T12:58:13Z")

</div>

Hi everyone, First of all I wanted to congratulate you all for this amazing community. I’m having issues with the solution of a Stochastic Differential Equation (SDE) when passing the seed kwarg to the solve method. W…

---

## [Static vector of functions as a field of a composite type](https://discourse.julialang.org/t/static-vector-of-functions-as-a-field-of-a-composite-type/99083)

<div class="topic-metadata">

**Author:** [@aafsar](https://discourse.julialang.org/u/aafsar)\
**Replies:** 4\
**Last updated:** [May 20, 2023, 12:09pm UTC](https://discourse.julialang.org/t/static-vector-of-functions-as-a-field-of-a-composite-type/99083 "2023-05-20T12:09:32Z")

</div>

I’m trying to comprehend the details of the type system and its effect on performance, and would appreciate if you can help me understand how it applies to my current case, thank you! Question: Would it be a bad idea t…

---

## [Patterns for precompiling workloads that could error](https://discourse.julialang.org/t/patterns-for-precompiling-workloads-that-could-error/99156)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 0\
**Last updated:** [May 20, 2023, 10:02am UTC](https://discourse.julialang.org/t/patterns-for-precompiling-workloads-that-could-error/99156 "2023-05-20T10:02:21Z")

</div>

I’ve been thinking about precompilation and code that could error. In this situation, I would like to run a workload that might throw an error during precompilation. The workload is just for optimization, an error here s…

---

## [Tensor operation in Julia](https://discourse.julialang.org/t/tensor-operation-in-julia/99154)

<div class="topic-metadata">

**Author:** [@Javad\_Vahedi](https://discourse.julialang.org/u/Javad_Vahedi)\
**Replies:** 3\
**Last updated:** [May 20, 2023, 9:57am UTC](https://discourse.julialang.org/t/tensor-operation-in-julia/99154 "2023-05-20T09:57:13Z")

</div>

Dear Julia, What is the best way to rewrite the following code from Python to Julia? def ctwa(U, B, J, F): # B shape, (n,m) # U shape, (n,m) # J shape, (n,n,m,m) # F shape, (m,m,m) BUF = np.einsum(‘jb,jc,abc-\>ja’…

---

## [Where are the C API header files when I install with juliaup?](https://discourse.julialang.org/t/where-are-the-c-api-header-files-when-i-install-with-juliaup/99151)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 2\
**Last updated:** [May 20, 2023, 9:40am UTC](https://discourse.julialang.org/t/where-are-the-c-api-header-files-when-i-install-with-juliaup/99151 "2023-05-20T09:40:12Z")

</div>

I switched from manually downloading Julia to using the juliaup installer. Now I just get a binary executable that launches Julia, but I cannot find the header files for embedding Julia in C/C++. Is this a limitation of …

---

## [What configurations are required when installing the Portable version of Julia?](https://discourse.julialang.org/t/what-configurations-are-required-when-installing-the-portable-version-of-julia/99143)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 3\
**Last updated:** [May 20, 2023, 8:56am UTC](https://discourse.julialang.org/t/what-configurations-are-required-when-installing-the-portable-version-of-julia/99143 "2023-05-20T08:56:55Z")

</div>

I’m currently using the Installer version of Julia v1.8 on the Win10 system. Now I want to switch to the Portable version of Julia v1.9. My questions are: After downloading and unziping the Portable version of Julia v1…

---

## [Zerocrossing detection with ModelingToolkit](https://discourse.julialang.org/t/zerocrossing-detection-with-modelingtoolkit/99150)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [May 20, 2023, 8:22am UTC](https://discourse.julialang.org/t/zerocrossing-detection-with-modelingtoolkit/99150 "2023-05-20T08:22:19Z")

</div>

I Simulink many components have the option to turn “zero crossing detection” on or off, which has a large influence on the simulation time, stability and accuracy. How is this issue handled in ModelingToolkit?

---

## [Macro to create a generated function](https://discourse.julialang.org/t/macro-to-create-a-generated-function/99135)

<div class="topic-metadata">

**Author:** [@devetak-m](https://discourse.julialang.org/u/devetak-m)\
**Replies:** 3\
**Last updated:** [May 20, 2023, 7:51am UTC](https://discourse.julialang.org/t/macro-to-create-a-generated-function/99135 "2023-05-20T07:51:57Z")

</div>

Hello. I want to create a macro that reads: macro store(agent, value) f\_name = Symbol("store\_", value) f = quote @inline @generated function $f\_name(a, v) return quote a.value = v end …

---

## [How can I easily upgrade to the latest version of Julia?](https://discourse.julialang.org/t/how-can-i-easily-upgrade-to-the-latest-version-of-julia/99141)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 1\
**Last updated:** [May 20, 2023, 6:23am UTC](https://discourse.julialang.org/t/how-can-i-easily-upgrade-to-the-latest-version-of-julia/99141 "2023-05-20T06:23:44Z")

</div>

For example, if I am currently using Julia v1.8, and I want to upgrade to Julia v1.9 while keeping all previously installed packages, how can I do that? I am using the VS Code development environment on win10. Thanks!

---

## [\[pre-ANN\] SimpleTypeChecker.jl : an experimental static type checker for C-style programming](https://discourse.julialang.org/t/pre-ann-simpletypechecker-jl-an-experimental-static-type-checker-for-c-style-programming/98293)

<div class="topic-metadata">

**Author:** [@anon56330260](https://discourse.julialang.org/u/anon56330260)\
**Replies:** 1\
**Last updated:** [May 20, 2023, 4:49am UTC](https://discourse.julialang.org/t/pre-ann-simpletypechecker-jl-an-experimental-static-type-checker-for-c-style-programming/98293 "2023-05-20T04:49:00Z")

</div>

https://github.com/ChenNingCong/SimpleTypeChecker The README in the repo should be self-explanatory. More details can be found there. In short, SimpleTypeChecker is an experimental Julia package designed to enforce C-st…

---

## [Do I need to restart the REPL every time before rerunning a Julia script?](https://discourse.julialang.org/t/do-i-need-to-restart-the-repl-every-time-before-rerunning-a-julia-script/99110)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 2\
**Last updated:** [May 20, 2023, 1:04am UTC](https://discourse.julialang.org/t/do-i-need-to-restart-the-repl-every-time-before-rerunning-a-julia-script/99110 "2023-05-20T01:04:19Z")

</div>

Julia’s package loading process can be quite time-consuming, but when debugging code, I often need to run the script multiple times. To clear the previously produced results in the workspace, I employ the practice of res…

---

## [Fastest way to check for Inf or NaN in an array?](https://discourse.julialang.org/t/fastest-way-to-check-for-inf-or-nan-in-an-array/76954)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 57\
**Last updated:** [May 19, 2023, 11:10pm UTC](https://discourse.julialang.org/t/fastest-way-to-check-for-inf-or-nan-in-an-array/76954 "2023-05-19T23:10:44Z")

</div>

What is the fastest way to check for Inf or NaN in an array? This has surprisingly become the bottleneck in one of my codes, and I’m looking for the fastest possible strategy I noticed that running sum on an array, then…

---

## [Solving non-linear coupled ODEs backwards in time vs reverse-mode autodiff](https://discourse.julialang.org/t/solving-non-linear-coupled-odes-backwards-in-time-vs-reverse-mode-autodiff/98979)

<div class="topic-metadata">

**Author:** [@differentialoperator](https://discourse.julialang.org/u/differentialoperator)\
**Replies:** 10\
**Last updated:** [May 19, 2023, 9:19pm UTC](https://discourse.julialang.org/t/solving-non-linear-coupled-odes-backwards-in-time-vs-reverse-mode-autodiff/98979 "2023-05-19T21:19:38Z")

</div>

I have a very silly question. I am trying to understand how reverse-mode autodiff is able to actually work on coupled non-linear ODE systems that are very hard to solve backwards in time. Take the Lorenz system (I am ne…

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

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