# Latest

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

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

**Page:** 1522

---

## [Strip one element off the end of a \`OneTo\` (or \`UnitRange\`)](https://discourse.julialang.org/t/strip-one-element-off-the-end-of-a-oneto-or-unitrange/53404)

<div class="topic-metadata">

**Author:** [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Replies:** 1\
**Last updated:** [January 15, 2021, 8:14pm UTC](https://discourse.julialang.org/t/strip-one-element-off-the-end-of-a-oneto-or-unitrange/53404 "2021-01-15T20:14:40Z")

</div>

Say that I have the following pseudo-code: for i in 1:length(array)-1 array\[i+1\] = some\_function(array\[i\]) end Now I want to rewrite the loop using eachindex instead of 1:length (because it is simpler, and…

---

## [How to make the "Docs" button work in PkgTemplates autogenerated Readme](https://discourse.julialang.org/t/how-to-make-the-docs-button-work-in-pkgtemplates-autogenerated-readme/53306)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 3\
**Last updated:** [January 15, 2021, 8:01pm UTC](https://discourse.julialang.org/t/how-to-make-the-docs-button-work-in-pkgtemplates-autogenerated-readme/53306 "2021-01-15T20:01:48Z")

</div>

I basically used the second example from the PkgTemplates Readme: t = Template(; dir="~/code", plugins=\[ Git(; manifest=true, ssh=true), Codecov(), TravisCI(; x86=true), Documente…

---

## [Help me to model and optimize an alternative wind turbine](https://discourse.julialang.org/t/help-me-to-model-and-optimize-an-alternative-wind-turbine/51532)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 6\
**Last updated:** [January 15, 2021, 7:58pm UTC](https://discourse.julialang.org/t/help-me-to-model-and-optimize-an-alternative-wind-turbine/51532 "2021-01-15T19:58:59Z")

</div>

Heyy best community :slight\_smile: I’ve got this idea for a long time but didn’t had the time to share and visualize it. But here it is :smiley: I modeled it in a steady state and got: …

---

## [\[ANN\] Diary.jl 📔](https://discourse.julialang.org/t/ann-diary-jl/45117)

<div class="topic-metadata">

**Author:** [@Evey](https://discourse.julialang.org/u/Evey)\
**Replies:** 30\
**Last updated:** [January 15, 2021, 7:15pm UTC](https://discourse.julialang.org/t/ann-diary-jl/45117 "2021-01-15T19:15:48Z")

</div>

Dear Diary.jl :notebook\_with\_decorative\_cover:, Tired of losing work? Forgot what you did a week ago? Is your hairREPL history a mess? Sounds like you could use a diary. With Diary.jl, your REPL history is automatic…

---

## [If parametric types are invariant, why is Vector{Int} a subtype of AbstractVector{Int}?](https://discourse.julialang.org/t/if-parametric-types-are-invariant-why-is-vector-int-a-subtype-of-abstractvector-int/53394)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 4\
**Last updated:** [January 15, 2021, 6:01pm UTC](https://discourse.julialang.org/t/if-parametric-types-are-invariant-why-is-vector-int-a-subtype-of-abstractvector-int/53394 "2021-01-15T18:01:49Z")

</div>

If parametric types are invariant, why is Vector{Int} a subtype of AbstractVector{Int}? julia\> Vector{Int} \<: AbstractVector{Int} true A somewhat more complete and self-contained example: julia\> abstract type Animal{T…

---

## ["Type NamedTuple has no field" error](https://discourse.julialang.org/t/type-namedtuple-has-no-field-error/39594)

<div class="topic-metadata">

**Author:** [@Manoj\_Gopalkrishnan](https://discourse.julialang.org/u/Manoj_Gopalkrishnan)\
**Replies:** 1\
**Last updated:** [January 15, 2021, 4:53pm UTC](https://discourse.julialang.org/t/type-namedtuple-has-no-field-error/39594 "2021-01-15T16:53:08Z")

</div>

@model function f() s ~ Bernoulli(.5) if s == 1 v~Normal(0,1) else w ~ Normal(1,2) end end; model = f(); chain=sample(model,PG(20),100) gives the error CTaskException: type Nam…

---

## [Type of Array of NamedTuples with same names but different tuples](https://discourse.julialang.org/t/type-of-array-of-namedtuples-with-same-names-but-different-tuples/53389)

<div class="topic-metadata">

**Author:** [@fratrik](https://discourse.julialang.org/u/fratrik)\
**Replies:** 1\
**Last updated:** [January 15, 2021, 4:51pm UTC](https://discourse.julialang.org/t/type-of-array-of-namedtuples-with-same-names-but-different-tuples/53389 "2021-01-15T16:51:12Z")

</div>

I want to write a function that iterates over arrays of named tuples. In particular, I want to write a map reduce that pulls the names up to the highest level: function sel\_map\_red(nt::AbstractArray{NamedTuple{names, T}…

---

## [Moving from Travis to Github CI](https://discourse.julialang.org/t/moving-from-travis-to-github-ci/53361)

<div class="topic-metadata">

**Author:** [@goedman](https://discourse.julialang.org/u/goedman)\
**Replies:** 2\
**Last updated:** [January 15, 2021, 4:47pm UTC](https://discourse.julialang.org/t/moving-from-travis-to-github-ci/53361 "2021-01-15T16:47:49Z")

</div>

I’m trying to build Stan’s cmdstan binary while using Github CI. On Travis this is possible using: env: - JULIA\_CMDSTAN\_HOME="$HOME/cmdstan-2.24.0/" before\_install: - OLDWD=\`pwd\` - cd ~ - wget https://github.…

---

## [Macro to create variables from arrays of names and values](https://discourse.julialang.org/t/macro-to-create-variables-from-arrays-of-names-and-values/53349)

<div class="topic-metadata">

**Author:** [@thorek1](https://discourse.julialang.org/u/thorek1)\
**Replies:** 14\
**Last updated:** [January 15, 2021, 2:23pm UTC](https://discourse.julialang.org/t/macro-to-create-variables-from-arrays-of-names-and-values/53349 "2021-01-15T14:23:53Z")

</div>

Hi, I am stuck writing a macro to create variables from an array of names (as strings) and an array of values to be assigned. So this is what I start with: Names = \["R", "k", "y"\] Values = \[1.01, 4.7, 1.3\] what I wou…

---

## [Text Analysis. Does anybody know a package (Julia, Python) to parse a sentence to subject, verb, object.?](https://discourse.julialang.org/t/text-analysis-does-anybody-know-a-package-julia-python-to-parse-a-sentence-to-subject-verb-object/34834)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 7\
**Last updated:** [January 15, 2021, 2:22pm UTC](https://discourse.julialang.org/t/text-analysis-does-anybody-know-a-package-julia-python-to-parse-a-sentence-to-subject-verb-object/34834 "2021-01-15T14:22:00Z")

</div>

Text Analysis: Does anybody know a package (Julia, Python) to parse a sentence to subject, verb, object? Thank you for any useful information. best

---

## [\[ANN\] (JuliaConstraints) LocalSearchSolvers.jl and CompositionalNetworks.jl](https://discourse.julialang.org/t/ann-juliaconstraints-localsearchsolvers-jl-and-compositionalnetworks-jl/53380)

<div class="topic-metadata">

**Author:** [@Azzaare](https://discourse.julialang.org/u/Azzaare)\
**Replies:** 2\
**Last updated:** [January 15, 2021, 12:30pm UTC](https://discourse.julialang.org/t/ann-juliaconstraints-localsearchsolvers-jl-and-compositionalnetworks-jl/53380 "2021-01-15T12:30:02Z")

</div>

CompositionalNetworks.jl is a Julia package for Interpretable Compositional Networks (ICN), a variant of neural networks, allowing the user to get interpretable results, unlike regular artificial neural networks. The cu…

---

## [DesignByContract.jl: DbC interface for Julia (feedback)](https://discourse.julialang.org/t/designbycontract-jl-dbc-interface-for-julia-feedback/49079)

<div class="topic-metadata">

**Author:** [@gghaetinger](https://discourse.julialang.org/u/gghaetinger)\
**Replies:** 10\
**Last updated:** [January 15, 2021, 12:27pm UTC](https://discourse.julialang.org/t/designbycontract-jl-dbc-interface-for-julia-feedback/49079 "2021-01-15T12:27:06Z")

</div>

I’ve been working on a new package for Julia which brings the “Design by Contract” functionality from Eiffel in the form of macros. I think this is something that could be used on future Julia application development, wh…

---

## [Understanding what -t does](https://discourse.julialang.org/t/understanding-what-t-does/53329)

<div class="topic-metadata">

**Author:** [@fa-bien](https://discourse.julialang.org/u/fa-bien)\
**Replies:** 18\
**Last updated:** [January 15, 2021, 11:43am UTC](https://discourse.julialang.org/t/understanding-what-t-does/53329 "2021-01-15T11:43:46Z")

</div>

I am running a single-threaded program and it executes ~10% faster when I run it with -t 2 compared to when I run with -t 1, i.e. when I allow two threads instead of one. The program does not explicitly refer to anything…

---

## [Functions of GPUArrays in ODEs and scheduling on GPU](https://discourse.julialang.org/t/functions-of-gpuarrays-in-odes-and-scheduling-on-gpu/53304)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 11\
**Last updated:** [January 15, 2021, 11:31am UTC](https://discourse.julialang.org/t/functions-of-gpuarrays-in-odes-and-scheduling-on-gpu/53304 "2021-01-15T11:31:57Z")

</div>

I have a totally noob question here. I know that there are GPUArrays for which broadcasting and various linear algebra stuff is overloaded, so it gets executed on GPU. Suppose, that I define a function which works with…

---

## [Adding a new line to a candlestick plot](https://discourse.julialang.org/t/adding-a-new-line-to-a-candlestick-plot/53375)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 7\
**Last updated:** [January 15, 2021, 10:19am UTC](https://discourse.julialang.org/t/adding-a-new-line-to-a-candlestick-plot/53375 "2021-01-15T10:19:29Z")

</div>

Hi all, The TimeSeries.jl package allows the construction of a candlestick plot. This works very nicely for me. However, sometimes I’d like to add another line to overlay the candlestick plot. I’ve been messing around f…

---

## [KernelError with Flux.tain! on GPU](https://discourse.julialang.org/t/kernelerror-with-flux-tain-on-gpu/52989)

<div class="topic-metadata">

**Author:** [@Geoffrey](https://discourse.julialang.org/u/Geoffrey)\
**Replies:** 4\
**Last updated:** [January 15, 2021, 8:42am UTC](https://discourse.julialang.org/t/kernelerror-with-flux-tain-on-gpu/52989 "2021-01-15T08:42:31Z")

</div>

Hi, I’m trying to train denoising autoencoder for data imputation and I manage to get it work on CPU but I get a KernelError when trying to go on GPU. However, I checked that my loss function don’t produce error when us…

---

## [Getting PyCall tests to work with Julia 1.7 / Core.TypeofVararg](https://discourse.julialang.org/t/getting-pycall-tests-to-work-with-julia-1-7-core-typeofvararg/53257)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 1\
**Last updated:** [January 15, 2021, 7:06am UTC](https://discourse.julialang.org/t/getting-pycall-tests-to-work-with-julia-1-7-core-typeofvararg/53257 "2021-01-15T07:06:52Z")

</div>

Last night I waged war with PyCall.jl’s tests. Today I have a minimal PR to fix them. I’m writing up the story in case anyone encounters similar issues with Core.TypeofVararg or AOT compilation tests. https://github.com…

---

## [Segmentation fault when calling fortran function](https://discourse.julialang.org/t/segmentation-fault-when-calling-fortran-function/53319)

<div class="topic-metadata">

**Author:** [@k945](https://discourse.julialang.org/u/k945)\
**Replies:** 4\
**Last updated:** [January 15, 2021, 6:00am UTC](https://discourse.julialang.org/t/segmentation-fault-when-calling-fortran-function/53319 "2021-01-15T06:00:44Z")

</div>

I am a bit lost with a script a fortran script that I am trying to use. I run into a seg fault error when calling dcapecalc2d from \[rip\_cape.f90\]((https://github.com/NCAR/wrf-python/blob/develop/fortran/rip\_cape.f90). s…

---

## [Easier way to load package I'm developing?](https://discourse.julialang.org/t/easier-way-to-load-package-im-developing/53370)

<div class="topic-metadata">

**Author:** [@Visipi](https://discourse.julialang.org/u/Visipi)\
**Replies:** 3\
**Last updated:** [January 15, 2021, 5:27am UTC](https://discourse.julialang.org/t/easier-way-to-load-package-im-developing/53370 "2021-01-15T05:27:29Z")

</div>

Hi, new to Julia. I have this package I want to develop which for the sake of example we’ll call myPkg. It’s located in ~/.julia/dev/myPkg and I’ve used PkgTemplates.jl to set up properly. I’m using Juno through Atom t…

---

## [Does any julia-based GUI app (.exe/executable/installer) exists for Windows or Linux?](https://discourse.julialang.org/t/does-any-julia-based-gui-app-exe-executable-installer-exists-for-windows-or-linux/53283)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 25\
**Last updated:** [January 15, 2021, 1:58am UTC](https://discourse.julialang.org/t/does-any-julia-based-gui-app-exe-executable-installer-exists-for-windows-or-linux/53283 "2021-01-15T01:58:18Z")

</div>

Out of curiosity, the topic on crowdfunding for a GUI ML project make me asking if does any project (not necessarily related to ML) exist that uses PackageCompiler.jl to produce a self-contained julia-base GUI app for Wi…

---

## [Intersection of ProductIterator](https://discourse.julialang.org/t/intersection-of-productiterator/53357)

<div class="topic-metadata">

**Author:** [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)\
**Replies:** 2\
**Last updated:** [January 15, 2021, 12:49am UTC](https://discourse.julialang.org/t/intersection-of-productiterator/53357 "2021-01-15T00:49:56Z")

</div>

I noticed that intersect on Iterators.ProductIterator{\<:NTuple{N,UnitRange}} generates all the values and stores them in a Vector. I was expecting it to return an Iterators.ProductIterator{\<:NTuple{N,UnitRange}} since in…

---

## [ForwardDiff: "No Method Matching" Error](https://discourse.julialang.org/t/forwarddiff-no-method-matching-error/53311)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 9\
**Last updated:** [January 15, 2021, 12:19am UTC](https://discourse.julialang.org/t/forwarddiff-no-method-matching-error/53311 "2021-01-15T00:19:25Z")

</div>

I’m testing out the ForwardDiff package for the first time, but unfortunately I’m getting a “No Method Matching” error that I can’t figure out. I was successful in making the following test example by mimicking the one …

---

## [How to get persistence on distributed workers](https://discourse.julialang.org/t/how-to-get-persistence-on-distributed-workers/53098)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 7\
**Last updated:** [January 14, 2021, 11:11pm UTC](https://discourse.julialang.org/t/how-to-get-persistence-on-distributed-workers/53098 "2021-01-14T23:11:28Z")

</div>

The following example attempts to define A on several workers, which then update their local copies. How can I make this work? using Distributed,Test addprocs(2) @everywhere function incA() A += myid() # this is th…

---

## [Faster updates in a priority queue](https://discourse.julialang.org/t/faster-updates-in-a-priority-queue/53346)

<div class="topic-metadata">

**Author:** [@shawnfrost](https://discourse.julialang.org/u/shawnfrost)\
**Replies:** 4\
**Last updated:** [January 14, 2021, 10:24pm UTC](https://discourse.julialang.org/t/faster-updates-in-a-priority-queue/53346 "2021-01-14T22:24:16Z")

</div>

Hi. I’m currently experiencing a bottleneck in my simulations where a relatively large amount of time is spent on the setindex! function from DataStructures.jl’s implementation of a priority queue. I have a representatio…

---

## [Plotting while working with VS Code remote - ssh](https://discourse.julialang.org/t/plotting-while-working-with-vs-code-remote-ssh/34309)

<div class="topic-metadata">

**Author:** [@sebastianpech](https://discourse.julialang.org/u/sebastianpech)\
**Replies:** 8\
**Last updated:** [January 14, 2021, 9:16pm UTC](https://discourse.julialang.org/t/plotting-while-working-with-vs-code-remote-ssh/34309 "2021-01-14T21:16:50Z")

</div>

Hi, I found a nice and simple solution for plotting while working with vscode remote over ssh. Maybe it’s obvious or there is a simpler solution, but wanted to share it anyways: I connect an extra ssh session with X11 f…

---

## [DataFrames show() ignores column width, prints everything](https://discourse.julialang.org/t/dataframes-show-ignores-column-width-prints-everything/53327)

<div class="topic-metadata">

**Author:** [@xyz1](https://discourse.julialang.org/u/xyz1)\
**Replies:** 3\
**Last updated:** [January 14, 2021, 8:38pm UTC](https://discourse.julialang.org/t/dataframes-show-ignores-column-width-prints-everything/53327 "2021-01-14T20:38:12Z")

</div>

Hi, I’m using DataFrames with IJulia and when I create a DataFrame and then “show” it, instead of truncation like in Python it shows all columns non-truncated, which obviously hangs always. I’ve tried setting ENV\[“COLUMN…

---

## [Interactive visualization of multidimensional array](https://discourse.julialang.org/t/interactive-visualization-of-multidimensional-array/53356)

<div class="topic-metadata">

**Author:** [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Replies:** 0\
**Last updated:** [January 14, 2021, 8:34pm UTC](https://discourse.julialang.org/t/interactive-visualization-of-multidimensional-array/53356 "2021-01-14T20:34:39Z")

</div>

I’ve got a 3D array, representing vector-valued observations at each location on a 2D grid. I’d like to find a way to plot this array so that one subplot shows a spatial slice, while a second subplot shows the data valu…

---

## [Makie does not display when mesh function is called in a loop](https://discourse.julialang.org/t/makie-does-not-display-when-mesh-function-is-called-in-a-loop/35983)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 5\
**Last updated:** [January 14, 2021, 8:16pm UTC](https://discourse.julialang.org/t/makie-does-not-display-when-mesh-function-is-called-in-a-loop/35983 "2021-01-14T20:16:20Z")

</div>

I wrote a Makie function to draw several meshes in the same window but couldn’t get anything to display. Eventually simplified to the problem to this: if the Makie.mesh! function is called in a loop nothing displays, eve…

---

## [Can't install IJulia after re-installing Julia to run Julia through Jupyter notebooks](https://discourse.julialang.org/t/cant-install-ijulia-after-re-installing-julia-to-run-julia-through-jupyter-notebooks/53352)

<div class="topic-metadata">

**Author:** [@Tomas\_Bonfiglio](https://discourse.julialang.org/u/Tomas_Bonfiglio)\
**Replies:** 6\
**Last updated:** [January 14, 2021, 8:03pm UTC](https://discourse.julialang.org/t/cant-install-ijulia-after-re-installing-julia-to-run-julia-through-jupyter-notebooks/53352 "2021-01-14T20:03:29Z")

</div>

Hey! how are you guys doing? I’m dealing with a rather obnoxious problem. I want to run Julia through Jupyter notebooks, I’ve Windows 10 and Python (through Anaconda suite) and as I was dealing with some cleaning I’ve u…

---

## [Problems build CodecZlib](https://discourse.julialang.org/t/problems-build-codeczlib/53332)

<div class="topic-metadata">

**Author:** [@AlexanderChen](https://discourse.julialang.org/u/AlexanderChen)\
**Replies:** 4\
**Last updated:** [January 14, 2021, 7:46pm UTC](https://discourse.julialang.org/t/problems-build-codeczlib/53332 "2021-01-14T19:46:50Z")

</div>

Hi, want to do some tests with MetaGraphs but it fails. error suggests to build CodecZlib. But get this error: (v1.0) pkg\> build CodecZlib Building CodecZlib → \`C:\\Users\\achen\\.julia\\packages\\CodecZlib\\5t9zO\\deps\\bui…

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

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