# Latest

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

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

**Page:** 1909

---

## [Testing local functions](https://discourse.julialang.org/t/testing-local-functions/29521)

<div class="topic-metadata">

**Author:** [@MaxPauer](https://discourse.julialang.org/u/MaxPauer)\
**Replies:** 0\
**Last updated:** [October 5, 2019, 3:08pm UTC](https://discourse.julialang.org/t/testing-local-functions/29521 "2019-10-05T15:08:54Z")

</div>

I recently learned about using let-blocks for encapsulation. Is there any good way to test functions within let-blocks apart from making them global? function only\_global\_for\_testing end function actually\_needed\_in\_int…

---

## [Array confusion](https://discourse.julialang.org/t/array-confusion/29516)

<div class="topic-metadata">

**Author:** [@jonoke](https://discourse.julialang.org/u/jonoke)\
**Replies:** 5\
**Last updated:** [October 5, 2019, 2:52pm UTC](https://discourse.julialang.org/t/array-confusion/29516 "2019-10-05T14:52:16Z")

</div>

Could someone explain this idiom please… I don’t know what is going on, despite seeing that the result makes sense. julia\> \[5 for i in 1:3\] 3-element Array{Int64,1}: 5 5 5 Thanks.

---

## [Indicator matrix for categorical data in GLM.jl with DataFrames.jl](https://discourse.julialang.org/t/indicator-matrix-for-categorical-data-in-glm-jl-with-dataframes-jl/3448)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 4\
**Last updated:** [October 5, 2019, 1:43pm UTC](https://discourse.julialang.org/t/indicator-matrix-for-categorical-data-in-glm-jl-with-dataframes-jl/3448 "2019-10-05T13:43:13Z")

</div>

I am working with a large data set and want to run a logit regression on monthly data. For this I create a DataFrame and use the GLM package in Julia. My code looke something like that: f=glm((Y ~ Age + Duration + Gend…

---

## [Can I choose display software?](https://discourse.julialang.org/t/can-i-choose-display-software/29510)

<div class="topic-metadata">

**Author:** [@Apoema](https://discourse.julialang.org/u/Apoema)\
**Replies:** 3\
**Last updated:** [October 5, 2019, 1:35pm UTC](https://discourse.julialang.org/t/can-i-choose-display-software/29510 "2019-10-05T13:35:38Z")

</div>

I am using Julia on Debian and plotting SVG images using Gadfly. The default software used to display the image is my web browser which really doesn’t seem as the best option to me. Can I configure Julia/Gadfly to use an…

---

## [Interactive plotting from the REPL?](https://discourse.julialang.org/t/interactive-plotting-from-the-repl/29410)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 8\
**Last updated:** [October 5, 2019, 1:10am UTC](https://discourse.julialang.org/t/interactive-plotting-from-the-repl/29410 "2019-10-05T01:10:23Z")

</div>

Goal is to do some interactive plotting from the REPL on linux (not using an Atom or Jupyter web browser) Previously I made the Fatou.jl package and I would like to make an interactive plot inspired by the repo: Ha…

---

## [How do I define a data type Real in JSON3?](https://discourse.julialang.org/t/how-do-i-define-a-data-type-real-in-json3/29520)

<div class="topic-metadata">

**Author:** [@Elmer\_Cusipuma](https://discourse.julialang.org/u/Elmer_Cusipuma)\
**Replies:** 1\
**Last updated:** [October 5, 2019, 1:04pm UTC](https://discourse.julialang.org/t/how-do-i-define-a-data-type-real-in-json3/29520 "2019-10-05T13:04:45Z")

</div>

Example: using JSON3 struct Car model::String topSpeed::Real end JSON3.StructType(::Type{Car}) = JSON3.Struct() json = """{"model": "S500","topSpeed": 250.1}""" Getting this error when I run test car = JSON…

---

## [Unable to use Julia in Atom : IOError: connect: connection timed out (ETIMEDOUT)](https://discourse.julialang.org/t/unable-to-use-julia-in-atom-ioerror-connect-connection-timed-out-etimedout/29519)

<div class="topic-metadata">

**Author:** [@anon56330260](https://discourse.julialang.org/u/anon56330260)\
**Replies:** 1\
**Last updated:** [October 5, 2019, 12:53pm UTC](https://discourse.julialang.org/t/unable-to-use-julia-in-atom-ioerror-connect-connection-timed-out-etimedout/29519 "2019-10-05T12:53:04Z")

</div>

Recently I came across some problems when using Juno: Julia has exited. Press Enter to start a new session. Starting Julia... ERROR: LoadError: IOError: connect: connection timed out (ETIMEDOUT) Stacktrace: \[1\] try\_yie…

---

## [Juno error](https://discourse.julialang.org/t/juno-error/29518)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 0\
**Last updated:** [October 5, 2019, 6:48am UTC](https://discourse.julialang.org/t/juno-error/29518 "2019-10-05T06:48:42Z")

</div>

When I search in Documentation in Juno. Got the following error. Julia version information, Julia Version 1.1.0 Commit 80516ca202 (2019-01-21 21:24 UTC) Platform Info: OS: macOS (x86\_64-apple-darwin14.5.0) CPU: …

---

## [How does one activate the environment of an added package?](https://discourse.julialang.org/t/how-does-one-activate-the-environment-of-an-added-package/29478)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 3\
**Last updated:** [October 5, 2019, 5:37am UTC](https://discourse.julialang.org/t/how-does-one-activate-the-environment-of-an-added-package/29478 "2019-10-05T05:37:52Z")

</div>

I start with the Julia folder wiped clean. So I do PetrKrysl@Spectre MINGW64 ~ $ rm -rf ~/.julia/ PetrKrysl@Spectre MINGW64 ~ $ julia \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.or…

---

## [Expr trees and genetic programming](https://discourse.julialang.org/t/expr-trees-and-genetic-programming/29488)

<div class="topic-metadata">

**Author:** [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Replies:** 8\
**Last updated:** [October 5, 2019, 2:54am UTC](https://discourse.julialang.org/t/expr-trees-and-genetic-programming/29488 "2019-10-05T02:54:33Z")

</div>

I’ve been experimenting with metaprogramming in Julia. I’d like to make a simple program to experiment around with a toy model for genetic programming. I’d like to be able to “splice” Expr trees but the fact that they ar…

---

## [String constructor vs string function](https://discourse.julialang.org/t/string-constructor-vs-string-function/29501)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 4\
**Last updated:** [October 5, 2019, 2:42am UTC](https://discourse.julialang.org/t/string-constructor-vs-string-function/29501 "2019-10-05T02:42:03Z")

</div>

Context: I have two enums as follows: @enum HouseSize SMALL\_HOUSE MEDIUM\_HOUSE LARGE\_HOUSE @enum HouseEfficiency LOW\_EFFICIENCY MEDIUM\_EFFICIENCY HIGH\_EFFICIENCY If I just had the HouseSize enum, then I could simplify…

---

## [Clearing workspace](https://discourse.julialang.org/t/clearing-workspace/29465)

<div class="topic-metadata">

**Author:** [@ASF](https://discourse.julialang.org/u/ASF)\
**Replies:** 7\
**Last updated:** [October 5, 2019, 2:04am UTC](https://discourse.julialang.org/t/clearing-workspace/29465 "2019-10-05T02:04:53Z")

</div>

Im currently on v1.1.1 using iJulia/Jupyter - i cant find a working method for garbage collection - workspace() and gc() aren’t recognized in REPL or iJulia. Any suggestions?

---

## [Failed method resolution](https://discourse.julialang.org/t/failed-method-resolution/29500)

<div class="topic-metadata">

**Author:** [@jth](https://discourse.julialang.org/u/jth)\
**Replies:** 2\
**Last updated:** [October 4, 2019, 8:19pm UTC](https://discourse.julialang.org/t/failed-method-resolution/29500 "2019-10-04T20:19:14Z")

</div>

I am having a hard time understanding why my method is not resolving. The error message I am receiving is: julia\> DataUtil.train\_val\_test\_split(sdata, .8, .1) ERROR: MethodError: no method matching train\_val\_test\_split(…

---

## [Single legend multiple plots - Plots, pyplot()](https://discourse.julialang.org/t/single-legend-multiple-plots-plots-pyplot/29486)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 5\
**Last updated:** [October 4, 2019, 6:47pm UTC](https://discourse.julialang.org/t/single-legend-multiple-plots-plots-pyplot/29486 "2019-10-04T18:47:08Z")

</div>

Hi, I am putting together 4 scatter plots that contain the same variables, so I would like 1 unique legend at the bottom of the plot. The following code generates one legend per graph s1 = scatter(collect(1:10),collect…

---

## [Version 1.0 released of Nim Programming Language](https://discourse.julialang.org/t/version-1-0-released-of-nim-programming-language/29099)

<div class="topic-metadata">

**Author:** [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Replies:** 124\
**Last updated:** [October 4, 2019, 6:09pm UTC](https://discourse.julialang.org/t/version-1-0-released-of-nim-programming-language/29099 "2019-10-04T18:09:56Z")

</div>

The Nim programming language just released version 1.0. Since the Julia community has gone through that transition recently, I thought some might find it interesting. Congrats to the Nim team on the huge milestone. As…

---

## [Plots.jl twinx question](https://discourse.julialang.org/t/plots-jl-twinx-question/29496)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 0\
**Last updated:** [October 4, 2019, 5:03pm UTC](https://discourse.julialang.org/t/plots-jl-twinx-question/29496 "2019-10-04T17:03:03Z")

</div>

I have two questions about the twinx tool in Plots.jl: Is there a way to have a single legend that includes the labels for both sets? How do I assign a different ylabel to the right axes from the left axes?

---

## [Reading HDF4 Files](https://discourse.julialang.org/t/reading-hdf4-files/29470)

<div class="topic-metadata">

**Author:** [@natgeo-wong](https://discourse.julialang.org/u/natgeo-wong)\
**Replies:** 6\
**Last updated:** [October 4, 2019, 4:41pm UTC](https://discourse.julialang.org/t/reading-hdf4-files/29470 "2019-10-04T16:41:14Z")

</div>

Hi! As someone who needs to read in HDF4 files from TRMM and MODIS, I am trying to find a workaround in Julia using PyCall. However, I’m having some problems with loading the data. fhdf = pyhdf.SDS(“3B42.20130909.00.7…

---

## [Elevator pitch](https://discourse.julialang.org/t/elevator-pitch/29457)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 20\
**Last updated:** [October 4, 2019, 3:38pm UTC](https://discourse.julialang.org/t/elevator-pitch/29457 "2019-10-04T15:38:46Z")

</div>

How would one explain the compile/run model of Julia? As indicated in the title of this topic, in one minute or less. Evidently, I do have some ideas, but I’m sure someone can do it better, and so I am looking for ideas.…

---

## [Flux: ERROR: OutOfMemoryError()](https://discourse.julialang.org/t/flux-error-outofmemoryerror/29481)

<div class="topic-metadata">

**Author:** [@johnbb](https://discourse.julialang.org/u/johnbb)\
**Replies:** 1\
**Last updated:** [October 4, 2019, 2:52pm UTC](https://discourse.julialang.org/t/flux-error-outofmemoryerror/29481 "2019-10-04T14:52:06Z")

</div>

Hi, I am new to Julia (3-4 days experience only) and trying to fit a simple least square neural network model in Julia 1.2.0 using Flux. The code at the end results in ERROR: OutOfMemoryError() even though I have 64 GB …

---

## [Distributed parallelism within packages/applications](https://discourse.julialang.org/t/distributed-parallelism-within-packages-applications/14320)

<div class="topic-metadata">

**Author:** [@SebastianM-C](https://discourse.julialang.org/u/SebastianM-C)\
**Replies:** 15\
**Last updated:** [October 4, 2019, 2:30pm UTC](https://discourse.julialang.org/t/distributed-parallelism-within-packages-applications/14320 "2019-10-04T14:30:59Z")

</div>

How can I use parallelism (on multiple processes) in a julia application/package? I have an application (in the Pkg3 sense that is not a package) in which I use pmap. I tried to load the package with using ParallelTest …

---

## [How to pin package to the master version?](https://discourse.julialang.org/t/how-to-pin-package-to-the-master-version/29480)

<div class="topic-metadata">

**Author:** [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Replies:** 3\
**Last updated:** [October 4, 2019, 12:38pm UTC](https://discourse.julialang.org/t/how-to-pin-package-to-the-master-version/29480 "2019-10-04T12:38:40Z")

</div>

How to pin package to the master version? I need this for Travis testing.

---

## [Where to find this charmming start.jl file from my julia installation path?](https://discourse.julialang.org/t/where-to-find-this-charmming-start-jl-file-from-my-julia-installation-path/29484)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 5\
**Last updated:** [October 4, 2019, 12:25pm UTC](https://discourse.julialang.org/t/where-to-find-this-charmming-start-jl-file-from-my-julia-installation-path/29484 "2019-10-04T12:25:24Z")

</div>

Hi. I was trying to locate this start.jl file. From software Atom, after clicking Julia pane, and then open julia home, I got this .julia location Then, I tried open startup file pane, and nothing happened. I search t…

---

## [Sharing args/Arrays among different modules written in different MyFiles.jl as FORTRAN](https://discourse.julialang.org/t/sharing-args-arrays-among-different-modules-written-in-different-myfiles-jl-as-fortran/29135)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 12\
**Last updated:** [October 4, 2019, 11:32am UTC](https://discourse.julialang.org/t/sharing-args-arrays-among-different-modules-written-in-different-myfiles-jl-as-fortran/29135 "2019-10-04T11:32:43Z")

</div>

I am writing large hydrological models. After computing for e.g. Arrays/args depicting for e.g. the different vegetaion, I would like to make available all these constants Arrays within all the modules written in differe…

---

## [Pkg.add with a URL](https://discourse.julialang.org/t/pkg-add-with-a-url/29475)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 5\
**Last updated:** [October 4, 2019, 10:08am UTC](https://discourse.julialang.org/t/pkg-add-with-a-url/29475 "2019-10-04T10:08:33Z")

</div>

Is there some reason why we have to do Pkg.add(PackageSpec(url="https://github.com/PetrKryslUCSD/FinEtoolsHeatDiff.jl")) instead of Pkg.add("https://github.com/PetrKryslUCSD/FinEtoolsHeatDiff.jl") ? Couldn’t this con…

---

## [Large programs: structuring modules & include such that to increase performance and readability](https://discourse.julialang.org/t/large-programs-structuring-modules-include-such-that-to-increase-performance-and-readability/29102)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 14\
**Last updated:** [October 4, 2019, 9:43am UTC](https://discourse.julialang.org/t/large-programs-structuring-modules-include-such-that-to-increase-performance-and-readability/29102 "2019-10-04T09:43:59Z")

</div>

I am writing a large hydrological model for which I require to divide the program in many modules incorporated in individual files. I am questioning what will be an efficient and readable approach to share the modules a…

---

## [Why does a package .ji file go stale?](https://discourse.julialang.org/t/why-does-a-package-ji-file-go-stale/29473)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 1\
**Last updated:** [October 4, 2019, 8:49am UTC](https://discourse.julialang.org/t/why-does-a-package-ji-file-go-stale/29473 "2019-10-04T08:49:49Z")

</div>

Every time I start Julia, Gadfly wants to recompile again: \[ Info: Recompiling stale cache file C:\\Users\\PetrKrysl\\.julia\\compiled\\v1.3\\Gadfly\\DvECm.ji for Gadfly \[c91e804a-d5a3-530f-b6f0-dfbca275c004\] Why does the ca…

---

## [Threaded screen I/O](https://discourse.julialang.org/t/threaded-screen-i-o/29474)

<div class="topic-metadata">

**Author:** [@ckoe-bccms](https://discourse.julialang.org/u/ckoe-bccms)\
**Replies:** 0\
**Last updated:** [October 4, 2019, 7:40am UTC](https://discourse.julialang.org/t/threaded-screen-i-o/29474 "2019-10-04T07:40:55Z")

</div>

Hello everybody, I was trying the threading in 1.3rc2 and there are some questions regarding (screen) I/O which came up and which I could not directly answer using google. Apparently @printf does not “lock” the screen,…

---

## [ANN: DimensionalData.jl and GeoData.jl](https://discourse.julialang.org/t/ann-dimensionaldata-jl-and-geodata-jl/28492)

<div class="topic-metadata">

**Author:** [@Raf](https://discourse.julialang.org/u/Raf)\
**Replies:** 4\
**Last updated:** [October 4, 2019, 4:53am UTC](https://discourse.julialang.org/t/ann-dimensionaldata-jl-and-geodata-jl/28492 "2019-10-04T04:53:28Z")

</div>

I’ve put these packages together over the last few months with the aim of standardizing and abstracting the use of geospatial data in Julia. DimensionalData.jl is a reboot of AxisArrays.jl for greater flexibility and abs…

---

## [Juno REPL behaves differently than terminal REPL](https://discourse.julialang.org/t/juno-repl-behaves-differently-than-terminal-repl/29469)

<div class="topic-metadata">

**Author:** [@dpo](https://discourse.julialang.org/u/dpo)\
**Replies:** 2\
**Last updated:** [October 4, 2019, 2:15am UTC](https://discourse.julialang.org/t/juno-repl-behaves-differently-than-terminal-repl/29469 "2019-10-04T02:15:29Z")

</div>

Julia 1.2, Atom 1.40.1, latest versions of Atom.jl and Juno.jl, macOS. At a fresh Juno Julia REPL: julia\> d = Dict(1 =\> "a", 3 =\> "b", 0 =\> "c") Dict{Int64,String} with 3 entries: 0 =\> "c" 3 =\> "b" 1 =\> "a" juli…

---

## [\[ANN\] Reduce.jl : Symbolic CAS parser-interface](https://discourse.julialang.org/t/ann-reduce-jl-symbolic-cas-parser-interface/11452)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 9\
**Last updated:** [October 4, 2019, 2:04am UTC](https://discourse.julialang.org/t/ann-reduce-jl-symbolic-cas-parser-interface/11452 "2019-10-04T02:04:05Z")

</div>

REDUCE is a portable general-purpose computer algebra system. This package enables users of Julia to use this programmable CAS inside Julia with methods that automatically parse queries and their output. It currentl…

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

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