# Latest

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

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

**Page:** 436

---

## [Colours from a \[0,1\] float?](https://discourse.julialang.org/t/colours-from-a-0-1-float/112866)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [April 12, 2024, 11:10am UTC](https://discourse.julialang.org/t/colours-from-a-0-1-float/112866 "2024-04-12T11:10:00Z")

</div>

I have some data that I want to represent in a histogram with a different colour of the bin that depends on a float in the 0,1 range. I can see I can pass to the histogram call a colour parameter with the vector of colo…

---

## [What is the design and proper usage of functions in Base that starts with underscore?](https://discourse.julialang.org/t/what-is-the-design-and-proper-usage-of-functions-in-base-that-starts-with-underscore/112868)

<div class="topic-metadata">

**Author:** [@jsjie](https://discourse.julialang.org/u/jsjie)\
**Replies:** 2\
**Last updated:** [April 12, 2024, 11:03am UTC](https://discourse.julialang.org/t/what-is-the-design-and-proper-usage-of-functions-in-base-that-starts-with-underscore/112868 "2024-04-12T11:03:19Z")

</div>

I’ve found HDF5.jl breaks for Vector of String in 1.10.2 (not really, see below). The reason is, Base.\_memcpy! is removed from julia/base/reinterpretarray.jl, which is used in \_type\_load in HDF5.jl. I’ve checked Base.\_m…

---

## [Solving type instability when using Graphs.jl](https://discourse.julialang.org/t/solving-type-instability-when-using-graphs-jl/112862)

<div class="topic-metadata">

**Author:** [@alemelis](https://discourse.julialang.org/u/alemelis)\
**Replies:** 4\
**Last updated:** [April 12, 2024, 10:50am UTC](https://discourse.julialang.org/t/solving-type-instability-when-using-graphs-jl/112862 "2024-04-12T10:50:56Z")

</div>

This is the flame plot I get when profiling my iterative solver. You can see it’s pointed by tiny red blocks, which I’m trying to address one by one. In particular I’m now looking at the one highlighted by the red a…

---

## [Attaching leads to honeycomb lattice](https://discourse.julialang.org/t/attaching-leads-to-honeycomb-lattice/111304)

<div class="topic-metadata">

**Author:** [@alex123](https://discourse.julialang.org/u/alex123)\
**Replies:** 6\
**Last updated:** [April 12, 2024, 9:30am UTC](https://discourse.julialang.org/t/attaching-leads-to-honeycomb-lattice/111304 "2024-04-12T09:30:41Z")

</div>

Hi, I am trying to attach leads with a honeycomb basis to a honeycomb lattice, and can’t seem to understand why my code doesn’t work, I don’t really understand the logic of attaching the lead (and how the r variable is …

---

## [Versioning reproducibility with upgradeable stdlibs?](https://discourse.julialang.org/t/versioning-reproducibility-with-upgradeable-stdlibs/112839)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 2\
**Last updated:** [April 12, 2024, 9:15am UTC](https://discourse.julialang.org/t/versioning-reproducibility-with-upgradeable-stdlibs/112839 "2024-04-12T09:15:29Z")

</div>

I guess this has been considered already, but I just realized this trend means that “I have this problem in Julia 1.x” and “I can’t reproduce in Julia 1.y” will be much less meaningful in the future…

---

## [Example of Clang.jl wrapping C interface using GMP mpq\_t (also arrays of mpq\_t)](https://discourse.julialang.org/t/example-of-clang-jl-wrapping-c-interface-using-gmp-mpq-t-also-arrays-of-mpq-t/112864)

<div class="topic-metadata">

**Author:** [@JonT](https://discourse.julialang.org/u/JonT)\
**Replies:** 0\
**Last updated:** [April 12, 2024, 9:12am UTC](https://discourse.julialang.org/t/example-of-clang-jl-wrapping-c-interface-using-gmp-mpq-t-also-arrays-of-mpq-t/112864 "2024-04-12T09:12:22Z")

</div>

I’m stumbling through wrapping an interface to a C library using Clang.jl. Im hoping someone can. give me some hints about the best way to wrap methods passing and returning GMP mpq\_t types, or arrays of them. I found …

---

## [Blind destructuring of a tuple/NamedTuple?](https://discourse.julialang.org/t/blind-destructuring-of-a-tuple-namedtuple/112861)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 6\
**Last updated:** [April 12, 2024, 8:49am UTC](https://discourse.julialang.org/t/blind-destructuring-of-a-tuple-namedtuple/112861 "2024-04-12T08:49:52Z")

</div>

Hello! Could someone show me a way to achieve this: v = (x=1, y=2) @destructure v println("x = $x, y = $y") Basically I want through a macro or some other way, to be able to take all the pairs/values in a tuple and…

---

## [\[ANN\] PkgToSoftwareBOM v0.1.10: Package License now included in the SBOM](https://discourse.julialang.org/t/ann-pkgtosoftwarebom-v0-1-10-package-license-now-included-in-the-sbom/112856)

<div class="topic-metadata">

**Author:** [@SamuraiAku](https://discourse.julialang.org/u/SamuraiAku)\
**Replies:** 0\
**Last updated:** [April 12, 2024, 6:02am UTC](https://discourse.julialang.org/t/ann-pkgtosoftwarebom-v0-1-10-package-license-now-included-in-the-sbom/112856 "2024-04-12T06:02:43Z")

</div>

Version 0.1.10 of the PkgToSoftwareBOM.jl package has been released. PkgToSoftwareBOM.jl produces a Software Bill of Materials (SBOM) describing your Julia environment. At this time, the SBOM produced is in the (SPDX) …

---

## [Wayland\_protocols\_jll install tree hash error](https://discourse.julialang.org/t/wayland-protocols-jll-install-tree-hash-error/112816)

<div class="topic-metadata">

**Author:** [@JeffFessler](https://discourse.julialang.org/u/JeffFessler)\
**Replies:** 15\
**Last updated:** [April 12, 2024, 5:54am UTC](https://discourse.julialang.org/t/wayland-protocols-jll-install-tree-hash-error/112816 "2024-04-12T05:54:07Z")

</div>

I am trying to install Gtk on linux (RedHatEnterprise 8.8) with Julia 1.10.2 from a clean slate (I purged ~/.julia) and add fails when fetching “Wayland\_protocols\_jll” So I tried simply \]add Wayland\_protocols\_jll and th…

---

## [Implementation of algorithms ODE Problems differentialequations.jl](https://discourse.julialang.org/t/implementation-of-algorithms-ode-problems-differentialequations-jl/112840)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 2\
**Last updated:** [April 12, 2024, 5:45am UTC](https://discourse.julialang.org/t/implementation-of-algorithms-ode-problems-differentialequations-jl/112840 "2024-04-12T05:45:01Z")

</div>

Hello! Where i can find implementation of algorithms ODE Problems differentialequations.jl in repository? For example Vern9. Thank you for your help!

---

## [Allocation-free higher-order derivatives of R^n-\>R](https://discourse.julialang.org/t/allocation-free-higher-order-derivatives-of-r-n-r/112829)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [April 12, 2024, 3:26am UTC](https://discourse.julialang.org/t/allocation-free-higher-order-derivatives-of-r-n-r/112829 "2024-04-12T03:26:16Z")

</div>

This question describes a particular AD application, I am either looking for a solution, someone telling me why it is not a good idea, or potential collaborators who are interested in the same problem, which comes up fre…

---

## [ExaModels.jl and MadNLP.jl on GPUs](https://discourse.julialang.org/t/examodels-jl-and-madnlp-jl-on-gpus/111377)

<div class="topic-metadata">

**Author:** [@sshin23](https://discourse.julialang.org/u/sshin23)\
**Replies:** 0\
**Last updated:** [March 8, 2024, 8:09pm UTC](https://discourse.julialang.org/t/examodels-jl-and-madnlp-jl-on-gpus/111377 "2024-03-08T20:09:16Z")

</div>

ExaModels and MadNLP: Solving Large-Scale Nonlinear Programs on GPUs We are pleased to announce that ExaModels v0.6 and MadNLP v0.8 now have full support for solving large, sparse, constrained nonlinear programs on NVIDI…

---

## [Calculating duals with SOS2 constraints](https://discourse.julialang.org/t/calculating-duals-with-sos2-constraints/112831)

<div class="topic-metadata">

**Author:** [@RuaridhMacd](https://discourse.julialang.org/u/RuaridhMacd)\
**Replies:** 2\
**Last updated:** [April 12, 2024, 2:24am UTC](https://discourse.julialang.org/t/calculating-duals-with-sos2-constraints/112831 "2024-04-12T02:24:51Z")

</div>

Hi, I am working with a model in JuMP and Gurobi which is usually a LP or MILP. I have added a set of SOS2 constraints to create a piecewise linear function. Gurobi successfully reformulates the constraints to avoid nee…

---

## [Count Binary Variables in JuMP Model](https://discourse.julialang.org/t/count-binary-variables-in-jump-model/87232)

<div class="topic-metadata">

**Author:** [@chelseas](https://discourse.julialang.org/u/chelseas)\
**Replies:** 4\
**Last updated:** [April 12, 2024, 12:30am UTC](https://discourse.julialang.org/t/count-binary-variables-in-jump-model/87232 "2024-04-12T00:30:24Z")

</div>

What is the proper way to count binary variables in my jump model? I have been using: MathOptInterface = MOI const\_types = list\_of\_constraint\_types(model) n\_bin = 0 n\_lin = 0 for i = 1:length(const\_typ…

---

## [Displaying numbers in Julia](https://discourse.julialang.org/t/displaying-numbers-in-julia/112807)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 15\
**Last updated:** [April 11, 2024, 11:04pm UTC](https://discourse.julialang.org/t/displaying-numbers-in-julia/112807 "2024-04-11T23:04:27Z")

</div>

I want to make a very simple calculation: julia\> 6500 \* ( (1.10)^58 ) 1.6356451710902702e6 But, the format I’m hoping to for is 1,635,645.17 or 1635645.17. I spent 10 minutes searching the internet & Julia built in h…

---

## [Newbie question regarding GPU with metal.jl](https://discourse.julialang.org/t/newbie-question-regarding-gpu-with-metal-jl/112850)

<div class="topic-metadata">

**Author:** [@cloner0110](https://discourse.julialang.org/u/cloner0110)\
**Replies:** 0\
**Last updated:** [April 11, 2024, 10:39pm UTC](https://discourse.julialang.org/t/newbie-question-regarding-gpu-with-metal-jl/112850 "2024-04-11T22:39:14Z")

</div>

Hi Everyone, Im a bit new to julia and GPU programming, Im about to solve a system of equation using metal.jl on a GPU and see the performance, as a starting point, does any of you have any suggestions? Cheers,

---

## [Elegant way to vcat vectors and remove nothing elements?](https://discourse.julialang.org/t/elegant-way-to-vcat-vectors-and-remove-nothing-elements/112835)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 5\
**Last updated:** [April 11, 2024, 10:10pm UTC](https://discourse.julialang.org/t/elegant-way-to-vcat-vectors-and-remove-nothing-elements/112835 "2024-04-11T22:10:16Z")

</div>

Suppose I have: a = \[1;2;3\] b = \[4;5;6\] c = nothing d = \[7;8;9\] In my code, somtimes c will have values, other times it will not. I can guarantee that the type of all variables is the same. What I want is then a functi…

---

## [How to update multiple interactive plots with Interact.jl?](https://discourse.julialang.org/t/how-to-update-multiple-interactive-plots-with-interact-jl/112848)

<div class="topic-metadata">

**Author:** [@kirklong](https://discourse.julialang.org/u/kirklong)\
**Replies:** 0\
**Last updated:** [April 11, 2024, 9:36pm UTC](https://discourse.julialang.org/t/how-to-update-multiple-interactive-plots-with-interact-jl/112848 "2024-04-11T21:36:32Z")

</div>

I am trying to create a simple GUI to visualize a model, and turned to Interact.jl. Consider the following minimal working example of a simple interactive sine wave: function appTest(;θ0) f,shift,A = θ0 f = spin…

---

## [Package keeps precompiling after starting Julia every single time](https://discourse.julialang.org/t/package-keeps-precompiling-after-starting-julia-every-single-time/112843)

<div class="topic-metadata">

**Author:** [@claud10c](https://discourse.julialang.org/u/claud10c)\
**Replies:** 2\
**Last updated:** [April 11, 2024, 9:14pm UTC](https://discourse.julialang.org/t/package-keeps-precompiling-after-starting-julia-every-single-time/112843 "2024-04-11T21:14:22Z")

</div>

I have created a package for computing maximum independent sets. The package uses two JLL wrappers built by me as well. The package is registered and you can load it using \] add MaximumIndependentSet. The source code is…

---

## [Best Practices for converting a Mathematica expression to Julia](https://discourse.julialang.org/t/best-practices-for-converting-a-mathematica-expression-to-julia/18335)

<div class="topic-metadata">

**Author:** [@OvidiusCicero](https://discourse.julialang.org/u/OvidiusCicero)\
**Replies:** 33\
**Last updated:** [April 11, 2024, 8:24pm UTC](https://discourse.julialang.org/t/best-practices-for-converting-a-mathematica-expression-to-julia/18335 "2024-04-11T20:24:36Z")

</div>

Are there suggestions how to convert a rather long Mathematica expression to Julia? With Matlab I use http://library.wolfram.com/infocenter/MathSource/577/ I also would appreciate suggestions for the same problem with …

---

## [DataFrames: conditional probabilities](https://discourse.julialang.org/t/dataframes-conditional-probabilities/112805)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 11\
**Last updated:** [April 11, 2024, 7:19pm UTC](https://discourse.julialang.org/t/dataframes-conditional-probabilities/112805 "2024-04-11T19:19:30Z")

</div>

I have two DataFrames. One gives Prob(Z | Y), the other Prob(Y | X). I would like to compute Prob(Z | X). How? M(non)WE: using DataFrames, Random dfZY = DataFrame( z = repeat(\[1,2\]; outer = 3), y = repeat(\[1,…

---

## [Broadcasting behavior of @. with functions?](https://discourse.julialang.org/t/broadcasting-behavior-of-with-functions/112833)

<div class="topic-metadata">

**Author:** [@hatmatrix](https://discourse.julialang.org/u/hatmatrix)\
**Replies:** 4\
**Last updated:** [April 11, 2024, 7:03pm UTC](https://discourse.julialang.org/t/broadcasting-behavior-of-with-functions/112833 "2024-04-11T19:03:33Z")

</div>

I have a question regarding the use of the @. macro as it does not work when used to broadcast the result of an anonymous function. Here is an example below which works. x = 1. z = \[1., 1.\] @. (z - x) Now I replace z …

---

## [Pre allocating interpolant with Interpolations.jl](https://discourse.julialang.org/t/pre-allocating-interpolant-with-interpolations-jl/112712)

<div class="topic-metadata">

**Author:** [@Iddingsite](https://discourse.julialang.org/u/Iddingsite)\
**Replies:** 5\
**Last updated:** [April 11, 2024, 6:49pm UTC](https://discourse.julialang.org/t/pre-allocating-interpolant-with-interpolations-jl/112712 "2024-04-11T18:49:05Z")

</div>

Hi, I have a loop where I need to create new interpolants each time. I would like to know if I can somehow pre allocate the interpolant in Interpolations.jl so I don’t have to create new memory allocation at each iterat…

---

## [Dict of NamedTuple](https://discourse.julialang.org/t/dict-of-namedtuple/112836)

<div class="topic-metadata">

**Author:** [@fdekerme](https://discourse.julialang.org/u/fdekerme)\
**Replies:** 4\
**Last updated:** [April 11, 2024, 5:34pm UTC](https://discourse.julialang.org/t/dict-of-namedtuple/112836 "2024-04-11T17:34:56Z")

</div>

Hello ! :grinning: I have a question about a behavior I don’t understand when I try to make a dictionary composed of NamedTuple. Each of these NamedTuple corresponds to a parameter set of a simulation. For example: ju…

---

## [What's the feature in quarto that are missing in Literate/Documenter/Wave?](https://discourse.julialang.org/t/whats-the-feature-in-quarto-that-are-missing-in-literate-documenter-wave/112804)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [April 11, 2024, 4:37pm UTC](https://discourse.julialang.org/t/whats-the-feature-in-quarto-that-are-missing-in-literate-documenter-wave/112804 "2024-04-11T16:37:26Z")

</div>

Out of curiosity, which are the features in quarto that are missing in Literate/Documenter/Wave? Which are the advantasges of quarto? What could I get “more” (or more easily) in Quarto?

---

## [How to use \`jl\_ptr\_to\_array\`?](https://discourse.julialang.org/t/how-to-use-jl-ptr-to-array/112834)

<div class="topic-metadata">

**Author:** [@dmitry-kabanov](https://discourse.julialang.org/u/dmitry-kabanov)\
**Replies:** 0\
**Last updated:** [April 11, 2024, 3:40pm UTC](https://discourse.julialang.org/t/how-to-use-jl-ptr-to-array/112834 "2024-04-11T15:40:28Z")

</div>

Hi, I have difficulties with the correct usage of the function jl\_ptr\_to\_array. Particularly, there is no explanation in the documentation on embedding, neighter in the source code on how to construct the third argument …

---

## [DiscreteCallback takes a break: discrete callback shows counterintuitive behaviour in DifferentialEquations.jl](https://discourse.julialang.org/t/discretecallback-takes-a-break-discrete-callback-shows-counterintuitive-behaviour-in-differentialequations-jl/112768)

<div class="topic-metadata">

**Author:** [@flmuk](https://discourse.julialang.org/u/flmuk)\
**Replies:** 2\
**Last updated:** [April 11, 2024, 3:36pm UTC](https://discourse.julialang.org/t/discretecallback-takes-a-break-discrete-callback-shows-counterintuitive-behaviour-in-differentialequations-jl/112768 "2024-04-11T15:36:34Z")

</div>

Hello, I have a question about the behaviour of callbacks using DifferentialEquations.jl, because I find the behaviour of DiscreteCallbacks counterintuitive. Consider the following code, i.e. an adaptation of this: us…

---

## [JuliaApps proposal](https://discourse.julialang.org/t/juliaapps-proposal/112817)

<div class="topic-metadata">

**Author:** [@Eric\_Sadit\_Tellez](https://discourse.julialang.org/u/Eric_Sadit_Tellez)\
**Replies:** 4\
**Last updated:** [April 11, 2024, 2:59pm UTC](https://discourse.julialang.org/t/juliaapps-proposal/112817 "2024-04-11T14:59:16Z")

</div>

Hi everyone, I’ve put JuliaApps for your consideration: https://github.com/sadit/JuliaApps. This tool aims to simplify sharing Julia packages/applications with people who don’t know the Julia programming language. Most …

---

## [How to enforce constraints with SymbolicRegression.jl](https://discourse.julialang.org/t/how-to-enforce-constraints-with-symbolicregression-jl/112832)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 1\
**Last updated:** [April 11, 2024, 2:53pm UTC](https://discourse.julialang.org/t/how-to-enforce-constraints-with-symbolicregression-jl/112832 "2024-04-11T14:53:11Z")

</div>

Hello, I am interested in whether symbolic regression could be used to learn or approximate likelihood functions of simulation-based models. One approach might be approximate the pdf from simulated data using kernel den…

---

## [\[ANN\] PromptingTools.jl - Your Daily Dose of AI Efficiency!](https://discourse.julialang.org/t/ann-promptingtools-jl-your-daily-dose-of-ai-efficiency/106012)

<div class="topic-metadata">

**Author:** [@svilupp](https://discourse.julialang.org/u/svilupp)\
**Replies:** 7\
**Last updated:** [April 11, 2024, 1:58pm UTC](https://discourse.julialang.org/t/ann-promptingtools-jl-your-daily-dose-of-ai-efficiency/106012 "2024-04-11T13:58:37Z")

</div>

Hey Julia enthusiasts and time hackers! :fire: Introducing PromptingTools.jl – your new best friend for working with Large Language Models (LLMs). Imagine saving 20 minutes every day and paying just a few pennies for i…

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

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