# Latest

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

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

**Page:** 475

---

## [Not able to use Plots.jl with Julia 1.8.0](https://discourse.julialang.org/t/not-able-to-use-plots-jl-with-julia-1-8-0/86076)

<div class="topic-metadata">

**Author:** [@geekbear](https://discourse.julialang.org/u/geekbear)\
**Replies:** 5\
**Last updated:** [February 25, 2024, 11:14pm UTC](https://discourse.julialang.org/t/not-able-to-use-plots-jl-with-julia-1-8-0/86076 "2024-02-25T23:14:30Z")

</div>

I updated Julia to 1.8.0 and then installed Plots.jl, and wasn’t able to execute the “using Plots” command. Ran Pkg.update() a few times to no avail. Got error messages below and have no clue what to do. Advice would be …

---

## [Get a vector from field](https://discourse.julialang.org/t/get-a-vector-from-field/110713)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 4\
**Last updated:** [February 25, 2024, 10:12pm UTC](https://discourse.julialang.org/t/get-a-vector-from-field/110713 "2024-02-25T22:12:57Z")

</div>

hi I wrote this code in julia gridap. h value is a field. i need a vector of values. how can i get that? ∂Hn+1/∂hnj={−1 , if i = j and ψ+n+1(e (ξ i ) )\< hn(ξ i ) 0 , otherwise function dh(hh\_in, ψPlusnext\_in) h\_…

---

## [Simplify Julia Expr with Symbolics.jl](https://discourse.julialang.org/t/simplify-julia-expr-with-symbolics-jl/110094)

<div class="topic-metadata">

**Author:** [@VPBML](https://discourse.julialang.org/u/VPBML)\
**Replies:** 2\
**Last updated:** [February 25, 2024, 9:52pm UTC](https://discourse.julialang.org/t/simplify-julia-expr-with-symbolics-jl/110094 "2024-02-25T21:52:23Z")

</div>

Hi, Can we use Symbolics.jl to simplify Julia Expr directly? For example, simplifying :(a + b - a) to :(b)? Thank you.

---

## [Using Zygote.jl with IterativeSolvers.jl](https://discourse.julialang.org/t/using-zygote-jl-with-iterativesolvers-jl/107634)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 11\
**Last updated:** [February 25, 2024, 9:08pm UTC](https://discourse.julialang.org/t/using-zygote-jl-with-iterativesolvers-jl/107634 "2024-02-25T21:08:40Z")

</div>

I have a code which solves an initial value problem of ODEs parameterized by a control vector, then uses the solution as an argument to calculate an objective function, which I compute the gradient of (by my own methods…

---

## [Understanding stride loop](https://discourse.julialang.org/t/understanding-stride-loop/110721)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 7\
**Last updated:** [February 25, 2024, 7:38pm UTC](https://discourse.julialang.org/t/understanding-stride-loop/110721 "2024-02-25T19:38:56Z")

</div>

I try to read performance tips :sweat\_smile:) (Performance Tips · CUDA.jl) and can’t understand what is the point of this example, because seems while executed only once. function gpu\_add5!(y, x) index = (blockIdx…

---

## [\[ANN\] OptimalSortingNetworks: Sort small collections efficiently and with good type inference](https://discourse.julialang.org/t/ann-optimalsortingnetworks-sort-small-collections-efficiently-and-with-good-type-inference/105544)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 14\
**Last updated:** [February 25, 2024, 6:59pm UTC](https://discourse.julialang.org/t/ann-optimalsortingnetworks-sort-small-collections-efficiently-and-with-good-type-inference/105544 "2024-02-25T18:59:05Z")

</div>

OptimalSortingNetworks (OSN for short) is being registered. Use it to sort small tuples or vectors: julia\> using OptimalSortingNetworks julia\> sorted(\[10, 5, 7, 9\]) 4-element Vector{Int64}: 5 7 9 10 julia\> sort…

---

## [XLSX and DataFrame column type](https://discourse.julialang.org/t/xlsx-and-dataframe-column-type/110741)

<div class="topic-metadata">

**Author:** [@fdekerme](https://discourse.julialang.org/u/fdekerme)\
**Replies:** 3\
**Last updated:** [February 25, 2024, 6:50pm UTC](https://discourse.julialang.org/t/xlsx-and-dataframe-column-type/110741 "2024-02-25T18:50:10Z")

</div>

Hello everyone :grin:, I want to load an excel file with the XLSX.jl package and then convert it to DataFrame with DataFrame.jl with the following code: data = DataFrame(XLSX.readtable(path\_data, "Sheet1")) However, t…

---

## [Why is this simple code type unstable?](https://discourse.julialang.org/t/why-is-this-simple-code-type-unstable/110734)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 2\
**Last updated:** [February 25, 2024, 5:29pm UTC](https://discourse.julialang.org/t/why-is-this-simple-code-type-unstable/110734 "2024-02-25T17:29:40Z")

</div>

julia\> function test() for i=1:1 end end test (generic function with 1 method) julia\> @code\_warntype test() MethodInstance for test() from test() in Main at REPL\[1\]:1 Arguments #self#::Core.Const(test)…

---

## [Differentiating optimization problem solutions in Julia](https://discourse.julialang.org/t/differentiating-optimization-problem-solutions-in-julia/75988)

<div class="topic-metadata">

**Author:** [@mtfishman](https://discourse.julialang.org/u/mtfishman)\
**Replies:** 9\
**Last updated:** [February 25, 2024, 2:10pm UTC](https://discourse.julialang.org/t/differentiating-optimization-problem-solutions-in-julia/75988 "2024-02-25T14:10:32Z")

</div>

Hello, I was recently made aware of the paper “Efficient and Modular Implicit Differentiation”: which is implemented in Jax here: It is about automatically generating differentiation rules for optimization problem…

---

## [LDA example in multivariatestats.jl flipped x and y values](https://discourse.julialang.org/t/lda-example-in-multivariatestats-jl-flipped-x-and-y-values/110508)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 4\
**Last updated:** [February 25, 2024, 2:08pm UTC](https://discourse.julialang.org/t/lda-example-in-multivariatestats-jl-flipped-x-and-y-values/110508 "2024-02-25T14:08:29Z")

</div>

Hello, good morning. Days ago I started looking the multivariatestats.jl to do some pca and lda analysis, and notice that lda plots data inverted in this example: https://juliastats.org/MultivariateStats.jl/stable/lda/ …

---

## [\[GMT.jl\] Text Encoding issue (UTF8)](https://discourse.julialang.org/t/gmt-jl-text-encoding-issue-utf8/110735)

<div class="topic-metadata">

**Author:** [@SingingKim](https://discourse.julialang.org/u/SingingKim)\
**Replies:** 2\
**Last updated:** [February 25, 2024, 1:28pm UTC](https://discourse.julialang.org/t/gmt-jl-text-encoding-issue-utf8/110735 "2024-02-25T13:28:59Z")

</div>

I’m new to GMT.jl and I am struggling with text function. using GMT text("대한민국", fmt="pdf", x=12, y=15, font=12, show=true) Give the following result: Can anyone help me with this issue? Thanks!

---

## [Solve MCP problems with nonlinear constraints](https://discourse.julialang.org/t/solve-mcp-problems-with-nonlinear-constraints/110061)

<div class="topic-metadata">

**Author:** [@vicentemunozlh](https://discourse.julialang.org/u/vicentemunozlh)\
**Replies:** 8\
**Last updated:** [February 25, 2024, 10:44am UTC](https://discourse.julialang.org/t/solve-mcp-problems-with-nonlinear-constraints/110061 "2024-02-25T10:44:00Z")

</div>

Hello ! Ive been trying to solve an MCP problem with JuMP and non linear constraints/optimality condition but have not been able to do so. Is there a way around this? or other package that might do the trick? Thank you…

---

## [Documentation based on docstring, and deploy to juliahub](https://discourse.julialang.org/t/documentation-based-on-docstring-and-deploy-to-juliahub/110715)

<div class="topic-metadata">

**Author:** [@perebalazs](https://discourse.julialang.org/u/perebalazs)\
**Replies:** 3\
**Last updated:** [February 25, 2024, 9:04am UTC](https://discourse.julialang.org/t/documentation-based-on-docstring-and-deploy-to-juliahub/110715 "2024-02-25T09:04:55Z")

</div>

I made a Julia package LowLevelFEM and tried to make documentation for it. I used docstings in src file. docs/build/index.html was generated with Documenter julia package and @audodocs macro inside index.md. Now I want …

---

## [Load graphml with LightGraphs](https://discourse.julialang.org/t/load-graphml-with-lightgraphs/110590)

<div class="topic-metadata">

**Author:** [@Andromeda258](https://discourse.julialang.org/u/Andromeda258)\
**Replies:** 4\
**Last updated:** [February 25, 2024, 6:15am UTC](https://discourse.julialang.org/t/load-graphml-with-lightgraphs/110590 "2024-02-25T06:15:02Z")

</div>

I want to load a graphml graph as LightGraphs SimpleGraphs. This is the code I am using: \` using LightGraphs using GraphIO g = loadgraph(“graph.graphml”, GraphMLFormat()) ’ But I got this error: · ERROR: UndefVar…

---

## [Abstract type enumeration and interface](https://discourse.julialang.org/t/abstract-type-enumeration-and-interface/110723)

<div class="topic-metadata">

**Author:** [@thinhle](https://discourse.julialang.org/u/thinhle)\
**Replies:** 1\
**Last updated:** [February 25, 2024, 5:47am UTC](https://discourse.julialang.org/t/abstract-type-enumeration-and-interface/110723 "2024-02-25T05:47:01Z")

</div>

Might be a redundant question but after a quick search I could not find what I need. Say I am using SomeModule, what’s the recommended way to explore all abstract types defined in this module and also in Base (presumably…

---

## [Choice variable doesn't optimize the objective function](https://discourse.julialang.org/t/choice-variable-doesnt-optimize-the-objective-function/110633)

<div class="topic-metadata">

**Author:** [@Ayesha](https://discourse.julialang.org/u/Ayesha)\
**Replies:** 3\
**Last updated:** [February 25, 2024, 12:34am UTC](https://discourse.julialang.org/t/choice-variable-doesnt-optimize-the-objective-function/110633 "2024-02-25T00:34:31Z")

</div>

begin # set parameters b = 100.0 r = 0.2 α = 0.85 θ = 2.5 β = 0.9 A = 1.0 s = 1.0 end begin f(b) = b^α Y₂(b,θ) = θ\*f(b) C₂(R₂,b,θ) = Y₂(b,θ) - R₂ R̄(b,r) = (1+r)\*b U₂(R₂, θ, b, α) = A\*log(max(θ \* f(b) - …

---

## [Advanced Metaprogramming Uses of QuoteNode](https://discourse.julialang.org/t/advanced-metaprogramming-uses-of-quotenode/110708)

<div class="topic-metadata">

**Author:** [@mnemnion](https://discourse.julialang.org/u/mnemnion)\
**Replies:** 1\
**Last updated:** [February 24, 2024, 10:28pm UTC](https://discourse.julialang.org/t/advanced-metaprogramming-uses-of-quotenode/110708 "2024-02-24T22:28:37Z")

</div>

Continuing the discussion from Is there a better way to write this macro?: Quoth The Manual: The parser yields QuoteNodes for simple quoted items like symbols. QuoteNode can also be used for certain advanced metapro…

---

## [Fitted Flux model is "off" by one](https://discourse.julialang.org/t/fitted-flux-model-is-off-by-one/110709)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 2\
**Last updated:** [February 24, 2024, 9:12pm UTC](https://discourse.julialang.org/t/fitted-flux-model-is-off-by-one/110709 "2024-02-24T21:12:09Z")

</div>

I am trying to reproduce a simple NN model in Julia using Lux.jl, originally using the R package forecast which trains an AR(2) model using nnet internally. I am almost able to reproduce it, but my fitted model is off by…

---

## [Symbolics.jl convert string to symbolic equation](https://discourse.julialang.org/t/symbolics-jl-convert-string-to-symbolic-equation/110704)

<div class="topic-metadata">

**Author:** [@brombo](https://discourse.julialang.org/u/brombo)\
**Replies:** 3\
**Last updated:** [February 24, 2024, 10:17pm UTC](https://discourse.julialang.org/t/symbolics-jl-convert-string-to-symbolic-equation/110704 "2024-02-24T22:17:47Z")

</div>

Consider that I have a string S = "r^2\*sin(th)^2" that I want to convert to an Symbolics expression, Sexpr, so that - Derivative(r)\*Sexpr = 2\*r\*sin(th)^2 Derivative(th)\*Sexpr = 2r^2\*sin(th)\*cos(th) Basically I wish to…

---

## [Using structures with JuMP](https://discourse.julialang.org/t/using-structures-with-jump/110663)

<div class="topic-metadata">

**Author:** [@joaomcostab](https://discourse.julialang.org/u/joaomcostab)\
**Replies:** 5\
**Last updated:** [February 24, 2024, 9:07pm UTC](https://discourse.julialang.org/t/using-structures-with-jump/110663 "2024-02-24T21:07:30Z")

</div>

I am trying to solve a non-linear system re-writing it in a way that I can use optimization (basically the objective function is 1.0 and the constraints are the equations of the system). However, these equations use use…

---

## [Reducing Materialize in Profiling](https://discourse.julialang.org/t/reducing-materialize-in-profiling/110698)

<div class="topic-metadata">

**Author:** [@dennispureza](https://discourse.julialang.org/u/dennispureza)\
**Replies:** 5\
**Last updated:** [February 24, 2024, 5:50pm UTC](https://discourse.julialang.org/t/reducing-materialize-in-profiling/110698 "2024-02-24T17:50:51Z")

</div>

Hi! I am profiling my code and roughly 75% of the following line’s time is occupied with Materialize, any ideia how to optimize this? J = sum((dfdWdP.\*(f.- f̄ - ((f̃/g̃)\*(g.-ḡ)))), dims=1)' dfdWdP is a Matrix{Float64…

---

## [Nullspace Function Vs QR decomposition](https://discourse.julialang.org/t/nullspace-function-vs-qr-decomposition/110656)

<div class="topic-metadata">

**Author:** [@fimiller](https://discourse.julialang.org/u/fimiller)\
**Replies:** 8\
**Last updated:** [February 24, 2024, 7:16pm UTC](https://discourse.julialang.org/t/nullspace-function-vs-qr-decomposition/110656 "2024-02-24T19:16:54Z")

</div>

I am attempting to compute a nullspace for a matrix A. I have two potential techniques of doing this. One is to use a permuted QR decomposition, and the other is to use the nullspace function. These two approaches give…

---

## [Is there a better way to write this macro?](https://discourse.julialang.org/t/is-there-a-better-way-to-write-this-macro/110610)

<div class="topic-metadata">

**Author:** [@mnemnion](https://discourse.julialang.org/u/mnemnion)\
**Replies:** 35\
**Last updated:** [February 24, 2024, 7:09pm UTC](https://discourse.julialang.org/t/is-there-a-better-way-to-write-this-macro/110610 "2024-02-24T19:09:51Z")

</div>

I’m working on a VM, of the classic dispatch-on-value sort, and the last step (which I’m bearing down on) will be to make it type stable. The current implementation uses a multimethod for dispatch, but the Vector holding…

---

## [Zlib\_jll - I'm obviously doing it wrong](https://discourse.julialang.org/t/zlib-jll-im-obviously-doing-it-wrong/110705)

<div class="topic-metadata">

**Author:** [@BloodFeastMan](https://discourse.julialang.org/u/BloodFeastMan)\
**Replies:** 1\
**Last updated:** [February 24, 2024, 7:07pm UTC](https://discourse.julialang.org/t/zlib-jll-im-obviously-doing-it-wrong/110705 "2024-02-24T19:07:51Z")

</div>

Can anyone show an actual example of a line using compress or decompress with Zlib\_jll?

---

## [Dumb question: why autodifferentiation is needed in Neural Networks](https://discourse.julialang.org/t/dumb-question-why-autodifferentiation-is-needed-in-neural-networks/110673)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 9\
**Last updated:** [February 24, 2024, 6:11pm UTC](https://discourse.julialang.org/t/dumb-question-why-autodifferentiation-is-needed-in-neural-networks/110673 "2024-02-24T18:11:21Z")

</div>

I know little other than the basic NN, but why autodiff is needed for DeepLearning? Using backchain it is fairly easy to get the gradient without autodiff, or at least if standard activation functions are provided. For …

---

## [Symbolics and vector](https://discourse.julialang.org/t/symbolics-and-vector/110457)

<div class="topic-metadata">

**Author:** [@blob](https://discourse.julialang.org/u/blob)\
**Replies:** 2\
**Last updated:** [February 24, 2024, 12:54pm UTC](https://discourse.julialang.org/t/symbolics-and-vector/110457 "2024-02-24T12:54:09Z")

</div>

So in a similar way to this post I wonder why I am getting the following: using Symbolics @variables x\[1:5\] y ex1 = x\[1\]^2+3\*x\[5\]+x\[3\]\*y ex2 = x\[1\]\*x\[2\]\*x\[4\]^2+10 Symbolics.jacobian(\[ex2\], x\[1:5\]) ###Works, gives : x…

---

## [Tab completion to find methods for given variable(s)](https://discourse.julialang.org/t/tab-completion-to-find-methods-for-given-variable-s/66076)

<div class="topic-metadata">

**Author:** [@ert](https://discourse.julialang.org/u/ert)\
**Replies:** 11\
**Last updated:** [February 24, 2024, 2:47am UTC](https://discourse.julialang.org/t/tab-completion-to-find-methods-for-given-variable-s/66076 "2024-02-24T02:47:39Z")

</div>

I just noticed that https://github.com/JuliaLang/julia/pull/38791 for the REPL got merged to be included in the next Julia version. This means that the REPL will tab-complete statements like ?(x, y) to yield all methods …

---

## [Why do Julia BigInt iterative functions overflow?](https://discourse.julialang.org/t/why-do-julia-bigint-iterative-functions-overflow/110674)

<div class="topic-metadata">

**Author:** [@Claude\_Shannon](https://discourse.julialang.org/u/Claude_Shannon)\
**Replies:** 6\
**Last updated:** [February 23, 2024, 11:47pm UTC](https://discourse.julialang.org/t/why-do-julia-bigint-iterative-functions-overflow/110674 "2024-02-23T23:47:59Z")

</div>

Let’s say I want to write the factorial function in Julia in the following recursive way: FACTORIAL(n) = n==1 ? 1 : n\*BigInt(FACTORIAL(n-1)) Doing so, it shows the following error when trying to compute FACTORIAL(1e6) …

---

## [LXM splittable prng](https://discourse.julialang.org/t/lxm-splittable-prng/110501)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 5\
**Last updated:** [February 23, 2024, 10:42pm UTC](https://discourse.julialang.org/t/lxm-splittable-prng/110501 "2024-02-23T22:42:29Z")

</div>

Continuing the discussion from Linear relationship between Xoshiro tasks: Just in case it’s interesting, Guy Steele who worked on SplitMix has come up with a newer algorithm. Talk: https://www.youtube.com/watch?v=OXurC…

---

## [Test for constant expressions in Symbolics.jl](https://discourse.julialang.org/t/test-for-constant-expressions-in-symbolics-jl/110654)

<div class="topic-metadata">

**Author:** [@brombo](https://discourse.julialang.org/u/brombo)\
**Replies:** 5\
**Last updated:** [February 23, 2024, 8:59pm UTC](https://discourse.julialang.org/t/test-for-constant-expressions-in-symbolics-jl/110654 "2024-02-23T20:59:52Z")

</div>

I am using Symbolics.jl and wish to test a symbolic expression to see if is a constant. The only way I can think of is to see if all the derivatives with respect to the independent symbolic variables are zero. I think …

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

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