# Latest

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

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

**Page:** 1633

---

## [REPL I/O in a Pkg instead of \`readline()\`?](https://discourse.julialang.org/t/repl-i-o-in-a-pkg-instead-of-readline/46554)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 5\
**Last updated:** [September 13, 2020, 8:50pm UTC](https://discourse.julialang.org/t/repl-i-o-in-a-pkg-instead-of-readline/46554 "2020-09-13T20:50:01Z")

</div>

Hi everyone, Working on a package to give interactive tutorials for new Julia users. Hit a stumbling block that I’m not convinced has a good answer. Basically here’s what I want to happen: Hi juliatutor user type \`prin…

---

## [Julia-1.5.1 build error on ubuntu-mate](https://discourse.julialang.org/t/julia-1-5-1-build-error-on-ubuntu-mate/46542)

<div class="topic-metadata">

**Author:** [@vadrer](https://discourse.julialang.org/u/vadrer)\
**Replies:** 3\
**Last updated:** [September 13, 2020, 7:29pm UTC](https://discourse.julialang.org/t/julia-1-5-1-build-error-on-ubuntu-mate/46542 "2020-09-13T19:29:02Z")

</div>

I have build error when trying to build latest 1.5.1 on ubuntu Linux vad-1025C 5.3.0-61-generic #55~18.04.1-Ubuntu SMP Mon Jun 22 16:40:46 UTC 2020 i686 i686 i686 GNU/Linux vad@vad-1025C:~/julia/julia-1.5.1$ make Warnin…

---

## [Union Types - Good or Bad?](https://discourse.julialang.org/t/union-types-good-or-bad/46255)

<div class="topic-metadata">

**Author:** [@seertaak](https://discourse.julialang.org/u/seertaak)\
**Replies:** 17\
**Last updated:** [September 9, 2020, 11:06pm UTC](https://discourse.julialang.org/t/union-types-good-or-bad/46255 "2020-09-09T23:06:37Z")

</div>

Recently, I watched Jeff Bezancon’s talk titled “What’s Bad About Julia”. It’s an excellent talk. Towards the end, someone asks the question: “How much better or worse would the world be without union?” I …

---

## [How to find out why packages are downgraded](https://discourse.julialang.org/t/how-to-find-out-why-packages-are-downgraded/46513)

<div class="topic-metadata">

**Author:** [@grahamstark](https://discourse.julialang.org/u/grahamstark)\
**Replies:** 2\
**Last updated:** [September 13, 2020, 6:23pm UTC](https://discourse.julialang.org/t/how-to-find-out-why-packages-are-downgraded/46513 "2020-09-13T18:23:38Z")

</div>

Hi, I’ve just run \]up and found some large downgrades to packages I care about, for example: \[70588ee8\] ↓ CSSUtil v0.1.1 ⇒ v0.1.0 \[336ed68f\] ↓ CSV v0.7.7 ⇒ v0.6.1 \[5d742f6a\] ↓ CSVFiles v1.0.0 ⇒ v0.16.1 \[324d7…

---

## [CartesianIndices overhead](https://discourse.julialang.org/t/cartesianindices-overhead/46461)

<div class="topic-metadata">

**Author:** [@Benjia](https://discourse.julialang.org/u/Benjia)\
**Replies:** 9\
**Last updated:** [September 13, 2020, 4:29pm UTC](https://discourse.julialang.org/t/cartesianindices-overhead/46461 "2020-09-13T16:29:19Z")

</div>

I’ve been experimenting with the techniques described here Multidimensional algorithms and iteration for writing some generic multi-dimensional operations. Let’s look at a nan-skipping sum: function nansum!(B, A) #…

---

## [Frequency counts on a square lattice](https://discourse.julialang.org/t/frequency-counts-on-a-square-lattice/46533)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 6\
**Last updated:** [September 13, 2020, 3:29pm UTC](https://discourse.julialang.org/t/frequency-counts-on-a-square-lattice/46533 "2020-09-13T15:29:31Z")

</div>

I have a square array, c, with integer entries that I expect to repeat. I would like to get frequency counts on the different indices, as they represent categorical data. I was wondering what might be the most efficien…

---

## [Allocation on ForwardDiff + DiffResults + StaticArrays](https://discourse.julialang.org/t/allocation-on-forwarddiff-diffresults-staticarrays/46534)

<div class="topic-metadata">

**Author:** [@longemen3000](https://discourse.julialang.org/u/longemen3000)\
**Replies:** 2\
**Last updated:** [September 13, 2020, 2:09pm UTC](https://discourse.julialang.org/t/allocation-on-forwarddiff-diffresults-staticarrays/46534 "2020-09-13T14:09:12Z")

</div>

Im hunting down an allocation on DiffResults + ForwardDiff + StaticArrays. this is the MWE: using ForwardDiff, DiffResults, StaticArrays, BenchmarkTools fff(v1,v2) = sin(v1)+cos(v2)+exp(v1+log(v2+cos(v1))) function ∂tes…

---

## [Type inference for a singleton of type Function](https://discourse.julialang.org/t/type-inference-for-a-singleton-of-type-function/46544)

<div class="topic-metadata">

**Author:** [@Adam\_Haber](https://discourse.julialang.org/u/Adam_Haber)\
**Replies:** 7\
**Last updated:** [September 13, 2020, 12:45pm UTC](https://discourse.julialang.org/t/type-inference-for-a-singleton-of-type-function/46544 "2020-09-13T12:45:51Z")

</div>

I have an object that stores (amongst other things) a vector of functions. When I use multiple functions, everything works nicely. However, if I pass it a vector with a single function, I’m getting type-inference problem…

---

## [How to view kwargs](https://discourse.julialang.org/t/how-to-view-kwargs/46280)

<div class="topic-metadata">

**Author:** [@Dustin\_Hess](https://discourse.julialang.org/u/Dustin_Hess)\
**Replies:** 4\
**Last updated:** [September 13, 2020, 12:45pm UTC](https://discourse.julialang.org/t/how-to-view-kwargs/46280 "2020-09-13T12:45:34Z")

</div>

When using a package such as PlotlyJS.jl, ( Such as I am). How does one find all kwargs available for a particular function. PoltyJS does not document what they are. They do show you how to use them but it seems not be o…

---

## [Why won't Julia let me put a module import within a function?](https://discourse.julialang.org/t/why-wont-julia-let-me-put-a-module-import-within-a-function/46504)

<div class="topic-metadata">

**Author:** [@fusion809](https://discourse.julialang.org/u/fusion809)\
**Replies:** 7\
**Last updated:** [September 13, 2020, 11:33am UTC](https://discourse.julialang.org/t/why-wont-julia-let-me-put-a-module-import-within-a-function/46504 "2020-09-13T11:33:06Z")

</div>

I just created the function: function operats() using GLPK using Clp using JuMP using Hungarian end and to my surprise this gave me the error: ERROR: syntax: "using" expression not at top level The re…

---

## [Basic question about Hidden Markov Models](https://discourse.julialang.org/t/basic-question-about-hidden-markov-models/46453)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 6\
**Last updated:** [September 13, 2020, 10:56am UTC](https://discourse.julialang.org/t/basic-question-about-hidden-markov-models/46453 "2020-09-13T10:56:34Z")

</div>

I don’t have any experience with Hidden Markov Models but I have a problem that I’m trying to solve that I believe fits within the HMM framework. I’ve been reading about HMMs (this resource is particularly nice) and I’ve…

---

## [Speed of plotting using PlotlyJS](https://discourse.julialang.org/t/speed-of-plotting-using-plotlyjs/45937)

<div class="topic-metadata">

**Author:** [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Replies:** 6\
**Last updated:** [September 13, 2020, 10:03am UTC](https://discourse.julialang.org/t/speed-of-plotting-using-plotlyjs/45937 "2020-09-13T10:03:09Z")

</div>

Is it normal that plotting using PlotlyJS takes 2-5 sec? using PlotlyJS plot(heatmap(z = rand(2000, 1000)))

---

## [Understanding how variables are stored](https://discourse.julialang.org/t/understanding-how-variables-are-stored/46491)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 6\
**Last updated:** [September 13, 2020, 7:39am UTC](https://discourse.julialang.org/t/understanding-how-variables-are-stored/46491 "2020-09-13T07:39:58Z")

</div>

After my epic boxes or labels question, I decided to put those analogies aside for the moment and focus on the documentation. On the memory layout page, it states: The jl\_value\_t struct is the name for a block of memo…

---

## [Combining DiffEqFlux with Turing for Bayesian Inference and Neural ODEs](https://discourse.julialang.org/t/combining-diffeqflux-with-turing-for-bayesian-inference-and-neural-odes/46520)

<div class="topic-metadata">

**Author:** [@a\_garval](https://discourse.julialang.org/u/a_garval)\
**Replies:** 1\
**Last updated:** [September 13, 2020, 5:48am UTC](https://discourse.julialang.org/t/combining-diffeqflux-with-turing-for-bayesian-inference-and-neural-odes/46520 "2020-09-13T05:48:00Z")

</div>

Hi all, I’m trying to implement a Bayesian Neural Network. The catch is that this neural network is used to approximate a function that is then integrated to predict time series generated by an ODE. Reading through Turi…

---

## [ANN: GrowthMaps.jl](https://discourse.julialang.org/t/ann-growthmaps-jl/46532)

<div class="topic-metadata">

**Author:** [@Raf](https://discourse.julialang.org/u/Raf)\
**Replies:** 1\
**Last updated:** [September 13, 2020, 2:17am UTC](https://discourse.julialang.org/t/ann-growthmaps-jl/46532 "2020-09-13T02:17:25Z")

</div>

Announcing GrowthMaps.jl A simple package for doing spatial ecology/ecophysiology in julia. I’ve developed it at cesar, (who btw are looking to employ another julia modeller!), based on the work of my coworker James Mai…

---

## [Save variables to .mat file or .jld2 file by metaprogramming](https://discourse.julialang.org/t/save-variables-to-mat-file-or-jld2-file-by-metaprogramming/46471)

<div class="topic-metadata">

**Author:** [@Logic\_Logical](https://discourse.julialang.org/u/Logic_Logical)\
**Replies:** 4\
**Last updated:** [September 13, 2020, 1:24am UTC](https://discourse.julialang.org/t/save-variables-to-mat-file-or-jld2-file-by-metaprogramming/46471 "2020-09-13T01:24:23Z")

</div>

Here is a normal code to save variables to mat file (no variable name modification) using FileIO, MAT a = 1 b = 2 c = 3 matwrite("savemat.mat", Dict("a" =\> a,"b" =\> b, "c" =\> c)) The question is: How can I write a func…

---

## [Does Julia have "unlikely" hint similar to in C++ or a way to fix code generation here](https://discourse.julialang.org/t/does-julia-have-unlikely-hint-similar-to-in-c-or-a-way-to-fix-code-generation-here/46528)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 6\
**Last updated:** [September 13, 2020, 1:19am UTC](https://discourse.julialang.org/t/does-julia-have-unlikely-hint-similar-to-in-c-or-a-way-to-fix-code-generation-here/46528 "2020-09-13T01:19:21Z")

</div>

https://en.cppreference.com/w/cpp/language/attributes/likely I’m trying to get the division first, but the Julia code generation puts vdivsd %xmm0, %xmm1, %xmm1 very late: \_sinc\_threshold(::Type{Float64}) = 0.001 @inl…

---

## [Broadcasting in loss function for RNN with timeseries](https://discourse.julialang.org/t/broadcasting-in-loss-function-for-rnn-with-timeseries/44526)

<div class="topic-metadata">

**Author:** [@raoulg](https://discourse.julialang.org/u/raoulg)\
**Replies:** 4\
**Last updated:** [September 12, 2020, 10:33pm UTC](https://discourse.julialang.org/t/broadcasting-in-loss-function-for-rnn-with-timeseries/44526 "2020-09-12T22:33:55Z")

</div>

I’m trying to get an RNN to work with timeseries and I don’t understand why things don’t work as expected. I found a workaround, but it just seems to be too complicated. My data are sequences of 29 observations, and I h…

---

## [Create Running Total Columns in a Data Frame for Multiple Variables with Dynamic Column Name Creation](https://discourse.julialang.org/t/create-running-total-columns-in-a-data-frame-for-multiple-variables-with-dynamic-column-name-creation/46299)

<div class="topic-metadata">

**Author:** [@clibassi](https://discourse.julialang.org/u/clibassi)\
**Replies:** 7\
**Last updated:** [September 12, 2020, 9:28pm UTC](https://discourse.julialang.org/t/create-running-total-columns-in-a-data-frame-for-multiple-variables-with-dynamic-column-name-creation/46299 "2020-09-12T21:28:31Z")

</div>

I’ve got some sports data in a dataframe I’m playing with that has data on teams throughout a season and I have a number of performance measures I’d like to create cumulative sums for. I found some great suggestions for …

---

## [Help with simplified StaticArrays implementation](https://discourse.julialang.org/t/help-with-simplified-staticarrays-implementation/45522)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 16\
**Last updated:** [September 12, 2020, 9:25pm UTC](https://discourse.julialang.org/t/help-with-simplified-staticarrays-implementation/45522 "2020-09-12T21:25:02Z")

</div>

Poblem: StaticArrays.jl is too large of a dependency and has too many extra features. To simplify my dependencies, I need a simplified variant of SVector, MVector, and SizedVector. Solution: In AbstractTensors.jl they…

---

## [Rand() vs rand(rng)](https://discourse.julialang.org/t/rand-vs-rand-rng/46517)

<div class="topic-metadata">

**Author:** [@steve1313](https://discourse.julialang.org/u/steve1313)\
**Replies:** 4\
**Last updated:** [September 12, 2020, 7:20pm UTC](https://discourse.julialang.org/t/rand-vs-rand-rng/46517 "2020-09-12T19:20:22Z")

</div>

Hello. Why is rand(rng) ten times slower than rand() ? See code below: julia\> using Random julia\> rng = MersenneTwister(12345); julia\> function test() t0=time() x=0.0; for k=1:100000000 x+=rand(rng) end x,time…

---

## [Performance issues?](https://discourse.julialang.org/t/performance-issues/46489)

<div class="topic-metadata">

**Author:** [@kc104](https://discourse.julialang.org/u/kc104)\
**Replies:** 9\
**Last updated:** [September 12, 2020, 7:13pm UTC](https://discourse.julialang.org/t/performance-issues/46489 "2020-09-12T19:13:01Z")

</div>

As a learning project I reimplemented a simple Bayesian NN in julia from scratch (hopefully without mistakes!) Benchmarking vs. my Pytorch code on the same CPU I’m seeing a runtime of +30% (using BenchmarkTools)… While…

---

## [Make your Julia package in 10 minutes](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368)

<div class="topic-metadata">

**Author:** [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Replies:** 15\
**Last updated:** [September 12, 2020, 6:05pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368 "2020-09-12T18:05:16Z")

</div>

I built my blog some time ago using Franklin.jl and Bootstrap, and I was just waiting for the suitable blogpost material. It’s a common question here how to make your own package, so I decided to write a post about it. …

---

## [JuMP constraint MethodError: no method matching isless(::Int64, ::VariableRef)](https://discourse.julialang.org/t/jump-constraint-methoderror-no-method-matching-isless-int64-variableref/46498)

<div class="topic-metadata">

**Author:** [@valenmgama](https://discourse.julialang.org/u/valenmgama)\
**Replies:** 3\
**Last updated:** [September 12, 2020, 4:54pm UTC](https://discourse.julialang.org/t/jump-constraint-methoderror-no-method-matching-isless-int64-variableref/46498 "2020-09-12T16:54:47Z")

</div>

Hey, I need your help! What I am basically trying is to add a constraint to a JuMP matrix variable that no more than one element of a row can be a value larger than 0. In other words only 1 element in the row can be a …

---

## [What IDE for Julia + other languages?](https://discourse.julialang.org/t/what-ide-for-julia-other-languages/46208)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 26\
**Last updated:** [September 12, 2020, 4:32pm UTC](https://discourse.julialang.org/t/what-ide-for-julia-other-languages/46208 "2020-09-12T16:32:58Z")

</div>

Does anyone know what IDE’s are preferred for multilanguage development? I have to brush up on python right now. Experiences so far… Atom + Juno: Open a Py file, and Juno doesn’t toggle off to say ide-python or somethin…

---

## [New array from a sum of N values in array A?](https://discourse.julialang.org/t/new-array-from-a-sum-of-n-values-in-array-a/46496)

<div class="topic-metadata">

**Author:** [@SEnergy](https://discourse.julialang.org/u/SEnergy)\
**Replies:** 8\
**Last updated:** [September 12, 2020, 2:24pm UTC](https://discourse.julialang.org/t/new-array-from-a-sum-of-n-values-in-array-a/46496 "2020-09-12T14:24:58Z")

</div>

I’m sorry if the title is a little bit misleading, but I’m having trouble explaining it in one sentence Assume I have an array A A = \[1, 2, 3, 4, 5\]; What I want is to create an array B that will contain sums of every…

---

## [Garbage collecting SharedArrays](https://discourse.julialang.org/t/garbage-collecting-sharedarrays/46510)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 1\
**Last updated:** [September 12, 2020, 3:33pm UTC](https://discourse.julialang.org/t/garbage-collecting-sharedarrays/46510 "2020-09-12T15:33:43Z")

</div>

I’ve been using some very large SharedArrays. Occasionally, my code allocates one which it wants only for the duration of a function call. However, they don’t seem to be freed and the machine eventually runs out of mem…

---

## [How to get axis rotations from UnitQuaternion in Rotations.jl](https://discourse.julialang.org/t/how-to-get-axis-rotations-from-unitquaternion-in-rotations-jl/46490)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 2\
**Last updated:** [September 12, 2020, 3:12pm UTC](https://discourse.julialang.org/t/how-to-get-axis-rotations-from-unitquaternion-in-rotations-jl/46490 "2020-09-12T15:12:46Z")

</div>

How do I get axis (X, Y, Z) rotations from UnitQuaternion? julia\> RotXYZ(UnitQuaternion(RotX(1))) 3×3 RotXYZ{Float64} with indices SOneTo(3)×SOneTo(3)(1.0, 0.0, 0.0): 1.0 -0.0 0.0 0.0 0.540302 -0.841471 0.…

---

## [Display an RGB array with Gtk.jl](https://discourse.julialang.org/t/display-an-rgb-array-with-gtk-jl/46506)

<div class="topic-metadata">

**Author:** [@noroskir](https://discourse.julialang.org/u/noroskir)\
**Replies:** 2\
**Last updated:** [September 12, 2020, 3:12pm UTC](https://discourse.julialang.org/t/display-an-rgb-array-with-gtk-jl/46506 "2020-09-12T15:12:33Z")

</div>

Hi there! I have an image as a 3dim RGB array Array{Int32, (width, height, 3)} and I want to render it with Gtk.jl. I have not yet found a description on how to do this. Can anyone help ? Thanks :slight\_smile:

---

## [Can't install Any new package](https://discourse.julialang.org/t/cant-install-any-new-package/46509)

<div class="topic-metadata">

**Author:** [@Nitish\_Dubey](https://discourse.julialang.org/u/Nitish_Dubey)\
**Replies:** 2\
**Last updated:** [September 12, 2020, 2:48pm UTC](https://discourse.julialang.org/t/cant-install-any-new-package/46509 "2020-09-12T14:48:32Z")

</div>

I am unable to install any new package whenever I’m trying to install one getting the following error. \` Resolving package versions... ERROR: Unsatisfiable requirements detected for package LightXML \[9c8b4983\]: LightXM…

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

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