# General Usage

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

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

**Page:** 809

---

## [Project.toml and package updating](https://discourse.julialang.org/t/project-toml-and-package-updating/31783)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 4\
**Last updated:** [December 3, 2019, 3:54pm UTC](https://discourse.julialang.org/t/project-toml-and-package-updating/31783 "2019-12-03T15:54:14Z")

</div>

I accidentally deleted all the contents on my Project.toml file. Will that affect my package updating?

---

## [Convert delayed differential equation in Julia notation for DifferentialEquations.jl](https://discourse.julialang.org/t/convert-delayed-differential-equation-in-julia-notation-for-differentialequations-jl/31690)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 6\
**Last updated:** [December 3, 2019, 11:31am UTC](https://discourse.julialang.org/t/convert-delayed-differential-equation-in-julia-notation-for-differentialequations-jl/31690 "2019-12-03T11:31:09Z")

</div>

Hello I am trying to convert the following delayed differential equations (DDE) into Julia notation: Thus I wrote this code followingthis example: using DifferentialEquations function dynDelay!(du, u, h, p) μ, κ,…

---

## [DimensionMismatch("column length of 178 for columns startTime, startLoc, routePlaned, and is incompatible with column length 177 for columns dists and travelTimes" in julia dataframes)](https://discourse.julialang.org/t/dimensionmismatch-column-length-of-178-for-columns-starttime-startloc-routeplaned-and-is-incompatible-with-column-length-177-for-columns-dists-and-traveltimes-in-julia-dataframes/31759)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 5\
**Last updated:** [December 3, 2019, 9:16am UTC](https://discourse.julialang.org/t/dimensionmismatch-column-length-of-178-for-columns-starttime-startloc-routeplaned-and-is-incompatible-with-column-length-177-for-columns-dists-and-traveltimes-in-julia-dataframes/31759 "2019-12-03T09:16:58Z")

</div>

Hi. I was trying to use a dataframe with several columns, where some columns are vectors of varying length; i.e., in some columns, they are of length say 10, and in some other columns, they are of length say 12. Also, i…

---

## [Scattered interpolation](https://discourse.julialang.org/t/scattered-interpolation/31733)

<div class="topic-metadata">

**Author:** [@henry2004y](https://discourse.julialang.org/u/henry2004y)\
**Replies:** 5\
**Last updated:** [December 3, 2019, 1:37am UTC](https://discourse.julialang.org/t/scattered-interpolation/31733 "2019-12-03T01:37:54Z")

</div>

Hi, I am kind of struggling with scattered interpolation in Julia for 2D. What I have is a bunch of points (x,y,w), where x and y are coordinates and w is the value. I want to interpolate onto a regular grid. Currently …

---

## [Documentation on Semantics of package Registry files](https://discourse.julialang.org/t/documentation-on-semantics-of-package-registry-files/31774)

<div class="topic-metadata">

**Author:** [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Replies:** 0\
**Last updated:** [December 2, 2019, 8:44pm UTC](https://discourse.julialang.org/t/documentation-on-semantics-of-package-registry-files/31774 "2019-12-02T20:44:13Z")

</div>

Is there documentation somewhere on the semantics of the various toml files in Julia package registries? There was a release of a package as a patch version bump with a change in api that broke a downstream package, and …

---

## [Keep a log of vehicle routes for animation purpose](https://discourse.julialang.org/t/keep-a-log-of-vehicle-routes-for-animation-purpose/31667)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 5\
**Last updated:** [December 2, 2019, 2:27pm UTC](https://discourse.julialang.org/t/keep-a-log-of-vehicle-routes-for-animation-purpose/31667 "2019-12-02T14:27:24Z")

</div>

Hi, I was doing a project to animate vehicle transportations on a road network. During the process, the vehicle will stay in a position for a certain time interval, travel to a certain location to pick up goods and then …

---

## [Does SimJulia support parallel computation?](https://discourse.julialang.org/t/does-simjulia-support-parallel-computation/31698)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 6\
**Last updated:** [December 2, 2019, 12:48pm UTC](https://discourse.julialang.org/t/does-simjulia-support-parallel-computation/31698 "2019-12-02T12:48:04Z")

</div>

I have developed a traffic simulation package using SimJulia. When the network is larger, the simulation is not quick enough. Does anyone know whether SimJulia supports the parallel calculation? This is not mentioned in…

---

## [Workers cannot access to RemoteChanel data during Parallel processing of dataframes](https://discourse.julialang.org/t/workers-cannot-access-to-remotechanel-data-during-parallel-processing-of-dataframes/31568)

<div class="topic-metadata">

**Author:** [@Fred](https://discourse.julialang.org/u/Fred)\
**Replies:** 1\
**Last updated:** [December 2, 2019, 9:05am UTC](https://discourse.julialang.org/t/workers-cannot-access-to-remotechanel-data-during-parallel-processing-of-dataframes/31568 "2019-12-02T09:05:13Z")

</div>

Hi, I have an error while processing dataframes in parallel. This is a toy program reproducing the problem with only one worker. Thank you for your help ! using Distributed using DataFrames df1 = DataFrame(A = \["R1", …

---

## [Converting symbols to types and splatting inside @eval](https://discourse.julialang.org/t/converting-symbols-to-types-and-splatting-inside-eval/31728)

<div class="topic-metadata">

**Author:** [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Replies:** 10\
**Last updated:** [December 2, 2019, 7:52am UTC](https://discourse.julialang.org/t/converting-symbols-to-types-and-splatting-inside-eval/31728 "2019-12-02T07:52:48Z")

</div>

I am trying to wrap my head around metaprogramming and macros and I struggle to figure this out and I think I am on the wrong path. I have the feeling that I need to build up an expression tree programmatically instead o…

---

## [A cluster config for julia parallel computing](https://discourse.julialang.org/t/a-cluster-config-for-julia-parallel-computing/31723)

<div class="topic-metadata">

**Author:** [@DJRahim](https://discourse.julialang.org/u/DJRahim)\
**Replies:** 1\
**Last updated:** [December 1, 2019, 10:21pm UTC](https://discourse.julialang.org/t/a-cluster-config-for-julia-parallel-computing/31723 "2019-12-01T22:21:17Z")

</div>

Hello, I’m getting started with julia parallel computing and i need to test a parallel algorithm in a cluster, my question is what is the best cluster environment for julia parallel computing and what is the configurat…

---

## [Cannot install any Julia package on Atom](https://discourse.julialang.org/t/cannot-install-any-julia-package-on-atom/31724)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 10\
**Last updated:** [December 1, 2019, 9:46pm UTC](https://discourse.julialang.org/t/cannot-install-any-julia-package-on-atom/31724 "2019-12-01T21:46:39Z")

</div>

I re-installed Atom and Julia 1.3 and cannot install any package. I get this error ERROR: The following package names could not be resolved: \* PACKAGENAME.jl (not found in project, manifest or registry) Please specify …

---

## [Specifying dependency versions in my package](https://discourse.julialang.org/t/specifying-dependency-versions-in-my-package/31705)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 2\
**Last updated:** [December 1, 2019, 4:18pm UTC](https://discourse.julialang.org/t/specifying-dependency-versions-in-my-package/31705 "2019-12-01T16:18:55Z")

</div>

So I wrote my first package (CurrentPopulationSurvey.jl) and it was just added to the registry. When I went to download it via add CurrentPopulationSurvey I got the following error: (v1.2) pkg\> add CurrentPopulationSurv…

---

## [How to analyse module memory usage/memory leak?](https://discourse.julialang.org/t/how-to-analyse-module-memory-usage-memory-leak/31706)

<div class="topic-metadata">

**Author:** [@squaregoldfish](https://discourse.julialang.org/u/squaregoldfish)\
**Replies:** 0\
**Last updated:** [December 1, 2019, 3:36am UTC](https://discourse.julialang.org/t/how-to-analyse-module-memory-usage-memory-leak/31706 "2019-12-01T03:36:44Z")

</div>

I’m trying to analyse the memory usage of a module I’ve written, named InterpolationData. Calling varinfo(InterpolationData) gives the following: julia\> varinfo(InterpolationData) name size summa…

---

## [Accessing Postgresql via Julia](https://discourse.julialang.org/t/accessing-postgresql-via-julia/7031)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 17\
**Last updated:** [November 30, 2019, 8:26pm UTC](https://discourse.julialang.org/t/accessing-postgresql-via-julia/7031 "2019-11-30T20:26:44Z")

</div>

I am currently using R to access a remote Postgresql database, and my code looks like those as below: library(RPostgres) wrds \<- dbConnect(Postgres(), host='wrds-pgdata.wharton.upenn.edu', …

---

## [Username and password for pkg.juliacomputing in Atom](https://discourse.julialang.org/t/username-and-password-for-pkg-juliacomputing-in-atom/31696)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 0\
**Last updated:** [November 30, 2019, 5:35pm UTC](https://discourse.julialang.org/t/username-and-password-for-pkg-juliacomputing-in-atom/31696 "2019-11-30T17:35:19Z")

</div>

When I try to update or install packages I am asked my username and password for pkg.juliacomputing. Where can I get those? It still lets me install things without typing any but says that some packages fail to install o…

---

## [Possible to used cached values in Optim.optimize?](https://discourse.julialang.org/t/possible-to-used-cached-values-in-optim-optimize/31464)

<div class="topic-metadata">

**Author:** [@bashonubuntu](https://discourse.julialang.org/u/bashonubuntu)\
**Replies:** 17\
**Last updated:** [November 30, 2019, 11:23am UTC](https://discourse.julialang.org/t/possible-to-used-cached-values-in-optim-optimize/31464 "2019-11-30T11:23:54Z")

</div>

Hello, I am using L-BFGS to solve a maximum likelihood problem. I provide analytical gradients to the solver which is nice. However, many steps I use in the function calculation can be repeated in the gradient calculati…

---

## [Color scale and zlim in heatmap in Plots, pyplot()](https://discourse.julialang.org/t/color-scale-and-zlim-in-heatmap-in-plots-pyplot/31678)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 1\
**Last updated:** [November 30, 2019, 11:19am UTC](https://discourse.julialang.org/t/color-scale-and-zlim-in-heatmap-in-plots-pyplot/31678 "2019-11-30T11:19:34Z")

</div>

I would like to plot 2 heatmap that have a different range of values but preserve comparability, so that the colors have the same meaning in both plots. How can I fix the “zlim”?

---

## [Inconsistent behaviour of Vararg UnionAll](https://discourse.julialang.org/t/inconsistent-behaviour-of-vararg-unionall/31644)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 3\
**Last updated:** [November 30, 2019, 9:46am UTC](https://discourse.julialang.org/t/inconsistent-behaviour-of-vararg-unionall/31644 "2019-11-30T09:46:07Z")

</div>

dear out there, I just stumbled upon the maybe most weird julia bug I experienced so far f1(args::(Vararg{Any, N} where N); kwargs...) = (args, kwargs) f2(args::(Vararg{Any, N} where N)) = (args, 1) f3(args::(Vararg{An…

---

## [JLD file and Strings, how to ADD new line to STRING Array to existing jld file](https://discourse.julialang.org/t/jld-file-and-strings-how-to-add-new-line-to-string-array-to-existing-jld-file/31475)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 1\
**Last updated:** [November 30, 2019, 8:50am UTC](https://discourse.julialang.org/t/jld-file-and-strings-how-to-add-new-line-to-string-array-to-existing-jld-file/31475 "2019-11-30T08:50:46Z")

</div>

Is posible to add new line with Float but what about Strings Array? Somebody can help ? Floats works like below: fid = h5open("my\_file.h5","w") A = d\_create(fid, "A", Float64, ((5,5),(-1,-1)), "chunk", (5,5)) A\[:,:\] = …

---

## [Function output parametric type assertion](https://discourse.julialang.org/t/function-output-parametric-type-assertion/31669)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 2\
**Last updated:** [November 29, 2019, 10:32pm UTC](https://discourse.julialang.org/t/function-output-parametric-type-assertion/31669 "2019-11-29T22:32:05Z")

</div>

So, I can assert the output type of a function like this (trivial example for demo purposes) f(x)::Int = x However, what if the output type depends on an input type parameter f(x::Vector{T})::T where T = x\[1\] This p…

---

## [Automatic Differentiation with custom functions within likelihood function](https://discourse.julialang.org/t/automatic-differentiation-with-custom-functions-within-likelihood-function/31594)

<div class="topic-metadata">

**Author:** [@mrVeng](https://discourse.julialang.org/u/mrVeng)\
**Replies:** 6\
**Last updated:** [November 29, 2019, 6:42pm UTC](https://discourse.julialang.org/t/automatic-differentiation-with-custom-functions-within-likelihood-function/31594 "2019-11-29T18:42:11Z")

</div>

Hey everyone, I want to use AD to get gradients of a likelihood function. Inside this likelihood function, I need to use a root solver to get the quantiles of an univariate Mixture distribution, as there is no closed fo…

---

## [Calling a nested function from other file to a constructor](https://discourse.julialang.org/t/calling-a-nested-function-from-other-file-to-a-constructor/31590)

<div class="topic-metadata">

**Author:** [@marouane1994](https://discourse.julialang.org/u/marouane1994)\
**Replies:** 3\
**Last updated:** [November 29, 2019, 5:15pm UTC](https://discourse.julialang.org/t/calling-a-nested-function-from-other-file-to-a-constructor/31590 "2019-11-29T17:15:05Z")

</div>

let us suppose that we have: include("file2.jl") struct f1 function f1(): expressions function f2(a,b,c): return g2(a) end end end where g2() is a nested function in a functi…

---

## [How to determine where a macro is defined?](https://discourse.julialang.org/t/how-to-determine-where-a-macro-is-defined/31637)

<div class="topic-metadata">

**Author:** [@gcv](https://discourse.julialang.org/u/gcv)\
**Replies:** 3\
**Last updated:** [November 29, 2019, 5:07pm UTC](https://discourse.julialang.org/t/how-to-determine-where-a-macro-is-defined/31637 "2019-11-29T17:07:33Z")

</div>

I figured out how to find where a method is defined: methods(generic\_function).ms returns a handy array of objects which have file and line properties. I’m now trying to do the same thing for macros. For example, Printf…

---

## [Numerically stable computation of matrix power](https://discourse.julialang.org/t/numerically-stable-computation-of-matrix-power/31584)

<div class="topic-metadata">

**Author:** [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Replies:** 14\
**Last updated:** [November 29, 2019, 4:51pm UTC](https://discourse.julialang.org/t/numerically-stable-computation-of-matrix-power/31584 "2019-11-29T16:51:20Z")

</div>

I admit the title is not great, but I couldn’t find a better one. I have a matrix M whose eigenvalues lie in the unit disk and the only eigenvalue on the unit cycle is 1. Moreover the algebraic multiplicity of the eigen…

---

## [Leave first type unspecified](https://discourse.julialang.org/t/leave-first-type-unspecified/31661)

<div class="topic-metadata">

**Author:** [@matthieu](https://discourse.julialang.org/u/matthieu)\
**Replies:** 1\
**Last updated:** [November 29, 2019, 3:58pm UTC](https://discourse.julialang.org/t/leave-first-type-unspecified/31661 "2019-11-29T15:58:55Z")

</div>

Suppose I have a type with multiple parameters and that I want to define a function that dispatch only on the second parameter. Is there a way to leave the first parameter unspecified? As an example, I would like to def…

---

## [Is operating a vector that have abstract type really slow?](https://discourse.julialang.org/t/is-operating-a-vector-that-have-abstract-type-really-slow/31634)

<div class="topic-metadata">

**Author:** [@ke\_xu](https://discourse.julialang.org/u/ke_xu)\
**Replies:** 11\
**Last updated:** [November 29, 2019, 3:18pm UTC](https://discourse.julialang.org/t/is-operating-a-vector-that-have-abstract-type-really-slow/31634 "2019-11-29T15:18:10Z")

</div>

using BenchmarkTools abstract type SuperType end mutable struct TypeA \<: SuperType a::Int64 b::Int64 end mutable struct TypeB \<: SuperType a::Int64 b::Float64 end function Iter(objs::Vector{SuperType}) …

---

## [Pmap and multi-threaded BLAS](https://discourse.julialang.org/t/pmap-and-multi-threaded-blas/31617)

<div class="topic-metadata">

**Author:** [@ahthomas](https://discourse.julialang.org/u/ahthomas)\
**Replies:** 2\
**Last updated:** [November 29, 2019, 9:29am UTC](https://discourse.julialang.org/t/pmap-and-multi-threaded-blas/31617 "2019-11-29T09:29:10Z")

</div>

When I run a call to one of the low level LinearAlgebra.BLAS functions inside a function executed on a worker process launched via pmap it appears that BLAS does not use multiple threads. Here is a simple example: using…

---

## [How to get the current “random” seed?](https://discourse.julialang.org/t/how-to-get-the-current-random-seed/31640)

<div class="topic-metadata">

**Author:** [@monty](https://discourse.julialang.org/u/monty)\
**Replies:** 2\
**Last updated:** [November 29, 2019, 6:44am UTC](https://discourse.julialang.org/t/how-to-get-the-current-random-seed/31640 "2019-11-29T06:44:56Z")

</div>

How to get the current “random” seed? Random.GLOBAL\_RNG.seed is not available now.

---

## [Why mul! is so fast with BitVector?](https://discourse.julialang.org/t/why-mul-is-so-fast-with-bitvector/31629)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 1\
**Last updated:** [November 29, 2019, 12:45am UTC](https://discourse.julialang.org/t/why-mul-is-so-fast-with-bitvector/31629 "2019-11-29T00:45:49Z")

</div>

Consider the following example code: using LinearAlgebra, BenchmarkTools n = 200 xb = BitVector(rand(Bool, n)) xf = Float32.(xb) W = randn(Float32,n,n) y = zeros(Float32,n); function mymul!(y, A, x) y .= 0 @in…

---

## [Why Tab in session requires pressing more than once](https://discourse.julialang.org/t/why-tab-in-session-requires-pressing-more-than-once/31546)

<div class="topic-metadata">

**Author:** [@Usor](https://discourse.julialang.org/u/Usor)\
**Replies:** 5\
**Last updated:** [November 28, 2019, 7:45pm UTC](https://discourse.julialang.org/t/why-tab-in-session-requires-pressing-more-than-once/31546 "2019-11-28T19:45:22Z")

</div>

If using Tab to complete or suggest something, often it is required to do so more than once. Why? How can it be fixed?

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

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