# Latest

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

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

**Page:** 1175

---

## [Performance benefits of multiple dispatch](https://discourse.julialang.org/t/performance-benefits-of-multiple-dispatch/73254)

<div class="topic-metadata">

**Author:** [@Niall](https://discourse.julialang.org/u/Niall)\
**Replies:** 20\
**Last updated:** [December 19, 2021, 1:03pm UTC](https://discourse.julialang.org/t/performance-benefits-of-multiple-dispatch/73254 "2021-12-19T13:03:14Z")

</div>

OK, so I thought it’d be a great idea to demonstrate to students on their very first lesson the performance benefits of Julia’s Top Notion: multiple dispatch. So I wrote the program shown below. Only problem is, the resu…

---

## [Recommended vscode workflow to run a module's tests interactively](https://discourse.julialang.org/t/recommended-vscode-workflow-to-run-a-modules-tests-interactively/73311)

<div class="topic-metadata">

**Author:** [@claforte](https://discourse.julialang.org/u/claforte)\
**Replies:** 5\
**Last updated:** [December 19, 2021, 11:12am UTC](https://discourse.julialang.org/t/recommended-vscode-workflow-to-run-a-modules-tests-interactively/73311 "2021-12-19T11:12:07Z")

</div>

Hi, I’m trying to run my module’s test line-by-line in vscode (as I used to when I had all my code in 1 file), so I can experiment with the REPL, and see the results of plots. More specifically, I opened runtests.jl: h…

---

## [How to get FreqTables to show all entries, not truncate?](https://discourse.julialang.org/t/how-to-get-freqtables-to-show-all-entries-not-truncate/73322)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 1\
**Last updated:** [December 19, 2021, 10:26am UTC](https://discourse.julialang.org/t/how-to-get-freqtables-to-show-all-entries-not-truncate/73322 "2021-12-19T10:26:27Z")

</div>

N = 200 df\_test = DataFrame(a = rand(1:30, N), b=rand(1:30, N)) freqtable(df\_test, :a, :b) This will truncate the middle values. I want to see the whole table. How can I? 30×30 Named Array{Int64,2} a ╲ b │ 1 2 3 …

---

## [How to include Julia REPL output along with code in a markdown code block](https://discourse.julialang.org/t/how-to-include-julia-repl-output-along-with-code-in-a-markdown-code-block/73316)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 4\
**Last updated:** [December 19, 2021, 7:50am UTC](https://discourse.julialang.org/t/how-to-include-julia-repl-output-along-with-code-in-a-markdown-code-block/73316 "2021-12-19T07:50:48Z")

</div>

Sometimes I see people include example code with output–for example here. How do I do that? I only know backticks and triple backticks.

---

## [Invalid index error using EAGO solver](https://discourse.julialang.org/t/invalid-index-error-using-eago-solver/73302)

<div class="topic-metadata">

**Author:** [@FH96](https://discourse.julialang.org/u/FH96)\
**Replies:** 3\
**Last updated:** [December 19, 2021, 5:45am UTC](https://discourse.julialang.org/t/invalid-index-error-using-eago-solver/73302 "2021-12-19T05:45:57Z")

</div>

Trying to solve a QP with EAGO I face this error LoadError: The index MathOptInterface.ConstraintIndex{MathOptInterface.SingleVariable, MathOptInterface.GreaterThan{Float64}}(-1) is invalid. Note that an index become…

---

## [Multithreaded mapping of an iterator (not a collection)](https://discourse.julialang.org/t/multithreaded-mapping-of-an-iterator-not-a-collection/47906)

<div class="topic-metadata">

**Author:** [@yarnton](https://discourse.julialang.org/u/yarnton)\
**Replies:** 11\
**Last updated:** [December 19, 2021, 3:27am UTC](https://discourse.julialang.org/t/multithreaded-mapping-of-an-iterator-not-a-collection/47906 "2021-12-19T03:27:39Z")

</div>

I’m trying to parallelize mapping a very large iterator (a FASTA.Reader from the FASTX package). The mapping operation is quite costly, and I have many cores, so I thought using threads would be appropriate. Ideally, I …

---

## [How to get the index of the rows with non-NaN values for multiple vectors?](https://discourse.julialang.org/t/how-to-get-the-index-of-the-rows-with-non-nan-values-for-multiple-vectors/73315)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 2\
**Last updated:** [December 19, 2021, 3:10am UTC](https://discourse.julialang.org/t/how-to-get-the-index-of-the-rows-with-non-nan-values-for-multiple-vectors/73315 "2021-12-19T03:10:44Z")

</div>

I have 4 vectors of data: A, B, C, D. My goal is to get the index of the rows where all 4 values being non-NaN. Here is my code: Ind1 = intersect.(.!isnan.(A), .!isnan.(B), .!isnan.(C), .!isnan.(D)); Why doesn’t it wo…

---

## [Turing model producing unexpected summary statistics](https://discourse.julialang.org/t/turing-model-producing-unexpected-summary-statistics/73312)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 2\
**Last updated:** [December 19, 2021, 2:25am UTC](https://discourse.julialang.org/t/turing-model-producing-unexpected-summary-statistics/73312 "2021-12-19T02:25:58Z")

</div>

I have a very simple Turing model where all variables are Normal or TruncatedNormal. For some reason, the summary statistics of the model are not the ones I expected. Can you please help with this MWE? using Turing usin…

---

## [Adding more links to materials on Julia YT channel](https://discourse.julialang.org/t/adding-more-links-to-materials-on-julia-yt-channel/73264)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 2\
**Last updated:** [December 18, 2021, 9:51pm UTC](https://discourse.julialang.org/t/adding-more-links-to-materials-on-julia-yt-channel/73264 "2021-12-18T21:51:11Z")

</div>

I write this post to make a case for small improvement of descriptions on Julia YT channel, while myself probably wouldn’t have time to do. I’m now try to make timestamps to some of videos there and this probably will fi…

---

## [Strange error when performing linear regression](https://discourse.julialang.org/t/strange-error-when-performing-linear-regression/73303)

<div class="topic-metadata">

**Author:** [@rkube](https://discourse.julialang.org/u/rkube)\
**Replies:** 3\
**Last updated:** [December 18, 2021, 10:01pm UTC](https://discourse.julialang.org/t/strange-error-when-performing-linear-regression/73303 "2021-12-18T22:01:39Z")

</div>

What is going on here? julia\> x = log.(Nz\_list\[1:end\]) 5-element Vector{Float64}: 4.1588830833596715 4.852030263919617 5.545177444479562 6.238324625039508 6.931471805599453 julia\> julia\> y = log.(dist\_list\[1:end…

---

## [Rethrow error from @async in macro](https://discourse.julialang.org/t/rethrow-error-from-async-in-macro/73244)

<div class="topic-metadata">

**Author:** [@tbenst](https://discourse.julialang.org/u/tbenst)\
**Replies:** 2\
**Last updated:** [December 18, 2021, 10:01pm UTC](https://discourse.julialang.org/t/rethrow-error-from-async-in-macro/73244 "2021-12-18T22:01:34Z")

</div>

I can’t figure out how to properly rethrow an error when using a macro + @async. This is related to Rethrow error from @async and How to get backtrace of \`@async\` Task - #2 by pfitzseb import Base.Threads: @spawn macr…

---

## [\[ANN\] PrettyNumbers.jl](https://discourse.julialang.org/t/ann-prettynumbers-jl/73272)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 12\
**Last updated:** [December 18, 2021, 9:05pm UTC](https://discourse.julialang.org/t/ann-prettynumbers-jl/73272 "2021-12-18T21:05:12Z")

</div>

Hi! Long time, no see :slight\_smile: I am passing through a very big change, I was pretty much off-line in the previous months. I just want to announce a very simple package called PrettyNumbers.jl. The idea is to form…

---

## [Understanding struct hashes](https://discourse.julialang.org/t/understanding-struct-hashes/73202)

<div class="topic-metadata">

**Author:** [@jerlich](https://discourse.julialang.org/u/jerlich)\
**Replies:** 13\
**Last updated:** [December 18, 2021, 6:45pm UTC](https://discourse.julialang.org/t/understanding-struct-hashes/73202 "2021-12-18T18:45:39Z")

</div>

When i change a dictionary the hash changes. julia\> d1 = Dict{Any,Any}() julia\> hash(d1) 0x172af099a2a3a421 julia\> d1\[:A\] = 13245 julia\> hash(d1) 0x9dee08cef4972aa5 If I make a struct with a dictionary the hash of th…

---

## [Another Debugger Problem](https://discourse.julialang.org/t/another-debugger-problem/72870)

<div class="topic-metadata">

**Author:** [@kw\_martin](https://discourse.julialang.org/u/kw_martin)\
**Replies:** 1\
**Last updated:** [December 18, 2021, 6:29pm UTC](https://discourse.julialang.org/t/another-debugger-problem/72870 "2021-12-18T18:29:49Z")

</div>

Still trying to figure out a reasonable debugging strategy. I keep going back and forth between Debugger and VSCode and can’t get either to work adequately. Biggest problem with VSCode is I can’t understand error message…

---

## [I Have a dream! a Green dream -- Does Julia save energy?](https://discourse.julialang.org/t/i-have-a-dream-a-green-dream-does-julia-save-energy/73188)

<div class="topic-metadata">

**Author:** [@SonOfSun](https://discourse.julialang.org/u/SonOfSun)\
**Replies:** 21\
**Last updated:** [December 18, 2021, 4:34pm UTC](https://discourse.julialang.org/t/i-have-a-dream-a-green-dream-does-julia-save-energy/73188 "2021-12-18T16:34:37Z")

</div>

This is not much of a question, more like a possible way to get some more attention to the Julia language. Everybody is talking about we need to save the planet and use less energy. I think it could be a great way to p…

---

## [Package import order change load time](https://discourse.julialang.org/t/package-import-order-change-load-time/73220)

<div class="topic-metadata">

**Author:** [@albheim](https://discourse.julialang.org/u/albheim)\
**Replies:** 2\
**Last updated:** [December 18, 2021, 4:07pm UTC](https://discourse.julialang.org/t/package-import-order-change-load-time/73220 "2021-12-18T16:07:59Z")

</div>

It seems like the order of loading packages can have some impact on the time, mostly got curious about why this happened. Looking at two packages for different load configurations I get albheim@gilbert ~\> hyperfine "ju…

---

## [Julia transplant](https://discourse.julialang.org/t/julia-transplant/73292)

<div class="topic-metadata">

**Author:** [@envyslee](https://discourse.julialang.org/u/envyslee)\
**Replies:** 1\
**Last updated:** [December 18, 2021, 1:31pm UTC](https://discourse.julialang.org/t/julia-transplant/73292 "2021-12-18T13:31:12Z")

</div>

Julia Version 1.6.3 LLVM 11.1.0 File: jltypes.c Function: typekeyvalue\_hash I am devloping a new backend for Julia. I have made some modification for now and I got the executable file Julia in path /usr/lib/bin. Ever…

---

## [Julia 1.7 fresh install breaks on updating Pkgs](https://discourse.julialang.org/t/julia-1-7-fresh-install-breaks-on-updating-pkgs/73062)

<div class="topic-metadata">

**Author:** [@AlanAylmer](https://discourse.julialang.org/u/AlanAylmer)\
**Replies:** 9\
**Last updated:** [December 18, 2021, 11:37am UTC](https://discourse.julialang.org/t/julia-1-7-fresh-install-breaks-on-updating-pkgs/73062 "2021-12-18T11:37:35Z")

</div>

Hello Ubuntu 20.04.3 LTS BASH 5.0.17 Julia 1.7 when I update I get a TOML parser error something to with GC and JuMP invalid bare character in my version 1.4 manifest I need Julia to work Should I just revert …

---

## [Profile garbage collection?](https://discourse.julialang.org/t/profile-garbage-collection/73263)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 3\
**Last updated:** [December 18, 2021, 5:36am UTC](https://discourse.julialang.org/t/profile-garbage-collection/73263 "2021-12-18T05:36:24Z")

</div>

Is there a way to profile the garbage collection? For example, to trace which are the variables that are being collected?

---

## [Package Manager resolve complaining of "Unsatisfiable requirements" due to "no known versions"](https://discourse.julialang.org/t/package-manager-resolve-complaining-of-unsatisfiable-requirements-due-to-no-known-versions/23778)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 6\
**Last updated:** [December 18, 2021, 6:50am UTC](https://discourse.julialang.org/t/package-manager-resolve-complaining-of-unsatisfiable-requirements-due-to-no-known-versions/23778 "2021-12-18T06:50:38Z")

</div>

I frequently get the following error with packages that I’m developing. I usually manage to resolve it but without any understanding or repeatability. How do I tell julia about versions for a package? Am I supposed to…

---

## [Simple Vulkan tutorial? Ideally integrated with CImGUI.jl](https://discourse.julialang.org/t/simple-vulkan-tutorial-ideally-integrated-with-cimgui-jl/73267)

<div class="topic-metadata">

**Author:** [@claforte](https://discourse.julialang.org/u/claforte)\
**Replies:** 1\
**Last updated:** [December 18, 2021, 6:36am UTC](https://discourse.julialang.org/t/simple-vulkan-tutorial-ideally-integrated-with-cimgui-jl/73267 "2021-12-18T06:36:31Z")

</div>

Is anyone aware of an existing tutorial that combines Vulkan.jl and ideally CImGUI.jl? If not, I might bite the bullet during the Christmas vacations and try to do it myself, and if so, keep posting to this discussion (i…

---

## [Again on reaching optimal parallel scaling](https://discourse.julialang.org/t/again-on-reaching-optimal-parallel-scaling/73203)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 21\
**Last updated:** [December 18, 2021, 2:38am UTC](https://discourse.julialang.org/t/again-on-reaching-optimal-parallel-scaling/73203 "2021-12-18T02:38:34Z")

</div>

This is somewhat vague, and quite certainly not Julia specific, so any bibliography, reference, experience, is appreciated. I am benchmarking an implementation of cell lists to compute particle interactions and other pr…

---

## [Failed to precompile the Turing package](https://discourse.julialang.org/t/failed-to-precompile-the-turing-package/73283)

<div class="topic-metadata">

**Author:** [@joekang](https://discourse.julialang.org/u/joekang)\
**Replies:** 6\
**Last updated:** [December 17, 2021, 11:01pm UTC](https://discourse.julialang.org/t/failed-to-precompile-the-turing-package/73283 "2021-12-17T23:01:11Z")

</div>

Hello, I am trying to precompile the Turing package, but failed to do so with the following error messages. There was no error message when I added Turing. I use Ubuntu 20.04 LTS with a Dell laptop. I will appreciate if…

---

## [Selecting rows from a data frame using multiple conditions](https://discourse.julialang.org/t/selecting-rows-from-a-data-frame-using-multiple-conditions/73282)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 1\
**Last updated:** [December 17, 2021, 9:07pm UTC](https://discourse.julialang.org/t/selecting-rows-from-a-data-frame-using-multiple-conditions/73282 "2021-12-17T21:07:22Z")

</div>

I want to select rows from a data frame using multiple conditions This works with only one condition: d\_f = DataFrame(A=\[ 1, 3, 4, 7, 9\], B=\["a", "c", "c", "D", "c"\]) d\_f\[(d\_f.B .== "c"), :\] Adding a second, this does…

---

## [Anonymous functions slower than proper functions?](https://discourse.julialang.org/t/anonymous-functions-slower-than-proper-functions/73275)

<div class="topic-metadata">

**Author:** [@FHell](https://discourse.julialang.org/u/FHell)\
**Replies:** 2\
**Last updated:** [December 17, 2021, 7:18pm UTC](https://discourse.julialang.org/t/anonymous-functions-slower-than-proper-functions/73275 "2021-12-17T19:18:29Z")

</div>

Is this expected behavior? I see a performance difference of a factor two for very simple functions. E.g.: using BenchmarkTools g1 = t -\> cos(t - 0.5 \* t^2) g2(t) = cos(t - 0.5 \* t^2) function h1() x = 0. for …

---

## [Macro to serialize a linear solver code](https://discourse.julialang.org/t/macro-to-serialize-a-linear-solver-code/73259)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 3\
**Last updated:** [December 17, 2021, 5:31pm UTC](https://discourse.julialang.org/t/macro-to-serialize-a-linear-solver-code/73259 "2021-12-17T17:31:06Z")

</div>

Hi, I am converting a Matlab code to Julia, learning metaprogramming and macros. The code converts a linear solver algorithm into a sequence of operations mapping all variables to a single vector (target language lim…

---

## [Best Way of Handling Shapefiles in Makie](https://discourse.julialang.org/t/best-way-of-handling-shapefiles-in-makie/71028)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 12\
**Last updated:** [December 17, 2021, 5:06pm UTC](https://discourse.julialang.org/t/best-way-of-handling-shapefiles-in-makie/71028 "2021-12-17T17:06:56Z")

</div>

Hi all, What is the best way handle shapefiles with Makie? For example, I have a shapefile that defines the states for each state in the United States. DataFrames can handle displaying the shapefile as follows: julia\>s…

---

## [Practical Spatial Analysis Packages in Julia](https://discourse.julialang.org/t/practical-spatial-analysis-packages-in-julia/73177)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 3\
**Last updated:** [December 17, 2021, 2:44pm UTC](https://discourse.julialang.org/t/practical-spatial-analysis-packages-in-julia/73177 "2021-12-17T14:44:27Z")

</div>

Hello Watchers: I have found a listing of geospatial packages, here I am attempting to achieve two top level actions: Convert addresses to LAT/LON within Julia Display specified values via color-shading against a c…

---

## [Image peak finder with thresholding and minimum distance](https://discourse.julialang.org/t/image-peak-finder-with-thresholding-and-minimum-distance/73268)

<div class="topic-metadata">

**Author:** [@Aju](https://discourse.julialang.org/u/Aju)\
**Replies:** 0\
**Last updated:** [December 17, 2021, 3:55pm UTC](https://discourse.julialang.org/t/image-peak-finder-with-thresholding-and-minimum-distance/73268 "2021-12-17T15:55:17Z")

</div>

Hi, could any suggest to me a peak finder function for a 2D image with options to input threshold value for peak finding and option to enter minimum spacing between the peaks? I am effectively looking for an Julia func…

---

## [Readdlm() Reading Out of Order](https://discourse.julialang.org/t/readdlm-reading-out-of-order/73238)

<div class="topic-metadata">

**Author:** [@ducksoverip](https://discourse.julialang.org/u/ducksoverip)\
**Replies:** 2\
**Last updated:** [December 17, 2021, 3:16pm UTC](https://discourse.julialang.org/t/readdlm-reading-out-of-order/73238 "2021-12-17T15:16:41Z")

</div>

Hi, I’m a somewhat novice Fortran programmer (I use Fortran 90 for physics research, but have had no formal training as a programmer) dipping my toes into Julia as a possible replacement language. Naturally, I started o…

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

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