# Latest

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

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

**Page:** 1172

---

## [Cannot use access some functions in a module without activating the environemnt](https://discourse.julialang.org/t/cannot-use-access-some-functions-in-a-module-without-activating-the-environemnt/73471)

<div class="topic-metadata">

**Author:** [@Bossax](https://discourse.julialang.org/u/Bossax)\
**Replies:** 4\
**Last updated:** [December 22, 2021, 10:33am UTC](https://discourse.julialang.org/t/cannot-use-access-some-functions-in-a-module-without-activating-the-environemnt/73471 "2021-12-22T10:33:49Z")

</div>

Hi all, I am developing a module in Julia. I always activate the environment in the project folder when working on the module. However, when I want to use my module by using MyModule some functions in the module are not…

---

## [Read multi .nc files along new dimension](https://discourse.julialang.org/t/read-multi-nc-files-along-new-dimension/70696)

<div class="topic-metadata">

**Author:** [@Inna](https://discourse.julialang.org/u/Inna)\
**Replies:** 10\
**Last updated:** [December 22, 2021, 7:52am UTC](https://discourse.julialang.org/t/read-multi-nc-files-along-new-dimension/70696 "2021-12-22T07:52:37Z")

</div>

Dear all, I have some netcdf files containg temperature and precipitation, with size 360 x 180. There isn’t inside the .nc file the dimension of time, but it is on the name of each file (2012.01.nc, 2012.02.nc, … ). I w…

---

## [How to perform ongoing background work with a real time ui](https://discourse.julialang.org/t/how-to-perform-ongoing-background-work-with-a-real-time-ui/73400)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 5\
**Last updated:** [December 22, 2021, 1:27am UTC](https://discourse.julialang.org/t/how-to-perform-ongoing-background-work-with-a-real-time-ui/73400 "2021-12-22T01:27:17Z")

</div>

I’m trying to perform a long running analysis with a real time user interface. Ideally I can do this with or without multiple threads (obviously it could be more efficient with multiple threads) and an ability to easily …

---

## [Is Arpack really slow on Windows?](https://discourse.julialang.org/t/is-arpack-really-slow-on-windows/73467)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 0\
**Last updated:** [December 22, 2021, 3:56am UTC](https://discourse.julialang.org/t/is-arpack-really-slow-on-windows/73467 "2021-12-22T03:56:38Z")

</div>

The same example is run with 1.7, once in Windows 10, and once in WSL2 (on the same machine, of course). The curious thing is the simulation takes roughly the same time, BUT WSL2 is worse running julia code (about a fact…

---

## [Appending a vector to a vector of vectors](https://discourse.julialang.org/t/appending-a-vector-to-a-vector-of-vectors/73461)

<div class="topic-metadata">

**Author:** [@alan](https://discourse.julialang.org/u/alan)\
**Replies:** 7\
**Last updated:** [December 22, 2021, 3:14am UTC](https://discourse.julialang.org/t/appending-a-vector-to-a-vector-of-vectors/73461 "2021-12-22T03:14:13Z")

</div>

I’m trying to create an empty vector of vectors and then append vectors to it so that I end up with a ragged array. What is wrong with this code? julia\> a = Vector{Vector{Int}}\[\] Vector{Vector{Int64}}\[\] julia\> x = \[1,2…

---

## [When is a fold over a fixed-length tuple unrolled?](https://discourse.julialang.org/t/when-is-a-fold-over-a-fixed-length-tuple-unrolled/73410)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 6\
**Last updated:** [December 22, 2021, 1:35am UTC](https://discourse.julialang.org/t/when-is-a-fold-over-a-fixed-length-tuple-unrolled/73410 "2021-12-22T01:35:05Z")

</div>

@code\_typed tells me that the statement foldl(+, (1,2,3); init = 0) is unrolled into three additions. On the other hand, if I say struct A x::Int; y::Int; z::Int end f(a::A) = foldl((1,2,3); init = UInt(0)) do h, i …

---

## [Error in resampling with Rasters.jl](https://discourse.julialang.org/t/error-in-resampling-with-rasters-jl/73261)

<div class="topic-metadata">

**Author:** [@MJulia](https://discourse.julialang.org/u/MJulia)\
**Replies:** 6\
**Last updated:** [December 22, 2021, 2:01am UTC](https://discourse.julialang.org/t/error-in-resampling-with-rasters-jl/73261 "2021-12-22T02:01:02Z")

</div>

I’m trying to resample a data of lambert\_azimuthal\_equal\_area projection to normal Lat/Lon coordinates by using Rasters.jl as following: using NCDatasets using ArchGDAL using DimendionalData using Rasters ds = Data…

---

## [\\mscr unicode character display in REPL with Windows](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290)

<div class="topic-metadata">

**Author:** [@waldoc](https://discourse.julialang.org/u/waldoc)\
**Replies:** 18\
**Last updated:** [December 22, 2021, 1:54am UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290 "2021-12-22T01:54:14Z")

</div>

Hi, I have been enjoying some of the many Unicode characters available in Julia (https://docs.julialang.org/en/stable/manual/unicode-input/), however, found that some of them do not display in the REPL in Windows. Specif…

---

## [Rand! + MvNormal = StackOverflowError](https://discourse.julialang.org/t/rand-mvnormal-stackoverflowerror/73462)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 0\
**Last updated:** [December 21, 2021, 11:45pm UTC](https://discourse.julialang.org/t/rand-mvnormal-stackoverflowerror/73462 "2021-12-21T23:45:23Z")

</div>

Hello! Is it expected behavior with rand!(zeros(4), MvNormal(Diagonal(\[1,2,3,4\])))? Starting Julia... \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_ \_…

---

## [Documenter deploy failure](https://discourse.julialang.org/t/documenter-deploy-failure/73458)

<div class="topic-metadata">

**Author:** [@jdlara-berkeley](https://discourse.julialang.org/u/jdlara-berkeley)\
**Replies:** 3\
**Last updated:** [December 21, 2021, 11:27pm UTC](https://discourse.julialang.org/t/documenter-deploy-failure/73458 "2021-12-21T23:27:04Z")

</div>

Github actions has been failing at the deploy stage with a Failed to add the RSA host key for IP address '140.82.113.3' to the list of known hosts (/home/runner/.ssh/known\_hosts). message but it isn’t clear what the issu…

---

## [How to know the libuv version used by julia?](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696)

<div class="topic-metadata">

**Author:** [@o314](https://discourse.julialang.org/u/o314)\
**Replies:** 9\
**Last updated:** [December 21, 2021, 11:05pm UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696 "2021-12-21T23:05:51Z")

</div>

I need to know the libuv version used by julia, since some functions i need to ccall are available only after v1.34. What is the recommanded way to do it ? I wonder if Julia uses its own version of libuv for now ? I hav…

---

## [Problem with searchsortedfirst](https://discourse.julialang.org/t/problem-with-searchsortedfirst/73332)

<div class="topic-metadata">

**Author:** [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)\
**Replies:** 30\
**Last updated:** [December 21, 2021, 11:04pm UTC](https://discourse.julialang.org/t/problem-with-searchsortedfirst/73332 "2021-12-21T23:04:32Z")

</div>

I have a problem with searchsortedfirst. I want to search a list of Pair{Symbol,Int} which is sorted by the Symbol. julia\> a=\[:a=\>1,:b=\>2\] 2-element Vector{Pair{Symbol, Int64}}: :a =\> 1 :b =\> 2 julia\> searchsortedfi…

---

## [Gradient Origin Networks with Zygote/Flux?](https://discourse.julialang.org/t/gradient-origin-networks-with-zygote-flux/73421)

<div class="topic-metadata">

**Author:** [@afishy](https://discourse.julialang.org/u/afishy)\
**Replies:** 1\
**Last updated:** [December 21, 2021, 10:35pm UTC](https://discourse.julialang.org/t/gradient-origin-networks-with-zygote-flux/73421 "2021-12-21T22:35:01Z")

</div>

Hi! I’d like to train an autoencoder according to this paper. Briefly, it requires first taking a gradient step to get an estimate of the latent vector z, and then evaluating the output of the decoder using z. The differ…

---

## [Any tools for making expressions composed functions from nested function calls?](https://discourse.julialang.org/t/any-tools-for-making-expressions-composed-functions-from-nested-function-calls/73446)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 2\
**Last updated:** [December 21, 2021, 9:36pm UTC](https://discourse.julialang.org/t/any-tools-for-making-expressions-composed-functions-from-nested-function-calls/73446 "2021-12-21T21:36:45Z")

</div>

In a macro, I’m trying to turn the expression f(g(x)) into (f ∘ g)(x). To make sure I’m not trying to re-invent the wheel, I figured I would ask here if anyone has written a macro which does this.

---

## [Defining a lower triangular matrix as the decision variable in JuMP](https://discourse.julialang.org/t/defining-a-lower-triangular-matrix-as-the-decision-variable-in-jump/73372)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 5\
**Last updated:** [December 21, 2021, 9:36pm UTC](https://discourse.julialang.org/t/defining-a-lower-triangular-matrix-as-the-decision-variable-in-jump/73372 "2021-12-21T21:36:35Z")

</div>

Dear All, I am trying to define a decision variable L \\in \\mathbb{R}^{n\\times n} in JuMP, which is lower triangular. As of now, I am defining this matrix as follows. @variable(my\_model, L\_mat\[1:n, 1:n\]) # upper off-di…

---

## [Allocation when assigning to a slice](https://discourse.julialang.org/t/allocation-when-assigning-to-a-slice/73381)

<div class="topic-metadata">

**Author:** [@etienne\_dg](https://discourse.julialang.org/u/etienne_dg)\
**Replies:** 13\
**Last updated:** [December 21, 2021, 9:23pm UTC](https://discourse.julialang.org/t/allocation-when-assigning-to-a-slice/73381 "2021-12-21T21:23:06Z")

</div>

Hi, Why does the second version allocate ? Is there a clean way to do that without allocating ? z = collect(1:10000) function test1(z) z .-= 1 end 4.898 μs (0 allocations: 0 bytes) function test2(z) z\[56:end\]…

---

## [Can Julia JIT compiler "learn" something?](https://discourse.julialang.org/t/can-julia-jit-compiler-learn-something/73438)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 0\
**Last updated:** [December 21, 2021, 2:10pm UTC](https://discourse.julialang.org/t/can-julia-jit-compiler-learn-something/73438 "2021-12-21T14:10:51Z")

</div>

During his fascinating keynote about formalizing Julia type system, prof. Jan Vitek said that you can think about JIT compilers as machine learning programs (at 45:51). The main problem is that JIT compilers have now lon…

---

## [Plural macros (e.g. @variables) should return collection of the defined objects](https://discourse.julialang.org/t/plural-macros-e-g-variables-should-return-collection-of-the-defined-objects/73397)

<div class="topic-metadata">

**Author:** [@MartinBonde](https://discourse.julialang.org/u/MartinBonde)\
**Replies:** 4\
**Last updated:** [December 21, 2021, 8:08pm UTC](https://discourse.julialang.org/t/plural-macros-e-g-variables-should-return-collection-of-the-defined-objects/73397 "2021-12-21T20:08:42Z")

</div>

When working on a large model it is extremely useful to be able to manipulate large groups of variables or constraints. To avoid repeating long lists of variable names or equations, it would be very useful if the the ‘p…

---

## [How to display a Julia vector in Pluto markdown](https://discourse.julialang.org/t/how-to-display-a-julia-vector-in-pluto-markdown/73449)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 3\
**Last updated:** [December 21, 2021, 7:00pm UTC](https://discourse.julialang.org/t/how-to-display-a-julia-vector-in-pluto-markdown/73449 "2021-12-21T19:00:30Z")

</div>

Hi all, I want to display some latex equations and a Julia vector. Here is a minimum working example: md" \\lambda = $(round.(\[1/3,2/3\], digits = 3)) " Is there a way to improve the display of the vector? As you can…

---

## [Dependency without dependency](https://discourse.julialang.org/t/dependency-without-dependency/73432)

<div class="topic-metadata">

**Author:** [@davibarreira](https://discourse.julialang.org/u/davibarreira)\
**Replies:** 4\
**Last updated:** [December 21, 2021, 6:03pm UTC](https://discourse.julialang.org/t/dependency-without-dependency/73432 "2021-12-21T18:03:31Z")

</div>

Hey everyone, I have the following situation in my hands, and I’d like to get some perspective from the community: Suppose I’m developing a package and I wish to provide the user with a function that requires a package …

---

## [What Jeff Bezanson thinks is bad about Julia in 2021?](https://discourse.julialang.org/t/what-jeff-bezanson-thinks-is-bad-about-julia-in-2021/71581)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 12\
**Last updated:** [December 21, 2021, 5:50pm UTC](https://discourse.julialang.org/t/what-jeff-bezanson-thinks-is-bad-about-julia-in-2021/71581 "2021-12-21T17:50:41Z")

</div>

Jeff Bezanson’s talk What’s Bad About Julia from JuliaCon 2019 is one of my favorite Julia talks every and the most funny, period. Is there any chance that we see something like updated version of this talk in any shape …

---

## [Generic and flexible array-of-struct to struct-of-array conversions](https://discourse.julialang.org/t/generic-and-flexible-array-of-struct-to-struct-of-array-conversions/73420)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 6\
**Last updated:** [December 21, 2021, 2:39pm UTC](https://discourse.julialang.org/t/generic-and-flexible-array-of-struct-to-struct-of-array-conversions/73420 "2021-12-21T14:39:09Z")

</div>

I have a problem that comes up fairly often that I do not really have a satisfying solution to at the moment. Say I have a container type like the one below, representing many “versions” of a real number struct Baz{T} \<…

---

## [Local edge feature aggregation in GraphNeuralNetworks.jl](https://discourse.julialang.org/t/local-edge-feature-aggregation-in-graphneuralnetworks-jl/73271)

<div class="topic-metadata">

**Author:** [@bad\_at\_math](https://discourse.julialang.org/u/bad_at_math)\
**Replies:** 2\
**Last updated:** [December 21, 2021, 2:10pm UTC](https://discourse.julialang.org/t/local-edge-feature-aggregation-in-graphneuralnetworks-jl/73271 "2021-12-21T14:10:05Z")

</div>

I’m looking at a broad class of graph neural network update operations defined as follows: for each edge \`k\` connecting vertices \`s\` and \`r\` ē\_k = ϕ\_e(concat(v\_s, v\_r, e\_k)) for each node \`i\` v\_{i, e} = Pool({ē…

---

## [Jupyter, plot, and last value?](https://discourse.julialang.org/t/jupyter-plot-and-last-value/73386)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 8\
**Last updated:** [December 21, 2021, 1:46pm UTC](https://discourse.julialang.org/t/jupyter-plot-and-last-value/73386 "2021-12-21T13:46:38Z")

</div>

It seems to me that to get a plot in a Jupyter notebook (or JupyterLab), a plot function call has to be the last value. Is that so? using Plots const xs = \[-pi + i\*(pi/10) for i in 0:20\] for j = 1:3 ys = sin.(j\*xs) …

---

## [Conflict between Turing and CUDA/Flux?](https://discourse.julialang.org/t/conflict-between-turing-and-cuda-flux/73431)

<div class="topic-metadata">

**Author:** [@pat-alt](https://discourse.julialang.org/u/pat-alt)\
**Replies:** 2\
**Last updated:** [December 21, 2021, 1:39pm UTC](https://discourse.julialang.org/t/conflict-between-turing-and-cuda-flux/73431 "2021-12-21T13:39:03Z")

</div>

I’m encountering an issue with CUDA.jl when adding Turing.jl as the latter seems to downgrade the version of the former: (@v1.7) pkg\> add Turing Resolving package versions... Updating \`~/.julia/environments/v1.7/…

---

## [Random with no duplicate](https://discourse.julialang.org/t/random-with-no-duplicate/73434)

<div class="topic-metadata">

**Author:** [@hieun](https://discourse.julialang.org/u/hieun)\
**Replies:** 4\
**Last updated:** [December 21, 2021, 1:30pm UTC](https://discourse.julialang.org/t/random-with-no-duplicate/73434 "2021-12-21T13:30:12Z")

</div>

Hello everyone, I’m trying to random some values in range 1:100, and i want every value is unique, not duplicate. I’m using rand(1:100, n) to random n values but it doesn’t work as expected. Anyone give me solution ? Tha…

---

## [How to (efficiently) find the set of maxima of an array?](https://discourse.julialang.org/t/how-to-efficiently-find-the-set-of-maxima-of-an-array/73423)

<div class="topic-metadata">

**Author:** [@user\_231578](https://discourse.julialang.org/u/user_231578)\
**Replies:** 6\
**Last updated:** [December 21, 2021, 11:55am UTC](https://discourse.julialang.org/t/how-to-efficiently-find-the-set-of-maxima-of-an-array/73423 "2021-12-21T11:55:56Z")

</div>

I want to find the set of maxima of an array. More precisely, I want the set of their indices. For example, from A = \[1 2 3 4 1 2 3 4 1 2 3 4\] I want to obtain something similar to 3-element Vector{Int64}: 4 8 1…

---

## [How to know what LLVM version is using Julia?](https://discourse.julialang.org/t/how-to-know-what-llvm-version-is-using-julia/73430)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 1\
**Last updated:** [December 21, 2021, 11:53am UTC](https://discourse.julialang.org/t/how-to-know-what-llvm-version-is-using-julia/73430 "2021-12-21T11:53:43Z")

</div>

Hello. What command do I need to execute from Julia to show the LLVM version?

---

## [Passing pointers to workers process results in null pointers](https://discourse.julialang.org/t/passing-pointers-to-workers-process-results-in-null-pointers/73418)

<div class="topic-metadata">

**Author:** [@Bossax](https://discourse.julialang.org/u/Bossax)\
**Replies:** 4\
**Last updated:** [December 21, 2021, 8:26am UTC](https://discourse.julialang.org/t/passing-pointers-to-workers-process-results-in-null-pointers/73418 "2021-12-21T08:26:05Z")

</div>

Hi all, I am writing a code to spawn an image acquisition routine on a worker process by passing a pointer pointing to a camera device. This pointer is used by C APIs to execute camera operations via ccall. The problem …

---

## [JuliaMono displays different on Windows Notepad](https://discourse.julialang.org/t/juliamono-displays-different-on-windows-notepad/73366)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 3\
**Last updated:** [December 21, 2021, 8:21am UTC](https://discourse.julialang.org/t/juliamono-displays-different-on-windows-notepad/73366 "2021-12-21T08:21:40Z")

</div>

Hello! I noticed a difference in how Γ\_T is displayed on Julia Terminal (with JuliaMono font) vs. Windows Notepad (with JuliaMono font). Julia Terminal Windows Notepad Do notice how the Γ is shorter in Notepad, a…

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

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