# Latest

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

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

**Page:** 826

---

## [Set value at C pointer in a Julia callback function](https://discourse.julialang.org/t/set-value-at-c-pointer-in-a-julia-callback-function/92286)

<div class="topic-metadata">

**Author:** [@doer](https://discourse.julialang.org/u/doer)\
**Replies:** 2\
**Last updated:** [December 30, 2022, 2:02am UTC](https://discourse.julialang.org/t/set-value-at-c-pointer-in-a-julia-callback-function/92286 "2022-12-30T02:02:57Z")

</div>

I am trying to use Julia with the Gnu Scientific Library (GSL) multimin functionality. This requires definition of three callback functions, one of which passes a C double\*. Here is the C function signature: void my\_f…

---

## [Performance issues with Multi-Objective Optimization](https://discourse.julialang.org/t/performance-issues-with-multi-objective-optimization/91901)

<div class="topic-metadata">

**Author:** [@JNSDVD](https://discourse.julialang.org/u/JNSDVD)\
**Replies:** 1\
**Last updated:** [December 30, 2022, 1:08am UTC](https://discourse.julialang.org/t/performance-issues-with-multi-objective-optimization/91901 "2022-12-30T01:08:26Z")

</div>

Hey guys, I am working on an multi-objective optimization model (cost, strain, time). The challenge is simultaneous resource allocation and scheduling, as there are corresponding dependencies. However, I have developed …

---

## [Speeding up solving \`Ax=b\` repeated when \`A\` is partially updated](https://discourse.julialang.org/t/speeding-up-solving-ax-b-repeated-when-a-is-partially-updated/92194)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 4\
**Last updated:** [December 29, 2022, 10:09pm UTC](https://discourse.julialang.org/t/speeding-up-solving-ax-b-repeated-when-a-is-partially-updated/92194 "2022-12-29T22:09:10Z")

</div>

I need to solve for Ax=b where x and b are both vectors of length N+1. A is matrix of size (N+1,N+1). A has a certain structure: A\[1:N,N+1\]=1, A\[N+1,1:N\]=1, A\[N+1,N+1\]=0, and A\[1:N,1:N\] = matD + Diagonal(d). matD is a m…

---

## [Why effect inference fails?](https://discourse.julialang.org/t/why-effect-inference-fails/92293)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 1\
**Last updated:** [December 29, 2022, 9:37pm UTC](https://discourse.julialang.org/t/why-effect-inference-fails/92293 "2022-12-29T21:37:58Z")

</div>

Why is it unsure about nothrow? julia\> f(x) = x \* x f (generic function with 1 method) julia\> Base.infer\_effects(\*, (Int, Int)) (+c,+e,+n,+t) julia\> Base.infer\_effects(f, (Int, Int)) (+c,+e,?n,+t) julia\> versioninfo(…

---

## [Parallel computing with \*](https://discourse.julialang.org/t/parallel-computing-with/92276)

<div class="topic-metadata">

**Author:** [@austin-putz](https://discourse.julialang.org/u/austin-putz)\
**Replies:** 27\
**Last updated:** [December 29, 2022, 9:14pm UTC](https://discourse.julialang.org/t/parallel-computing-with/92276 "2022-12-29T21:14:47Z")

</div>

So I was testing julia with different number of threads using $ julia -t 1 or $ julia -t 7. I run versioninfo() and it confirms that I do in fact have 1 or 7 cores on a basic desktop setup. I tested a decent sized matrix…

---

## [Julia v1.9.0-beta2 is now available](https://discourse.julialang.org/t/julia-v1-9-0-beta2-is-now-available/92289)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 0\
**Last updated:** [December 29, 2022, 8:15pm UTC](https://discourse.julialang.org/t/julia-v1-9-0-beta2-is-now-available/92289 "2022-12-29T20:15:16Z")

</div>

The Julia developers are pleased to announce that v1.9.0-beta2, the second beta version for the upcoming 1.9 stable series, is now available. Binaries are available for download at https://julialang.org/downloads in the …

---

## [How to link two Int variables?](https://discourse.julialang.org/t/how-to-link-two-int-variables/92117)

<div class="topic-metadata">

**Author:** [@Lighfe](https://discourse.julialang.org/u/Lighfe)\
**Replies:** 15\
**Last updated:** [December 29, 2022, 7:30pm UTC](https://discourse.julialang.org/t/how-to-link-two-int-variables/92117 "2022-12-29T19:30:17Z")

</div>

Let’s say I want variable b to update with variable a. a = \[42\] b = a a\[1\] = 69 Now b would be 69. This works but seems rather ugly. Is there a more intuitive way?

---

## [Packages for Quantum Mechanics](https://discourse.julialang.org/t/packages-for-quantum-mechanics/92265)

<div class="topic-metadata">

**Author:** [@AQ1998](https://discourse.julialang.org/u/AQ1998)\
**Replies:** 2\
**Last updated:** [December 29, 2022, 6:36pm UTC](https://discourse.julialang.org/t/packages-for-quantum-mechanics/92265 "2022-12-29T18:36:24Z")

</div>

Are there Julia packages (like quspin and qutap in python) to help me construct quantum Hamiltonian efficiently?

---

## [Why doesn't this normalizing flow example work?](https://discourse.julialang.org/t/why-doesnt-this-normalizing-flow-example-work/92279)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 2\
**Last updated:** [December 29, 2022, 5:53pm UTC](https://discourse.julialang.org/t/why-doesnt-this-normalizing-flow-example-work/92279 "2022-12-29T17:53:26Z")

</div>

Hi- I am interested in using normalizing flows to approximate intractable likelihood functions. I found the following example using DiffEqFlux.jl: Continuous Normalizing Flows · DiffEqFlux.jl Given that this is such a …

---

## [Memory usage problem when using findmax/min](https://discourse.julialang.org/t/memory-usage-problem-when-using-findmax-min/92241)

<div class="topic-metadata">

**Author:** [@FujiwaraTakumiEH](https://discourse.julialang.org/u/FujiwaraTakumiEH)\
**Replies:** 9\
**Last updated:** [December 29, 2022, 5:42pm UTC](https://discourse.julialang.org/t/memory-usage-problem-when-using-findmax-min/92241 "2022-12-29T17:42:00Z")

</div>

Hello, In my case I need to continuously get the max/min values from the Array and it looks like this: using BenchmarkTools using CUDA n = 1000000 a = CUDA.rand(n) b = CUDA.rand(n) function test(a, b) rst = Float…

---

## [How to create a loop for a regression model?](https://discourse.julialang.org/t/how-to-create-a-loop-for-a-regression-model/55829)

<div class="topic-metadata">

**Author:** [@younghan-lee](https://discourse.julialang.org/u/younghan-lee)\
**Replies:** 7\
**Last updated:** [February 24, 2021, 6:36am UTC](https://discourse.julialang.org/t/how-to-create-a-loop-for-a-regression-model/55829 "2021-02-24T06:36:16Z")

</div>

Hi everyone, I’m new to Julia and I’m trying to create a loop for a regression model. For example, list = \[:A, :B, :C\] for i in list result = lm(@formula(i ~ X1 + X2), data) println(result) end Something like…

---

## [CellListMap: How do I loop through its neighbour list in a thread-safe way?](https://discourse.julialang.org/t/celllistmap-how-do-i-loop-through-its-neighbour-list-in-a-thread-safe-way/92143)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 6\
**Last updated:** [December 29, 2022, 3:52pm UTC](https://discourse.julialang.org/t/celllistmap-how-do-i-loop-through-its-neighbour-list-in-a-thread-safe-way/92143 "2022-12-29T15:52:17Z")

</div>

Hello! In the following piece of code, I noticed that adding Threads.@threads would lead to the wrong result. My limited understanding is that it is because my arrays are not “thread-safe” - I want to learn how to make …

---

## [DataFrame; create new column of integers representing strings in other column](https://discourse.julialang.org/t/dataframe-create-new-column-of-integers-representing-strings-in-other-column/92268)

<div class="topic-metadata">

**Author:** [@spk](https://discourse.julialang.org/u/spk)\
**Replies:** 4\
**Last updated:** [December 29, 2022, 2:06pm UTC](https://discourse.julialang.org/t/dataframe-create-new-column-of-integers-representing-strings-in-other-column/92268 "2022-12-29T14:06:08Z")

</div>

Hi all, Just a real bone question regarding DataFrames and how to create a new column containing integers to represent each unique string in another column. Sorry if my example is a bit rubbish, I’m new to Julia and not…

---

## [JuMP GLPK method solver](https://discourse.julialang.org/t/jump-glpk-method-solver/69048)

<div class="topic-metadata">

**Author:** [@shce](https://discourse.julialang.org/u/shce)\
**Replies:** 7\
**Last updated:** [December 29, 2022, 11:43am UTC](https://discourse.julialang.org/t/jump-glpk-method-solver/69048 "2022-12-29T11:43:01Z")

</div>

Hello, I am trying to solve a linear problem using GLPK. I have already found a solution but I would like to know which method is being used by GLPK to solve the LP problem. My call is: model = Model(GLPK.Optimizer) #…

---

## [Why PlotlyJS is Better than GLMakie in Creating Torus 3-dimensional object?](https://discourse.julialang.org/t/why-plotlyjs-is-better-than-glmakie-in-creating-torus-3-dimensional-object/92105)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 14\
**Last updated:** [December 29, 2022, 11:20am UTC](https://discourse.julialang.org/t/why-plotlyjs-is-better-than-glmakie-in-creating-torus-3-dimensional-object/92105 "2022-12-29T11:20:35Z")

</div>

Hi all, Thanks from the help of people in this discourse, I have plotted with GLMakie with this code: using GLMakie using ColorSchemes # Torus equation to plot # R - sqrt(x^2 + y^2) + z^2 = r^2 # r -\> a (r is the radiu…

---

## [Upsampling and downsampling in Julia for unbalanced classes](https://discourse.julialang.org/t/upsampling-and-downsampling-in-julia-for-unbalanced-classes/16856)

<div class="topic-metadata">

**Author:** [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Replies:** 4\
**Last updated:** [December 29, 2022, 11:20am UTC](https://discourse.julialang.org/t/upsampling-and-downsampling-in-julia-for-unbalanced-classes/16856 "2022-12-29T11:20:04Z")

</div>

I use Imblearn package in python to do upsampling and downsampling for unbalanced classification problem. Is there a simple way to accomplish this in Julia?

---

## [How to save a data frame to file in Julia 1.8?](https://discourse.julialang.org/t/how-to-save-a-data-frame-to-file-in-julia-1-8/92133)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 8\
**Last updated:** [December 29, 2022, 10:50am UTC](https://discourse.julialang.org/t/how-to-save-a-data-frame-to-file-in-julia-1-8/92133 "2022-12-29T10:50:45Z")

</div>

Hello, I used to save a dataframe to a tsv file with using CSV, DataFrames CSV.write("./myFile.tsv", df; header=false, delim='\\t', append=false, decimal: '.', quotechar: '"') where df is the object containing the …

---

## [Where do I go wrong in solving this mathematical expression?](https://discourse.julialang.org/t/where-do-i-go-wrong-in-solving-this-mathematical-expression/92266)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 2\
**Last updated:** [December 29, 2022, 10:34am UTC](https://discourse.julialang.org/t/where-do-i-go-wrong-in-solving-this-mathematical-expression/92266 "2022-12-29T10:34:47Z")

</div>

Hello! I was not sure if I should have chosen “Off-topic” or this “Mathematical” section, so please move post to appropriate section. For now it is not a programming question I have, but more about how to solve this eq…

---

## [Implementation of Coalton like trait library in Julia](https://discourse.julialang.org/t/implementation-of-coalton-like-trait-library-in-julia/92236)

<div class="topic-metadata">

**Author:** [@kishaloy](https://discourse.julialang.org/u/kishaloy)\
**Replies:** 2\
**Last updated:** [December 29, 2022, 9:15am UTC](https://discourse.julialang.org/t/implementation-of-coalton-like-trait-library-in-julia/92236 "2022-12-29T09:15:59Z")

</div>

I was looking at the Coalton library in CL and I was quite impressed by what they have achieved in terms of getting an opt-in Haskell like typeclass system in Common Lisp. Since traits and type-stability has been one …

---

## [How to give y ticks in box plot](https://discourse.julialang.org/t/how-to-give-y-ticks-in-box-plot/92261)

<div class="topic-metadata">

**Author:** [@sai\_matcha](https://discourse.julialang.org/u/sai_matcha)\
**Replies:** 1\
**Last updated:** [December 29, 2022, 8:18am UTC](https://discourse.julialang.org/t/how-to-give-y-ticks-in-box-plot/92261 "2022-12-29T08:18:47Z")

</div>

Hi i have used below code for blox plot. Can someone say how can i give x and y labs to this, and x and y ticks to axis . eg: i want to give y axis name as “concentration”, x axis name as “Time in hrs” Yticks as (0,10,…

---

## [Performance of splitting string and parsing numbers](https://discourse.julialang.org/t/performance-of-splitting-string-and-parsing-numbers/92161)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 29\
**Last updated:** [December 29, 2022, 7:56am UTC](https://discourse.julialang.org/t/performance-of-splitting-string-and-parsing-numbers/92161 "2022-12-29T07:56:05Z")

</div>

Given a string of numbers that are grouped in blocks, I want to parse the numbers and find the total of each block, and then return the largest value from the totals. Each block is separated by two newline chars, and eac…

---

## [How to Fill Horizontal Slicing under a Curve?](https://discourse.julialang.org/t/how-to-fill-horizontal-slicing-under-a-curve/92218)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 1\
**Last updated:** [December 29, 2022, 7:12am UTC](https://discourse.julialang.org/t/how-to-fill-horizontal-slicing-under-a-curve/92218 "2022-12-29T07:12:41Z")

</div>

Hi all, this is only a simple fix needed, I want to fill an area like this image: I try but it created a square fill, I want the horizontal slicing to follow the shape of the curve. Can it be done? using Plots, LaTe…

---

## [Checking for singularity of matrix](https://discourse.julialang.org/t/checking-for-singularity-of-matrix/54746)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 6\
**Last updated:** [December 29, 2022, 5:09am UTC](https://discourse.julialang.org/t/checking-for-singularity-of-matrix/54746 "2022-12-29T05:09:31Z")

</div>

When doing linear algebra procedures such as A\\b or pinv(A), where A is a square matrix, is there a way to check for singularity of A ? Otherwise I keep getting errors such as SingularException(3) or LAPACKException(…

---

## [Weird string slicing in korean](https://discourse.julialang.org/t/weird-string-slicing-in-korean/92252)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 3\
**Last updated:** [December 29, 2022, 2:50am UTC](https://discourse.julialang.org/t/weird-string-slicing-in-korean/92252 "2022-12-29T02:50:06Z")

</div>

I have a trouble with korean string: julia\> julia = "julia" "julia" julia\> julia\[1:2\] "ju" julia\> julia = "줄리아" "줄리아" julia\> julia\[1:2\] ERROR: StringIndexError: invalid index \[2\], valid nearby indices \[1\]=\>'줄', \[4\]=\>'…

---

## [UpdateJulia](https://discourse.julialang.org/t/updatejulia/72128)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 15\
**Last updated:** [December 29, 2022, 1:58am UTC](https://discourse.julialang.org/t/updatejulia/72128 "2022-12-29T01:58:22Z")

</div>

Updating Julia should be easy. The easier it is, the more likely folks will develop with the latest versions, and the less friction we will have with fast paced language development. Currently, it is challenging. There …

---

## [How to import a module using \`jl\_module\_import\`?](https://discourse.julialang.org/t/how-to-import-a-module-using-jl-module-import/92254)

<div class="topic-metadata">

**Author:** [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)\
**Replies:** 0\
**Last updated:** [December 29, 2022, 1:53am UTC](https://discourse.julialang.org/t/how-to-import-a-module-using-jl-module-import/92254 "2022-12-29T01:53:29Z")

</div>

As the title describes, I want to use the C-API jl\_module\_import to import a package, but have not figured out how to do so. The stdlib modules, e.g., Libdl, LinearAlgebra seems to live in neither Base nor Core, then whi…

---

## [For loops issue](https://discourse.julialang.org/t/for-loops-issue/92227)

<div class="topic-metadata">

**Author:** [@Allan\_Olave](https://discourse.julialang.org/u/Allan_Olave)\
**Replies:** 15\
**Last updated:** [December 28, 2022, 11:35pm UTC](https://discourse.julialang.org/t/for-loops-issue/92227 "2022-12-28T23:35:48Z")

</div>

Running the following code in julia REPL x = 1.1; h = 0.1; x\_list = \[i for i in (x-2h):h:(x+2h)\] Gives the following output 0.9000000000000001 1.0000000000000002 1.1 1.2000000000000002 I’m expecting the output would…

---

## [Julia equivalent of C argument \`char \*\*attrlist\[\]\`](https://discourse.julialang.org/t/julia-equivalent-of-c-argument-char-attrlist/92169)

<div class="topic-metadata">

**Author:** [@mmv](https://discourse.julialang.org/u/mmv)\
**Replies:** 8\
**Last updated:** [December 28, 2022, 10:23pm UTC](https://discourse.julialang.org/t/julia-equivalent-of-c-argument-char-attrlist/92169 "2022-12-28T22:23:33Z")

</div>

Hi! I am trying to access from Julia a C function whose header is declared as follows: MTKt\_status MtkFileAttrList( const char \*filename, int \*attrcnt, char \*\*attrlist\[\] ); where the output argument attrlist sh…

---

## [Is \>5 min startup considered slow?](https://discourse.julialang.org/t/is-5-min-startup-considered-slow/69674)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 24\
**Last updated:** [December 28, 2022, 10:06pm UTC](https://discourse.julialang.org/t/is-5-min-startup-considered-slow/69674 "2022-12-28T22:06:26Z")

</div>

Hi, Activating Extensions... Starting Julia Language server 2:20 Julia Language Server: Indexing packages... 8:12 VScode closed and started again Activating Extensions... Starting Julia Language server 0:42 Julia Lang…

---

## [Index type of UnitRange{BigInt} changed from Int to BigInt after Julia 1.8: regression?](https://discourse.julialang.org/t/index-type-of-unitrange-bigint-changed-from-int-to-bigint-after-julia-1-8-regression/92199)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 3\
**Last updated:** [December 28, 2022, 2:15pm UTC](https://discourse.julialang.org/t/index-type-of-unitrange-bigint-changed-from-int-to-bigint-after-julia-1-8-regression/92199 "2022-12-28T14:15:39Z")

</div>

This expression returns Int on Julia 1.8, but BigInt beyond Julia 1.8: typeof(firstindex(map(BigInt, 1:1))) I think this might be a regression, but it seems like it could also have been done on purpose? This is arguab…

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

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