# Latest

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

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

**Page:** 165

---

## [Why 1-0.4 = 0.6 vs 1 - 1.4 = -0.399999999999](https://discourse.julialang.org/t/why-1-0-4-0-6-vs-1-1-4-0-399999999999/129148)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 4\
**Last updated:** [May 19, 2025, 4:22pm UTC](https://discourse.julialang.org/t/why-1-0-4-0-6-vs-1-1-4-0-399999999999/129148 "2025-05-19T16:22:56Z")

</div>

why 1-0.4 = 0.6 vs 1 - 1.4 = -0.399999999999 and 0.1 - 0.5 = -0.4 vs 0.2 - 0.6 = -0.3999999 How to make the calculation consistent? What the best way to deal with that to be able to compare (0.2 - 0.6) == (0.1 - 0.5)…

---

## [Separate Sparse Matrix Blocks into Matrices](https://discourse.julialang.org/t/separate-sparse-matrix-blocks-into-matrices/129147)

<div class="topic-metadata">

**Author:** [@wes648](https://discourse.julialang.org/u/wes648)\
**Replies:** 4\
**Last updated:** [May 19, 2025, 3:04pm UTC](https://discourse.julialang.org/t/separate-sparse-matrix-blocks-into-matrices/129147 "2025-05-19T15:04:13Z")

</div>

Is there an efficient way to convert a block diagonalizable sparse matrix into the separate dense/near dense sub-blocks? As a small example, I have the following matrix: julia\> mat 5×5 SparseMatrixCSC{Float64, Int64} w…

---

## [Clarification regarding \`Ref\` documentation](https://discourse.julialang.org/t/clarification-regarding-ref-documentation/129085)

<div class="topic-metadata">

**Author:** [@arbitrandomuser](https://discourse.julialang.org/u/arbitrandomuser)\
**Replies:** 8\
**Last updated:** [May 19, 2025, 2:21pm UTC](https://discourse.julialang.org/t/clarification-regarding-ref-documentation/129085 "2025-05-19T14:21:39Z")

</div>

The documentation for Ref says When passed as a ccall argument (either as a Ptr or Ref type), a Ref object will be converted to a native pointer to the data it references. For most T, or when converted to a Ptr{Cvoi…

---

## [Trouble precompiling with Enzyme](https://discourse.julialang.org/t/trouble-precompiling-with-enzyme/129143)

<div class="topic-metadata">

**Author:** [@jtravs](https://discourse.julialang.org/u/jtravs)\
**Replies:** 1\
**Last updated:** [May 19, 2025, 2:11pm UTC](https://discourse.julialang.org/t/trouble-precompiling-with-enzyme/129143 "2025-05-19T14:11:05Z")

</div>

Hi All, I am struggling to get precompilation working with Enzyme.jl. My package works fine without any precompile statements at the top level. But if I add some package function calls within my top-level module, I get …

---

## [Pkg servers frequently down in South America](https://discourse.julialang.org/t/pkg-servers-frequently-down-in-south-america/129145)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 3\
**Last updated:** [May 19, 2025, 1:43pm UTC](https://discourse.julialang.org/t/pkg-servers-frequently-down-in-south-america/129145 "2025-05-19T13:43:08Z")

</div>

The Pkg servers are frequently down in South America: What is causing this instability? How to avoid it? I am teaching a course in Brazil and am worried that participants will not be able to download the latest versi…

---

## [How to copy a dataframe column within the same dataframe?](https://discourse.julialang.org/t/how-to-copy-a-dataframe-column-within-the-same-dataframe/129136)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 4\
**Last updated:** [May 19, 2025, 9:44am UTC](https://discourse.julialang.org/t/how-to-copy-a-dataframe-column-within-the-same-dataframe/129136 "2025-05-19T09:44:14Z")

</div>

Hi, I would like to copy (not a view) a column of dataframe inside the same dataframe. E.g. to have: julia\> df = DataFrame(A=1:4, B=\["A", "B", "C", "D"\]) 4×2 DataFrame Row │ A B │ Int64 String ─────…

---

## [Julia vscode lose connection to REPL after a while](https://discourse.julialang.org/t/julia-vscode-lose-connection-to-repl-after-a-while/128879)

<div class="topic-metadata">

**Author:** [@AliceandBob](https://discourse.julialang.org/u/AliceandBob)\
**Replies:** 4\
**Last updated:** [May 19, 2025, 8:53am UTC](https://discourse.julialang.org/t/julia-vscode-lose-connection-to-repl-after-a-while/128879 "2025-05-19T08:53:42Z")

</div>

I am doing everything on my laptop with Julia+VSCode. Everything worked well until recently (maybe from 5 days before). By pressing Shift+Enter, it automatically opens a REPL at the bottom, and the left Julia panel show…

---

## [Compiler specialisation in automatic differentiation](https://discourse.julialang.org/t/compiler-specialisation-in-automatic-differentiation/129020)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 3\
**Last updated:** [May 19, 2025, 8:16am UTC](https://discourse.julialang.org/t/compiler-specialisation-in-automatic-differentiation/129020 "2025-05-19T08:16:46Z")

</div>

I am working with finite element method code. In this context, it is (very!!!) useful to use forward automatic differentiation to differentiate the function that, from degrees of freedom, compute the element’s contribut…

---

## [Seeking help on Branch and Price](https://discourse.julialang.org/t/seeking-help-on-branch-and-price/112020)

<div class="topic-metadata">

**Author:** [@wahadhasan](https://discourse.julialang.org/u/wahadhasan)\
**Replies:** 2\
**Last updated:** [May 19, 2025, 1:39am UTC](https://discourse.julialang.org/t/seeking-help-on-branch-and-price/112020 "2025-05-19T01:39:32Z")

</div>

Note that this may not be the global minimum because we are not adding new columns during the solution of the mixed-integer problem model (an algorithm known as branch and price). Could someone please help me how to f…

---

## [Using a trained MLJ model for prediction on non-Table objects](https://discourse.julialang.org/t/using-a-trained-mlj-model-for-prediction-on-non-table-objects/129071)

<div class="topic-metadata">

**Author:** [@elipivo](https://discourse.julialang.org/u/elipivo)\
**Replies:** 1\
**Last updated:** [May 18, 2025, 9:42pm UTC](https://discourse.julialang.org/t/using-a-trained-mlj-model-for-prediction-on-non-table-objects/129071 "2025-05-18T21:42:09Z")

</div>

After training an MLJ model on data that meets the Tables.jl interface requirements, I’m interested in then deploying these models into an environment where predict is called on objects that don’t necessarily meet the Ta…

---

## [Monotonic smoothing of noisy data](https://discourse.julialang.org/t/monotonic-smoothing-of-noisy-data/93184)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 21\
**Last updated:** [May 17, 2025, 3:47pm UTC](https://discourse.julialang.org/t/monotonic-smoothing-of-noisy-data/93184 "2025-05-17T15:47:46Z")

</div>

Is there a package in Julia, or a simple algorithm, to perform monotonic smoothing of noisy data? See this Python example. NB: it is assumed that we do not know of any monotonic function or model that could fit the da…

---

## [How to not import Base.isopen](https://discourse.julialang.org/t/how-to-not-import-base-isopen/128766)

<div class="topic-metadata">

**Author:** [@GHTaarn](https://discourse.julialang.org/u/GHTaarn)\
**Replies:** 12\
**Last updated:** [May 18, 2025, 6:04pm UTC](https://discourse.julialang.org/t/how-to-not-import-base-isopen/128766 "2025-05-18T18:04:45Z")

</div>

I would like to write my own isopen function and therefore not import Base.isopen. I have thought of two ways to do this: module MyModule function isopen end # Lots of code... include("file\_that\_defines\_isopen.jl") en…

---

## [Prompts that do not accept the labeled responses nor the default](https://discourse.julialang.org/t/prompts-that-do-not-accept-the-labeled-responses-nor-the-default/129069)

<div class="topic-metadata">

**Author:** [@Buk](https://discourse.julialang.org/u/Buk)\
**Replies:** 5\
**Last updated:** [May 18, 2025, 4:23pm UTC](https://discourse.julialang.org/t/prompts-that-do-not-accept-the-labeled-responses-nor-the-default/129069 "2025-05-18T16:23:03Z")

</div>

Why does this happen? julia\> using Plots, Interact │ Packages \[Plots, Interact\] not found, but packages named \[Plots, Interact\] are available from a registry. │ Install packages? │ (@v1.12) pkg\> add Plots Interact …

---

## [RPRMakie.jl for 3D plotting of star](https://discourse.julialang.org/t/rprmakie-jl-for-3d-plotting-of-star/129107)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 0\
**Last updated:** [May 17, 2025, 6:46pm UTC](https://discourse.julialang.org/t/rprmakie-jl-for-3d-plotting-of-star/129107 "2025-05-17T18:46:23Z")

</div>

What is current state of RPRMakie.jl @sdanisch? I want to create 3D volume plot of Neutron Star or Black Hole using RPRMakie.jl. I have HDF5 data of simulation. I would like to interactively visualize the internal parts …

---

## [REPL freezes without error](https://discourse.julialang.org/t/repl-freezes-without-error/129074)

<div class="topic-metadata">

**Author:** [@Buk](https://discourse.julialang.org/u/Buk)\
**Replies:** 12\
**Last updated:** [May 18, 2025, 8:55am UTC](https://discourse.julialang.org/t/repl-freezes-without-error/129074 "2025-05-18T08:55:35Z")

</div>

Pasting a short script into the REPL, it slowly accepts line after line but when it gets to the last line it just freezes there indefinitely. No errors. No cpu activity. no idication anything is wrong or failing iany de…

---

## [How to prevent unwanted "optimization" in SIMD code?](https://discourse.julialang.org/t/how-to-prevent-unwanted-optimization-in-simd-code/129081)

<div class="topic-metadata">

**Author:** [@lntricate](https://discourse.julialang.org/u/lntricate)\
**Replies:** 8\
**Last updated:** [May 18, 2025, 2:59am UTC](https://discourse.julialang.org/t/how-to-prevent-unwanted-optimization-in-simd-code/129081 "2025-05-18T02:59:48Z")

</div>

I’m working on writing a SIMD base64 encoding algorithm (from this paper), and I came across an annoying thing. Consider the following example method: function test\_mul(a::NTuple{16, VecElement{UInt16}}, b::NTuple{16, V…

---

## [Do degeneracies and numerical instabilities more likely during the execution of solvers in case of formulations with greater number of constraints and decision variables?](https://discourse.julialang.org/t/do-degeneracies-and-numerical-instabilities-more-likely-during-the-execution-of-solvers-in-case-of-formulations-with-greater-number-of-constraints-and-decision-variables/129108)

<div class="topic-metadata">

**Author:** [@Engr\_Moiz\_Ahmad](https://discourse.julialang.org/u/Engr_Moiz_Ahmad)\
**Replies:** 2\
**Last updated:** [May 18, 2025, 2:23am UTC](https://discourse.julialang.org/t/do-degeneracies-and-numerical-instabilities-more-likely-during-the-execution-of-solvers-in-case-of-formulations-with-greater-number-of-constraints-and-decision-variables/129108 "2025-05-18T02:23:58Z")

</div>

I am dealing with a multi-stage mixed-integer stochastic global supply chain optimization problem and want to solve it using the SDDiP algorithm in the SDDP.jl package in Julia. In this regard, I am conducting prelimina…

---

## [Gurobi Error 10005 is seen on submitting lazy constraint also when cb\_where == GRB\_CB\_MIPNODE](https://discourse.julialang.org/t/gurobi-error-10005-is-seen-on-submitting-lazy-constraint-also-when-cb-where-grb-cb-mipnode/129094)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 2\
**Last updated:** [May 18, 2025, 12:09am UTC](https://discourse.julialang.org/t/gurobi-error-10005-is-seen-on-submitting-lazy-constraint-also-when-cb-where-grb-cb-mipnode/129094 "2025-05-18T00:09:12Z")

</div>

My code (full and runnable) is import LinearAlgebra.dot as dot import LinearAlgebra.norm as norm import JuMP, Gurobi, Random function my\_callback\_function(cb\_data, cb\_where::Cint) if cb\_where == Gurobi.GRB\_CB\_MIPSOL…

---

## [Unable to solve the problem using Lagrangian duality handler](https://discourse.julialang.org/t/unable-to-solve-the-problem-using-lagrangian-duality-handler/129079)

<div class="topic-metadata">

**Author:** [@Engr\_Moiz\_Ahmad](https://discourse.julialang.org/u/Engr_Moiz_Ahmad)\
**Replies:** 2\
**Last updated:** [May 17, 2025, 9:40pm UTC](https://discourse.julialang.org/t/unable-to-solve-the-problem-using-lagrangian-duality-handler/129079 "2025-05-17T21:40:17Z")

</div>

I am dealing with a multi-stage mixed-integer stochastic global supply chain optimization problem and want to solve it using the SDDiP algorithm in the SDDP.jl package in Julia. In this regard, I tried solving the mixed…

---

## [Best practices for flattening and reconstructing nested structs for ODEs, Solve, Kalman.jl etc](https://discourse.julialang.org/t/best-practices-for-flattening-and-reconstructing-nested-structs-for-odes-solve-kalman-jl-etc/129093)

<div class="topic-metadata">

**Author:** [@stevenhughes](https://discourse.julialang.org/u/stevenhughes)\
**Replies:** 5\
**Last updated:** [May 17, 2025, 9:24pm UTC](https://discourse.julialang.org/t/best-practices-for-flattening-and-reconstructing-nested-structs-for-odes-solve-kalman-jl-etc/129093 "2025-05-17T21:24:19Z")

</div>

Hello All, I’m prototyping a space/astrodynamics simulation and optimization framework in Julia. For the user interface, the most intuitive way to encapsulate all the data is on structs. Below is a toy example which i…

---

## [Python is faster than Julia on Windows ARM64](https://discourse.julialang.org/t/python-is-faster-than-julia-on-windows-arm64/129105)

<div class="topic-metadata">

**Author:** [@bobmccrory](https://discourse.julialang.org/u/bobmccrory)\
**Replies:** 5\
**Last updated:** [May 17, 2025, 8:05pm UTC](https://discourse.julialang.org/t/python-is-faster-than-julia-on-windows-arm64/129105 "2025-05-17T20:05:12Z")

</div>

I ran a smoothed particle hydrodynamics simulation on my Windows ARM64 machine, a Windows Laptop 7. The Jullia version took 5 min 28 sec to run, while the Python version took 4m 19s. To check this, I ran the same progra…

---

## [Moving source code and packages to a secured environment](https://discourse.julialang.org/t/moving-source-code-and-packages-to-a-secured-environment/129068)

<div class="topic-metadata">

**Author:** [@SGHoekstra](https://discourse.julialang.org/u/SGHoekstra)\
**Replies:** 7\
**Last updated:** [May 17, 2025, 5:38pm UTC](https://discourse.julialang.org/t/moving-source-code-and-packages-to-a-secured-environment/129068 "2025-05-17T17:38:36Z")

</div>

Hey everyone, I need to move source code and a lot of packages to a secured environment where there is no internet. I have seen the options of SIEGE or PackageCompiler to move images to another system but this excludes …

---

## [Intermediate Development Workflow](https://discourse.julialang.org/t/intermediate-development-workflow/128903)

<div class="topic-metadata">

**Author:** [@stevenhughes](https://discourse.julialang.org/u/stevenhughes)\
**Replies:** 8\
**Last updated:** [May 17, 2025, 1:53pm UTC](https://discourse.julialang.org/t/intermediate-development-workflow/128903 "2025-05-17T13:53:30Z")

</div>

Hi Everyone, I am relatively new to Julia, I’ve been using it for a few months. In the first month, I was able to write several thousand lines of code and solve some problems that took far longer in other languages. I…

---

## [\[ANN\] Trash.jl](https://discourse.julialang.org/t/ann-trash-jl/129104)

<div class="topic-metadata">

**Author:** [@tecosaur](https://discourse.julialang.org/u/tecosaur)\
**Replies:** 0\
**Last updated:** [May 17, 2025, 5:17pm UTC](https://discourse.julialang.org/t/ann-trash-jl/129104 "2025-05-17T17:17:06Z")

</div>

Trash.jl Finally, a package that’s absolute garbage The need to delete files comes up a lot, and it’s easy to reach for rm for that. However, sometimes there’s a chance that your program or a user will want to be a…

---

## [Plotting a georeferenced field on a 3d globe](https://discourse.julialang.org/t/plotting-a-georeferenced-field-on-a-3d-globe/128895)

<div class="topic-metadata">

**Author:** [@aasdelat](https://discourse.julialang.org/u/aasdelat)\
**Replies:** 5\
**Last updated:** [May 17, 2025, 4:25pm UTC](https://discourse.julialang.org/t/plotting-a-georeferenced-field-on-a-3d-globe/128895 "2025-05-17T16:25:53Z")

</div>

I have georeferenced data in longitude/latitude, and I want to plot them on a three-dimensional globe with the WGS84 datum, using the GLMakie and GeoMakie libraries. You can download the data from here. The grid is irr…

---

## [How is data routed between distributed processes?](https://discourse.julialang.org/t/how-is-data-routed-between-distributed-processes/129102)

<div class="topic-metadata">

**Author:** [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Replies:** 0\
**Last updated:** [May 17, 2025, 3:59pm UTC](https://discourse.julialang.org/t/how-is-data-routed-between-distributed-processes/129102 "2025-05-17T15:59:16Z")

</div>

Say there are two machines, the local L and remote R. I start my “director” julia process (myid() == 1) on machine L. Then the director process (L.1) spawns two worker processes R.2, R.3 on R with addprocs(\[("R", 2)\]).…

---

## [How to use protected characters in a string (e.g. percent in printf)](https://discourse.julialang.org/t/how-to-use-protected-characters-in-a-string-e-g-percent-in-printf/67239)

<div class="topic-metadata">

**Author:** [@hdcpereira](https://discourse.julialang.org/u/hdcpereira)\
**Replies:** 1\
**Last updated:** [August 28, 2021, 6:25pm UTC](https://discourse.julialang.org/t/how-to-use-protected-characters-in-a-string-e-g-percent-in-printf/67239 "2021-08-28T18:25:41Z")

</div>

Hello there. How do I use these protected characters when writing a string? @printf "this code has failed in %.2f" fail\_percentage I would like the output to be this code has failed in 10.00% but when I use the % sy…

---

## [Julia 2.0, new scope rules, and other breaking changes](https://discourse.julialang.org/t/julia-2-0-new-scope-rules-and-other-breaking-changes/129083)

<div class="topic-metadata">

**Author:** [@Leon\_Niceday](https://discourse.julialang.org/u/Leon_Niceday)\
**Replies:** 4\
**Last updated:** [May 17, 2025, 8:53am UTC](https://discourse.julialang.org/t/julia-2-0-new-scope-rules-and-other-breaking-changes/129083 "2025-05-17T08:53:08Z")

</div>

I’m interested in potentially better scoping rules but those will be breaking changes. (I have read the PSA: Julia is not at that stage of development anymore ). When is Julia 2.0 planned to come? Is changing scoping r…

---

## [Write the lagrangian relaxation with JuMP concisely](https://discourse.julialang.org/t/write-the-lagrangian-relaxation-with-jump-concisely/129082)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 2\
**Last updated:** [May 17, 2025, 6:52am UTC](https://discourse.julialang.org/t/write-the-lagrangian-relaxation-with-jump-concisely/129082 "2025-05-17T06:52:33Z")

</div>

I discover a new syntax to do the lagrangian relaxation, it looks elegant, but will it be efficiency also? # The following 2 constraints are to be relaxed (and penalized on the obj) # via Lagrangian multipliers \`a\` and…

---

## [Remove the soft scope altogether and make it global](https://discourse.julialang.org/t/remove-the-soft-scope-altogether-and-make-it-global/33333)

<div class="topic-metadata">

**Author:** [@Wenjie](https://discourse.julialang.org/u/Wenjie)\
**Replies:** 49\
**Last updated:** [May 17, 2025, 5:03am UTC](https://discourse.julialang.org/t/remove-the-soft-scope-altogether-and-make-it-global/33333 "2025-05-17T05:03:15Z")

</div>

I see that the Julia community are currently debating on the new scope rules in v1.0, in an attempt to return to the deprecated soft/hard local scopes in v0.6. In my opinion, neither solution is ideal. Here, let me give …

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

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