# General Usage

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

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

**Page:** 914

---

## [Odd behaviour with kron, transpose and sparse matrices](https://discourse.julialang.org/t/odd-behaviour-with-kron-transpose-and-sparse-matrices/18212)

<div class="topic-metadata">

**Author:** [@benkj](https://discourse.julialang.org/u/benkj)\
**Replies:** 2\
**Last updated:** [December 2, 2018, 10:43am UTC](https://discourse.julialang.org/t/odd-behaviour-with-kron-transpose-and-sparse-matrices/18212 "2018-12-02T10:43:08Z")

</div>

This is related to missing sparse matrix transpose methods (performance regression in 0.7.0beta2 vs 0.6) · Issue #28432 · JuliaLang/julia · GitHub kron returns a dense matrix if the adjoint is provided, example id = sp…

---

## [CSV.read not able to read properly a simple file](https://discourse.julialang.org/t/csv-read-not-able-to-read-properly-a-simple-file/18216)

<div class="topic-metadata">

**Author:** [@Altaf\_Sultanji](https://discourse.julialang.org/u/Altaf_Sultanji)\
**Replies:** 3\
**Last updated:** [December 2, 2018, 10:07am UTC](https://discourse.julialang.org/t/csv-read-not-able-to-read-properly-a-simple-file/18216 "2018-12-02T10:07:15Z")

</div>

I am trying to load a csv file with following date: 5 0 0 0 0.5 0 1 1 1 1 0 I am using following method: df\_data = CSV.read(filename; delim = ' ', header = false) The issue is that it is not loading the seco…

---

## [Travis Windows Builds of Julia](https://discourse.julialang.org/t/travis-windows-builds-of-julia/18208)

<div class="topic-metadata">

**Author:** [@ccoffrin](https://discourse.julialang.org/u/ccoffrin)\
**Replies:** 1\
**Last updated:** [December 2, 2018, 8:26am UTC](https://discourse.julialang.org/t/travis-windows-builds-of-julia/18208 "2018-12-02T08:26:19Z")

</div>

Is there any plan to add Julia to the support languages for Travis CI on Windows?

---

## [Help in making multi-dimensional equations a bit sexier](https://discourse.julialang.org/t/help-in-making-multi-dimensional-equations-a-bit-sexier/6217)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 20\
**Last updated:** [December 2, 2018, 6:35am UTC](https://discourse.julialang.org/t/help-in-making-multi-dimensional-equations-a-bit-sexier/6217 "2018-12-02T06:35:28Z")

</div>

I need to write some equations that loop over several dimensions, and I created my own function getData(parName,dim1,dim2) and setData(value,dim1,dim2) that, using anonymous functions, I dynamically wrapped to parName(di…

---

## [Converting zero-based cartesian indices to one-based linear indices](https://discourse.julialang.org/t/converting-zero-based-cartesian-indices-to-one-based-linear-indices/18205)

<div class="topic-metadata">

**Author:** [@damiendr](https://discourse.julialang.org/u/damiendr)\
**Replies:** 0\
**Last updated:** [December 1, 2018, 3:40pm UTC](https://discourse.julialang.org/t/converting-zero-based-cartesian-indices-to-one-based-linear-indices/18205 "2018-12-01T15:40:59Z")

</div>

I find myself needing to convert zero-based (or arbitrary) cartesian indices to one-based linear indices, such that, for instance, indices\[first(CartesianIndices((0:4,1:5)))\] == 1. I could have used the sub2ind function …

---

## [Modular\_sqrt (n, p) in julia](https://discourse.julialang.org/t/modular-sqrt-n-p-in-julia/18206)

<div class="topic-metadata">

**Author:** [@1112](https://discourse.julialang.org/u/1112)\
**Replies:** 0\
**Last updated:** [December 1, 2018, 4:13pm UTC](https://discourse.julialang.org/t/modular-sqrt-n-p-in-julia/18206 "2018-12-01T16:13:00Z")

</div>

Is there an analogue of the function modular\_sqrt (n, p) python in Julia?

---

## [BinDeps: include not defined](https://discourse.julialang.org/t/bindeps-include-not-defined/17717)

<div class="topic-metadata">

**Author:** [@dpo](https://discourse.julialang.org/u/dpo)\
**Replies:** 4\
**Last updated:** [December 1, 2018, 6:50am UTC](https://discourse.julialang.org/t/bindeps-include-not-defined/17717 "2018-12-01T06:50:47Z")

</div>

I can’t make sense of the following error thrown by BinDeps. In Julia 0.7, I get julia\> using BinDeps julia\> BinDeps.debug("HSL") WARNING: importing deprecated binding Base.STDOUT into BinDeps. WARNING: Base.STDOUT is …

---

## [\`@error\` message from module user's point of view](https://discourse.julialang.org/t/error-message-from-module-users-point-of-view/18193)

<div class="topic-metadata">

**Author:** [@mgkuhn](https://discourse.julialang.org/u/mgkuhn)\
**Replies:** 0\
**Last updated:** [November 30, 2018, 9:04pm UTC](https://discourse.julialang.org/t/error-message-from-module-users-point-of-view/18193 "2018-11-30T21:04:56Z")

</div>

When I call @error, it includes in the generated log message the filename and line number of where I called @error. However, when I am the author of a module, and I called @error in order to report that the caller of the…

---

## [Multiple workers in windows](https://discourse.julialang.org/t/multiple-workers-in-windows/10210)

<div class="topic-metadata">

**Author:** [@Diger](https://discourse.julialang.org/u/Diger)\
**Replies:** 4\
**Last updated:** [November 30, 2018, 7:46pm UTC](https://discourse.julialang.org/t/multiple-workers-in-windows/10210 "2018-11-30T19:46:47Z")

</div>

When running julia from cygwin I can write Julia -p 4 to start it with 4 workers. How can I run 4 workers in Julia directly from the windows program (using the short-cut)

---

## [Julia is slow questions - how to request information](https://discourse.julialang.org/t/julia-is-slow-questions-how-to-request-information/17969)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 10\
**Last updated:** [November 30, 2018, 7:23pm UTC](https://discourse.julialang.org/t/julia-is-slow-questions-how-to-request-information/17969 "2018-11-30T19:23:48Z")

</div>

As the Julia language grows we will see more ‘Julia is slow when I do XYZ’ questions. For instance I have seen several discussions recently about ‘slowness’ when reading in data. We cannot have hard and fast rules for de…

---

## [Beginner: LoadError: InexactError: trunc..when convert dataframe](https://discourse.julialang.org/t/beginner-loaderror-inexacterror-trunc-when-convert-dataframe/18151)

<div class="topic-metadata">

**Author:** [@xaver](https://discourse.julialang.org/u/xaver)\
**Replies:** 2\
**Last updated:** [November 30, 2018, 5:02pm UTC](https://discourse.julialang.org/t/beginner-loaderror-inexacterror-trunc-when-convert-dataframe/18151 "2018-11-30T17:02:11Z")

</div>

I use using DataFrames, CSV … huhu=convert(DataFrame,dbtip) when the DataFrame has about 10000 rows I am getting the message LoadError: InexactError: trunc(Int8, 128) in expression starting at /home/jiricvrk/Julia/…

---

## [Pkg3 again](https://discourse.julialang.org/t/pkg3-again/18173)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 10\
**Last updated:** [November 30, 2018, 2:17pm UTC](https://discourse.julialang.org/t/pkg3-again/18173 "2018-11-30T14:17:20Z")

</div>

Hello All, I have to admit that I am still totally lost with Pkg3. I just do not understand its internals despite reading docs and watching JuliaCon videos. My current problem is as follows. I have created an extension…

---

## [Can Julia Optimize an array expression?](https://discourse.julialang.org/t/can-julia-optimize-an-array-expression/18182)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 2\
**Last updated:** [November 30, 2018, 2:12pm UTC](https://discourse.julialang.org/t/can-julia-optimize-an-array-expression/18182 "2018-11-30T14:12:38Z")

</div>

Suppose I write a function that operates over (simple) arrays, even just taking floats as an input to construct the array, can Julia optimize the whole thing into a simple expression? function f(a::Float64,b::Float64) …

---

## [Reliable networking between Julia processes?](https://discourse.julialang.org/t/reliable-networking-between-julia-processes/18054)

<div class="topic-metadata">

**Author:** [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Replies:** 2\
**Last updated:** [November 30, 2018, 10:38am UTC](https://discourse.julialang.org/t/reliable-networking-between-julia-processes/18054 "2018-11-30T10:38:54Z")

</div>

I’m trying setup communication between two Julia processes using TCPSocket, but I’m having some issues making it work reliably and I’m not sure my design is correct (I don’t know much about networking). What I do essent…

---

## [Package suggestions for project](https://discourse.julialang.org/t/package-suggestions-for-project/18169)

<div class="topic-metadata">

**Author:** [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Replies:** 1\
**Last updated:** [November 30, 2018, 9:30am UTC](https://discourse.julialang.org/t/package-suggestions-for-project/18169 "2018-11-30T09:30:14Z")

</div>

Hi Guys, I am a bit new to Julia. Till now I have mostly explored JuliaImages. Now I’m trying to implement something related to Belief Propagation as a project for my Neural Networks course in grad school. I was wonder…

---

## [Travis doesn't tell me where an error occurs?](https://discourse.julialang.org/t/travis-doesnt-tell-me-where-an-error-occurs/18160)

<div class="topic-metadata">

**Author:** [@hsgg](https://discourse.julialang.org/u/hsgg)\
**Replies:** 6\
**Last updated:** [November 30, 2018, 2:17am UTC](https://discourse.julialang.org/t/travis-doesnt-tell-me-where-an-error-occurs/18160 "2018-11-30T02:17:34Z")

</div>

I am trying to update my package (https://github.com/hsgg/TwoFAST.jl/tree/next) to Julia-1.0. On my local machine, the tests pass. Hurray! However, on travis I get the following error: ERROR: MethodError: no method matc…

---

## [Module within try catch block](https://discourse.julialang.org/t/module-within-try-catch-block/18167)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 1\
**Last updated:** [November 30, 2018, 12:59am UTC](https://discourse.julialang.org/t/module-within-try-catch-block/18167 "2018-11-30T00:59:41Z")

</div>

julia\> try module M end catch y end ERROR: syntax: "module" expression not at top level Is there a way around this? Thanks

---

## [Interact vs Makie](https://discourse.julialang.org/t/interact-vs-makie/18162)

<div class="topic-metadata">

**Author:** [@wiktorkujawa](https://discourse.julialang.org/u/wiktorkujawa)\
**Replies:** 2\
**Last updated:** [November 29, 2018, 9:52pm UTC](https://discourse.julialang.org/t/interact-vs-makie/18162 "2018-11-29T21:52:12Z")

</div>

I have problem with the packages. In brief, Interact package works perfect if I don’t write using Makie. Makie didn’t work, if it comes to methods like on(), hbox() and vbox() which works in case of Interact Package. I t…

---

## [Purpose of zero() in a function](https://discourse.julialang.org/t/purpose-of-zero-in-a-function/18095)

<div class="topic-metadata">

**Author:** [@leejm516](https://discourse.julialang.org/u/leejm516)\
**Replies:** 9\
**Last updated:** [November 29, 2018, 8:28pm UTC](https://discourse.julialang.org/t/purpose-of-zero-in-a-function/18095 "2018-11-29T20:28:05Z")

</div>

I do not know what to write in the title… I am learning a lot by analyzing source codes in Julia packages I am using. Today, I saw an interesting line in lm.jl in the GLM package. function deviance(r::LmResp) y =…

---

## [Indexing array based on a vector including Colon()](https://discourse.julialang.org/t/indexing-array-based-on-a-vector-including-colon/18121)

<div class="topic-metadata">

**Author:** [@YoungFaithful](https://discourse.julialang.org/u/YoungFaithful)\
**Replies:** 3\
**Last updated:** [November 29, 2018, 7:28pm UTC](https://discourse.julialang.org/t/indexing-array-based-on-a-vector-including-colon/18121 "2018-11-29T19:28:29Z")

</div>

I’m trying to index a multidimensional array based on a vector using Colon() as well. Is there an easy way to reformulate the getindex function call to allow for varying dimensions of A and corresponding lengths of the i…

---

## [Standardizing vector of Decimals](https://discourse.julialang.org/t/standardizing-vector-of-decimals/18142)

<div class="topic-metadata">

**Author:** [@randyzwitch](https://discourse.julialang.org/u/randyzwitch)\
**Replies:** 4\
**Last updated:** [November 29, 2018, 7:20pm UTC](https://discourse.julialang.org/t/standardizing-vector-of-decimals/18142 "2018-11-29T19:20:54Z")

</div>

I’m trying to add Decimal support to my database package; in order to load decimals into a table, this requires having a fixed Decimal definition such as the following: create table test (col1 Decimal(7,4)); Within Jul…

---

## [Julia 1.0 Replacement for \`Pkg.clone(url::String, name::String)\` and adding in Project.toml](https://discourse.julialang.org/t/julia-1-0-replacement-for-pkg-clone-url-string-name-string-and-adding-in-project-toml/18140)

<div class="topic-metadata">

**Author:** [@johanter](https://discourse.julialang.org/u/johanter)\
**Replies:** 3\
**Last updated:** [November 29, 2018, 6:05pm UTC](https://discourse.julialang.org/t/julia-1-0-replacement-for-pkg-clone-url-string-name-string-and-adding-in-project-toml/18140 "2018-11-29T18:05:51Z")

</div>

Is there an equivalent function for Pkg.clone(url::String, name::String) in Julia 1.0 that can be used to add an unregistered package to a project/package .toml. To be cloned automatically in new environment, using Pkg.…

---

## [Registry failed to update](https://discourse.julialang.org/t/registry-failed-to-update/17840)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 9\
**Last updated:** [November 29, 2018, 5:38pm UTC](https://discourse.julialang.org/t/registry-failed-to-update/17840 "2018-11-29T17:38:32Z")

</div>

Since a few days ago I’m getting a warning when I \]up: (v1.0) pkg\> up Updating registry at \`~/.julia/registries/General\` Updating git-repo \`https://github.com/JuliaRegistries/General.git\` Updating registry at \`~/.…

---

## [Need some information about Regression and GLM packages](https://discourse.julialang.org/t/need-some-information-about-regression-and-glm-packages/18155)

<div class="topic-metadata">

**Author:** [@arunmarathe](https://discourse.julialang.org/u/arunmarathe)\
**Replies:** 1\
**Last updated:** [November 29, 2018, 5:31pm UTC](https://discourse.julialang.org/t/need-some-information-about-regression-and-glm-packages/18155 "2018-11-29T17:31:35Z")

</div>

Hello, I am new to Julia. I am looking at some old Julia code that is using the Regression package. Suggestions on the web suggest users to use GLM package for regression use cases. Are Regression and GLM API-compatible…

---

## [Fortran vs Julia stack allocated arrays](https://discourse.julialang.org/t/fortran-vs-julia-stack-allocated-arrays/18119)

<div class="topic-metadata">

**Author:** [@datnamer](https://discourse.julialang.org/u/datnamer)\
**Replies:** 18\
**Last updated:** [November 29, 2018, 5:17pm UTC](https://discourse.julialang.org/t/fortran-vs-julia-stack-allocated-arrays/18119 "2018-11-29T17:17:32Z")

</div>

I ran into the following HN comment: But to say something nice about Fortran: dynamically-sized-mutable-stack-allocated-arrays. (-fstack-arrays) In Julia, stack-allocated objects are immutable, and (partly for that …

---

## [Memoization of functions with vector inputs in Julia and JuMP](https://discourse.julialang.org/t/memoization-of-functions-with-vector-inputs-in-julia-and-jump/18143)

<div class="topic-metadata">

**Author:** [@Olegg](https://discourse.julialang.org/u/Olegg)\
**Replies:** 0\
**Last updated:** [November 29, 2018, 3:30pm UTC](https://discourse.julialang.org/t/memoization-of-functions-with-vector-inputs-in-julia-and-jump/18143 "2018-11-29T15:30:14Z")

</div>

I’m evaluating the trade-offs and efficient use of memoization with lengthy vectors, particularly in optimisation. Suppose a vector input to an expensive function has many Float64 elements, say, 100,000. When this functi…

---

## [MetadataTools.jl in Julia 1.0](https://discourse.julialang.org/t/metadatatools-jl-in-julia-1-0/18147)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 1\
**Last updated:** [November 29, 2018, 4:16pm UTC](https://discourse.julialang.org/t/metadatatools-jl-in-julia-1-0/18147 "2018-11-29T16:16:41Z")

</div>

I’ve been using MetadataTools for a few projects. Can it still be used? If not, what is the alternative? Thanks!

---

## [Isa function error in jupyter notebook](https://discourse.julialang.org/t/isa-function-error-in-jupyter-notebook/18132)

<div class="topic-metadata">

**Author:** [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Replies:** 3\
**Last updated:** [November 29, 2018, 4:11pm UTC](https://discourse.julialang.org/t/isa-function-error-in-jupyter-notebook/18132 "2018-11-29T16:11:40Z")

</div>

in notebook isa(1, Int) Invalid @var syntax \`extra token after end of expression\`. 1 isa Number Invalid @var syntax \`extra token after end of expression\`. at REPL julia\> isa(1, Number) true PS: Same issue with isdigit…

---

## [Manipulating fields of a StructArray does not work](https://discourse.julialang.org/t/manipulating-fields-of-a-structarray-does-not-work/18141)

<div class="topic-metadata">

**Author:** [@mariok90](https://discourse.julialang.org/u/mariok90)\
**Replies:** 1\
**Last updated:** [November 29, 2018, 2:51pm UTC](https://discourse.julialang.org/t/manipulating-fields-of-a-structarray-does-not-work/18141 "2018-11-29T14:51:50Z")

</div>

I create a StructArray and want to manipulate the field value of one element. julia\> using StructArrays julia\> mutable struct Test a b end julia\> arr = \[Test(1,1), Test(2,2)\] 2-element Ar…

---

## [What does "meta" mean?](https://discourse.julialang.org/t/what-does-meta-mean/18124)

<div class="topic-metadata">

**Author:** [@oviedorodolfo](https://discourse.julialang.org/u/oviedorodolfo)\
**Replies:** 3\
**Last updated:** [November 29, 2018, 4:34am UTC](https://discourse.julialang.org/t/what-does-meta-mean/18124 "2018-11-29T04:34:54Z")

</div>

In the Documentation regarding the Julia REPL, I find the keyword meta in the table with shortcuts in the column headed Keybinding - Program Control. What does meta mean? Examples: ctrl-Right, meta-F =\> Move right one…

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

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