# Latest

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

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

**Page:** 1618

---

## [How to attach the result of Julia REPL? (using vim & tmux)](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 7\
**Last updated:** [September 29, 2020, 7:21am UTC](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466 "2020-09-29T07:21:52Z")

</div>

Hi, I’m a beginner of Julia. I always don’t find out how to attach the result of Julia REPL. How can I do it? Note: I’m using vim & tmux. EDIT: it’s a matter of my terminal setup, see this.

---

## [Potential bug with package dependencies?](https://discourse.julialang.org/t/potential-bug-with-package-dependencies/47463)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [September 29, 2020, 3:52am UTC](https://discourse.julialang.org/t/potential-bug-with-package-dependencies/47463 "2020-09-29T03:52:05Z")

</div>

I am trying to install the latest version of Lazy.jl and Mux.jl together. But it’s failing to do so complaining about compatibility. So I dugged further I can install all the dependencies of latest Mux and the latest ve…

---

## [Passing ARGS to multiple workers](https://discourse.julialang.org/t/passing-args-to-multiple-workers/47457)

<div class="topic-metadata">

**Author:** [@nkashaev](https://discourse.julialang.org/u/nkashaev)\
**Replies:** 2\
**Last updated:** [September 29, 2020, 2:36am UTC](https://discourse.julialang.org/t/passing-args-to-multiple-workers/47457 "2020-09-29T02:36:57Z")

</div>

I am trying to pass an argument from the terminal to a program that uses multiple cores. But ARGS appear to be visible only on the first worker. How can I push ARGS to all workers? For example, suppose test.jl contains …

---

## [Destructuring assignment with arrays, like in NumPy](https://discourse.julialang.org/t/destructuring-assignment-with-arrays-like-in-numpy/47441)

<div class="topic-metadata">

**Author:** [@cwindolf](https://discourse.julialang.org/u/cwindolf)\
**Replies:** 4\
**Last updated:** [September 29, 2020, 2:09am UTC](https://discourse.julialang.org/t/destructuring-assignment-with-arrays-like-in-numpy/47441 "2020-09-29T02:09:53Z")

</div>

Hi! So, for an example, I have a 110x2 delimited text file on disk. The first column is my variable Y, and the second column is my variable X. My goal: get Y and X both in their own array, either column or row, no probl…

---

## [Printing names and values of a number of variables](https://discourse.julialang.org/t/printing-names-and-values-of-a-number-of-variables/47451)

<div class="topic-metadata">

**Author:** [@cnf](https://discourse.julialang.org/u/cnf)\
**Replies:** 2\
**Last updated:** [September 29, 2020, 12:43am UTC](https://discourse.julialang.org/t/printing-names-and-values-of-a-number-of-variables/47451 "2020-09-29T00:43:55Z")

</div>

I am looking for a julia function that can print both the names and the values of a sequence of variables, as per the following example: #Define a number of variables (could be any number) s1 = 123 s2 = " s g ny ny …

---

## [How is my code selecting dispatch for constructor?](https://discourse.julialang.org/t/how-is-my-code-selecting-dispatch-for-constructor/47442)

<div class="topic-metadata">

**Author:** [@Aroeira](https://discourse.julialang.org/u/Aroeira)\
**Replies:** 1\
**Last updated:** [September 29, 2020, 12:14am UTC](https://discourse.julialang.org/t/how-is-my-code-selecting-dispatch-for-constructor/47442 "2020-09-29T00:14:32Z")

</div>

Hello, I need some help in understanding how Julia is selecting the constructor for my struct. Here is a brief context: I’ve been trying to think of ways to reduce the number of methods I have to code for a somewhat com…

---

## [Optimising industrial process efficiency: Machine Learning Scientists and Software Engineers](https://discourse.julialang.org/t/optimising-industrial-process-efficiency-machine-learning-scientists-and-software-engineers/47445)

<div class="topic-metadata">

**Author:** [@fdm](https://discourse.julialang.org/u/fdm)\
**Replies:** 0\
**Last updated:** [September 28, 2020, 10:44pm UTC](https://discourse.julialang.org/t/optimising-industrial-process-efficiency-machine-learning-scientists-and-software-engineers/47445 "2020-09-28T22:44:08Z")

</div>

Hi all, We are an early stage startup looking to hire machine learning scientists and software engineers. Our goal is to improve the efficiency of industrial processes. We do this by using scientific machine learning t…

---

## [Complex-valued functions with real arguments - ForwardDiff, JuliaDiff](https://discourse.julialang.org/t/complex-valued-functions-with-real-arguments-forwarddiff-juliadiff/27386)

<div class="topic-metadata">

**Author:** [@marcvb97](https://discourse.julialang.org/u/marcvb97)\
**Replies:** 6\
**Last updated:** [September 28, 2020, 10:41pm UTC](https://discourse.julialang.org/t/complex-valued-functions-with-real-arguments-forwarddiff-juliadiff/27386 "2020-09-28T22:41:30Z")

</div>

When executing the following code to apply ForwardDiff to a complex-valued function with real argument: using ForwardDiff f2(t::Real) = real( (cos(t) + 1im\*sin(t))^(1/2) ) t = pi/2 ForwardDiff.derivative(f2,t) I get th…

---

## [Faster array indexing with a logical array](https://discourse.julialang.org/t/faster-array-indexing-with-a-logical-array/47364)

<div class="topic-metadata">

**Author:** [@bhaveshshrimali](https://discourse.julialang.org/u/bhaveshshrimali)\
**Replies:** 12\
**Last updated:** [September 28, 2020, 9:36pm UTC](https://discourse.julialang.org/t/faster-array-indexing-with-a-logical-array/47364 "2020-09-28T21:36:54Z")

</div>

Hi everyone, Pretty basic question… I was experimenting with indexing arrays with logical arrays. For instance, say I have an array shaped (10000,2) and I need to extract all the indices where the sum across the column…

---

## [When do you all PyCall?](https://discourse.julialang.org/t/when-do-you-all-pycall/47362)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 7\
**Last updated:** [September 28, 2020, 9:31pm UTC](https://discourse.julialang.org/t/when-do-you-all-pycall/47362 "2020-09-28T21:31:18Z")

</div>

So I’ve been brushing up a little bit on my python, but doing so under the guise of julia projects that require/benefit from pycall so I don’t rust out any skills. Had me thinking, when do other people consider using PyC…

---

## [Contour plot of separate, intersecting levels](https://discourse.julialang.org/t/contour-plot-of-separate-intersecting-levels/47400)

<div class="topic-metadata">

**Author:** [@ric.cioffi](https://discourse.julialang.org/u/ric.cioffi)\
**Replies:** 6\
**Last updated:** [September 28, 2020, 7:47pm UTC](https://discourse.julialang.org/t/contour-plot-of-separate-intersecting-levels/47400 "2020-09-28T19:47:35Z")

</div>

Problem Hi, I’m having a hard time figuring out how to do the following, though I’m sure there must be some “easy” solution that I just cannot find. I have a 3-dimensional array of booleans and I’d like to see the “cont…

---

## [Creating a struct with 1D length using unitful.jl](https://discourse.julialang.org/t/creating-a-struct-with-1d-length-using-unitful-jl/47212)

<div class="topic-metadata">

**Author:** [@jdossgollin](https://discourse.julialang.org/u/jdossgollin)\
**Replies:** 10\
**Last updated:** [September 28, 2020, 7:03pm UTC](https://discourse.julialang.org/t/creating-a-struct-with-1d-length-using-unitful-jl/47212 "2020-09-28T19:03:21Z")

</div>

I’m trying to build a data type to hold a measurements of a quantity. I know that this quantity will be a length, but don’t know a priori what unit that length will be. I’m having a bit of trouble coming up with syntax t…

---

## [Macro @everywhere](https://discourse.julialang.org/t/macro-everywhere/17917)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 16\
**Last updated:** [September 28, 2020, 5:33pm UTC](https://discourse.julialang.org/t/macro-everywhere/17917 "2020-09-28T17:33:15Z")

</div>

I tried running some scripts that use @everywhere. And I receive the following Alert: LoadError: LoadError: UndefVarError: @everywhere not defined in expression starting at D: \\ Julia SoftWare \\ Julia Scripts \\ julia…

---

## [Extract field from the elements of a column in a DataFrame](https://discourse.julialang.org/t/extract-field-from-the-elements-of-a-column-in-a-dataframe/47405)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 3\
**Last updated:** [September 28, 2020, 4:58pm UTC](https://discourse.julialang.org/t/extract-field-from-the-elements-of-a-column-in-a-dataframe/47405 "2020-09-28T16:58:34Z")

</div>

Let’s say I a have a DataFrame with a column :C1. The elements of the column are structs of the type struct MyStruct a::Float64 b::Float64 end How do I extract, for example, the field :a from the elements of th…

---

## [IJulia/Jupyter Notebook in different language (Russian!) than expected](https://discourse.julialang.org/t/ijulia-jupyter-notebook-in-different-language-russian-than-expected/47374)

<div class="topic-metadata">

**Author:** [@ccaballeroh](https://discourse.julialang.org/u/ccaballeroh)\
**Replies:** 1\
**Last updated:** [September 28, 2020, 2:41am UTC](https://discourse.julialang.org/t/ijulia-jupyter-notebook-in-different-language-russian-than-expected/47374 "2020-09-28T02:41:40Z")

</div>

Hi, all! I’ve been following Julia for years now, but decided to completely dive in just recently. I’m planning to give a talk at my university on using Julia and wanted to show how to use it in Jupyter (it’s in the name…

---

## [How to test @inbounds / @boundscheck behavior?](https://discourse.julialang.org/t/how-to-test-inbounds-boundscheck-behavior/47419)

<div class="topic-metadata">

**Author:** [@platawiec](https://discourse.julialang.org/u/platawiec)\
**Replies:** 1\
**Last updated:** [September 28, 2020, 4:42pm UTC](https://discourse.julialang.org/t/how-to-test-inbounds-boundscheck-behavior/47419 "2020-09-28T16:42:52Z")

</div>

My understanding is that \]test will test a module with check-bounds=yes. However, one of the things I’d like to test is that when a user uses @inbounds, the function I create is no longer elided, in other words the sect…

---

## [Literals as expressions](https://discourse.julialang.org/t/literals-as-expressions/47415)

<div class="topic-metadata">

**Author:** [@mikepol](https://discourse.julialang.org/u/mikepol)\
**Replies:** 4\
**Last updated:** [September 28, 2020, 4:36pm UTC](https://discourse.julialang.org/t/literals-as-expressions/47415 "2020-09-28T16:36:25Z")

</div>

Hi, I’m trying to represent a literal as an Expr object, without success: julia\> :(5) |\> typeof Int64 julia\> Meta.parse("5") |\> typeof Int64 julia\> function foo(e::Expr) e end julia\> foo(:(5)) ERROR: MethodError: no …

---

## [Getting "UndefVarError: N0f8 not defined" error using @distributed](https://discourse.julialang.org/t/getting-undefvarerror-n0f8-not-defined-error-using-distributed/47230)

<div class="topic-metadata">

**Author:** [@libensvivit](https://discourse.julialang.org/u/libensvivit)\
**Replies:** 2\
**Last updated:** [September 28, 2020, 4:18pm UTC](https://discourse.julialang.org/t/getting-undefvarerror-n0f8-not-defined-error-using-distributed/47230 "2020-09-28T16:18:01Z")

</div>

using Distributed @everywhere using Colors; @sync @distributed for i = 1:10 zeros(RGB{N0f8}, 10, 10); end I’m having error running this code, why my workers don’t see the Colors module?

---

## [ERROR: LoadError: indexed assignment not defined for FloatRange{Float64}](https://discourse.julialang.org/t/error-loaderror-indexed-assignment-not-defined-for-floatrange-float64/1668)

<div class="topic-metadata">

**Author:** [@phillefjonk](https://discourse.julialang.org/u/phillefjonk)\
**Replies:** 8\
**Last updated:** [September 28, 2020, 4:14pm UTC](https://discourse.julialang.org/t/error-loaderror-indexed-assignment-not-defined-for-floatrange-float64/1668 "2020-09-28T16:14:35Z")

</div>

Why does this not work: xVector=0:0.01:2\*pi; yVector=0.0\*xVector; for n=1:length(xVector) yVector\[n\] = sin(xVector\[n\]) end plot(xVector, yVector) What is the correct way to do this?

---

## [Arm32/v7 armhf support discontinue](https://discourse.julialang.org/t/arm32-v7-armhf-support-discontinue/47399)

<div class="topic-metadata">

**Author:** [@rro](https://discourse.julialang.org/u/rro)\
**Replies:** 4\
**Last updated:** [September 28, 2020, 3:01pm UTC](https://discourse.julialang.org/t/arm32-v7-armhf-support-discontinue/47399 "2020-09-28T15:01:06Z")

</div>

Hi all, I use Julia on a Docker container which is running on Raspberry Pi 3. Till now I have cross-compiled our company application using Julia 1.4.1 and it was perfectly working if I specified the cpu target armv8-a. …

---

## [Handy Script finding non-isbits fields](https://discourse.julialang.org/t/handy-script-finding-non-isbits-fields/47402)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 2\
**Last updated:** [September 28, 2020, 2:24pm UTC](https://discourse.julialang.org/t/handy-script-finding-non-isbits-fields/47402 "2020-09-28T14:24:21Z")

</div>

For performance optimization it is useful for your types to be isbits. But you can’t be isbits if you have any fields that are not. I made a quick script for tracking them down It turned out to need to be more complex…

---

## [Multiplying a 3d array by a scalar?](https://discourse.julialang.org/t/multiplying-a-3d-array-by-a-scalar/47376)

<div class="topic-metadata">

**Author:** [@amca01](https://discourse.julialang.org/u/amca01)\
**Replies:** 6\
**Last updated:** [September 28, 2020, 1:56pm UTC](https://discourse.julialang.org/t/multiplying-a-3d-array-by-a-scalar/47376 "2020-09-28T13:56:42Z")

</div>

I have an array A of size M,N,P, and a vector v of size P. And I want to multiply each “plane” A\[:,:,i\] of the array by v\[i\]. I can do this in a loop, or with two calls to reshape. But is there any way of doing it dir…

---

## [Correct way to dereference large memory?](https://discourse.julialang.org/t/correct-way-to-dereference-large-memory/47395)

<div class="topic-metadata">

**Author:** [@Ibb](https://discourse.julialang.org/u/Ibb)\
**Replies:** 6\
**Last updated:** [September 28, 2020, 1:34pm UTC](https://discourse.julialang.org/t/correct-way-to-dereference-large-memory/47395 "2020-09-28T13:34:02Z")

</div>

I want to read binary files into some large tuples by Ref, but my julia stuck at code below. julia\> a = Ref{NTuple{36000, UInt8}}() julia\> a\[\] #julia v1.5.2 will stuck here

---

## [Inference using HMC on a Hidden Markov Model](https://discourse.julialang.org/t/inference-using-hmc-on-a-hidden-markov-model/40719)

<div class="topic-metadata">

**Author:** [@smonsays](https://discourse.julialang.org/u/smonsays)\
**Replies:** 11\
**Last updated:** [September 28, 2020, 11:20am UTC](https://discourse.julialang.org/t/inference-using-hmc-on-a-hidden-markov-model/40719 "2020-09-28T11:20:56Z")

</div>

I am taking my first steps in Turing (and Julia) trying to solve a model inversion problem in a Hidden Markov Model. The model I have so far works fine with SMC(), IS() and PG(). For HMC() and NUTS() I still have an issu…

---

## [(d::Int)(x::Int) = d + x?](https://discourse.julialang.org/t/d-int-x-int-d-x/47321)

<div class="topic-metadata">

**Author:** [@bigdataman2015](https://discourse.julialang.org/u/bigdataman2015)\
**Replies:** 5\
**Last updated:** [September 28, 2020, 11:12am UTC](https://discourse.julialang.org/t/d-int-x-int-d-x/47321 "2020-09-28T11:12:12Z")

</div>

julia\> (d::Int)(x::Int) = d + x # what does this mean ?

---

## [A way to initialize an array without specifying its eltype in advance?](https://discourse.julialang.org/t/a-way-to-initialize-an-array-without-specifying-its-eltype-in-advance/47379)

<div class="topic-metadata">

**Author:** [@tomohiro\_soejima](https://discourse.julialang.org/u/tomohiro_soejima)\
**Replies:** 12\
**Last updated:** [September 28, 2020, 9:33am UTC](https://discourse.julialang.org/t/a-way-to-initialize-an-array-without-specifying-its-eltype-in-advance/47379 "2020-09-28T09:33:55Z")

</div>

Hi Often I would like to initialize an array without specifying an eltype in advance, even though I know all elements of the array will have the same concrete type. By way of example, function makesomearray() arr =…

---

## [Threads.@threads to return results](https://discourse.julialang.org/t/threads-threads-to-return-results/47382)

<div class="topic-metadata">

**Author:** [@arabidopsis](https://discourse.julialang.org/u/arabidopsis)\
**Replies:** 12\
**Last updated:** [September 28, 2020, 8:36am UTC](https://discourse.julialang.org/t/threads-threads-to-return-results/47382 "2020-09-28T08:36:08Z")

</div>

This is a request for “enhancement” I guess. It would be nice if \`Threads.@threads returned the results. Something like: v1, v2, v3 = Threads.@threads for w in \[f1, f2, f3\] w() end

---

## [Subarray view and parent indexing](https://discourse.julialang.org/t/subarray-view-and-parent-indexing/47388)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 0\
**Last updated:** [September 28, 2020, 3:39am UTC](https://discourse.julialang.org/t/subarray-view-and-parent-indexing/47388 "2020-09-28T03:39:03Z")

</div>

This snippet: using ImageMorphology a = reshape(collect(1:36), 6, 6) labels = label\_components(a .\> 16, trues(3,3)) box = component\_boxes(labels)\[2\] returns a bounding box: 2-element Array{Tuple{Int64,Int64},1}: (1,…

---

## [Short circuit evaluations documentation when using assignment statement](https://discourse.julialang.org/t/short-circuit-evaluations-documentation-when-using-assignment-statement/47358)

<div class="topic-metadata">

**Author:** [@rjmoses](https://discourse.julialang.org/u/rjmoses)\
**Replies:** 4\
**Last updated:** [September 28, 2020, 7:52am UTC](https://discourse.julialang.org/t/short-circuit-evaluations-documentation-when-using-assignment-statement/47358 "2020-09-28T07:52:56Z")

</div>

I love the idea of short circuit evaluations. Took me a while to figure out why a piece of code wasn’t working–short circuit evaluation documentation in the Manual section lacks clarity when using an assignment on the r…

---

## [PSA: Use a project for building your docs](https://discourse.julialang.org/t/psa-use-a-project-for-building-your-docs/14974)

<div class="topic-metadata">

**Author:** [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Replies:** 24\
**Last updated:** [September 28, 2020, 7:12am UTC](https://discourse.julialang.org/t/psa-use-a-project-for-building-your-docs/14974 "2020-09-28T07:12:33Z")

</div>

This is a simple guide on how to best build your documentation in Julia v1.0 if you are using Documenter. The old way If you are using Documenter you probably have something like the following in your .travis.yml file f…

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

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