# General Usage

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

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

**Page:** 700

---

## [Best strategy for fastest way to extract arrays built from matrix elements and then reassemble after ifft()](https://discourse.julialang.org/t/best-strategy-for-fastest-way-to-extract-arrays-built-from-matrix-elements-and-then-reassemble-after-ifft/46888)

<div class="topic-metadata">

**Author:** [@jleman](https://discourse.julialang.org/u/jleman)\
**Replies:** 0\
**Last updated:** [September 19, 2020, 1:48am UTC](https://discourse.julialang.org/t/best-strategy-for-fastest-way-to-extract-arrays-built-from-matrix-elements-and-then-reassemble-after-ifft/46888 "2020-09-19T01:48:47Z")

</div>

I have a frequency domain data set organized as shown in the attached image (set up as an array of matrices like: \[zeros(40,4000) for \_ in 1:4096\] ) I need to create the time domain data set at right by applying the …

---

## [Scattered Atomic Writes Into Array](https://discourse.julialang.org/t/scattered-atomic-writes-into-array/46990)

<div class="topic-metadata">

**Author:** [@cshenton](https://discourse.julialang.org/u/cshenton)\
**Replies:** 6\
**Last updated:** [September 21, 2020, 3:41pm UTC](https://discourse.julialang.org/t/scattered-atomic-writes-into-array/46990 "2020-09-21T15:41:06Z")

</div>

I’m porting some OpenCL code that does scattered atomic writes. These writes are quite sparse, meaning that threads rarely try to write cache lines at the same time. I’m trying to figure out how to do this in Julia but …

---

## [I thought I understood "pass-by-sharing" in Julia until I found this](https://discourse.julialang.org/t/i-thought-i-understood-pass-by-sharing-in-julia-until-i-found-this/46897)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 21\
**Last updated:** [September 21, 2020, 4:12pm UTC](https://discourse.julialang.org/t/i-thought-i-understood-pass-by-sharing-in-julia-until-i-found-this/46897 "2020-09-21T16:12:43Z")

</div>

Here is a snippet from “Julia 1.0 Programming Complete Reference Guide”: anon = Array{Any}(undef, 2) for i = 1:2 anon\[i\] = ()-\> println(i) i += 1 end Can someone explain or point me to explanation why julia\> anon\[…

---

## [LibCURL.jl/Pkg.jl without SSL](https://discourse.julialang.org/t/libcurl-jl-pkg-jl-without-ssl/47015)

<div class="topic-metadata">

**Author:** [@madprogrammer](https://discourse.julialang.org/u/madprogrammer)\
**Replies:** 0\
**Last updated:** [September 21, 2020, 2:58pm UTC](https://discourse.julialang.org/t/libcurl-jl-pkg-jl-without-ssl/47015 "2020-09-21T14:58:06Z")

</div>

I am running julia on a machine with issues downloading artifacts from github due to SSL errors. Is there any way to ignore SSL?

---

## [Macros not imported within blocks](https://discourse.julialang.org/t/macros-not-imported-within-blocks/47009)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 1\
**Last updated:** [September 21, 2020, 2:51pm UTC](https://discourse.julialang.org/t/macros-not-imported-within-blocks/47009 "2020-09-21T14:51:04Z")

</div>

I find that macros are not imported if the package defining the macros are imported within a block. For example, importing Printf and using the macro @printf by if true using Printf @printf("test") end produce…

---

## [PortAudio.jl does not work well with Gtk.jl](https://discourse.julialang.org/t/portaudio-jl-does-not-work-well-with-gtk-jl/47003)

<div class="topic-metadata">

**Author:** [@kogad](https://discourse.julialang.org/u/kogad)\
**Replies:** 1\
**Last updated:** [September 21, 2020, 1:21pm UTC](https://discourse.julialang.org/t/portaudio-jl-does-not-work-well-with-gtk-jl/47003 "2020-09-21T13:21:51Z")

</div>

Hi, I am trying to develop a gui app for real time audio processing using PortAudio.jl and Gtk.jl. The following code is for just recording and playing back. using PortAudio # using Gtk stream = PortAudioStream(1, 2) …

---

## [How to retrieve indices from bioalignments?](https://discourse.julialang.org/t/how-to-retrieve-indices-from-bioalignments/47002)

<div class="topic-metadata">

**Author:** [@Entangler](https://discourse.julialang.org/u/Entangler)\
**Replies:** 1\
**Last updated:** [September 21, 2020, 1:12pm UTC](https://discourse.julialang.org/t/how-to-retrieve-indices-from-bioalignments/47002 "2020-09-21T13:12:15Z")

</div>

I am wondering how I can get sequence indices from a BioAlignments.jl alignment. The pairalign function returns an object from which I can get the sequences of the aligned region and the score. And while the function pri…

---

## [Load sysimage project dependent (in Atom/VSCode)](https://discourse.julialang.org/t/load-sysimage-project-dependent-in-atom-vscode/46995)

<div class="topic-metadata">

**Author:** [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Replies:** 1\
**Last updated:** [September 21, 2020, 11:23am UTC](https://discourse.julialang.org/t/load-sysimage-project-dependent-in-atom-vscode/46995 "2020-09-21T11:23:14Z")

</div>

Is it possible to load sysimages project dependent, in the following sense: If the project folder contains a sysimage, then the sysimage is loaded, otherwise not. I would know how to do this via scripts, but I don’t kn…

---

## [Get active sysimage](https://discourse.julialang.org/t/get-active-sysimage/46992)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 2\
**Last updated:** [September 21, 2020, 11:10am UTC](https://discourse.julialang.org/t/get-active-sysimage/46992 "2020-09-21T11:10:12Z")

</div>

Is there a way to get the path of the active sysimage?

---

## [Want to use a function like numpy.broadcast\_to()](https://discourse.julialang.org/t/want-to-use-a-function-like-numpy-broadcast-to/46984)

<div class="topic-metadata">

**Author:** [@abap34](https://discourse.julialang.org/u/abap34)\
**Replies:** 8\
**Last updated:** [September 21, 2020, 10:30am UTC](https://discourse.julialang.org/t/want-to-use-a-function-like-numpy-broadcast-to/46984 "2020-09-21T10:30:07Z")

</div>

I’m porting some Python code to Julia, and I’d like to use the equivalent of the numpy.broadcast\_to() function in it. An idea I’ve tried. Given an Array x and a Tuple shape, Use x .+ zeros(shape) instead of broadcast…

---

## [Comparison of languages for parallel computing tasks](https://discourse.julialang.org/t/comparison-of-languages-for-parallel-computing-tasks/46806)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 11\
**Last updated:** [September 21, 2020, 9:11am UTC](https://discourse.julialang.org/t/comparison-of-languages-for-parallel-computing-tasks/46806 "2020-09-21T09:11:40Z")

</div>

The paper https://www.sciencedirect.com/science/article/abs/pii/S2210650220303734 https://lilloa.univ-lille.fr/handle/20.500.12210/29528 compares Chapel, Python, and Julia. For reasons that are at this point not crisp…

---

## [Range with end](https://discourse.julialang.org/t/range-with-end/46971)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 7\
**Last updated:** [September 21, 2020, 6:09am UTC](https://discourse.julialang.org/t/range-with-end/46971 "2020-09-21T06:09:28Z")

</div>

This works as expected: b = rand(10) b\[2:end\] view(b, 2:10) but not this: julia\> view(b, 2:end) ERROR: syntax: missing last argument in "1:" range expression Do I really have to use: view(b, 2:length(b)) Is there …

---

## [Different Float64 sum on different architectures](https://discourse.julialang.org/t/different-float64-sum-on-different-architectures/46949)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 9\
**Last updated:** [September 20, 2020, 9:31pm UTC](https://discourse.julialang.org/t/different-float64-sum-on-different-architectures/46949 "2020-09-20T21:31:31Z")

</div>

I sometimes get different results for summing a vector of Float64 numbers on different Windows machines. The vectors are identical, so it seems sum can produce different results across hardware architectures (even if os …

---

## [How does BusinessDays.jl work?](https://discourse.julialang.org/t/how-does-businessdays-jl-work/46968)

<div class="topic-metadata">

**Author:** [@Derek\_Vetsch](https://discourse.julialang.org/u/Derek_Vetsch)\
**Replies:** 1\
**Last updated:** [September 20, 2020, 9:07pm UTC](https://discourse.julialang.org/t/how-does-businessdays-jl-work/46968 "2020-09-20T21:07:16Z")

</div>

I see in the BusinessDays docs that the package achieves its performance by using a cache. However, I don’t understand what a cache means in this context, and how does using one create superior performance to something l…

---

## [Benchmarking inside a module](https://discourse.julialang.org/t/benchmarking-inside-a-module/46967)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 1\
**Last updated:** [September 20, 2020, 8:46pm UTC](https://discourse.julialang.org/t/benchmarking-inside-a-module/46967 "2020-09-20T20:46:41Z")

</div>

I’m trying to get benchmark results of a function inside a module displayed in REPL. Here is an example: module Ex9 using BenchmarkTools a = rand(100, 100) function foo(a) m = maximum(a) map(x -\> x\<0 ? 0 : x\<0.8m …

---

## [With new Julia Client update, atom not working](https://discourse.julialang.org/t/with-new-julia-client-update-atom-not-working/46964)

<div class="topic-metadata">

**Author:** [@Guillermo\_Sepulveda](https://discourse.julialang.org/u/Guillermo_Sepulveda)\
**Replies:** 1\
**Last updated:** [September 20, 2020, 7:47pm UTC](https://discourse.julialang.org/t/with-new-julia-client-update-atom-not-working/46964 "2020-09-20T19:47:08Z")

</div>

I was working in Julia and it was an update for Julia Client, once it finish updating it says restart so i did, and when atom open again the left panel was gone and doesn´t appear “Press enter to start Julia”, so now i c…

---

## [throw(ErrorException(...)) vs. @error](https://discourse.julialang.org/t/throw-errorexception-vs-error/46955)

<div class="topic-metadata">

**Author:** [@bobcassels](https://discourse.julialang.org/u/bobcassels)\
**Replies:** 3\
**Last updated:** [September 20, 2020, 5:45pm UTC](https://discourse.julialang.org/t/throw-errorexception-vs-error/46955 "2020-09-20T17:45:15Z")

</div>

For development / debugging, I’ve been using throw(ErrorException(...)), and @assert. As this code moves to production, where it will be in a batch job running in “the cloud”, I’d like to have such errors logged. What’…

---

## [Query.jl @groupby How to specify the key selector properly?](https://discourse.julialang.org/t/query-jl-groupby-how-to-specify-the-key-selector-properly/46929)

<div class="topic-metadata">

**Author:** [@kai](https://discourse.julialang.org/u/kai)\
**Replies:** 1\
**Last updated:** [September 20, 2020, 5:19pm UTC](https://discourse.julialang.org/t/query-jl-groupby-how-to-specify-the-key-selector-properly/46929 "2020-09-20T17:19:33Z")

</div>

Hello, I wonder what is the proper way to use the @groupby function from Query.jl when the key selector is a variable of type Symbol? Example: using DataFrames, Query df = DataFrame(name=\["John", "Sally", "Kirk"\], age=…

---

## [Running package tests really slow](https://discourse.julialang.org/t/running-package-tests-really-slow/46587)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 12\
**Last updated:** [September 20, 2020, 2:43pm UTC](https://discourse.julialang.org/t/running-package-tests-really-slow/46587 "2020-09-20T14:43:01Z")

</div>

I’m a bit surprised that running unit tests for a simple trial package takes a lot fo time. I am wondering what I’m doing wrong. running \] test in this example takes 36 seconds. Note that there is no computation involv…

---

## [Plots.PlotlyJSBackend () is displayed as GR ()](https://discourse.julialang.org/t/plots-plotlyjsbackend-is-displayed-as-gr/46902)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 20\
**Last updated:** [September 20, 2020, 2:30pm UTC](https://discourse.julialang.org/t/plots-plotlyjsbackend-is-displayed-as-gr/46902 "2020-09-20T14:30:43Z")

</div>

When running the following lines of code I receive the same graphic, and the last lines are expected to deliver an interactive graphic. Julia\>versioninfo() Julia Version 1.5.1 Commit 697e782ab8 (2020-08-25 20:08 UTC) Pl…

---

## [Random seeds in parallel computing](https://discourse.julialang.org/t/random-seeds-in-parallel-computing/46899)

<div class="topic-metadata">

**Author:** [@AAL](https://discourse.julialang.org/u/AAL)\
**Replies:** 5\
**Last updated:** [September 20, 2020, 8:57am UTC](https://discourse.julialang.org/t/random-seeds-in-parallel-computing/46899 "2020-09-20T08:57:13Z")

</div>

I am trying to run a simulation in parallel and I am having trouble understanding how random numbers are generated in this setting. It seems like I can generate pseudorandom numbers in several cores with the same random …

---

## [Fall in GitHub code frequency](https://discourse.julialang.org/t/fall-in-github-code-frequency/46941)

<div class="topic-metadata">

**Author:** [@rakesh4real](https://discourse.julialang.org/u/rakesh4real)\
**Replies:** 7\
**Last updated:** [September 20, 2020, 1:47am UTC](https://discourse.julialang.org/t/fall-in-github-code-frequency/46941 "2020-09-20T01:47:30Z")

</div>

Hi, I work extensively in deep learning projects and had known Julia for quite a while. Today, I was skimming through code frequency graph and the fall really concerned me. Can I know if is something that I should worry…

---

## [Slow Cholesky factorization for sparse matrices?](https://discourse.julialang.org/t/slow-cholesky-factorization-for-sparse-matrices/46909)

<div class="topic-metadata">

**Author:** [@Albert\_de\_montserrat](https://discourse.julialang.org/u/Albert_de_montserrat)\
**Replies:** 6\
**Last updated:** [September 19, 2020, 7:45pm UTC](https://discourse.julialang.org/t/slow-cholesky-factorization-for-sparse-matrices/46909 "2020-09-19T19:45:05Z")

</div>

I am trying to compare Julia’s Cholesky factorization against MATLAB for sparse matrices, and Julia seems almost 2 times slower than MATLAB. Julia: using SparseArrays,BenchmarkTools, LinearAlgebra n = Int(5e3) A = rand…

---

## [Disabling emoji suggestion?](https://discourse.julialang.org/t/disabling-emoji-suggestion/46928)

<div class="topic-metadata">

**Author:** [@Mehrdad\_Anvar](https://discourse.julialang.org/u/Mehrdad_Anvar)\
**Replies:** 0\
**Last updated:** [September 19, 2020, 7:09pm UTC](https://discourse.julialang.org/t/disabling-emoji-suggestion/46928 "2020-09-19T19:09:22Z")

</div>

Does anyone know how to disable emoji suggestion in Atom while typing code? I am trying to get autocompletion for a file path and atom constantly suggest emojis when I use double backtikcs

---

## [Memoize Pkg? Bad use of Metaprogramming?](https://discourse.julialang.org/t/memoize-pkg-bad-use-of-metaprogramming/46874)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 14\
**Last updated:** [September 19, 2020, 5:21pm UTC](https://discourse.julialang.org/t/memoize-pkg-bad-use-of-metaprogramming/46874 "2020-09-19T17:21:19Z")

</div>

Been doing some long-running computations. I mean … long. So I am doing the obvious thing, storing results to disk along the way. For reproducibility reasons I’d like to be able to memoize lots of intermediate results al…

---

## [Improving Barnes-Hut n-body simulation performance](https://discourse.julialang.org/t/improving-barnes-hut-n-body-simulation-performance/20864)

<div class="topic-metadata">

**Author:** [@novoselrok](https://discourse.julialang.org/u/novoselrok)\
**Replies:** 14\
**Last updated:** [September 19, 2020, 5:03pm UTC](https://discourse.julialang.org/t/improving-barnes-hut-n-body-simulation-performance/20864 "2020-09-19T17:03:17Z")

</div>

Hi. I’m writing a Barnes-Hut simulator in Julia but I’m experiencing a slowdown compared to the C version. For 80k bodies: C - 25 seconds Julia - 35 seconds As expected it spends 99.9% time in the compute\_force func…

---

## [Its possible to use all cores or parallel cores to do some project/calculations?](https://discourse.julialang.org/t/its-possible-to-use-all-cores-or-parallel-cores-to-do-some-project-calculations/46639)

<div class="topic-metadata">

**Author:** [@Lucas\_Pollito](https://discourse.julialang.org/u/Lucas_Pollito)\
**Replies:** 41\
**Last updated:** [September 19, 2020, 4:05pm UTC](https://discourse.julialang.org/t/its-possible-to-use-all-cores-or-parallel-cores-to-do-some-project-calculations/46639 "2020-09-19T16:05:58Z")

</div>

I have three different and independent task/calculation to do. function interpQa() ag = 0.01:0.05:3 aσ = 0.03 : 0.025 : 0.63 if PrimeiraVez mQ = \[Q(g,sigma) for g in ag, sigma in aσ\] w…

---

## [\[VegaLite\] How to convert a string to VL spec?](https://discourse.julialang.org/t/vegalite-how-to-convert-a-string-to-vl-spec/46767)

<div class="topic-metadata">

**Author:** [@peters](https://discourse.julialang.org/u/peters)\
**Replies:** 6\
**Last updated:** [September 19, 2020, 7:45am UTC](https://discourse.julialang.org/t/vegalite-how-to-convert-a-string-to-vl-spec/46767 "2020-09-19T07:45:15Z")

</div>

I have a string variable specifying a VL plot. How can I use the string variable with @vl\_str in order to plot a graph? e.g. julia\> s “{"$schema":"\[https://vega.github.io/schema/vega-lite/v5.json\\\](https://vega.github.…

---

## [Recommended Database connection pool pkg to pair with LibPQ?](https://discourse.julialang.org/t/recommended-database-connection-pool-pkg-to-pair-with-libpq/46890)

<div class="topic-metadata">

**Author:** [@andre1sk](https://discourse.julialang.org/u/andre1sk)\
**Replies:** 0\
**Last updated:** [September 19, 2020, 3:00am UTC](https://discourse.julialang.org/t/recommended-database-connection-pool-pkg-to-pair-with-libpq/46890 "2020-09-19T03:00:49Z")

</div>

What would be the recommended db connection pool pkg to pair with LibPQ?

---

## [How do I export strings to CSV file？](https://discourse.julialang.org/t/how-do-i-export-strings-to-csv-file/46833)

<div class="topic-metadata">

**Author:** [@zlq178](https://discourse.julialang.org/u/zlq178)\
**Replies:** 8\
**Last updated:** [September 19, 2020, 1:41am UTC](https://discourse.julialang.org/t/how-do-i-export-strings-to-csv-file/46833 "2020-09-19T01:41:08Z")

</div>

using CSV,DataFrames data1=DataFrame(CSV.File(“D:\\\\documemt\\\\julia\\\\aaa.csv”)) a=\[1,1,2,2,1,2\] index=findall(in(1),a) Data=data1.colum1\[index\] CSV.write(“BBBB.csv”,Data) The contents of the aaa. CSV file are as follows …

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

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