# Latest

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

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

**Page:** 650

---

## [Discarding pmap’s results (pforeach?)](https://discourse.julialang.org/t/discarding-pmap-s-results-pforeach/101452)

<div class="topic-metadata">

**Author:** [@lmtzx9h4qqnt](https://discourse.julialang.org/u/lmtzx9h4qqnt)\
**Replies:** 2\
**Last updated:** [July 10, 2023, 8:56pm UTC](https://discourse.julialang.org/t/discarding-pmap-s-results-pforeach/101452 "2023-07-10T20:56:46Z")

</div>

I was wondering what the best way to use pmap (or something equivalent) is when I just want to do some operations in parallel without collecting any results in memory. Silly example: julia\> pmap(x -\> println(x), 1:10) 1…

---

## [Calling Julia from PyTorch](https://discourse.julialang.org/t/calling-julia-from-pytorch/101357)

<div class="topic-metadata">

**Author:** [@AMart](https://discourse.julialang.org/u/AMart)\
**Replies:** 4\
**Last updated:** [July 10, 2023, 7:31pm UTC](https://discourse.julialang.org/t/calling-julia-from-pytorch/101357 "2023-07-10T19:31:35Z")

</div>

Hello I have written a GPU kernel in Julia that I use to accelerate a custom layer that I have written to be used with PyTorch. Everything works great, except when I try to use DDP from PyTorch. Here is a simple MWE tha…

---

## [How do I reduce into an array index on a GPU?](https://discourse.julialang.org/t/how-do-i-reduce-into-an-array-index-on-a-gpu/101451)

<div class="topic-metadata">

**Author:** [@ejmeitz](https://discourse.julialang.org/u/ejmeitz)\
**Replies:** 0\
**Last updated:** [July 10, 2023, 7:20pm UTC](https://discourse.julialang.org/t/how-do-i-reduce-into-an-array-index-on-a-gpu/101451 "2023-07-10T19:20:09Z")

</div>

Hello all, This might be too niche but I am doing the following sparse tenor times matrix multiplication: A(n,m,l) = B(i,j,k) C(i,n) C(j,m)C(l,k) I can calculate a single element of the matrix A: A\[n,m,l\] where B is a…

---

## [Arrow stream writer and reader implementation questions](https://discourse.julialang.org/t/arrow-stream-writer-and-reader-implementation-questions/101438)

<div class="topic-metadata">

**Author:** [@schaefer0](https://discourse.julialang.org/u/schaefer0)\
**Replies:** 0\
**Last updated:** [July 10, 2023, 2:59pm UTC](https://discourse.julialang.org/t/arrow-stream-writer-and-reader-implementation-questions/101438 "2023-07-10T14:59:43Z")

</div>

Hi, I was using the python arrow function record\_batch and find that this does not exist in julia, but there is an arrow table function. However they don’t behave the same way. I have a customer requirement (that I can…

---

## [How to shut up CondaPkg](https://discourse.julialang.org/t/how-to-shut-up-condapkg/101446)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 0\
**Last updated:** [July 10, 2023, 6:30pm UTC](https://discourse.julialang.org/t/how-to-shut-up-condapkg/101446 "2023-07-10T18:30:12Z")

</div>

More than once per day I see these messages: Initializing the project... CondaPkg Found dependencies: /home/ufechner/.julia/packages/PythonCall/1f5yE/CondaPkg.toml CondaPkg Found dependencies: /home/ufechner/.ju…

---

## [AST from Julia source code?](https://discourse.julialang.org/t/ast-from-julia-source-code/101430)

<div class="topic-metadata">

**Author:** [@frylock](https://discourse.julialang.org/u/frylock)\
**Replies:** 5\
**Last updated:** [July 10, 2023, 6:28pm UTC](https://discourse.julialang.org/t/ast-from-julia-source-code/101430 "2023-07-10T18:28:07Z")

</div>

While browsing the devdocs for ast, the first table shows a transformation from f(x) to (call f x). Was there a function in Julia that performs this transformation, or was the documentation merely showing how an AST mig…

---

## [Behaviour of legend in AlgebraOfGraphics.jl](https://discourse.julialang.org/t/behaviour-of-legend-in-algebraofgraphics-jl/101371)

<div class="topic-metadata">

**Author:** [@martinmestre](https://discourse.julialang.org/u/martinmestre)\
**Replies:** 2\
**Last updated:** [July 10, 2023, 5:13pm UTC](https://discourse.julialang.org/t/behaviour-of-legend-in-algebraofgraphics-jl/101371 "2023-07-10T17:13:53Z")

</div>

Hi, I have made a MWE to show the behaviour I would like to avoid. I am plotting two curves, one of them with points and errobars, the other with lines. There are two problems. When avoiding the errorbars, in the legend …

---

## [Bad performance looping over SOAs with SIMD](https://discourse.julialang.org/t/bad-performance-looping-over-soas-with-simd/101264)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 3\
**Last updated:** [July 10, 2023, 4:31pm UTC](https://discourse.julialang.org/t/bad-performance-looping-over-soas-with-simd/101264 "2023-07-10T16:31:16Z")

</div>

I’m trying to write performant code (in particular a Monte Carlo simulation) and have been stumped by the SOA vs AOS debate for a while now. Generally, when trying to use SIMD, I have seen it’s recommended to use the SOA…

---

## [What should \`issorted\` return when an order isn't defined for the elements, but a comparison works?](https://discourse.julialang.org/t/what-should-issorted-return-when-an-order-isnt-defined-for-the-elements-but-a-comparison-works/101423)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [July 10, 2023, 3:02pm UTC](https://discourse.julialang.org/t/what-should-issorted-return-when-an-order-isnt-defined-for-the-elements-but-a-comparison-works/101423 "2023-07-10T15:02:09Z")

</div>

Currently, issorted returns true by default, even if the elements do not have a defined order. For example, julia\> issorted(\[NaN, NaN\]) true In this case, because NaN is a floating-point number, the comparison works, e…

---

## [AirBnB for JuliaCon 2023](https://discourse.julialang.org/t/airbnb-for-juliacon-2023/101332)

<div class="topic-metadata">

**Author:** [@cpfiffer](https://discourse.julialang.org/u/cpfiffer)\
**Replies:** 2\
**Last updated:** [July 10, 2023, 1:56pm UTC](https://discourse.julialang.org/t/airbnb-for-juliacon-2023/101332 "2023-07-10T13:56:47Z")

</div>

I’m looking into housing in Boston for JuliaCon and have found a few places that are cheap if we can get enough people. I’ve found a 4-bed and a 5-bed that are walking distance from the venue. If you’re interested in sh…

---

## [Social event sign-up for JuliaCon 2023](https://discourse.julialang.org/t/social-event-sign-up-for-juliacon-2023/101434)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 0\
**Last updated:** [July 10, 2023, 1:13pm UTC](https://discourse.julialang.org/t/social-event-sign-up-for-juliacon-2023/101434 "2023-07-10T13:13:26Z")

</div>

Hello all, we have created a sign-up form for the social events at JuliaCon 2023: JuliaCon 2023 Boston - Registration of interest for Social events Since many events require us to split people into smaller groups, we ne…

---

## [Integrating bash/Julia script](https://discourse.julialang.org/t/integrating-bash-julia-script/101167)

<div class="topic-metadata">

**Author:** [@99dB](https://discourse.julialang.org/u/99dB)\
**Replies:** 5\
**Last updated:** [July 10, 2023, 11:48am UTC](https://discourse.julialang.org/t/integrating-bash-julia-script/101167 "2023-07-10T11:48:45Z")

</div>

Hello all, I have some csv files and I want to read and process theme using a Julia script by running a bash script on a cluster. For each csv, I want an independent job on the cluster. Is there a smart way of doing th…

---

## [Multi Line TTY printing weirdness from the non-main thread](https://discourse.julialang.org/t/multi-line-tty-printing-weirdness-from-the-non-main-thread/100423)

<div class="topic-metadata">

**Author:** [@curtd](https://discourse.julialang.org/u/curtd)\
**Replies:** 1\
**Last updated:** [July 10, 2023, 11:24am UTC](https://discourse.julialang.org/t/multi-line-tty-printing-weirdness-from-the-non-main-thread/100423 "2023-07-10T11:24:27Z")

</div>

There’s some TTY-weirdness going on when I try to print a multi-line strings to stdout or stderr from a spawned task. Sometimes when printing a string with multiple line-breaks in it (although not always), the printed s…

---

## [Activating environment for a specific branch](https://discourse.julialang.org/t/activating-environment-for-a-specific-branch/101425)

<div class="topic-metadata">

**Author:** [@hzarei](https://discourse.julialang.org/u/hzarei)\
**Replies:** 1\
**Last updated:** [July 10, 2023, 11:20am UTC](https://discourse.julialang.org/t/activating-environment-for-a-specific-branch/101425 "2023-07-10T11:20:50Z")

</div>

Hello, I have created a development branch from the main branch for a package. Is it possible to activate another Julia environment for this branch that is slightly different?

---

## [Get index corresponding to some number in list of outputs](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 24\
**Last updated:** [July 10, 2023, 3:43am UTC](https://discourse.julialang.org/t/get-index-corresponding-to-some-number-in-list-of-outputs/101068 "2023-07-10T03:43:39Z")

</div>

I want to get indices in lines corresponding to A=0 in output. :face\_with\_monocle: My goal is to get out the data between row index 14 and 23 of the lines variable output in terms of variable i. using HTTP , Gumbo , C…

---

## [Calculating first integral](https://discourse.julialang.org/t/calculating-first-integral/101267)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 2\
**Last updated:** [July 10, 2023, 10:11am UTC](https://discourse.julialang.org/t/calculating-first-integral/101267 "2023-07-10T10:11:31Z")

</div>

Hello! I have an ODE system of 7 equations, and calculating the first integral analytically is a bit difficult for me. Are there packages for calculating the first integral of the ODE system? Thank you for help

---

## [Multi-threading appears to be single thread when some threads cost much more time than the others?](https://discourse.julialang.org/t/multi-threading-appears-to-be-single-thread-when-some-threads-cost-much-more-time-than-the-others/101353)

<div class="topic-metadata">

**Author:** [@WellWellww](https://discourse.julialang.org/u/WellWellww)\
**Replies:** 13\
**Last updated:** [July 10, 2023, 9:53am UTC](https://discourse.julialang.org/t/multi-threading-appears-to-be-single-thread-when-some-threads-cost-much-more-time-than-the-others/101353 "2023-07-10T09:53:45Z")

</div>

Hi, I have the following code section with millions of loops using multi-threading. global result\_list = Vector{Union{Nothing,SparseVector{Float64,Int64}}}(nothing, tot\_num) Threads.@threads for element in element\_list…

---

## [Broadcast over struct fields?](https://discourse.julialang.org/t/broadcast-over-struct-fields/101307)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 12\
**Last updated:** [July 10, 2023, 9:54am UTC](https://discourse.julialang.org/t/broadcast-over-struct-fields/101307 "2023-07-10T09:54:55Z")

</div>

For a struct with elements of the same type. Is there a way to broadcast operations over the elements, and create a new struct. Like you can for a Dictionary. struct X a::Float64 b::Float64 c::Float64 end…

---

## [Help to reduce memory allocations in a function](https://discourse.julialang.org/t/help-to-reduce-memory-allocations-in-a-function/101422)

<div class="topic-metadata">

**Author:** [@Lian\_Yunlong](https://discourse.julialang.org/u/Lian_Yunlong)\
**Replies:** 2\
**Last updated:** [July 10, 2023, 8:44am UTC](https://discourse.julialang.org/t/help-to-reduce-memory-allocations-in-a-function/101422 "2023-07-10T08:44:54Z")

</div>

Hello Julia experts, I have been working on the function shortest\_distance2\_t for quite a while, trying to optimise its performance. I do not have very advanced perf tools. Currently I use BenchmarkTools and PProf. I re…

---

## [Method of Lines for simple 2D Boussinesq convection?](https://discourse.julialang.org/t/method-of-lines-for-simple-2d-boussinesq-convection/101416)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 3\
**Last updated:** [July 10, 2023, 8:41am UTC](https://discourse.julialang.org/t/method-of-lines-for-simple-2d-boussinesq-convection/101416 "2023-07-10T08:41:51Z")

</div>

Hi everyone, I’m wondering if the method of lines can be used for a simple 2D convection: \\begin{aligned} \\frac{\\partial u}{\\partial x}+\\frac{\\partial w}{\\partial z} & =0 \\\\ \\frac{\\partial p}{\\partial x} & =\\frac{\\par…

---

## [Is it possible to incorporate the relational algebra technique into JuMP in the future to expedite model generation?](https://discourse.julialang.org/t/is-it-possible-to-incorporate-the-relational-algebra-technique-into-jump-in-the-future-to-expedite-model-generation/101343)

<div class="topic-metadata">

**Author:** [@JackaChou](https://discourse.julialang.org/u/JackaChou)\
**Replies:** 5\
**Last updated:** [July 10, 2023, 8:27am UTC](https://discourse.julialang.org/t/is-it-possible-to-incorporate-the-relational-algebra-technique-into-jump-in-the-future-to-expedite-model-generation/101343 "2023-07-10T08:27:20Z")

</div>

Recently, I came across a post titled “Performance in Optimization Models: A Comparative Analysis of GAMS, Pyomo, GurobiPy, and JuMP” (source: GAMS Blog) where it was observed that the commercial software GAMS demonstrat…

---

## ["equation(s) resulted in a non-finite number.." using MethodOfLines](https://discourse.julialang.org/t/equation-s-resulted-in-a-non-finite-number-using-methodoflines/101408)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 1\
**Last updated:** [July 10, 2023, 8:08am UTC](https://discourse.julialang.org/t/equation-s-resulted-in-a-non-finite-number-using-methodoflines/101408 "2023-07-10T08:08:20Z")

</div>

Hi all, It’s my first time using MethodOfLines so I’m not sure how to debug it. The (nondimensionalized) equations I’m trying to solve are: \\begin{aligned} & \\frac{\\partial u}{\\partial x}+\\frac{\\partial w}{\\partial z}…

---

## [CUDA on JuliaHub](https://discourse.julialang.org/t/cuda-on-juliahub/99028)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 4\
**Last updated:** [July 10, 2023, 6:36am UTC](https://discourse.julialang.org/t/cuda-on-juliahub/99028 "2023-07-10T06:36:43Z")

</div>

Using CUDA on JuliaHub gives the error julia\> using CUDA \[ Info: Precompiling CUDA \[052768ef-5323-5732-b1bb-66c8b64840ba\] ┌ Error: JULIA\_CUDA\_VERSION is deprecated. Call \`CUDA.jl.set\_runtime\_version!\` to use a differen…

---

## [Calculating the circumference of the Earth](https://discourse.julialang.org/t/calculating-the-circumference-of-the-earth/101375)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 19\
**Last updated:** [July 10, 2023, 5:52am UTC](https://discourse.julialang.org/t/calculating-the-circumference-of-the-earth/101375 "2023-07-10T05:52:09Z")

</div>

""" According to this website https://en.wikipedia.org/wiki/Wikipedia:Reference\_desk/Archives/Science/2006\_September\_27 I only need to use 64 decimal digits of Pi. However I need an additional 4 decimal digits for guard …

---

## [Caching metadata in custom broadcasting interface](https://discourse.julialang.org/t/caching-metadata-in-custom-broadcasting-interface/101289)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 6\
**Last updated:** [July 10, 2023, 12:52am UTC](https://discourse.julialang.org/t/caching-metadata-in-custom-broadcasting-interface/101289 "2023-07-10T00:52:35Z")

</div>

I’m trying to create a QuantityArray type for DynamicQuantities.jl (on the arrays-2 branch). Original announcement here: \[ANN\] DynamicQuantities.jl: type stable physical quantities. cc @non-Jedi The reason you would wan…

---

## [Base.Iterators.partition for Dict and Set](https://discourse.julialang.org/t/base-iterators-partition-for-dict-and-set/101414)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 0\
**Last updated:** [July 9, 2023, 11:53pm UTC](https://discourse.julialang.org/t/base-iterators-partition-for-dict-and-set/101414 "2023-07-09T23:53:07Z")

</div>

A recent blog post highlighted the usage of Base.Iterators.partition for correctly managing state in a multithreaded code. I checked how this function behaves on Dict and Set and found that it copies the data (see trace…

---

## [Symbolically solving system of linear equations](https://discourse.julialang.org/t/symbolically-solving-system-of-linear-equations/101397)

<div class="topic-metadata">

**Author:** [@maliesen](https://discourse.julialang.org/u/maliesen)\
**Replies:** 2\
**Last updated:** [July 9, 2023, 11:10pm UTC](https://discourse.julialang.org/t/symbolically-solving-system-of-linear-equations/101397 "2023-07-09T23:10:20Z")

</div>

Hello, I want to solve a system of linear equations, so I wrote: using Symbolics @variables a11, a12, a21, a22 @variables x1, x2 @variables b1, b2 solution = Symbolics.solve\_for(\[a11\*x1+a12\*x2~b1, a21\*x1+a22\*x2~b2\],\[…

---

## [Set fixed values in optimization](https://discourse.julialang.org/t/set-fixed-values-in-optimization/101337)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 5\
**Last updated:** [July 9, 2023, 8:25pm UTC](https://discourse.julialang.org/t/set-fixed-values-in-optimization/101337 "2023-07-09T20:25:15Z")

</div>

Hi, I am doing topology optimization using Nlopt. it seems that it incorrectly delete material under load line? do you know how can i silve this issue? also how can i set constant values in my domain. for example force t…

---

## [Vector assembly on dirichlet dof](https://discourse.julialang.org/t/vector-assembly-on-dirichlet-dof/101410)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 0\
**Last updated:** [July 9, 2023, 6:55pm UTC](https://discourse.julialang.org/t/vector-assembly-on-dirichlet-dof/101410 "2023-07-09T18:55:45Z")

</div>

Hi, I want to make a vector in my test space including dirichlet dofs and i run below code in gridap but it gives me the error indicating it belongs to interface. do you know how can i solve this? cv = assemble\_vect…

---

## [Limit / Measure Juliaprogram Memory / RAM consumption](https://discourse.julialang.org/t/limit-measure-juliaprogram-memory-ram-consumption/99523)

<div class="topic-metadata">

**Author:** [@Ralf\_Dietrich](https://discourse.julialang.org/u/Ralf_Dietrich)\
**Replies:** 3\
**Last updated:** [July 9, 2023, 6:21pm UTC](https://discourse.julialang.org/t/limit-measure-juliaprogram-memory-ram-consumption/99523 "2023-07-09T18:21:46Z")

</div>

I want to write a program where I can specify the maximum amount of RAM it can use after startup. I therefore need a function that shows me the current value of RAM that the running program is currently using. Can someo…

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

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