# General Usage

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

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

**Page:** 750

---

## [Query - missing vs. isna](https://discourse.julialang.org/t/query-missing-vs-isna/39952)

<div class="topic-metadata">

**Author:** [@stej](https://discourse.julialang.org/u/stej)\
**Replies:** 7\
**Last updated:** [May 22, 2020, 2:00pm UTC](https://discourse.julialang.org/t/query-missing-vs-isna/39952 "2020-05-22T14:00:24Z")

</div>

Hi all, I have a question about ismissing and isna. I found Query.jl - filtering on missing data so I started using that. I thought that isna is really needed whenever I use Query.jl. But that’s not the case. Example …

---

## [Julia how to create a dictionary using a loop](https://discourse.julialang.org/t/julia-how-to-create-a-dictionary-using-a-loop/39935)

<div class="topic-metadata">

**Author:** [@Vondoe79](https://discourse.julialang.org/u/Vondoe79)\
**Replies:** 3\
**Last updated:** [May 22, 2020, 1:12pm UTC](https://discourse.julialang.org/t/julia-how-to-create-a-dictionary-using-a-loop/39935 "2020-05-22T13:12:50Z")

</div>

Hi there, I am new to Julia and I need a little help with the abovementioned task. I want to create a list of dictionary with tuples as keys and a real number as values. Below is the piece of code a wrote, but the resul…

---

## [Juno debugger stops at \`@unpack\` from Parameters](https://discourse.julialang.org/t/juno-debugger-stops-at-unpack-from-parameters/39904)

<div class="topic-metadata">

**Author:** [@human\_bomb](https://discourse.julialang.org/u/human_bomb)\
**Replies:** 7\
**Last updated:** [May 22, 2020, 12:20pm UTC](https://discourse.julialang.org/t/juno-debugger-stops-at-unpack-from-parameters/39904 "2020-05-22T12:20:57Z")

</div>

I am using the Parameters package v0.12.0 by @mauro3 in my numerical simulations. While using the Juno debugger in JuliaPro, I noticed that the debugger stops when reaching a call to Parameters’ @unpack. Below is a MWE: …

---

## [Performance difference in Colab and Jupyter notebook](https://discourse.julialang.org/t/performance-difference-in-colab-and-jupyter-notebook/39931)

<div class="topic-metadata">

**Author:** [@SambitMishra98](https://discourse.julialang.org/u/SambitMishra98)\
**Replies:** 2\
**Last updated:** [May 22, 2020, 12:09pm UTC](https://discourse.julialang.org/t/performance-difference-in-colab-and-jupyter-notebook/39931 "2020-05-22T12:09:21Z")

</div>

I set up Julia in Google Colab using Gordan MacMillan’s Github code. I executed the following few lines to compare the performance of Julia in Google Colab and Jupyter Notebook in Ubuntu 20.04 WSL. using BenchmarkTools …

---

## [ordered set syntax](https://discourse.julialang.org/t/ordered-set-syntax/15902)

<div class="topic-metadata">

**Author:** [@Ryao](https://discourse.julialang.org/u/Ryao)\
**Replies:** 1\
**Last updated:** [May 22, 2020, 11:37am UTC](https://discourse.julialang.org/t/ordered-set-syntax/15902 "2020-05-22T11:37:20Z")

</div>

In AMPL, I can use something like: set Time ordered; s.t. Inv{t in Time: ord(t) \>=2}: Inv\[t\]= Inv\[prev(t)\] + ordered\[prev(t)\] - shipped\[t\]; I know I can use numbered index and use t-1 in this case. But if the elements…

---

## [Franklin: How to obtain output of fdplotly() as HTML string?](https://discourse.julialang.org/t/franklin-how-to-obtain-output-of-fdplotly-as-html-string/39944)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 2\
**Last updated:** [May 22, 2020, 9:01am UTC](https://discourse.julialang.org/t/franklin-how-to-obtain-output-of-fdplotly-as-html-string/39944 "2020-05-22T09:01:06Z")

</div>

I would like to know how I can obtain HTML string from fdplotly() in Franklin. This is because I what to put the HTML in an outer div so that I can create a tabular layout for plotly plots. Imaginary code will look som…

---

## [Variable interpolation in pkg command](https://discourse.julialang.org/t/variable-interpolation-in-pkg-command/39940)

<div class="topic-metadata">

**Author:** [@Fred](https://discourse.julialang.org/u/Fred)\
**Replies:** 2\
**Last updated:** [May 22, 2020, 8:09am UTC](https://discourse.julialang.org/t/variable-interpolation-in-pkg-command/39940 "2020-05-22T08:09:58Z")

</div>

Hi ! Do you know if it is possible to use variable interpolation in pkg command to feed pkg with a list of packages ? (see example below) Thanks ! using Pkg pkg"activate ." pkg" instantiate" pkg" status" pck = \["Com…

---

## [\`pop!\` doesn't work with \`Iterator.Pairs\`](https://discourse.julialang.org/t/pop-doesnt-work-with-iterator-pairs/39786)

<div class="topic-metadata">

**Author:** [@mbaz](https://discourse.julialang.org/u/mbaz)\
**Replies:** 3\
**Last updated:** [May 22, 2020, 5:55am UTC](https://discourse.julialang.org/t/pop-doesnt-work-with-iterator-pairs/39786 "2020-05-22T05:55:31Z")

</div>

I was surprised by this: function test(;args...) for k in keys(args) pop!(args,k,nothing) end end When called as test(z=1), this error results: ERROR: MethodError: no method matching pop!(::Base.Iterat…

---

## [LoadError with PackageCompiler with Docker on macOS (works in Docker on Windows, Docker on Linux, and in native macOS)](https://discourse.julialang.org/t/loaderror-with-packagecompiler-with-docker-on-macos-works-in-docker-on-windows-docker-on-linux-and-in-native-macos/39921)

<div class="topic-metadata">

**Author:** [@tuckermcclure](https://discourse.julialang.org/u/tuckermcclure)\
**Replies:** 5\
**Last updated:** [May 22, 2020, 3:33am UTC](https://discourse.julialang.org/t/loaderror-with-packagecompiler-with-docker-on-macos-works-in-docker-on-windows-docker-on-linux-and-in-native-macos/39921 "2020-05-22T03:33:52Z")

</div>

When I’m running the PackageCompiler to generate a Julia system image, I’m getting a LoadError. What’s so odd is that this exact process works in Docker on Windows, in Docker on Linux, on macOS (native), but not in Docke…

---

## [Where to Seperate Files in Package?](https://discourse.julialang.org/t/where-to-seperate-files-in-package/39919)

<div class="topic-metadata">

**Author:** [@Ian\_Slagle](https://discourse.julialang.org/u/Ian_Slagle)\
**Replies:** 2\
**Last updated:** [May 22, 2020, 2:03am UTC](https://discourse.julialang.org/t/where-to-seperate-files-in-package/39919 "2020-05-22T02:03:31Z")

</div>

I’m creating a package (mostly for personal use, and for sharing with a few people, but not like “going into the general repository” standards here), and one of the questions I’m running into is where exactly to split th…

---

## [Overflow behavior](https://discourse.julialang.org/t/overflow-behavior/39924)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 2\
**Last updated:** [May 22, 2020, 12:18am UTC](https://discourse.julialang.org/t/overflow-behavior/39924 "2020-05-22T00:18:39Z")

</div>

The manual reads “In Julia, exceeding the maximum representable value of a given type results in a wraparound behavior” with an example along these lines: julia\> typemax(Int64)+1 -9223372036854775808 which does wrap ar…

---

## [Best way to optimize code](https://discourse.julialang.org/t/best-way-to-optimize-code/37980)

<div class="topic-metadata">

**Author:** [@jmaths](https://discourse.julialang.org/u/jmaths)\
**Replies:** 29\
**Last updated:** [May 21, 2020, 11:04pm UTC](https://discourse.julialang.org/t/best-way-to-optimize-code/37980 "2020-05-21T23:04:35Z")

</div>

I’m making my first effort to move from Matlab to Julia and have found my code to improve by ~3x but still think there is more to come, I’m not using any global variables in the function and have preallocated all the arr…

---

## [Mathematical precision in julia](https://discourse.julialang.org/t/mathematical-precision-in-julia/39895)

<div class="topic-metadata">

**Author:** [@Marques](https://discourse.julialang.org/u/Marques)\
**Replies:** 1\
**Last updated:** [May 21, 2020, 5:41pm UTC](https://discourse.julialang.org/t/mathematical-precision-in-julia/39895 "2020-05-21T17:41:50Z")

</div>

Hi guys, I’m still a beginner in Julia and I would like tips on how I can get greater precision in extensive mathematical calculations performed in Julia. Thanks :slight\_smile:

---

## [Function Name Convention - General or Specific names?](https://discourse.julialang.org/t/function-name-convention-general-or-specific-names/39875)

<div class="topic-metadata">

**Author:** [@PeterKeffer](https://discourse.julialang.org/u/PeterKeffer)\
**Replies:** 4\
**Last updated:** [May 21, 2020, 4:29pm UTC](https://discourse.julialang.org/t/function-name-convention-general-or-specific-names/39875 "2020-05-21T16:29:01Z")

</div>

Hey there! I’ve just started using Julia, so I’m super new and overwhelmed by so much new information. So sorry if my question is superfluous. What if I have two modules / “classes”: GameBoard and GameRules Both can …

---

## [Why is broadcasting allocating so much memory?](https://discourse.julialang.org/t/why-is-broadcasting-allocating-so-much-memory/39874)

<div class="topic-metadata">

**Author:** [@torrance](https://discourse.julialang.org/u/torrance)\
**Replies:** 8\
**Last updated:** [May 21, 2020, 10:18am UTC](https://discourse.julialang.org/t/why-is-broadcasting-allocating-so-much-memory/39874 "2020-05-21T10:18:49Z")

</div>

In the below dummy code I show that doing the sum over the 4-vectors using broadcasting is an order of magnitude slower than iteration of the 4-vector manually. However, I don’t understand why - and whether I can keep us…

---

## [Generating Artifact.toml hashes](https://discourse.julialang.org/t/generating-artifact-toml-hashes/39685)

<div class="topic-metadata">

**Author:** [@torrance](https://discourse.julialang.org/u/torrance)\
**Replies:** 3\
**Last updated:** [May 21, 2020, 9:06am UTC](https://discourse.julialang.org/t/generating-artifact-toml-hashes/39685 "2020-05-21T09:06:10Z")

</div>

Hi there, I’m in the process of making my package relocatable, and the first steps for that are to create my shared libraries (actually, just library wrappers of C++ libraries) as artifacts. However, I’m finding the doc…

---

## [Using type system for different coordinate systems?](https://discourse.julialang.org/t/using-type-system-for-different-coordinate-systems/39722)

<div class="topic-metadata">

**Author:** [@benmatwil](https://discourse.julialang.org/u/benmatwil)\
**Replies:** 7\
**Last updated:** [May 21, 2020, 8:49am UTC](https://discourse.julialang.org/t/using-type-system-for-different-coordinate-systems/39722 "2020-05-21T08:49:57Z")

</div>

I’m reasonably new to using Julia but I’ve been trying to rewrite a Fortran package in Julia. It mainly runs in a Cartesian-like coordinate system with very small sections that require some specialisation for different c…

---

## [Differential equations: Vern family solver, lazy option question](https://discourse.julialang.org/t/differential-equations-vern-family-solver-lazy-option-question/39865)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 2\
**Last updated:** [May 21, 2020, 2:44am UTC](https://discourse.julialang.org/t/differential-equations-vern-family-solver-lazy-option-question/39865 "2020-05-21T02:44:43Z")

</div>

For the Verner family solver of DifferentialEquations.jl, Vern6() through Vern9(), it is documented that the interpolation is “lazy” and These methods when lazy assume that the parameter vector p will be unchanged be…

---

## [How to serialize and save variables (automatically)](https://discourse.julialang.org/t/how-to-serialize-and-save-variables-automatically/39849)

<div class="topic-metadata">

**Author:** [@volkerkarle](https://discourse.julialang.org/u/volkerkarle)\
**Replies:** 1\
**Last updated:** [May 21, 2020, 1:55am UTC](https://discourse.julialang.org/t/how-to-serialize-and-save-variables-automatically/39849 "2020-05-21T01:55:48Z")

</div>

Hi there, In my code I am using the JLD package to serialize my results. Up to now, I worked on an ad-hoc solution where this saving/ loading is done in the functions itself. Furthermore, I use dictionaries to save all …

---

## [Is there a bug in large matrix inverse?](https://discourse.julialang.org/t/is-there-a-bug-in-large-matrix-inverse/39787)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 6\
**Last updated:** [May 20, 2020, 10:33pm UTC](https://discourse.julialang.org/t/is-there-a-bug-in-large-matrix-inverse/39787 "2020-05-20T22:33:18Z")

</div>

I try to find the inverse of a symmetric matrix. For example, a = randn(100) b = a \* transpose(a) inv(b) \* b Here, matrix b is symmetric. However, inv(b) is not the correct inverse of matrix b. It is not symmetric and …

---

## [Constructor for SplitFunction SplitODEProblem](https://discourse.julialang.org/t/constructor-for-splitfunction-splitodeproblem/39854)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 2\
**Last updated:** [May 20, 2020, 10:27pm UTC](https://discourse.julialang.org/t/constructor-for-splitfunction-splitodeproblem/39854 "2020-05-20T22:27:20Z")

</div>

Hello, I am looking for a constructor for SplitFunction for SplitODEProblem in DifferentialEquations.jl https://docs.sciml.ai/latest/types/split\_ode\_types/ Given f1 and f2, how do you define the corresponding SplitFun…

---

## [Using macros](https://discourse.julialang.org/t/using-macros/39656)

<div class="topic-metadata">

**Author:** [@Nimpa](https://discourse.julialang.org/u/Nimpa)\
**Replies:** 4\
**Last updated:** [May 20, 2020, 10:09pm UTC](https://discourse.julialang.org/t/using-macros/39656 "2020-05-20T22:09:21Z")

</div>

Hello, how can i write a macro that takes four argument , namely a Dict , a key ( of arbitaray type) , and two expressions such that if the Dict contains the key , its value is bound to the local variable it within the f…

---

## ["vectorized" QuadGK?](https://discourse.julialang.org/t/vectorized-quadgk/39853)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 3\
**Last updated:** [May 20, 2020, 9:17pm UTC](https://discourse.julialang.org/t/vectorized-quadgk/39853 "2020-05-20T21:17:46Z")

</div>

I’ll start off by saying that QuadGK is really fast. But I want to know how to make it faster for what I think is a relatively common usecase, which is its vectorized form. Broadcasting the quadgk call itself performs as…

---

## [Can't run jupyter notebook](https://discourse.julialang.org/t/cant-run-jupyter-notebook/39796)

<div class="topic-metadata">

**Author:** [@aebk2015](https://discourse.julialang.org/u/aebk2015)\
**Replies:** 12\
**Last updated:** [May 20, 2020, 7:30pm UTC](https://discourse.julialang.org/t/cant-run-jupyter-notebook/39796 "2020-05-20T19:30:13Z")

</div>

I can’t seem to start jupyter notebook from Mac terminal. I am using IJulia jupyterlab() or using IJulia jupyter notebook() When the browswer opnes and I select Julia for the kernel, I get this (I am pasting par…

---

## [Searchsorted by=\<transform\> keyword question](https://discourse.julialang.org/t/searchsorted-by-transform-keyword-question/39851)

<div class="topic-metadata">

**Author:** [@cstook](https://discourse.julialang.org/u/cstook)\
**Replies:** 2\
**Last updated:** [May 20, 2020, 7:10pm UTC](https://discourse.julialang.org/t/searchsorted-by-transform-keyword-question/39851 "2020-05-20T19:10:41Z")

</div>

I thought that the transform specified with the by keyword was a function applied before the comparison. I don’t understand the last three examples below. Probably missing something obvious. How does the by keyword wo…

---

## [Julia equivalent of 'rm \*' (almost)](https://discourse.julialang.org/t/julia-equivalent-of-rm-almost/39477)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 18\
**Last updated:** [May 20, 2020, 6:51pm UTC](https://discourse.julialang.org/t/julia-equivalent-of-rm-almost/39477 "2020-05-20T18:51:22Z")

</div>

Hello, let me begin by saying this is not a gripe, but rather a warning to users. I have lost lots of time on the following ‘fat finger’ error in Julia. Consider below. julia\> x=\[1;2;3\]; julia\> y=x\[x.==1\] 1-element …

---

## ["Partially" synchronizing asynchronous tasks](https://discourse.julialang.org/t/partially-synchronizing-asynchronous-tasks/39841)

<div class="topic-metadata">

**Author:** [@martincornejo](https://discourse.julialang.org/u/martincornejo)\
**Replies:** 2\
**Last updated:** [May 20, 2020, 5:29pm UTC](https://discourse.julialang.org/t/partially-synchronizing-asynchronous-tasks/39841 "2020-05-20T17:29:22Z")

</div>

The @sync / @async pair is very useful for waiting a series of asynchronous tasks to complete: @sync for element in collection @async perform\_task(element) end Is there a way to do something similar, but instead of …

---

## [Revise and include order in package under development](https://discourse.julialang.org/t/revise-and-include-order-in-package-under-development/39832)

<div class="topic-metadata">

**Author:** [@D\_A](https://discourse.julialang.org/u/D_A)\
**Replies:** 2\
**Last updated:** [May 20, 2020, 4:37pm UTC](https://discourse.julialang.org/t/revise-and-include-order-in-package-under-development/39832 "2020-05-20T16:37:00Z")

</div>

Hello, After I refactored my own set of code files into a package (with generate command), and using Revise prior to everything (thanks to the VS Code option), development got better, but I noticed some changes in my su…

---

## [Does adding dependencies increase compilation time?](https://discourse.julialang.org/t/does-adding-dependencies-increase-compilation-time/39766)

<div class="topic-metadata">

**Author:** [@BrucePBon](https://discourse.julialang.org/u/BrucePBon)\
**Replies:** 6\
**Last updated:** [May 20, 2020, 4:26pm UTC](https://discourse.julialang.org/t/does-adding-dependencies-increase-compilation-time/39766 "2020-05-20T16:26:37Z")

</div>

I am writing a Julia Package and I feel like compilation time of the package is longer than It was in the past. Does it have to do with the added dependencies? Should I only import those functions that my package uses? …

---

## [Strange MethodError ambiguity](https://discourse.julialang.org/t/strange-methoderror-ambiguity/39779)

<div class="topic-metadata">

**Author:** [@Bigorneau](https://discourse.julialang.org/u/Bigorneau)\
**Replies:** 6\
**Last updated:** [May 20, 2020, 3:46pm UTC](https://discourse.julialang.org/t/strange-methoderror-ambiguity/39779 "2020-05-20T15:46:25Z")

</div>

I found a strange MethodError in my code. It is possible to reproduce it with the following simple code struct A{T} x::T end fun(a::A{T}, b::T) where {T} = "same parametric type" fun(a::T, b::S) where {T\<:A,S} = "any…

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

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