# Latest

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

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

**Page:** 1305

---

## [\`addprocs\` crashes with \`connection refused (ECONNREFUSED)\`](https://discourse.julialang.org/t/addprocs-crashes-with-connection-refused-econnrefused/66099)

<div class="topic-metadata">

**Author:** [@Volker\_Weissmann](https://discourse.julialang.org/u/Volker_Weissmann)\
**Replies:** 0\
**Last updated:** [August 9, 2021, 11:55pm UTC](https://discourse.julialang.org/t/addprocs-crashes-with-connection-refused-econnrefused/66099 "2021-08-09T23:55:23Z")

</div>

I ssh’d into a machine that is (afaik) not virtualized or anything and ran JULIA\_EXCLUSIVE=1 julia-1.6.2/bin/julia --threads 128 langevin/langevin.jl &\> out.txt & and it crashed with the output below. langevin.jl star…

---

## [How do I find a type conversion function? PosixPath -\> String](https://discourse.julialang.org/t/how-do-i-find-a-type-conversion-function-posixpath-string/66097)

<div class="topic-metadata">

**Author:** [@banksiaboy](https://discourse.julialang.org/u/banksiaboy)\
**Replies:** 7\
**Last updated:** [August 9, 2021, 11:24pm UTC](https://discourse.julialang.org/t/how-do-i-find-a-type-conversion-function-posixpath-string/66097 "2021-08-09T23:24:16Z")

</div>

I have been starting to use FilePathsBase.jl to manipulate paths, but its PosixPath type is not a subtype of AbstractString. If I try to open ZipFile.Reader on a PosixPath, it fails because there is no version of ZipFi…

---

## [Using a C++ library with Julia 1.\*.\*](https://discourse.julialang.org/t/using-a-c-library-with-julia-1/17573)

<div class="topic-metadata">

**Author:** [@Luis\_de\_Sousa](https://discourse.julialang.org/u/Luis_de_Sousa)\
**Replies:** 32\
**Last updated:** [August 9, 2021, 10:26pm UTC](https://discourse.julialang.org/t/using-a-c-library-with-julia-1/17573 "2021-08-09T22:26:05Z")

</div>

In the index page of julialang.org is stated: you can easily use libraries from Python, R, C/Fortran, C++, and Java The C++ bit links to a library called Cxx that fails to install on Julia 1.0.0 and 1.0.2 and seems t…

---

## [Trouble with Internal Constructor](https://discourse.julialang.org/t/trouble-with-internal-constructor/66094)

<div class="topic-metadata">

**Author:** [@Jeff\_Becker](https://discourse.julialang.org/u/Jeff_Becker)\
**Replies:** 6\
**Last updated:** [August 9, 2021, 9:33pm UTC](https://discourse.julialang.org/t/trouble-with-internal-constructor/66094 "2021-08-09T21:33:11Z")

</div>

I’m trying to do the following: julia\> mutable struct CustomSet{T} elements:: Vector{T} CustomSet(e) = new{CustomSet{T}}(sort(e)) end I expect the inner constructor to return a new CustomSet with the Vector e sorted…

---

## [Interactive Gadfly plots in vscode plot pane](https://discourse.julialang.org/t/interactive-gadfly-plots-in-vscode-plot-pane/59020)

<div class="topic-metadata">

**Author:** [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Replies:** 4\
**Last updated:** [August 9, 2021, 9:16pm UTC](https://discourse.julialang.org/t/interactive-gadfly-plots-in-vscode-plot-pane/59020 "2021-08-09T21:16:06Z")

</div>

I am testing the beautiful plotting package Gadfly for my workflow, and I am missing interactivity in the VS Code plot pane. Is there way how to get it?

---

## [Can macros know if a variable is local or global?](https://discourse.julialang.org/t/can-macros-know-if-a-variable-is-local-or-global/66093)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 3\
**Last updated:** [August 9, 2021, 8:58pm UTC](https://discourse.julialang.org/t/can-macros-know-if-a-variable-is-local-or-global/66093 "2021-08-09T20:58:12Z")

</div>

I’m writing a macro that walks the expression tree of a function definition, and would like to know if certain variables are local or global, e.g. if it saw @mymacro function foo() x = 1 return x + y end it nee…

---

## [Is it possible to update the documentation to specify why using parametric methods might be beneficial?](https://discourse.julialang.org/t/is-it-possible-to-update-the-documentation-to-specify-why-using-parametric-methods-might-be-beneficial/66089)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 1\
**Last updated:** [August 9, 2021, 8:31pm UTC](https://discourse.julialang.org/t/is-it-possible-to-update-the-documentation-to-specify-why-using-parametric-methods-might-be-beneficial/66089 "2021-08-09T20:31:01Z")

</div>

Consider the following example from the documentation same\_type(x::T, y::T) where {T} = true same\_type(x,y) = false same\_type(1, 2) # True same\_type(1, 2.0) # False A new comer might wonder why they just can’t write i…

---

## [Plotting for Julia Reinforcement Learning policies](https://discourse.julialang.org/t/plotting-for-julia-reinforcement-learning-policies/66090)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 0\
**Last updated:** [August 9, 2021, 8:30pm UTC](https://discourse.julialang.org/t/plotting-for-julia-reinforcement-learning-policies/66090 "2021-08-09T20:30:16Z")

</div>

I have not done much work with reinforcement learning before, so I was looking over some books on RL algorithms etc., The JuliaReinforcmentLearning organization has put together a really nice package with lots of algorit…

---

## [Confused by extra allocations](https://discourse.julialang.org/t/confused-by-extra-allocations/66086)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 4\
**Last updated:** [August 9, 2021, 8:08pm UTC](https://discourse.julialang.org/t/confused-by-extra-allocations/66086 "2021-08-09T20:08:21Z")

</div>

I’ve written a function that loops over a large table and is running slower than I expected. The source of the problem seems to be a huge amount of extra allocations. I’ve created the following minimal example that dem…

---

## [About mapping functions and a deepmap!() function](https://discourse.julialang.org/t/about-mapping-functions-and-a-deepmap-function/51702)

<div class="topic-metadata">

**Author:** [@rapasite](https://discourse.julialang.org/u/rapasite)\
**Replies:** 4\
**Last updated:** [August 9, 2021, 7:04pm UTC](https://discourse.julialang.org/t/about-mapping-functions-and-a-deepmap-function/51702 "2021-08-09T19:04:59Z")

</div>

I was thinking about how to apply a function f() to all items of a collections I knew that my function needed: first to reach every items in my collection second apply the function f to those items I decide to solve …

---

## [VegaLite: tex support + edit legend](https://discourse.julialang.org/t/vegalite-tex-support-edit-legend/66046)

<div class="topic-metadata">

**Author:** [@jo-fleck](https://discourse.julialang.org/u/jo-fleck)\
**Replies:** 1\
**Last updated:** [August 9, 2021, 6:47pm UTC](https://discourse.julialang.org/t/vegalite-tex-support-edit-legend/66046 "2021-08-09T18:47:19Z")

</div>

Thanks to everyone who is contributing to VegaLite.jl! It’s a fantastic addition to Julia’s plotting ecosystem. Using the examples in the documentation, I was able to generate the plot below. I have two questions relat…

---

## [Problem installing SymPy on Windows 10 system](https://discourse.julialang.org/t/problem-installing-sympy-on-windows-10-system/65906)

<div class="topic-metadata">

**Author:** [@rsavageatx](https://discourse.julialang.org/u/rsavageatx)\
**Replies:** 5\
**Last updated:** [August 9, 2021, 5:55pm UTC](https://discourse.julialang.org/t/problem-installing-sympy-on-windows-10-system/65906 "2021-08-09T17:55:38Z")

</div>

I am having difficulty installing SymPy. I keep getting the following error message after I type “using SymPy” into the REPL: julia\> using SymPy \[ Info: Installing sympy via the Conda sympy package… \[ Info: Running co…

---

## [Vector{Dict} to Tables.jl table](https://discourse.julialang.org/t/vector-dict-to-tables-jl-table/66084)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 0\
**Last updated:** [August 9, 2021, 5:54pm UTC](https://discourse.julialang.org/t/vector-dict-to-tables-jl-table/66084 "2021-08-09T17:54:48Z")

</div>

What’s the most performant way to get a vector of dicts into a Tables.jl table? For example, data = \[ Dict("id" =\> 1, "name" =\> "Bob"), Dict("id" =\> 2, "name" =\> "Bill"), Dict("id" =\> 3, "name" =\> "Betty"),…

---

## [Add a deepmap! function](https://discourse.julialang.org/t/add-a-deepmap-function/66083)

<div class="topic-metadata">

**Author:** [@rapasite](https://discourse.julialang.org/u/rapasite)\
**Replies:** 0\
**Last updated:** [August 9, 2021, 5:13pm UTC](https://discourse.julialang.org/t/add-a-deepmap-function/66083 "2021-08-09T17:13:11Z")

</div>

I created a pull request: https://github.com/JuliaLang/julia/pull/41845 see discussion here: https://discourse.julialang.org/t/about-mapping-functions-and-a-deepmap-function/51702/2

---

## [\[Question\] specifying the type of inputs of Function](https://discourse.julialang.org/t/question-specifying-the-type-of-inputs-of-function/66078)

<div class="topic-metadata">

**Author:** [@Zerosum](https://discourse.julialang.org/u/Zerosum)\
**Replies:** 4\
**Last updated:** [August 9, 2021, 5:09pm UTC](https://discourse.julialang.org/t/question-specifying-the-type-of-inputs-of-function/66078 "2021-08-09T17:09:23Z")

</div>

I was self-studying about specifying the type of inputs of a function. I came across with this example. function Date(y::Int64, m::Int64=1, d::Int64=1) err = validargs(Date, y, m, d) err === nothing || throw(er…

---

## [Do I need to specify concrete type of a variable such as Int64 or just Int, Float64 or just Float?](https://discourse.julialang.org/t/do-i-need-to-specify-concrete-type-of-a-variable-such-as-int64-or-just-int-float64-or-just-float/66047)

<div class="topic-metadata">

**Author:** [@CRquantum](https://discourse.julialang.org/u/CRquantum)\
**Replies:** 10\
**Last updated:** [August 9, 2021, 4:52pm UTC](https://discourse.julialang.org/t/do-i-need-to-specify-concrete-type-of-a-variable-such-as-int64-or-just-int-float64-or-just-float/66047 "2021-08-09T16:52:21Z")

</div>

In Julia, do I need to really set very specific and concrete type of the variable? Like, i::Int64 or i::Int and x::Float or x::Float64 Is there performance difference? Or, like, is it just using Int and Float i…

---

## [Composing collection of iterators that accept iterators and collecting the result](https://discourse.julialang.org/t/composing-collection-of-iterators-that-accept-iterators-and-collecting-the-result/66082)

<div class="topic-metadata">

**Author:** [@djholiver](https://discourse.julialang.org/u/djholiver)\
**Replies:** 0\
**Last updated:** [August 9, 2021, 4:41pm UTC](https://discourse.julialang.org/t/composing-collection-of-iterators-that-accept-iterators-and-collecting-the-result/66082 "2021-08-09T16:41:25Z")

</div>

Hi, I have a series of methods that return the relevant query indexes for a filter type e.g. “Between(0,500\]” or “name = Julia” that are combined: function queryModelCollection(iQuery :: QueryModels.QueryModel, data :…

---

## [How to resize a 2D or higher dimensional array?](https://discourse.julialang.org/t/how-to-resize-a-2d-or-higher-dimensional-array/66055)

<div class="topic-metadata">

**Author:** [@CRquantum](https://discourse.julialang.org/u/CRquantum)\
**Replies:** 7\
**Last updated:** [August 9, 2021, 2:47pm UTC](https://discourse.julialang.org/t/how-to-resize-a-2d-or-higher-dimensional-array/66055 "2021-08-09T14:47:12Z")

</div>

in a module, can I define a unspecified dimension array first, and then in a function give its particular dimensions? Like global const a=Array{Float64,2}() But obviously the above give me an array. However, the poin…

---

## [Manipulate trace Optim.jl](https://discourse.julialang.org/t/manipulate-trace-optim-jl/66072)

<div class="topic-metadata">

**Author:** [@AhmedAlreweny](https://discourse.julialang.org/u/AhmedAlreweny)\
**Replies:** 0\
**Last updated:** [August 9, 2021, 1:41pm UTC](https://discourse.julialang.org/t/manipulate-trace-optim-jl/66072 "2021-08-09T13:41:57Z")

</div>

Hi, I am using Optim.jl to minimize a certain objective function which includes some secondary calculations. I use algo\_ = LBFGS(;alphaguess =InitialHagerZhang(), linesearch = LineSearches.StrongWolfe()) a = Optim…

---

## [How do I run a function in a process and afterwards terminate the process?](https://discourse.julialang.org/t/how-do-i-run-a-function-in-a-process-and-afterwards-terminate-the-process/66056)

<div class="topic-metadata">

**Author:** [@pitsianis](https://discourse.julialang.org/u/pitsianis)\
**Replies:** 0\
**Last updated:** [August 9, 2021, 4:55am UTC](https://discourse.julialang.org/t/how-do-i-run-a-function-in-a-process-and-afterwards-terminate-the-process/66056 "2021-08-09T04:55:59Z")

</div>

Hello! Suppose I have the module Amodule containing a function: module Amodule function twice(x) 2 .\* x end end I need to run Amodule.twice on a worker process that I terminate afterward from another module: modu…

---

## [Inconsistent performance Julia 1.6 vs 1.5 on Linux](https://discourse.julialang.org/t/inconsistent-performance-julia-1-6-vs-1-5-on-linux/65885)

<div class="topic-metadata">

**Author:** [@Erhan](https://discourse.julialang.org/u/Erhan)\
**Replies:** 10\
**Last updated:** [August 9, 2021, 12:30pm UTC](https://discourse.julialang.org/t/inconsistent-performance-julia-1-6-vs-1-5-on-linux/65885 "2021-08-09T12:30:34Z")

</div>

I am trying to switch to Julia from Matlab+Fortran, and I am a bit frustrated with the performance inconsistency across versions. I used profiler to isolate the lines in my code that takes longer than others. I have the …

---

## [LoadError: UndefVarError: @defVar not defined](https://discourse.julialang.org/t/loaderror-undefvarerror-defvar-not-defined/66022)

<div class="topic-metadata">

**Author:** [@zhangsanle](https://discourse.julialang.org/u/zhangsanle)\
**Replies:** 4\
**Last updated:** [August 9, 2021, 10:50am UTC](https://discourse.julialang.org/t/loaderror-undefvarerror-defvar-not-defined/66022 "2021-08-09T10:50:21Z")

</div>

I have a piece of code about JuMP. When I run it ,it says that LoadError: UndefVarError: @defVar not defined. I have tried using global forward or backward but both fails. See: function T1(w\_func,grid\_b,β,u,z) …

---

## [Why typeintersect(Int8,Int16) == Union{}](https://discourse.julialang.org/t/why-typeintersect-int8-int16-union/66053)

<div class="topic-metadata">

**Author:** [@Judd](https://discourse.julialang.org/u/Judd)\
**Replies:** 6\
**Last updated:** [August 9, 2021, 10:40am UTC](https://discourse.julialang.org/t/why-typeintersect-int8-int16-union/66053 "2021-08-09T10:40:47Z")

</div>

Doc: While programs manipulate individual values, a type refers to a set of values. By this, we can say that values come first, then types are created by grouping values. If so, typeintersect(Int8,Int16) should be In…

---

## [Multiple GPUs with Julia](https://discourse.julialang.org/t/multiple-gpus-with-julia/11248)

<div class="topic-metadata">

**Author:** [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Replies:** 8\
**Last updated:** [August 9, 2021, 9:49am UTC](https://discourse.julialang.org/t/multiple-gpus-with-julia/11248 "2021-08-09T09:49:25Z")

</div>

Has anyone every used multiple GPUs with Flux? If so, did you have to modify your code to run on multiple GPUs?

---

## [Implementation Details of Vector (or Array in General) and String](https://discourse.julialang.org/t/implementation-details-of-vector-or-array-in-general-and-string/66069)

<div class="topic-metadata">

**Author:** [@Paul\_Depping](https://discourse.julialang.org/u/Paul_Depping)\
**Replies:** 1\
**Last updated:** [August 9, 2021, 9:47am UTC](https://discourse.julialang.org/t/implementation-details-of-vector-or-array-in-general-and-string/66069 "2021-08-09T09:47:16Z")

</div>

Im currently searching through the Julia Code of both Vector/Array and String, but so far I haven’t found any details on how these are actually structured at a low level. From using Base.summarysize, I can guess that Ve…

---

## [Installing an unregistered package](https://discourse.julialang.org/t/installing-an-unregistered-package/66050)

<div class="topic-metadata">

**Author:** [@rafiulnakib](https://discourse.julialang.org/u/rafiulnakib)\
**Replies:** 5\
**Last updated:** [August 9, 2021, 8:44am UTC](https://discourse.julialang.org/t/installing-an-unregistered-package/66050 "2021-08-09T08:44:55Z")

</div>

Hi all, So I have been trying to install the this following package: https://github.com/FalafelGood/QuNet/tree/NewNet Every time I do so either using “add” or “dev”, the package does get installed but only the origina…

---

## [Request information about GC implementation](https://discourse.julialang.org/t/request-information-about-gc-implementation/61492)

<div class="topic-metadata">

**Author:** [@KavinduZoysa](https://discourse.julialang.org/u/KavinduZoysa)\
**Replies:** 7\
**Last updated:** [August 9, 2021, 7:42am UTC](https://discourse.julialang.org/t/request-information-about-gc-implementation/61492 "2021-08-09T07:42:13Z")

</div>

Hi All, Could you please tell me, to implement the garbage collector do you use the LLVM GC framework support? Also I saw in some documentations there is a method called GC.gc() to manually call the gc. Could you pleas…

---

## [Most of the time spent in \`readdlm\` a txt file](https://discourse.julialang.org/t/most-of-the-time-spent-in-readdlm-a-txt-file/66059)

<div class="topic-metadata">

**Author:** [@daviddoij](https://discourse.julialang.org/u/daviddoij)\
**Replies:** 1\
**Last updated:** [August 9, 2021, 7:42am UTC](https://discourse.julialang.org/t/most-of-the-time-spent-in-readdlm-a-txt-file/66059 "2021-08-09T07:42:09Z")

</div>

Hi there, I’m my attempt to learn Julia, I’m solving project euler problems. In one of them, I found the performance not particularly good, when compared with other languages, e.g., Python. The code in question is the …

---

## [Discretize/Binning of Continuous Variable in Dataframe](https://discourse.julialang.org/t/discretize-binning-of-continuous-variable-in-dataframe/66052)

<div class="topic-metadata">

**Author:** [@Nelson\_Chow](https://discourse.julialang.org/u/Nelson_Chow)\
**Replies:** 2\
**Last updated:** [August 9, 2021, 6:05am UTC](https://discourse.julialang.org/t/discretize-binning-of-continuous-variable-in-dataframe/66052 "2021-08-09T06:05:33Z")

</div>

Hello There, I am just wondering what is the best way to add a new Categorical/String column to existing dataframe based on a continuous value column? ‘using DataFrames df = DataFrame(Types = \[“SUV”, “SUV”,“SUV”, “SUV…

---

## [Precompilation fails on a simple package](https://discourse.julialang.org/t/precompilation-fails-on-a-simple-package/65423)

<div class="topic-metadata">

**Author:** [@vettert](https://discourse.julialang.org/u/vettert)\
**Replies:** 5\
**Last updated:** [August 9, 2021, 3:29am UTC](https://discourse.julialang.org/t/precompilation-fails-on-a-simple-package/65423 "2021-08-09T03:29:09Z")

</div>

Hi there, just trying to get my first package going, so apologies if this is a newbie question :slight\_smile: I have created a package (“\] generate”) called MWE with the following content and have added DiffEqBase and …

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

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