# Latest

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

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

**Page:** 347

---

## [Naming macro and function the same](https://discourse.julialang.org/t/naming-macro-and-function-the-same/117959)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 7\
**Last updated:** [August 9, 2024, 5:26am UTC](https://discourse.julialang.org/t/naming-macro-and-function-the-same/117959 "2024-08-09T05:26:13Z")

</div>

In the Source code of Reexport, they define a macro Reexport, inmediately define a behaviour (I assume macros can also have multiple dispatch…?) and then they define a function with the same name: macro reexport(ex::Exp…

---

## [Solving Diophantine equations using Julia](https://discourse.julialang.org/t/solving-diophantine-equations-using-julia/41829)

<div class="topic-metadata">

**Author:** [@Angel\_Barria\_Comiche](https://discourse.julialang.org/u/Angel_Barria_Comiche)\
**Replies:** 3\
**Last updated:** [August 9, 2024, 5:12am UTC](https://discourse.julialang.org/t/solving-diophantine-equations-using-julia/41829 "2024-08-09T05:12:42Z")

</div>

Hi, I am new with Julia and I was wondering how can I solve a system of diophantine equations adding conditions to some of the variables. For example, I would like to find integers x, y, p, h, r, t that solve the equatio…

---

## [MolecularGraph.jl error for drawing 3D molecule](https://discourse.julialang.org/t/moleculargraph-jl-error-for-drawing-3d-molecule/117963)

<div class="topic-metadata">

**Author:** [@beryl](https://discourse.julialang.org/u/beryl)\
**Replies:** 2\
**Last updated:** [August 9, 2024, 5:08am UTC](https://discourse.julialang.org/t/moleculargraph-jl-error-for-drawing-3d-molecule/117963 "2024-08-09T05:08:05Z")

</div>

Hi, I tried the example for drawing 3D molecules in https://mojaie.github.io/MolecularGraph.jl\_notebook/drawing\_molecule.html. (at the end of the page). However it gave an error when I called: spacefilling(mol) The e…

---

## [Cant use module normally](https://discourse.julialang.org/t/cant-use-module-normally/117973)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 4\
**Last updated:** [August 9, 2024, 12:55am UTC](https://discourse.julialang.org/t/cant-use-module-normally/117973 "2024-08-09T00:55:43Z")

</div>

In This tutorial they even have an online code executer in which they set the example of using a module. They first have a file mymodule.jl in which they write: \`module MyModule export sum\_function, resta function sum…

---

## [Type instability in list comprehensions](https://discourse.julialang.org/t/type-instability-in-list-comprehensions/117673)

<div class="topic-metadata">

**Author:** [@mwallerb](https://discourse.julialang.org/u/mwallerb)\
**Replies:** 46\
**Last updated:** [August 9, 2024, 12:28am UTC](https://discourse.julialang.org/t/type-instability-in-list-comprehensions/117673 "2024-08-09T00:28:47Z")

</div>

Consider the following code: julia\> x = \[1, 2\]; julia\> y = Float64\[\]; julia\> \[xi \* yi for xi in x for yi in y\] Any\[\] julia\> f(x, y) = \[xi \* yi for xi in x for yi in y\]; f(x, y) Float64\[\] so the whole thing is type-uns…

---

## [Makie crash](https://discourse.julialang.org/t/makie-crash/117942)

<div class="topic-metadata">

**Author:** [@sransome](https://discourse.julialang.org/u/sransome)\
**Replies:** 6\
**Last updated:** [August 8, 2024, 10:50pm UTC](https://discourse.julialang.org/t/makie-crash/117942 "2024-08-08T22:50:29Z")

</div>

I have a Makie based application that involves using the mesh! function. This line of code works fin in the repl but embedded in the application (its quite complex) everything crashes. Even the repl crashes. mesh!(spr…

---

## [Fastest way to perform A\[a,:\] \* B \* A’\[:,b\] where a and b are vectors of indices](https://discourse.julialang.org/t/fastest-way-to-perform-a-a-b-a-b-where-a-and-b-are-vectors-of-indices/117958)

<div class="topic-metadata">

**Author:** [@eveningsilverfox](https://discourse.julialang.org/u/eveningsilverfox)\
**Replies:** 5\
**Last updated:** [August 8, 2024, 8:37pm UTC](https://discourse.julialang.org/t/fastest-way-to-perform-a-a-b-a-b-where-a-and-b-are-vectors-of-indices/117958 "2024-08-08T20:37:31Z")

</div>

This question is a follow-up to To recap, given two dense square matrices with ComplexF64 elements of size approximately 100000X100000, A and B, what is the fastest way to perform R=ABA’, where A’=conj(tr(A)) is the He…

---

## [How to suggest path based on user input](https://discourse.julialang.org/t/how-to-suggest-path-based-on-user-input/117966)

<div class="topic-metadata">

**Author:** [@Shuvo\_Barman](https://discourse.julialang.org/u/Shuvo_Barman)\
**Replies:** 1\
**Last updated:** [August 8, 2024, 7:56pm UTC](https://discourse.julialang.org/t/how-to-suggest-path-based-on-user-input/117966 "2024-08-08T19:56:46Z")

</div>

I am creating a GUI using “Gtk” and in this GUI there is a field where user inputs path, I want to suggest path based on user input. But i am unable to do so, Any idea how i can suggest path to user based on the input s/…

---

## [ModellingToolkit and arrays](https://discourse.julialang.org/t/modellingtoolkit-and-arrays/117722)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [August 8, 2024, 5:47pm UTC](https://discourse.julialang.org/t/modellingtoolkit-and-arrays/117722 "2024-08-08T17:47:06Z")

</div>

I have the following code: # Example one: Falling mass. using ModelingToolkit, OrdinaryDiffEq G\_EARTH::Vector{Float64} = \[0.0, 0.0, -9.81\] # gravitational acceleration \[m/s²\] # definiting the model @independent…

---

## [This month in Julia world - 2024-07](https://discourse.julialang.org/t/this-month-in-julia-world-2024-07/117843)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 2\
**Last updated:** [August 5, 2024, 6:01pm UTC](https://discourse.julialang.org/t/this-month-in-julia-world-2024-07/117843 "2024-08-05T18:01:20Z")

</div>

A monthly newsletter, mostly on julia internals, digestible for casual observers. A biased, incomplete, editorialized list of what I found interesting this month, with contributions from the community. JuliaCon2024 happ…

---

## [How to get a Semi transparent sphere in Makie?](https://discourse.julialang.org/t/how-to-get-a-semi-transparent-sphere-in-makie/117944)

<div class="topic-metadata">

**Author:** [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Replies:** 2\
**Last updated:** [August 8, 2024, 5:37pm UTC](https://discourse.julialang.org/t/how-to-get-a-semi-transparent-sphere-in-makie/117944 "2024-08-08T17:37:47Z")

</div>

A few years back I asked a question, that I could not fully resolve. At JuliaCon I think I heard it is now possible, so I’ll give it a new try. If I do something like (e.g. in a Pluto cell) begin using WGLMakie, Colors,…

---

## [\[ANN\] Announcing YFinance.jl](https://discourse.julialang.org/t/ann-announcing-yfinance-jl/117962)

<div class="topic-metadata">

**Author:** [@EOhneberg](https://discourse.julialang.org/u/EOhneberg)\
**Replies:** 0\
**Last updated:** [August 8, 2024, 5:04pm UTC](https://discourse.julialang.org/t/ann-announcing-yfinance-jl/117962 "2024-08-08T17:04:09Z")

</div>

Hi, although this is not a new package I have never formally announced it. So here it goes: YFinance.jl was inspired by the yfinance python package but works much more similar to yahooquery from python - rather than imi…

---

## [Issue about "Pkg"](https://discourse.julialang.org/t/issue-about-pkg/117915)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 3\
**Last updated:** [August 8, 2024, 4:42pm UTC](https://discourse.julialang.org/t/issue-about-pkg/117915 "2024-08-08T16:42:01Z")

</div>

After I used Pkg.update() in VSCODE, Julia crashed and can not start anymore. I restarted the julia directly via executable Julia.exe in Windows, and errors were thrown like this What happened to my settings? Very we…

---

## [DataFrames range binning](https://discourse.julialang.org/t/dataframes-range-binning/93190)

<div class="topic-metadata">

**Author:** [@alex-s-gardner](https://discourse.julialang.org/u/alex-s-gardner)\
**Replies:** 4\
**Last updated:** [August 8, 2024, 4:07pm UTC](https://discourse.julialang.org/t/dataframes-range-binning/93190 "2024-08-08T16:07:03Z")

</div>

I would like to perform efficient block-wise statistics on binned variables… and I can’t find an elegant solution. given: using DataFrames df = DataFrame(x = rand(100000), y = rand(100000), v = rand(100000)) I would l…

---

## [SingularException(0) error in affineFEoperator](https://discourse.julialang.org/t/singularexception-0-error-in-affinefeoperator/117957)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 0\
**Last updated:** [August 8, 2024, 4:04pm UTC](https://discourse.julialang.org/t/singularexception-0-error-in-affinefeoperator/117957 "2024-08-08T16:04:06Z")

</div>

Hi I am using gridap for topology optimisation based on gridap tutorial 18. Based on the tutorial there are two domains for problem one for design variable and one another for entire domain. I did the same thing and i go…

---

## [Optimize splitting vector of strings](https://discourse.julialang.org/t/optimize-splitting-vector-of-strings/117924)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 10\
**Last updated:** [August 8, 2024, 1:27pm UTC](https://discourse.julialang.org/t/optimize-splitting-vector-of-strings/117924 "2024-08-08T13:27:50Z")

</div>

I am learning how to optimize julia code and came up with the following MWE: using BenchmarkTools, Profile strvec = \["AA entryA", "BBC entryB", "CCM entryC"\] function split\_vec(strvec) mat = stack(split.(strvec),…

---

## [JSON3 read \`Dict{Tuple{Int,Int}, T}\` unexpected behavior](https://discourse.julialang.org/t/json3-read-dict-tuple-int-int-t-unexpected-behavior/117759)

<div class="topic-metadata">

**Author:** [@guimarqu](https://discourse.julialang.org/u/guimarqu)\
**Replies:** 4\
**Last updated:** [August 8, 2024, 3:24pm UTC](https://discourse.julialang.org/t/json3-read-dict-tuple-int-int-t-unexpected-behavior/117759 "2024-08-08T15:24:33Z")

</div>

Hey, I’m using JSON3.jl in a project and I found this unexpected behavior when reading Dict{Tuple{Int,Int}, T}. I don’t know if I’m doing something wrong or if there is just a bug in the package but this is a quite cla…

---

## [Problem with Gamma function](https://discourse.julialang.org/t/problem-with-gamma-function/117941)

<div class="topic-metadata">

**Author:** [@Charles\_Nutter](https://discourse.julialang.org/u/Charles_Nutter)\
**Replies:** 5\
**Last updated:** [August 8, 2024, 2:38pm UTC](https://discourse.julialang.org/t/problem-with-gamma-function/117941 "2024-08-08T14:38:33Z")

</div>

Invoking the Gamma function fails. Although the Pkg.add downloads the algorithms. I had to write out the gamma function: gamma=quadgk(z-\> (t^(z-1)\*exp(z-t)),0,1,rtol=1e-4) (0.17730992497288517, 2.7755575615628914e-17) …

---

## [Square-Root Kalman-Filter: Calculate only upper triangular of QR-decomposition](https://discourse.julialang.org/t/square-root-kalman-filter-calculate-only-upper-triangular-of-qr-decomposition/55621)

<div class="topic-metadata">

**Author:** [@zsoerenm](https://discourse.julialang.org/u/zsoerenm)\
**Replies:** 9\
**Last updated:** [August 8, 2024, 1:23pm UTC](https://discourse.julialang.org/t/square-root-kalman-filter-calculate-only-upper-triangular-of-qr-decomposition/55621 "2024-08-08T13:23:54Z")

</div>

I’m implementing the Square-Root Kalman-Filter similar to this python implementation: Python - Square-Root Kalman-Filter The implementation calculates the QR-decomposition, but it only needs the upper triangular matrix…

---

## [Creating a conditional log](https://discourse.julialang.org/t/creating-a-conditional-log/117932)

<div class="topic-metadata">

**Author:** [@korch](https://discourse.julialang.org/u/korch)\
**Replies:** 9\
**Last updated:** [August 8, 2024, 12:47pm UTC](https://discourse.julialang.org/t/creating-a-conditional-log/117932 "2024-08-08T12:47:40Z")

</div>

Hi there! TLDR: I want to make a logger for my code that outputs the unevaluated expressions and evaluated expression sometimes - like on one time step. It seems the only way to do this is with a macro, but I can’t figu…

---

## [Get Literate.jl to ignore docstrings](https://discourse.julialang.org/t/get-literate-jl-to-ignore-docstrings/117951)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 4\
**Last updated:** [August 8, 2024, 12:41pm UTC](https://discourse.julialang.org/t/get-literate-jl-to-ignore-docstrings/117951 "2024-08-08T12:41:03Z")

</div>

How do I get Literate.jl to ignore docstrings? I have a \*.jl file defining functions. The functions have docstrings """ z = foo(x,y) Great functionality, easy to use. """ (parsed by Documenter.jl to generate the “r…

---

## [Unitful error in \`geojoin\`](https://discourse.julialang.org/t/unitful-error-in-geojoin/117894)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 12\
**Last updated:** [August 8, 2024, 11:13am UTC](https://discourse.julialang.org/t/unitful-error-in-geojoin/117894 "2024-08-08T11:13:28Z")

</div>

Following on from here… geo = GeoIO.load("os\_bng\_grids.gpkg"), layer=4) # Read the grid gpkg file abdf = CSV.read("addresses.csv", DataFrame) # Read the address file subset!(abdf, \[:X\_COORDINATE, :Y\_COORDINA…

---

## [MTK linearization: Change of use, or bug?](https://discourse.julialang.org/t/mtk-linearization-change-of-use-or-bug/117921)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 8\
**Last updated:** [August 8, 2024, 10:07am UTC](https://discourse.julialang.org/t/mtk-linearization-change-of-use-or-bug/117921 "2024-08-08T10:07:04Z")

</div>

I recently asked about a linearization problem I had – the problem persists. However, here I raise another question: ModelingToolkit linearization fails for a simple problem that used to work. Question: What is it I do …

---

## [ProfileView.@profview seemingly breaks reproducibility of my results](https://discourse.julialang.org/t/profileview-profview-seemingly-breaks-reproducibility-of-my-results/117893)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 6\
**Last updated:** [August 8, 2024, 9:23am UTC](https://discourse.julialang.org/t/profileview-profview-seemingly-breaks-reproducibility-of-my-results/117893 "2024-08-08T09:23:49Z")

</div>

I’ve written an algorithm (spanning many, many lines) to solve a certain optimal control problem, which involves both simulation and optimisation. To make sure that different runs provide the same results, I set ‘Random.…

---

## [\[ANN\] Announcing ThreadPinning.jl](https://discourse.julialang.org/t/ann-announcing-threadpinning-jl/92230)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 13\
**Last updated:** [August 8, 2024, 8:50am UTC](https://discourse.julialang.org/t/ann-announcing-threadpinning-jl/92230 "2024-08-08T08:50:37Z")

</div>

Hi all, It’s already been out there for a while but I nonetheless wanted to properly announce ThreadPinning.jl here. :slight\_smile: What is ThreadPinning.jl about? In short, it’s about pinning Julia threads to specific…

---

## [Run Julia from Julia](https://discourse.julialang.org/t/run-julia-from-julia/117945)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [August 8, 2024, 8:37am UTC](https://discourse.julialang.org/t/run-julia-from-julia/117945 "2024-08-08T08:37:17Z")

</div>

It would be comfortable if users could use a few of my packages like this: mkdir demo cd demo julia --project="." using Pkg pkg"add MyPackage" using MyPackage install() compile() Then restart Julia, and then the freshl…

---

## [Plots.jl custom linestyle: longer dashes](https://discourse.julialang.org/t/plots-jl-custom-linestyle-longer-dashes/117772)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 9\
**Last updated:** [August 8, 2024, 6:47am UTC](https://discourse.julialang.org/t/plots-jl-custom-linestyle-longer-dashes/117772 "2024-08-08T06:47:16Z")

</div>

I would like to insist whether there is a way to make a customized dash for the linestyle of Plots.jl, by choosing its length and the gap length as well among the dashes. There is a similar topic under Longer dashes in d…

---

## [Why need to pay more time when access the array at first time?](https://discourse.julialang.org/t/why-need-to-pay-more-time-when-access-the-array-at-first-time/117845)

<div class="topic-metadata">

**Author:** [@zhijie\_sun](https://discourse.julialang.org/u/zhijie_sun)\
**Replies:** 9\
**Last updated:** [August 8, 2024, 4:34am UTC](https://discourse.julialang.org/t/why-need-to-pay-more-time-when-access-the-array-at-first-time/117845 "2024-08-08T04:34:55Z")

</div>

I run the code below, and find we need more times when manipulate the array at the first time. I want to know why, and can we avoid it? function test() a = Vector{ComplexF64}(undef, 2^25) @time fill!(a, 0.0+0.0im) @t…

---

## [Registering package - automerge/decision — New package. Failed](https://discourse.julialang.org/t/registering-package-automerge-decision-new-package-failed/117937)

<div class="topic-metadata">

**Author:** [@zapiano](https://discourse.julialang.org/u/zapiano)\
**Replies:** 2\
**Last updated:** [August 8, 2024, 2:42am UTC](https://discourse.julialang.org/t/registering-package-automerge-decision-new-package-failed/117937 "2024-08-08T02:42:04Z")

</div>

I am trying to register this package: open-AIMS/CoralBlox.jl (github.com) to the general registry. What I did: I released a new version on Github I went to Register package · JuliaHub, clicked “Register package” and f…

---

## [Getter functions with constant output](https://discourse.julialang.org/t/getter-functions-with-constant-output/117853)

<div class="topic-metadata">

**Author:** [@jimclay75051](https://discourse.julialang.org/u/jimclay75051)\
**Replies:** 5\
**Last updated:** [August 8, 2024, 1:31am UTC](https://discourse.julialang.org/t/getter-functions-with-constant-output/117853 "2024-08-08T01:31:19Z")

</div>

I am reading “Julia as a Second Language” by Erik Engheim. It seems to be a very good book and I do recogmend it. However, it is not perfect. For those who have the book, my question refers to chapter eight, page 143, L…

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

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