# General Usage

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

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

**Page:** 392

---

## [Gnuplot.jl polygon / patch plot](https://discourse.julialang.org/t/gnuplot-jl-polygon-patch-plot/87864)

<div class="topic-metadata">

**Author:** [@Gravlax](https://discourse.julialang.org/u/Gravlax)\
**Replies:** 0\
**Last updated:** [September 27, 2022, 8:59am UTC](https://discourse.julialang.org/t/gnuplot-jl-polygon-patch-plot/87864 "2022-09-27T08:59:30Z")

</div>

Dear all, I’m trying to generate a patch plot using Gnuplot.jl. The aim is to generate a figure with plenty of polygons filled with different colors. So first, I would like to get to plot one triangle filled wit a given…

---

## [Keyboard input monitoring](https://discourse.julialang.org/t/keyboard-input-monitoring/87078)

<div class="topic-metadata">

**Author:** [@FedeClaudi](https://discourse.julialang.org/u/FedeClaudi)\
**Replies:** 9\
**Last updated:** [September 27, 2022, 8:04am UTC](https://discourse.julialang.org/t/keyboard-input-monitoring/87078 "2022-09-27T08:04:55Z")

</div>

Hello all, I have a “simple” problem, but I can’t seem to find a simple solution. Basically what I want is to monitor key strokes for user input in an interactive application, with a couple requirements: it should no…

---

## [Stderr not flushed right away?](https://discourse.julialang.org/t/stderr-not-flushed-right-away/85734)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 6\
**Last updated:** [September 27, 2022, 6:18am UTC](https://discourse.julialang.org/t/stderr-not-flushed-right-away/85734 "2022-09-27T06:18:44Z")

</div>

stderr doesn’t seem to flush frequently enough. Is this by design? Suppose we run this Julia script #--- try.jl --- for i = 1:100000 println(stderr, i) sleep(0.5) end from the shell command line like so $ julia …

---

## [Modify Title in REPL window](https://discourse.julialang.org/t/modify-title-in-repl-window/87803)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 15\
**Last updated:** [September 27, 2022, 3:00am UTC](https://discourse.julialang.org/t/modify-title-in-repl-window/87803 "2022-09-27T03:00:38Z")

</div>

Is it possible to change the title of the REPL window (in case it is a standalone window)? Something equivalent to the command to set the title of an Blink-Electron-Window: using Blink hdl\_win = Window(); title(hdl\_wi…

---

## [Simple question about assignment to a vector of vectors](https://discourse.julialang.org/t/simple-question-about-assignment-to-a-vector-of-vectors/62744)

<div class="topic-metadata">

**Author:** [@torgo](https://discourse.julialang.org/u/torgo)\
**Replies:** 12\
**Last updated:** [September 27, 2022, 2:43am UTC](https://discourse.julialang.org/t/simple-question-about-assignment-to-a-vector-of-vectors/62744 "2022-09-27T02:43:43Z")

</div>

Example: julia\> A = fill(fill(0,2), 3) 3-element Vector{Vector{Int64}}: \[0, 0\] \[0, 0\] \[0, 0\] julia\> A\[1\]\[2\] = 5 5 julia\> A 3-element Vector{Vector{Int64}}: \[0, 5\] \[0, 5\] \[0, 5\] The result is not what I would ex…

---

## [Julia alternative to jax.scan](https://discourse.julialang.org/t/julia-alternative-to-jax-scan/87850)

<div class="topic-metadata">

**Author:** [@Honza9723](https://discourse.julialang.org/u/Honza9723)\
**Replies:** 2\
**Last updated:** [September 27, 2022, 1:15am UTC](https://discourse.julialang.org/t/julia-alternative-to-jax-scan/87850 "2022-09-27T01:15:46Z")

</div>

Dear All, I would like to ask whether Julia or some of its libraries have some parallel to jax.lax.scan? Best, Jan

---

## [GC settings, Go now has 2, adopted ours, we should adopt theirs: "Go runtime: 4 years later"](https://discourse.julialang.org/t/gc-settings-go-now-has-2-adopted-ours-we-should-adopt-theirs-go-runtime-4-years-later/87843)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [September 26, 2022, 11:08pm UTC](https://discourse.julialang.org/t/gc-settings-go-now-has-2-adopted-ours-we-should-adopt-theirs-go-runtime-4-years-later/87843 "2022-09-26T23:08:47Z")

</div>

A new knob With Go 1.19 comes an long-requested feature that requires a little extra work to use, but carries a lot of potential: the Go runtime’s soft memory limit. \[Julia 1.9 has such\] For years, the Go GC has had…

---

## [C routine uses AVX intrinsics](https://discourse.julialang.org/t/c-routine-uses-avx-intrinsics/87777)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 15\
**Last updated:** [September 26, 2022, 9:19pm UTC](https://discourse.julialang.org/t/c-routine-uses-avx-intrinsics/87777 "2022-09-26T21:19:33Z")

</div>

I would like to make the example in the docs work. The presentation is incomplete; while I have the requisite tools, it is unclear how best (most simply and effectively) apply them here: the easiest most foolproof way to…

---

## [LU Factorization](https://discourse.julialang.org/t/lu-factorization/87841)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 3\
**Last updated:** [September 26, 2022, 9:13pm UTC](https://discourse.julialang.org/t/lu-factorization/87841 "2022-09-26T21:13:11Z")

</div>

I am just confused about one thing related to LU factorization. It is known that the solution of A.x=b is x = U\\L\\P\*b. Why when I apply it in the below it gives another solution comparing with A\\b, while LU\\b gives the s…

---

## [JuliaCall: Pass numpy array to julia function as Vector{Float64}](https://discourse.julialang.org/t/juliacall-pass-numpy-array-to-julia-function-as-vector-float64/87728)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 13\
**Last updated:** [September 26, 2022, 7:47pm UTC](https://discourse.julialang.org/t/juliacall-pass-numpy-array-to-julia-function-as-vector-float64/87728 "2022-09-26T19:47:02Z")

</div>

I have recently started using JuliaCall to use Julia functionality in python, but I am having trouble understanding how type conversions work, and I have the following problem. I have a julia function which has an argu…

---

## [Request: Julia debug mode](https://discourse.julialang.org/t/request-julia-debug-mode/87832)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 2\
**Last updated:** [September 26, 2022, 7:25pm UTC](https://discourse.julialang.org/t/request-julia-debug-mode/87832 "2022-09-26T19:25:16Z")

</div>

Can you sport were I got lots of allocations? I don’t need a debugger, right now, I found the bug, this is just a motivating example, and I think a debug mode would be better than a debugger. function time\_code2(A) co…

---

## [Kernel Density Estimate for cdf](https://discourse.julialang.org/t/kernel-density-estimate-for-cdf/87790)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 11\
**Last updated:** [September 26, 2022, 7:34pm UTC](https://discourse.julialang.org/t/kernel-density-estimate-for-cdf/87790 "2022-09-26T19:34:39Z")

</div>

Hi all, I would like to use kernel density estimation to estimate the cdf from data. One way to get the cdf is to numerically integrate the estimated pdf with quadgk, but the drawback is it is somewhat inefficient. Is t…

---

## [Is there an easy way to precompile functions without running them?](https://discourse.julialang.org/t/is-there-an-easy-way-to-precompile-functions-without-running-them/87831)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 0\
**Last updated:** [September 26, 2022, 6:37pm UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-precompile-functions-without-running-them/87831 "2022-09-26T18:37:43Z")

</div>

Hi! I have a package that has an interface with a database. I want that all functions get precompiled, but I cannot use SnoopCompile, for example, since it requires to actually run the functions. It is not possible here…

---

## [Difference between \`include\` and \`using\`](https://discourse.julialang.org/t/difference-between-include-and-using/87795)

<div class="topic-metadata">

**Author:** [@contradict](https://discourse.julialang.org/u/contradict)\
**Replies:** 7\
**Last updated:** [September 26, 2022, 6:01pm UTC](https://discourse.julialang.org/t/difference-between-include-and-using/87795 "2022-09-26T18:01:52Z")

</div>

When using Oxygen.jl, I noticed an unexpected difference between using and include. I created a simple project using a slightly modified version of the example code in the readme. (@v1.8) pkg\> generate OxygenExample G…

---

## [Gnuplot error](https://discourse.julialang.org/t/gnuplot-error/83863)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 31\
**Last updated:** [September 26, 2022, 4:56pm UTC](https://discourse.julialang.org/t/gnuplot-error/83863 "2022-09-26T16:56:19Z")

</div>

I’m now getting these errors with Gnuplot.jl: Cound not start a gnuplot process with command "gnuplot". Enabling dry sessions... How does one debug something like this? I checked, and gnuplot can be started from …

---

## [PackageCompiler + Sockets + Web app](https://discourse.julialang.org/t/packagecompiler-sockets-web-app/28793)

<div class="topic-metadata">

**Author:** [@rssdev10](https://discourse.julialang.org/u/rssdev10)\
**Replies:** 11\
**Last updated:** [September 26, 2022, 3:57pm UTC](https://discourse.julialang.org/t/packagecompiler-sockets-web-app/28793 "2022-09-26T15:57:43Z")

</div>

I’m trying to build an image of a simple web project. The project is present as a package in the global list of packages and also is located my dev path. But getting stable error: ./build\_native.jl \[ Info: Copying syste…

---

## [Setting \`axis equal\`](https://discourse.julialang.org/t/setting-axis-equal/50387)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 1\
**Last updated:** [September 26, 2022, 3:19pm UTC](https://discourse.julialang.org/t/setting-axis-equal/50387 "2022-09-26T15:19:59Z")

</div>

Is there any way to set x, y, and z axis to equal scaling (like Matlab’s axis equal command)? Setting aspect\_ratio=1 or aspect\_ratio=:equal seems to set two out of three axis correctly (oddly enough, sometimes x and y a…

---

## [How to make an immutable a possible type parameter for Val(...)](https://discourse.julialang.org/t/how-to-make-an-immutable-a-possible-type-parameter-for-val/87812)

<div class="topic-metadata">

**Author:** [@jt1](https://discourse.julialang.org/u/jt1)\
**Replies:** 0\
**Last updated:** [September 26, 2022, 1:36pm UTC](https://discourse.julialang.org/t/how-to-make-an-immutable-a-possible-type-parameter-for-val/87812 "2022-09-26T13:36:14Z")

</div>

struct Temp{A} a::A end Val((1,2)) #Works Val(Temp((1,2))) #Works Val((:a,:b)) #Works Val(Temp((:a,:b))) #Fails I don’t really get why the second and third work, but the 4th doesn’t? The third al…

---

## [JSON3 stack overflow with generics](https://discourse.julialang.org/t/json3-stack-overflow-with-generics/87648)

<div class="topic-metadata">

**Author:** [@lklein](https://discourse.julialang.org/u/lklein)\
**Replies:** 4\
**Last updated:** [September 26, 2022, 11:49am UTC](https://discourse.julialang.org/t/json3-stack-overflow-with-generics/87648 "2022-09-26T11:49:07Z")

</div>

When running the following code, I get a StackOverflow error. I do not understand why that error happens. It seems to have something to do with the compilers reasoning about generics. Any input on why that error happen…

---

## [What if I want to have two REPLs in VS Code?](https://discourse.julialang.org/t/what-if-i-want-to-have-two-repls-in-vs-code/61318)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 5\
**Last updated:** [September 26, 2022, 8:18am UTC](https://discourse.julialang.org/t/what-if-i-want-to-have-two-repls-in-vs-code/61318 "2022-09-26T08:18:24Z")

</div>

I want to be able to use two REPL in one window. Is the correct procedure to use “Julia: Run in new process”? (If it was actually working, which it isn’t: the execution occurs in the debugger.) What if I open a new termi…

---

## [Is There Any Way to Plot Secant Line and Tangent Line given a point in a function?](https://discourse.julialang.org/t/is-there-any-way-to-plot-secant-line-and-tangent-line-given-a-point-in-a-function/87773)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [September 26, 2022, 7:43am UTC](https://discourse.julialang.org/t/is-there-any-way-to-plot-secant-line-and-tangent-line-given-a-point-in-a-function/87773 "2022-09-26T07:43:43Z")

</div>

Hi all, I wonder if there is any way to draw (automatically): a secant line a tangent line with known function and a point at that function, is it possible? I use pyplot backend, but I want to know other backend plo…

---

## [Webpage not rendering correctly on GitHub pages](https://discourse.julialang.org/t/webpage-not-rendering-correctly-on-github-pages/87769)

<div class="topic-metadata">

**Author:** [@leoflotor](https://discourse.julialang.org/u/leoflotor)\
**Replies:** 3\
**Last updated:** [September 26, 2022, 7:40am UTC](https://discourse.julialang.org/t/webpage-not-rendering-correctly-on-github-pages/87769 "2022-09-26T07:40:55Z")

</div>

Hi! I wanted to start my first personal website using Franklin but with no success on rendering my site as it should. I uploaded the default site that Franklin creates because I first wanted to check that all was runni…

---

## [Joint all layers in only one with Luxor](https://discourse.julialang.org/t/joint-all-layers-in-only-one-with-luxor/87798)

<div class="topic-metadata">

**Author:** [@jdavidc](https://discourse.julialang.org/u/jdavidc)\
**Replies:** 1\
**Last updated:** [September 26, 2022, 7:35am UTC](https://discourse.julialang.org/t/joint-all-layers-in-only-one-with-luxor/87798 "2022-09-26T07:35:58Z")

</div>

I am doing an image pixel by pixel using Luxor.rect(), but I need to collapse all my “squares” in only one layer. I want to export the image as a vector because I need to use it as a CAD file and having many layers is a …

---

## [Fixing GBQ.jl - Dict to DataFrames](https://discourse.julialang.org/t/fixing-gbq-jl-dict-to-dataframes/87685)

<div class="topic-metadata">

**Author:** [@Billpete002](https://discourse.julialang.org/u/Billpete002)\
**Replies:** 5\
**Last updated:** [September 26, 2022, 6:50am UTC](https://discourse.julialang.org/t/fixing-gbq-jl-dict-to-dataframes/87685 "2022-09-26T06:50:26Z")

</div>

Hi All, I am trying to fix GBQ.jl (as it seems to be the only 100% easy way to access Google Big Query, correct me if I am wrong). When running it with DataFrames 0.27 it works fine, but using the latest version it no l…

---

## [CUDA.jl kernel is half as fast as c++ Kernel](https://discourse.julialang.org/t/cuda-jl-kernel-is-half-as-fast-as-c-kernel/87651)

<div class="topic-metadata">

**Author:** [@fft](https://discourse.julialang.org/u/fft)\
**Replies:** 11\
**Last updated:** [September 26, 2022, 2:19am UTC](https://discourse.julialang.org/t/cuda-jl-kernel-is-half-as-fast-as-c-kernel/87651 "2022-09-26T02:19:11Z")

</div>

I have a kernel I wrote using CUDA.jl. It gets the correct answer, but is half as fast as the equivalent c++/cuda kernel I coded up. I was hoping someone could look at it and see if there are any optimizations to be done…

---

## [Check if my Plot is Right for sin(|x|)](https://discourse.julialang.org/t/check-if-my-plot-is-right-for-sin-x/87216)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 5\
**Last updated:** [September 26, 2022, 2:17am UTC](https://discourse.julialang.org/t/check-if-my-plot-is-right-for-sin-x/87216 "2022-09-26T02:17:43Z")

</div>

Hi all, I want to know whether my plot for \\sin (|x|) is correct or not, this is the code: using Plots, LaTeXStrings gr() function pitick(start, stop, denom; mode=:text) a = Int(cld(start, π/denom)) b = Int(fl…

---

## [Objects of type SparseArrays.SparseMatrixCSC{Float64, Int64} are not callable](https://discourse.julialang.org/t/objects-of-type-sparsearrays-sparsematrixcsc-float64-int64-are-not-callable/87791)

<div class="topic-metadata">

**Author:** [@m\_shah2](https://discourse.julialang.org/u/m_shah2)\
**Replies:** 1\
**Last updated:** [September 25, 2022, 11:39pm UTC](https://discourse.julialang.org/t/objects-of-type-sparsearrays-sparsematrixcsc-float64-int64-are-not-callable/87791 "2022-09-25T23:39:01Z")

</div>

When I try to run T\_motif = spectral\_embedding(W, 3); T\_edge = spectral\_embedding(max.(A, A’), 3); I get an error: MethodError: objects of type SparseArrays.SparseMatrixCSC{Float64, Int64} are not callable Use squar…

---

## [How to highlight Julia's code on web using Highlight.js](https://discourse.julialang.org/t/how-to-highlight-julias-code-on-web-using-highlight-js/87786)

<div class="topic-metadata">

**Author:** [@Reza-Reza](https://discourse.julialang.org/u/Reza-Reza)\
**Replies:** 1\
**Last updated:** [September 25, 2022, 9:02pm UTC](https://discourse.julialang.org/t/how-to-highlight-julias-code-on-web-using-highlight-js/87786 "2022-09-25T21:02:03Z")

</div>

Highlight.js does not seem to support Julia. Does anybody know a workaround to add Julia support. I use blogspot service and a CDN service of highlight.js to stylize Python code, which does not work for Julia since it is…

---

## [Return value optimization and named return value optimization](https://discourse.julialang.org/t/return-value-optimization-and-named-return-value-optimization/87782)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 7\
**Last updated:** [September 25, 2022, 8:27pm UTC](https://discourse.julialang.org/t/return-value-optimization-and-named-return-value-optimization/87782 "2022-09-25T20:27:00Z")

</div>

Does Julia have these optimizations available like in C++? I.e., if I preallocate a value in the caller to store the return from the callee, will the callee write to that memory, or will it be allocated and then copied? …

---

## [Help with real-time performance needed](https://discourse.julialang.org/t/help-with-real-time-performance-needed/87635)

<div class="topic-metadata">

**Author:** [@tt1234567](https://discourse.julialang.org/u/tt1234567)\
**Replies:** 20\
**Last updated:** [September 25, 2022, 7:14pm UTC](https://discourse.julialang.org/t/help-with-real-time-performance-needed/87635 "2022-09-25T19:14:50Z")

</div>

I have an application which reads sensor data packets from a UDP multicast socket over a dedicated ethernet link, processes them and updates a display using the excellent Makie. This was working fine on our original syst…

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

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