# General Usage

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

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

**Page:** 884

---

## [Logging - handling repeated warnings](https://discourse.julialang.org/t/logging-handling-repeated-warnings/22014)

<div class="topic-metadata">

**Author:** [@crbinz](https://discourse.julialang.org/u/crbinz)\
**Replies:** 9\
**Last updated:** [March 21, 2019, 12:54pm UTC](https://discourse.julialang.org/t/logging-handling-repeated-warnings/22014 "2019-03-21T12:54:20Z")

</div>

My code calls a function in another module that emits warning when certain conditions are met. Often, if I’m not careful, that condition will be met for many thousands of calls, resulting in many thousands of repeated w…

---

## [Type Definition =\> No Constructor](https://discourse.julialang.org/t/type-definition-no-constructor/22138)

<div class="topic-metadata">

**Author:** [@cortner](https://discourse.julialang.org/u/cortner)\
**Replies:** 4\
**Last updated:** [March 21, 2019, 12:53pm UTC](https://discourse.julialang.org/t/type-definition-no-constructor/22138 "2019-03-21T12:53:59Z")

</div>

EDIT: In the example below I created an incorrect inner constructor. But the part of my question that remains of interest is why is an inner constructor needed at all? What are the features of this type definition that r…

---

## [\] precompile stops after first error](https://discourse.julialang.org/t/precompile-stops-after-first-error/22137)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 2\
**Last updated:** [March 21, 2019, 12:50pm UTC](https://discourse.julialang.org/t/precompile-stops-after-first-error/22137 "2019-03-21T12:50:48Z")

</div>

I would like to use \] precompile to compile my packages after an update. However, there always seems to be one package that fails to precompile, causing the entire process to halt. Is there any way around this? (v1.1) p…

---

## [Using struct created at runtime as argument type](https://discourse.julialang.org/t/using-struct-created-at-runtime-as-argument-type/21983)

<div class="topic-metadata">

**Author:** [@adriaan](https://discourse.julialang.org/u/adriaan)\
**Replies:** 4\
**Last updated:** [March 21, 2019, 10:29am UTC](https://discourse.julialang.org/t/using-struct-created-at-runtime-as-argument-type/21983 "2019-03-21T10:29:55Z")

</div>

For a project I’m currently working on I have to do a lot of code generation. I run into a problem when I tried to create structs at runtime and use them in method definitions as argument types. It would be great if some…

---

## [Extracting summary info from multiple MCMCChains programmatically](https://discourse.julialang.org/t/extracting-summary-info-from-multiple-mcmcchains-programmatically/22027)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 7\
**Last updated:** [March 21, 2019, 8:22am UTC](https://discourse.julialang.org/t/extracting-summary-info-from-multiple-mcmcchains-programmatically/22027 "2019-03-21T08:22:20Z")

</div>

I am running multiple simulations with Turing and would like to extract some of the summary statistics from each chain. Below, I have created a simple example of what I am trying to achieve. For some reason, I cannot ge…

---

## [Colab with pre-compiled and pre-built system images?](https://discourse.julialang.org/t/colab-with-pre-compiled-and-pre-built-system-images/22114)

<div class="topic-metadata">

**Author:** [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Replies:** 6\
**Last updated:** [March 21, 2019, 4:19am UTC](https://discourse.julialang.org/t/colab-with-pre-compiled-and-pre-built-system-images/22114 "2019-03-21T04:19:54Z")

</div>

I am curious how feasible it is to have colab used for a set of notebooks with a “closed” set of packages precompiled into a system image (i.e. for a particular set of lecture notes). For now lets say that I don’t care …

---

## [DLL problems, episode 2](https://discourse.julialang.org/t/dll-problems-episode-2/12405)

<div class="topic-metadata">

**Author:** [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)\
**Replies:** 22\
**Last updated:** [March 21, 2019, 1:06am UTC](https://discourse.julialang.org/t/dll-problems-episode-2/12405 "2019-03-21T01:06:29Z")

</div>

TL;DR: shared library conflicts are coming soon, to a Julia installation near you. Perhaps only for a short-run engagement. I don’t know where to file this issue, so I’ll try here. My immediate problem is in trying to …

---

## [How to change the RHS for a set of constraints and solve the problem iteratively using JuMP?](https://discourse.julialang.org/t/how-to-change-the-rhs-for-a-set-of-constraints-and-solve-the-problem-iteratively-using-jump/22069)

<div class="topic-metadata">

**Author:** [@Lonewolf92](https://discourse.julialang.org/u/Lonewolf92)\
**Replies:** 6\
**Last updated:** [March 20, 2019, 4:50pm UTC](https://discourse.julialang.org/t/how-to-change-the-rhs-for-a-set-of-constraints-and-solve-the-problem-iteratively-using-jump/22069 "2019-03-20T16:50:38Z")

</div>

I have an optimization problem where i want to change the RHS of a set of constraints and solve the model each time. The RHS Demand\_specific is the input to the model. I want to test the model for different fluctuations…

---

## [Where did Base.Broadcast.broadcast\_indices go in Julia 1.1?](https://discourse.julialang.org/t/where-did-base-broadcast-broadcast-indices-go-in-julia-1-1/22111)

<div class="topic-metadata">

**Author:** [@Gu\_Junhua](https://discourse.julialang.org/u/Gu_Junhua)\
**Replies:** 1\
**Last updated:** [March 20, 2019, 3:59pm UTC](https://discourse.julialang.org/t/where-did-base-broadcast-broadcast-indices-go-in-julia-1-1/22111 "2019-03-20T15:59:43Z")

</div>

I’m migrating someone other’s package of old Julia to the new Julia 1.1. I found there is an error when I import it in Julia 1.1 UndefVarError: broadcast\_indices not defined Which corresponding to Base.Broadcast.broa…

---

## [Tensor multiplication](https://discourse.julialang.org/t/tensor-multiplication/21450)

<div class="topic-metadata">

**Author:** [@Michiel](https://discourse.julialang.org/u/Michiel)\
**Replies:** 9\
**Last updated:** [March 20, 2019, 2:47pm UTC](https://discourse.julialang.org/t/tensor-multiplication/21450 "2019-03-20T14:47:34Z")

</div>

Hi all, I am implementing a function to perform a generalization of matrix multiplication to a general N-dimensional array or tensor. This product is denoted as \\times\_m to multiply a conformable matrix A with a tensor \\…

---

## [PlotlyJS not working in IJulia](https://discourse.julialang.org/t/plotlyjs-not-working-in-ijulia/22104)

<div class="topic-metadata">

**Author:** [@Tord](https://discourse.julialang.org/u/Tord)\
**Replies:** 0\
**Last updated:** [March 20, 2019, 1:02pm UTC](https://discourse.julialang.org/t/plotlyjs-not-working-in-ijulia/22104 "2019-03-20T13:02:49Z")

</div>

I have difficulties getting the PlotlyJS for Plots.jl working from IJulia. When I do using Plots followed by plotlyjs() and plot(sin) in a IJulia notebook, I get no output. The JavaScript console in my browser shows a “R…

---

## [Is @which lying to me?](https://discourse.julialang.org/t/is-which-lying-to-me/22097)

<div class="topic-metadata">

**Author:** [@anon67531922](https://discourse.julialang.org/u/anon67531922)\
**Replies:** 3\
**Last updated:** [March 20, 2019, 10:54am UTC](https://discourse.julialang.org/t/is-which-lying-to-me/22097 "2019-03-20T10:54:28Z")

</div>

MWE: julia\> struct MyNumber value::Float64 end julia\> Base.:^(x::MyNumber,n::Int) = MyNumber(x.value^n) julia\> @which x^-1 ^(x::MyNumber, n::Int64) in Main at REPL\[2\]:1 julia\> x = MyNumber(rand()) MyNum…

---

## [Best way to create config files? / Does Julia support .toml natively?](https://discourse.julialang.org/t/best-way-to-create-config-files-does-julia-support-toml-natively/21415)

<div class="topic-metadata">

**Author:** [@danielc](https://discourse.julialang.org/u/danielc)\
**Replies:** 5\
**Last updated:** [March 20, 2019, 8:27am UTC](https://discourse.julialang.org/t/best-way-to-create-config-files-does-julia-support-toml-natively/21415 "2019-03-20T08:27:29Z")

</div>

Hello, I want to write a program that reads a config file with straight forward key-value information. The sort of thing that you could do with a TOML or YAML file. I’m wondering if there is a “standard” solution in Jul…

---

## [How to use for loop (descending order)](https://discourse.julialang.org/t/how-to-use-for-loop-descending-order/22022)

<div class="topic-metadata">

**Author:** [@11111](https://discourse.julialang.org/u/11111)\
**Replies:** 4\
**Last updated:** [March 20, 2019, 5:52am UTC](https://discourse.julialang.org/t/how-to-use-for-loop-descending-order/22022 "2019-03-20T05:52:08Z")

</div>

i want to execute for\_loop like (n→n-1→n-2…) i wrote the following code but it didn’t work. n=3 for i in n:1 ... end Please tell me how to solve it.

---

## [Publishing real-time interactive webpages](https://discourse.julialang.org/t/publishing-real-time-interactive-webpages/21991)

<div class="topic-metadata">

**Author:** [@gubikmic](https://discourse.julialang.org/u/gubikmic)\
**Replies:** 4\
**Last updated:** [March 20, 2019, 12:53am UTC](https://discourse.julialang.org/t/publishing-real-time-interactive-webpages/21991 "2019-03-20T00:53:40Z")

</div>

Hi, I’m new to Julia and excited to finally replace MATLAB. I’m eager to know what’s the cutting edge of publishing real-time interactive pages or notebooks with Julia. With real-time interactive I mean a format where …

---

## [Allocating column of sparseArrays adds explicit zeros](https://discourse.julialang.org/t/allocating-column-of-sparsearrays-adds-explicit-zeros/22011)

<div class="topic-metadata">

**Author:** [@Adrien](https://discourse.julialang.org/u/Adrien)\
**Replies:** 8\
**Last updated:** [March 19, 2019, 10:53pm UTC](https://discourse.julialang.org/t/allocating-column-of-sparsearrays-adds-explicit-zeros/22011 "2019-03-19T22:53:56Z")

</div>

I’m not sure if this is a bug or a feature but copying a sparse vector into a column of a sparse matrix keeps (or rather adds) some of the zeros explicitly: julia\> using SparseArrays julia\> m=sparse(\[\[0,1,2,0,0\] \[0,3,…

---

## [Simulation and Inference for Stochastic Processes](https://discourse.julialang.org/t/simulation-and-inference-for-stochastic-processes/22020)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 3\
**Last updated:** [March 19, 2019, 4:03pm UTC](https://discourse.julialang.org/t/simulation-and-inference-for-stochastic-processes/22020 "2019-03-19T16:03:34Z")

</div>

Is there any package that allows me to do simulation and inference for stochastic processes? For example, if I need to estimate parameters for Merton (1976) jump diffusion model using stock return data, which package sh…

---

## [Cannot define parametric type with parametric field](https://discourse.julialang.org/t/cannot-define-parametric-type-with-parametric-field/22016)

<div class="topic-metadata">

**Author:** [@cnliao](https://discourse.julialang.org/u/cnliao)\
**Replies:** 8\
**Last updated:** [March 19, 2019, 2:59pm UTC](https://discourse.julialang.org/t/cannot-define-parametric-type-with-parametric-field/22016 "2019-03-19T14:59:21Z")

</div>

I am trying to define a type that support multiple array backends but the compiler complains: struct A{R} # TypeError: in Type{...} expression, expected UnionAll, got TypeVar mat::R{Int,2} vec::R{Int,1} end In …

---

## [Function parameter works faster than type parameter](https://discourse.julialang.org/t/function-parameter-works-faster-than-type-parameter/22018)

<div class="topic-metadata">

**Author:** [@fjarri](https://discourse.julialang.org/u/fjarri)\
**Replies:** 2\
**Last updated:** [March 19, 2019, 12:39pm UTC](https://discourse.julialang.org/t/function-parameter-works-faster-than-type-parameter/22018 "2019-03-19T12:39:52Z")

</div>

Consider the following code: using Random using BenchmarkTools @inline function testfunc1(x::UInt64, y::UInt64, p::UInt64, ::Val{P}) where P x \* y \* p end @inline function testfunc2(x::UInt64, y::UInt64, p::UInt6…

---

## [Unable to Install Latest Versions of HDF5.jl + MAT.jl](https://discourse.julialang.org/t/unable-to-install-latest-versions-of-hdf5-jl-mat-jl/22030)

<div class="topic-metadata">

**Author:** [@MLackner](https://discourse.julialang.org/u/MLackner)\
**Replies:** 0\
**Last updated:** [March 19, 2019, 10:12am UTC](https://discourse.julialang.org/t/unable-to-install-latest-versions-of-hdf5-jl-mat-jl/22030 "2019-03-19T10:12:18Z")

</div>

Hi! I’m trying to get the MAT.jl package to work but I’m unable to \]add the latest versions of HDF5 and MAT. The latest versions at the moment are 0.11.0 and 0.5.0 respectively. Just doing \]add HDF5 installs the previou…

---

## [Several layers of keyword arguments](https://discourse.julialang.org/t/several-layers-of-keyword-arguments/21956)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 3\
**Last updated:** [March 19, 2019, 5:25am UTC](https://discourse.julialang.org/t/several-layers-of-keyword-arguments/21956 "2019-03-19T05:25:42Z")

</div>

Suppose that I have several functions where one calling another. The example below is arbitrary but in reality foo2, foo3, and bar need different keyword arguments. From a caller perspective, I can specify any keyword …

---

## [Using JuliaDB to read in all the CSVs fails, but not when reading them singly](https://discourse.julialang.org/t/using-juliadb-to-read-in-all-the-csvs-fails-but-not-when-reading-them-singly/21967)

<div class="topic-metadata">

**Author:** [@natemcintosh](https://discourse.julialang.org/u/natemcintosh)\
**Replies:** 2\
**Last updated:** [March 18, 2019, 6:13pm UTC](https://discourse.julialang.org/t/using-juliadb-to-read-in-all-the-csvs-fails-but-not-when-reading-them-singly/21967 "2019-03-18T18:13:53Z")

</div>

I have a set of CSVs, about 1.7GB total size. (I’m attempting to compete in the r/dataisbeautiful visualization competition for this month). When trying to load all the files with loadtable(), I run into some problems (…

---

## [Assistance in avoiding allocations in summations](https://discourse.julialang.org/t/assistance-in-avoiding-allocations-in-summations/21998)

<div class="topic-metadata">

**Author:** [@MrRobot](https://discourse.julialang.org/u/MrRobot)\
**Replies:** 8\
**Last updated:** [March 18, 2019, 5:35pm UTC](https://discourse.julialang.org/t/assistance-in-avoiding-allocations-in-summations/21998 "2019-03-18T17:35:14Z")

</div>

I need to do several summations of specific matrix column(s). I can’t figure out a way to get rid of temporary allocations. The code below is my best version, but it leaves a lot to be desired. If I don’t use @view, tim…

---

## [Running Julia with multiple workers via ssh tunnel](https://discourse.julialang.org/t/running-julia-with-multiple-workers-via-ssh-tunnel/21820)

<div class="topic-metadata">

**Author:** [@tanhevg](https://discourse.julialang.org/u/tanhevg)\
**Replies:** 10\
**Last updated:** [March 18, 2019, 5:34pm UTC](https://discourse.julialang.org/t/running-julia-with-multiple-workers-via-ssh-tunnel/21820 "2019-03-18T17:34:58Z")

</div>

Hello, I have a number of HPC servers that I could use to parallelise my Julia computations. Each server has multiple cores. These servers are on a separate network, so I have to use a jump host to ssh to them. When I t…

---

## [Tables of clickable images with Documenter (galleries)](https://discourse.julialang.org/t/tables-of-clickable-images-with-documenter-galleries/22005)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 0\
**Last updated:** [March 18, 2019, 5:26pm UTC](https://discourse.julialang.org/t/tables-of-clickable-images-with-documenter-galleries/22005 "2019-03-18T17:26:22Z")

</div>

Hi, I’m preparing tables with images in a gallery style, and I want the images to be clickable. So far I’ve managed to do it when the calbacks are other .md files. Example However, there are other cases where I only …

---

## [Mixed Type Variables in Julia](https://discourse.julialang.org/t/mixed-type-variables-in-julia/21989)

<div class="topic-metadata">

**Author:** [@Aquaman](https://discourse.julialang.org/u/Aquaman)\
**Replies:** 9\
**Last updated:** [March 18, 2019, 11:45am UTC](https://discourse.julialang.org/t/mixed-type-variables-in-julia/21989 "2019-03-18T11:45:31Z")

</div>

Dear All, How can we fix the issues from mixed type variable in Julia? now I convert these loops from Matlab to Julia; However, It seems not working in Julia … Matlab p = 1.0; pr = 3.0; tp = 2.0; for i = 1:fix(pr/…

---

## [GR in Atom: no labels, no ticks, no numbers on axes](https://discourse.julialang.org/t/gr-in-atom-no-labels-no-ticks-no-numbers-on-axes/21965)

<div class="topic-metadata">

**Author:** [@drmartinrohde](https://discourse.julialang.org/u/drmartinrohde)\
**Replies:** 9\
**Last updated:** [March 18, 2019, 4:10pm UTC](https://discourse.julialang.org/t/gr-in-atom-no-labels-no-ticks-no-numbers-on-axes/21965 "2019-03-18T16:10:33Z")

</div>

I use GR to plot my data in Atom. When I plot something (whether it is from a Julia script or directly from the REPL) I get a graph with gridlines, but without labels, ticks and numbers on the axes. Hence, there is no sc…

---

## [Example of direct linear solve, Sparse Matrix in cuda](https://discourse.julialang.org/t/example-of-direct-linear-solve-sparse-matrix-in-cuda/22000)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 2\
**Last updated:** [March 18, 2019, 3:17pm UTC](https://discourse.julialang.org/t/example-of-direct-linear-solve-sparse-matrix-in-cuda/22000 "2019-03-18T15:17:47Z")

</div>

Hi, In hope to write a simple example for my package PseudoArcLengthContinuation.jl, I tried to look for examples of direct sparse linear solves on the GPU in the context of PDE. So far I have not found an example wher…

---

## [Plots makes notebooks too large in IJulia](https://discourse.julialang.org/t/plots-makes-notebooks-too-large-in-ijulia/14550)

<div class="topic-metadata">

**Author:** [@denizyuret](https://discourse.julialang.org/u/denizyuret)\
**Replies:** 16\
**Last updated:** [March 18, 2019, 11:06am UTC](https://discourse.julialang.org/t/plots-makes-notebooks-too-large-in-ijulia/14550 "2019-03-18T11:06:21Z")

</div>

My 16KB notebooks end up 16MB if I keep the output of Plots in them. Is there an IJulia friendly way to use Plots that will not increase the notebook size as much?

---

## [Arpack does not build in 1.0 / Manjaro Linux](https://discourse.julialang.org/t/arpack-does-not-build-in-1-0-manjaro-linux/14515)

<div class="topic-metadata">

**Author:** [@charlesll](https://discourse.julialang.org/u/charlesll)\
**Replies:** 24\
**Last updated:** [March 18, 2019, 9:46am UTC](https://discourse.julialang.org/t/arpack-does-not-build-in-1-0-manjaro-linux/14515 "2019-03-18T09:46:22Z")

</div>

Hi, Working on Manjaro Linux, GCC 8, Julia 1.0 installed with the official Manjaro repos. I try to do some work with 1.0… Of course, none of my codes work (has been wrote in 0.5) :frowning: I can fix it, but the probl…

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

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