# General Usage

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

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

**Page:** 722

---

## ["@everywhere using AAA" causes races on writing precompilation files?](https://discourse.julialang.org/t/everywhere-using-aaa-causes-races-on-writing-precompilation-files/25638)

<div class="topic-metadata">

**Author:** [@RonK](https://discourse.julialang.org/u/RonK)\
**Replies:** 3\
**Last updated:** [July 29, 2020, 12:09am UTC](https://discourse.julialang.org/t/everywhere-using-aaa-causes-races-on-writing-precompilation-files/25638 "2020-07-29T00:09:56Z")

</div>

It seems to me that the precompiler doesn’t lock files properly to prevent race conditions on generating precompilation files. I have a script which uses the Distributed module which I run on a single multicore computer …

---

## [Problem with the calling of Laplacian.jl functions from PyJulia](https://discourse.julialang.org/t/problem-with-the-calling-of-laplacian-jl-functions-from-pyjulia/43829)

<div class="topic-metadata">

**Author:** [@Alip](https://discourse.julialang.org/u/Alip)\
**Replies:** 0\
**Last updated:** [July 28, 2020, 6:26pm UTC](https://discourse.julialang.org/t/problem-with-the-calling-of-laplacian-jl-functions-from-pyjulia/43829 "2020-07-28T18:26:13Z")

</div>

I’m trying to call some functions from the laplacians.jl package by using PyJulia in my python code. It seems that I cannot run the code from Pyjulia because when I use the function directly in the Julia environment it w…

---

## [Multiple dispatch on StructArrays](https://discourse.julialang.org/t/multiple-dispatch-on-structarrays/43810)

<div class="topic-metadata">

**Author:** [@ozmaden](https://discourse.julialang.org/u/ozmaden)\
**Replies:** 7\
**Last updated:** [July 28, 2020, 7:15pm UTC](https://discourse.julialang.org/t/multiple-dispatch-on-structarrays/43810 "2020-07-28T19:15:21Z")

</div>

Hi everyone. I am working with the StructArrays.jl package and trying to program a function to react differently for different types of arrays inside of a StructArray. Specifically I want to differentiate between Array …

---

## [Can you collapse combine many solution objects into one?](https://discourse.julialang.org/t/can-you-collapse-combine-many-solution-objects-into-one/43825)

<div class="topic-metadata">

**Author:** [@cbasile21](https://discourse.julialang.org/u/cbasile21)\
**Replies:** 2\
**Last updated:** [July 28, 2020, 6:59pm UTC](https://discourse.julialang.org/t/can-you-collapse-combine-many-solution-objects-into-one/43825 "2020-07-28T18:59:37Z")

</div>

If I solve an ode system by calling the solver once I get a sol object let us call it sol\_final , where I can save and access different times later. Let us pretend , I solve same system by chunks meaning I split up t\_sta…

---

## [Read csv files slow](https://discourse.julialang.org/t/read-csv-files-slow/43803)

<div class="topic-metadata">

**Author:** [@Ruan\_Stander](https://discourse.julialang.org/u/Ruan_Stander)\
**Replies:** 13\
**Last updated:** [July 28, 2020, 6:29pm UTC](https://discourse.julialang.org/t/read-csv-files-slow/43803 "2020-07-28T18:29:28Z")

</div>

Hi I am loading a long list of text files into memory using DataFrames (joined on the Date Column) It is taking very long to read them in so tried to do multithreading since my nthreads()=12 The multithreading is only…

---

## [Working One-class SVM in Julia?](https://discourse.julialang.org/t/working-one-class-svm-in-julia/43747)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 6\
**Last updated:** [July 28, 2020, 2:56pm UTC](https://discourse.julialang.org/t/working-one-class-svm-in-julia/43747 "2020-07-28T14:56:52Z")

</div>

Hi. Does anyone know of a working One-Class SVM in Julia? There is a ‘OneClassSVM’ option in LIBSVM, but it doesn’t work properly (which I have documented on GItHub, but there doesn’t seem to be much activity on the L…

---

## [Best performance for eval of expressions with parameters](https://discourse.julialang.org/t/best-performance-for-eval-of-expressions-with-parameters/43443)

<div class="topic-metadata">

**Author:** [@oheil](https://discourse.julialang.org/u/oheil)\
**Replies:** 2\
**Last updated:** [July 28, 2020, 2:07pm UTC](https://discourse.julialang.org/t/best-performance-for-eval-of-expressions-with-parameters/43443 "2020-07-28T14:07:40Z")

</div>

I try to achieve better/best performance for eval(expression). Up to now I found 5 more or less different possibilities (in respect to my code logic) to eval an expression. It’s best, to see it in code. The following MW…

---

## [Read multiple csv files](https://discourse.julialang.org/t/read-multiple-csv-files/43806)

<div class="topic-metadata">

**Author:** [@Ruan\_Stander](https://discourse.julialang.org/u/Ruan_Stander)\
**Replies:** 1\
**Last updated:** [July 28, 2020, 9:33am UTC](https://discourse.julialang.org/t/read-multiple-csv-files/43806 "2020-07-28T09:33:35Z")

</div>

How should I approach reading multiple files in one CSV.File call ? fileDirectory="d:/Data/Test/" using Glob files=glob("\*.txt", fileDirectory) df3=DataFrame(CSV.File(files)) MethodError: no method matching joinpath(:…

---

## [Let expression problem](https://discourse.julialang.org/t/let-expression-problem/43734)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 6\
**Last updated:** [July 28, 2020, 9:08am UTC](https://discourse.julialang.org/t/let-expression-problem/43734 "2020-07-28T09:08:02Z")

</div>

x=1 y=2 z=3 u=4 a=5 v=6 let x=11, y=11, z::Int=11, u::Int=11, v=(a=11; 22) x=22 println("x = ", x) println("y = ", y) …

---

## [Help finding what's causing a semi-hang](https://discourse.julialang.org/t/help-finding-whats-causing-a-semi-hang/43805)

<div class="topic-metadata">

**Author:** [@akdor1154](https://discourse.julialang.org/u/akdor1154)\
**Replies:** 0\
**Last updated:** [July 28, 2020, 9:03am UTC](https://discourse.julialang.org/t/help-finding-whats-causing-a-semi-hang/43805 "2020-07-28T09:03:24Z")

</div>

Hey guys, I’ve just found some really strange (and irritating) behaviour: when both IndexedTables and DataFrames are using-ed, IndexedTables.table() takes like 5 minutes to run if a certain argument is passed. To reprod…

---

## [Parser support for open/closed interval notation?](https://discourse.julialang.org/t/parser-support-for-open-closed-interval-notation/43781)

<div class="topic-metadata">

**Author:** [@cce](https://discourse.julialang.org/u/cce)\
**Replies:** 1\
**Last updated:** [July 28, 2020, 8:37am UTC](https://discourse.julialang.org/t/parser-support-for-open-closed-interval-notation/43781 "2020-07-28T08:37:21Z")

</div>

I’m working with Interval{DateTime} these days, in particular, within a medical data processing application that requires modeling of with closed/open endpoints. It’s inconvenient to write/update intervals due to the pe…

---

## [Create eventplot using PyPlot.jl through Plots.jl](https://discourse.julialang.org/t/create-eventplot-using-pyplot-jl-through-plots-jl/43802)

<div class="topic-metadata">

**Author:** [@smonsays](https://discourse.julialang.org/u/smonsays)\
**Replies:** 0\
**Last updated:** [July 28, 2020, 7:36am UTC](https://discourse.julialang.org/t/create-eventplot-using-pyplot-jl-through-plots-jl/43802 "2020-07-28T07:36:18Z")

</div>

I would like to create what matplotlib calls an eventplot. As far as I understand, this is only viable through the PyPlot backend for Plots. I tried the following: using Random using Plots pyplot() events = rand((0,1),…

---

## [Can Julia really be used as a scripting language? (Performance)](https://discourse.julialang.org/t/can-julia-really-be-used-as-a-scripting-language-performance/40384)

<div class="topic-metadata">

**Author:** [@singpolyma](https://discourse.julialang.org/u/singpolyma)\
**Replies:** 69\
**Last updated:** [July 28, 2020, 6:50am UTC](https://discourse.julialang.org/t/can-julia-really-be-used-as-a-scripting-language-performance/40384 "2020-07-28T06:50:48Z")

</div>

I’ve been reading the docs, and getting pretty excited about Julia’s potential as a replacement for Ruby in my workflows, however I very quickly seem to have run into a brick wall once trying to actually use it: it’s inc…

---

## [Why do we need to define separate methods for commutative binary operators?](https://discourse.julialang.org/t/why-do-we-need-to-define-separate-methods-for-commutative-binary-operators/42044)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 12\
**Last updated:** [July 28, 2020, 6:37am UTC](https://discourse.julialang.org/t/why-do-we-need-to-define-separate-methods-for-commutative-binary-operators/42044 "2020-07-28T06:37:07Z")

</div>

Eg: julia\> struct abc x :: Int end julia\> Base.:(+)(a::abc, b::Int) = abc(a.x + b) julia\> abc(1) + 1 abc(2) julia\> 1 + abc(1) ERROR: MethodError: no method matching +(::Int64, ::abc) julia\> Base.:(==)(…

---

## [Transforming \`GeometryBasics.Ngon\` using \`CoordinateTransformations\`](https://discourse.julialang.org/t/transforming-geometrybasics-ngon-using-coordinatetransformations/42680)

<div class="topic-metadata">

**Author:** [@lassepe](https://discourse.julialang.org/u/lassepe)\
**Replies:** 2\
**Last updated:** [July 28, 2020, 6:22am UTC](https://discourse.julialang.org/t/transforming-geometrybasics-ngon-using-coordinatetransformations/42680 "2020-07-28T06:22:04Z")

</div>

I am trying to transform some GeometryBasics.Line objects using CoordinateTransformations but I can’t find a convenient way to transform anything other than GeometryBasics.Point out of the box. For example, if I have u…

---

## [Why the separation of \`ODEProblem\` and \`solve\` in DifferentialEquations.jl?](https://discourse.julialang.org/t/why-the-separation-of-odeproblem-and-solve-in-differentialequations-jl/43737)

<div class="topic-metadata">

**Author:** [@Samuel\_Ainsworth](https://discourse.julialang.org/u/Samuel_Ainsworth)\
**Replies:** 13\
**Last updated:** [July 28, 2020, 1:10am UTC](https://discourse.julialang.org/t/why-the-separation-of-odeproblem-and-solve-in-differentialequations-jl/43737 "2020-07-28T01:10:54Z")

</div>

Is there a performance benefit to reusing ODEProblems? I’m curious why the ODEProblem struct/function if the equivalent info could also just be handed off to solve? I have a problem where I repeatedly need to solve the …

---

## [How to make faster in a matrix multiplication inside a loop?](https://discourse.julialang.org/t/how-to-make-faster-in-a-matrix-multiplication-inside-a-loop/43783)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 2\
**Last updated:** [July 27, 2020, 6:48pm UTC](https://discourse.julialang.org/t/how-to-make-faster-in-a-matrix-multiplication-inside-a-loop/43783 "2020-07-27T18:48:19Z")

</div>

Hi! Is there a way to implement the following function faster? Seeds = rand(200,90,15000,10) Mat = rand(200,200) @views function testfunction(Seeds,Mat) (J,T,N,S) = size(Seeds) ν = zeros(Float32,J,T,N,S)…

---

## [Multithreading on a Linux HPC cluster](https://discourse.julialang.org/t/multithreading-on-a-linux-hpc-cluster/43780)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 0\
**Last updated:** [July 27, 2020, 5:32pm UTC](https://discourse.julialang.org/t/multithreading-on-a-linux-hpc-cluster/43780 "2020-07-27T17:32:30Z")

</div>

I’m running some machine learning code on a linux HPC cluster that is managed by a PBS scheduler. The code consists mostly of training a bunch of random forests using MLJ.jl and DecisionTree.jl. DecisionTree.jl uses mult…

---

## [Matrix computation](https://discourse.julialang.org/t/matrix-computation/42835)

<div class="topic-metadata">

**Author:** [@nhavt](https://discourse.julialang.org/u/nhavt)\
**Replies:** 6\
**Last updated:** [July 27, 2020, 4:36pm UTC](https://discourse.julialang.org/t/matrix-computation/42835 "2020-07-27T16:36:27Z")

</div>

Hello all, I have the following function that I would need to optimize. This is because this function is called multiple times (at least 500). So, it is crucial to optimize this function. The computing time with my comp…

---

## [Ccall julia ReadOnlyMemoryError()](https://discourse.julialang.org/t/ccall-julia-readonlymemoryerror/43765)

<div class="topic-metadata">

**Author:** [@Ashwin\_Sundarka](https://discourse.julialang.org/u/Ashwin_Sundarka)\
**Replies:** 0\
**Last updated:** [July 27, 2020, 3:23pm UTC](https://discourse.julialang.org/t/ccall-julia-readonlymemoryerror/43765 "2020-07-27T15:23:49Z")

</div>

Hii! I am calling a C function from Julia using ccall. When I am running using a small data size it works perfectly but when I am using a huge data size it gives error ReadOnlyMemoryError() I tried to show a demo of my…

---

## [DifferentialEquations and a phase angle variable](https://discourse.julialang.org/t/differentialequations-and-a-phase-angle-variable/43449)

<div class="topic-metadata">

**Author:** [@akhuettel](https://discourse.julialang.org/u/akhuettel)\
**Replies:** 7\
**Last updated:** [July 27, 2020, 2:07pm UTC](https://discourse.julialang.org/t/differentialequations-and-a-phase-angle-variable/43449 "2020-07-27T14:07:39Z")

</div>

Is there a way to use the solver from DifferentialEquations with a phase variable (where only the value within \[0, 2pi\] matters)? The equation system generates a continuously increasing phi, so unless special precaution…

---

## [Understanding the limitations of generated functions](https://discourse.julialang.org/t/understanding-the-limitations-of-generated-functions/43660)

<div class="topic-metadata">

**Author:** [@tisztamo](https://discourse.julialang.org/u/tisztamo)\
**Replies:** 17\
**Last updated:** [July 27, 2020, 12:26pm UTC](https://discourse.julialang.org/t/understanding-the-limitations-of-generated-functions/43660 "2020-07-27T12:26:23Z")

</div>

The docs says: Generated functions must not mutate or observe any non-constant global state (including, for example, IO, locks, non-local dictionaries, or using hasmethod ). This means they can only read global c…

---

## [Need help understanding how to run a for loop in parallel](https://discourse.julialang.org/t/need-help-understanding-how-to-run-a-for-loop-in-parallel/43739)

<div class="topic-metadata">

**Author:** [@iamanoob](https://discourse.julialang.org/u/iamanoob)\
**Replies:** 2\
**Last updated:** [July 27, 2020, 11:54am UTC](https://discourse.julialang.org/t/need-help-understanding-how-to-run-a-for-loop-in-parallel/43739 "2020-07-27T11:54:15Z")

</div>

Hello, I am writing a huge program and given the amount of time required to perform the whole thing, i would like to use some parallel computation, however, i don’t understand how to implement it. let’s say i have this…

---

## [Using XY in module Main conflicts with an existing identifier - proper way of loading modules in REPL?](https://discourse.julialang.org/t/using-xy-in-module-main-conflicts-with-an-existing-identifier-proper-way-of-loading-modules-in-repl/43729)

<div class="topic-metadata">

**Author:** [@SEnergy](https://discourse.julialang.org/u/SEnergy)\
**Replies:** 7\
**Last updated:** [July 27, 2020, 11:48am UTC](https://discourse.julialang.org/t/using-xy-in-module-main-conflicts-with-an-existing-identifier-proper-way-of-loading-modules-in-repl/43729 "2020-07-27T11:48:44Z")

</div>

I’ve been learning Julia primarily by writing some Evolutionary Algo code, I started ~1 year ago, when I wrote my first, very simple, very primitive EA lib which I decided to re-write after a year (haven’t touched Julia …

---

## [Is there a way to find nunique and nmissing values for an integer column?](https://discourse.julialang.org/t/is-there-a-way-to-find-nunique-and-nmissing-values-for-an-integer-column/43721)

<div class="topic-metadata">

**Author:** [@Mrinalini\_madhusudan](https://discourse.julialang.org/u/Mrinalini_madhusudan)\
**Replies:** 3\
**Last updated:** [July 27, 2020, 7:20am UTC](https://discourse.julialang.org/t/is-there-a-way-to-find-nunique-and-nmissing-values-for-an-integer-column/43721 "2020-07-27T07:20:17Z")

</div>

I understand computing metrics like nmissing and nunique in describe() is avoided to save the performance issue. But is there any other way that these metrics can be computed?

---

## [Parsing selection syntax](https://discourse.julialang.org/t/parsing-selection-syntax/43632)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 12\
**Last updated:** [July 27, 2020, 1:05am UTC](https://discourse.julialang.org/t/parsing-selection-syntax/43632 "2020-07-27T01:05:07Z")

</div>

My question is not exclusively about Julia, but Julia is one language in which I see a possible solution. What I want is to implement a natural syntax to select items from a list (actually atoms from a molecular system)…

---

## [Package versions, how to make it less confusing?](https://discourse.julialang.org/t/package-versions-how-to-make-it-less-confusing/43714)

<div class="topic-metadata">

**Author:** [@joaquimg](https://discourse.julialang.org/u/joaquimg)\
**Replies:** 2\
**Last updated:** [July 26, 2020, 7:04pm UTC](https://discourse.julialang.org/t/package-versions-how-to-make-it-less-confusing/43714 "2020-07-26T19:04:25Z")

</div>

I have been answering some discourse posts where newcomers have some trouble managing package versions. They add a package and it does not do whatever the readme states. A possible change in Pkg, could be: Once you ad…

---

## [Turing fitting a Weibull model](https://discourse.julialang.org/t/turing-fitting-a-weibull-model/43693)

<div class="topic-metadata">

**Author:** [@ekidando20](https://discourse.julialang.org/u/ekidando20)\
**Replies:** 7\
**Last updated:** [July 26, 2020, 2:52pm UTC](https://discourse.julialang.org/t/turing-fitting-a-weibull-model/43693 "2020-07-26T14:52:06Z")

</div>

I am trying to fit a Weibull distribution in Turing. Sometimes when I rerun the model I get the following error. Any suggestions to avoid above error? I am also getting a similar error when I fit a regression model (…

---

## [StackOverflowError vs ulimit -s](https://discourse.julialang.org/t/stackoverflowerror-vs-ulimit-s/43395)

<div class="topic-metadata">

**Author:** [@recri](https://discourse.julialang.org/u/recri)\
**Replies:** 8\
**Last updated:** [July 26, 2020, 12:08pm UTC](https://discourse.julialang.org/t/stackoverflowerror-vs-ulimit-s/43395 "2020-07-26T12:08:23Z")

</div>

I am computing a recursive function which overflows the stack for some argument values. Somewhere I heard that julia on linux uses the system stack size as set by ulimit -s. So why do these two computations, one with u…

---

## [Printing from a task](https://discourse.julialang.org/t/printing-from-a-task/43698)

<div class="topic-metadata">

**Author:** [@pbayer](https://discourse.julialang.org/u/pbayer)\
**Replies:** 1\
**Last updated:** [July 26, 2020, 9:57am UTC](https://discourse.julialang.org/t/printing-from-a-task/43698 "2020-07-26T09:57:38Z")

</div>

In testing my package I have problems to print from an asynchronous task to the REPL. Here is a MWE: struct Msg a b end function tpr(ch::Channel) while true msg = take!(ch) if msg isa Msg …

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

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