# Latest

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

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

**Page:** 1113

---

## [JuMP dual inside loop](https://discourse.julialang.org/t/jump-dual-inside-loop/76895)

<div class="topic-metadata">

**Author:** [@Mariana](https://discourse.julialang.org/u/Mariana)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 7:35pm UTC](https://discourse.julialang.org/t/jump-dual-inside-loop/76895 "2022-02-23T19:35:19Z")

</div>

Hello! I am trying to run a code using the dual function from JuMP inside a loop, but I’m not getting the results I expected. The code is a bit extensive, so I’ll try to put here the most relevant parts of the model fo…

---

## [How to build closed-source julia package?](https://discourse.julialang.org/t/how-to-build-closed-source-julia-package/76985)

<div class="topic-metadata">

**Author:** [@Carol](https://discourse.julialang.org/u/Carol)\
**Replies:** 1\
**Last updated:** [February 23, 2022, 5:58pm UTC](https://discourse.julialang.org/t/how-to-build-closed-source-julia-package/76985 "2022-02-23T17:58:00Z")

</div>

Hi all, I developed a Julia package locally, and I want to make it closed-source to protect the source code. I’m new to creating a closed-source package, and I want to ask whether creating a sysimage by PackageCompiler…

---

## [Vegalite.jl plot size in VS Code](https://discourse.julialang.org/t/vegalite-jl-plot-size-in-vs-code/76977)

<div class="topic-metadata">

**Author:** [@Mastomaki](https://discourse.julialang.org/u/Mastomaki)\
**Replies:** 3\
**Last updated:** [February 23, 2022, 5:45pm UTC](https://discourse.julialang.org/t/vegalite-jl-plot-size-in-vs-code/76977 "2022-02-23T17:45:23Z")

</div>

Hello! How can I make the VegaLite.jl @vlplot plots bigger in VS Code? Now it is just a bit bigger than my thumb.

---

## [Sum result of Threads.foreach()](https://discourse.julialang.org/t/sum-result-of-threads-foreach/76701)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 10\
**Last updated:** [February 23, 2022, 5:41pm UTC](https://discourse.julialang.org/t/sum-result-of-threads-foreach/76701 "2022-02-23T17:41:02Z")

</div>

Hi! First, I read several other posts about adjacent problems to this, but I don’t think any of them had a direct answer. If this post is redundant, I apologize; I’m not sure what key terms to search to get more specifi…

---

## [Speeding up my code](https://discourse.julialang.org/t/speeding-up-my-code/76915)

<div class="topic-metadata">

**Author:** [@nicob](https://discourse.julialang.org/u/nicob)\
**Replies:** 7\
**Last updated:** [February 23, 2022, 5:40pm UTC](https://discourse.julialang.org/t/speeding-up-my-code/76915 "2022-02-23T17:40:25Z")

</div>

Hi, I’m quite new to Julia and I’m looking for suggestions to improve the performance of my code to hopefully beat the Python version. From these 2 functions do you see any margin of improvement? For example I’am trying…

---

## [Using environments](https://discourse.julialang.org/t/using-environments/76982)

<div class="topic-metadata">

**Author:** [@Di11on](https://discourse.julialang.org/u/Di11on)\
**Replies:** 3\
**Last updated:** [February 23, 2022, 5:31pm UTC](https://discourse.julialang.org/t/using-environments/76982 "2022-02-23T17:31:06Z")

</div>

I’m trying to figure out how environments work in Julia. My understanding is that it creates a new empty package space where I can add different packages and work in isolation from other environments. So I create my new…

---

## [\`optimizer\_with\_attributes\` failing when called inside a module](https://discourse.julialang.org/t/optimizer-with-attributes-failing-when-called-inside-a-module/76912)

<div class="topic-metadata">

**Author:** [@Di11on](https://discourse.julialang.org/u/Di11on)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 4:40pm UTC](https://discourse.julialang.org/t/optimizer-with-attributes-failing-when-called-inside-a-module/76912 "2022-02-23T16:40:49Z")

</div>

Hi folks, I am having some problems getting some code to run inside a module. It runs fine when run directly in the REPL. Here is it: mod\_name = Symbol("HiGHS") @eval using $mod\_name mod = getproperty(@\_\_MO…

---

## [Julia Extension for VSCode \`v1.6.0\` is out... and the awesome new profiler with it!](https://discourse.julialang.org/t/julia-extension-for-vscode-v1-6-0-is-out-and-the-awesome-new-profiler-with-it/76980)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 4:32pm UTC](https://discourse.julialang.org/t/julia-extension-for-vscode-v1-6-0-is-out-and-the-awesome-new-profiler-with-it/76980 "2022-02-23T16:32:59Z")

</div>

I am not sure if it is my job to announce such a thing, but I just wanted everyone to know that the new VSCode profiler is now available on Insider. This profiler is very fast and efficient, thanks a lot to @pfitzseb fo…

---

## [Reproducible builds and "Triangle of Secure Code Delivery"](https://discourse.julialang.org/t/reproducible-builds-and-triangle-of-secure-code-delivery/76971)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 4:13pm UTC](https://discourse.julialang.org/t/reproducible-builds-and-triangle-of-secure-code-delivery/76971 "2022-02-23T16:13:21Z")

</div>

How does Julia stack up (to other languages)? Reproducible Builds: Given the application’s source code, it should be possible to reproduce the distributed package exactly, down to contents that are known to vary be…

---

## [Best practices for dealing with NaNs in multiple data set using Turing](https://discourse.julialang.org/t/best-practices-for-dealing-with-nans-in-multiple-data-set-using-turing/70423)

<div class="topic-metadata">

**Author:** [@99dB](https://discourse.julialang.org/u/99dB)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 3:44pm UTC](https://discourse.julialang.org/t/best-practices-for-dealing-with-nans-in-multiple-data-set-using-turing/70423 "2022-02-23T15:44:01Z")

</div>

What is the best way to deal with NaNs in multiple data treatments when using Turing? For example, for this example tutorial from https://github.com/TuringLang/TuringTutorials/blob/master/tutorials/10-bayesian-different…

---

## [Parametric abstract types](https://discourse.julialang.org/t/parametric-abstract-types/25651)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 11\
**Last updated:** [February 23, 2022, 3:32pm UTC](https://discourse.julialang.org/t/parametric-abstract-types/25651 "2022-02-23T15:32:52Z")

</div>

I have an abstract type MyAbstractType and there’re several parametric concrete types “under” it. e.g., MyConcreteType1 \<: MyAbstractType MyConcreteType2 \<: MyAbstractType MyConcreteType3 \<: MyAbstractType ... Now, wan…

---

## [Is there any way to use max() and min() based on a function?](https://discourse.julialang.org/t/is-there-any-way-to-use-max-and-min-based-on-a-function/32350)

<div class="topic-metadata">

**Author:** [@yelircaasi](https://discourse.julialang.org/u/yelircaasi)\
**Replies:** 14\
**Last updated:** [February 23, 2022, 2:31pm UTC](https://discourse.julialang.org/t/is-there-any-way-to-use-max-and-min-based-on-a-function/32350 "2022-02-23T14:31:09Z")

</div>

This is easily done in, for example, Python, and can be very useful. I have spent quite a bit of time searching documentation and reading forum questions, without finding anything. Here’s a small example of what I would…

---

## [Neovim + coc : incorrect "Missing reference" warnings with installed packages](https://discourse.julialang.org/t/neovim-coc-incorrect-missing-reference-warnings-with-installed-packages/73126)

<div class="topic-metadata">

**Author:** [@iago-lito](https://discourse.julialang.org/u/iago-lito)\
**Replies:** 6\
**Last updated:** [February 23, 2022, 1:55pm UTC](https://discourse.julialang.org/t/neovim-coc-incorrect-missing-reference-warnings-with-installed-packages/73126 "2022-02-23T13:55:29Z")

</div>

I’m very happy with coc-julia extension to enjoy julia’s LSP with neovim, except that I keep getting these annoying “Missing reference” warnings any time I add using Package, or Package.function. How do I get this right,…

---

## [Initializing an empty Julia array with unknown size](https://discourse.julialang.org/t/initializing-an-empty-julia-array-with-unknown-size/76967)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 8\
**Last updated:** [February 23, 2022, 1:43pm UTC](https://discourse.julialang.org/t/initializing-an-empty-julia-array-with-unknown-size/76967 "2022-02-23T13:43:00Z")

</div>

I have 6 different scenarios, and under each scenario, there could be one to 100 models available for me to get the data. My goal is to store them in A as below (n is an unknown number between 1 and 100): for i in 1:6 #…

---

## [Turing, Ordered Variables, and the Dirichlet Distribution](https://discourse.julialang.org/t/turing-ordered-variables-and-the-dirichlet-distribution/76970)

<div class="topic-metadata">

**Author:** [@wc4wc4wc4](https://discourse.julialang.org/u/wc4wc4wc4)\
**Replies:** 0\
**Last updated:** [February 23, 2022, 1:25pm UTC](https://discourse.julialang.org/t/turing-ordered-variables-and-the-dirichlet-distribution/76970 "2022-02-23T13:25:52Z")

</div>

Hi all, I am trying to fit some diffusion data which we expect to be generated from two or more Rayleigh distributions. To make some data for the MWE, take the following example: function get\_data(; μ₁ = 1, μ₂ = 2, N …

---

## [How to create SMatrix from SVectors efficiently](https://discourse.julialang.org/t/how-to-create-smatrix-from-svectors-efficiently/76969)

<div class="topic-metadata">

**Author:** [@ncxst](https://discourse.julialang.org/u/ncxst)\
**Replies:** 1\
**Last updated:** [February 23, 2022, 12:48pm UTC](https://discourse.julialang.org/t/how-to-create-smatrix-from-svectors-efficiently/76969 "2022-02-23T12:48:31Z")

</div>

Hi, I have a function f(i) = SA\[i,2i\] that generates SVectors. I want to concatenate a small, but variable amount of them into a SMatrix. For a fixed amount I can do: julia\> \[f(1) f(2) f(3)\]' 3×2 SMatrix{3, 2, Int64, 6…

---

## [How to implement a Gaussian NN with covariance matrix?](https://discourse.julialang.org/t/how-to-implement-a-gaussian-nn-with-covariance-matrix/76704)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 7\
**Last updated:** [February 23, 2022, 11:28am UTC](https://discourse.julialang.org/t/how-to-implement-a-gaussian-nn-with-covariance-matrix/76704 "2022-02-23T11:28:56Z")

</div>

Hello, I’m editing this question to make it clearer since I got no solution still :frowning:. I need to implement a NN that outputs a covariance matrix. Say we have N variables, I need to be able to compute a symetric …

---

## [Cant use Plots inside tmux](https://discourse.julialang.org/t/cant-use-plots-inside-tmux/76911)

<div class="topic-metadata">

**Author:** [@carlomontec](https://discourse.julialang.org/u/carlomontec)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 10:32am UTC](https://discourse.julialang.org/t/cant-use-plots-inside-tmux/76911 "2022-02-23T10:32:32Z")

</div>

Hello, seems I cannot load Plots when I open Julia inside a tmux session in PopOS! 20.04 in my local computer: carlo@pclinux:/media/carlo/tests/$ julia172 \_ \_ \_ \_(\_)\_ | Documentation: http…

---

## [Precompiling GR\_jll failed](https://discourse.julialang.org/t/precompiling-gr-jll-failed/76964)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 1\
**Last updated:** [February 23, 2022, 9:44am UTC](https://discourse.julialang.org/t/precompiling-gr-jll-failed/76964 "2022-02-23T09:44:07Z")

</div>

(@v1.6) pkg\> precompile Precompiling project... ✗ GR\_jll 0 dependencies successfully precompiled in 3 seconds (277 already precompiled) What should I do? Thanks a lot.

---

## [How to set the julia.executablePath in VS Code on MacOS-12?](https://discourse.julialang.org/t/how-to-set-the-julia-executablepath-in-vs-code-on-macos-12/76760)

<div class="topic-metadata">

**Author:** [@jjdegruijter](https://discourse.julialang.org/u/jjdegruijter)\
**Replies:** 8\
**Last updated:** [February 23, 2022, 9:15am UTC](https://discourse.julialang.org/t/how-to-set-the-julia-executablepath-in-vs-code-on-macos-12/76760 "2022-02-23T09:15:15Z")

</div>

I installed julia-1.6 and VS Code both in my Applications folder. Then I got the Julia extension from the VS Code Marketplace. As this extension does not find my Julia installation automatically, I shoud set the julia.e…

---

## [Conditional statement stops file writer](https://discourse.julialang.org/t/conditional-statement-stops-file-writer/76943)

<div class="topic-metadata">

**Author:** [@spragud2](https://discourse.julialang.org/u/spragud2)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 9:09am UTC](https://discourse.julialang.org/t/conditional-statement-stops-file-writer/76943 "2022-02-23T09:09:25Z")

</div>

Hi, I’m writing code that depends on the FASTX and BioSequences packages. My hope is that this issue is independent of the packages I am using. What I am trying to do is very simple… I have a set of fasta entries (A fi…

---

## [What plotting library to use for HEP](https://discourse.julialang.org/t/what-plotting-library-to-use-for-hep/76962)

<div class="topic-metadata">

**Author:** [@shoram](https://discourse.julialang.org/u/shoram)\
**Replies:** 3\
**Last updated:** [February 23, 2022, 9:08am UTC](https://discourse.julialang.org/t/what-plotting-library-to-use-for-hep/76962 "2022-02-23T09:08:07Z")

</div>

Hi all, I am starting my phd in particle physics and would love to use Julia for data analysis/visualization. Do you have any advice on what plotting library should I use which has the most ROOT (from CERN) features? Si…

---

## [What is the currently recommended way to access a postgres database?](https://discourse.julialang.org/t/what-is-the-currently-recommended-way-to-access-a-postgres-database/75862)

<div class="topic-metadata">

**Author:** [@met-j](https://discourse.julialang.org/u/met-j)\
**Replies:** 3\
**Last updated:** [February 23, 2022, 9:03am UTC](https://discourse.julialang.org/t/what-is-the-currently-recommended-way-to-access-a-postgres-database/75862 "2022-02-23T09:03:56Z")

</div>

My search made it look like the LibPQ.jl wrapper would be the most popular way to access a PostgreSQL database. Is there something else I should look at?

---

## [What does MLJ.save really save?](https://discourse.julialang.org/t/what-does-mlj-save-really-save/74606)

<div class="topic-metadata">

**Author:** [@wc4wc4wc4](https://discourse.julialang.org/u/wc4wc4wc4)\
**Replies:** 12\
**Last updated:** [February 23, 2022, 8:31am UTC](https://discourse.julialang.org/t/what-does-mlj-save-really-save/74606 "2022-02-23T08:31:17Z")

</div>

I am running a MLJ pipeline on a quite large dataset and I want to be able to save the model once, and then use it in later sessions without having to retrain it. I have tried following the documentation regarding saving…

---

## [How to enable (and use) persistent remote connection with VSCode/tmux?](https://discourse.julialang.org/t/how-to-enable-and-use-persistent-remote-connection-with-vscode-tmux/76926)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [February 23, 2022, 8:22am UTC](https://discourse.julialang.org/t/how-to-enable-and-use-persistent-remote-connection-with-vscode-tmux/76926 "2022-02-23T08:22:38Z")

</div>

Hello I am following the doc on running VSCode using Julia on a remote server, and all is working smoothly except I can’t keep the session permanent. I have installed on the server (Ubuntu 20.04) tmux and set the option…

---

## [How do I create a new dataframe column by dividing individual elements in two dataframe columns?](https://discourse.julialang.org/t/how-do-i-create-a-new-dataframe-column-by-dividing-individual-elements-in-two-dataframe-columns/76931)

<div class="topic-metadata">

**Author:** [@a.frist](https://discourse.julialang.org/u/a.frist)\
**Replies:** 4\
**Last updated:** [February 23, 2022, 7:44am UTC](https://discourse.julialang.org/t/how-do-i-create-a-new-dataframe-column-by-dividing-individual-elements-in-two-dataframe-columns/76931 "2022-02-23T07:44:15Z")

</div>

I have the following dataframe: \[ Info: Displaying top ten rows of the pij\_df dataframe... ┌ Info: 10×5 DataFrame │ Row │ MONTH TOPIC\_I TOPIC\_J JOINT\_PROB\_SUM DOC\_COUNT\_SUM │ │ Int64 String15 String15 F…

---

## [Unexpected behaviour with integer sqrt and integer ^](https://discourse.julialang.org/t/unexpected-behaviour-with-integer-sqrt-and-integer/76897)

<div class="topic-metadata">

**Author:** [@Kevin\_Kleinbeck](https://discourse.julialang.org/u/Kevin_Kleinbeck)\
**Replies:** 10\
**Last updated:** [February 23, 2022, 7:32am UTC](https://discourse.julialang.org/t/unexpected-behaviour-with-integer-sqrt-and-integer/76897 "2022-02-23T07:32:55Z")

</div>

Motivation: I stumbled upon √(16)^16 # 0.0 and √(17)^17 # DomainError with -2.8632214305930583e18: The reason: This is of course due to integer arithmetic. On my machine: 16^16 # 0 17^17 # -2863221430593058543 Why…

---

## [GenX model : Configurable Capacity Expansion Model](https://discourse.julialang.org/t/genx-model-configurable-capacity-expansion-model/76887)

<div class="topic-metadata">

**Author:** [@iAnkiit](https://discourse.julialang.org/u/iAnkiit)\
**Replies:** 4\
**Last updated:** [February 23, 2022, 7:11am UTC](https://discourse.julialang.org/t/genx-model-configurable-capacity-expansion-model/76887 "2022-02-23T07:11:06Z")

</div>

This model is developed for power generation and related stuff. It is completely written in Julia and JuMP. Can someone please help out with understanding of this model ? GenX model by MIT I need to understand the code…

---

## [Pluto cell warning about density and StatsPlots, not recognizing earlier](https://discourse.julialang.org/t/pluto-cell-warning-about-density-and-statsplots-not-recognizing-earlier/76907)

<div class="topic-metadata">

**Author:** [@wccarleton](https://discourse.julialang.org/u/wccarleton)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 7:08am UTC](https://discourse.julialang.org/t/pluto-cell-warning-about-density-and-statsplots-not-recognizing-earlier/76907 "2022-02-23T07:08:55Z")

</div>

Hi All, Still very new to Julia and Pluto. I’ve encountered a strange warning in a cell regarding plotting calls that involve seriestype density. The warning is: seriestype density has been moved to StatsPlots. To us…

---

## [As a rookie, please ask a question about array definition, a stupid ask but really your help](https://discourse.julialang.org/t/as-a-rookie-please-ask-a-question-about-array-definition-a-stupid-ask-but-really-your-help/76959)

<div class="topic-metadata">

**Author:** [@chengjie](https://discourse.julialang.org/u/chengjie)\
**Replies:** 3\
**Last updated:** [February 23, 2022, 6:07am UTC](https://discourse.julialang.org/t/as-a-rookie-please-ask-a-question-about-array-definition-a-stupid-ask-but-really-your-help/76959 "2022-02-23T06:07:06Z")

</div>

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

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