# Latest

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

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

**Page:** 520

---

## [Adding arbitrary text to Plots.jl output](https://discourse.julialang.org/t/adding-arbitrary-text-to-plots-jl-output/108262)

<div class="topic-metadata">

**Author:** [@paulmelis](https://discourse.julialang.org/u/paulmelis)\
**Replies:** 3\
**Last updated:** [January 2, 2024, 3:35pm UTC](https://discourse.julialang.org/t/adding-arbitrary-text-to-plots-jl-output/108262 "2024-01-02T15:35:26Z")

</div>

I’d like to add some footer text to my plots (I’m already using two lines of title), but can’t seem to find a way to do it. I know about annotate!(), but that only adds text within the plot region in the plot coordinate …

---

## [Idea: New julia CLI switches (\`-m\` and \`--pkg\`)](https://discourse.julialang.org/t/idea-new-julia-cli-switches-m-and-pkg/98897)

<div class="topic-metadata">

**Author:** [@pankgeorg](https://discourse.julialang.org/u/pankgeorg)\
**Replies:** 9\
**Last updated:** [January 2, 2024, 2:32pm UTC](https://discourse.julialang.org/t/idea-new-julia-cli-switches-m-and-pkg/98897 "2024-01-02T14:32:08Z")

</div>

\-m: shorthand for -e using Module: Module julia -e "import Pluto; Pluto.run()" is a pattern I happen to use very often With this idea it could get converted to julia -m Pluto which could even run pluto as-is (inv…

---

## [How can I splat expressions into quote blocks?](https://discourse.julialang.org/t/how-can-i-splat-expressions-into-quote-blocks/108263)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 3\
**Last updated:** [January 2, 2024, 2:15pm UTC](https://discourse.julialang.org/t/how-can-i-splat-expressions-into-quote-blocks/108263 "2024-01-02T14:15:33Z")

</div>

ex1 = quote a = 1 a += 1 end ex2 = quote a \*= 2 a += 3 end quote $ex1... $ex2... end gives me quote #= REPL\[65\]:2 =# begin #= REPL\[61\]:2 =# a = 1 #= REPL\[61\]:3 =#…

---

## [Fast conversion from Matrix{Union{Missing, Float64}} to Sparse](https://discourse.julialang.org/t/fast-conversion-from-matrix-union-missing-float64-to-sparse/108161)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 11\
**Last updated:** [January 2, 2024, 2:10pm UTC](https://discourse.julialang.org/t/fast-conversion-from-matrix-union-missing-float64-to-sparse/108161 "2024-01-02T14:10:55Z")

</div>

I have a matrix that contains lots of missing values. I am toying with the idea of using sparsity to represent those missing values instead. However, one hurdle to easy conversion from Matrix to SparseMatrix is that the …

---

## [Using ForwardDiff and Symbolics, with arithmetic operations](https://discourse.julialang.org/t/using-forwarddiff-and-symbolics-with-arithmetic-operations/106530)

<div class="topic-metadata">

**Author:** [@polhager](https://discourse.julialang.org/u/polhager)\
**Replies:** 2\
**Last updated:** [January 2, 2024, 9:32am UTC](https://discourse.julialang.org/t/using-forwarddiff-and-symbolics-with-arithmetic-operations/106530 "2024-01-02T09:32:49Z")

</div>

I have a somewhat complicated function I’d like to find the analytical jacobian for. When using ForwardDiff and Symbolics and defining a function where both the input variables and certain parameters are symbolic, I get …

---

## [From Julia Doc - 5. Creating Package - Pkg not found after Activating?](https://discourse.julialang.org/t/from-julia-doc-5-creating-package-pkg-not-found-after-activating/108067)

<div class="topic-metadata">

**Author:** [@benslinux](https://discourse.julialang.org/u/benslinux)\
**Replies:** 8\
**Last updated:** [January 2, 2024, 9:23am UTC](https://discourse.julialang.org/t/from-julia-doc-5-creating-package-pkg-not-found-after-activating/108067 "2024-01-02T09:23:11Z")

</div>

Sometimes I generate a pkg, then activate, then import and it works fine. Other times I get the msg - pkg not found and it’s right there in the directory I’m in. It’s such a simple process, I don’t understand what’s chan…

---

## [Swap the two largest elements in a vector](https://discourse.julialang.org/t/swap-the-two-largest-elements-in-a-vector/108234)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 13\
**Last updated:** [January 2, 2024, 7:34am UTC](https://discourse.julialang.org/t/swap-the-two-largest-elements-in-a-vector/108234 "2024-01-02T07:34:40Z")

</div>

Hello, good afternoon and Happy new Year. I would like to know how I can swap the two largest elements in a vector like \[1, 2, 3, 4, 5\]

---

## [Access variables of another subsystem in a callback](https://discourse.julialang.org/t/access-variables-of-another-subsystem-in-a-callback/108248)

<div class="topic-metadata">

**Author:** [@HKruenaegel](https://discourse.julialang.org/u/HKruenaegel)\
**Replies:** 1\
**Last updated:** [January 2, 2024, 8:23am UTC](https://discourse.julialang.org/t/access-variables-of-another-subsystem-in-a-callback/108248 "2024-01-02T08:23:13Z")

</div>

Is it possible to read a variable of another subsystem in a callback? For example if I want tu use decay2.u in a callback defined in decay1 in the following example code: using ModelingToolkit function affect!(integ,u,p…

---

## [Modifying the fields of an immutable struct](https://discourse.julialang.org/t/modifying-the-fields-of-an-immutable-struct/108224)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 5\
**Last updated:** [January 2, 2024, 7:07am UTC](https://discourse.julialang.org/t/modifying-the-fields-of-an-immutable-struct/108224 "2024-01-02T07:07:45Z")

</div>

I have defined a struct struct foo x y end Then I created a variable a = foo(\[1,2\], \[3,45\]) I got error with a.x= \[3,4\] ERROR: setfield!: immutable struct of type foo cannot be changed Stacktrace: \[1\] setpropert…

---

## [Reduce(logaddexp,x) has arbitrarily better accuracy than logsumexp(x)](https://discourse.julialang.org/t/reduce-logaddexp-x-has-arbitrarily-better-accuracy-than-logsumexp-x/108229)

<div class="topic-metadata">

**Author:** [@cdawg](https://discourse.julialang.org/u/cdawg)\
**Replies:** 11\
**Last updated:** [January 2, 2024, 4:01am UTC](https://discourse.julialang.org/t/reduce-logaddexp-x-has-arbitrarily-better-accuracy-than-logsumexp-x/108229 "2024-01-02T04:01:31Z")

</div>

It occurred to me this morning that logsumexp is associative and commutative and can be calculated with a simple reduce. We could write logsumexp(x) = reduce(logaddexp,x) Isn’t that pretty! So how does that compare t…

---

## [Meaning of 'x-\>a' in plotting](https://discourse.julialang.org/t/meaning-of-x-a-in-plotting/108241)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 1\
**Last updated:** [January 2, 2024, 2:51am UTC](https://discourse.julialang.org/t/meaning-of-x-a-in-plotting/108241 "2024-01-02T02:51:48Z")

</div>

This is from some script: plot!(x-\>se.mean, df.steps\[steps\_equilibrate+1:end\], ribbon=se.err, label="shift mean") What does the syntax ‘-\>’ mean here?

---

## [Surrogates.jl - RBF surrogate issues](https://discourse.julialang.org/t/surrogates-jl-rbf-surrogate-issues/108198)

<div class="topic-metadata">

**Author:** [@Obtuya7](https://discourse.julialang.org/u/Obtuya7)\
**Replies:** 5\
**Last updated:** [January 1, 2024, 10:12pm UTC](https://discourse.julialang.org/t/surrogates-jl-rbf-surrogate-issues/108198 "2024-01-01T22:12:24Z")

</div>

Hello, I’m running into an issue with the Surrogates.jl RBF models. I’m attempting to generate surfaces with 25 sample points using various surrogate modeling techniques. I was able to generate the GPR surfaces without…

---

## [Base.throwto() blocking perpetually](https://discourse.julialang.org/t/base-throwto-blocking-perpetually/108237)

<div class="topic-metadata">

**Author:** [@JoO0oss](https://discourse.julialang.org/u/JoO0oss)\
**Replies:** 1\
**Last updated:** [January 1, 2024, 10:00pm UTC](https://discourse.julialang.org/t/base-throwto-blocking-perpetually/108237 "2024-01-01T22:00:44Z")

</div>

I recently found that throwto() never returns, it just hangs (see this GitHub issue) and constructed a little demo: task = @async begin while true print("-") end end sleep(0.003) println("Throwing...")…

---

## [PreallocationTools.jl with nested ForwardDiff and sparsity pattern detection errors](https://discourse.julialang.org/t/preallocationtools-jl-with-nested-forwarddiff-and-sparsity-pattern-detection-errors/107897)

<div class="topic-metadata">

**Author:** [@asterycs](https://discourse.julialang.org/u/asterycs)\
**Replies:** 6\
**Last updated:** [January 1, 2024, 9:05pm UTC](https://discourse.julialang.org/t/preallocationtools-jl-with-nested-forwarddiff-and-sparsity-pattern-detection-errors/107897 "2024-01-01T21:05:57Z")

</div>

Hello! I’m trying to combine sparsity pattern detection with a nested ForwardDiff call together with PreallocationTools. A contrived, minimal example is below: using ForwardDiff using PreallocationTools using Symbolics…

---

## [Why does juliaup delete the old versions?](https://discourse.julialang.org/t/why-does-juliaup-delete-the-old-versions/108193)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 10\
**Last updated:** [January 1, 2024, 7:44pm UTC](https://discourse.julialang.org/t/why-does-juliaup-delete-the-old-versions/108193 "2024-01-01T19:44:54Z")

</div>

I started with this: $ juliaup status Default Channel Version Update ------------------------------------------------------------------------------------------…

---

## [Error with multiple extensions - related to \_\_init\_\_()?](https://discourse.julialang.org/t/error-with-multiple-extensions-related-to-init/108196)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 5\
**Last updated:** [January 1, 2024, 5:40pm UTC](https://discourse.julialang.org/t/error-with-multiple-extensions-related-to-init/108196 "2024-01-01T17:40:09Z")

</div>

Why is \_\_init\_\_() for a package called during precompilation of package extensions? I thought (from the docs) that \_\_init\_\_() would only be called when the module was loaded with using or \`import? The reason for the que…

---

## [Stipple with Apache mod\_rewrite front-end](https://discourse.julialang.org/t/stipple-with-apache-mod-rewrite-front-end/108228)

<div class="topic-metadata">

**Author:** [@grahamstark](https://discourse.julialang.org/u/grahamstark)\
**Replies:** 0\
**Last updated:** [January 1, 2024, 12:16pm UTC](https://discourse.julialang.org/t/stipple-with-apache-mod-rewrite-front-end/108228 "2024-01-01T12:16:36Z")

</div>

Hi, Can anyone share with me an example of a reactive Stipple app using Apache with mod-rewrite as a front end? I already have a Genie server using rewrite and Apache, but that’s just a back-end, and I’d like to stick t…

---

## [Happy 2024 to the Julia community](https://discourse.julialang.org/t/happy-2024-to-the-julia-community/108217)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [January 1, 2024, 3:36pm UTC](https://discourse.julialang.org/t/happy-2024-to-the-julia-community/108217 "2024-01-01T15:36:19Z")

</div>

As a long term Linux user, I’m not going so far to say “2024 will be the year of Julia”, but still I would like to make my best wishes to the Julia community for great achievements in 2024. Happy new year from Nancy!

---

## [\[ANN\] KeplerGL.jl: Geospatial Visualization via Kepler.gl](https://discourse.julialang.org/t/ann-keplergl-jl-geospatial-visualization-via-kepler-gl/108040)

<div class="topic-metadata">

**Author:** [@jmboehm](https://discourse.julialang.org/u/jmboehm)\
**Replies:** 3\
**Last updated:** [January 1, 2024, 1:54pm UTC](https://discourse.julialang.org/t/ann-keplergl-jl-geospatial-visualization-via-kepler-gl/108040 "2024-01-01T13:54:56Z")

</div>

Dear all, Following some merry christmas hacking, I’m happy to announce a prototype of KeplerGL.jl, a package to provide an interface to the javascript library Kepler.gl. Kepler.gl provides an easy-to-use platform t…

---

## [Problem with parametric composite types](https://discourse.julialang.org/t/problem-with-parametric-composite-types/108222)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 5\
**Last updated:** [January 1, 2024, 11:13am UTC](https://discourse.julialang.org/t/problem-with-parametric-composite-types/108222 "2024-01-01T11:13:10Z")

</div>

I defined a type: struct Point{T} x :: T y :: T end Then when I tried to construct an variable b = Point(1.0, 2) I got ERROR: MethodError: no method matching Point(::Float64, ::Int64) Closest candidates are: P…

---

## [Are StaticArrays always faster?](https://discourse.julialang.org/t/are-staticarrays-always-faster/108225)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 2\
**Last updated:** [January 1, 2024, 10:07am UTC](https://discourse.julialang.org/t/are-staticarrays-always-faster/108225 "2024-01-01T10:07:31Z")

</div>

I was under the impression that StaticArrays or operations that involve SMatrix are faster than the non Static counterparts. To test this out I wrote a small code that does matrix-multiplication related computations of a…

---

## [What is the difference between copy() and deepcopy()?](https://discourse.julialang.org/t/what-is-the-difference-between-copy-and-deepcopy/3918)

<div class="topic-metadata">

**Author:** [@leejm516](https://discourse.julialang.org/u/leejm516)\
**Replies:** 7\
**Last updated:** [January 1, 2024, 5:39am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-copy-and-deepcopy/3918 "2024-01-01T05:39:44Z")

</div>

julia\> a = \[1,2,3,4\]; julia\> b = a; julia\> a\[1\] = 4; julia\> b 4-element Array{Int64,1}: 4 2 3 4 This is the shallow copy AFAIK. But at a glance, I couldn’t find clear differences between copy() and deepcopy(), alth…

---

## [Why \`front\` and \`tail\` are defined for only \`Tuple\`?](https://discourse.julialang.org/t/why-front-and-tail-are-defined-for-only-tuple/101961)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 11\
**Last updated:** [January 1, 2024, 2:15am UTC](https://discourse.julialang.org/t/why-front-and-tail-are-defined-for-only-tuple/101961 "2024-01-01T02:15:47Z")

</div>

https://docs.julialang.org/en/v1/base/collections/#Base.front I expect below, but MethodError raised: julia\> x = \[3, 5, 7, 4, 0, 9\]; julia\> Base.front(x) \[3,5,7,4,0\] Of course x\[Not(end)\] is also great choice if we ar…

---

## [How to tweak dodge bar plot's label position of AOG](https://discourse.julialang.org/t/how-to-tweak-dodge-bar-plots-label-position-of-aog/108221)

<div class="topic-metadata">

**Author:** [@math4mad](https://discourse.julialang.org/u/math4mad)\
**Replies:** 0\
**Last updated:** [January 1, 2024, 1:26am UTC](https://discourse.julialang.org/t/how-to-tweak-dodge-bar-plots-label-position-of-aog/108221 "2024-01-01T01:26:33Z")

</div>

I want to clone this chart : Views about AI’s impact on society in the next 20 years, 2021 here is my code using Tidier, DataFrames, CSV, AlgebraOfGraphics, Pipe countrys = \["Japan", "China", "Germany", "France"\] c…

---

## [How to mitigate bad performance of eigvals from LinearAlgebra](https://discourse.julialang.org/t/how-to-mitigate-bad-performance-of-eigvals-from-linearalgebra/108210)

<div class="topic-metadata">

**Author:** [@Paradox](https://discourse.julialang.org/u/Paradox)\
**Replies:** 3\
**Last updated:** [January 1, 2024, 1:11am UTC](https://discourse.julialang.org/t/how-to-mitigate-bad-performance-of-eigvals-from-linearalgebra/108210 "2024-01-01T01:11:41Z")

</div>

Dear all, I am trying to rewrite my Matlab code that calculates certain band structure to Julia. Unfortunately, I am unable to get close to the performance of Matlab code for some reason that I don’t understand. I will …

---

## [How to help reduce package load latency?](https://discourse.julialang.org/t/how-to-help-reduce-package-load-latency/105294)

<div class="topic-metadata">

**Author:** [@orebas](https://discourse.julialang.org/u/orebas)\
**Replies:** 38\
**Last updated:** [December 31, 2023, 11:57pm UTC](https://discourse.julialang.org/t/how-to-help-reduce-package-load-latency/105294 "2023-12-31T23:57:51Z")

</div>

In an effort to reduce package load latency for a slow loading package,I successfully added some precompilation (via @compile\_workload) and it had the desired effect. However, some dependencies are very slow as well, an…

---

## [AutoMerge fails](https://discourse.julialang.org/t/automerge-fails/108212)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 5\
**Last updated:** [December 31, 2023, 5:54pm UTC](https://discourse.julialang.org/t/automerge-fails/108212 "2023-12-31T17:54:20Z")

</div>

I get this message: When I look at the build, I can see that Julia 1.9.4 is running it: And I think that is the reason why the process fails: I think this should be run in 1.10.0 (which was recently released). …

---

## [SIGVIEW - interface with DAQ via JULIA](https://discourse.julialang.org/t/sigview-interface-with-daq-via-julia/108202)

<div class="topic-metadata">

**Author:** [@Jawad\_Malik](https://discourse.julialang.org/u/Jawad_Malik)\
**Replies:** 8\
**Last updated:** [December 31, 2023, 5:46pm UTC](https://discourse.julialang.org/t/sigview-interface-with-daq-via-julia/108202 "2023-12-31T17:46:51Z")

</div>

I am working on a Condition Based Monitoring System for a small Marine Vessel. Need a FFT Software at the end of the line to keep a check on the Diesel Engines. I have four sets of Piezo + DAQ to pick up vibrations; 24…

---

## [Convert variable vs. hardcode allocations/time](https://discourse.julialang.org/t/convert-variable-vs-hardcode-allocations-time/108211)

<div class="topic-metadata">

**Author:** [@mattsignorelli](https://discourse.julialang.org/u/mattsignorelli)\
**Replies:** 2\
**Last updated:** [December 31, 2023, 5:34pm UTC](https://discourse.julialang.org/t/convert-variable-vs-hardcode-allocations-time/108211 "2023-12-31T17:34:07Z")

</div>

Alright, I’m sure there’s a good answer for this, but I am perplexed. julia\> using BenchmarkTools: @btime julia\> @btime convert(Float64, 5) 0.964 ns (0 allocations: 0 bytes) 5.0 julia\> a = 5 5 julia\> @btime convert…

---

## [Does Julia Create a "1.5" Language Problem?](https://discourse.julialang.org/t/does-julia-create-a-1-5-language-problem/107984)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 132\
**Last updated:** [December 31, 2023, 3:26pm UTC](https://discourse.julialang.org/t/does-julia-create-a-1-5-language-problem/107984 "2023-12-31T15:26:56Z")

</div>

I just watch intriguing talk Julia solves the 2 language problem, however it creates the 1.5 language problem. Outside fundamental problem raised by this video “When we will be able to run Julia on washing machine?” (I’m…

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

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