# Latest

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

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

**Page:** 314

---

## [Custom show for a struct that contains matrix](https://discourse.julialang.org/t/custom-show-for-a-struct-that-contains-matrix/119816)

<div class="topic-metadata">

**Author:** [@azoviktor](https://discourse.julialang.org/u/azoviktor)\
**Replies:** 10\
**Last updated:** [September 25, 2024, 9:51am UTC](https://discourse.julialang.org/t/custom-show-for-a-struct-that-contains-matrix/119816 "2024-09-25T09:51:23Z")

</div>

Suppose I have a struct struct Box size::Int matrix::Matrix{ComplexF64} end and my aim is to implement a custom show method for a Box that will display its matrix in a nice rectangle form (not printing all the el…

---

## [Makie: how to plot/draw above axis splines?](https://discourse.julialang.org/t/makie-how-to-plot-draw-above-axis-splines/119850)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 1\
**Last updated:** [September 25, 2024, 9:14am UTC](https://discourse.julialang.org/t/makie-how-to-plot-draw-above-axis-splines/119850 "2024-09-25T09:14:06Z")

</div>

I have this plot: the markers with white stroke are scatter! plot. How do I make them plot above the axis splines so that they are shown in full instead of being cut out by the axis? The keyword overdraw = true does…

---

## [Is there a strong case that Julia is a more composable language?](https://discourse.julialang.org/t/is-there-a-strong-case-that-julia-is-a-more-composable-language/118554)

<div class="topic-metadata">

**Author:** [@alex-s-gardner](https://discourse.julialang.org/u/alex-s-gardner)\
**Replies:** 25\
**Last updated:** [September 25, 2024, 8:13am UTC](https://discourse.julialang.org/t/is-there-a-strong-case-that-julia-is-a-more-composable-language/118554 "2024-09-25T08:13:49Z")

</div>

Is there a strong argument for why Julia inherently provides a more composable eco system relative to python and other major science ML languages? Wanting to know for grant application to support development (by others). …

---

## [Known disturbances in JuliaSimControl MPC](https://discourse.julialang.org/t/known-disturbances-in-juliasimcontrol-mpc/119810)

<div class="topic-metadata">

**Author:** [@bertrand](https://discourse.julialang.org/u/bertrand)\
**Replies:** 3\
**Last updated:** [September 25, 2024, 8:00am UTC](https://discourse.julialang.org/t/known-disturbances-in-juliasimcontrol-mpc/119810 "2024-09-25T08:00:49Z")

</div>

Hi, I’m writing an MPC with known external disturbances using JuliaSimControl. I’m currently passing the known disturbances w as part of the parameter vector into the dynamics function, i.e. function dynamics(x, u, p,…

---

## [POMDPs.jl action(mdp,initial\_state) doesnt return expected/correct action](https://discourse.julialang.org/t/pomdps-jl-action-mdp-initial-state-doesnt-return-expected-correct-action/119838)

<div class="topic-metadata">

**Author:** [@MindFullOfLettuce](https://discourse.julialang.org/u/MindFullOfLettuce)\
**Replies:** 1\
**Last updated:** [September 25, 2024, 12:10am UTC](https://discourse.julialang.org/t/pomdps-jl-action-mdp-initial-state-doesnt-return-expected-correct-action/119838 "2024-09-25T00:10:04Z")

</div>

Hi, I’m doing: (s is initial state) sim = RolloutSimulator() r = simulate(sim, mdp, policy,s) but the selected actions during simulate aren’t correct and don’t go by the POMDPs.actions functions that I implemented …

---

## [How to create a wrapper package](https://discourse.julialang.org/t/how-to-create-a-wrapper-package/119605)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 5\
**Last updated:** [September 25, 2024, 7:56am UTC](https://discourse.julialang.org/t/how-to-create-a-wrapper-package/119605 "2024-09-25T07:56:48Z")

</div>

I’m interested in using HJSON but it’s quite annoying to run hjson every time and create a json file that I can then read with JSON3. How would I go about creating a HJSON.jl such that I can do the conversion inside juli…

---

## [Integrating Plots into a package](https://discourse.julialang.org/t/integrating-plots-into-a-package/119599)

<div class="topic-metadata">

**Author:** [@tduretz](https://discourse.julialang.org/u/tduretz)\
**Replies:** 8\
**Last updated:** [September 25, 2024, 6:51am UTC](https://discourse.julialang.org/t/integrating-plots-into-a-package/119599 "2024-09-25T06:51:13Z")

</div>

Hi everyone, I recently started with the development of ExactFieldSolutions. The package aims at providing full-field exact solutions for various PDEs, which can then be used for verifying the accuracy of numerical so…

---

## [Implementing inexact Newton solves in NonlinearSolve.jl](https://discourse.julialang.org/t/implementing-inexact-newton-solves-in-nonlinearsolve-jl/119844)

<div class="topic-metadata">

**Author:** [@mpf01](https://discourse.julialang.org/u/mpf01)\
**Replies:** 2\
**Last updated:** [September 25, 2024, 5:55am UTC](https://discourse.julialang.org/t/implementing-inexact-newton-solves-in-nonlinearsolve-jl/119844 "2024-09-25T05:55:59Z")

</div>

I’d like to implement inexact Newton solves using NonlinearSolve.jl. The output from this code snippet (shown below) suggests that, by default, each Newton equation is solved to a fixed accuracy. nlcache = init( pro…

---

## [Best way to configure a project-dependent PyCall dependency?](https://discourse.julialang.org/t/best-way-to-configure-a-project-dependent-pycall-dependency/119802)

<div class="topic-metadata">

**Author:** [@Gabrio\_Rizzuti](https://discourse.julialang.org/u/Gabrio_Rizzuti)\
**Replies:** 2\
**Last updated:** [September 25, 2024, 2:54am UTC](https://discourse.julialang.org/t/best-way-to-configure-a-project-dependent-pycall-dependency/119802 "2024-09-25T02:54:35Z")

</div>

First of all, sorry if this too much of a basic question, but I coudn’t find an answer despite multiple searches. I’m trying to develop a glue package that exposes some Python functionalities to Julia. Simple stuff. I …

---

## [Warning about variable conflict from module export?](https://discourse.julialang.org/t/warning-about-variable-conflict-from-module-export/119841)

<div class="topic-metadata">

**Author:** [@aaoo](https://discourse.julialang.org/u/aaoo)\
**Replies:** 2\
**Last updated:** [September 25, 2024, 2:42am UTC](https://discourse.julialang.org/t/warning-about-variable-conflict-from-module-export/119841 "2024-09-25T02:42:37Z")

</div>

This may not work in v"1.10", got a warning on name conflicts. julia\> module Foo x = 1 y = 2 for n in names(@\_\_MODULE\_\_; all=true) if Base.isidentifier(n) && n ∉ (…

---

## [Performance issues with Turing and NUTS](https://discourse.julialang.org/t/performance-issues-with-turing-and-nuts/119749)

<div class="topic-metadata">

**Author:** [@Benjamin\_Zanger](https://discourse.julialang.org/u/Benjamin_Zanger)\
**Replies:** 4\
**Last updated:** [September 24, 2024, 10:08pm UTC](https://discourse.julialang.org/t/performance-issues-with-turing-and-nuts/119749 "2024-09-24T22:08:16Z")

</div>

Hello, I am new to Turing and try to do MCMC sampling from a simple linear forward model with gaussian prior. I got the following model: A = randn(20, 1000) m = size(A, 1) n = size(A, 2) x\_true = randn(n) σ\_prior = 0…

---

## [Does length(itr) need to be invariant? (stateful iterator)](https://discourse.julialang.org/t/does-length-itr-need-to-be-invariant-stateful-iterator/118170)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [September 24, 2024, 8:49pm UTC](https://discourse.julialang.org/t/does-length-itr-need-to-be-invariant-stateful-iterator/118170 "2024-09-24T20:49:54Z")

</div>

I have a calculation that tracks a large state for a cohort of economic agents that have a finite lifetime. A certain summary statistic is implemented with the iteration protocol. If you imagine c below to be something …

---

## [Using GLFW with wayland](https://discourse.julialang.org/t/using-glfw-with-wayland/119826)

<div class="topic-metadata">

**Author:** [@rightleftspin](https://discourse.julialang.org/u/rightleftspin)\
**Replies:** 2\
**Last updated:** [September 24, 2024, 8:03pm UTC](https://discourse.julialang.org/t/using-glfw-with-wayland/119826 "2024-09-24T20:03:50Z")

</div>

I’ve been struggling with this for the past few days, hopefully this is the right place to put it. I have a simple piece of code using a library (Sunny) that depends on GLMakie. However, when I run this code, I just get …

---

## [How to loop through all the species and write additional reactions based on that](https://discourse.julialang.org/t/how-to-loop-through-all-the-species-and-write-additional-reactions-based-on-that/115438)

<div class="topic-metadata">

**Author:** [@Wenzhe\_Ma](https://discourse.julialang.org/u/Wenzhe_Ma)\
**Replies:** 2\
**Last updated:** [September 24, 2024, 7:52pm UTC](https://discourse.julialang.org/t/how-to-loop-through-all-the-species-and-write-additional-reactions-based-on-that/115438 "2024-09-24T19:52:15Z")

</div>

What I want to do is to build a few models based on ReactionSystem in Catalyst.jl, named as m1, m2… Each of them has some common species s1, s2… I want to have a function with m1, m2 as arguments, which will automaticall…

---

## [Optimizing sums of products (dot products)](https://discourse.julialang.org/t/optimizing-sums-of-products-dot-products/119515)

<div class="topic-metadata">

**Author:** [@s-baumann](https://discourse.julialang.org/u/s-baumann)\
**Replies:** 17\
**Last updated:** [September 24, 2024, 7:40pm UTC](https://discourse.julialang.org/t/optimizing-sums-of-products-dot-products/119515 "2024-09-24T19:40:11Z")

</div>

Is there a way to avoid the intermediate allocation for a sumproduct scenario? In the following case I can redo it with a for loop which improves the memory allocation but causes it to take longer to execute (the differ…

---

## [How to create permutation of named tuple values](https://discourse.julialang.org/t/how-to-create-permutation-of-named-tuple-values/119821)

<div class="topic-metadata">

**Author:** [@alex-s-gardner](https://discourse.julialang.org/u/alex-s-gardner)\
**Replies:** 2\
**Last updated:** [September 24, 2024, 6:17pm UTC](https://discourse.julialang.org/t/how-to-create-permutation-of-named-tuple-values/119821 "2024-09-24T18:17:12Z")

</div>

how can I write a generic function to generate permutations of arbitrary named tuple values this is what I currently do catagory0 = \[1,3,4\] letter0 = \["a", "b", "c"\] score0 = \[1.1, 4.\] thing0 = \["hat", "c…

---

## [Questions about a starting language, is Julia good (enough)](https://discourse.julialang.org/t/questions-about-a-starting-language-is-julia-good-enough/119731)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 7\
**Last updated:** [September 24, 2024, 5:29pm UTC](https://discourse.julialang.org/t/questions-about-a-starting-language-is-julia-good-enough/119731 "2024-09-24T17:29:41Z")

</div>

Hello, I am a beginner who wants to choose a suitable programming language. I searched on the internet and I know that there are many programming languages. To be honest, Python was praised everywhere and I don’t like t…

---

## [Multipage Stipple webapp](https://discourse.julialang.org/t/multipage-stipple-webapp/67852)

<div class="topic-metadata">

**Author:** [@julien\_goo](https://discourse.julialang.org/u/julien_goo)\
**Replies:** 9\
**Last updated:** [September 24, 2024, 3:58pm UTC](https://discourse.julialang.org/t/multipage-stipple-webapp/67852 "2024-09-24T15:58:32Z")

</div>

Hi all, Is it possible to have multipage apps based on Stipple? Not necessarily with different url, but with a clickable menu just like a Shinydashboard does with the R Shiny framework. I bet there is a strong interest…

---

## [Interactive plucked string simulator](https://discourse.julialang.org/t/interactive-plucked-string-simulator/119747)

<div class="topic-metadata">

**Author:** [@LeePhillips](https://discourse.julialang.org/u/LeePhillips)\
**Replies:** 3\
**Last updated:** [September 24, 2024, 3:06pm UTC](https://discourse.julialang.org/t/interactive-plucked-string-simulator/119747 "2024-09-24T15:06:47Z")

</div>

I wanted to experiment with using Julia as a back end for an interactive web thing, communicating over websockets. The result is at The Plucked String. I found that combining HTMX on the front end with the HTTP.jl webso…

---

## [How to call PythonCall.jl behind a julia HTTP webserver?](https://discourse.julialang.org/t/how-to-call-pythoncall-jl-behind-a-julia-http-webserver/119563)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 2\
**Last updated:** [September 24, 2024, 2:09pm UTC](https://discourse.julialang.org/t/how-to-call-pythoncall-jl-behind-a-julia-http-webserver/119563 "2024-09-24T14:09:21Z")

</div>

Hi there, I am wondering how I could use langchain from Python as part of a webserver. I am running into segmenation faults certainly due to multithreading. Does someone know a way whether the new @unlock and @lock are …

---

## [Flux slows down by 10x when moving from local system to high performance cluster](https://discourse.julialang.org/t/flux-slows-down-by-10x-when-moving-from-local-system-to-high-performance-cluster/119753)

<div class="topic-metadata">

**Author:** [@SGHoekstra](https://discourse.julialang.org/u/SGHoekstra)\
**Replies:** 10\
**Last updated:** [September 24, 2024, 12:15pm UTC](https://discourse.julialang.org/t/flux-slows-down-by-10x-when-moving-from-local-system-to-high-performance-cluster/119753 "2024-09-24T12:15:38Z")

</div>

Hi everyone, I am using Flux to solve a nonstandard optimisation problem with custom loss. The solution is part a of a larger simulation which I run many times (100,000+) so speed is key. When I try to run my script o…

---

## [How to add a legend to a figure with only a \`(fig, ax)\` tuple in hand?](https://discourse.julialang.org/t/how-to-add-a-legend-to-a-figure-with-only-a-fig-ax-tuple-in-hand/119795)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 6\
**Last updated:** [September 24, 2024, 8:51am UTC](https://discourse.julialang.org/t/how-to-add-a-legend-to-a-figure-with-only-a-fig-ax-tuple-in-hand/119795 "2024-09-24T08:51:27Z")

</div>

I only have a (fig, ax) tuple of a figure in hand. Now I want to add a legend for this figure. How can I do? julia\> fig, ax (Scene (600px, 450px): 0 Plots 1 Child Scene: └ Scene (600px, 450px), Axis (5 plots)) …

---

## [Why can I import a package not in my environment?](https://discourse.julialang.org/t/why-can-i-import-a-package-not-in-my-environment/119799)

<div class="topic-metadata">

**Author:** [@Alseidon](https://discourse.julialang.org/u/Alseidon)\
**Replies:** 2\
**Last updated:** [September 24, 2024, 8:35am UTC](https://discourse.julialang.org/t/why-can-i-import-a-package-not-in-my-environment/119799 "2024-09-24T08:35:38Z")

</div>

In an ongoing effort to be a bit cleaner in my environments and cleaning up my default env, I encountered a situation I do not understand: even though Plots isn’t added to the current environment, I can still import it. …

---

## [JSON.jl Float64 serialization (suppress scientific notation)](https://discourse.julialang.org/t/json-jl-float64-serialization-suppress-scientific-notation/119775)

<div class="topic-metadata">

**Author:** [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Replies:** 0\
**Last updated:** [September 23, 2024, 9:04pm UTC](https://discourse.julialang.org/t/json-jl-float64-serialization-suppress-scientific-notation/119775 "2024-09-23T21:04:35Z")

</div>

I am having a hard time with JSON.jl. I want to serialize large Float64 instances without scientific notation and the only way I was able to get at least the rounding working results in a string, instead of a float value…

---

## [SciLean language: Interactive and mathematicaly sound code transformations](https://discourse.julialang.org/t/scilean-language-interactive-and-mathematicaly-sound-code-transformations/81101)

<div class="topic-metadata">

**Author:** [@TomasSkrivan](https://discourse.julialang.org/u/TomasSkrivan)\
**Replies:** 7\
**Last updated:** [September 24, 2024, 8:13am UTC](https://discourse.julialang.org/t/scilean-language-interactive-and-mathematicaly-sound-code-transformations/81101 "2024-09-24T08:13:10Z")

</div>

For quite some time I have been playing around with the idea what the next generation scientific computing language might look like and I would like to share my prototype. Mainly because Julia users are the kind of peopl…

---

## [ModelPredictiveControl.jl vs JuliaSimControl](https://discourse.julialang.org/t/modelpredictivecontrol-jl-vs-juliasimcontrol/119496)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 10\
**Last updated:** [September 24, 2024, 6:52am UTC](https://discourse.julialang.org/t/modelpredictivecontrol-jl-vs-juliasimcontrol/119496 "2024-09-24T06:52:02Z")

</div>

What would be the advantages / disadvantages of using ModelPredictiveControl.jl over JuliaSimControl? I am trying to decide which one to use, and these were the first two packages I found.

---

## [PowerModels active and reactive power demand](https://discourse.julialang.org/t/powermodels-active-and-reactive-power-demand/119787)

<div class="topic-metadata">

**Author:** [@Glon](https://discourse.julialang.org/u/Glon)\
**Replies:** 2\
**Last updated:** [September 24, 2024, 6:27am UTC](https://discourse.julialang.org/t/powermodels-active-and-reactive-power-demand/119787 "2024-09-24T06:27:14Z")

</div>

Hello all, I am new to Julia and I am trying to run an acopf problem, but having trouble on how to loop it for a whole day. I have the active and reactive power demand at each bus for every 30 minutes. Below is the code…

---

## [Considering water head in SDDP.jl](https://discourse.julialang.org/t/considering-water-head-in-sddp-jl/119779)

<div class="topic-metadata">

**Author:** [@Sorooshsa](https://discourse.julialang.org/u/Sorooshsa)\
**Replies:** 1\
**Last updated:** [September 24, 2024, 3:34am UTC](https://discourse.julialang.org/t/considering-water-head-in-sddp-jl/119779 "2024-09-24T03:34:14Z")

</div>

Hi everyone, I’m using SDDP.jl to model hydropower production and want to include the effect of water head in the production constraint, which is typically formulated as P = release×water head×efficiency parameter. He…

---

## [Creating orthogonality constraints in JuMP](https://discourse.julialang.org/t/creating-orthogonality-constraints-in-jump/47462)

<div class="topic-metadata">

**Author:** [@jbmuir](https://discourse.julialang.org/u/jbmuir)\
**Replies:** 3\
**Last updated:** [September 24, 2024, 3:14am UTC](https://discourse.julialang.org/t/creating-orthogonality-constraints-in-jump/47462 "2024-09-24T03:14:26Z")

</div>

I’m trying to impose some orthogonality constraints for an optimal design problem in JuMP; since these are nonlinear vector constraints I believe that I have to use the @NLconstraint macro with splatting. I can’t quite f…

---

## [Marking threads as duplicates](https://discourse.julialang.org/t/marking-threads-as-duplicates/119782)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 0\
**Last updated:** [September 24, 2024, 12:50am UTC](https://discourse.julialang.org/t/marking-threads-as-duplicates/119782 "2024-09-24T00:50:37Z")

</div>

Is there a Discourse feature to mark posts as duplicates? We often see the same questions asked over and over by new users. It would be nice to have something similar to StackOverflow. Example:

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

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