# Latest

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

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

**Page:** 485

---

## [Long NLP evaluation time in Ipopt](https://discourse.julialang.org/t/long-nlp-evaluation-time-in-ipopt/109436)

<div class="topic-metadata">

**Author:** [@tso-martin](https://discourse.julialang.org/u/tso-martin)\
**Replies:** 6\
**Last updated:** [February 14, 2024, 6:56am UTC](https://discourse.julialang.org/t/long-nlp-evaluation-time-in-ipopt/109436 "2024-02-14T06:56:32Z")

</div>

Dear all, I encounter long evaluation times and slow convergence in an AC security constraint optimal power flow (SCOPF) optimization. The problem is modelled with PowerModels and JuMP. The NLP evaluation time is higher…

---

## [Should Julia target startups?](https://discourse.julialang.org/t/should-julia-target-startups/109970)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 5\
**Last updated:** [February 14, 2024, 6:48am UTC](https://discourse.julialang.org/t/should-julia-target-startups/109970 "2024-02-14T06:48:56Z")

</div>

Languages might need a killer application to take off. Here’s why it might be a good idea to target startups. Less people need to adopt Julia to have a company-wide impact. It is hard to get Julia to a large number of …

---

## [Adding complementarity constraints](https://discourse.julialang.org/t/adding-complementarity-constraints/110132)

<div class="topic-metadata">

**Author:** [@anand.kumar](https://discourse.julialang.org/u/anand.kumar)\
**Replies:** 4\
**Last updated:** [February 14, 2024, 4:39am UTC](https://discourse.julialang.org/t/adding-complementarity-constraints/110132 "2024-02-14T04:39:08Z")

</div>

I’m new to both AMPL and JuMP. I’m trying to translate constraints below to jump but don’t understand how to do it. compl\_1{k in K}: 0 \<= ll\[1,k\] complements y\[1,k\] - x\[1\] \<= 0; compl\_2{k in K}: 0 \<= ll\[2,k\] comple…

---

## [How to define ode without mass\_matrix](https://discourse.julialang.org/t/how-to-define-ode-without-mass-matrix/110190)

<div class="topic-metadata">

**Author:** [@whucsu](https://discourse.julialang.org/u/whucsu)\
**Replies:** 4\
**Last updated:** [February 14, 2024, 2:12am UTC](https://discourse.julialang.org/t/how-to-define-ode-without-mass-matrix/110190 "2024-02-14T02:12:45Z")

</div>

Dear All, I am not so familary with Julia ode. Here as to the ode definition using ODEfunction: also online:CMSB-2023/UKF.jl at main · H-Sax/CMSB-2023 · GitHub the code as below: function NIK!(du, u, p, t) pLV, psa…

---

## [Startup.jl with \`@spawn @eval\`](https://discourse.julialang.org/t/startup-jl-with-spawn-eval/110076)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 0\
**Last updated:** [February 11, 2024, 7:49pm UTC](https://discourse.julialang.org/t/startup-jl-with-spawn-eval/110076 "2024-02-11T19:49:31Z")

</div>

To reduce startup latency, I’m trying a new startup.jl with atreplinit(repl-\> Threads.@spawn @eval begin using Revise using OhMyREPL using Compat ... end) Are there any issues I need to be aware of when doing this? Ed…

---

## [Dynamically Naming Expressions and Constraints in JuMP](https://discourse.julialang.org/t/dynamically-naming-expressions-and-constraints-in-jump/110181)

<div class="topic-metadata">

**Author:** [@Lemma](https://discourse.julialang.org/u/Lemma)\
**Replies:** 1\
**Last updated:** [February 13, 2024, 11:48pm UTC](https://discourse.julialang.org/t/dynamically-naming-expressions-and-constraints-in-jump/110181 "2024-02-13T23:48:43Z")

</div>

In JuMP, it appears that expressions, constraints, and variables cannot be dynamically named using string interpolation (i.e., the $ symbol) directly within the identifiers of the @variable or @expression macros. Given t…

---

## [Narrowing typed globals](https://discourse.julialang.org/t/narrowing-typed-globals/110177)

<div class="topic-metadata">

**Author:** [@Dan](https://discourse.julialang.org/u/Dan)\
**Replies:** 1\
**Last updated:** [February 13, 2024, 11:06pm UTC](https://discourse.julialang.org/t/narrowing-typed-globals/110177 "2024-02-13T23:06:33Z")

</div>

When locking a non-concrete type to a global, it may be reasonable to allow narrowing the locked type to a subtype. Consider: julia\> s::Number = 3 3 julia\> s::Int64 = 5 ERROR: cannot set type for global Main.s. It alr…

---

## [Issue with the Metropolis adjusted Langevin sampler from AdvancedMH.jl](https://discourse.julialang.org/t/issue-with-the-metropolis-adjusted-langevin-sampler-from-advancedmh-jl/110155)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 1\
**Last updated:** [February 13, 2024, 10:13pm UTC](https://discourse.julialang.org/t/issue-with-the-metropolis-adjusted-langevin-sampler-from-advancedmh-jl/110155 "2024-02-13T22:13:39Z")

</div>

I am trying to use a Metropolis adjusted Langevin sampler, from AdvancedMH.MALA. I did a simple test to see if things are working correctly, which is to sample from a multivariate normal distribution. Here is the code: i…

---

## [How to write a unit test for a conditional macro?](https://discourse.julialang.org/t/how-to-write-a-unit-test-for-a-conditional-macro/110168)

<div class="topic-metadata">

**Author:** [@rssdev10](https://discourse.julialang.org/u/rssdev10)\
**Replies:** 6\
**Last updated:** [February 13, 2024, 10:01pm UTC](https://discourse.julialang.org/t/how-to-write-a-unit-test-for-a-conditional-macro/110168 "2024-02-13T22:01:06Z")

</div>

Hi, is there any way to invalidate the code of a macro? I have implemented a macro that depends on system environment. Now I’m trying to write a unit test for it. I’m able to delay macro code expansion by placing the fir…

---

## [Pluto - Clear Stale / Deleted Notebooks](https://discourse.julialang.org/t/pluto-clear-stale-deleted-notebooks/110152)

<div class="topic-metadata">

**Author:** [@benslinux](https://discourse.julialang.org/u/benslinux)\
**Replies:** 0\
**Last updated:** [February 13, 2024, 1:03pm UTC](https://discourse.julialang.org/t/pluto-clear-stale-deleted-notebooks/110152 "2024-02-13T13:03:27Z")

</div>

Pluto Notebooks work great with Julia. When Pluto opens, you may have a list of “stale” or deleted notebook.jl files which appear in list when opened. Deleting them from your computer won’t remove them from this list. Th…

---

## [Extracting projection from grib files](https://discourse.julialang.org/t/extracting-projection-from-grib-files/109818)

<div class="topic-metadata">

**Author:** [@johnbb](https://discourse.julialang.org/u/johnbb)\
**Replies:** 4\
**Last updated:** [February 13, 2024, 8:01pm UTC](https://discourse.julialang.org/t/extracting-projection-from-grib-files/109818 "2024-02-13T20:01:09Z")

</div>

Any recommendation on how to get the projection from grib files and to robustly create a proj string?

---

## [Extracting numerical results from hamiltonian using Quantica](https://discourse.julialang.org/t/extracting-numerical-results-from-hamiltonian-using-quantica/107809)

<div class="topic-metadata">

**Author:** [@alex123](https://discourse.julialang.org/u/alex123)\
**Replies:** 7\
**Last updated:** [February 13, 2024, 7:10pm UTC](https://discourse.julialang.org/t/extracting-numerical-results-from-hamiltonian-using-quantica/107809 "2024-02-13T19:10:29Z")

</div>

Hi, I am using Quantica for finding the band structure of twisted bilayer graphene. Here is the part of my code that finds the hamiltonian: b = hamiltonian(tbg, model) |\> bands(subdiv((0, 2, 3, 4), 20); mapping=(0, 2,…

---

## [IO error message while training an LSTM model but no operation on a file is being performed](https://discourse.julialang.org/t/io-error-message-while-training-an-lstm-model-but-no-operation-on-a-file-is-being-performed/110040)

<div class="topic-metadata">

**Author:** [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Replies:** 2\
**Last updated:** [February 13, 2024, 7:09pm UTC](https://discourse.julialang.org/t/io-error-message-while-training-an-lstm-model-but-no-operation-on-a-file-is-being-performed/110040 "2024-02-13T19:09:58Z")

</div>

I am currently getting an IO error message (see below), and I don’t understand why. This error has popped up haphazardly as I run a function I wrote to train an LSTM model with Flux.jl. The function reshapes the data in…

---

## [Pluto: Table of Contents´ position](https://discourse.julialang.org/t/pluto-table-of-contents-position/110111)

<div class="topic-metadata">

**Author:** [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Replies:** 3\
**Last updated:** [February 13, 2024, 7:04pm UTC](https://discourse.julialang.org/t/pluto-table-of-contents-position/110111 "2024-02-13T19:04:33Z")

</div>

Hi, Does anyone know how to force the Table of Contents to be kept at a fixed distance from the main body of the Pluto window? When we change the size of the browser’s window, the Table of Contents can overlap with Plut…

---

## [Running a @distributed for loop on a zipped variable fails?](https://discourse.julialang.org/t/running-a-distributed-for-loop-on-a-zipped-variable-fails/110166)

<div class="topic-metadata">

**Author:** [@Alexandre\_Champagne](https://discourse.julialang.org/u/Alexandre_Champagne)\
**Replies:** 1\
**Last updated:** [February 13, 2024, 5:58pm UTC](https://discourse.julialang.org/t/running-a-distributed-for-loop-on-a-zipped-variable-fails/110166 "2024-02-13T17:58:31Z")

</div>

Hi, I’m trying to loop over a combination of parameters (N, f, o), and each iteration is also identified using an index (i). The code below works, but fails when using distributed with a bunch of cryptic error messages …

---

## [Using Layout properly for Multiple plots in same box](https://discourse.julialang.org/t/using-layout-properly-for-multiple-plots-in-same-box/109241)

<div class="topic-metadata">

**Author:** [@CosmoProf](https://discourse.julialang.org/u/CosmoProf)\
**Replies:** 3\
**Last updated:** [February 13, 2024, 5:43pm UTC](https://discourse.julialang.org/t/using-layout-properly-for-multiple-plots-in-same-box/109241 "2024-02-13T17:43:59Z")

</div>

Hi all, I’m trying to get 2 plots (one on top of the other) in the same box, using the layout command, but I can’t seem to get the syntax right without errors. Julia’s document lists some examples using random numbers, …

---

## [String operation](https://discourse.julialang.org/t/string-operation/110140)

<div class="topic-metadata">

**Author:** [@madsnesse](https://discourse.julialang.org/u/madsnesse)\
**Replies:** 7\
**Last updated:** [February 13, 2024, 5:32pm UTC](https://discourse.julialang.org/t/string-operation/110140 "2024-02-13T17:32:51Z")

</div>

what does this do in julia? it does not give any ParseError, and when executed in REPL it just displays the name of the variable (a) a = "abc" "aa" a OUTPUT: julia\> "aa" a a If I change the order like this it gives P…

---

## [What are the pros and cons of row/column major ordering?](https://discourse.julialang.org/t/what-are-the-pros-and-cons-of-row-column-major-ordering/110045)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 10\
**Last updated:** [February 13, 2024, 4:53pm UTC](https://discourse.julialang.org/t/what-are-the-pros-and-cons-of-row-column-major-ordering/110045 "2024-02-13T16:53:10Z")

</div>

I understand that because matrices in Julia are stored in column major order, it is best to iterate over them in column major order. What is less clear to me is why one would want to store matrices in column major order…

---

## [NonlinearSolve OrdinaryDiffEq ModelingToolkit](https://discourse.julialang.org/t/nonlinearsolve-ordinarydiffeq-modelingtoolkit/108737)

<div class="topic-metadata">

**Author:** [@Naceur\_Bouziani](https://discourse.julialang.org/u/Naceur_Bouziani)\
**Replies:** 13\
**Last updated:** [February 13, 2024, 3:36pm UTC](https://discourse.julialang.org/t/nonlinearsolve-ordinarydiffeq-modelingtoolkit/108737 "2024-02-13T15:36:19Z")

</div>

Hi everybody ! I’m experiencing problems when using those packages together here is the command line pkg\> add Lux Optimization CUDA LuxCUDA Random ComponentArrays ModelingToolkit NeuralPDE none of NonlinearSolve Or…

---

## [Embedding the REPL](https://discourse.julialang.org/t/embedding-the-repl/110153)

<div class="topic-metadata">

**Author:** [@joelreymont](https://discourse.julialang.org/u/joelreymont)\
**Replies:** 2\
**Last updated:** [February 13, 2024, 2:27pm UTC](https://discourse.julialang.org/t/embedding-the-repl/110153 "2024-02-13T14:27:19Z")

</div>

How can I embed the Julia REPL into a C++ executable such that I can connect to it remotely, e.g. from a notebook? I know about the C++ interop packages but haven’t found anything on the REPL. Thanks, Joel

---

## [Solving a system of equations symbolically](https://discourse.julialang.org/t/solving-a-system-of-equations-symbolically/110141)

<div class="topic-metadata">

**Author:** [@skvibimigger](https://discourse.julialang.org/u/skvibimigger)\
**Replies:** 3\
**Last updated:** [February 13, 2024, 12:14pm UTC](https://discourse.julialang.org/t/solving-a-system-of-equations-symbolically/110141 "2024-02-13T12:14:17Z")

</div>

I need to solve a system of equations. Everything works until the part where I want to solve for the coefficients which I have stored in the vector a: Is there a way to solve for these coefficients? My script is the f…

---

## [Failed to profile CUDA.jl with Nsight Systems 2024.1.1](https://discourse.julialang.org/t/failed-to-profile-cuda-jl-with-nsight-systems-2024-1-1/110051)

<div class="topic-metadata">

**Author:** [@yuwenchen95](https://discourse.julialang.org/u/yuwenchen95)\
**Replies:** 4\
**Last updated:** [February 13, 2024, 11:19am UTC](https://discourse.julialang.org/t/failed-to-profile-cuda-jl-with-nsight-systems-2024-1-1/110051 "2024-02-13T11:19:54Z")

</div>

I am following the doc to learn profiling GPU in Julia. When I followed $ nsys launch julia It started a Julia terminal but then failed when I run using CUDA and return errors: Please submit a bug report with steps …

---

## [Working with path at module level?](https://discourse.julialang.org/t/working-with-path-at-module-level/110142)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 2\
**Last updated:** [February 13, 2024, 10:34am UTC](https://discourse.julialang.org/t/working-with-path-at-module-level/110142 "2024-02-13T10:34:35Z")

</div>

Hello, I have a package with directories structured like this: Packgage data datafile.txt src package.jl In package.jl, there is a function function foo() f = read("data/datafile.txt") #do smth end …

---

## [Edit() doesn't use JULIA\_EDITOR](https://discourse.julialang.org/t/edit-doesnt-use-julia-editor/110136)

<div class="topic-metadata">

**Author:** [@Alseidon](https://discourse.julialang.org/u/Alseidon)\
**Replies:** 2\
**Last updated:** [February 13, 2024, 10:08am UTC](https://discourse.julialang.org/t/edit-doesnt-use-julia-editor/110136 "2024-02-13T10:08:14Z")

</div>

I defined the environment variable JULIA\_EDITOR=“gedit” in my startup.jl file, but edit(path) or edit(fn) still open with nano: shell\> echo $JULIA\_EDITOR gedit julia\> edit( "~/.julia/juliaup/julia-1.10.0+0.x64.linu…

---

## [Struct with field types defined by parametric type](https://discourse.julialang.org/t/struct-with-field-types-defined-by-parametric-type/110117)

<div class="topic-metadata">

**Author:** [@mattsignorelli](https://discourse.julialang.org/u/mattsignorelli)\
**Replies:** 5\
**Last updated:** [February 13, 2024, 8:48am UTC](https://discourse.julialang.org/t/struct-with-field-types-defined-by-parametric-type/110117 "2024-02-13T08:48:53Z")

</div>

Say I have a struct MyStruct such that struct A ... end struct B ... end struct MyStruct{T \<: Union{A, B}} t::T v::Vector end I want v to be of type Vector{Float64} if T == A, else if T == B then v should be of t…

---

## [Handling callbacks](https://discourse.julialang.org/t/handling-callbacks/110096)

<div class="topic-metadata">

**Author:** [@Gabriel\_Carita](https://discourse.julialang.org/u/Gabriel_Carita)\
**Replies:** 2\
**Last updated:** [February 13, 2024, 8:38am UTC](https://discourse.julialang.org/t/handling-callbacks/110096 "2024-02-13T08:38:04Z")

</div>

Hi there, I need to verify collisions between two rotating ellipses. At the moment, I’m using continuous callbacks; however, I’m not sure if this is the most efficient way or how to do it. I need the collisions to be ch…

---

## [LibHealpix.jl v0.2.1](https://discourse.julialang.org/t/libhealpix-jl-v0-2-1/5062)

<div class="topic-metadata">

**Author:** [@Michael\_Eastwood](https://discourse.julialang.org/u/Michael_Eastwood)\
**Replies:** 1\
**Last updated:** [February 13, 2024, 5:16am UTC](https://discourse.julialang.org/t/libhealpix-jl-v0-2-1/5062 "2024-02-13T05:16:55Z")

</div>

Given the rather large discussion thread about the need for an astro/space topic, I figured I might as well get the ball rolling. I have recently put a lot of effort into revamping and modernizing my LibHealpix.jl packa…

---

## [Remove the last char from an IOBuffer in-place?](https://discourse.julialang.org/t/remove-the-last-char-from-an-iobuffer-in-place/109128)

<div class="topic-metadata">

**Author:** [@putianyi888](https://discourse.julialang.org/u/putianyi888)\
**Replies:** 1\
**Last updated:** [February 13, 2024, 3:21am UTC](https://discourse.julialang.org/t/remove-the-last-char-from-an-iobuffer-in-place/109128 "2024-02-13T03:21:50Z")

</div>

I’m trying to append to a string so I use an IOBuffer as it operates in place. I tried to print \\b but it’s reserved in the IOBuffer: julia\> io=IOBuffer() IOBuffer(data=UInt8\[...\], readable=true, writable=true, seekable…

---

## [JuMP: Behaviour of value for infeasible models](https://discourse.julialang.org/t/jump-behaviour-of-value-for-infeasible-models/109662)

<div class="topic-metadata">

**Author:** [@samysweb](https://discourse.julialang.org/u/samysweb)\
**Replies:** 10\
**Last updated:** [February 13, 2024, 2:18am UTC](https://discourse.julialang.org/t/jump-behaviour-of-value-for-infeasible-models/109662 "2024-02-13T02:18:11Z")

</div>

Hello everyone, I stumbled on a potential bug in JuMP and its dependencies, however, I wanted to ask this question here first as I am unsure whether this intended behavior and (if not) on which library level this should…

---

## [\[ANN\] New registered package Chevie](https://discourse.julialang.org/t/ann-new-registered-package-chevie/107683)

<div class="topic-metadata">

**Author:** [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)\
**Replies:** 1\
**Last updated:** [February 13, 2024, 2:09am UTC](https://discourse.julialang.org/t/ann-new-registered-package-chevie/107683 "2024-02-13T02:09:08Z")

</div>

This to announce a new registered package Chevie dealing with various areas of representation theory. https://github.com/jmichel7/Chevie.jl Here is the README This is my attempt to port the Chevie package from GAP3 to…

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

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