# Latest

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

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

**Page:** 1950

---

## [How to overload push!](https://discourse.julialang.org/t/how-to-overload-push/26810)

<div class="topic-metadata">

**Author:** [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Replies:** 8\
**Last updated:** [July 31, 2019, 2:22pm UTC](https://discourse.julialang.org/t/how-to-overload-push/26810 "2019-07-31T14:22:14Z")

</div>

Hi folks, I’m trying to define an object that stores some data with associated time tags. The time tags are constrained to be in consecutive order. As a consequence I’ve defined a struct with the pertinent data fields, …

---

## [Metaprogramming Queryverse/Query Pipelines](https://discourse.julialang.org/t/metaprogramming-queryverse-query-pipelines/27032)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 7\
**Last updated:** [July 31, 2019, 1:47pm UTC](https://discourse.julialang.org/t/metaprogramming-queryverse-query-pipelines/27032 "2019-07-31T13:47:53Z")

</div>

Hello, I haven’t done any real metaprogramming yet (other than tinkering around with it) and I have a situation that I think could be a good fit for a metaprogramming solution. I’m working with a dataset in Queryverse a…

---

## [\[ANN\] QRCode.jl: Create QR Code within Julia](https://discourse.julialang.org/t/ann-qrcode-jl-create-qr-code-within-julia/26923)

<div class="topic-metadata">

**Author:** [@jiegillet](https://discourse.julialang.org/u/jiegillet)\
**Replies:** 30\
**Last updated:** [July 31, 2019, 12:58pm UTC](https://discourse.julialang.org/t/ann-qrcode-jl-create-qr-code-within-julia/26923 "2019-07-31T12:58:31Z")

</div>

Simply use add QRCode to play with it. Here is the source and the documentation. This is my first project in Julia, so I’m looking for feedback on my code. I’m interested in making it more idiomatic, and possibly more e…

---

## [Pass a ref to tuple to ccall](https://discourse.julialang.org/t/pass-a-ref-to-tuple-to-ccall/27030)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 1\
**Last updated:** [July 31, 2019, 12:37pm UTC](https://discourse.julialang.org/t/pass-a-ref-to-tuple-to-ccall/27030 "2019-07-31T12:37:49Z")

</div>

I am calling an external C function that takes as an argument a pointer to an array of 4 chars and fills it with values. Myy initial attempt at a Julia wrapper was: @inline function XXH32toCanonical(h::UInt32)::NTuple{…

---

## [Julia package to wrap a C library](https://discourse.julialang.org/t/julia-package-to-wrap-a-c-library/26749)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 10\
**Last updated:** [July 31, 2019, 10:31am UTC](https://discourse.julialang.org/t/julia-package-to-wrap-a-c-library/26749 "2019-07-31T10:31:27Z")

</div>

I would like to use xxHash which has been ported to almost every language (link). The algorithm is straightforward and I could port it (using the Go version as reference). However, the original C version is highly op…

---

## [\[ANN\] IVFADC.jl inverse file system for billion-scale ANN search](https://discourse.julialang.org/t/ann-ivfadc-jl-inverse-file-system-for-billion-scale-ann-search/27025)

<div class="topic-metadata">

**Author:** [@zgornel](https://discourse.julialang.org/u/zgornel)\
**Replies:** 0\
**Last updated:** [July 31, 2019, 10:14am UTC](https://discourse.julialang.org/t/ann-ivfadc-jl-inverse-file-system-for-billion-scale-ann-search/27025 "2019-07-31T10:14:16Z")

</div>

IVFADC.jl is an inverse index for billion-scale ANN search. The package is still experimental and not registered; building and index and adding/deleting/searching points are the opperations supported. Facebook’s FAISS …

---

## [Generic decomposition for A \\ x](https://discourse.julialang.org/t/generic-decomposition-for-a-x/27023)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [July 31, 2019, 10:07am UTC](https://discourse.julialang.org/t/generic-decomposition-for-a-x/27023 "2019-07-31T10:07:05Z")

</div>

I have an algorithm where I have to perform A \* x and A \\ x a lot of times for the same A::AbstractMatrix. Importantly, A can be dense, triangular, sparse, etc. I would like to save a generic decomposition object for A …

---

## [VegaLite fails to launch bash !?](https://discourse.julialang.org/t/vegalite-fails-to-launch-bash/26954)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 5\
**Last updated:** [July 31, 2019, 9:09am UTC](https://discourse.julialang.org/t/vegalite-fails-to-launch-bash/26954 "2019-07-31T09:09:34Z")

</div>

I am trying to run the basic example of VegaLite on Ubuntu 18.04: julia\> using VegaLite, VegaDatasets julia\> @vlplot( :point, x=:Horsepower, y=:Miles\_per\_Gallon, color=:Origi…

---

## [How to troubleshoot when precompilation takes a long time?](https://discourse.julialang.org/t/how-to-troubleshoot-when-precompilation-takes-a-long-time/27020)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 1\
**Last updated:** [July 31, 2019, 8:23am UTC](https://discourse.julialang.org/t/how-to-troubleshoot-when-precompilation-takes-a-long-time/27020 "2019-07-31T08:23:34Z")

</div>

I’m working on a module and it’s taking longer and longer to precompile (now taking more like a minute). The code base isn’t too big, and it’s certainly going to grow bigger soon. I wonder if there’s any way to speed t…

---

## [Distributions.jl interop for probprog](https://discourse.julialang.org/t/distributions-jl-interop-for-probprog/26912)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 17\
**Last updated:** [July 31, 2019, 7:28am UTC](https://discourse.julialang.org/t/distributions-jl-interop-for-probprog/26912 "2019-07-31T07:28:15Z")

</div>

For probabilistic programming in particular, it’s critical to be able to use distribution-related functions (especially logpdf) in non-standard ways. For example, I would love to be able to call logpdf(TDist(nu),x) where…

---

## [OrderedSet indexing](https://discourse.julialang.org/t/orderedset-indexing/27018)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 2\
**Last updated:** [July 31, 2019, 7:23am UTC](https://discourse.julialang.org/t/orderedset-indexing/27018 "2019-07-31T07:23:25Z")

</div>

Any idea why OrderedSet indexing is deprecated? If I follow the recommendation then I would have to keep a counter and iterate until I find the ith item? julia\> using DataStructures julia\> os = OrderedSet(\[2,3,1,4,7,…

---

## [How do I clear a plot using Plots?](https://discourse.julialang.org/t/how-do-i-clear-a-plot-using-plots/26996)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 4\
**Last updated:** [July 31, 2019, 6:46am UTC](https://discourse.julialang.org/t/how-do-i-clear-a-plot-using-plots/26996 "2019-07-31T06:46:57Z")

</div>

How do I clear plot in Atom? I know it is a very basic question, but I just can’t find the answer. I am using the default backend which seems to be GR. Kind regards

---

## [Setup an environment from a shell script](https://discourse.julialang.org/t/setup-an-environment-from-a-shell-script/27012)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 3\
**Last updated:** [July 31, 2019, 6:43am UTC](https://discourse.julialang.org/t/setup-an-environment-from-a-shell-script/27012 "2019-07-31T06:43:13Z")

</div>

I’m hoping to run some simulations from a shell script. The structure is something like: parent \\\_\_ Manifest.toml \\\_\_ Project.toml \\\_\_dir \\\_\_ sim.sh \\\_\_ env.jl \\\_\_ simulate.jl where sim.sh contains #…

---

## [Symbolic manipulations with Julia](https://discourse.julialang.org/t/symbolic-manipulations-with-julia/26939)

<div class="topic-metadata">

**Author:** [@Adam\_Haber](https://discourse.julialang.org/u/Adam_Haber)\
**Replies:** 7\
**Last updated:** [July 31, 2019, 4:17am UTC](https://discourse.julialang.org/t/symbolic-manipulations-with-julia/26939 "2019-07-31T04:17:41Z")

</div>

Hi, I’m looking for a symbolic manipulations library to do different sorts of analysis on a model. I’ve tried python SymPy but couldn’t get it to work; following a recent tweet by @cscherrer, I was wondering whether I c…

---

## [Reuse declarations](https://discourse.julialang.org/t/reuse-declarations/27001)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 10\
**Last updated:** [July 31, 2019, 12:33am UTC](https://discourse.julialang.org/t/reuse-declarations/27001 "2019-07-31T00:33:29Z")

</div>

I want to declare two structures, one of which contains many of the same elements of the other. In a simple example, it would be, for example: struct A a :: Int64 end struct B a :: Int64 b :: Float64 end What I …

---

## [Access fields of pointer to struct returned from ccall](https://discourse.julialang.org/t/access-fields-of-pointer-to-struct-returned-from-ccall/26985)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 4\
**Last updated:** [July 31, 2019, 12:20am UTC](https://discourse.julialang.org/t/access-fields-of-pointer-to-struct-returned-from-ccall/26985 "2019-07-31T00:20:31Z")

</div>

I am calling a C function that returns a pointer to a struct. I have mapped that struct to a corresponding Julia type (see code below), and when I call the function I get a Ptr{T}. How can access the fields of the retu…

---

## [Type instability using interpolation as field of struct](https://discourse.julialang.org/t/type-instability-using-interpolation-as-field-of-struct/27002)

<div class="topic-metadata">

**Author:** [@jbmuir](https://discourse.julialang.org/u/jbmuir)\
**Replies:** 6\
**Last updated:** [July 31, 2019, 12:00am UTC](https://discourse.julialang.org/t/type-instability-using-interpolation-as-field-of-struct/27002 "2019-07-31T00:00:20Z")

</div>

My application has a construct equivalent to the following MWE using Interpolations struct MyStruct{T\<:Real, IT\<:AbstractInterpolation{T,1}} x::Array{T,1} y::Array{T,1} itp::IT end MyStruct(x::Array{T,1},y…

---

## [How efficient is dictionary lookup in Julia?](https://discourse.julialang.org/t/how-efficient-is-dictionary-lookup-in-julia/26984)

<div class="topic-metadata">

**Author:** [@manuelma](https://discourse.julialang.org/u/manuelma)\
**Replies:** 6\
**Last updated:** [July 30, 2019, 11:32pm UTC](https://discourse.julialang.org/t/how-efficient-is-dictionary-lookup-in-julia/26984 "2019-07-30T23:32:24Z")

</div>

I have an application where I have to lookup keys in a dictionary several times, and depending on the particular case it could be that I lookup the same key hundreds of times. How much overhead should I expect? In Pytho…

---

## [Pre-allocating an SVector and filling it with values?](https://discourse.julialang.org/t/pre-allocating-an-svector-and-filling-it-with-values/26988)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 9\
**Last updated:** [July 30, 2019, 10:42pm UTC](https://discourse.julialang.org/t/pre-allocating-an-svector-and-filling-it-with-values/26988 "2019-07-30T22:42:41Z")

</div>

Hey guys I think I have misunderstood why SVectors are good to use, so I would like to be corrected, if this is a bad use case. Suppose I have some code like this: function readBi4Time(Bi4Files::Array{String,1}=\_dirFil…

---

## [QuadGK don't work in CUDA kernel](https://discourse.julialang.org/t/quadgk-dont-work-in-cuda-kernel/26754)

<div class="topic-metadata">

**Author:** [@wiktorkujawa](https://discourse.julialang.org/u/wiktorkujawa)\
**Replies:** 6\
**Last updated:** [July 30, 2019, 9:05pm UTC](https://discourse.julialang.org/t/quadgk-dont-work-in-cuda-kernel/26754 "2019-07-30T21:05:37Z")

</div>

I have problem with executing Julia function: function biotSavartCalculation(x,y,z,Segment,I,SegmentsOnElement,segmentlength,Bx,By,Bz) xIndex=(blockIdx().x-1) \* blockDim().x + threadIdx().x yIndex=(blockIdx().y-1) \*…

---

## [Youtube searches with HTTP.jl](https://discourse.julialang.org/t/youtube-searches-with-http-jl/26915)

<div class="topic-metadata">

**Author:** [@mwolff](https://discourse.julialang.org/u/mwolff)\
**Replies:** 7\
**Last updated:** [July 30, 2019, 7:50pm UTC](https://discourse.julialang.org/t/youtube-searches-with-http-jl/26915 "2019-07-30T19:50:16Z")

</div>

Hello, folks, i am currently experimenting with the HTTP lib in Julia and try to evaluate the youtube search suggestions. It also works as far as I want to get more search suggestions and not just the first 20. What is…

---

## [What is the memory overhead of a mutable struct?](https://discourse.julialang.org/t/what-is-the-memory-overhead-of-a-mutable-struct/26963)

<div class="topic-metadata">

**Author:** [@Russ](https://discourse.julialang.org/u/Russ)\
**Replies:** 8\
**Last updated:** [July 30, 2019, 6:24pm UTC](https://discourse.julialang.org/t/what-is-the-memory-overhead-of-a-mutable-struct/26963 "2019-07-30T18:24:21Z")

</div>

I’m trying to figure out how much memory a mutable struct actually takes up. For example, in Java or C#, there’s a vptr and a syncroot/hash id, so the overhead is 8 or 16 bytes, depending on if it’s being run in 32 or 64…

---

## [Mean function unknown](https://discourse.julialang.org/t/mean-function-unknown/26844)

<div class="topic-metadata">

**Author:** [@Diego](https://discourse.julialang.org/u/Diego)\
**Replies:** 4\
**Last updated:** [July 30, 2019, 4:57pm UTC](https://discourse.julialang.org/t/mean-function-unknown/26844 "2019-07-30T16:57:15Z")

</div>

After adding and importing the Statistics package Julia still does not recognize the mean function, any ideas?

---

## [Unusual slow Julia code compared to C++?](https://discourse.julialang.org/t/unusual-slow-julia-code-compared-to-c/22987)

<div class="topic-metadata">

**Author:** [@KestutisMa](https://discourse.julialang.org/u/KestutisMa)\
**Replies:** 21\
**Last updated:** [July 30, 2019, 4:03pm UTC](https://discourse.julialang.org/t/unusual-slow-julia-code-compared-to-c/22987 "2019-07-30T16:03:12Z")

</div>

Hello, We are investigating Gap Junctions channels in cells (during cardiac arrhythmia also propagation of excitation in neural networks). I am trying to implement our model in Julia, but first version ran about 10x sl…

---

## [Help with JuMP 0.19 upgrade and performance hits](https://discourse.julialang.org/t/help-with-jump-0-19-upgrade-and-performance-hits/21214)

<div class="topic-metadata">

**Author:** [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Replies:** 8\
**Last updated:** [July 30, 2019, 4:00pm UTC](https://discourse.julialang.org/t/help-with-jump-0-19-upgrade-and-performance-hits/21214 "2019-07-30T16:00:52Z")

</div>

Hi all, I’m having some issues with Ipopt not finding a solution with a script I’m updating to Julia 1.1 / JuMP 0.19 from a functioning one on Julia 0.64 / JuMP 0.18. Unsure exactly where the problem is, so I’ve put th…

---

## [Local Modules with Conflicting Names and Module Management](https://discourse.julialang.org/t/local-modules-with-conflicting-names-and-module-management/26942)

<div class="topic-metadata">

**Author:** [@conscientiousCode](https://discourse.julialang.org/u/conscientiousCode)\
**Replies:** 8\
**Last updated:** [July 30, 2019, 2:36pm UTC](https://discourse.julialang.org/t/local-modules-with-conflicting-names-and-module-management/26942 "2019-07-30T14:36:47Z")

</div>

Hello everyone, I am writing a midsize project that has quite a few modules and I just thought of a potential problem that I cannot see answered anywhere. Suppose I want to add two distinct sources to my LOAD\_PATH for m…

---

## [Overload x\[0:0.5:0.5\] .= 1 when x is not AbstractVector](https://discourse.julialang.org/t/overload-x-0-0-5-0-5-1-when-x-is-not-abstractvector/26980)

<div class="topic-metadata">

**Author:** [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Replies:** 1\
**Last updated:** [July 30, 2019, 2:28pm UTC](https://discourse.julialang.org/t/overload-x-0-0-5-0-5-1-when-x-is-not-abstractvector/26980 "2019-07-30T14:28:52Z")

</div>

I have a custom type QuasiArray that implements broadcasting, and expected x\[0:0.5:0.5\] .= 1 to lower to the functioning view(x,0:0.5:0.5) .= 1 Unfortunately this is not working as expected, and x\[0:0.5:0.5\] .= 1 app…

---

## [Loop vectorization depends on number of terms in stencil](https://discourse.julialang.org/t/loop-vectorization-depends-on-number-of-terms-in-stencil/26948)

<div class="topic-metadata">

**Author:** [@samtkaplan](https://discourse.julialang.org/u/samtkaplan)\
**Replies:** 1\
**Last updated:** [July 30, 2019, 12:57pm UTC](https://discourse.julialang.org/t/loop-vectorization-depends-on-number-of-terms-in-stencil/26948 "2019-07-30T12:57:31Z")

</div>

Hello, I was motivated by the recent blog post about the new threading infrastructure in Julia 1.3-alpha to try writing a Julia stencil code that I would normally end up writing in C. However, before getting a chance t…

---

## [Possibility to sort conditional output?](https://discourse.julialang.org/t/possibility-to-sort-conditional-output/26933)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 12\
**Last updated:** [July 30, 2019, 11:19am UTC](https://discourse.julialang.org/t/possibility-to-sort-conditional-output/26933 "2019-07-30T11:19:40Z")

</div>

First off, sorry if my title is bad, didn’t know what else to call it. Say I have a function with inputs like these: function readBi4Array(typ::Cat,SeekNull::Bool=false,Bi4Files::Array{String,1}=\_dirFiles()) Where “ty…

---

## [Incompatible packages](https://discourse.julialang.org/t/incompatible-packages/26820)

<div class="topic-metadata">

**Author:** [@WangQuanmeng](https://discourse.julialang.org/u/WangQuanmeng)\
**Replies:** 2\
**Last updated:** [July 30, 2019, 9:23am UTC](https://discourse.julialang.org/t/incompatible-packages/26820 "2019-07-30T09:23:55Z")

</div>

Hi all, I am using Atom Juno to write julia code. Today when I started atom, it says Some installed packages could not be loaded because they contain native modules that were compiled for an earlier version of Atom. W…

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

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