# General Usage

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

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

**Page:** 679

---

## [Precompilation error with Julia 1.5.3 (Windows 10 64-bit)](https://discourse.julialang.org/t/precompilation-error-with-julia-1-5-3-windows-10-64-bit/50028)

<div class="topic-metadata">

**Author:** [@sambitdash](https://discourse.julialang.org/u/sambitdash)\
**Replies:** 7\
**Last updated:** [November 12, 2020, 4:08pm UTC](https://discourse.julialang.org/t/precompilation-error-with-julia-1-5-3-windows-10-64-bit/50028 "2020-11-12T16:08:22Z")

</div>

Hi All, Is anyone else facing the same issue as well? I had installation of Julia 1.5.2 earlier. And was using packages like IJulia. Now I installed Julia 1.5.3. When I lauch Julia 1.5.3 and type using IJulia I see the …

---

## [Testing return types of functions](https://discourse.julialang.org/t/testing-return-types-of-functions/50049)

<div class="topic-metadata">

**Author:** [@wulpuqu](https://discourse.julialang.org/u/wulpuqu)\
**Replies:** 2\
**Last updated:** [November 12, 2020, 2:41pm UTC](https://discourse.julialang.org/t/testing-return-types-of-functions/50049 "2020-11-12T14:41:41Z")

</div>

Hello everyone, Given a function definition like g(varargs...)::T2 = ... Is there a way to retrieve the return type T2 without evaluating typeof(g(varargs...)) ? I would like to test if a function is returning an agg…

---

## [Convex DCP rules](https://discourse.julialang.org/t/convex-dcp-rules/50027)

<div class="topic-metadata">

**Author:** [@faisal\_moh](https://discourse.julialang.org/u/faisal_moh)\
**Replies:** 1\
**Last updated:** [November 12, 2020, 1:52pm UTC](https://discourse.julialang.org/t/convex-dcp-rules/50027 "2020-11-12T13:52:00Z")

</div>

Hi, I’m new to Julia and reviewing the convex package. I provided the objective function of max(100a + 150b), constrained to b \<= 99 and 372a^2 + 55b^2 \<= 628. This is the simplified formulation of my actual objective …

---

## [Plot doesn't work, doesn't display in the pane in Atom](https://discourse.julialang.org/t/plot-doesnt-work-doesnt-display-in-the-pane-in-atom/50007)

<div class="topic-metadata">

**Author:** [@Dailysight](https://discourse.julialang.org/u/Dailysight)\
**Replies:** 2\
**Last updated:** [November 12, 2020, 10:38am UTC](https://discourse.julialang.org/t/plot-doesnt-work-doesnt-display-in-the-pane-in-atom/50007 "2020-11-12T10:38:40Z")

</div>

Hey everyone ! It’s my first topic on this forum and i’m here to ask a little question about the use of plot. I have done the following code to display a landmark in 3D. But when i call the function “affichage\_R”, nothi…

---

## [Flux Pendulum DDPG example fails on GPU](https://discourse.julialang.org/t/flux-pendulum-ddpg-example-fails-on-gpu/49975)

<div class="topic-metadata">

**Author:** [@lilanger](https://discourse.julialang.org/u/lilanger)\
**Replies:** 2\
**Last updated:** [November 12, 2020, 9:52am UTC](https://discourse.julialang.org/t/flux-pendulum-ddpg-example-fails-on-gpu/49975 "2020-11-12T09:52:55Z")

</div>

I am pretty new to Flux and try to get the Pendulum environment (using a slightly modified Reinforce.jl environment: Pendulum update) running with DDPG with newer package versions (based on Flux model-zoo). It seems to …

---

## [Code runs fine on Juno and Intellij-Idea but crashes on VSCode. ArgumentError: Package OffsetArrays does not have Adapt in its dependencies](https://discourse.julialang.org/t/code-runs-fine-on-juno-and-intellij-idea-but-crashes-on-vscode-argumenterror-package-offsetarrays-does-not-have-adapt-in-its-dependencies/50015)

<div class="topic-metadata">

**Author:** [@acycliq](https://discourse.julialang.org/u/acycliq)\
**Replies:** 2\
**Last updated:** [November 12, 2020, 9:23am UTC](https://discourse.julialang.org/t/code-runs-fine-on-juno-and-intellij-idea-but-crashes-on-vscode-argumenterror-package-offsetarrays-does-not-have-adapt-in-its-dependencies/50015 "2020-11-12T09:23:26Z")

</div>

I am trying to use some code from a GitHub repo. I have cloned it and the code has a. jl file that defines a module and I think (but not 100% sure) that I am successfully loading the module from my local directory The c…

---

## [REPL text colors for white background console](https://discourse.julialang.org/t/repl-text-colors-for-white-background-console/49999)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 3\
**Last updated:** [November 12, 2020, 8:02am UTC](https://discourse.julialang.org/t/repl-text-colors-for-white-background-console/49999 "2020-11-12T08:02:09Z")

</div>

My Win10 Julia 1.5.2 REPL has white background and the default light yellow text (ex: ?help, matching parentheses highlighted, etc.) cannot be read. Is there a way to change this color (ex: to cyan)? I am using a Git ba…

---

## [GLMakie.jl crashed when building the scene](https://discourse.julialang.org/t/glmakie-jl-crashed-when-building-the-scene/50025)

<div class="topic-metadata">

**Author:** [@AquaIndigo](https://discourse.julialang.org/u/AquaIndigo)\
**Replies:** 1\
**Last updated:** [November 12, 2020, 7:18am UTC](https://discourse.julialang.org/t/glmakie-jl-crashed-when-building-the-scene/50025 "2020-11-12T07:18:13Z")

</div>

When I just imported the package and built a scene on my manjaro machine, crash occured(segfault): julia\> using Makie julia\> scene = Scene() signal (11): 段错误 in expression starting at none:0 \_ZN4llvm16TargetPassConfig…

---

## [Writing Parquet files](https://discourse.julialang.org/t/writing-parquet-files/11221)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 28\
**Last updated:** [November 12, 2020, 6:59am UTC](https://discourse.julialang.org/t/writing-parquet-files/11221 "2020-11-12T06:59:02Z")

</div>

Is it possible to write Parquet files from Julia? I found Parquet.jl but looks like it can read but not write…

---

## [Searchsorted with by and lookup](https://discourse.julialang.org/t/searchsorted-with-by-and-lookup/49952)

<div class="topic-metadata">

**Author:** [@endremborza](https://discourse.julialang.org/u/endremborza)\
**Replies:** 4\
**Last updated:** [November 12, 2020, 2:38am UTC](https://discourse.julialang.org/t/searchsorted-with-by-and-lookup/49952 "2020-11-12T02:38:43Z")

</div>

a = \[1,3,2,4,1,2,1\]; is = sortperm(a); after this, I’d assume is\[searchsorted(is, q, by=x -\> a\[x\])\] should work to find indices in a that contain q, however: a\[is\[searchsorted(is, 3, by=x -\> a\[x\])\]\] 2-element Array{Int…

---

## [Is there a way to make a submodule "open"](https://discourse.julialang.org/t/is-there-a-way-to-make-a-submodule-open/49641)

<div class="topic-metadata">

**Author:** [@mhinsch](https://discourse.julialang.org/u/mhinsch)\
**Replies:** 21\
**Last updated:** [November 12, 2020, 12:33am UTC](https://discourse.julialang.org/t/is-there-a-way-to-make-a-submodule-open/49641 "2020-11-12T00:33:59Z")

</div>

The scenario: I am writing a DSLish set of macros that create a few functions that again call code the user has provided verbatim (in the macro call), so something like this: @mymacro Bla myfun1() myfun2() end …

---

## [Plots (pgfplotsx) change label from Column -\> Line](https://discourse.julialang.org/t/plots-pgfplotsx-change-label-from-column-line/50009)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 2\
**Last updated:** [November 11, 2020, 11:32pm UTC](https://discourse.julialang.org/t/plots-pgfplotsx-change-label-from-column-line/50009 "2020-11-11T23:32:05Z")

</div>

A great thanks for the introduction of PgfPlotsX into Plots making the plotting accessible to everybody. I would need to transform the Label from 1 column to multiple column. This feature is particularly useful when usi…

---

## [DifferentialEquations and derivatives of solutions?](https://discourse.julialang.org/t/differentialequations-and-derivatives-of-solutions/49995)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 2\
**Last updated:** [November 11, 2020, 10:23pm UTC](https://discourse.julialang.org/t/differentialequations-and-derivatives-of-solutions/49995 "2020-11-11T22:23:44Z")

</div>

Suppose I use the DifferentialEquations.jl package and find a solution structure sol. Is there a simple way to find the derivative of the various variables in sol? In other words: suppose I have 6 states in an ODE model…

---

## [Problems using JuliaMono in VsCode](https://discourse.julialang.org/t/problems-using-juliamono-in-vscode/49936)

<div class="topic-metadata">

**Author:** [@Carsten](https://discourse.julialang.org/u/Carsten)\
**Replies:** 12\
**Last updated:** [November 11, 2020, 9:50pm UTC](https://discourse.julialang.org/t/problems-using-juliamono-in-vscode/49936 "2020-11-11T21:50:54Z")

</div>

I’ve got in trouble after adding the JuliaMono fonts along the description given in https://cormullion.github.io/pages/2020-07-26-JuliaMono/#windows The result within the terminal window looks like (all text are in mon…

---

## [IJulia error syntax: undefined reference in AST](https://discourse.julialang.org/t/ijulia-error-syntax-undefined-reference-in-ast/49958)

<div class="topic-metadata">

**Author:** [@Mason](https://discourse.julialang.org/u/Mason)\
**Replies:** 6\
**Last updated:** [November 11, 2020, 4:53pm UTC](https://discourse.julialang.org/t/ijulia-error-syntax-undefined-reference-in-ast/49958 "2020-11-11T16:53:23Z")

</div>

Suddenly when I try to start up IJulia and run any code in a Jupyter notebook or jupyter lab (e.g. just return the number 1), I get an error: syntax: undefined reference in AST Stacktrace: \[1\] top-level scope at In\[1\]…

---

## [\_generate\_2d\_nodes! in JuAFEM](https://discourse.julialang.org/t/generate-2d-nodes-in-juafem/49990)

<div class="topic-metadata">

**Author:** [@Hrishikesh\_Das](https://discourse.julialang.org/u/Hrishikesh_Das)\
**Replies:** 0\
**Last updated:** [November 11, 2020, 4:05pm UTC](https://discourse.julialang.org/t/generate-2d-nodes-in-juafem/49990 "2020-11-11T16:05:49Z")

</div>

I am trying to use the function \_generate\_2d\_nodes! which is available in JuAFEM. But it shows an error. Below is my code using Tensors, JuAFEM M =\_generate\_2d\_nodes!(44, 21, 21, Vec{2}((0.0,4.5)), Vec{2}((0.5,4.5)), …

---

## [Bug in Julia's ode solver : UndefVarError: hasproperty not defined](https://discourse.julialang.org/t/bug-in-julias-ode-solver-undefvarerror-hasproperty-not-defined/49949)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 6\
**Last updated:** [November 11, 2020, 2:28pm UTC](https://discourse.julialang.org/t/bug-in-julias-ode-solver-undefvarerror-hasproperty-not-defined/49949 "2020-11-11T14:28:41Z")

</div>

I am having the following inexplicable error when I try to solve an ode. Can you help me interpret the error message. julia\> include("t.jl"); ERROR: LoadError: UndefVarError: hasproperty not defined Stacktrace: \[1\] che…

---

## [Significance of global keyword](https://discourse.julialang.org/t/significance-of-global-keyword/49884)

<div class="topic-metadata">

**Author:** [@Debraj\_Bhal](https://discourse.julialang.org/u/Debraj_Bhal)\
**Replies:** 5\
**Last updated:** [November 10, 2020, 7:01pm UTC](https://discourse.julialang.org/t/significance-of-global-keyword/49884 "2020-11-10T19:01:49Z")

</div>

Can someone make me understand the actual significance of global keyword in Julia?

---

## [String type that wraps an AbstractVector?](https://discourse.julialang.org/t/string-type-that-wraps-an-abstractvector/23901)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 12\
**Last updated:** [November 11, 2020, 9:13am UTC](https://discourse.julialang.org/t/string-type-that-wraps-an-abstractvector/23901 "2020-11-11T09:13:32Z")

</div>

Do we have a string type that wraps a (sub-)vector of bytes in some package? Something a bit safer than WeakRefString (so not pointer based)?

---

## [Failed to precompile ZeroMQ\_jll / ZMQ / IJulia](https://discourse.julialang.org/t/failed-to-precompile-zeromq-jll-zmq-ijulia/49069)

<div class="topic-metadata">

**Author:** [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)\
**Replies:** 7\
**Last updated:** [November 11, 2020, 9:10am UTC](https://discourse.julialang.org/t/failed-to-precompile-zeromq-jll-zmq-ijulia/49069 "2020-11-11T09:10:47Z")

</div>

I’ve been getting these locally when I’ve run dataframes tutorials with jupyterlab, but now I noticed that this also happens with the official data-science jupyter notebook. Instructions for reproducing: clone: https:…

---

## [Getting a memory reference to different parts of an array](https://discourse.julialang.org/t/getting-a-memory-reference-to-different-parts-of-an-array/49961)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 2\
**Last updated:** [November 11, 2020, 8:43am UTC](https://discourse.julialang.org/t/getting-a-memory-reference-to-different-parts-of-an-array/49961 "2020-11-11T08:43:56Z")

</div>

Suppose I have an array x = \[1, 2, 3, 4, 5, 6, 7, 8, 9, 10\]. Does there exist syntactial sugar, so I can write something like a = x\[1:3\] b = x\[4:7\] c = x\[8:10\] so that b\[1\] actually refers to x\[4\] and that b\[1\] = val…

---

## [Custom abbreviations in DocStringExtensions](https://discourse.julialang.org/t/custom-abbreviations-in-docstringextensions/49964)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 1\
**Last updated:** [November 11, 2020, 7:39am UTC](https://discourse.julialang.org/t/custom-abbreviations-in-docstringextensions/49964 "2020-11-11T07:39:26Z")

</div>

I’m hoping to define a custom DocStringExtensions.Abbreviation, as instructed here. Are custom Abbreviations defined in my package? Or does that require me to fork DocStringExtensions, and define a new abbreviation there…

---

## [Range element wise product](https://discourse.julialang.org/t/range-element-wise-product/49966)

<div class="topic-metadata">

**Author:** [@Rojesh](https://discourse.julialang.org/u/Rojesh)\
**Replies:** 1\
**Last updated:** [November 11, 2020, 5:17am UTC](https://discourse.julialang.org/t/range-element-wise-product/49966 "2020-11-11T05:17:29Z")

</div>

Trying to multiply a range with an array gave a no method matching error 1:4 .\* \[1,2,3,4\] ERROR: MethodError: no method matching (::Colon)(::Int64, ::Array{Int64,1}) Rather than accepting it as range it takes in as In…

---

## [Path Environments](https://discourse.julialang.org/t/path-environments/49555)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 12\
**Last updated:** [November 11, 2020, 3:44am UTC](https://discourse.julialang.org/t/path-environments/49555 "2020-11-11T03:44:55Z")

</div>

I would like to add Maxima.jl, but in order to run Maxima I need to add a directory to the Path environment, so Julia can find it. On Windows you will also need to add the directory containing the maxima.bat executable …

---

## [How to run HTTP Post request as background task?](https://discourse.julialang.org/t/how-to-run-http-post-request-as-background-task/49673)

<div class="topic-metadata">

**Author:** [@uwechsler](https://discourse.julialang.org/u/uwechsler)\
**Replies:** 3\
**Last updated:** [November 11, 2020, 2:59am UTC](https://discourse.julialang.org/t/how-to-run-http-post-request-as-background-task/49673 "2020-11-11T02:59:15Z")

</div>

Hi everybody, I am working on a wrapper for the Seq logger for Julia (see WIP project) Using the REST API for posting raw events , it is possible to post log events to the Seq logging server. My current implementatio…

---

## [Allocation / performance for 2d array sorts](https://discourse.julialang.org/t/allocation-performance-for-2d-array-sorts/49910)

<div class="topic-metadata">

**Author:** [@endremborza](https://discourse.julialang.org/u/endremborza)\
**Replies:** 5\
**Last updated:** [November 10, 2020, 11:03pm UTC](https://discourse.julialang.org/t/allocation-performance-for-2d-array-sorts/49910 "2020-11-10T23:03:06Z")

</div>

I’m just getting started with Julia so I’m trying to optimize every piece of code, not just for practicality, but to learn more about the language. I ran into an interesting case, where the number of allocation seems to …

---

## [All vectors formed by picking one element from each vector](https://discourse.julialang.org/t/all-vectors-formed-by-picking-one-element-from-each-vector/49950)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 2\
**Last updated:** [November 10, 2020, 10:34pm UTC](https://discourse.julialang.org/t/all-vectors-formed-by-picking-one-element-from-each-vector/49950 "2020-11-10T22:34:47Z")

</div>

I’d like to write a vararg function which takes N vectors, and return all possible length-N vectors by picking one element from each vector. For example all\_vectors(\[\['a', 'b'\], \[1, 2, 3\], \['x'\]\]) should give the resul…

---

## [Regex on byte vector](https://discourse.julialang.org/t/regex-on-byte-vector/47754)

<div class="topic-metadata">

**Author:** [@kernelmethod](https://discourse.julialang.org/u/kernelmethod)\
**Replies:** 10\
**Last updated:** [November 10, 2020, 9:30pm UTC](https://discourse.julialang.org/t/regex-on-byte-vector/47754 "2020-11-10T21:30:28Z")

</div>

Hey there! In Python, I can apply a regular expression to a byte string using something like import re patt = re.compile(b"^ab+c$") patt.match(b"abbbc") Is there a way of doing something similar in Julia? I know I can …

---

## [Knowing what package a function is from?](https://discourse.julialang.org/t/knowing-what-package-a-function-is-from/49258)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 38\
**Last updated:** [November 10, 2020, 9:03pm UTC](https://discourse.julialang.org/t/knowing-what-package-a-function-is-from/49258 "2020-11-10T21:03:21Z")

</div>

Both Calculus.jl and SystmUtils.jl have a simplify funtction. If I have code like. using Calculus using SystemUtils differentiate("x^2+65x^58+7-63") simplify(ans) how do in know which simplify it would use?

---

## [Accessing rows without copying](https://discourse.julialang.org/t/accessing-rows-without-copying/49945)

<div class="topic-metadata">

**Author:** [@barthelemymp](https://discourse.julialang.org/u/barthelemymp)\
**Replies:** 1\
**Last updated:** [November 10, 2020, 9:01pm UTC](https://discourse.julialang.org/t/accessing-rows-without-copying/49945 "2020-11-10T21:01:46Z")

</div>

Hello, I am optimizing my code, and I wanted to know how I could access the row of a matrix directly (not making a copy of it, and pass it to a function. right now I do: @threads for i=1:n\_rows results\[i\] = myfu…

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

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