# Latest

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

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

**Page:** 876

---

## [What happens to overwritten Modules?](https://discourse.julialang.org/t/what-happens-to-overwritten-modules/89711)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 1\
**Last updated:** [November 3, 2022, 12:23pm UTC](https://discourse.julialang.org/t/what-happens-to-overwritten-modules/89711 "2022-11-03T12:23:01Z")

</div>

Some packages create a new sandbox module for each run of let’s say a document generator, or a code cell in a documenter project. Do these modules take up more and more space because they’re never removed? Or what are th…

---

## [REPL history interfering with RadioMenu navigation](https://discourse.julialang.org/t/repl-history-interfering-with-radiomenu-navigation/89703)

<div class="topic-metadata">

**Author:** [@AngusRussell](https://discourse.julialang.org/u/AngusRussell)\
**Replies:** 0\
**Last updated:** [November 3, 2022, 9:01am UTC](https://discourse.julialang.org/t/repl-history-interfering-with-radiomenu-navigation/89703 "2022-11-03T09:01:48Z")

</div>

I have a function that uses the REPL.TerminalMenus: RadioMenu to navigate through the local directory in order to select a file to load. The function works great when run directly in the REPL, however when I run it from …

---

## [Multi-threading not possible](https://discourse.julialang.org/t/multi-threading-not-possible/89698)

<div class="topic-metadata">

**Author:** [@Sam\_Curtis](https://discourse.julialang.org/u/Sam_Curtis)\
**Replies:** 3\
**Last updated:** [November 3, 2022, 8:28am UTC](https://discourse.julialang.org/t/multi-threading-not-possible/89698 "2022-11-03T08:28:19Z")

</div>

Hello all, I’ve been trying to increase the number of threads being used by julia in visual code. I tried initally through Julia to increase it, I have also tried using CMD (set JULIA\_NUM\_THREADS=4) as a new user can’…

---

## [How to structure a Gtk app](https://discourse.julialang.org/t/how-to-structure-a-gtk-app/89647)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 3\
**Last updated:** [November 3, 2022, 7:30am UTC](https://discourse.julialang.org/t/how-to-structure-a-gtk-app/89647 "2022-11-03T07:30:46Z")

</div>

When looking at Gyk examples a lot of the apps use global variables. How can this be avoided while keeping access to the model values(like data, a figure object,…) What I saw using Gtk win = GtkWindow() f = Figure() …

---

## [Performance comparison - Flux.jl's Adam vs Jax's Adam](https://discourse.julialang.org/t/performance-comparison-flux-jls-adam-vs-jaxs-adam/89553)

<div class="topic-metadata">

**Author:** [@richinex](https://discourse.julialang.org/u/richinex)\
**Replies:** 33\
**Last updated:** [November 3, 2022, 5:27am UTC](https://discourse.julialang.org/t/performance-comparison-flux-jls-adam-vs-jaxs-adam/89553 "2022-11-03T05:27:34Z")

</div>

Hello guys, I have been wondering about Julia’s performance and would like to know if it is really true that Julia is really faster than python as is always stated because I have not yet seen any performance gain since I…

---

## [Makie grid gui](https://discourse.julialang.org/t/makie-grid-gui/89549)

<div class="topic-metadata">

**Author:** [@sransome](https://discourse.julialang.org/u/sransome)\
**Replies:** 8\
**Last updated:** [November 3, 2022, 4:58am UTC](https://discourse.julialang.org/t/makie-grid-gui/89549 "2022-11-03T04:58:14Z")

</div>

Hi, I have been working on a project to create spreadsheet style gui for displaying data contained in either a Matrix or a Dataframe. I want to use Makie because I also make use of the powerful charting functionality m…

---

## [Non-allocating distance function](https://discourse.julialang.org/t/non-allocating-distance-function/89651)

<div class="topic-metadata">

**Author:** [@ynue](https://discourse.julialang.org/u/ynue)\
**Replies:** 6\
**Last updated:** [November 3, 2022, 4:33am UTC](https://discourse.julialang.org/t/non-allocating-distance-function/89651 "2022-11-03T04:33:05Z")

</div>

I have recently realised that isapprox(a, b) is for the most part equivalent to norm(a - b) \< tol. In particular when a and b are vectors, this implementation allocates the vector of the difference. julia\> a, b = rand(1…

---

## [How to linearize a conditional constraint in JuMP?](https://discourse.julialang.org/t/how-to-linearize-a-conditional-constraint-in-jump/89685)

<div class="topic-metadata">

**Author:** [@Alex\_ricci](https://discourse.julialang.org/u/Alex_ricci)\
**Replies:** 1\
**Last updated:** [November 3, 2022, 3:03am UTC](https://discourse.julialang.org/t/how-to-linearize-a-conditional-constraint-in-jump/89685 "2022-11-03T03:03:11Z")

</div>

Any proper way for linearizing this conditional constraint? if x \\leq 0 then y=0 if x \> 0 then y=1

---

## [Total memory size of collections](https://discourse.julialang.org/t/total-memory-size-of-collections/89682)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 1\
**Last updated:** [November 3, 2022, 2:36am UTC](https://discourse.julialang.org/t/total-memory-size-of-collections/89682 "2022-11-03T02:36:53Z")

</div>

how can I get the total memory size of arrays. using sizeof does not give the total memory footprint. for example, sizeof(\[1\])==sizeof(\["a"\])==sizeof(\["abcdef"\]) and sizeof(\[\[1,2\],\[3,4\]\])==sizeof(\[\[1,2,0\],\[3,4,0\]\]) …

---

## [T-Vector{m-element Vector{Float64}} into matrix](https://discourse.julialang.org/t/t-vector-m-element-vector-float64-into-matrix/89677)

<div class="topic-metadata">

**Author:** [@jertl](https://discourse.julialang.org/u/jertl)\
**Replies:** 4\
**Last updated:** [November 3, 2022, 12:33am UTC](https://discourse.julialang.org/t/t-vector-m-element-vector-float64-into-matrix/89677 "2022-11-03T00:33:59Z")

</div>

Hi, in my code I often use function broadcasting and then end up with objects A like T-element Vector{m-element Vector{Float64}}. I was wondering if there is an easy command to convert A into T-by-m or m-by-T matrix. I…

---

## [Error "KeyError: key false not found"](https://discourse.julialang.org/t/error-keyerror-key-false-not-found/89675)

<div class="topic-metadata">

**Author:** [@salmamelsherif](https://discourse.julialang.org/u/salmamelsherif)\
**Replies:** 1\
**Last updated:** [November 2, 2022, 11:20pm UTC](https://discourse.julialang.org/t/error-keyerror-key-false-not-found/89675 "2022-11-02T23:20:37Z")

</div>

I am trying to test my code where i use MCPModel and I keep getting this error: Test threw exception Expression: all(isapprox.(z\[I₊\] - u\[I₊\], 0; atol = tol)) KeyError: key false not found Code: function ensure\_corre…

---

## [Inconsistency in \`sum\` of an empty generator](https://discourse.julialang.org/t/inconsistency-in-sum-of-an-empty-generator/89638)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 5\
**Last updated:** [November 2, 2022, 3:46pm UTC](https://discourse.julialang.org/t/inconsistency-in-sum-of-an-empty-generator/89638 "2022-11-02T15:46:57Z")

</div>

On Julia 1.3, the following two empty generators both throw an error when you apply sum to them: julia\> g1 = (1 for i in Int\[\]); julia\> g2 = (x for x in \[-1\] if x \> 0); julia\> eltype(g1) Any julia\> eltype(g2) Any ju…

---

## [Declaring Types in NamedTuples](https://discourse.julialang.org/t/declaring-types-in-namedtuples/89504)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 8\
**Last updated:** [October 31, 2022, 4:49am UTC](https://discourse.julialang.org/t/declaring-types-in-namedtuples/89504 "2022-10-31T04:49:31Z")

</div>

Julia 1.8 introduces new syntax to declare types of global variables… julia\> y::Int = 3 3 julia\> y = 2.5 ERROR: InexactError: Int64(2.5) julia\> z::Number = π π = 3.1415926535897... julia\> z = 1+1im 1 + 1im julia\> z …

---

## [Can you solve wide matrices with LinearSolve.jl?](https://discourse.julialang.org/t/can-you-solve-wide-matrices-with-linearsolve-jl/89595)

<div class="topic-metadata">

**Author:** [@Ethan\_Leonard](https://discourse.julialang.org/u/Ethan_Leonard)\
**Replies:** 4\
**Last updated:** [November 2, 2022, 3:36am UTC](https://discourse.julialang.org/t/can-you-solve-wide-matrices-with-linearsolve-jl/89595 "2022-11-02T03:36:27Z")

</div>

New user here, trying to find an efficient way to iteratively solve lots of wide matrices in a loop. I came across LinearSolve.jl , but haven’t seen anything in the documentation about whether it can solve non-square ma…

---

## [\[ANN\] FlexiGroups.jl -- composable and general dataset group-bys](https://discourse.julialang.org/t/ann-flexigroups-jl-composable-and-general-dataset-group-bys/88998)

<div class="topic-metadata">

**Author:** [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Replies:** 1\
**Last updated:** [November 2, 2022, 9:06pm UTC](https://discourse.julialang.org/t/ann-flexigroups-jl-composable-and-general-dataset-group-bys/88998 "2022-11-02T21:06:26Z")

</div>

Arrange tabular or non-tabular datasets into groups according to a specified key function. Now registered in General The basic principle of FlexiGroups is that the result of a grouping operation is always a collectio…

---

## [How do I evaluate a probability mass function from Distributions?](https://discourse.julialang.org/t/how-do-i-evaluate-a-probability-mass-function-from-distributions/89673)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 2\
**Last updated:** [November 2, 2022, 8:26pm UTC](https://discourse.julialang.org/t/how-do-i-evaluate-a-probability-mass-function-from-distributions/89673 "2022-11-02T20:26:17Z")

</div>

I get 0 p=Distributions.Hypergeometric(100, 100, 200) Hypergeometric(ns=100, nf=100, n=200) pdf(p,4) 0.0

---

## [Convert string in text file into int](https://discourse.julialang.org/t/convert-string-in-text-file-into-int/89663)

<div class="topic-metadata">

**Author:** [@ahmad88](https://discourse.julialang.org/u/ahmad88)\
**Replies:** 3\
**Last updated:** [November 2, 2022, 7:14pm UTC](https://discourse.julialang.org/t/convert-string-in-text-file-into-int/89663 "2022-11-02T19:14:49Z")

</div>

I have the following textfile: initial=0 n=39 E=\[( 0 , 8 ), ( 0 , 13 ), ( 0 , 20 ), ( 0 , 22 ), ( 0 , 26 ), ( 0 , 36 ), ( 0 , 5 ), ( 0 , 10 ), ( 0 , 17 ), ( 0 , 27 ), ( 1 , 18 ), ( 2 , 5 ), ( 2 , 8 ), ( 3 …

---

## [Concatenation of NamedArrays while maintaining column names](https://discourse.julialang.org/t/concatenation-of-namedarrays-while-maintaining-column-names/89666)

<div class="topic-metadata">

**Author:** [@Filippati](https://discourse.julialang.org/u/Filippati)\
**Replies:** 2\
**Last updated:** [November 2, 2022, 7:16pm UTC](https://discourse.julialang.org/t/concatenation-of-namedarrays-while-maintaining-column-names/89666 "2022-11-02T19:16:47Z")

</div>

Hello everyone, I am trying to figure out how to concatenate NamedArrays while maintaining column names. using NamedArrays countriesq = \["USq", "CNq", "JPq", "FRq", "BDq", "ITq", "UKq"\] countriesr = \["USr", "CNr", "JPr…

---

## [Adding Hwloc as a julia dependency](https://discourse.julialang.org/t/adding-hwloc-as-a-julia-dependency/89664)

<div class="topic-metadata">

**Author:** [@gbaraldi](https://discourse.julialang.org/u/gbaraldi)\
**Replies:** 3\
**Last updated:** [November 2, 2022, 6:34pm UTC](https://discourse.julialang.org/t/adding-hwloc-as-a-julia-dependency/89664 "2022-11-02T18:34:18Z")

</div>

During the Multithreading BoF @kpamnany and I were discussing adding Hwloc as a dependency of julia itself. Some reasons for adding it to julia would be to simplify the cpu detection code we have. Currently there is a l…

---

## [Parameterize all types excluding a certain type](https://discourse.julialang.org/t/parameterize-all-types-excluding-a-certain-type/89639)

<div class="topic-metadata">

**Author:** [@HashBrown](https://discourse.julialang.org/u/HashBrown)\
**Replies:** 6\
**Last updated:** [November 2, 2022, 6:32pm UTC](https://discourse.julialang.org/t/parameterize-all-types-excluding-a-certain-type/89639 "2022-11-02T18:32:22Z")

</div>

Suppose I have a parameterized type Foo{T} with a field val::T, and an abstract type Bar. I would like to: # Library Code struct Foo{T} val::T end abstract type Bar end baz(bar::Bar, a::Foo, b::Foo) = baz(bar, a.v…

---

## [How to draw the grouped bar plot in julia(best using Vegalite)](https://discourse.julialang.org/t/how-to-draw-the-grouped-bar-plot-in-julia-best-using-vegalite/89659)

<div class="topic-metadata">

**Author:** [@akshdfyehd](https://discourse.julialang.org/u/akshdfyehd)\
**Replies:** 7\
**Last updated:** [November 2, 2022, 6:20pm UTC](https://discourse.julialang.org/t/how-to-draw-the-grouped-bar-plot-in-julia-best-using-vegalite/89659 "2022-11-02T18:20:01Z")

</div>

Hi, I need to draw a graph which is grouped bar chart, y axis will be salary, x axis will be job title, and I want to present each job title with employment type in different colors(this contains part time, full time, fr…

---

## [Caching of recompilation in CI](https://discourse.julialang.org/t/caching-of-recompilation-in-ci/89652)

<div class="topic-metadata">

**Author:** [@mmiller](https://discourse.julialang.org/u/mmiller)\
**Replies:** 1\
**Last updated:** [November 2, 2022, 6:06pm UTC](https://discourse.julialang.org/t/caching-of-recompilation-in-ci/89652 "2022-11-02T18:06:11Z")

</div>

Hey everyone, has anyone got caching of package precompilation working in CircleCI, or a similar CI tool? Ideally I’d instantiate and precompile according to a Project.toml, and then save the ~/.julia folder so that futu…

---

## [Parse String to Function](https://discourse.julialang.org/t/parse-string-to-function/89668)

<div class="topic-metadata">

**Author:** [@Ricardo\_Lima](https://discourse.julialang.org/u/Ricardo_Lima)\
**Replies:** 1\
**Last updated:** [November 2, 2022, 5:30pm UTC](https://discourse.julialang.org/t/parse-string-to-function/89668 "2022-11-02T17:30:19Z")

</div>

How to make this code work? #pkg\> add InverseLaplace using InverseLaplace import InverseLaplace: talbot f2(s) = s / (s^2 + 1); ft2 = Talbot(f2, 80); ft2(pi / 2) #corret f1(s) = Symbol("s / (s^2 + 1)") ft1 = Talbot(f1…

---

## [Reduce allocations for 3D Arrays](https://discourse.julialang.org/t/reduce-allocations-for-3d-arrays/89667)

<div class="topic-metadata">

**Author:** [@xspeng](https://discourse.julialang.org/u/xspeng)\
**Replies:** 10\
**Last updated:** [November 2, 2022, 5:26pm UTC](https://discourse.julialang.org/t/reduce-allocations-for-3d-arrays/89667 "2022-11-02T17:26:31Z")

</div>

When I solve large scale ODEs (136 equations), I try to extract some common factor and calculate them before using them in the equations, however that will take me a 3D array, which will take me quite a lot of allocation…

---

## [Package for selecting and inserting into MariaDB database?](https://discourse.julialang.org/t/package-for-selecting-and-inserting-into-mariadb-database/89016)

<div class="topic-metadata">

**Author:** [@tom-plaa](https://discourse.julialang.org/u/tom-plaa)\
**Replies:** 9\
**Last updated:** [November 2, 2022, 5:20pm UTC](https://discourse.julialang.org/t/package-for-selecting-and-inserting-into-mariadb-database/89016 "2022-11-02T17:20:20Z")

</div>

Sorry if this a really basic question, but I couldn’t filter useful information from the topics I have found here, I assume because of my inexperience in the subject. Since Monday, I’ve been trying to build and connect m…

---

## [Overwriting matrix elements of a different type](https://discourse.julialang.org/t/overwriting-matrix-elements-of-a-different-type/89572)

<div class="topic-metadata">

**Author:** [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Replies:** 12\
**Last updated:** [November 2, 2022, 4:58pm UTC](https://discourse.julialang.org/t/overwriting-matrix-elements-of-a-different-type/89572 "2022-11-02T16:58:34Z")

</div>

Suppose I have this matrix: M = \[1 2 3; 4 5 6\]; The type of M is Int64, but now I want to update one of the values to a non-integer: M\[1\] = pi Of course, the above just produces this error: ERROR: MethodError: no me…

---

## [\`help?\> X\` should suggest \`Base.X\` if \`X\` is an un-exported member of \`Base\`](https://discourse.julialang.org/t/help-x-should-suggest-base-x-if-x-is-an-un-exported-member-of-base/89539)

<div class="topic-metadata">

**Author:** [@bert](https://discourse.julialang.org/u/bert)\
**Replies:** 8\
**Last updated:** [November 2, 2022, 4:59pm UTC](https://discourse.julialang.org/t/help-x-should-suggest-base-x-if-x-is-an-un-exported-member-of-base/89539 "2022-11-02T16:59:16Z")

</div>

I think it would be helpful if when searching help?\> X for an object X that is defined in, but not exported from, Base, if the help?\> X menu offered to show you the documentation of Base.X rather than just say Couldn't f…

---

## [Iterate an observable](https://discourse.julialang.org/t/iterate-an-observable/89619)

<div class="topic-metadata">

**Author:** [@mgp](https://discourse.julialang.org/u/mgp)\
**Replies:** 2\
**Last updated:** [November 2, 2022, 4:47pm UTC](https://discourse.julialang.org/t/iterate-an-observable/89619 "2022-11-02T16:47:52Z")

</div>

I have an undirected simple graph and a vector of nodes that I want to colour red. The function plotg below allows this using CairoMakie, Graphs, GraphMakie function plotg(g, y) fig = Figure(); ax = Axis(fig\[1, 1\])…

---

## [Strange characters in windows terminal](https://discourse.julialang.org/t/strange-characters-in-windows-terminal/89355)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 15\
**Last updated:** [November 2, 2022, 2:46pm UTC](https://discourse.julialang.org/t/strange-characters-in-windows-terminal/89355 "2022-11-02T14:46:33Z")

</div>

I have the following code: function git\_pull() result = 0 try msg = readlines(\`$git pull --rebase\`) println(msg) catch e result = 1 end result end If I call this function fro…

---

## [Convert DataFrames 1.3 DataFrame to DataFrames 1.4](https://discourse.julialang.org/t/convert-dataframes-1-3-dataframe-to-dataframes-1-4/88267)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 14\
**Last updated:** [November 2, 2022, 2:10pm UTC](https://discourse.julialang.org/t/convert-dataframes-1-3-dataframe-to-dataframes-1-4/88267 "2022-11-02T14:10:59Z")

</div>

I serialized a DataFrame from DataFrames.jl@1.3. Can I convert it to be compatible with DataFrames.jl@1.4 so I can load it in an environment with the new version?

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

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