# General Usage

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

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

**Page:** 905

---

## [Converting Array of Named Tuples to DataFrames](https://discourse.julialang.org/t/converting-array-of-named-tuples-to-dataframes/19378)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 3\
**Last updated:** [January 8, 2019, 10:31am UTC](https://discourse.julialang.org/t/converting-array-of-named-tuples-to-dataframes/19378 "2019-01-08T10:31:21Z")

</div>

I have an array of NamedTuples that I populate in a for loop. Eventually, I want to convert it to a DataFrame. If I initialize the array as NamedTuple\[ \], the conversion fails. However, initializing as Any\[ \] works, but …

---

## [Plotting multiple traces on a single plot in IJulia/Jupyter using a loop](https://discourse.julialang.org/t/plotting-multiple-traces-on-a-single-plot-in-ijulia-jupyter-using-a-loop/19315)

<div class="topic-metadata">

**Author:** [@jleman](https://discourse.julialang.org/u/jleman)\
**Replies:** 10\
**Last updated:** [January 8, 2019, 6:58am UTC](https://discourse.julialang.org/t/plotting-multiple-traces-on-a-single-plot-in-ijulia-jupyter-using-a-loop/19315 "2019-01-08T06:58:38Z")

</div>

Does any know how to add multiple traces to a plot in Jupyter? The following code works fine in Juno. It generates a series of offset sine waves in the same plot. using GR x=collect(0:0.1:2pi) y=sin.(x) plot(x,y) f…

---

## [@less does not work on stdlib?](https://discourse.julialang.org/t/less-does-not-work-on-stdlib/19368)

<div class="topic-metadata">

**Author:** [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)\
**Replies:** 1\
**Last updated:** [January 8, 2019, 12:56am UTC](https://discourse.julialang.org/t/less-does-not-work-on-stdlib/19368 "2019-01-08T00:56:04Z")

</div>

julia\> using LinearAlgebra julia\> @less rank(rand(2,2)) /buildworker/worker/package\_linux64/build/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/generic.jl: Aucun fichier ou dossier de ce type ERROR: failed process: Proc…

---

## [Cannot add packages (maybe due to corporate firewall?)](https://discourse.julialang.org/t/cannot-add-packages-maybe-due-to-corporate-firewall/19352)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 6\
**Last updated:** [January 7, 2019, 9:31pm UTC](https://discourse.julialang.org/t/cannot-add-packages-maybe-due-to-corporate-firewall/19352 "2019-01-07T21:31:03Z")

</div>

I have successfully built Julia 1.2 on my work computer (macOS 10.14.2 Mojave), but cannot add packages. These are the messages I get: julia\> VERSION v"1.2.0-DEV.93" (v1.2) pkg\> add BenchmarkTools Cloning default r…

---

## [Latest version (1.0.1) of TensorOperations.jl on JuliaBox](https://discourse.julialang.org/t/latest-version-1-0-1-of-tensoroperations-jl-on-juliabox/19365)

<div class="topic-metadata">

**Author:** [@Snir\_Gazit](https://discourse.julialang.org/u/Snir_Gazit)\
**Replies:** 0\
**Last updated:** [January 7, 2019, 8:56pm UTC](https://discourse.julialang.org/t/latest-version-1-0-1-of-tensoroperations-jl-on-juliabox/19365 "2019-01-07T20:56:16Z")

</div>

Hi, This might be specific to TensorOperations.jl, but trying to add it JuliaBox installs an older version (v0.7.1) Pkg.add("TensorOperations") Resolving package versions... Updating ~/.julia/Project.toml \[6aa20fa7\]…

---

## [Interpolation of callbacks is slow and blows up memory in DifferentialEquations.jl](https://discourse.julialang.org/t/interpolation-of-callbacks-is-slow-and-blows-up-memory-in-differentialequations-jl/19251)

<div class="topic-metadata">

**Author:** [@michaelkyu](https://discourse.julialang.org/u/michaelkyu)\
**Replies:** 4\
**Last updated:** [January 7, 2019, 9:20am UTC](https://discourse.julialang.org/t/interpolation-of-callbacks-is-slow-and-blows-up-memory-in-differentialequations-jl/19251 "2019-01-07T09:20:17Z")

</div>

I’ve found that the interpolation in the Callbacks interface of DifferentialEquations.jl can slow down performance and blow up the memory allocations. To demonstrate, I’ll use the cosine/sine example from the Callbacks…

---

## [Metaprogramming: adding an arg to a function](https://discourse.julialang.org/t/metaprogramming-adding-an-arg-to-a-function/19262)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 10\
**Last updated:** [January 7, 2019, 9:01am UTC](https://discourse.julialang.org/t/metaprogramming-adding-an-arg-to-a-function/19262 "2019-01-07T09:01:57Z")

</div>

Julia 1.0. Me and metaprogramming, I don’t know, I am real slow at this! I want to write a macro that, given a function definition function f(x,y) do something end will generate function f(store,x,y) do something do…

---

## [Is there an API to get a Broadcasted object from a dotted expression without materialization?](https://discourse.julialang.org/t/is-there-an-api-to-get-a-broadcasted-object-from-a-dotted-expression-without-materialization/19339)

<div class="topic-metadata">

**Author:** [@tkf](https://discourse.julialang.org/u/tkf)\
**Replies:** 2\
**Last updated:** [January 7, 2019, 3:07am UTC](https://discourse.julialang.org/t/is-there-an-api-to-get-a-broadcasted-object-from-a-dotted-expression-without-materialization/19339 "2019-01-07T03:07:11Z")

</div>

I’m looking for an API, say a macro @broadcasted, to do: julia\> bc = @broadcasted f.(a, g.(b, h.(c))) Base.Broadcast.Broadcasted(....) such that julia\> Base.materialize(bc) == f.(a, g.(b, h.(c))) true I guess I can w…

---

## [What is the best way to regroup the ones to the most right of every nibbles in a UInt?](https://discourse.julialang.org/t/what-is-the-best-way-to-regroup-the-ones-to-the-most-right-of-every-nibbles-in-a-uint/18116)

<div class="topic-metadata">

**Author:** [@rapasite](https://discourse.julialang.org/u/rapasite)\
**Replies:** 7\
**Last updated:** [January 6, 2019, 11:57pm UTC](https://discourse.julialang.org/t/what-is-the-best-way-to-regroup-the-ones-to-the-most-right-of-every-nibbles-in-a-uint/18116 "2019-01-06T23:57:53Z")

</div>

Deleting both “binary gaps” and “leading zeros” for every nibbles of Integer’s binary representation,(packing the ones, bits packing,deleting/removing zeros in the middle). example: #Let's take N a {UInt32} N=0xa1c7bf2…

---

## [Combining @pure and @inline](https://discourse.julialang.org/t/combining-pure-and-inline/19331)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 1\
**Last updated:** [January 6, 2019, 9:16pm UTC](https://discourse.julialang.org/t/combining-pure-and-inline/19331 "2019-01-06T21:16:24Z")

</div>

If I use @pure, would @inline be superfluous? If not, in which order should they be used? @pure @inline or @inline @pure

---

## [Where is history (of wirking) file of Julia (on my mochine)?](https://discourse.julialang.org/t/where-is-history-of-wirking-file-of-julia-on-my-mochine/8954)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 3\
**Last updated:** [January 6, 2019, 6:53pm UTC](https://discourse.julialang.org/t/where-is-history-of-wirking-file-of-julia-on-my-mochine/8954 "2019-01-06T18:53:17Z")

</div>

Where is history (of wirking) file of Julia (on my mochine) ? Paul

---

## [Help to reduce number of allocations](https://discourse.julialang.org/t/help-to-reduce-number-of-allocations/19308)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 23\
**Last updated:** [January 6, 2019, 6:28pm UTC](https://discourse.julialang.org/t/help-to-reduce-number-of-allocations/19308 "2019-01-06T18:28:08Z")

</div>

Hi guys, I need to store something like 6000 18x18 matrices. Maybe there is nothing more to do, but maybe someone can help me to reduce the number of allocations to increase the performance! Here is a simplified version…

---

## [Support wanted/needed for alternative platforms? E.g. Haiku, what's needed?](https://discourse.julialang.org/t/support-wanted-needed-for-alternative-platforms-e-g-haiku-whats-needed/19279)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 2\
**Last updated:** [January 6, 2019, 12:29am UTC](https://discourse.julialang.org/t/support-wanted-needed-for-alternative-platforms-e-g-haiku-whats-needed/19279 "2019-01-06T00:29:27Z")

</div>

My “issue” was closed (I’m ok with that; and was ok with open just as a tracker/discussion on what’s needed) with: This is better suited for discourse. I don’t think this is the right place to bring up these platform…

---

## [No problem with more than 500 @assert statements in v1.0.3?](https://discourse.julialang.org/t/no-problem-with-more-than-500-assert-statements-in-v1-0-3/19255)

<div class="topic-metadata">

**Author:** [@peters](https://discourse.julialang.org/u/peters)\
**Replies:** 16\
**Last updated:** [January 6, 2019, 4:05pm UTC](https://discourse.julialang.org/t/no-problem-with-more-than-500-assert-statements-in-v1-0-3/19255 "2019-01-06T16:05:10Z")

</div>

I searched the Julia language repository (v1.0.3) with “@assert” and found more than 500 cases. It was surprising to me that the released code base has such a large number of @assert statements. According to my understan…

---

## [Metaprogramming: Passing an expression as a variable](https://discourse.julialang.org/t/metaprogramming-passing-an-expression-as-a-variable/19271)

<div class="topic-metadata">

**Author:** [@Fjedor](https://discourse.julialang.org/u/Fjedor)\
**Replies:** 9\
**Last updated:** [January 6, 2019, 3:23pm UTC](https://discourse.julialang.org/t/metaprogramming-passing-an-expression-as-a-variable/19271 "2019-01-06T15:23:14Z")

</div>

Hey guys, this is my first ever post on here so please don’t mind if I do something wrong. Currently I am trying to wrap my head around macros and how to use them and what is possible and what is not. So what I want to…

---

## [Efficient custom dict for mostly same types](https://discourse.julialang.org/t/efficient-custom-dict-for-mostly-same-types/19269)

<div class="topic-metadata">

**Author:** [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Replies:** 9\
**Last updated:** [January 6, 2019, 1:54pm UTC](https://discourse.julialang.org/t/efficient-custom-dict-for-mostly-same-types/19269 "2019-01-06T13:54:25Z")

</div>

I have the following setup, which basically creates a linked-list-type A, wich contains some parametric type B: struct B{T} val::T end struct A{T\<:B} parent::A{T} x::T A{T}() where T = new() A(paren…

---

## [OS X - My Julia / Atom Install](https://discourse.julialang.org/t/os-x-my-julia-atom-install/19324)

<div class="topic-metadata">

**Author:** [@Vijay\_Rao](https://discourse.julialang.org/u/Vijay_Rao)\
**Replies:** 0\
**Last updated:** [January 6, 2019, 1:41pm UTC](https://discourse.julialang.org/t/os-x-my-julia-atom-install/19324 "2019-01-06T13:41:36Z")

</div>

This was my experience with Atom 1.33.1 & Julia 1.0.3. . Posting this here in case someone encounters similar errors. (On Ubuntu , all this was painless, its on OS X that I needed the work arounds) Installing Julia v…

---

## [No typeinference for object call syntax](https://discourse.julialang.org/t/no-typeinference-for-object-call-syntax/19322)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 2\
**Last updated:** [January 6, 2019, 1:30pm UTC](https://discourse.julialang.org/t/no-typeinference-for-object-call-syntax/19322 "2019-01-06T13:30:37Z")

</div>

I have problems getting type-inference to work when replacing a function with a function object. The purpose is to add an extra AbstractType to improve dispatch. However nothing I tried so far works. Any help is highly…

---

## [Private Properties in Julia 0.7](https://discourse.julialang.org/t/private-properties-in-julia-0-7/10785)

<div class="topic-metadata">

**Author:** [@jandehaan](https://discourse.julialang.org/u/jandehaan)\
**Replies:** 4\
**Last updated:** [January 6, 2019, 11:27am UTC](https://discourse.julialang.org/t/private-properties-in-julia-0-7/10785 "2019-01-06T11:27:52Z")

</div>

Julia 0.7 supports method propertynames(x, private=false) The latest documentation for that method reads ‘‘propertynames(x) may return only “public” property names that are part of the documented interface of x. If you…

---

## [NA-ignoring aggregations](https://discourse.julialang.org/t/na-ignoring-aggregations/19120)

<div class="topic-metadata">

**Author:** [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Replies:** 15\
**Last updated:** [January 5, 2019, 8:32pm UTC](https://discourse.julialang.org/t/na-ignoring-aggregations/19120 "2019-01-05T20:32:38Z")

</div>

I often find myself in a need of aggregation functions which skip NA-like values, e.g. NaN or missing or nothing. There doesn’t seem to be a package yet providing even basic functions like sum, mean, median etc, so I rol…

---

## [What is the best way to design a long computation?](https://discourse.julialang.org/t/what-is-the-best-way-to-design-a-long-computation/19290)

<div class="topic-metadata">

**Author:** [@aortizb](https://discourse.julialang.org/u/aortizb)\
**Replies:** 8\
**Last updated:** [January 5, 2019, 4:16pm UTC](https://discourse.julialang.org/t/what-is-the-best-way-to-design-a-long-computation/19290 "2019-01-05T16:16:58Z")

</div>

In the context of the development of a finite element code, I have a dictionary that is formed after reading an input data file containing the finite element mesh (that is, nodal coordinates and element connectivity). I …

---

## [Deploying Julia on AWS Elastic Beanstalk](https://discourse.julialang.org/t/deploying-julia-on-aws-elastic-beanstalk/19215)

<div class="topic-metadata">

**Author:** [@Seanny123](https://discourse.julialang.org/u/Seanny123)\
**Replies:** 1\
**Last updated:** [January 5, 2019, 3:27pm UTC](https://discourse.julialang.org/t/deploying-julia-on-aws-elastic-beanstalk/19215 "2019-01-05T15:27:08Z")

</div>

Given my difficulties deploying Julia with AWS Lambda, I’m trying to deploy on Elastic Beanstalk. From what I understand, there appears to be two options for deployment: Create a custom image using Packer. Create a cus…

---

## [SharedArrays. Stability](https://discourse.julialang.org/t/sharedarrays-stability/19304)

<div class="topic-metadata">

**Author:** [@xanfus](https://discourse.julialang.org/u/xanfus)\
**Replies:** 2\
**Last updated:** [January 5, 2019, 2:39pm UTC](https://discourse.julialang.org/t/sharedarrays-stability/19304 "2019-01-05T14:39:09Z")

</div>

I’ve conducted package upgrade from official repositories on 21 Dec. I ran Julia v0.7.0 and i’d noticed one of my SharedArray’s had returned procs(S)=Int64\[0\]. I’d migrated to Julia v1.0.3. Same thing. I’d put @info’s a…

---

## [Which is the right way to integrate Julia program with Node.js](https://discourse.julialang.org/t/which-is-the-right-way-to-integrate-julia-program-with-node-js/19223)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 4\
**Last updated:** [January 5, 2019, 1:18pm UTC](https://discourse.julialang.org/t/which-is-the-right-way-to-integrate-julia-program-with-node-js/19223 "2019-01-05T13:18:46Z")

</div>

I have some algorithms developed in Python. The algorithms monitoring the movement of about 1000 ships in the port and calculate the risk, which will be used for industrial purpose. I am planning to rewrite the algorith…

---

## [What can cause corrupt output files?](https://discourse.julialang.org/t/what-can-cause-corrupt-output-files/19300)

<div class="topic-metadata">

**Author:** [@LeoK987](https://discourse.julialang.org/u/LeoK987)\
**Replies:** 2\
**Last updated:** [January 5, 2019, 10:16am UTC](https://discourse.julialang.org/t/what-can-cause-corrupt-output-files/19300 "2019-01-05T10:16:36Z")

</div>

Recently, I was battling with corrupt output files. One of my routines prints out data to files with either println, or lately (when I was battling with the issue) with CSV.write. In both ways, I got corrupt files occas…

---

## [Overload ifthen](https://discourse.julialang.org/t/overload-ifthen/19295)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 2\
**Last updated:** [January 5, 2019, 6:19am UTC](https://discourse.julialang.org/t/overload-ifthen/19295 "2019-01-05T06:19:27Z")

</div>

In julia 0.7, I had overloaded Base.ifelse(cond::𝕓,a::∂𝕣{N},b::𝕣) where{N} = cond ? a : ∂𝕣{N}(b) Base.ifelse(cond::𝕓,a::𝕣,b::∂𝕣{N}) where{N} = cond ? ∂𝕣{N}(a) : b essentialy so that x=cond ? a : b wou…

---

## [Mixing threads with \`pmap\` and \`addprocs\`](https://discourse.julialang.org/t/mixing-threads-with-pmap-and-addprocs/19293)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 0\
**Last updated:** [January 5, 2019, 5:05am UTC](https://discourse.julialang.org/t/mixing-threads-with-pmap-and-addprocs/19293 "2019-01-05T05:05:34Z")

</div>

I am new to memory-shared parallelism and need some pointers on moving forward with a project. The setup is a high performance cluster with 18 nodes, 32 cores per node with hyperthreading enabled (32 logical cores = 64 …

---

## [Issue: no way to include only once.](https://discourse.julialang.org/t/issue-no-way-to-include-only-once/19289)

<div class="topic-metadata">

**Author:** [@houd1ni](https://discourse.julialang.org/u/houd1ni)\
**Replies:** 1\
**Last updated:** [January 5, 2019, 2:24am UTC](https://discourse.julialang.org/t/issue-no-way-to-include-only-once/19289 "2019-01-05T02:24:22Z")

</div>

https://github.com/JuliaLang/julia/issues/30597 Hi all! After the last reply I still cannot just import without include. And include several times (per each Storage.) going into the same. Also, is there a way to have…

---

## [Performance of generator expressions and higher order functions](https://discourse.julialang.org/t/performance-of-generator-expressions-and-higher-order-functions/19189)

<div class="topic-metadata">

**Author:** [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Replies:** 7\
**Last updated:** [January 4, 2019, 11:56pm UTC](https://discourse.julialang.org/t/performance-of-generator-expressions-and-higher-order-functions/19189 "2019-01-04T23:56:15Z")

</div>

Hello, while trying to optimize some Julia code I wrote, I encountered several performance issues all following the same kind of pattern, related to using higher-order functions and generator expressions nested within a…

---

## [Displaying Output with Scripts](https://discourse.julialang.org/t/displaying-output-with-scripts/19285)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 2\
**Last updated:** [January 4, 2019, 10:06pm UTC](https://discourse.julialang.org/t/displaying-output-with-scripts/19285 "2019-01-04T22:06:10Z")

</div>

I sometimes run long Julia jobs on a cluster. While my code has println statements in it to display information about the progress of the script, these only show up in the cluster output file at the very end. In Python…

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

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