# Latest

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

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

**Page:** 1498

---

## [What can happen if I use IdDict to protect an immutable variable from GC deallocation?](https://discourse.julialang.org/t/what-can-happen-if-i-use-iddict-to-protect-an-immutable-variable-from-gc-deallocation/54676)

<div class="topic-metadata">

**Author:** [@fanxp](https://discourse.julialang.org/u/fanxp)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 9:25am UTC](https://discourse.julialang.org/t/what-can-happen-if-i-use-iddict-to-protect-an-immutable-variable-from-gc-deallocation/54676 "2021-02-09T09:25:59Z")

</div>

Hi, I am following this link to use IdDict to protect some scalar (immutable, i.e. a=2.0) variables. https://docs.julialang.org/en/v1/manual/embedding/#Memory-Management Quote: One simple way to accomplish this is t…

---

## [How to access the value of a RefValue{Any} Julia variable in C?](https://discourse.julialang.org/t/how-to-access-the-value-of-a-refvalue-any-julia-variable-in-c/54606)

<div class="topic-metadata">

**Author:** [@fanxp](https://discourse.julialang.org/u/fanxp)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 9:00am UTC](https://discourse.julialang.org/t/how-to-access-the-value-of-a-refvalue-any-julia-variable-in-c/54606 "2021-02-09T09:00:26Z")

</div>

Hi, I use RefValue{Any} to protect a scalar (immutable type) inside the IdDict, according to Embedding Julia · The Julia Language. But I don’t know how to use the RefValue{Any} variable ('b" in the following example) i…

---

## [Makie inplace plot recipe](https://discourse.julialang.org/t/makie-inplace-plot-recipe/54857)

<div class="topic-metadata">

**Author:** [@zekeriya.sari](https://discourse.julialang.org/u/zekeriya.sari)\
**Replies:** 6\
**Last updated:** [February 9, 2021, 8:34am UTC](https://discourse.julialang.org/t/makie-inplace-plot-recipe/54857 "2021-02-09T08:34:29Z")

</div>

Is it possible to define an in-place plotting recipe using Makie? For example, the following recipe works properly. using Makie @recipe(MyPlot, x, y) do scene Attributes( plot\_color = :red, ) end fu…

---

## [\[ANN\] SymbolicUtils.jl -- Groundwork for a symbolic ecosystem in Julia](https://discourse.julialang.org/t/ann-symbolicutils-jl-groundwork-for-a-symbolic-ecosystem-in-julia/38455)

<div class="topic-metadata">

**Author:** [@shashi](https://discourse.julialang.org/u/shashi)\
**Replies:** 26\
**Last updated:** [February 9, 2021, 8:10am UTC](https://discourse.julialang.org/t/ann-symbolicutils-jl-groundwork-for-a-symbolic-ecosystem-in-julia/38455 "2021-02-09T08:10:10Z")

</div>

Hello everyone, we (Mason Protter, Yingbo Ma, and I) are pleased to present to you SymbolicUtils.jl. This is the first of hopefully many packages to live in the JuliaSymbolics Github organization, and we hope that Symbol…

---

## [Problem with @enter when using Debugger.jl in VS Code console](https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830)

<div class="topic-metadata">

**Author:** [@aachener](https://discourse.julialang.org/u/aachener)\
**Replies:** 7\
**Last updated:** [February 9, 2021, 8:00am UTC](https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830 "2021-02-09T08:00:30Z")

</div>

Hi, everyone, I am using Debugger.jl in VS Code REPL. It seems that there is a problem of the @enter macro, as following code shows: julia\> using Debugger julia\> foo(x) = x^2 foo (generic function with 1 method) ju…

---

## [Making a simple wrapper for an IO stream](https://discourse.julialang.org/t/making-a-simple-wrapper-for-an-io-stream/52587)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 9\
**Last updated:** [February 9, 2021, 5:21am UTC](https://discourse.julialang.org/t/making-a-simple-wrapper-for-an-io-stream/52587 "2021-02-09T05:21:58Z")

</div>

I want to make a type that wraps an IO stream and measures how much data is read through (or written to) it. Something like this: mutable struct MeasuredStream \<: IO io::IO nread::Int nwritten::Int MeasuredStre…

---

## [CLI for project scaffolding](https://discourse.julialang.org/t/cli-for-project-scaffolding/54888)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 1\
**Last updated:** [February 9, 2021, 3:22am UTC](https://discourse.julialang.org/t/cli-for-project-scaffolding/54888 "2021-02-09T03:22:13Z")

</div>

https://github.com/mthelm85/jeeves I’ve been learning Rust lately and had some extra time on my hands today so I built a little CLI to scaffold very simple Julia projects, when you don’t need the full-blown PkgTemplates…

---

## [Julia Crash Fatal Error](https://discourse.julialang.org/t/julia-crash-fatal-error/54875)

<div class="topic-metadata">

**Author:** [@rezabayani](https://discourse.julialang.org/u/rezabayani)\
**Replies:** 6\
**Last updated:** [February 9, 2021, 12:51am UTC](https://discourse.julialang.org/t/julia-crash-fatal-error/54875 "2021-02-09T00:51:10Z")

</div>

I keep encountering a fatal error in julia and can not solve it. The reproduction steps are too much to cover in here. The gist of my code is that I am trying to solve a LP optimization problem with slight changes over a…

---

## [Proposed signed\_sub function](https://discourse.julialang.org/t/proposed-signed-sub-function/54766)

<div class="topic-metadata">

**Author:** [@bobcassels](https://discourse.julialang.org/u/bobcassels)\
**Replies:** 8\
**Last updated:** [February 9, 2021, 12:28am UTC](https://discourse.julialang.org/t/proposed-signed-sub-function/54766 "2021-02-09T00:28:45Z")

</div>

I need to take differences of unsigned numbers. For that purpose I propose to add a signed\_sub function, that subtracts UInts, producing a (signed) Int result. For UInt64, it would be: function signed\_sub(x::UInt64, y::…

---

## [Counting Package Dependencies](https://discourse.julialang.org/t/counting-package-dependencies/54880)

<div class="topic-metadata">

**Author:** [@ccoffrin](https://discourse.julialang.org/u/ccoffrin)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 12:26am UTC](https://discourse.julialang.org/t/counting-package-dependencies/54880 "2021-02-09T00:26:35Z")

</div>

As I recall, there used to be a way to see what packages in open registry depend on another packages in the registry. For example, one could see a list of what packages that list JuMP.jl in the Project.toml deps. Does …

---

## [Multidimensional data interpolation](https://discourse.julialang.org/t/multidimensional-data-interpolation/54859)

<div class="topic-metadata">

**Author:** [@taeukseo](https://discourse.julialang.org/u/taeukseo)\
**Replies:** 6\
**Last updated:** [February 8, 2021, 11:48pm UTC](https://discourse.julialang.org/t/multidimensional-data-interpolation/54859 "2021-02-08T23:48:41Z")

</div>

I have been struggling to perform multidimensional interpolation using values. What I have at the moment are the following: A: a vector of length a . B: a vector of length b. C: a vector of length c. V : realizations…

---

## [Which paper(s) to read on Julia design?](https://discourse.julialang.org/t/which-paper-s-to-read-on-julia-design/54864)

<div class="topic-metadata">

**Author:** [@paulmelis](https://discourse.julialang.org/u/paulmelis)\
**Replies:** 5\
**Last updated:** [February 8, 2021, 11:21pm UTC](https://discourse.julialang.org/t/which-paper-s-to-read-on-julia-design/54864 "2021-02-08T23:21:02Z")

</div>

I want to get a bit more insight into the design of Julia, including details on the language itself, compiler, code generation, etc. I’m not looking for all the gory details, but just enough to understand better what goe…

---

## [Is there a way to 'unload' modules in Julia?](https://discourse.julialang.org/t/is-there-a-way-to-unload-modules-in-julia/54464)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 2\
**Last updated:** [February 8, 2021, 11:10pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-unload-modules-in-julia/54464 "2021-02-08T23:10:57Z")

</div>

Hi, Currently, every time I change some code in a module I quit and restart Julia and recompile all the code. But as the code base grows this is going to take more and more time. It would be great of I could make Julia …

---

## [Truncated marker in scatter plot along an axis](https://discourse.julialang.org/t/truncated-marker-in-scatter-plot-along-an-axis/54878)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 0\
**Last updated:** [February 8, 2021, 11:03pm UTC](https://discourse.julialang.org/t/truncated-marker-in-scatter-plot-along-an-axis/54878 "2021-02-08T23:03:44Z")

</div>

Hello, I would like to visualize a probability density function, and associated samples plotted along the x axis. using Plots N = 100 X = randn(N) xgrid = -5.0:0.01:5.0 plt = plot(xgrid, pdf.(Normal(), xgrid), ylim =…

---

## [Solving overdetermined systems in ModelingToolkit.jl](https://discourse.julialang.org/t/solving-overdetermined-systems-in-modelingtoolkit-jl/54366)

<div class="topic-metadata">

**Author:** [@elkaps](https://discourse.julialang.org/u/elkaps)\
**Replies:** 7\
**Last updated:** [February 8, 2021, 10:29pm UTC](https://discourse.julialang.org/t/solving-overdetermined-systems-in-modelingtoolkit-jl/54366 "2021-02-08T22:29:08Z")

</div>

Hi, I’m getting to know ModelingToolkit.jl and I’d like to know if it’s possible to solve a system where there are more equations than variables. For example: @variables x, y julia\> eqs = \[Equation(x + y, 2), Equation…

---

## [Keeping Julia structure in memory between embedded function calls from C++](https://discourse.julialang.org/t/keeping-julia-structure-in-memory-between-embedded-function-calls-from-c/54870)

<div class="topic-metadata">

**Author:** [@JuliaPerson](https://discourse.julialang.org/u/JuliaPerson)\
**Replies:** 0\
**Last updated:** [February 8, 2021, 8:51pm UTC](https://discourse.julialang.org/t/keeping-julia-structure-in-memory-between-embedded-function-calls-from-c/54870 "2021-02-08T20:51:40Z")

</div>

So I have a Julia package. I would like to make use of the package in C++. From what I can tell from the documentation, only arrays and scalars can be passed between the C++/Julia boundary. In particular I’m using the R…

---

## [Make NLOpt ignore some candidates](https://discourse.julialang.org/t/make-nlopt-ignore-some-candidates/54219)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 15\
**Last updated:** [February 8, 2021, 8:28pm UTC](https://discourse.julialang.org/t/make-nlopt-ignore-some-candidates/54219 "2021-02-08T20:28:45Z")

</div>

Hey, I am using NLopt to minimize (gradient-free) a function f(\\theta), where \\theta is a vector of parameters. There is a non-trivial combination of these parameters for which f(\\theta) is not defined and thus throws a…

---

## [Converting a vector of structs to a struct of vectors](https://discourse.julialang.org/t/converting-a-vector-of-structs-to-a-struct-of-vectors/54800)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [February 8, 2021, 8:09pm UTC](https://discourse.julialang.org/t/converting-a-vector-of-structs-to-a-struct-of-vectors/54800 "2021-02-08T20:09:13Z")

</div>

Hello, I have the following struct: using Rotations, StaticArrays const MyFloat = Float32 const SEGMENTS = 7 # number of tether segments struct SysState time::Float64 # time…

---

## [Small functions - best practices](https://discourse.julialang.org/t/small-functions-best-practices/54860)

<div class="topic-metadata">

**Author:** [@Matematija](https://discourse.julialang.org/u/Matematija)\
**Replies:** 5\
**Last updated:** [February 8, 2021, 8:04pm UTC](https://discourse.julialang.org/t/small-functions-best-practices/54860 "2021-02-08T20:04:46Z")

</div>

Hi all. First-time poster here. I am writing some scientific code and would like to avoid unnecessary allocations. Specifically, I have a bunch of small functions (essentially one-liners) manipulating Arrays (representi…

---

## [Genie web framework. How to establish a connection pool to postgres?](https://discourse.julialang.org/t/genie-web-framework-how-to-establish-a-connection-pool-to-postgres/54863)

<div class="topic-metadata">

**Author:** [@curious](https://discourse.julialang.org/u/curious)\
**Replies:** 0\
**Last updated:** [February 8, 2021, 7:30pm UTC](https://discourse.julialang.org/t/genie-web-framework-how-to-establish-a-connection-pool-to-postgres/54863 "2021-02-08T19:30:14Z")

</div>

Hi, I started playing with Genie this morning. It looks great. I was wondering if someone knows how to establish a connection pool to Postgres. Do I use LibPQ.jl directly, if I don’t need an ORM, such as the SearchLight…

---

## [TechEmpower/FrameworkBenchmarks R20 deadline 12/28 + first julia "JSON serialization" results](https://discourse.julialang.org/t/techempower-frameworkbenchmarks-r20-deadline-12-28-first-julia-json-serialization-results/51936)

<div class="topic-metadata">

**Author:** [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Replies:** 11\
**Last updated:** [February 8, 2021, 6:27pm UTC](https://discourse.julialang.org/t/techempower-frameworkbenchmarks-r20-deadline-12-28-first-julia-json-serialization-results/51936 "2021-02-08T18:27:54Z")

</div>

TLDR: Techempower Framework benchmarks is a collaborative, open web framework benchmarking project The next release: Round 20 "Last day for PR review is 12/28. " First Julia results ( “http.jl” ) … current “rank: 149…

---

## [Turing.jl, differentiation & categorical outputs -- \`isprobvec\` conundrum](https://discourse.julialang.org/t/turing-jl-differentiation-categorical-outputs-isprobvec-conundrum/54083)

<div class="topic-metadata">

**Author:** [@delehef](https://discourse.julialang.org/u/delehef)\
**Replies:** 5\
**Last updated:** [February 8, 2021, 6:12pm UTC](https://discourse.julialang.org/t/turing-jl-differentiation-categorical-outputs-isprobvec-conundrum/54083 "2021-02-08T18:12:51Z")

</div>

Hi all, I met a strange bug, and, to be honest, I’m relatively new to the language, so it could be a mistake from my part. So, I’m having a real blast playing with bayesian NNs, and I’m slowly building up from the basi…

---

## [Is there a way to use the 4-argument \`@nloops\` with \`@generated\` on Julia 1.6?](https://discourse.julialang.org/t/is-there-a-way-to-use-the-4-argument-nloops-with-generated-on-julia-1-6/54830)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 8, 2021, 5:22pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-use-the-4-argument-nloops-with-generated-on-julia-1-6/54830 "2021-02-08T17:22:19Z")

</div>

Is there a way to use the 4-argument @nloops with @generated on Julia 1.6? Since the last argument is an anonymous function, it triggers an error about purity now. StatsBase currently uses that so it fails on nightlies: h…

---

## [Flux and automatic differentiation](https://discourse.julialang.org/t/flux-and-automatic-differentiation/54786)

<div class="topic-metadata">

**Author:** [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Replies:** 3\
**Last updated:** [February 8, 2021, 5:16pm UTC](https://discourse.julialang.org/t/flux-and-automatic-differentiation/54786 "2021-02-08T17:16:50Z")

</div>

Hello all, This may be a naive question: how does Flux practice automatic differentiation? (i.e. according to which principle; I am aware we are dealing with Zygote) Where can I possibly find “educational” documentatio…

---

## [Using pretrained pytorch models in Flux](https://discourse.julialang.org/t/using-pretrained-pytorch-models-in-flux/39082)

<div class="topic-metadata">

**Author:** [@tbreloff](https://discourse.julialang.org/u/tbreloff)\
**Replies:** 6\
**Last updated:** [February 8, 2021, 5:11pm UTC](https://discourse.julialang.org/t/using-pretrained-pytorch-models-in-flux/39082 "2021-02-08T17:11:59Z")

</div>

Hi all. I’m excited to be able to dip my toes back into the Julia pond. I’ve missed the community these last few years. My question is about how to best leverage existing pytorch resources, such as the extensive pretrai…

---

## [GLMakie performance and Julia 1.6](https://discourse.julialang.org/t/glmakie-performance-and-julia-1-6/54854)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 0\
**Last updated:** [February 8, 2021, 5:08pm UTC](https://discourse.julialang.org/t/glmakie-performance-and-julia-1-6/54854 "2021-02-08T17:08:21Z")

</div>

I have to make hundreds of plots and was using GLMakie and the png backend, I was quite disappointed with the Performance, 800 plots took ~1.5h and GLMakie cannot be used with threads. This was on the 1.6 release branch. …

---

## [I'm trying to add a basic dependency to a package I'm creating and getting the fol](https://discourse.julialang.org/t/im-trying-to-add-a-basic-dependency-to-a-package-im-creating-and-getting-the-fol/54258)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 7\
**Last updated:** [February 8, 2021, 3:39pm UTC](https://discourse.julialang.org/t/im-trying-to-add-a-basic-dependency-to-a-package-im-creating-and-getting-the-fol/54258 "2021-02-08T15:39:29Z")

</div>

I’m trying to add a basic dependency to a package I’m creating and getting the following error. Can’t seem to find anything online. Anybody know what might be happening here? I followed PkgTemplates to create everything …

---

## [Set\_start\_value in JuMP for SCIP](https://discourse.julialang.org/t/set-start-value-in-jump-for-scip/54829)

<div class="topic-metadata">

**Author:** [@ahmadreza-marandi](https://discourse.julialang.org/u/ahmadreza-marandi)\
**Replies:** 6\
**Last updated:** [February 8, 2021, 4:05pm UTC](https://discourse.julialang.org/t/set-start-value-in-jump-for-scip/54829 "2021-02-08T16:05:10Z")

</div>

Hi all, I am using set\_value\_start function in JuMP 0.19 to pass a warm start to SCIP. Though, the solver doesn’t seem to use it. When I plug in an optimal solution to the problem as the warm start, nothing changes in …

---

## [Proper use of scaling on axes from ordinations (like MDS and PCA)?](https://discourse.julialang.org/t/proper-use-of-scaling-on-axes-from-ordinations-like-mds-and-pca/24606)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 16\
**Last updated:** [February 8, 2021, 3:51pm UTC](https://discourse.julialang.org/t/proper-use-of-scaling-on-axes-from-ordinations-like-mds-and-pca/24606 "2021-02-08T15:51:27Z")

</div>

Moving a conversation from slack over to discourse because there’s a bunch of useful stuff that I’d like preserved, but also because we haven’t actually reached a consensus answer. The original question (by me): Quest…

---

## [SOCP with Vector{GenericAffExpr}](https://discourse.julialang.org/t/socp-with-vector-genericaffexpr/54844)

<div class="topic-metadata">

**Author:** [@mposs](https://discourse.julialang.org/u/mposs)\
**Replies:** 2\
**Last updated:** [February 8, 2021, 3:48pm UTC](https://discourse.julialang.org/t/socp-with-vector-genericaffexpr/54844 "2021-02-08T15:48:34Z")

</div>

Hi Is it possible to add a SOCP constraint to Gurobi through JuMP using @constraint(model, vec in SecondOrderCone()) where vec is a Vector{GenericAffExpr{Float64,VariableRef}} ? I got the impression it is possible ad…

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

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