# General Usage

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

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

**Page:** 255

---

## [DuckDB.jl does not free memory](https://discourse.julialang.org/t/duckdb-jl-does-not-free-memory/103159)

<div class="topic-metadata">

**Author:** [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Replies:** 1\
**Last updated:** [August 24, 2023, 6:17pm UTC](https://discourse.julialang.org/t/duckdb-jl-does-not-free-memory/103159 "2023-08-24T18:17:49Z")

</div>

I am having an issue with memory allocation using the DuckDB.jl package. I am querying subsets of a large table (in a database stored in a file) and writing the results to a file. Given a table with columns id1, id2, fir…

---

## [How to interrupt a long-running ccall C/C++ library?](https://discourse.julialang.org/t/how-to-interrupt-a-long-running-ccall-c-c-library/103145)

<div class="topic-metadata">

**Author:** [@physcxia](https://discourse.julialang.org/u/physcxia)\
**Replies:** 1\
**Last updated:** [August 24, 2023, 5:02pm UTC](https://discourse.julialang.org/t/how-to-interrupt-a-long-running-ccall-c-c-library/103145 "2023-08-24T17:02:10Z")

</div>

How can I interrupt a ccall C/C++ function with Ctrl-C, or interrupt it in Jupyter Notebook? It seems that the Keyboard Interrupt is not passed to the external C library.

---

## [Functor Syntax is not working](https://discourse.julialang.org/t/functor-syntax-is-not-working/97631)

<div class="topic-metadata">

**Author:** [@Nobel\_Chowdary](https://discourse.julialang.org/u/Nobel_Chowdary)\
**Replies:** 3\
**Last updated:** [August 24, 2023, 4:11pm UTC](https://discourse.julialang.org/t/functor-syntax-is-not-working/97631 "2023-08-24T16:11:33Z")

</div>

The following code shows the two schemas and a functor between them. However, the basic syntax of the functor is throwing errors. Can someone help me with this? using Catlab, Catlab.Theories, Catlab.CategoricalAlgebra @…

---

## [What's wrong with this ordering function?](https://discourse.julialang.org/t/whats-wrong-with-this-ordering-function/103160)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 5\
**Last updated:** [August 24, 2023, 3:21pm UTC](https://discourse.julialang.org/t/whats-wrong-with-this-ordering-function/103160 "2023-08-24T15:21:57Z")

</div>

Hi, I have a vector of tuples like this: julia\> results 75-element Vector{NamedTuple{(:program, :mean, :stddev, :score), Tuple{String, Float64, Float64, Float64}}}: (program = "fac\_ite\_#0", mean = 0.1477079562429519, s…

---

## [How to plot outside of a notebook using GLMakie?](https://discourse.julialang.org/t/how-to-plot-outside-of-a-notebook-using-glmakie/103143)

<div class="topic-metadata">

**Author:** [@Reza-Reza](https://discourse.julialang.org/u/Reza-Reza)\
**Replies:** 4\
**Last updated:** [August 24, 2023, 3:08pm UTC](https://discourse.julialang.org/t/how-to-plot-outside-of-a-notebook-using-glmakie/103143 "2023-08-24T15:08:45Z")

</div>

When I plot using GLMakie it plots inside the notebook. Is there a way to plot outside the notebook? For example, for Python the command %matplotlib qt allows plotting outside a notebook. Is there a similar command for J…

---

## [How to add axes to a 3d scene with makie](https://discourse.julialang.org/t/how-to-add-axes-to-a-3d-scene-with-makie/103158)

<div class="topic-metadata">

**Author:** [@timlewejohann](https://discourse.julialang.org/u/timlewejohann)\
**Replies:** 0\
**Last updated:** [August 24, 2023, 1:45pm UTC](https://discourse.julialang.org/t/how-to-add-axes-to-a-3d-scene-with-makie/103158 "2023-08-24T13:45:08Z")

</div>

I want to plot the mesh of two polyhedrons into the same plot. Now i am able to plot both into a scene and adjust the camera accordingly. However when plotting without a scene just calling the mesh method a coordinate fr…

---

## [Error in installing FLOWNoise package](https://discourse.julialang.org/t/error-in-installing-flownoise-package/103153)

<div class="topic-metadata">

**Author:** [@orange\_67](https://discourse.julialang.org/u/orange_67)\
**Replies:** 0\
**Last updated:** [August 24, 2023, 12:28pm UTC](https://discourse.julialang.org/t/error-in-installing-flownoise-package/103153 "2023-08-24T12:28:40Z")

</div>

julia\> import Pkg; Pkg.precompile() Precompiling project… ✗ FLOWNoise 0 dependencies successfully precompiled in 8 seconds. 173 already precompiled. ERROR: The following 1 direct dependency failed to precompile: FLO…

---

## [Invalidation from extending \`Base.reduce\_first\`](https://discourse.julialang.org/t/invalidation-from-extending-base-reduce-first/103146)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [August 24, 2023, 9:09am UTC](https://discourse.julialang.org/t/invalidation-from-extending-base-reduce-first/103146 "2023-08-24T09:09:37Z")

</div>

FillArrays has recently introduced a specialization Base.reduce\_first(::typeof(+), x::Ones) = Fill(Base.reduce\_first(+, getindex\_value(x)), axes(x)) On v1.10.0-beta2, this seems to introduce invalidations (although not…

---

## [Generating Julia binaries with JuMP issue](https://discourse.julialang.org/t/generating-julia-binaries-with-jump-issue/103072)

<div class="topic-metadata">

**Author:** [@Rajender\_Mudigonda](https://discourse.julialang.org/u/Rajender_Mudigonda)\
**Replies:** 2\
**Last updated:** [August 24, 2023, 7:55am UTC](https://discourse.julialang.org/t/generating-julia-binaries-with-jump-issue/103072 "2023-08-24T07:55:05Z")

</div>

I want to create an executable for the julia file., for this i try to follow the instructions from link Creating a binary from Julia code · PackageCompiler when i try the below command on windows with julia version 1.9.…

---

## [Set flushing mode for output stream](https://discourse.julialang.org/t/set-flushing-mode-for-output-stream/102546)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 10\
**Last updated:** [August 23, 2023, 8:38am UTC](https://discourse.julialang.org/t/set-flushing-mode-for-output-stream/102546 "2023-08-23T08:38:10Z")

</div>

Is there a way either 1) to specify the flushing mode of an existing output stream or 2) to create a new stream that has the desired flushing mode? \[Edit: the output stream needs to be connected to the “screen” (console)…

---

## [Status of BFloat16](https://discourse.julialang.org/t/status-of-bfloat16/103109)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 4\
**Last updated:** [August 24, 2023, 6:57am UTC](https://discourse.julialang.org/t/status-of-bfloat16/103109 "2023-08-24T06:57:06Z")

</div>

Hello, I have tried Llama2 large language model in Julia following https://github.com/chengchingwen/Transformers.jl/blob/master/example/Llama2\_example.ipynb. This works really nice and smoothly, but, the example uses Fl…

---

## [Strange behavior of \`struct\` definition in REPL](https://discourse.julialang.org/t/strange-behavior-of-struct-definition-in-repl/103116)

<div class="topic-metadata">

**Author:** [@pao](https://discourse.julialang.org/u/pao)\
**Replies:** 5\
**Last updated:** [August 23, 2023, 10:53pm UTC](https://discourse.julialang.org/t/strange-behavior-of-struct-definition-in-repl/103116 "2023-08-23T22:53:24Z")

</div>

This does not seem correct to me … Tried anything, also using a development module. I’m using Julia-1.10.0.beta2 or Version 1.9.2 Same results. I’m in a deadlock !! Any clue? help?\> Main.HPC No documentation fou…

---

## [Reducing monthly data to yearly](https://discourse.julialang.org/t/reducing-monthly-data-to-yearly/103087)

<div class="topic-metadata">

**Author:** [@yvikhlya](https://discourse.julialang.org/u/yvikhlya)\
**Replies:** 9\
**Last updated:** [August 23, 2023, 10:25pm UTC](https://discourse.julialang.org/t/reducing-monthly-data-to-yearly/103087 "2023-08-23T22:25:23Z")

</div>

Hello All. I have a geospatial data in netCDF format with monthly frequency. Time variable is an array of DateTime objects. I want a selected variable var\[LAT, LON, DEPTH, MONTH\] to be reduced to var\[LAT, LON, DEPTH, YEA…

---

## [JuliaFormatter and VSCode - how to change options?](https://discourse.julialang.org/t/juliaformatter-and-vscode-how-to-change-options/72667)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 14\
**Last updated:** [August 18, 2023, 10:22am UTC](https://discourse.julialang.org/t/juliaformatter-and-vscode-how-to-change-options/72667 "2023-08-18T10:22:07Z")

</div>

I understand that the VSCode extension now uses the JuliaFormatter.jl package. This is great, but I’m a little perplexed as to where I’m supposed to put my .JuliaFormatter.toml since I can’t change it from the VSCode set…

---

## [Fresh install failed to build GR](https://discourse.julialang.org/t/fresh-install-failed-to-build-gr/103134)

<div class="topic-metadata">

**Author:** [@Yly](https://discourse.julialang.org/u/Yly)\
**Replies:** 0\
**Last updated:** [August 23, 2023, 9:06pm UTC](https://discourse.julialang.org/t/fresh-install-failed-to-build-gr/103134 "2023-08-23T21:06:22Z")

</div>

I just installed the latest version of Julia (1.9.2) on a windows machine, which has version 1.7.3 already installed. I ran the new version of Julia and immediately installed Pluto, Plots, and a few other packages. Plo…

---

## [PackageCompiler compilation time \> 2h](https://discourse.julialang.org/t/packagecompiler-compilation-time-2h/101910)

<div class="topic-metadata">

**Author:** [@martin.d.maas](https://discourse.julialang.org/u/martin.d.maas)\
**Replies:** 15\
**Last updated:** [August 23, 2023, 8:22pm UTC](https://discourse.julialang.org/t/packagecompiler-compilation-time-2h/101910 "2023-08-23T20:22:53Z")

</div>

I’m trying to compile my project to a standalone executable with PackageCompiler.jl. I have used PackageCompiler before just for toying around, and I remember compilation times were slow, but now with a real codebase (2…

---

## [Plots/GR in IJulia, larger file](https://discourse.julialang.org/t/plots-gr-in-ijulia-larger-file/103127)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 0\
**Last updated:** [August 23, 2023, 7:38pm UTC](https://discourse.julialang.org/t/plots-gr-in-ijulia-larger-file/103127 "2023-08-23T19:38:19Z")

</div>

Since the latest Plots.jl update my ipynb notebooks with plots are much larger (was 200kB, is now 700kB). Any suggestions? (btw. something similar happened before some years ago and was later fixed.)

---

## [How to let a function return some numerical values and a graph simutaneously?](https://discourse.julialang.org/t/how-to-let-a-function-return-some-numerical-values-and-a-graph-simutaneously/103101)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 1\
**Last updated:** [August 23, 2023, 4:48am UTC](https://discourse.julialang.org/t/how-to-let-a-function-return-some-numerical-values-and-a-graph-simutaneously/103101 "2023-08-23T04:48:49Z")

</div>

For example: using UnicodePlots function func(n) r = randn(n) s = sum(r) hist = histogram(r, nbins=10, closed=:left) r, s, hist end If I call this function in the REPL, it returns: julia\> func(10) (\[1…

---

## [Appending julia objects to a file (JLD)](https://discourse.julialang.org/t/appending-julia-objects-to-a-file-jld/103099)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 0\
**Last updated:** [August 23, 2023, 3:20am UTC](https://discourse.julialang.org/t/appending-julia-objects-to-a-file-jld/103099 "2023-08-23T03:20:13Z")

</div>

I quite like the JSONL format (have a file just be one JSON blob after the other). It’s useful for appending results, logging etc. What would be the equivalent in the julia ecosystem? I want to open("somefile", "a+") do…

---

## [Implementing argument ownership on my own function](https://discourse.julialang.org/t/implementing-argument-ownership-on-my-own-function/103096)

<div class="topic-metadata">

**Author:** [@minetest2048](https://discourse.julialang.org/u/minetest2048)\
**Replies:** 2\
**Last updated:** [August 23, 2023, 1:09am UTC](https://discourse.julialang.org/t/implementing-argument-ownership-on-my-own-function/103096 "2023-08-23T01:09:58Z")

</div>

I want my function to take ownership of the arguments, like how String constructor takes ownership of the UInt8\[\] array: julia\> mybytes = UInt8.(\[125, 119, 48, 126, 40\]); julia\> mystring = String(mybytes) "}w0~(" juli…

---

## [Dispatching on module to prove ownership in package extensions](https://discourse.julialang.org/t/dispatching-on-module-to-prove-ownership-in-package-extensions/103037)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 7\
**Last updated:** [August 23, 2023, 1:09am UTC](https://discourse.julialang.org/t/dispatching-on-module-to-prove-ownership-in-package-extensions/103037 "2023-08-23T01:09:17Z")

</div>

I was watching @kristoffer.carlsson’s JuliCon talk on Package Extensions and I was quite interested in the discussion about “proving” dependencies to ensure that a user explicitly loads the package for which there is a p…

---

## [Point2f removed from Makie?](https://discourse.julialang.org/t/point2f-removed-from-makie/103088)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 3\
**Last updated:** [August 22, 2023, 9:40pm UTC](https://discourse.julialang.org/t/point2f-removed-from-makie/103088 "2023-08-22T21:40:13Z")

</div>

Hi everyone. I have some older Makie based plots, and I am reusing it and now I get this error: ERROR: LoadError: UndefVarError: \`Point2f\` not defined Stacktrace: \[1\] top-level scope @ util.jl:589 \[2\] include(mod…

---

## [XLSX parsing DateTime](https://discourse.julialang.org/t/xlsx-parsing-datetime/103071)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 2\
**Last updated:** [August 22, 2023, 4:35pm UTC](https://discourse.julialang.org/t/xlsx-parsing-datetime/103071 "2023-08-22T16:35:38Z")

</div>

I am loading data from an Excel file that includes DateTime data. The DateTime string, when the time is 0:00 is parsed as a Date instead of a DateTime. An example of the data being loaded is: Date a 2023-07-11 0:00 45…

---

## [Inner and Outer constructors with Parameters.jl prevent incremental compilation?](https://discourse.julialang.org/t/inner-and-outer-constructors-with-parameters-jl-prevent-incremental-compilation/103061)

<div class="topic-metadata">

**Author:** [@Iddingsite](https://discourse.julialang.org/u/Iddingsite)\
**Replies:** 2\
**Last updated:** [August 22, 2023, 4:21pm UTC](https://discourse.julialang.org/t/inner-and-outer-constructors-with-parameters-jl-prevent-incremental-compilation/103061 "2023-08-22T16:21:49Z")

</div>

Hi all! I am trying to familiarise myself with outer and inner constructors and I would like to know if I am doing something wrong. I wrote a structure with 1 outer and 1 inner constructor, using also Parameters and Uni…

---

## [Multiple-threading does not increase speed in my 16-threads workstation, I am wondering is there something wrong in my code?](https://discourse.julialang.org/t/multiple-threading-does-not-increase-speed-in-my-16-threads-workstation-i-am-wondering-is-there-something-wrong-in-my-code/103076)

<div class="topic-metadata">

**Author:** [@Kim](https://discourse.julialang.org/u/Kim)\
**Replies:** 3\
**Last updated:** [August 22, 2023, 4:02pm UTC](https://discourse.julialang.org/t/multiple-threading-does-not-increase-speed-in-my-16-threads-workstation-i-am-wondering-is-there-something-wrong-in-my-code/103076 "2023-08-22T16:02:25Z")

</div>

Hi, I am recently trying to leverage multiple threading to speed my code. However, even though I likely realized multiple threading, my code run slower. Could somebody proficient in this have a skim on this? My code is p…

---

## [Julia crashes when trying to call Windows API EnumWindows](https://discourse.julialang.org/t/julia-crashes-when-trying-to-call-windows-api-enumwindows/103065)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 0\
**Last updated:** [August 22, 2023, 1:47pm UTC](https://discourse.julialang.org/t/julia-crashes-when-trying-to-call-windows-api-enumwindows/103065 "2023-08-22T13:47:50Z")

</div>

I’m guessing I just have the signature wrong or something here? This is Julia 1.9.0 on Windows 11. Trying to call the Win32 API EnumWindows. By the error message, it appears to be something wrong with the callback. us…

---

## [Atomic much slower than @spawn-ed tasks](https://discourse.julialang.org/t/atomic-much-slower-than-spawn-ed-tasks/103055)

<div class="topic-metadata">

**Author:** [@AdaemmerP](https://discourse.julialang.org/u/AdaemmerP)\
**Replies:** 4\
**Last updated:** [August 22, 2023, 1:09pm UTC](https://discourse.julialang.org/t/atomic-much-slower-than-spawn-ed-tasks/103055 "2023-08-22T13:09:04Z")

</div>

The Julia manual offers two solutions to avoid a race condition when using @threads, namely @spawn-ed tasks and atomic operations. The manual states that the atomic approach “may be more performant depending on the chara…

---

## [Need to define types before use](https://discourse.julialang.org/t/need-to-define-types-before-use/103054)

<div class="topic-metadata">

**Author:** [@Kruxigt](https://discourse.julialang.org/u/Kruxigt)\
**Replies:** 7\
**Last updated:** [August 22, 2023, 9:32am UTC](https://discourse.julialang.org/t/need-to-define-types-before-use/103054 "2023-08-22T09:32:04Z")

</div>

Hi good folks! One of my pet peeves with Julia is the need to define types in the code above the lines where they are used. I have a few questions regarding this. 1, Is this a technical limitation or a design choice? 2…

---

## [Cannot run one package extension but the other](https://discourse.julialang.org/t/cannot-run-one-package-extension-but-the-other/103051)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 2\
**Last updated:** [August 22, 2023, 2:51am UTC](https://discourse.julialang.org/t/cannot-run-one-package-extension-but-the-other/103051 "2023-08-22T02:51:36Z")

</div>

I have the following code here, where I define 2 package extensions: BrillouinSpglibExt & PeriodicTableExt. However, I can run the extension BrillouinSpglibExt but not the PeriodicTableExt. I met the following errors whe…

---

## [How to stop test output from automatically displaying in terminal pane](https://discourse.julialang.org/t/how-to-stop-test-output-from-automatically-displaying-in-terminal-pane/103047)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 2\
**Last updated:** [August 22, 2023, 1:54am UTC](https://discourse.julialang.org/t/how-to-stop-test-output-from-automatically-displaying-in-terminal-pane/103047 "2023-08-22T01:54:00Z")

</div>

I’m using the TestItemRunner.jl package to do my testing in VSCode. The terminal panel recently started switching to another terminal to display the test output every time I run tests. I don’t want it to do this and did…

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

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