# Latest

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

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

**Page:** 1215

---

## [VS Code keeps older Julia sessions, but produces errors](https://discourse.julialang.org/t/vs-code-keeps-older-julia-sessions-but-produces-errors/71111)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 2\
**Last updated:** [November 7, 2021, 7:39pm UTC](https://discourse.julialang.org/t/vs-code-keeps-older-julia-sessions-but-produces-errors/71111 "2021-11-07T19:39:27Z")

</div>

Hello. I’m using VS Code 1.62.0 with Julia 1.6.3 and the VS extension 1.4.3 for Julia. When I open VS Code I see several terminals, in multiple tabs. It seems it keeps every session and tries to load all of them every…

---

## [\[pkg test\] Error on explicit mention of tested package in Project.toml](https://discourse.julialang.org/t/pkg-test-error-on-explicit-mention-of-tested-package-in-project-toml/41125)

<div class="topic-metadata">

**Author:** [@ksamtsak](https://discourse.julialang.org/u/ksamtsak)\
**Replies:** 4\
**Last updated:** [November 7, 2021, 7:29pm UTC](https://discourse.julialang.org/t/pkg-test-error-on-explicit-mention-of-tested-package-in-project-toml/41125 "2021-11-07T19:29:34Z")

</div>

I’m describing my test-specific dependencies (julia 1.4) in test/Project.toml according to the docs. It’s also mentioned in the docs that: Pkg will add the tested package itself implictly I’d like however to be able …

---

## [Errors running the new julialang.org blog post](https://discourse.julialang.org/t/errors-running-the-new-julialang-org-blog-post/71074)

<div class="topic-metadata">

**Author:** [@conalbrown](https://discourse.julialang.org/u/conalbrown)\
**Replies:** 5\
**Last updated:** [November 7, 2021, 7:25pm UTC](https://discourse.julialang.org/t/errors-running-the-new-julialang-org-blog-post/71074 "2021-11-07T19:25:55Z")

</div>

Hello I’m trying to run the code from the latest Julialang.org blog Composability in Julia: Implementing Deep Equilibrium Models via Neural ODEs Composability in Julia: Implementing Deep Equilibrium Models via Neural …

---

## [RNN weights definition in Flux](https://discourse.julialang.org/t/rnn-weights-definition-in-flux/59623)

<div class="topic-metadata">

**Author:** [@Sunny](https://discourse.julialang.org/u/Sunny)\
**Replies:** 1\
**Last updated:** [November 7, 2021, 7:21pm UTC](https://discourse.julialang.org/t/rnn-weights-definition-in-flux/59623 "2021-11-07T19:21:24Z")

</div>

In the Flux source files there is a line. @functor RNNCell How does the functor understand that state0 and \\sigma (which should be fixed) in RNNCell definition aren’t weights?

---

## [Unicode keyboard substitutions globally in MacOS](https://discourse.julialang.org/t/unicode-keyboard-substitutions-globally-in-macos/37713)

<div class="topic-metadata">

**Author:** [@maximerischard](https://discourse.julialang.org/u/maximerischard)\
**Replies:** 8\
**Last updated:** [November 7, 2021, 7:02pm UTC](https://discourse.julialang.org/t/unicode-keyboard-substitutions-globally-in-macos/37713 "2021-11-07T19:02:49Z")

</div>

If like me you love the tab-completions in the julia REPL and in jupyter notebooks, and want to be able to use them everywhere in MacOS (for example while writing an email), you may find this useful. I generated this pli…

---

## [Does JuliaFormatter extension work with VSCode?](https://discourse.julialang.org/t/does-juliaformatter-extension-work-with-vscode/71105)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 1\
**Last updated:** [November 7, 2021, 5:50pm UTC](https://discourse.julialang.org/t/does-juliaformatter-extension-work-with-vscode/71105 "2021-11-07T17:50:34Z")

</div>

Does this formatter work with VSCode? I installed the JuliaFormatter extension for VSCode and attempted to run it on a short file (less than 100 lines of Julia code). It has been running for several minutes and shows no …

---

## [Benchmark function that uses CUDA.jl](https://discourse.julialang.org/t/benchmark-function-that-uses-cuda-jl/71093)

<div class="topic-metadata">

**Author:** [@UndefinedBehavior](https://discourse.julialang.org/u/UndefinedBehavior)\
**Replies:** 2\
**Last updated:** [November 7, 2021, 5:34pm UTC](https://discourse.julialang.org/t/benchmark-function-that-uses-cuda-jl/71093 "2021-11-07T17:34:56Z")

</div>

Hello all, I have created a function that computes the eigenvalues of large sparse matrices. I have implemented it both on CPU and GPU. I used CUDA.jl for portions of code that were computationally expensive. Now, I wan…

---

## [Link to how to use blockquote in a post?](https://discourse.julialang.org/t/link-to-how-to-use-blockquote-in-a-post/71101)

<div class="topic-metadata">

**Author:** [@kw\_martin](https://discourse.julialang.org/u/kw_martin)\
**Replies:** 2\
**Last updated:** [November 7, 2021, 5:32pm UTC](https://discourse.julialang.org/t/link-to-how-to-use-blockquote-in-a-post/71101 "2021-11-07T17:32:39Z")

</div>

Could someone give me a link on how to format a post and in particular how to quote code? Thank you in advance.

---

## [MultivariateStats - Factor Analysis - transform/reconstruct not working?](https://discourse.julialang.org/t/multivariatestats-factor-analysis-transform-reconstruct-not-working/70505)

<div class="topic-metadata">

**Author:** [@julio.ca2020](https://discourse.julialang.org/u/julio.ca2020)\
**Replies:** 1\
**Last updated:** [November 7, 2021, 3:42pm UTC](https://discourse.julialang.org/t/multivariatestats-factor-analysis-transform-reconstruct-not-working/70505 "2021-11-07T15:42:24Z")

</div>

In factor analysis transforming observations into latent variables or reconstructing observations from latent variables seem to be not working? (Factor Analysis — MultivariateStats 0.1.0 documentation) using Multivariat…

---

## [Computer modern font in every element of plot (PyPlot)](https://discourse.julialang.org/t/computer-modern-font-in-every-element-of-plot-pyplot/71030)

<div class="topic-metadata">

**Author:** [@DaveR](https://discourse.julialang.org/u/DaveR)\
**Replies:** 8\
**Last updated:** [November 7, 2021, 3:29pm UTC](https://discourse.julialang.org/t/computer-modern-font-in-every-element-of-plot-pyplot/71030 "2021-11-07T15:29:49Z")

</div>

I’m trying to achieve an homogeneous looking plot where every element of the plot has Computer Modern font using the PyPlot package. Following some of the answers to existing questions in the forum, this is as close as …

---

## [Convert iterator (of tuples) to vector](https://discourse.julialang.org/t/convert-iterator-of-tuples-to-vector/71088)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 5\
**Last updated:** [November 7, 2021, 12:44pm UTC](https://discourse.julialang.org/t/convert-iterator-of-tuples-to-vector/71088 "2021-11-07T12:44:33Z")

</div>

I have an iterator, and I wish to convert it into an array. Normally, I could just do: vec = \[i for i in iter\] or vec = map(i -\> i, iter\] but now my iterator happens to contain tuples (of numbers). It is generated as…

---

## [Accessing wanted indices of a vector](https://discourse.julialang.org/t/accessing-wanted-indices-of-a-vector/71048)

<div class="topic-metadata">

**Author:** [@FH96](https://discourse.julialang.org/u/FH96)\
**Replies:** 2\
**Last updated:** [November 7, 2021, 6:42am UTC](https://discourse.julialang.org/t/accessing-wanted-indices-of-a-vector/71048 "2021-11-07T06:42:05Z")

</div>

I have a vector ( Vector{VariableRef} ) : @variable(model,v\[1:2583)\]) I want to choose some indices by means of irreversible\_indices which I get it’s type as Vector{Int64} but when I try to run this : v\[irreversible…

---

## [Why does this Flux code fail with Float64, but run for Float32?](https://discourse.julialang.org/t/why-does-this-flux-code-fail-with-float64-but-run-for-float32/71077)

<div class="topic-metadata">

**Author:** [@Ruvi\_Lecamwasam](https://discourse.julialang.org/u/Ruvi_Lecamwasam)\
**Replies:** 0\
**Last updated:** [November 7, 2021, 3:41am UTC](https://discourse.julialang.org/t/why-does-this-flux-code-fail-with-float64-but-run-for-float32/71077 "2021-11-07T03:41:04Z")

</div>

I’m following along with this tutorial by Chris Rackauckas. This is the code provided for a simple neural network: using Flux NNODE = Chain(x -\> \[x\], # Take in a scalar and transform it into an array Dense(1,…

---

## [How much power? How would Julia stack up?](https://discourse.julialang.org/t/how-much-power-how-would-julia-stack-up/71051)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 4\
**Last updated:** [November 7, 2021, 2:33am UTC](https://discourse.julialang.org/t/how-much-power-how-would-julia-stack-up/71051 "2021-11-07T02:33:42Z")

</div>

Interesting comparison: https://thenewstack.io/which-programming-languages-use-the-least-electricity/?utm\_medium=email&utm\_source=topic+optin&utm\_campaign=awareness&utm\_content=20211106+prog+nl&mkt\_tok=MTA3LUZNUy0wNzAAAA…

---

## [VSCode Notebook not rendering data properly](https://discourse.julialang.org/t/vscode-notebook-not-rendering-data-properly/71063)

<div class="topic-metadata">

**Author:** [@Khanzi](https://discourse.julialang.org/u/Khanzi)\
**Replies:** 1\
**Last updated:** [November 7, 2021, 12:21am UTC](https://discourse.julialang.org/t/vscode-notebook-not-rendering-data-properly/71063 "2021-11-07T00:21:08Z")

</div>

I have the Jupiter Extension as well as the rendering extension and when I open up a notebook I see the following results However when I run cell 2 the data renders as such Has anybody encountered this issue? Any…

---

## [Seeking a smart way to formulate an optimization problem](https://discourse.julialang.org/t/seeking-a-smart-way-to-formulate-an-optimization-problem/71056)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 4\
**Last updated:** [November 6, 2021, 10:12pm UTC](https://discourse.julialang.org/t/seeking-a-smart-way-to-formulate-an-optimization-problem/71056 "2021-11-06T22:12:04Z")

</div>

I recently received tremendous help from this forum in setting up a JuMP optimization problem. I have a similar, but larger problem that I would like to attack, but it is too large to use the same methodology as previou…

---

## [BVProblem MethodError](https://discourse.julialang.org/t/bvproblem-methoderror/71038)

<div class="topic-metadata">

**Author:** [@Sbeltranj](https://discourse.julialang.org/u/Sbeltranj)\
**Replies:** 2\
**Last updated:** [November 6, 2021, 9:52pm UTC](https://discourse.julialang.org/t/bvproblem-methoderror/71038 "2021-11-06T21:52:12Z")

</div>

Hi, I’m new to JULIA. I am trying to solve a system of differential equations, but I get the same error “MethodError: no method matching diffeq! (:: Vector {Float64}, :: Vector {Float64}, :: SciMLBase .NullParameters, ::…

---

## [Splatting a vector into hypot](https://discourse.julialang.org/t/splatting-a-vector-into-hypot/71049)

<div class="topic-metadata">

**Author:** [@tictaccat](https://discourse.julialang.org/u/tictaccat)\
**Replies:** 4\
**Last updated:** [November 6, 2021, 5:00pm UTC](https://discourse.julialang.org/t/splatting-a-vector-into-hypot/71049 "2021-11-06T17:00:30Z")

</div>

The following code takes an extremely long time to compile on my computer: x = randn(10000); hypot(x...) # 220.104289 seconds (66.32 M allocations: 5.422 GiB, 0.88% gc time, 100.00% compilation time) hypot(x...) # 0.001…

---

## [Interpolation to any string](https://discourse.julialang.org/t/interpolation-to-any-string/71020)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 6\
**Last updated:** [November 6, 2021, 7:05pm UTC](https://discourse.julialang.org/t/interpolation-to-any-string/71020 "2021-11-06T19:05:11Z")

</div>

Hi, is it possible to create a universal function to interpolation to any string? maybe there is a function to pass values to the template one at time? teplate = "\\$str1 \\$str2" function get\_text\_by\_template(teplate; …

---

## [v?Mul in MKL](https://discourse.julialang.org/t/v-mul-in-mkl/71039)

<div class="topic-metadata">

**Author:** [@andrew-saydjari](https://discourse.julialang.org/u/andrew-saydjari)\
**Replies:** 8\
**Last updated:** [November 6, 2021, 6:26pm UTC](https://discourse.julialang.org/t/v-mul-in-mkl/71039 "2021-11-06T18:26:12Z")

</div>

In trying to speed up .\*, I was wondering if much progress had been made at making v?Mul accessible (maybe as part of MKL.jl). Mostly just wondering if it is worth upgrading to 1.7 to make the install work. Currently the…

---

## [New Soss interface - request for feedback](https://discourse.julialang.org/t/new-soss-interface-request-for-feedback/65118)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 8\
**Last updated:** [November 6, 2021, 4:00pm UTC](https://discourse.julialang.org/t/new-soss-interface-request-for-feedback/65118 "2021-11-06T16:00:26Z")

</div>

Hi, I’m working on extending Soss, and hoping I might get some design feedback. In the current release of Soss, a model is restricted to be a DAG. To do this, each line of the body of a model is required to be either of…

---

## [Function closure with large arrays/matrices scaling horribly](https://discourse.julialang.org/t/function-closure-with-large-arrays-matrices-scaling-horribly/71027)

<div class="topic-metadata">

**Author:** [@vivian-rogers](https://discourse.julialang.org/u/vivian-rogers)\
**Replies:** 6\
**Last updated:** [November 6, 2021, 3:19pm UTC](https://discourse.julialang.org/t/function-closure-with-large-arrays-matrices-scaling-horribly/71027 "2021-11-06T15:19:33Z")

</div>

Hi! So I am trying to set up a useful function f to pass around the rest of my code as follows: function f\_prepostproc(params) # do stuff f = f\_generator(params) # evaluate f at certain x values, save to file…

---

## [Why is sorting matrices allocating and why is it sometimes slower than the naive approach?](https://discourse.julialang.org/t/why-is-sorting-matrices-allocating-and-why-is-it-sometimes-slower-than-the-naive-approach/71015)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 11\
**Last updated:** [November 6, 2021, 2:53pm UTC](https://discourse.julialang.org/t/why-is-sorting-matrices-allocating-and-why-is-it-sometimes-slower-than-the-naive-approach/71015 "2021-11-06T14:53:30Z")

</div>

I noticed that sort! is allocating here: x = rand(10, 10); @time sort!(x, dims=1); # 0.000016 seconds (20 allocations: 960 bytes) And I’m not sure why. Here is the investigation I’ve done: using BenchmarkTools funct…

---

## [How to save a plot as a jpeg file?](https://discourse.julialang.org/t/how-to-save-a-plot-as-a-jpeg-file/71005)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 20\
**Last updated:** [November 6, 2021, 1:56pm UTC](https://discourse.julialang.org/t/how-to-save-a-plot-as-a-jpeg-file/71005 "2021-11-06T13:56:17Z")

</div>

In Matlab, if you want to save your plot (“h” is the figure handle) as a jpg file with a resolution of 600pixel. Below is all it takes: File\_W = "/path/test.jpg"; exportgraphics(h, File\_W, 'Resolution', 600); Does Juli…

---

## [Ada Julia 1.6.3 binding released](https://discourse.julialang.org/t/ada-julia-1-6-3-binding-released/71047)

<div class="topic-metadata">

**Author:** [@dmitry-kazakov](https://discourse.julialang.org/u/dmitry-kazakov)\
**Replies:** 0\
**Last updated:** [November 6, 2021, 12:20pm UTC](https://discourse.julialang.org/t/ada-julia-1-6-3-binding-released/71047 "2021-11-06T12:20:30Z")

</div>

The library Simple Components for Ada v4.59 provides Julia 1.6.3 bindings. Julia is now compatible with MinGW-based libraries like GTK, which makes it finally possible to use in Windows applications for scripting purpos…

---

## [Digression about privacy over OpenTelemetry.jl](https://discourse.julialang.org/t/digression-about-privacy-over-opentelemetry-jl/70965)

<div class="topic-metadata">

**Author:** [@ederag](https://discourse.julialang.org/u/ederag)\
**Replies:** 9\
**Last updated:** [November 6, 2021, 10:39am UTC](https://discourse.julialang.org/t/digression-about-privacy-over-opentelemetry-jl/70965 "2021-11-06T10:39:46Z")

</div>

Privacy is not listed in OTel Mission, Vision, and Values, at the time of writing. The julia devs listened to the negative community feedback about telemetry (what a relief !): Thanks for contributing to julia, but I’…

---

## [Fast Legendre Transform?](https://discourse.julialang.org/t/fast-legendre-transform/68152)

<div class="topic-metadata">

**Author:** [@Veenty](https://discourse.julialang.org/u/Veenty)\
**Replies:** 3\
**Last updated:** [November 6, 2021, 7:13am UTC](https://discourse.julialang.org/t/fast-legendre-transform/68152 "2021-11-06T07:13:04Z")

</div>

Is anyone aware of a package that is able to do a Fast Legendre Transform similar to the one in chebfun (The fast discrete Legendre transform » Chebfun). The closest that I could find was something in FastTransform, whe…

---

## [JuMP error for nonlinear optimization](https://discourse.julialang.org/t/jump-error-for-nonlinear-optimization/70983)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 17\
**Last updated:** [November 6, 2021, 2:21am UTC](https://discourse.julialang.org/t/jump-error-for-nonlinear-optimization/70983 "2021-11-06T02:21:25Z")

</div>

I’m trying to set up a nonlinear optimization problem and I’m getting an error I don’t understand… import JuMP as J import Ipopt function smoothabs(x) # Smooth approximation to abs(x) k = 1000 f = 2/k f\*log…

---

## [Simplify signature of printed arrays](https://discourse.julialang.org/t/simplify-signature-of-printed-arrays/71025)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 5\
**Last updated:** [November 5, 2021, 11:30pm UTC](https://discourse.julialang.org/t/simplify-signature-of-printed-arrays/71025 "2021-11-05T23:30:56Z")

</div>

When one prints a simple array of floats, one gets: julia\> println(ones(3)) \[1.0, 1.0, 1.0\] However, if I print an arrays of unitful quantities, I get: julia\> println(ones(3)u"nm") Quantity{Float64, 𝐋, Unitful.FreeUn…

---

## [Unable to connect to postgress with libPQ](https://discourse.julialang.org/t/unable-to-connect-to-postgress-with-libpq/70906)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 7\
**Last updated:** [November 6, 2021, 12:44am UTC](https://discourse.julialang.org/t/unable-to-connect-to-postgress-with-libpq/70906 "2021-11-06T00:44:26Z")

</div>

conn2 = LibPQ.Connection("dbname=postgres") tells me that I can’t find Unix domain socket "/tmp/.s.PGSQL.5432"? I’m using Ubuntu 20.04.3 LTS on an x86 Xeon machine. I’ve had the same issue with Crystal. Postgress i…

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

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