# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1959

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

**Page:** 1960

---

## [Best way to generate a julia file full of wrapper functions](https://discourse.julialang.org/t/best-way-to-generate-a-julia-file-full-of-wrapper-functions/26390)

<div class="topic-metadata">

**Author:** [@Deuxis](https://discourse.julialang.org/u/Deuxis)\
**Replies:** 1\
**Last updated:** [July 15, 2019, 10:07pm UTC](https://discourse.julialang.org/t/best-way-to-generate-a-julia-file-full-of-wrapper-functions/26390 "2019-07-15T22:07:02Z")

</div>

I have an API defined in an XML. On the low level it only uses a few simple functions for passing messages, and the entire XML declares higher level functions that should be wrappers around them. How should I generate a …

---

## [Cuda - 2D and 3D grid and block dimensions](https://discourse.julialang.org/t/cuda-2d-and-3d-grid-and-block-dimensions/26392)

<div class="topic-metadata">

**Author:** [@wiktorkujawa](https://discourse.julialang.org/u/wiktorkujawa)\
**Replies:** 1\
**Last updated:** [July 15, 2019, 9:41pm UTC](https://discourse.julialang.org/t/cuda-2d-and-3d-grid-and-block-dimensions/26392 "2019-07-15T21:41:39Z")

</div>

Is in Julia equivalent of CUDA C: dim3 grid( 512 ); // 512 x 1 x 1 dim3 block( 1024, 1024 ); // 1024 x 1024 x 1 ?

---

## [Pkg not defined when building packages even though I did use pkg](https://discourse.julialang.org/t/pkg-not-defined-when-building-packages-even-though-i-did-use-pkg/26371)

<div class="topic-metadata">

**Author:** [@Alexandre\_Chen](https://discourse.julialang.org/u/Alexandre_Chen)\
**Replies:** 6\
**Last updated:** [July 15, 2019, 5:03pm UTC](https://discourse.julialang.org/t/pkg-not-defined-when-building-packages-even-though-i-did-use-pkg/26371 "2019-07-15T17:03:55Z")

</div>

See picture below

---

## [How to use develop --local MyPkg](https://discourse.julialang.org/t/how-to-use-develop-local-mypkg/26384)

<div class="topic-metadata">

**Author:** [@wbhart](https://discourse.julialang.org/u/wbhart)\
**Replies:** 5\
**Last updated:** [July 15, 2019, 4:21pm UTC](https://discourse.julialang.org/t/how-to-use-develop-local-mypkg/26384 "2019-07-15T16:21:25Z")

</div>

I am having a problem with the test suite of AbstractAlgebra hanging on Julia 1.2.0-rc2 before any tests run (it’s fine on earlier versions of Julia; at least the latest version of the repository is fine, but we have a p…

---

## [Seemingly unnecessary code cruft in a compiled higher-order function](https://discourse.julialang.org/t/seemingly-unnecessary-code-cruft-in-a-compiled-higher-order-function/26357)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 9\
**Last updated:** [July 15, 2019, 3:08pm UTC](https://discourse.julialang.org/t/seemingly-unnecessary-code-cruft-in-a-compiled-higher-order-function/26357 "2019-07-15T15:08:53Z")

</div>

Read this post if you care about zero-cost abstractions. This is a test of Julia’s ability to produce highly optimized code for higher-order functions, taking a function as an argument. The two functions are equivalent,…

---

## [@everywhere using FFTW produces "Package FFTW not found in current path"](https://discourse.julialang.org/t/everywhere-using-fftw-produces-package-fftw-not-found-in-current-path/26342)

<div class="topic-metadata">

**Author:** [@egcjm](https://discourse.julialang.org/u/egcjm)\
**Replies:** 3\
**Last updated:** [July 15, 2019, 1:35pm UTC](https://discourse.julialang.org/t/everywhere-using-fftw-produces-package-fftw-not-found-in-current-path/26342 "2019-07-15T13:35:20Z")

</div>

\[This issue has been discussed in various places; unfortunately none of the proposed fixes seems to work for me\]. When executing @everywhere CertainPackages I get an error. As suggested by several I start with: using…

---

## [Logging issue with Juno and Revise](https://discourse.julialang.org/t/logging-issue-with-juno-and-revise/26280)

<div class="topic-metadata">

**Author:** [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Replies:** 3\
**Last updated:** [July 15, 2019, 1:07pm UTC](https://discourse.julialang.org/t/logging-issue-with-juno-and-revise/26280 "2019-07-15T13:07:34Z")

</div>

I’ve created a custom logger, which doesn’t show @debug messages with Revise in Juno. If I include() the source file, it works in the REPL and Juno too. If I includet with Revise, then works in REPL, but not in Juno. l…

---

## [Having trouble to run a file outside the directory](https://discourse.julialang.org/t/having-trouble-to-run-a-file-outside-the-directory/26381)

<div class="topic-metadata">

**Author:** [@tosalonijain](https://discourse.julialang.org/u/tosalonijain)\
**Replies:** 2\
**Last updated:** [July 15, 2019, 12:48pm UTC](https://discourse.julialang.org/t/having-trouble-to-run-a-file-outside-the-directory/26381 "2019-07-15T12:48:57Z")

</div>

I have an internal package that I have developed. Now, I want to use that package in other files. I am doing: include("Package.jl") But even after that I am not able to use the modalities of my package. I am only able …

---

## [No significant performance difference of row- vs column-wise loops](https://discourse.julialang.org/t/no-significant-performance-difference-of-row-vs-column-wise-loops/26382)

<div class="topic-metadata">

**Author:** [@mrVeng](https://discourse.julialang.org/u/mrVeng)\
**Replies:** 2\
**Last updated:** [July 15, 2019, 12:22pm UTC](https://discourse.julialang.org/t/no-significant-performance-difference-of-row-vs-column-wise-loops/26382 "2019-07-15T12:22:50Z")

</div>

Hi everyone, Based on my last question here and from what I understand in the performance tips section, Julia is a column major and I should try to (1) start the most inner loop by column and (2) fill pre-allocated outp…

---

## [How to redirect the output of run to a file](https://discourse.julialang.org/t/how-to-redirect-the-output-of-run-to-a-file/3765)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [July 15, 2019, 12:17pm UTC](https://discourse.julialang.org/t/how-to-redirect-the-output-of-run-to-a-file/3765 "2019-07-15T12:17:20Z")

</div>

MWE: suppose I wanted to do something equivalent to the shell command ls /tmp \> /tmp/list in Julia. I came up with open(io-\>run(pipeline(\`ls /tmp\`, stdout=io)), "/tmp/list", "w") but I fear that I am overcomplicating…

---

## [Trees in Julia](https://discourse.julialang.org/t/trees-in-julia/12173)

<div class="topic-metadata">

**Author:** [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Replies:** 14\
**Last updated:** [July 15, 2019, 11:59am UTC](https://discourse.julialang.org/t/trees-in-julia/12173 "2019-07-15T11:59:31Z")

</div>

Hi Guys! I am new to Julia and am trying to learn by writing some code. So I was trying to implement a tree and get the sum of node of all the elements in the sub-tree given a particular node. Here is my work: struc…

---

## [Vline! with subplots](https://discourse.julialang.org/t/vline-with-subplots/25479)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 2\
**Last updated:** [July 15, 2019, 10:10am UTC](https://discourse.julialang.org/t/vline-with-subplots/25479 "2019-07-15T10:10:58Z")

</div>

Hi- When I try to add vertical lines to subplots, the lines only apply to the first subplot. Is there a way to add vertical lines to each subplot? Here is a MWE: using DataFrames,StatsPlots df = DataFrame(g=rand(1:3,1…

---

## [CuArrays/CUDAnative/CUDAdrv equivalent to cudaMemcpy3DAsync?](https://discourse.julialang.org/t/cuarrays-cudanative-cudadrv-equivalent-to-cudamemcpy3dasync/26182)

<div class="topic-metadata">

**Author:** [@samo](https://discourse.julialang.org/u/samo)\
**Replies:** 10\
**Last updated:** [July 15, 2019, 9:52am UTC](https://discourse.julialang.org/t/cuarrays-cudanative-cudadrv-equivalent-to-cudamemcpy3dasync/26182 "2019-07-15T09:52:59Z")

</div>

What is the CuArrays/CUDAnative/CUDAdrv equivalent to cudaMemcpy3DAsync? More precisely, I am looking for how to do the equivalent of the following CUDA C code, which copies a XZ-plane of a 3-D device array to a contigu…

---

## [How to create cuda streams with different priorities?](https://discourse.julialang.org/t/how-to-create-cuda-streams-with-different-priorities/25791)

<div class="topic-metadata">

**Author:** [@samo](https://discourse.julialang.org/u/samo)\
**Replies:** 11\
**Last updated:** [July 15, 2019, 9:46am UTC](https://discourse.julialang.org/t/how-to-create-cuda-streams-with-different-priorities/25791 "2019-07-15T09:46:34Z")

</div>

Question How can we create (nonblocking) cuda streams with different priorities? That is, how can we do with CuArrays/CUDAnative/CUDAdrv the equivivalent to the following lines of CUDA code? cudaStream\_t streams\[2\]; in…

---

## [Beijing: JuliaCN Annual Workshop 24th August , 2019](https://discourse.julialang.org/t/beijing-juliacn-annual-workshop-24th-august-2019/26379)

<div class="topic-metadata">

**Author:** [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 9:02am UTC](https://discourse.julialang.org/t/beijing-juliacn-annual-workshop-24th-august-2019/26379 "2019-07-15T09:02:06Z")

</div>

I’m pleased to announce our annual workshop this year. The workshop lasts one day on 24th, August in Microsoft building, Zhonguancun, Beijing from 10:30 am to 5:30 pm. JuliaCN is a community driven i18n organization for…

---

## [Parallel feedforward computation with RNN](https://discourse.julialang.org/t/parallel-feedforward-computation-with-rnn/26378)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 8:51am UTC](https://discourse.julialang.org/t/parallel-feedforward-computation-with-rnn/26378 "2019-07-15T08:51:05Z")

</div>

Say you have a sample of 3 observations-label as a training set for a standard fully connected NN. To parallelize the computation of the loss (and the gradient) of each label, you can feed the three observations to the N…

---

## [How to find the centroid of a list of nodes?](https://discourse.julialang.org/t/how-to-find-the-centroid-of-a-list-of-nodes/26354)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 3\
**Last updated:** [July 15, 2019, 8:43am UTC](https://discourse.julialang.org/t/how-to-find-the-centroid-of-a-list-of-nodes/26354 "2019-07-15T08:43:32Z")

</div>

This is probably a naive question. I was a bit confused about this link to find the centroid of a triangle: Program to find the Centroid of the triangle - GeeksforGeeks I was reading a piece of code to calculate the cen…

---

## [Editing an array with multiple threads](https://discourse.julialang.org/t/editing-an-array-with-multiple-threads/25364)

<div class="topic-metadata">

**Author:** [@Ward9250](https://discourse.julialang.org/u/Ward9250)\
**Replies:** 13\
**Last updated:** [July 15, 2019, 8:31am UTC](https://discourse.julialang.org/t/editing-an-array-with-multiple-threads/25364 "2019-07-15T08:31:31Z")

</div>

Is it possible to update the values of an array (of ints) (size is known and fixed in advanced) using multiple threads in a safe way? I can’t partition parts of the array to only be touched by certain threads as any thre…

---

## [\[ANN\] Yao.jl 0.5: Extensible Efficient Quantum Algorithm Design for Humans](https://discourse.julialang.org/t/ann-yao-jl-0-5-extensible-efficient-quantum-algorithm-design-for-humans/26377)

<div class="topic-metadata">

**Author:** [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 8:25am UTC](https://discourse.julialang.org/t/ann-yao-jl-0-5-extensible-efficient-quantum-algorithm-design-for-humans/26377 "2019-07-15T08:25:20Z")

</div>

Yao.jl 0.5 has been released for a while. If you are interested now is the time to try it out! We hope this framework can ease your research in quantum information and please feel free to file us an issue and ask questio…

---

## [Round to multiple of integer](https://discourse.julialang.org/t/round-to-multiple-of-integer/26372)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 1\
**Last updated:** [July 15, 2019, 7:32am UTC](https://discourse.julialang.org/t/round-to-multiple-of-integer/26372 "2019-07-15T07:32:47Z")

</div>

I frequently find it useful to round to multiple of an integer, most commnly 5, powers of 10, and similar. First, I usually use something like round\_to(n, x) = round(Int, x / n) \* n Is there a better implementation? J…

---

## [How to use Userdefined Symbolic function in Julia](https://discourse.julialang.org/t/how-to-use-userdefined-symbolic-function-in-julia/26375)

<div class="topic-metadata">

**Author:** [@Sivakumar](https://discourse.julialang.org/u/Sivakumar)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 7:26am UTC](https://discourse.julialang.org/t/how-to-use-userdefined-symbolic-function-in-julia/26375 "2019-07-15T07:26:14Z")

</div>

I am new to Julia. For my research problem, I have defined a function and try to call in Julia. function dens(x,l) return lexp(-xl) end using SymEngine x = symbols(:x) a = dens(x,5) a1 = mcall(float(m"integrate(de…

---

## [\[ANN\] Introducing IOLogging.jl, a package providing basic logging functionality to IO](https://discourse.julialang.org/t/ann-introducing-iologging-jl-a-package-providing-basic-logging-functionality-to-io/15052)

<div class="topic-metadata">

**Author:** [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Replies:** 1\
**Last updated:** [July 15, 2019, 7:05am UTC](https://discourse.julialang.org/t/ann-introducing-iologging-jl-a-package-providing-basic-logging-functionality-to-io/15052 "2019-07-15T07:05:36Z")

</div>

I’ve been writing this package over the last few weeks as a way to get to know package and publishing mechanics (as well as to provide file logging without having to set it up for each individual project :slight\_smile: )…

---

## [In-memory and large memory compute - and useful Julia features?](https://discourse.julialang.org/t/in-memory-and-large-memory-compute-and-useful-julia-features/26370)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 5:57am UTC](https://discourse.julialang.org/t/in-memory-and-large-memory-compute-and-useful-julia-features/26370 "2019-07-15T05:57:25Z")

</div>

Following the discussion on posits, I would like to explore another topic. Perhaps there is a better place for this, however I do find the community here helpful and ‘sparky’. I Also have probably said the same things i…

---

## [Auto-conversion of keyword arguments, status?](https://discourse.julialang.org/t/auto-conversion-of-keyword-arguments-status/26350)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 2\
**Last updated:** [July 15, 2019, 4:25am UTC](https://discourse.julialang.org/t/auto-conversion-of-keyword-arguments-status/26350 "2019-07-15T04:25:06Z")

</div>

I know there have been some discussions (and issues) about this in the past, but I’m curious what the current position on “auto-conversions for keyword arguments” is. Is that something that will/could be added in future…

---

## [Interpolations.jl: Saving the object](https://discourse.julialang.org/t/interpolations-jl-saving-the-object/26368)

<div class="topic-metadata">

**Author:** [@krenova](https://discourse.julialang.org/u/krenova)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 3:27am UTC](https://discourse.julialang.org/t/interpolations-jl-saving-the-object/26368 "2019-07-15T03:27:47Z")

</div>

Hi, I’m using the Interpolations.jl package to approximate a dynamic programming value function and intend to save the interpolated approximation automatically upon completion of the algorithm with the JLD2 package. I …

---

## [Select elements from each row in a matrix](https://discourse.julialang.org/t/select-elements-from-each-row-in-a-matrix/26326)

<div class="topic-metadata">

**Author:** [@DrChainsaw](https://discourse.julialang.org/u/DrChainsaw)\
**Replies:** 5\
**Last updated:** [July 14, 2019, 10:42pm UTC](https://discourse.julialang.org/t/select-elements-from-each-row-in-a-matrix/26326 "2019-07-14T22:42:10Z")

</div>

Hi, Is there a good way to select/index a set of elements from each row in a matrix, where the selected elements might be different for each row? Through REPL-brute forcing I manged to get this abomination to do what I…

---

## [Function Plot - error message](https://discourse.julialang.org/t/function-plot-error-message/26359)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 1\
**Last updated:** [July 14, 2019, 10:19pm UTC](https://discourse.julialang.org/t/function-plot-error-message/26359 "2019-07-14T22:19:09Z")

</div>

Dear all, I have instaled the Package Gadfly to draw some graphics. I have run: Pkg.add("Gadfly") using Gadfly plot(y=\[1,2,3\]) and a message of error is presented: ERROR: UndefVarError: plot not defined Stacktrace: …

---

## [Dispatch on Value allocating](https://discourse.julialang.org/t/dispatch-on-value-allocating/26337)

<div class="topic-metadata">

**Author:** [@cshenton](https://discourse.julialang.org/u/cshenton)\
**Replies:** 9\
**Last updated:** [July 14, 2019, 9:58pm UTC](https://discourse.julialang.org/t/dispatch-on-value-allocating/26337 "2019-07-14T21:58:57Z")

</div>

I want to provide a function that will value dispatch on a handful of int values (3,4,5). That works fine, but when I wrap that function so that the caller doesn’t have to put in Val(3) when calling there are allocations…

---

## [Problem with plot](https://discourse.julialang.org/t/problem-with-plot/26363)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 1\
**Last updated:** [July 14, 2019, 9:42pm UTC](https://discourse.julialang.org/t/problem-with-plot/26363 "2019-07-14T21:42:00Z")

</div>

Dear all, I have problem to plot figures using the package “Plot”. For example, when I run Pkg.add("Gadfly") using Gadfly plot(\[1,2,3\]) an error messeger appers: julia\> plot(\[1,2,3\]) ERROR: UndefVarError: plot not de…

---

## [Concatening matrix in a loop](https://discourse.julialang.org/t/concatening-matrix-in-a-loop/26347)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 5\
**Last updated:** [July 14, 2019, 7:54pm UTC](https://discourse.julialang.org/t/concatening-matrix-in-a-loop/26347 "2019-07-14T19:54:08Z")

</div>

Dear users, I need to build a matrix using a loop, like this: X = zeros(3,1) for i=1:10 x = rand(3,1) X = \[X x\] end i.e., I need to build the columns of X using a looping. What’s the better way to do its?

[Previous page](https://discourse.julialang.org/latest.md?page=1958)

[Next page](https://discourse.julialang.org/latest.md?page=1960)
