# Latest

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

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

**Page:** 1862

---

## [Example for the Depth first multithread implementation performance gain as a motivation](https://discourse.julialang.org/t/example-for-the-depth-first-multithread-implementation-performance-gain-as-a-motivation/32328)

<div class="topic-metadata">

**Author:** [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Replies:** 3\
**Last updated:** [December 16, 2019, 3:12pm UTC](https://discourse.julialang.org/t/example-for-the-depth-first-multithread-implementation-performance-gain-as-a-motivation/32328 "2019-12-16T15:12:57Z")

</div>

Hello, I have found the following discussion on Julias multithread task scheduler implementation: https://news.ycombinator.com/item?id=20507628 As far as I can read from the comments, the main advantage and the “new th…

---

## [What is a Base.Generator?](https://discourse.julialang.org/t/what-is-a-base-generator/32316)

<div class="topic-metadata">

**Author:** [@lwhitefox](https://discourse.julialang.org/u/lwhitefox)\
**Replies:** 20\
**Last updated:** [December 16, 2019, 2:21pm UTC](https://discourse.julialang.org/t/what-is-a-base-generator/32316 "2019-12-16T14:21:32Z")

</div>

I’ve been looking at some sample code from th eFlux model zoo, and I came across something like: f(x) = x^2 d = (f(i) for i in 1:10) (this is much simplified to help pose the question). The result indicates that d is B…

---

## [Strange type-inference](https://discourse.julialang.org/t/strange-type-inference/32334)

<div class="topic-metadata">

**Author:** [@tomhaber](https://discourse.julialang.org/u/tomhaber)\
**Replies:** 1\
**Last updated:** [December 16, 2019, 12:49pm UTC](https://discourse.julialang.org/t/strange-type-inference/32334 "2019-12-16T12:49:40Z")

</div>

Hey, While trying to optimize some code, I ran into some strangely inferred types. The actual example behaves slightly different, but the following excerpt is equally strange. abstract type Node end mutable struct Job…

---

## [Receiving PyObject instead of Sym while appending result of a sympify to an empty list!](https://discourse.julialang.org/t/receiving-pyobject-instead-of-sym-while-appending-result-of-a-sympify-to-an-empty-list/32331)

<div class="topic-metadata">

**Author:** [@AmirHosein](https://discourse.julialang.org/u/AmirHosein)\
**Replies:** 1\
**Last updated:** [December 16, 2019, 12:26pm UTC](https://discourse.julialang.org/t/receiving-pyobject-instead-of-sym-while-appending-result-of-a-sympify-to-an-empty-list/32331 "2019-12-16T12:26:55Z")

</div>

I’m using Julia version 1.1.1 and SymPy package version 1.0.7. There is an interesting behavior that I encountered while writing some codes in Julia which I’m going to share here and ask if there is a better way to deal …

---

## [Standard methods for input stream from console, serveing for OJ practice](https://discourse.julialang.org/t/standard-methods-for-input-stream-from-console-serveing-for-oj-practice/32329)

<div class="topic-metadata">

**Author:** [@LibraNeptune](https://discourse.julialang.org/u/LibraNeptune)\
**Replies:** 0\
**Last updated:** [December 16, 2019, 10:54am UTC](https://discourse.julialang.org/t/standard-methods-for-input-stream-from-console-serveing-for-oj-practice/32329 "2019-12-16T10:54:15Z")

</div>

Several types: Single-digit of numeric value input One-by-one numeric values input \[numeric array, split by blank\] Multiple lines of numeric values or component input mixed with strings Large-scale data input All the…

---

## [Julia 1.0.2 after installed JuliaPro 1.0.2.1](https://discourse.julialang.org/t/julia-1-0-2-after-installed-juliapro-1-0-2-1/18210)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 5\
**Last updated:** [December 16, 2019, 8:55am UTC](https://discourse.julialang.org/t/julia-1-0-2-after-installed-juliapro-1-0-2-1/18210 "2019-12-16T08:55:39Z")

</div>

When I run Julia inside Atom: I receive the following alert: Julia Client – Internal Error LoadError: ArgumentError: Package TokenManager not found in current path: - Run \`import Pkg; Pkg.add("TokenManager")\` to insta…

---

## [Cannot reassign dict entry with nothing value](https://discourse.julialang.org/t/cannot-reassign-dict-entry-with-nothing-value/32321)

<div class="topic-metadata">

**Author:** [@data\_dictator](https://discourse.julialang.org/u/data_dictator)\
**Replies:** 3\
**Last updated:** [December 16, 2019, 8:05am UTC](https://discourse.julialang.org/t/cannot-reassign-dict-entry-with-nothing-value/32321 "2019-12-16T08:05:01Z")

</div>

I just started coding in Julia today, and I have a slight problem with Dict(), when I create one that has only “nothing” or “missing” as values, I cannot later reassign the values to something else: In: noth\_dict = Dict…

---

## [@generated function not picking up all the methods](https://discourse.julialang.org/t/generated-function-not-picking-up-all-the-methods/32318)

<div class="topic-metadata">

**Author:** [@fjarri](https://discourse.julialang.org/u/fjarri)\
**Replies:** 2\
**Last updated:** [December 16, 2019, 6:56am UTC](https://discourse.julialang.org/t/generated-function-not-picking-up-all-the-methods/32318 "2019-12-16T06:56:13Z")

</div>

The code: module Test func(x) = false @generated function test(x::T) where T if Base.invokelatest(func, T) :( 1 ) else :( 0 ) end end function test2(x::T) where T if func(T) 1 …

---

## [Critique request: code for generating the mandelbrot set](https://discourse.julialang.org/t/critique-request-code-for-generating-the-mandelbrot-set/32317)

<div class="topic-metadata">

**Author:** [@jonathan-durbin](https://discourse.julialang.org/u/jonathan-durbin)\
**Replies:** 1\
**Last updated:** [December 16, 2019, 2:37am UTC](https://discourse.julialang.org/t/critique-request-code-for-generating-the-mandelbrot-set/32317 "2019-12-16T02:37:04Z")

</div>

If anyone has time, I would greatly appreciate suggestions for code improvement for this repository. I’m still learning julia, so I wouldn’t be surprised if I’m missing some tricks to make working with images easier. If …

---

## [Jldoctest blocks in julia docstrings is not evaluated](https://discourse.julialang.org/t/jldoctest-blocks-in-julia-docstrings-is-not-evaluated/32315)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 0\
**Last updated:** [December 16, 2019, 1:01am UTC](https://discourse.julialang.org/t/jldoctest-blocks-in-julia-docstrings-is-not-evaluated/32315 "2019-12-16T01:01:56Z")

</div>

Would someone please have a look at the following issue? https://stackoverflow.com/questions/57461225/jldoctest-blocks-in-julia-docstrings-included-in-documentation-but-tests-not-run I also have the exactly same proble…

---

## [Defining broadcast for custom types - the example in the docs fails](https://discourse.julialang.org/t/defining-broadcast-for-custom-types-the-example-in-the-docs-fails/32291)

<div class="topic-metadata">

**Author:** [@fjarri](https://discourse.julialang.org/u/fjarri)\
**Replies:** 1\
**Last updated:** [December 16, 2019, 1:12am UTC](https://discourse.julialang.org/t/defining-broadcast-for-custom-types-the-example-in-the-docs-fails/32291 "2019-12-16T01:12:01Z")

</div>

I’m using the example from the docs: struct ArrayAndChar{T,N} \<: AbstractArray{T,N} data::Array{T,N} char::Char end Base.size(A::ArrayAndChar) = size(A.data) Base.getindex(A::ArrayAndChar{T,N}, inds::Vararg{Int…

---

## [Keeping threads busy with 1.3 multiprocessing](https://discourse.julialang.org/t/keeping-threads-busy-with-1-3-multiprocessing/32253)

<div class="topic-metadata">

**Author:** [@babazaroni](https://discourse.julialang.org/u/babazaroni)\
**Replies:** 10\
**Last updated:** [December 16, 2019, 12:37am UTC](https://discourse.julialang.org/t/keeping-threads-busy-with-1-3-multiprocessing/32253 "2019-12-16T00:37:23Z")

</div>

I’m filtering 185 large historical monthly csv files and am allocating a thread to process a month. When I make an initial 185 thread requests, the system starts out allocating all available threads (8 on my machine) bu…

---

## [Unexpected solution for fewer equations than unknowns](https://discourse.julialang.org/t/unexpected-solution-for-fewer-equations-than-unknowns/32310)

<div class="topic-metadata">

**Author:** [@omortis](https://discourse.julialang.org/u/omortis)\
**Replies:** 4\
**Last updated:** [December 15, 2019, 10:58pm UTC](https://discourse.julialang.org/t/unexpected-solution-for-fewer-equations-than-unknowns/32310 "2019-12-15T22:58:38Z")

</div>

Hello, The following system has many solutions, per simple Gaussian reduction: x - 3y + z = 1 x + y + 2z = 14 Yet Julia actually gives me a unique solution: julia\> A = \[1 -3 1; 1 1 2\]; u = \[1, 14\]; julia\> A 2×3 A…

---

## [Iterate() not defined for RemoteChannel](https://discourse.julialang.org/t/iterate-not-defined-for-remotechannel/32311)

<div class="topic-metadata">

**Author:** [@bocc](https://discourse.julialang.org/u/bocc)\
**Replies:** 0\
**Last updated:** [December 15, 2019, 9:19pm UTC](https://discourse.julialang.org/t/iterate-not-defined-for-remotechannel/32311 "2019-12-15T21:19:52Z")

</div>

Channel has an iterate() method defined for it, but RemoteChannel doesn’t. Issue #31177 points out that Channel’s implementation copied over naively seems to work for RemoteChannel, too, but that issue haven’t received a…

---

## [Suggestion for sometimes faster data serialization](https://discourse.julialang.org/t/suggestion-for-sometimes-faster-data-serialization/32302)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 8\
**Last updated:** [December 15, 2019, 9:17pm UTC](https://discourse.julialang.org/t/suggestion-for-sometimes-faster-data-serialization/32302 "2019-12-15T21:17:08Z")

</div>

Hey Julians, So I had this idea, and I was going to make an issue on a requisite package for it, then I realized the context of it is potentially broader then any single package. So in the geospatial domain a trick for…

---

## [Anybody else find the new where syntax less than satisfactory?](https://discourse.julialang.org/t/anybody-else-find-the-new-where-syntax-less-than-satisfactory/4897)

<div class="topic-metadata">

**Author:** [@Steven\_Sagaert](https://discourse.julialang.org/u/Steven_Sagaert)\
**Replies:** 14\
**Last updated:** [December 15, 2019, 8:59pm UTC](https://discourse.julialang.org/t/anybody-else-find-the-new-where-syntax-less-than-satisfactory/4897 "2019-12-15T20:59:19Z")

</div>

things like same\_type(x::T, y::T) where {T} = true myappend(v::Vector{T}, x::T) where {T} = \[v…, x\] mytypeof(x::T) where {T} = T I find utterly confusing… It’s only really readable when there is an actual constraint…

---

## [Custom Layout in Juno](https://discourse.julialang.org/t/custom-layout-in-juno/32308)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 2\
**Last updated:** [December 15, 2019, 8:46pm UTC](https://discourse.julialang.org/t/custom-layout-in-juno/32308 "2019-12-15T20:46:57Z")

</div>

In Juno, is it possible to add a custom default layout? On Juno startup would like to automatically (i) remove the default Git, Github panes, (ii) add the Debugger pane, and (iii) keep the files that from my previous ses…

---

## ["No output" Travis failure for test that passes locally in \<1 minute on Windows](https://discourse.julialang.org/t/no-output-travis-failure-for-test-that-passes-locally-in-1-minute-on-windows/32064)

<div class="topic-metadata">

**Author:** [@vlandau](https://discourse.julialang.org/u/vlandau)\
**Replies:** 4\
**Last updated:** [December 15, 2019, 8:02pm UTC](https://discourse.julialang.org/t/no-output-travis-failure-for-test-that-passes-locally-in-1-minute-on-windows/32064 "2019-12-15T20:02:07Z")

</div>

Hi All, I’m getting a no output failure for a package test in Travis with Julia 1.3 in Windows. There is no failure for Julia 1.2 on Windows, and tests pass in 1.2 and 1.3 for Mac and Linux. To be sure, I did test loca…

---

## [How can I significantly improve the speed of this linear programming problem in JuMP?](https://discourse.julialang.org/t/how-can-i-significantly-improve-the-speed-of-this-linear-programming-problem-in-jump/32125)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 12\
**Last updated:** [December 15, 2019, 7:34pm UTC](https://discourse.julialang.org/t/how-can-i-significantly-improve-the-speed-of-this-linear-programming-problem-in-jump/32125 "2019-12-15T19:34:11Z")

</div>

I am doing Bayesian estimation in Julia. For each iteration of Bayesian estimation, there is a for-loop to compute the bounds of some variables in my model. Each bound is computed by a linear programming problem. I am tr…

---

## [List of binary infix operators](https://discourse.julialang.org/t/list-of-binary-infix-operators/32282)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 3\
**Last updated:** [December 15, 2019, 7:03pm UTC](https://discourse.julialang.org/t/list-of-binary-infix-operators/32282 "2019-12-15T19:03:20Z")

</div>

Is there a documentation page where all the binary infix operators are gathered? Thanks

---

## [How do I save the output to .txt file?](https://discourse.julialang.org/t/how-do-i-save-the-output-to-txt-file/32270)

<div class="topic-metadata">

**Author:** [@WEEZEERAE](https://discourse.julialang.org/u/WEEZEERAE)\
**Replies:** 10\
**Last updated:** [December 15, 2019, 7:01pm UTC](https://discourse.julialang.org/t/how-do-i-save-the-output-to-txt-file/32270 "2019-12-15T19:01:38Z")

</div>

Hey People, right now I’m struggling with saving my data. By using a for loop and the println() command, my programm is giving me out a bunch of named arrays like this in the following: for n = 1:10 a = rand(1:10, 4) …

---

## [Is there a way to explicitly free GPU memory?](https://discourse.julialang.org/t/is-there-a-way-to-explicitly-free-gpu-memory/32266)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 3\
**Last updated:** [December 15, 2019, 5:59pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-explicitly-free-gpu-memory/32266 "2019-12-15T17:59:04Z")

</div>

Hi folks, I’m doing some CUDA coding using CuArrays, CUDAnative and CUDAdrv, in my jupyter notebooks. Since I’m developping, I write and test functions constantly. But then it happens that every now and then I have to r…

---

## [Can we import \`dill\` in PyCall rather than pickle?](https://discourse.julialang.org/t/can-we-import-dill-in-pycall-rather-than-pickle/32299)

<div class="topic-metadata">

**Author:** [@innerlee](https://discourse.julialang.org/u/innerlee)\
**Replies:** 8\
**Last updated:** [December 15, 2019, 4:59pm UTC](https://discourse.julialang.org/t/can-we-import-dill-in-pycall-rather-than-pickle/32299 "2019-12-15T16:59:01Z")

</div>

The current version of PyCall, and when python3 is used, produces error in pmap: julia\> using Distributed julia\> addprocs(2); julia\> @everywhere using PyCall julia\> @everywhere math=pyimport("math") julia\> a = \[1,2\];…

---

## [False error?](https://discourse.julialang.org/t/false-error/32305)

<div class="topic-metadata">

**Author:** [@alaraints](https://discourse.julialang.org/u/alaraints)\
**Replies:** 4\
**Last updated:** [December 15, 2019, 4:49pm UTC](https://discourse.julialang.org/t/false-error/32305 "2019-12-15T16:49:17Z")

</div>

can this be true?: MethodError: no method matching sort!(::Dict{Int64,String}) that seems to be basic thing, am I doing something wrong? Regards, Alar Aints,

---

## [Plots: legend text is out of bounds](https://discourse.julialang.org/t/plots-legend-text-is-out-of-bounds/32304)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 0\
**Last updated:** [December 15, 2019, 3:22pm UTC](https://discourse.julialang.org/t/plots-legend-text-is-out-of-bounds/32304 "2019-12-15T15:22:47Z")

</div>

When plotting legend, the text go out of bounds (note the 100 that goes out of the frame). Is there a way to fix it? This is the code I used: p1 = hline(\[I(E)\], xlabel=L"\\theta", ylabel=L"I", label="") for (i, T) in…

---

## [Why is there a performance hit on broadcasting with OffsetArrays?](https://discourse.julialang.org/t/why-is-there-a-performance-hit-on-broadcasting-with-offsetarrays/32194)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [December 15, 2019, 3:20pm UTC](https://discourse.julialang.org/t/why-is-there-a-performance-hit-on-broadcasting-with-offsetarrays/32194 "2019-12-15T15:20:42Z")

</div>

Please have a look at this example: julia\> a = zeros(3,3); b = zeros(1:3,1:3); julia\> @btime @. $a + $a; 49.681 ns (1 allocation: 160 bytes) julia\> @btime @. $b + $b; 440.101 ns (4 allocations: 288 bytes) julia\> …

---

## [Tensor dimension order on convolution layer](https://discourse.julialang.org/t/tensor-dimension-order-on-convolution-layer/32274)

<div class="topic-metadata">

**Author:** [@fannix](https://discourse.julialang.org/u/fannix)\
**Replies:** 3\
**Last updated:** [December 15, 2019, 9:19am UTC](https://discourse.julialang.org/t/tensor-dimension-order-on-convolution-layer/32274 "2019-12-15T09:19:36Z")

</div>

From Flux document Model Reference · Flux, the dimension order for input data is WHCN (width, height, # channels, # batches). I am a bit confused regarding why this ordering is used. When an image is loaded, the natur…

---

## [Best way to store integer partitions](https://discourse.julialang.org/t/best-way-to-store-integer-partitions/32276)

<div class="topic-metadata">

**Author:** [@Tqft](https://discourse.julialang.org/u/Tqft)\
**Replies:** 6\
**Last updated:** [December 15, 2019, 9:04am UTC](https://discourse.julialang.org/t/best-way-to-store-integer-partitions/32276 "2019-12-15T09:04:23Z")

</div>

This is just a toy example but I was wondering what the best (memory and performance wise) way is to store partitions of a fixed integer n, i.e. lists of positive integers which sum up to n. Currently, I’m using Array{I…

---

## [\[ANN\] Dictionaries.jl - Improved productivity and performance of dictionaries in Julia](https://discourse.julialang.org/t/ann-dictionaries-jl-improved-productivity-and-performance-of-dictionaries-in-julia/32074)

<div class="topic-metadata">

**Author:** [@andyferris](https://discourse.julialang.org/u/andyferris)\
**Replies:** 22\
**Last updated:** [December 15, 2019, 3:30am UTC](https://discourse.julialang.org/t/ann-dictionaries-jl-improved-productivity-and-performance-of-dictionaries-in-julia/32074 "2019-12-15T03:30:11Z")

</div>

I am pleased to announce the recent release of Dictionaries.jl, which provides an alternative interface for dictionaries in Julia, for improved productivity and performance. You can install it with \]add Dictionaries at t…

---

## [SymbolServer and include(file.jl) definitions](https://discourse.julialang.org/t/symbolserver-and-include-file-jl-definitions/32223)

<div class="topic-metadata">

**Author:** [@phlavenk](https://discourse.julialang.org/u/phlavenk)\
**Replies:** 2\
**Last updated:** [December 15, 2019, 2:54am UTC](https://discourse.julialang.org/t/symbolserver-and-include-file-jl-definitions/32223 "2019-12-15T02:54:16Z")

</div>

How can I make VSCode’s symbol server to parse also my include(some\_file.jl) definitions so that they do not appear as errors and IntelliSense and similar functionality is available for them?

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

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