# General Usage

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

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

**Page:** 730

---

## [How to prevent Ctrl-C from terminating a program during readline()](https://discourse.julialang.org/t/how-to-prevent-ctrl-c-from-terminating-a-program-during-readline/42687)

<div class="topic-metadata">

**Author:** [@Bryan\_So](https://discourse.julialang.org/u/Bryan_So)\
**Replies:** 3\
**Last updated:** [July 9, 2020, 3:13am UTC](https://discourse.julialang.org/t/how-to-prevent-ctrl-c-from-terminating-a-program-during-readline/42687 "2020-07-09T03:13:47Z")

</div>

Hi, the following simple code is my attempt to see if I can trap Ctrl-C during readline() Say I’m writing a REPL for a simple language interpreter… obviously I don’t want user accidentally pressing Ctrl-C to cause progr…

---

## [Packages under /.julia/dev/ shared by different versions of Julia?](https://discourse.julialang.org/t/packages-under-julia-dev-shared-by-different-versions-of-julia/42537)

<div class="topic-metadata">

**Author:** [@Ken\_Lin](https://discourse.julialang.org/u/Ken_Lin)\
**Replies:** 13\
**Last updated:** [July 8, 2020, 10:17pm UTC](https://discourse.julialang.org/t/packages-under-julia-dev-shared-by-different-versions-of-julia/42537 "2020-07-08T22:17:53Z")

</div>

Hello, Packages installed for different versions of Julia on my computer should be independent from each other, right? For example, I can have JuMP 0.18 installed for Julia 1.3.1 while having JuMP 0.21 installed for Ju…

---

## [Define types for multiple return values](https://discourse.julialang.org/t/define-types-for-multiple-return-values/42751)

<div class="topic-metadata">

**Author:** [@rogeriog](https://discourse.julialang.org/u/rogeriog)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 8:11pm UTC](https://discourse.julialang.org/t/define-types-for-multiple-return-values/42751 "2020-07-08T20:11:25Z")

</div>

I am new and probably it is a silly question, but couldn’t find a way to do this. I have a function and would like for all the return variables to be of the given type. Apparently I can use this syntax for only one vari…

---

## [Debugging Julia HTTP Package Performance bottleneck](https://discourse.julialang.org/t/debugging-julia-http-package-performance-bottleneck/42739)

<div class="topic-metadata">

**Author:** [@dilipjain](https://discourse.julialang.org/u/dilipjain)\
**Replies:** 1\
**Last updated:** [July 8, 2020, 5:49pm UTC](https://discourse.julialang.org/t/debugging-julia-http-package-performance-bottleneck/42739 "2020-07-08T17:49:53Z")

</div>

I was doing performance analysis of Julia HTTP server. A simple HelloWorld API gives around 4K Request/second(1 Core, Max CPU Utilization = 50%). Since the CPU utilisation of Julia process is not 100% I suspect there is …

---

## [Conditional package dependency to avoid build errors](https://discourse.julialang.org/t/conditional-package-dependency-to-avoid-build-errors/42742)

<div class="topic-metadata">

**Author:** [@lgo](https://discourse.julialang.org/u/lgo)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 5:19pm UTC](https://discourse.julialang.org/t/conditional-package-dependency-to-avoid-build-errors/42742 "2020-07-08T17:19:44Z")

</div>

I’ve created a package called anyMOD.jl that uses the Gurobi package as a dependency. However, Gurobi is only required for one special but quite useful feature and apart from that not used anywhere in the package. Buildi…

---

## [How do delete a column from a freqtable?](https://discourse.julialang.org/t/how-do-delete-a-column-from-a-freqtable/42744)

<div class="topic-metadata">

**Author:** [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 5:04pm UTC](https://discourse.julialang.org/t/how-do-delete-a-column-from-a-freqtable/42744 "2020-07-08T17:04:21Z")

</div>

Hi how’s it going? I’m using freqtables as a pivot table in Julia, and essentially I want to drop certain columns that I don’t need after computing the freqtable. Here’s an example of a computation straight from the doc…

---

## [Sysimage incompatible between Intel and AMD x86\_64?](https://discourse.julialang.org/t/sysimage-incompatible-between-intel-and-amd-x86-64/42716)

<div class="topic-metadata">

**Author:** [@alkoedl](https://discourse.julialang.org/u/alkoedl)\
**Replies:** 3\
**Last updated:** [July 8, 2020, 4:44pm UTC](https://discourse.julialang.org/t/sysimage-incompatible-between-intel-and-amd-x86-64/42716 "2020-07-08T16:44:23Z")

</div>

I’m using PackageCompiler to provide colleagues with a batteries included package (Julia + pre-compiled Julia code) that they just unzip and run. This process worked perfectly so far for Intel based computers. Trying to …

---

## [Mask on a 1D array](https://discourse.julialang.org/t/mask-on-a-1d-array/42740)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 3:59pm UTC](https://discourse.julialang.org/t/mask-on-a-1d-array/42740 "2020-07-08T15:59:05Z")

</div>

Hello, I would like to create a “mask” of a n-dimensional vector x whose i-th entrance is masked by 0, i.e xmask = \[x1; x2; ...;xi-1; 0; xi+1; ...; xn\] Is it possible to do this with a “view” and avoid to create a wh…

---

## [Documentation feature request](https://discourse.julialang.org/t/documentation-feature-request/42711)

<div class="topic-metadata">

**Author:** [@hafez\_ahmad](https://discourse.julialang.org/u/hafez_ahmad)\
**Replies:** 7\
**Last updated:** [July 8, 2020, 3:18pm UTC](https://discourse.julialang.org/t/documentation-feature-request/42711 "2020-07-08T15:18:42Z")

</div>

I think I am missing documentation like python or Matlab. when I installed python or Matlab, a lot of documentation automatically installed in my machine. I can use it offline mode. is there any plan for Julia’s document…

---

## [Cannot add StatsBase package, getting GitError](https://discourse.julialang.org/t/cannot-add-statsbase-package-getting-giterror/42595)

<div class="topic-metadata">

**Author:** [@Shahmir\_Asif](https://discourse.julialang.org/u/Shahmir_Asif)\
**Replies:** 7\
**Last updated:** [July 8, 2020, 1:17pm UTC](https://discourse.julialang.org/t/cannot-add-statsbase-package-getting-giterror/42595 "2020-07-08T13:17:12Z")

</div>

I am using Julia 1.0. I am trying to add this package but I get this error. I have tried to update package module but that doesn’t help ERROR: GitError(Code:EMERGECONFLICT, Class:Checkout, 4479 conflicts prevent checkou…

---

## [Multithreaded parallel prefix scan not faster](https://discourse.julialang.org/t/multithreaded-parallel-prefix-scan-not-faster/42591)

<div class="topic-metadata">

**Author:** [@Ellipse0934](https://discourse.julialang.org/u/Ellipse0934)\
**Replies:** 5\
**Last updated:** [July 8, 2020, 1:12pm UTC](https://discourse.julialang.org/t/multithreaded-parallel-prefix-scan-not-faster/42591 "2020-07-08T13:12:45Z")

</div>

I am trying to write the parallel prefix scan as a multithreaded CPU function. Since the number of processors is small relative to the length of the array It wouldn’t be fruitful to use Hillis-Steele or Belloch scan. In…

---

## [Does using Revise cause julia 1.5.0-rc1 to crash?](https://discourse.julialang.org/t/does-using-revise-cause-julia-1-5-0-rc1-to-crash/42725)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [July 8, 2020, 12:41pm UTC](https://discourse.julialang.org/t/does-using-revise-cause-julia-1-5-0-rc1-to-crash/42725 "2020-07-08T12:41:08Z")

</div>

I’ve just downloaded the glibc binary from the Julia downloads page. This is what I find \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_ \_ \_| |\_ \_\_ \_…

---

## [How would I filter columns that contain a particular substring?](https://discourse.julialang.org/t/how-would-i-filter-columns-that-contain-a-particular-substring/42721)

<div class="topic-metadata">

**Author:** [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 12:41pm UTC](https://discourse.julialang.org/t/how-would-i-filter-columns-that-contain-a-particular-substring/42721 "2020-07-08T12:41:04Z")

</div>

Hi how’s it going? Say I have this dataframe initial = DataFrame(:day=\>\["monday","monday","monday"\],:name=\>\["bob","mike","phillis"\],:temp=\>\["medium","high","low, medium"\],:gender=\>\["male, female","male","female"\]) H…

---

## [Question about TimeSeriesClustering](https://discourse.julialang.org/t/question-about-timeseriesclustering/42723)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 0\
**Last updated:** [July 8, 2020, 12:19pm UTC](https://discourse.julialang.org/t/question-about-timeseriesclustering/42723 "2020-07-08T12:19:43Z")

</div>

using TimeSeriesClustering ts\_input\_data = load\_timeseries\_data(:CEP\_GER1) Why does it always output my data in the REPL, shouldn’t it output in the workspace? thanks！！！！

---

## [Memory allocation in matrix multiplication](https://discourse.julialang.org/t/memory-allocation-in-matrix-multiplication/42707)

<div class="topic-metadata">

**Author:** [@aaraujo71](https://discourse.julialang.org/u/aaraujo71)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 11:39am UTC](https://discourse.julialang.org/t/memory-allocation-in-matrix-multiplication/42707 "2020-07-08T11:39:53Z")

</div>

I am using matrix multiplication inside large loops and I wonder how I can reduce memory allocation. For example, the following (useless) code function run\_cycle!(R, A, B) for i in 1:1000 R = A\*B end end…

---

## [Positioning in violin plot](https://discourse.julialang.org/t/positioning-in-violin-plot/42678)

<div class="topic-metadata">

**Author:** [@smonsays](https://discourse.julialang.org/u/smonsays)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 8:39am UTC](https://discourse.julialang.org/t/positioning-in-violin-plot/42678 "2020-07-08T08:39:16Z")

</div>

I would like to add ground truth values to a violin plot. So suppose I knew that for my category "a" the true value is 2.0 and I have a violin plot, I could use scatter like so: violin(repeat(\["a", "b", "c"\], outer=100)…

---

## [Sending emails from Julia using sendmail](https://discourse.julialang.org/t/sending-emails-from-julia-using-sendmail/26672)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 9\
**Last updated:** [July 8, 2020, 7:45am UTC](https://discourse.julialang.org/t/sending-emails-from-julia-using-sendmail/26672 "2020-07-08T07:45:59Z")

</div>

Hello, which is the simplest way to send basic text emails from a julia script in a server that already has sendmail (PostFix sendmail interface) but without setting up a SMTP server (i.e. without https://github.com/avik…

---

## [Detect if current "package" has been activated](https://discourse.julialang.org/t/detect-if-current-package-has-been-activated/26764)

<div class="topic-metadata">

**Author:** [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Replies:** 14\
**Last updated:** [July 8, 2020, 5:45am UTC](https://discourse.julialang.org/t/detect-if-current-package-has-been-activated/26764 "2020-07-08T05:45:01Z")

</div>

I’m not sure I’m doing this correctly but basically I’m building an “application” not a module. I have a Manifest.toml and Project.toml defined that contain the modules this application uses. So my initial julia file d…

---

## [Benchmark in place functions with @btime wasn't set up properly?](https://discourse.julialang.org/t/benchmark-in-place-functions-with-btime-wasnt-set-up-properly/42705)

<div class="topic-metadata">

**Author:** [@jchen975](https://discourse.julialang.org/u/jchen975)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 4:05am UTC](https://discourse.julialang.org/t/benchmark-in-place-functions-with-btime-wasnt-set-up-properly/42705 "2020-07-08T04:05:52Z")

</div>

I wrote an in-place function that performs the multidimensional Newton-Raphson algorithm, and I’m trying to compare the performance with the original implementation in Matlab. Since I wrote it as an in-place function, I…

---

## [Question: DifferentialEquations.jl and Runge-Kutte RK4 error](https://discourse.julialang.org/t/question-differentialequations-jl-and-runge-kutte-rk4-error/42694)

<div class="topic-metadata">

**Author:** [@teamtelefunken](https://discourse.julialang.org/u/teamtelefunken)\
**Replies:** 4\
**Last updated:** [July 8, 2020, 2:35am UTC](https://discourse.julialang.org/t/question-differentialequations-jl-and-runge-kutte-rk4-error/42694 "2020-07-08T02:35:21Z")

</div>

I’m trying to program a simple matrix-Ricatti ODE solver via the DifferentialEquations.jl package and the RK4 algorithm (I tried the default algorithm as well, to no avail). To benchmark my solver, I’m comparing it to th…

---

## [Comparing matrix multiplication between Julia and C](https://discourse.julialang.org/t/comparing-matrix-multiplication-between-julia-and-c/42692)

<div class="topic-metadata">

**Author:** [@saulo.giovani](https://discourse.julialang.org/u/saulo.giovani)\
**Replies:** 2\
**Last updated:** [July 7, 2020, 10:38pm UTC](https://discourse.julialang.org/t/comparing-matrix-multiplication-between-julia-and-c/42692 "2020-07-07T22:38:52Z")

</div>

Hey, community! I was comparing matrix multiplication performance using loops in C and Julia and I would like to know if someone could help me with one doubt about Matrix Acess behavior. I have read in the text “What Eve…

---

## [Packages imported in IJulia throw errors that are missing when imported in REPL](https://discourse.julialang.org/t/packages-imported-in-ijulia-throw-errors-that-are-missing-when-imported-in-repl/42683)

<div class="topic-metadata">

**Author:** [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)\
**Replies:** 9\
**Last updated:** [July 7, 2020, 9:09pm UTC](https://discourse.julialang.org/t/packages-imported-in-ijulia-throw-errors-that-are-missing-when-imported-in-repl/42683 "2020-07-07T21:09:27Z")

</div>

Hello. When using packages from within IJulia, I get error messages of the type: ┌ Info: Precompiling Zygote \[e88e6eb3-aa80-5325-afca-941959d7151f\] └ @ Base loading.jl:1260 ┌ Warning: Package Zygote does not have Array…

---

## [Instantiation of Tuple with value type parameters](https://discourse.julialang.org/t/instantiation-of-tuple-with-value-type-parameters/42673)

<div class="topic-metadata">

**Author:** [@vlc](https://discourse.julialang.org/u/vlc)\
**Replies:** 15\
**Last updated:** [July 7, 2020, 8:05pm UTC](https://discourse.julialang.org/t/instantiation-of-tuple-with-value-type-parameters/42673 "2020-07-07T20:05:03Z")

</div>

Hi there, I would like to be able to instantiate Tuples with value type parameters, e.g. foo = Tuple{3,4}() that is, similarly to how Val does it bar = Val(3) or baz = Val{3}() I was wondering whether there was wa…

---

## [Loading entire jld2 file](https://discourse.julialang.org/t/loading-entire-jld2-file/42610)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 12\
**Last updated:** [July 7, 2020, 5:40pm UTC](https://discourse.julialang.org/t/loading-entire-jld2-file/42610 "2020-07-07T17:40:20Z")

</div>

If I’ve saved my data to a jld2 format file using FileIO, is there a quick way to just load in the entire file at once? I seem to have to name all the entries in the file one by one.

---

## [How to explode a DataFrame cell containing multiple values into separate rows?](https://discourse.julialang.org/t/how-to-explode-a-dataframe-cell-containing-multiple-values-into-separate-rows/42677)

<div class="topic-metadata">

**Author:** [@Julia1](https://discourse.julialang.org/u/Julia1)\
**Replies:** 7\
**Last updated:** [July 7, 2020, 4:25pm UTC](https://discourse.julialang.org/t/how-to-explode-a-dataframe-cell-containing-multiple-values-into-separate-rows/42677 "2020-07-07T16:25:34Z")

</div>

Hi, I’m working on a project where sometimes I get data coming in with multiple values in one cell. Part of my feature engineering is to calculate the counts per user, and I’m looking for an effective way to explode out …

---

## [What are expected \[pre\]compile times?](https://discourse.julialang.org/t/what-are-expected-pre-compile-times/42672)

<div class="topic-metadata">

**Author:** [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Replies:** 3\
**Last updated:** [July 7, 2020, 2:01pm UTC](https://discourse.julialang.org/t/what-are-expected-pre-compile-times/42672 "2020-07-07T14:01:48Z")

</div>

I recently thought I’d try out the 1.5 release candidate when making some figures since rumor has it it’s quite snappy :slight\_smile: I was surprised that on a fresh install, after Pkg.add("Gadfly"), using Gadfly took 14…

---

## [Use multithreaded Jacobian function generated with ModelingToolKit.jl for application in DifferentialEquations.jl](https://discourse.julialang.org/t/use-multithreaded-jacobian-function-generated-with-modelingtoolkit-jl-for-application-in-differentialequations-jl/42317)

<div class="topic-metadata">

**Author:** [@luis\_munoz](https://discourse.julialang.org/u/luis_munoz)\
**Replies:** 5\
**Last updated:** [July 7, 2020, 1:45pm UTC](https://discourse.julialang.org/t/use-multithreaded-jacobian-function-generated-with-modelingtoolkit-jl-for-application-in-differentialequations-jl/42317 "2020-07-07T13:45:30Z")

</div>

Hi, I would like to complete the example PDE in the SciML News (also in the ModelingToolKit.jl documentation), section “ModelingToolkit Automatic Parallelism”, on automatically computed multithreaded Jacobian functions…

---

## [Are type constraints in certain method definitions in LinearAlgebra necessary?](https://discourse.julialang.org/t/are-type-constraints-in-certain-method-definitions-in-linearalgebra-necessary/42670)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [July 7, 2020, 12:40pm UTC](https://discourse.julialang.org/t/are-type-constraints-in-certain-method-definitions-in-linearalgebra-necessary/42670 "2020-07-07T12:40:18Z")

</div>

Eg getindex for adjoint and transpose: @propagate\_inbounds getindex(A::AdjOrTransAbsMat, i::Int, j::Int) = wrapperop(A)(A.parent\[j, i\]) Why do i and j need to be constrained to Ints? They may in principle be anything t…

---

## [Fast short Float32 vector](https://discourse.julialang.org/t/fast-short-float32-vector/42648)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 9\
**Last updated:** [July 7, 2020, 9:39am UTC](https://discourse.julialang.org/t/fast-short-float32-vector/42648 "2020-07-07T09:39:54Z")

</div>

SIMD.jl package offers ultimate in speed for short vectors on x64 CPU: aa = SIMD.Vec{4,Float32}((3, 1, 4, 1)) bb = SIMD.Vec{4,Float32}((4, 7, 2, 9)) function foo(a, b) a+b end julia\> @code\_native debuginfo=:none …

---

## [NamedArrays vs NamedTuples vs Dict in objective function to optimization](https://discourse.julialang.org/t/namedarrays-vs-namedtuples-vs-dict-in-objective-function-to-optimization/42659)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 6\
**Last updated:** [July 7, 2020, 9:39am UTC](https://discourse.julialang.org/t/namedarrays-vs-namedtuples-vs-dict-in-objective-function-to-optimization/42659 "2020-07-07T09:39:25Z")

</div>

I am optimizing a function that takes a vector of size ~300 as input. That objective function calls several other functions that each use a subset of the input vector. An example of that setup is below: function mainpro…

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

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