# General Usage

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

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

**Page:** 755

---

## [Monte Carlo particle simulations are very slow](https://discourse.julialang.org/t/monte-carlo-particle-simulations-are-very-slow/39239)

<div class="topic-metadata">

**Author:** [@edwinb-ai](https://discourse.julialang.org/u/edwinb-ai)\
**Replies:** 9\
**Last updated:** [May 11, 2020, 5:15pm UTC](https://discourse.julialang.org/t/monte-carlo-particle-simulations-are-very-slow/39239 "2020-05-11T17:15:40Z")

</div>

Hello everyone, I’m still learning Julia by doing some standard physics simulations in Julia. I used to have all of my code base in C and Fortran, and just recently attempted to migrate everything to Julia. In particul…

---

## [Help on Live Plotting data which are getting appended to file(.txt)](https://discourse.julialang.org/t/help-on-live-plotting-data-which-are-getting-appended-to-file-txt/39224)

<div class="topic-metadata">

**Author:** [@Fringe](https://discourse.julialang.org/u/Fringe)\
**Replies:** 2\
**Last updated:** [May 11, 2020, 5:44pm UTC](https://discourse.julialang.org/t/help-on-live-plotting-data-which-are-getting-appended-to-file-txt/39224 "2020-05-11T17:44:55Z")

</div>

I am very new to Julia, I have a question for the experts, currently, I am appending bunch of data to a text file using c++ , the data is just numbers separated by comma and i just keep apending more numbers in new line…

---

## [Dynamic reloading of Objects using Revise or Cassette?](https://discourse.julialang.org/t/dynamic-reloading-of-objects-using-revise-or-cassette/38018)

<div class="topic-metadata">

**Author:** [@Amval](https://discourse.julialang.org/u/Amval)\
**Replies:** 3\
**Last updated:** [May 11, 2020, 4:20pm UTC](https://discourse.julialang.org/t/dynamic-reloading-of-objects-using-revise-or-cassette/38018 "2020-05-11T16:20:04Z")

</div>

Hello all, I need help to find a strategy to speed up my development process. I have written a framework in Julia, which I use for writing conversational agents. Whenever I am working on the framework code, everything …

---

## [Any benchmark about memory consumption?](https://discourse.julialang.org/t/any-benchmark-about-memory-consumption/17270)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 11\
**Last updated:** [May 11, 2020, 4:02pm UTC](https://discourse.julialang.org/t/any-benchmark-about-memory-consumption/17270 "2020-05-11T16:02:36Z")

</div>

There are some benchmarks testing the time to compute several tasks compared to other languages. But what about memory consumption? For example how well does Julia reshape a dataset from long to wide format compared to…

---

## [Why get(A) involves allocation?](https://discourse.julialang.org/t/why-get-a-involves-allocation/39145)

<div class="topic-metadata">

**Author:** [@vinhphunguyen](https://discourse.julialang.org/u/vinhphunguyen)\
**Replies:** 5\
**Last updated:** [May 11, 2020, 3:07pm UTC](https://discourse.julialang.org/t/why-get-a-involves-allocation/39145 "2020-05-11T15:07:04Z")

</div>

Hi all, Could u please explain why get(A) where A is a matrix involves allocation? The code is: julia\> a=ones(3,3) 3×3 Array{Float64,2}: 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 julia\> function f(a) return …

---

## [Can not cahnge variables defined in an external file](https://discourse.julialang.org/t/can-not-cahnge-variables-defined-in-an-external-file/39214)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 7\
**Last updated:** [May 11, 2020, 2:40pm UTC](https://discourse.julialang.org/t/can-not-cahnge-variables-defined-in-an-external-file/39214 "2020-05-11T14:40:45Z")

</div>

Let us assume that I define some variables in a separate file “input.jl”. For example, let the content of “input.jl” be a = 123.0 Then, I want to use the name of this file as an input parameter to dynamically load the…

---

## [How to use matplotlib in julia? without using python backend?](https://discourse.julialang.org/t/how-to-use-matplotlib-in-julia-without-using-python-backend/39270)

<div class="topic-metadata">

**Author:** [@Neeraj\_Verma\_ASETRAI](https://discourse.julialang.org/u/Neeraj_Verma_ASETRAI)\
**Replies:** 2\
**Last updated:** [May 11, 2020, 12:39pm UTC](https://discourse.julialang.org/t/how-to-use-matplotlib-in-julia-without-using-python-backend/39270 "2020-05-11T12:39:01Z")

</div>

How i can use matplotlib graph plotting tool with julia native without using any python backend? please help me out…

---

## [Can't iterate over an AbstractArray with custom indexing?](https://discourse.julialang.org/t/cant-iterate-over-an-abstractarray-with-custom-indexing/39269)

<div class="topic-metadata">

**Author:** [@chelate](https://discourse.julialang.org/u/chelate)\
**Replies:** 2\
**Last updated:** [May 11, 2020, 9:35am UTC](https://discourse.julialang.org/t/cant-iterate-over-an-abstractarray-with-custom-indexing/39269 "2020-05-11T09:35:38Z")

</div>

So (like many other physicists trying out Julia), I went and tried to build a spherical tensor type where the size L is a type parameter and indexing runs from -L: L. I followed the manual and defined an abstract unit ra…

---

## [Gtk.jl and webkit](https://discourse.julialang.org/t/gtk-jl-and-webkit/39208)

<div class="topic-metadata">

**Author:** [@Carlos\_Werner](https://discourse.julialang.org/u/Carlos_Werner)\
**Replies:** 1\
**Last updated:** [May 11, 2020, 8:54am UTC](https://discourse.julialang.org/t/gtk-jl-and-webkit/39208 "2020-05-11T08:54:38Z")

</div>

The gtk.jl package supports webkit If it does, someone can show you an example ?

---

## [Is it possible to use julia in windows subsystem for linux in juno?](https://discourse.julialang.org/t/is-it-possible-to-use-julia-in-windows-subsystem-for-linux-in-juno/11510)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 2\
**Last updated:** [May 11, 2020, 6:42am UTC](https://discourse.julialang.org/t/is-it-possible-to-use-julia-in-windows-subsystem-for-linux-in-juno/11510 "2020-05-11T06:42:58Z")

</div>

I recently switched back to windows due to various reasons. However, I miss the feeling of using julia under linux. Now that windows subsystem for linux (WSL) is quite stable now. Is it possible to use julia in WSL in ju…

---

## [How to use Juno and Julia to develop a project?](https://discourse.julialang.org/t/how-to-use-juno-and-julia-to-develop-a-project/39225)

<div class="topic-metadata">

**Author:** [@Laszlo\_Nagy](https://discourse.julialang.org/u/Laszlo_Nagy)\
**Replies:** 8\
**Last updated:** [May 11, 2020, 4:58am UTC](https://discourse.julialang.org/t/how-to-use-juno-and-julia-to-develop-a-project/39225 "2020-05-11T04:58:39Z")

</div>

I’m about to write my first (test) project with Julia. I have installed Juno and , because I saw that is the “standard” for development. I have entered examples from the official Julia documentation into a REPL prompt so…

---

## [Documenter handling Internal (private) modules](https://discourse.julialang.org/t/documenter-handling-internal-private-modules/39242)

<div class="topic-metadata">

**Author:** [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Replies:** 1\
**Last updated:** [May 11, 2020, 3:38am UTC](https://discourse.julialang.org/t/documenter-handling-internal-private-modules/39242 "2020-05-11T03:38:23Z")

</div>

I am working on the documentation for module that mostly just bridges the gap between Julia and a C library. There are two methods that I expose that are fully written in Julia because they do not have a counterpart in …

---

## [Why is the parallel map so slow?](https://discourse.julialang.org/t/why-is-the-parallel-map-so-slow/39250)

<div class="topic-metadata">

**Author:** [@Tofi](https://discourse.julialang.org/u/Tofi)\
**Replies:** 2\
**Last updated:** [May 10, 2020, 11:49pm UTC](https://discourse.julialang.org/t/why-is-the-parallel-map-so-slow/39250 "2020-05-10T23:49:57Z")

</div>

I have an array a defined as: julia\> a = collect(1:10000) I can map a squaring function over the array and time the execution as following: julia\> @time map((x)-\>x^2, a) On my machine, the line above runs in 0.05 sec…

---

## [Why accessing a Float property allocates memory?](https://discourse.julialang.org/t/why-accessing-a-float-property-allocates-memory/39235)

<div class="topic-metadata">

**Author:** [@emancu](https://discourse.julialang.org/u/emancu)\
**Replies:** 2\
**Last updated:** [May 10, 2020, 7:01pm UTC](https://discourse.julialang.org/t/why-accessing-a-float-property-allocates-memory/39235 "2020-05-10T19:01:14Z")

</div>

Hello community! I’m running a simulation which requires millions of iterations, and the memory consumption (even temporary) is huge and I would like to reduce it. Pursuing this, I found something that I wasn’t expectin…

---

## [Manipulating expressions with macros](https://discourse.julialang.org/t/manipulating-expressions-with-macros/39229)

<div class="topic-metadata">

**Author:** [@Jollywatt](https://discourse.julialang.org/u/Jollywatt)\
**Replies:** 1\
**Last updated:** [May 10, 2020, 2:46pm UTC](https://discourse.julialang.org/t/manipulating-expressions-with-macros/39229 "2020-05-10T14:46:28Z")

</div>

Hi. I’m having trouble defining a macro which manipulates expressions containing $’s. It’s best illustrated by example: Is it possible to define a macro @newrule such that for op ∈ (+, -) @newrule $op(a, 0) =\> a end e…

---

## [Julia deep learning library which supports array mutation?](https://discourse.julialang.org/t/julia-deep-learning-library-which-supports-array-mutation/39215)

<div class="topic-metadata">

**Author:** [@DeepQ](https://discourse.julialang.org/u/DeepQ)\
**Replies:** 4\
**Last updated:** [May 10, 2020, 12:24pm UTC](https://discourse.julialang.org/t/julia-deep-learning-library-which-supports-array-mutation/39215 "2020-05-10T12:24:15Z")

</div>

I am searching for a Julia deep learning library which supports array mutation so I don’t need to store the arrays in a buffer.

---

## [Improve perfromance of DifferentialEquations, when odefun is evaluated repeatedly and many timepoints are required](https://discourse.julialang.org/t/improve-perfromance-of-differentialequations-when-odefun-is-evaluated-repeatedly-and-many-timepoints-are-required/39110)

<div class="topic-metadata">

**Author:** [@user22](https://discourse.julialang.org/u/user22)\
**Replies:** 8\
**Last updated:** [May 10, 2020, 8:05am UTC](https://discourse.julialang.org/t/improve-perfromance-of-differentialequations-when-odefun-is-evaluated-repeatedly-and-many-timepoints-are-required/39110 "2020-05-10T08:05:05Z")

</div>

Is it possible to improve the performance of an ODE system solving, if we have to evaluate the equation many times with different parameters (not in a Monte Carlo manner, but sequentially), and if we want to evaluate par…

---

## [Syntax for import from parent module](https://discourse.julialang.org/t/syntax-for-import-from-parent-module/434)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [May 10, 2020, 7:24am UTC](https://discourse.julialang.org/t/syntax-for-import-from-parent-module/434 "2020-05-10T07:24:48Z")

</div>

consider this MWE: module Foo macro id(expr) expr end module Bar import Foo: @id # how to refer to parent here without naming it? @id(1+1) end end Is it possible to import a symbol from the parent modul…

---

## [Deploying a website with Franklin](https://discourse.julialang.org/t/deploying-a-website-with-franklin/38930)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 9\
**Last updated:** [May 10, 2020, 7:24am UTC](https://discourse.julialang.org/t/deploying-a-website-with-franklin/38930 "2020-05-10T07:24:10Z")

</div>

I am deploying a website with Franklin.jl on my own web server instead of using GitHub. When I use serve() with Franklin and view the website on localhost, it appears correctly. However, when I deploy the \_\_site folder…

---

## [How do I pass Optim.Options(...) to DiffEqFlux.sciml\_train(...)](https://discourse.julialang.org/t/how-do-i-pass-optim-options-to-diffeqflux-sciml-train/39127)

<div class="topic-metadata">

**Author:** [@Matthew\_Overlin](https://discourse.julialang.org/u/Matthew_Overlin)\
**Replies:** 1\
**Last updated:** [May 10, 2020, 6:22am UTC](https://discourse.julialang.org/t/how-do-i-pass-optim-options-to-diffeqflux-sciml-train/39127 "2020-05-10T06:22:29Z")

</div>

I am using DiffEqFlux to train neural ODEs. Following the example at this link, I am using the function DiffEqFlux.scil\_train to train the neural network. I’d like to pass/customize some things with the optimizer. For…

---

## [Identical dependency being replaced while importing packages](https://discourse.julialang.org/t/identical-dependency-being-replaced-while-importing-packages/39209)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [May 10, 2020, 5:09am UTC](https://discourse.julialang.org/t/identical-dependency-being-replaced-while-importing-packages/39209 "2020-05-10T05:09:19Z")

</div>

I am facing an issue that seems to have cropped up suddenly. I am trying to import the packages JLD2 and NamedArrays on a HPC cluster (not sure if this is relevant), and they seem to clash over DataStructures. I’m not su…

---

## [Error converting from a DataFrames.DataFrame to a Pandas.Dataframe](https://discourse.julialang.org/t/error-converting-from-a-dataframes-dataframe-to-a-pandas-dataframe/39162)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 5\
**Last updated:** [May 10, 2020, 1:52am UTC](https://discourse.julialang.org/t/error-converting-from-a-dataframes-dataframe-to-a-pandas-dataframe/39162 "2020-05-10T01:52:04Z")

</div>

I have a pretty large DataFrames.jl dataframe that I am using for some data simulations. However, I need to pass the data back to python for some visualizations and @tkf suggested that I convert the DataFrames DataFrame …

---

## [Makie doesn't display plot when using a custom Julia sysimage](https://discourse.julialang.org/t/makie-doesnt-display-plot-when-using-a-custom-julia-sysimage/38515)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 3\
**Last updated:** [May 10, 2020, 1:39am UTC](https://discourse.julialang.org/t/makie-doesnt-display-plot-when-using-a-custom-julia-sysimage/38515 "2020-05-10T01:39:00Z")

</div>

I created a custom system image using the VSCode sysimage feature. Makie plots display fine when I run in a Julia repl that is not started with the sysimage. But I only get text output when drawing Makie plots in a Juli…

---

## [Benchmark Kuramoto-Sivashinsky DiffEq](https://discourse.julialang.org/t/benchmark-kuramoto-sivashinsky-diffeq/39196)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 1\
**Last updated:** [May 10, 2020, 1:38am UTC](https://discourse.julialang.org/t/benchmark-kuramoto-sivashinsky-diffeq/39196 "2020-05-10T01:38:13Z")

</div>

Hello, I have been looking at the notebook KS FDM Work-Precision Diagrams that solves the Kuramot-Sivashinsky (KS) problem with finite differences. The 1D equation is: \\frac{\\partial u}{\\partial t} + u \\frac{\\partial…

---

## [\`Base.accumulate\`, but with initial value](https://discourse.julialang.org/t/base-accumulate-but-with-initial-value/39203)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 3\
**Last updated:** [May 10, 2020, 1:24am UTC](https://discourse.julialang.org/t/base-accumulate-but-with-initial-value/39203 "2020-05-10T01:24:50Z")

</div>

Base.accumulate satisfies length(accumulate(op, input)) == length(input) I’m looking for a very similar function that satisfies length(accumulate(op, input; \[init\])) == length(input) + 1 and isequal(last(accumulate′…

---

## [Alternative to reading m4a files](https://discourse.julialang.org/t/alternative-to-reading-m4a-files/39194)

<div class="topic-metadata">

**Author:** [@bafonso](https://discourse.julialang.org/u/bafonso)\
**Replies:** 2\
**Last updated:** [May 9, 2020, 11:53pm UTC](https://discourse.julialang.org/t/alternative-to-reading-m4a-files/39194 "2020-05-09T23:53:51Z")

</div>

I am currently having another go at Julia and decided to do a small project working on audio data. Currently running into the situation of not being able to read m4a files. These are coming from my OSX setup and I am doi…

---

## [Fused ternary operator?](https://discourse.julialang.org/t/fused-ternary-operator/3067)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 6\
**Last updated:** [May 9, 2020, 9:40pm UTC](https://discourse.julialang.org/t/fused-ternary-operator/3067 "2020-05-09T21:40:03Z")

</div>

Am I right there’s no “easy” way to broadcast the ternary operator? E.g. x = \[0,1,2\] @. x==0 ? 0. : 1/x #this doesn't work Of course, its easy enough to write the code yourself, broadcast(x-\>(x==0 ? 0. : 1/x), \[0,1,…

---

## [Revise cannot transform my dataset](https://discourse.julialang.org/t/revise-cannot-transform-my-dataset/39177)

<div class="topic-metadata">

**Author:** [@chedieck](https://discourse.julialang.org/u/chedieck)\
**Replies:** 23\
**Last updated:** [May 9, 2020, 9:17pm UTC](https://discourse.julialang.org/t/revise-cannot-transform-my-dataset/39177 "2020-05-09T21:17:58Z")

</div>

I am trying to solve the “Predict Data Sales” on kaggle, using the DataFrames, Plots and CSV packages. Here is my code, named processdata.jl, so far: @time using CSV, DataFrames, Plots println("finished importing") # # …

---

## [Access to content of object in Julia](https://discourse.julialang.org/t/access-to-content-of-object-in-julia/39195)

<div class="topic-metadata">

**Author:** [@sergevic](https://discourse.julialang.org/u/sergevic)\
**Replies:** 2\
**Last updated:** [May 9, 2020, 8:06pm UTC](https://discourse.julialang.org/t/access-to-content-of-object-in-julia/39195 "2020-05-09T20:06:26Z")

</div>

How can I display the names of elements stored in an object in Julia? For example, in R, we have the command names() which displays the names of those elements. In Julia, the command eigen(A) stores the eigenvalues in va…

---

## [Future-proof way to save and load data](https://discourse.julialang.org/t/future-proof-way-to-save-and-load-data/39148)

<div class="topic-metadata">

**Author:** [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Replies:** 12\
**Last updated:** [May 9, 2020, 4:06pm UTC](https://discourse.julialang.org/t/future-proof-way-to-save-and-load-data/39148 "2020-05-09T16:06:19Z")

</div>

I’m frustrated with JLD2, which I thought was the way to save/load data, but it’s reconstructed types aren’t playing well with my types. But I just ran across a post from a year ago suggesting JLD2 is effectively abando…

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

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