# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=910

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

**Page:** 911

---

## [An Adventurous Juila Challenge](https://discourse.julialang.org/t/an-adventurous-juila-challenge/18620)

<div class="topic-metadata">

**Author:** [@jzakiya](https://discourse.julialang.org/u/jzakiya)\
**Replies:** 0\
**Last updated:** [December 13, 2018, 3:24am UTC](https://discourse.julialang.org/t/an-adventurous-juila-challenge/18620 "2018-12-13T03:24:52Z")

</div>

Hello, I hope I put this post in the correct category, excuse me if not. I’ve been following Julia sporadically for about two years. When it hit 1.0 I finally installed it on my laptop, but so far haven’t done anything…

---

## [Check for packages that are imported but not used?](https://discourse.julialang.org/t/check-for-packages-that-are-imported-but-not-used/18571)

<div class="topic-metadata">

**Author:** [@ianshmean](https://discourse.julialang.org/u/ianshmean)\
**Replies:** 3\
**Last updated:** [December 12, 2018, 8:18pm UTC](https://discourse.julialang.org/t/check-for-packages-that-are-imported-but-not-used/18571 "2018-12-12T20:18:06Z")

</div>

Is there a way to check for packages that have been imported through using but aren’t actually being used? I’m trying to split an overgrown package up into smaller chunks and this functionality would be really helpful

---

## [Converting stat mtime to date](https://discourse.julialang.org/t/converting-stat-mtime-to-date/18605)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 1\
**Last updated:** [December 12, 2018, 6:12pm UTC](https://discourse.julialang.org/t/converting-stat-mtime-to-date/18605 "2018-12-12T18:12:58Z")

</div>

it looks like mtime is in seconds or some fraction thereof and encoded as a Float64. I’m trying to turn it into a date and haven’t had any luck finding a function to do that. The Dates module functions all work on an I…

---

## [Writing \`broadcast\_c\` for struct with custom indexing](https://discourse.julialang.org/t/writing-broadcast-c-for-struct-with-custom-indexing/9071)

<div class="topic-metadata">

**Author:** [@EP-Guy](https://discourse.julialang.org/u/EP-Guy)\
**Replies:** 7\
**Last updated:** [December 12, 2018, 3:36pm UTC](https://discourse.julialang.org/t/writing-broadcast-c-for-struct-with-custom-indexing/9071 "2018-12-12T15:36:31Z")

</div>

I have a custom type struct State{T} \<: AbstractArray{T,1} fields::Dict{Symbol, UnitRange{Int64}} arr::Array{T} end Base.size(S::State) = size(S.arr) Base.IndexStyle(::Type{\<:State}) = IndexLinear() Base.getind…

---

## [Allocations while using static arrays in a struct](https://discourse.julialang.org/t/allocations-while-using-static-arrays-in-a-struct/18596)

<div class="topic-metadata">

**Author:** [@bender9000](https://discourse.julialang.org/u/bender9000)\
**Replies:** 3\
**Last updated:** [December 12, 2018, 2:56pm UTC](https://discourse.julialang.org/t/allocations-while-using-static-arrays-in-a-struct/18596 "2018-12-12T14:56:33Z")

</div>

It looks like Matrix operations while using StaticArrays in a struct is causing allocations. I am using StaticArrays.jl for Julia 0.6. I created a foobar example to illustrate what I encountered. Hopefully, someone can s…

---

## [Is the Julia version specified in 'Project.toml'?](https://discourse.julialang.org/t/is-the-julia-version-specified-in-project-toml/18586)

<div class="topic-metadata">

**Author:** [@scheidan](https://discourse.julialang.org/u/scheidan)\
**Replies:** 3\
**Last updated:** [December 12, 2018, 8:03am UTC](https://discourse.julialang.org/t/is-the-julia-version-specified-in-project-toml/18586 "2018-12-12T08:03:13Z")

</div>

Hi, The new package manager is great for reproducable research as it makes it easy to recreate the same (package) environment. I was wondering if/how the julia version itself can be specified. I could not find this inf…

---

## [PyPlot cannot be used in Juno, stopped](https://discourse.julialang.org/t/pyplot-cannot-be-used-in-juno-stopped/18582)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 1\
**Last updated:** [December 12, 2018, 4:00am UTC](https://discourse.julialang.org/t/pyplot-cannot-be-used-in-juno-stopped/18582 "2018-12-12T04:00:09Z")

</div>

When I tried to import PyPlot or PyCall in Juno, it stopped and give no response for a long time. I restarted Atom and run “using PyPlot” in the Juno console window, and got the similar problem. The other packages works…

---

## [Dispatching on struct fields](https://discourse.julialang.org/t/dispatching-on-struct-fields/18579)

<div class="topic-metadata">

**Author:** [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Replies:** 3\
**Last updated:** [December 11, 2018, 11:33pm UTC](https://discourse.julialang.org/t/dispatching-on-struct-fields/18579 "2018-12-11T23:33:46Z")

</div>

Hello everyone, I am writing two libraries (let’s say A and B) which should work together, but ideally either should know about other’s existence. I thought I had worked everything out by making use of multiple-dispatch …

---

## [Install dependencies through pip](https://discourse.julialang.org/t/install-dependencies-through-pip/18541)

<div class="topic-metadata">

**Author:** [@charlesll](https://discourse.julialang.org/u/charlesll)\
**Replies:** 7\
**Last updated:** [December 11, 2018, 10:34pm UTC](https://discourse.julialang.org/t/install-dependencies-through-pip/18541 "2018-12-11T22:34:43Z")

</div>

Hi, I’ve been preparing my package for Julia 1.0. Nearly finished but I am left with one problem: I had a dependency installed through pip via a build.jl script, it was actually working well in Julia 0.6. Now it seems t…

---

## [Is the Eclipse IDE plugin "JuliaDT" still under development?](https://discourse.julialang.org/t/is-the-eclipse-ide-plugin-juliadt-still-under-development/3637)

<div class="topic-metadata">

**Author:** [@Zhong\_Pan](https://discourse.julialang.org/u/Zhong_Pan)\
**Replies:** 11\
**Last updated:** [December 11, 2018, 7:04pm UTC](https://discourse.julialang.org/t/is-the-eclipse-ide-plugin-juliadt-still-under-development/3637 "2018-12-11T19:04:27Z")

</div>

Just wonder with Juno (based on Atom) being included in JuliaPro as the default IDE, is the development on JuliaDT (based on Eclipse) still active? I hope it is. Juno is very nice. However, I do feel JuliaDT has some ad…

---

## [Package issue with Master 1.1.0-DEV.854 (2018-12-11)](https://discourse.julialang.org/t/package-issue-with-master-1-1-0-dev-854-2018-12-11/18559)

<div class="topic-metadata">

**Author:** [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Replies:** 1\
**Last updated:** [December 11, 2018, 1:52pm UTC](https://discourse.julialang.org/t/package-issue-with-master-1-1-0-dev-854-2018-12-11/18559 "2018-12-11T13:52:14Z")

</div>

For several weeks I have been running an application using both the release 1.0.2 version and the latest master. All has worked well. Then in the last few days master started giving problems. 1.0.2 updates correctly and …

---

## [Pkg.update() doesn't update](https://discourse.julialang.org/t/pkg-update-doesnt-update/18557)

<div class="topic-metadata">

**Author:** [@ndinsmore](https://discourse.julialang.org/u/ndinsmore)\
**Replies:** 1\
**Last updated:** [December 11, 2018, 12:55pm UTC](https://discourse.julialang.org/t/pkg-update-doesnt-update/18557 "2018-12-11T12:55:55Z")

</div>

When I run Pkg.update() or update at the package prompt, all I get is: julia\> Pkg.update() Updating registry at ~/.julia/registries/General ┌ Warning: Some registries failed to update: │ — ~/.julia/registries/Ge…

---

## [Specify a method to \`!in\`](https://discourse.julialang.org/t/specify-a-method-to-in/18451)

<div class="topic-metadata">

**Author:** [@garrison](https://discourse.julialang.org/u/garrison)\
**Replies:** 8\
**Last updated:** [December 11, 2018, 12:25pm UTC](https://discourse.julialang.org/t/specify-a-method-to-in/18451 "2018-12-11T12:25:47Z")

</div>

In a function that takes a function as argument, it is clear how to provide a method specific to a named function (e.g. in by using ::Base.Fix2{typeof(in),T}). But it is unclear to me how to do the same thing for !in. I…

---

## [How do I create a list (Array of values) from a Set?](https://discourse.julialang.org/t/how-do-i-create-a-list-array-of-values-from-a-set/18555)

<div class="topic-metadata">

**Author:** [@johann.spies](https://discourse.julialang.org/u/johann.spies)\
**Replies:** 4\
**Last updated:** [December 11, 2018, 12:14pm UTC](https://discourse.julialang.org/t/how-do-i-create-a-list-array-of-values-from-a-set/18555 "2018-12-11T12:14:30Z")

</div>

How do I get collect(ap) 5-element Array{Partition{Int64},1}: Set(Set{Int64}\[Set(\[3\]), Set(\[2\]), Set(\[1\])\]) Set(Set{Int64}\[Set(\[3\]), Set(\[2, 1\])\]) Set(Set{Int64}\[Set(\[3, 1\]), Set(\[2\])\]) Set(Set{Int64}\[…

---

## [How to start programing microcontroller in Julia ? is any package?](https://discourse.julialang.org/t/how-to-start-programing-microcontroller-in-julia-is-any-package/3688)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 17\
**Last updated:** [December 11, 2018, 12:04pm UTC](https://discourse.julialang.org/t/how-to-start-programing-microcontroller-in-julia-is-any-package/3688 "2018-12-11T12:04:51Z")

</div>

How to start programing microcontroller in Julia ? is any package ? Paul

---

## [Removing and adding packages](https://discourse.julialang.org/t/removing-and-adding-packages/18537)

<div class="topic-metadata">

**Author:** [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Replies:** 11\
**Last updated:** [December 11, 2018, 9:19am UTC](https://discourse.julialang.org/t/removing-and-adding-packages/18537 "2018-12-11T09:19:20Z")

</div>

If I manually remove a package directory from the repository I cannot normally install it. Example: Step 1. I manually removed package directory from ~/.julia/packages/DataFrames/ Step 2. I try to install it using add …

---

## [DataFrames operation scales badly](https://discourse.julialang.org/t/dataframes-operation-scales-badly/16223)

<div class="topic-metadata">

**Author:** [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Replies:** 21\
**Last updated:** [December 10, 2018, 8:30pm UTC](https://discourse.julialang.org/t/dataframes-operation-scales-badly/16223 "2018-12-10T20:30:59Z")

</div>

I’m finally making a proper effort to replace my pandas workflows with DataFrames, but currently hitting a massive performance issue which makes me think I’m missing something fundamental. The following snippet of code …

---

## [Reusing Sparsity patterns in sparse matrix products](https://discourse.julialang.org/t/reusing-sparsity-patterns-in-sparse-matrix-products/18443)

<div class="topic-metadata">

**Author:** [@lstagner](https://discourse.julialang.org/u/lstagner)\
**Replies:** 11\
**Last updated:** [December 11, 2018, 12:31am UTC](https://discourse.julialang.org/t/reusing-sparsity-patterns-in-sparse-matrix-products/18443 "2018-12-11T00:31:55Z")

</div>

I have this sparse matrix operation R\*kron(I,C)\*R' where R is a sparse matrix, I is the identity matrix, and C is a dense square matrix. The size of these matrices can be quite large; R is 2000 x 6250000 and the kronecke…

---

## [Incorporate units into custom types](https://discourse.julialang.org/t/incorporate-units-into-custom-types/18539)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 2\
**Last updated:** [December 10, 2018, 11:42pm UTC](https://discourse.julialang.org/t/incorporate-units-into-custom-types/18539 "2018-12-10T23:42:42Z")

</div>

I have a package that works fine. First all my types and function were hard-coded to Float64. Then I evolved into parameterizing everything to {T \<: AbstractFloat}. Now I’m looking into allowing for Unitful units, but I’…

---

## [Isapprox for array of tuples](https://discourse.julialang.org/t/isapprox-for-array-of-tuples/18527)

<div class="topic-metadata">

**Author:** [@Andrey.Borzunov](https://discourse.julialang.org/u/Andrey.Borzunov)\
**Replies:** 2\
**Last updated:** [December 10, 2018, 5:35pm UTC](https://discourse.julialang.org/t/isapprox-for-array-of-tuples/18527 "2018-12-10T17:35:03Z")

</div>

My aim is to approximately compare two arrays of tuples for needs of regression tests. There should be a more simple way to do isapprox(R,R2) than the following R = \[ (4.0, 75.96375653207353) (6.0,…

---

## [GC extensions segfault](https://discourse.julialang.org/t/gc-extensions-segfault/18517)

<div class="topic-metadata">

**Author:** [@kim366](https://discourse.julialang.org/u/kim366)\
**Replies:** 5\
**Last updated:** [December 10, 2018, 7:22pm UTC](https://discourse.julialang.org/t/gc-extensions-segfault/18517 "2018-12-10T19:22:39Z")

</div>

I wanted to try out the new GC extensions and this is what I’ve got, but it is producing a segfault (as if I were not rooting anything at all). #include \<julia.h\> #include \<julia\_gcext.h\> jl\_value\_t \*a, \*b, \*c; void r…

---

## [Reducing allocations to optimize (to match Java speed)](https://discourse.julialang.org/t/reducing-allocations-to-optimize-to-match-java-speed/18448)

<div class="topic-metadata">

**Author:** [@lwhitefox](https://discourse.julialang.org/u/lwhitefox)\
**Replies:** 22\
**Last updated:** [December 10, 2018, 2:41pm UTC](https://discourse.julialang.org/t/reducing-allocations-to-optimize-to-match-java-speed/18448 "2018-12-10T14:41:13Z")

</div>

I designed and implemented a method where the core task is to evaluate some 2D integrals using Gauss-Legendre methods in Julia. For practical reasons, the final code has to be in Java; the translation into Java is about…

---

## [FEniCS wrapper or PyCall for Julia uses too much memory](https://discourse.julialang.org/t/fenics-wrapper-or-pycall-for-julia-uses-too-much-memory/18520)

<div class="topic-metadata">

**Author:** [@gingerale](https://discourse.julialang.org/u/gingerale)\
**Replies:** 0\
**Last updated:** [December 10, 2018, 2:11pm UTC](https://discourse.julialang.org/t/fenics-wrapper-or-pycall-for-julia-uses-too-much-memory/18520 "2018-12-10T14:11:02Z")

</div>

Happy Monday Everyone, I was trying to use the julia package “FEniCS” for making a Navier Strokes Simulation, but as time goes higher so does memory. Here is the for loop that I got and modified from tutorial 8 of the F…

---

## [How to force a matrix to be Hermitian?](https://discourse.julialang.org/t/how-to-force-a-matrix-to-be-hermitian/18479)

<div class="topic-metadata">

**Author:** [@Jameson\_Quinn](https://discourse.julialang.org/u/Jameson_Quinn)\
**Replies:** 7\
**Last updated:** [December 10, 2018, 10:38am UTC](https://discourse.julialang.org/t/how-to-force-a-matrix-to-be-hermitian/18479 "2018-12-10T10:38:52Z")

</div>

I’m getting “ArgumentError: matrix is not symmetric/Hermitian.” on a call MvNormal(x\[r\],Matrix(Hermitian((noiseMatrix(m)+fuzz)\[r,r\]))). How do I avoid this if Matrix(Hermitian(...)) doesn’t? Note, both noiseMatrix(m) and…

---

## [Broadcasting across columns of a matrix](https://discourse.julialang.org/t/broadcasting-across-columns-of-a-matrix/18496)

<div class="topic-metadata">

**Author:** [@vgupta1](https://discourse.julialang.org/u/vgupta1)\
**Replies:** 4\
**Last updated:** [December 10, 2018, 9:14am UTC](https://discourse.julialang.org/t/broadcasting-across-columns-of-a-matrix/18496 "2018-12-10T09:14:28Z")

</div>

I am struggling to use the dot operator/ broadcasting correctly though when I’d like to broadcast across columns of a matrix. Suppose I have a function: function myfun(col\_vec, scalar) #does something complex operat…

---

## [Unable to install GLMakie, StatsMakie... UndefVarError: AbstractBackend not defined](https://discourse.julialang.org/t/unable-to-install-glmakie-statsmakie-undefvarerror-abstractbackend-not-defined/18434)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 18\
**Last updated:** [December 10, 2018, 8:53am UTC](https://discourse.julialang.org/t/unable-to-install-glmakie-statsmakie-undefvarerror-abstractbackend-not-defined/18434 "2018-12-10T08:53:30Z")

</div>

Hello. I’m trying to install StatsMakie on Windows 10 with Julia 1.0.2, but I’m getting errors: Pkg.add(PackageSpec(url="https://github.com/JuliaPlots/GLMakie.jl.git")) Pkg.add(PackageSpec(url="https://github.com/Juli…

---

## [Interpolate into macro like BenchmarkTools](https://discourse.julialang.org/t/interpolate-into-macro-like-benchmarktools/18506)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 1\
**Last updated:** [December 10, 2018, 5:45am UTC](https://discourse.julialang.org/t/interpolate-into-macro-like-benchmarktools/18506 "2018-12-10T05:45:42Z")

</div>

With @btime it is possible to interpolate values, how can I replicate this in other macros? julia\> x = 8 8 julia\> @btime $x 0.027 ns (0 allocations: 0 bytes) 8 julia\> macro fun(expr) return esc(expr) …

---

## [Julia and IJulia conflict precompile](https://discourse.julialang.org/t/julia-and-ijulia-conflict-precompile/18477)

<div class="topic-metadata">

**Author:** [@shipengcheng1230](https://discourse.julialang.org/u/shipengcheng1230)\
**Replies:** 4\
**Last updated:** [December 10, 2018, 5:25am UTC](https://discourse.julialang.org/t/julia-and-ijulia-conflict-precompile/18477 "2018-12-10T05:25:09Z")

</div>

I am using Julia v1.0.2 compiled (gcc8) with Intel-MKL and Intel-libm under RHEL 7. It seems this Julia and IJulia each precompile its own compiled. (The generic binary, on the other hand, works perfectly). Start with …

---

## [Cannot add a newly registered package](https://discourse.julialang.org/t/cannot-add-a-newly-registered-package/18502)

<div class="topic-metadata">

**Author:** [@jocklawrie](https://discourse.julialang.org/u/jocklawrie)\
**Replies:** 2\
**Last updated:** [December 9, 2018, 11:03pm UTC](https://discourse.julialang.org/t/cannot-add-a-newly-registered-package/18502 "2018-12-09T23:03:54Z")

</div>

Hi there, I am trying to add a newly registered package to a project. After \] add LocalDiskObjectStores I get the following error: ERROR: The following package names could not be resolved: \* LocalDiskObjectStores (no…

---

## [Is there a way to model Gecode problems in Julia?](https://discourse.julialang.org/t/is-there-a-way-to-model-gecode-problems-in-julia/18501)

<div class="topic-metadata">

**Author:** [@J\_Friedman](https://discourse.julialang.org/u/J_Friedman)\
**Replies:** 0\
**Last updated:** [December 9, 2018, 9:08pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-model-gecode-problems-in-julia/18501 "2018-12-09T21:08:04Z")

</div>

I found the JuMP library, but they don’t seem to interface to Gecode. Is there another way?

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=909)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=911)
