# Latest

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

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

**Page:** 645

---

## [Get unit with @benchmark or set unit to "s"](https://discourse.julialang.org/t/get-unit-with-benchmark-or-set-unit-to-s/101664)

<div class="topic-metadata">

**Author:** [@Sisisi](https://discourse.julialang.org/u/Sisisi)\
**Replies:** 1\
**Last updated:** [July 16, 2023, 1:13am UTC](https://discourse.julialang.org/t/get-unit-with-benchmark-or-set-unit-to-s/101664 "2023-07-16T01:13:47Z")

</div>

Hello, I know how to get the mean, median… about @benchmark, nonetheless, those values are given in the suitable unit (ms, µs, ns) but I need to know with Julia what is this unit. Or, else, set the unit to “second”. I …

---

## [Cannot determine the order of dual tag for Differentiable-trebuchet-Zygote](https://discourse.julialang.org/t/cannot-determine-the-order-of-dual-tag-for-differentiable-trebuchet-zygote/101644)

<div class="topic-metadata">

**Author:** [@jslin](https://discourse.julialang.org/u/jslin)\
**Replies:** 2\
**Last updated:** [July 16, 2023, 1:25am UTC](https://discourse.julialang.org/t/cannot-determine-the-order-of-dual-tag-for-differentiable-trebuchet-zygote/101644 "2023-07-16T01:25:59Z")

</div>

I am trying to run the tutorial code from 2019 of Differentiable-trebuchet, but got error in trying to find the gradient with ForwardDiff (https://github.com/JuliaComputing/ODSC2019/blob/master/03-Differentiable-trebuch…

---

## [Why a vector with Expr and Symbols inside fails with ifelse?](https://discourse.julialang.org/t/why-a-vector-with-expr-and-symbols-inside-fails-with-ifelse/101665)

<div class="topic-metadata">

**Author:** [@Tortar](https://discourse.julialang.org/u/Tortar)\
**Replies:** 2\
**Last updated:** [July 15, 2023, 11:49pm UTC](https://discourse.julialang.org/t/why-a-vector-with-expr-and-symbols-inside-fails-with-ifelse/101665 "2023-07-15T23:49:46Z")

</div>

This is probably a stupid question but I don’t understand why this doesn’t work, I’m using Julia 1.9.2: defining a = \[:f1, :(f2::Int)\] when I do \[ifelse(typeof(x) == Expr, x.args, x) for x in a\] I get ERROR: type S…

---

## [Mapping vector elements](https://discourse.julialang.org/t/mapping-vector-elements/101659)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 5\
**Last updated:** [July 15, 2023, 10:33pm UTC](https://discourse.julialang.org/t/mapping-vector-elements/101659 "2023-07-15T22:33:54Z")

</div>

Hi, I am defining the gradients by using below code but i want to make negative values to zero. I wrote below code but it is not working. could you please help me to modify this function gf\_p(p0::Vector, grad::Vector; r…

---

## [\[ANN\] FastDifferentiation.jl](https://discourse.julialang.org/t/ann-fastdifferentiation-jl/101556)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 3\
**Last updated:** [July 15, 2023, 9:14pm UTC](https://discourse.julialang.org/t/ann-fastdifferentiation-jl/101556 "2023-07-15T21:14:36Z")

</div>

FastDifferentiation FastDifferentiation (FD) is a package for generating efficient executables to evaluate derivatives of Julia functions. It can also generate efficient true symbolic derivatives for symbolic analysis. U…

---

## [What does precompilation do on a package that does not use SnoopCompile at all?](https://discourse.julialang.org/t/what-does-precompilation-do-on-a-package-that-does-not-use-snoopcompile-at-all/93680)

<div class="topic-metadata">

**Author:** [@tictaccat](https://discourse.julialang.org/u/tictaccat)\
**Replies:** 8\
**Last updated:** [July 15, 2023, 8:03pm UTC](https://discourse.julialang.org/t/what-does-precompilation-do-on-a-package-that-does-not-use-snoopcompile-at-all/93680 "2023-07-15T20:03:49Z")

</div>

I’m dev’ing package does not use SnoopCompile or attempt any precompilation. I make frequent changes to the package locally, and everytime I do I suffer a decent precompilation delay (30 seconds) when using the package, …

---

## [\[ANN\] DocumenterCitations v1.0.0](https://discourse.julialang.org/t/ann-documentercitations-v1-0-0/101562)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 9\
**Last updated:** [July 15, 2023, 7:37pm UTC](https://discourse.julialang.org/t/ann-documentercitations-v1-0-0/101562 "2023-07-15T19:37:05Z")

</div>

DocumenterCitations.jl is a Documenter.jl plugin to add BibTeX citations to your documentation. By default, DocumenterCitations.jl uses a numeric citation style common in the natural sciences. Citations are shown in-lin…

---

## [Shortcut to load a package from another environment?](https://discourse.julialang.org/t/shortcut-to-load-a-package-from-another-environment/101620)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 4\
**Last updated:** [July 15, 2023, 5:41pm UTC](https://discourse.julialang.org/t/shortcut-to-load-a-package-from-another-environment/101620 "2023-07-15T17:41:51Z")

</div>

I more and more use this workflow to load some packages that are not part of a current development project, but are useful for testing (Plots, LiveSever, for example): mypkg\> activate @LiveServer # shared environment wi…

---

## [Modified loss function in NeuralPDE](https://discourse.julialang.org/t/modified-loss-function-in-neuralpde/101624)

<div class="topic-metadata">

**Author:** [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)\
**Replies:** 4\
**Last updated:** [July 15, 2023, 5:19pm UTC](https://discourse.julialang.org/t/modified-loss-function-in-neuralpde/101624 "2023-07-15T17:19:58Z")

</div>

Is it possible to modify the loss function in PINNs? like instead of loss function of variables, may I modify it to loss of sin or cos of variables?

---

## [JuliaCon 2023 Social Events sign up](https://discourse.julialang.org/t/juliacon-2023-social-events-sign-up/101655)

<div class="topic-metadata">

**Author:** [@Steven\_Kell](https://discourse.julialang.org/u/Steven_Kell)\
**Replies:** 0\
**Last updated:** [July 15, 2023, 1:40pm UTC](https://discourse.julialang.org/t/juliacon-2023-social-events-sign-up/101655 "2023-07-15T13:40:06Z")

</div>

Please sign up for the social events that you would like to attend so that we can plan their execution. It is not guaranteed that all these will happen, however, it is likely that most or all will. Confirmation will be g…

---

## [Update source file with eval-resulted code](https://discourse.julialang.org/t/update-source-file-with-eval-resulted-code/101636)

<div class="topic-metadata">

**Author:** [@algunion](https://discourse.julialang.org/u/algunion)\
**Replies:** 3\
**Last updated:** [July 15, 2023, 10:33am UTC](https://discourse.julialang.org/t/update-source-file-with-eval-resulted-code/101636 "2023-07-15T10:33:19Z")

</div>

Imagine the following scenario: I have a function that generates an Expr, which is in turn processed by eval. To make it easier, let’s create a small example: function makeval() ex = Expr(:function, …

---

## [How can I use a linear model with NaN parameters due to missing train data?](https://discourse.julialang.org/t/how-can-i-use-a-linear-model-with-nan-parameters-due-to-missing-train-data/101648)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 0\
**Last updated:** [July 15, 2023, 10:09am UTC](https://discourse.julialang.org/t/how-can-i-use-a-linear-model-with-nan-parameters-due-to-missing-train-data/101648 "2023-07-15T10:09:28Z")

</div>

Hi all! I am trying to build a model to predict electrical powers from a sequence of binary computer instructions. I thought to use a multiple linear regression, as from each instruction there are a lot of variables I c…

---

## [Makie/FFMPEG pb libharfbuzz.so.0: undefined symbol: FT\_Get\_Transform](https://discourse.julialang.org/t/makie-ffmpeg-pb-libharfbuzz-so-0-undefined-symbol-ft-get-transform/99570)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 12\
**Last updated:** [July 15, 2023, 9:38am UTC](https://discourse.julialang.org/t/makie-ffmpeg-pb-libharfbuzz-so-0-undefined-symbol-ft-get-transform/99570 "2023-07-15T09:38:24Z")

</div>

Hi, I have a bug during animation with CairoMakie. I try the example from the doc: using CairoMakie scene = lines(rand(10); linewidth=10) record(scene, "out.mp4", 1:255; framerate = 60) do i scene.plots\[2\]\[:color…

---

## [Getting all method definitions for a \`Module\`](https://discourse.julialang.org/t/getting-all-method-definitions-for-a-module/101639)

<div class="topic-metadata">

**Author:** [@ulysses](https://discourse.julialang.org/u/ulysses)\
**Replies:** 19\
**Last updated:** [July 15, 2023, 2:56am UTC](https://discourse.julialang.org/t/getting-all-method-definitions-for-a-module/101639 "2023-07-15T02:56:15Z")

</div>

Is there a way to get all method definitions in a Module? I tried names(mod;all=true,imported=true) but going this way still doesn’t catch methods extending existing functions using this style: function Base.push!(c::MyC…

---

## [OrdinaryDiffEq.jl Buffer for Past Values Through Previous Iterations](https://discourse.julialang.org/t/ordinarydiffeq-jl-buffer-for-past-values-through-previous-iterations/101641)

<div class="topic-metadata">

**Author:** [@mwu](https://discourse.julialang.org/u/mwu)\
**Replies:** 1\
**Last updated:** [July 15, 2023, 2:33am UTC](https://discourse.julialang.org/t/ordinarydiffeq-jl-buffer-for-past-values-through-previous-iterations/101641 "2023-07-15T02:33:39Z")

</div>

I have an ODE system from OrdinaryDiffEq.jl. I want to model a digital filter that needs to know the past 7 values of a particular variable. Essentially, I want a buffer of sorts to keep track of the value of this variab…

---

## [GCMMA using NLopt](https://discourse.julialang.org/t/gcmma-using-nlopt/101642)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 5\
**Last updated:** [July 15, 2023, 1:23am UTC](https://discourse.julialang.org/t/gcmma-using-nlopt/101642 "2023-07-15T01:23:20Z")

</div>

Hi All. I have a question can i use NLopt for GCMMA algorithm? also one other question can zygote has errors in calculating gradients? thank you

---

## [Comparing Plot Outputs for Different Versions of Julia](https://discourse.julialang.org/t/comparing-plot-outputs-for-different-versions-of-julia/101538)

<div class="topic-metadata">

**Author:** [@emmabottomley](https://discourse.julialang.org/u/emmabottomley)\
**Replies:** 3\
**Last updated:** [July 15, 2023, 12:18am UTC](https://discourse.julialang.org/t/comparing-plot-outputs-for-different-versions-of-julia/101538 "2023-07-15T00:18:05Z")

</div>

Hello! I’m working on solving PDEs in julia and producing plots of their solutions for different lengths of time. I was having a lot of issues when using Julia v-1.9.0. When I increased the time in this specific settin…

---

## [Precedence of \`=\` vs \`,\`](https://discourse.julialang.org/t/precedence-of-vs/101637)

<div class="topic-metadata">

**Author:** [@Neal\_Gafter](https://discourse.julialang.org/u/Neal_Gafter)\
**Replies:** 2\
**Last updated:** [July 14, 2023, 11:09pm UTC](https://discourse.julialang.org/t/precedence-of-vs/101637 "2023-07-14T23:09:49Z")

</div>

The precedence below seems inconsistent. In particular, the last result is unexpected. Is the Julia precedence “whatever the parser does”, or is there some underlying design? julia\> quote a, b end quote …

---

## [Basis functions to approximate the inverse of quadratic function](https://discourse.julialang.org/t/basis-functions-to-approximate-the-inverse-of-quadratic-function/101449)

<div class="topic-metadata">

**Author:** [@EricJohnson](https://discourse.julialang.org/u/EricJohnson)\
**Replies:** 33\
**Last updated:** [July 14, 2023, 10:58pm UTC](https://discourse.julialang.org/t/basis-functions-to-approximate-the-inverse-of-quadratic-function/101449 "2023-07-14T22:58:55Z")

</div>

I have many observations of measuring a physical parameter over time. Each observation is basically a function p(t), t \\in \[t\_1, t\_2\]. I also have the value \\int\_{t\_1}^{t\_2} q (t) dt = Q I have many observations: \\le…

---

## [Implementing Particle Life in Julia? | Graphics Simulator? | Physics Simulator (with visualisation)?](https://discourse.julialang.org/t/implementing-particle-life-in-julia-graphics-simulator-physics-simulator-with-visualisation/101563)

<div class="topic-metadata">

**Author:** [@Maddy](https://discourse.julialang.org/u/Maddy)\
**Replies:** 4\
**Last updated:** [July 14, 2023, 9:44pm UTC](https://discourse.julialang.org/t/implementing-particle-life-in-julia-graphics-simulator-physics-simulator-with-visualisation/101563 "2023-07-14T21:44:04Z")

</div>

Tom Mohr has shown his implementation of Particle Life here I was wondering if we can do that in Julia since a longgg time! But I just can’t find a graphics library that has real-time rendering (along with some interac…

---

## [KeyError: key 'C' not found when using modelingtoolkitize command](https://discourse.julialang.org/t/keyerror-key-c-not-found-when-using-modelingtoolkitize-command/101553)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 3\
**Last updated:** [July 14, 2023, 8:39pm UTC](https://discourse.julialang.org/t/keyerror-key-c-not-found-when-using-modelingtoolkitize-command/101553 "2023-07-14T20:39:47Z")

</div>

I am using the modelingtoolkitize command to convert a large system of ODEs to symbolic expressions in order to perform Structural Identifiability Analysis. However, I am receiving the following error: KeyError: key ‘…

---

## [GPU Parallel Computing for Global Sensitivity Analysis](https://discourse.julialang.org/t/gpu-parallel-computing-for-global-sensitivity-analysis/101545)

<div class="topic-metadata">

**Author:** [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Replies:** 2\
**Last updated:** [July 14, 2023, 8:24pm UTC](https://discourse.julialang.org/t/gpu-parallel-computing-for-global-sensitivity-analysis/101545 "2023-07-14T20:24:31Z")

</div>

Hi everyone. I try to speed up Global Sensitivity Analysis calculations based on the code in this link (Global sensitivity analysis in a large parameter space - computational cost - #11 by TS-CUBED). Essentially, I chang…

---

## [Q: Optimization.jl | Passing fixed parameters to an analytic derivative \[gradient\] for univariate \[multivariate\] optimization?](https://discourse.julialang.org/t/q-optimization-jl-passing-fixed-parameters-to-an-analytic-derivative-gradient-for-univariate-multivariate-optimization/101605)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 2\
**Last updated:** [July 14, 2023, 7:41pm UTC](https://discourse.julialang.org/t/q-optimization-jl-passing-fixed-parameters-to-an-analytic-derivative-gradient-for-univariate-multivariate-optimization/101605 "2023-07-14T19:41:12Z")

</div>

The Optimization.jl documentation states " Defining gradients can be done in two ways. One way is to manually provide a gradient definition in the OptimizationFunction constructor. However, the more convenient way to obt…

---

## [Testing the limit of the second law of thermodynamics with Julia](https://discourse.julialang.org/t/testing-the-limit-of-the-second-law-of-thermodynamics-with-julia/101560)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 5\
**Last updated:** [July 14, 2023, 7:30pm UTC](https://discourse.julialang.org/t/testing-the-limit-of-the-second-law-of-thermodynamics-with-julia/101560 "2023-07-14T19:30:02Z")

</div>

The second law of thermodynamics is an important rule in physics. Understanding it well gives us a crucial understanding in it. For more context, see the video here. The question becomes “what is entropy”, which become…

---

## [DifferentialEquations.jl VectorContinuousCallback vs CallbackSet](https://discourse.julialang.org/t/differentialequations-jl-vectorcontinuouscallback-vs-callbackset/88536)

<div class="topic-metadata">

**Author:** [@Max\_M](https://discourse.julialang.org/u/Max_M)\
**Replies:** 7\
**Last updated:** [July 14, 2023, 6:48pm UTC](https://discourse.julialang.org/t/differentialequations-jl-vectorcontinuouscallback-vs-callbackset/88536 "2023-07-14T18:48:35Z")

</div>

From the docs: The \[VectorContinuousCallback\] https://diffeq.sciml.ai/stable/features/callback\_functions/#SciMLBase.VectorContinuousCallback) works like a vector of ContinuousCallbacks and lets the user specify which c…

---

## [Uncompress zst files](https://discourse.julialang.org/t/uncompress-zst-files/101632)

<div class="topic-metadata">

**Author:** [@vtomar](https://discourse.julialang.org/u/vtomar)\
**Replies:** 1\
**Last updated:** [July 14, 2023, 6:23pm UTC](https://discourse.julialang.org/t/uncompress-zst-files/101632 "2023-07-14T18:23:19Z")

</div>

Is there a package that can uncompress zst files?

---

## [UndefVarError: \`Point2f\` not defined](https://discourse.julialang.org/t/undefvarerror-point2f-not-defined/101579)

<div class="topic-metadata">

**Author:** [@Wulf](https://discourse.julialang.org/u/Wulf)\
**Replies:** 13\
**Last updated:** [July 14, 2023, 4:54pm UTC](https://discourse.julialang.org/t/undefvarerror-point2f-not-defined/101579 "2023-07-14T16:54:57Z")

</div>

Without apparent modifications after compiling / running in the terminal of VSCode/ VSCodium the message: ERROR: UndefVarError: Point2f not defined appears, referring to a line that attempts to declare an observable of…

---

## [Why so many allocations in the loop on partition](https://discourse.julialang.org/t/why-so-many-allocations-in-the-loop-on-partition/101606)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 7\
**Last updated:** [July 14, 2023, 5:39pm UTC](https://discourse.julialang.org/t/why-so-many-allocations-in-the-loop-on-partition/101606 "2023-07-14T17:39:47Z")

</div>

Maybe I do the measurements wrong, but I’m surprised that partition performs so badly in this case. using IterTools, BenchmarkTools a=rand(1:10,10^5) function looppart(a) res=zeros(Int,20) for (a1,a2) in partition(a,2,…

---

## [Including a binary (a "\*.so") with a package?](https://discourse.julialang.org/t/including-a-binary-a-so-with-a-package/101626)

<div class="topic-metadata">

**Author:** [@frylock](https://discourse.julialang.org/u/frylock)\
**Replies:** 6\
**Last updated:** [July 14, 2023, 4:42pm UTC](https://discourse.julialang.org/t/including-a-binary-a-so-with-a-package/101626 "2023-07-14T16:42:34Z")

</div>

We have a vendor C API that we are currently trying to wrap in Julia. I just have their headers and a dynamic library. Presently I am using \] generate to create new projects because of the way that our source is stored. …

---

## [Consistent documentation of an API using Julia and further programming languages](https://discourse.julialang.org/t/consistent-documentation-of-an-api-using-julia-and-further-programming-languages/101629)

<div class="topic-metadata">

**Author:** [@Benedict](https://discourse.julialang.org/u/Benedict)\
**Replies:** 0\
**Last updated:** [July 14, 2023, 4:08pm UTC](https://discourse.julialang.org/t/consistent-documentation-of-an-api-using-julia-and-further-programming-languages/101629 "2023-07-14T16:08:58Z")

</div>

I am working on a C / Fortan interface (libtrixi) to the Julia-based flow solver Trixi.jl. We would like to provide a pleasing documentation for our users and have started with Documenter.jl as done for Trixi.jl. However…

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

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