# General Usage

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

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

**Page:** 528

---

## [Print to terminal instead of to Jupyter Notebook](https://discourse.julialang.org/t/print-to-terminal-instead-of-to-jupyter-notebook/70391)

<div class="topic-metadata">

**Author:** [@ismedina](https://discourse.julialang.org/u/ismedina)\
**Replies:** 4\
**Last updated:** [October 28, 2021, 10:33am UTC](https://discourse.julialang.org/t/print-to-terminal-instead-of-to-jupyter-notebook/70391 "2021-10-28T10:33:40Z")

</div>

I have a function that does some calculation and prints the ongoing progress, say function f() for i in 1:10 sleep(0.1) println(i) end end When running it in a Jupyter Notebook, the output …

---

## [How does function inlining reflect on the profiling output?](https://discourse.julialang.org/t/how-does-function-inlining-reflect-on-the-profiling-output/70471)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [October 28, 2021, 9:46am UTC](https://discourse.julialang.org/t/how-does-function-inlining-reflect-on-the-profiling-output/70471 "2021-10-28T09:46:23Z")

</div>

I have a Julia program. It includes a big function which calls another, small, function in two places. Profiling the execution and displaying a flame graph with ProfileView shows that most of the time is spent in the sm…

---

## [StatsPlots & corrplot -- missing color scheme?](https://discourse.julialang.org/t/statsplots-corrplot-missing-color-scheme/70487)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 2\
**Last updated:** [October 28, 2021, 6:37am UTC](https://discourse.julialang.org/t/statsplots-corrplot-missing-color-scheme/70487 "2021-10-28T06:37:10Z")

</div>

I’m trying to do an example at GitHub - JuliaPlots/StatsPlots.jl: Statistical plotting recipes for Plots.jl on how to use corrplot: M = randn(1000,4) M\[:,2\] .+= 0.8sqrt.(abs.(M\[:,1\])) .- 0.5M\[:,3\] .+ 5 M\[:,3\] .-= 0.7M\[:…

---

## [\] dev "c:/path/pack" errors "could not find project file"](https://discourse.julialang.org/t/dev-c-path-pack-errors-could-not-find-project-file/70382)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 5\
**Last updated:** [October 28, 2021, 6:25am UTC](https://discourse.julialang.org/t/dev-c-path-pack-errors-could-not-find-project-file/70382 "2021-10-28T06:25:27Z")

</div>

Hi, I have created a package, to be shared with colleagues (via a zip… I know…). Unpacked, the folder structure is C:/.../Lithe/ .git docs/ src/ Lithe.jl MoreStuff.jl …

---

## [Dynamic dispatch with Union{Nothing, ...}](https://discourse.julialang.org/t/dynamic-dispatch-with-union-nothing/70174)

<div class="topic-metadata">

**Author:** [@goerch](https://discourse.julialang.org/u/goerch)\
**Replies:** 8\
**Last updated:** [October 28, 2021, 4:43am UTC](https://discourse.julialang.org/t/dynamic-dispatch-with-union-nothing/70174 "2021-10-28T04:43:19Z")

</div>

When benchmarking a data structure we encountered an interesting phenomenon. The data structure is mutable struct Node{K,D} parent::Union{Node{K,D},Nothing} left::Union{Node{K,D},Nothing} right::Union{Node{K…

---

## [Controls the number of LBFGS iterations with optim.jl](https://discourse.julialang.org/t/controls-the-number-of-lbfgs-iterations-with-optim-jl/70455)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 5\
**Last updated:** [October 28, 2021, 2:51am UTC](https://discourse.julialang.org/t/controls-the-number-of-lbfgs-iterations-with-optim-jl/70455 "2021-10-28T02:51:38Z")

</div>

I want to use the LBFGS() method in optim package to optimize. Usually LBFGS will do many linearSearch, but I only want it to do one iteration. How to do that? LBFGS

---

## ['BinaryMaxHeap' of tuples ordered on second element?](https://discourse.julialang.org/t/binarymaxheap-of-tuples-ordered-on-second-element/70524)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 0\
**Last updated:** [October 27, 2021, 11:42pm UTC](https://discourse.julialang.org/t/binarymaxheap-of-tuples-ordered-on-second-element/70524 "2021-10-27T23:42:51Z")

</div>

I have some Float64 data: julia\> data = rand(10) 10-element Vector{Float64}: 0.7812532624261221 0.21171331164805607 0.17972757757421154 0.18741269983325282 0.42157861540422026 0.7922059340808225 0.258799529427459…

---

## [Easy way to run benchmarks quickly](https://discourse.julialang.org/t/easy-way-to-run-benchmarks-quickly/70406)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 2\
**Last updated:** [October 27, 2021, 11:53pm UTC](https://discourse.julialang.org/t/easy-way-to-run-benchmarks-quickly/70406 "2021-10-27T23:53:03Z")

</div>

Why does @benchmark take so long even when evals is manually specified? using BenchmarkTools count = 0 @elapsed @benchmark (global count += 1; sleep(.05)) evals=1 samples=10 # 1.68 @elapsed for i in 1:count; sleep(.05)…

---

## [Pinging creators of JLD.jl](https://discourse.julialang.org/t/pinging-creators-of-jld-jl/70502)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 1\
**Last updated:** [October 27, 2021, 11:09pm UTC](https://discourse.julialang.org/t/pinging-creators-of-jld-jl/70502 "2021-10-27T23:09:59Z")

</div>

Hi! In its current state, JLD.jl does not work for Julia v1.7. I have already elaborated a PR and is passing the tests, but nobody is merging it. I don’t want to get pushy at all; I know that this is Open Source, and e…

---

## [Iterative pair-wise fold](https://discourse.julialang.org/t/iterative-pair-wise-fold/70518)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 1\
**Last updated:** [October 27, 2021, 10:15pm UTC](https://discourse.julialang.org/t/iterative-pair-wise-fold/70518 "2021-10-27T22:15:36Z")

</div>

Is there an iterator or a fold-like function that will take a collection and a function and will apply the function iteratively to neighbour elements pairs until only one element remains? E.g \[1,2,3\] and /: \[1,2,3\] \[1/2…

---

## [GTK Entry Completion Widget](https://discourse.julialang.org/t/gtk-entry-completion-widget/70516)

<div class="topic-metadata">

**Author:** [@SergeantMike67](https://discourse.julialang.org/u/SergeantMike67)\
**Replies:** 0\
**Last updated:** [October 27, 2021, 9:14pm UTC](https://discourse.julialang.org/t/gtk-entry-completion-widget/70516 "2021-10-27T21:14:33Z")

</div>

Does anyone have experience using Gtk.jl to set the GTK EntryCompletion? The GTK documents say to use "To add completion functionality to an entry, use gtk\_entry\_set\_completion()" I have no idea what to do here.

---

## [Submodules AbstractAlgebra](https://discourse.julialang.org/t/submodules-abstractalgebra/70308)

<div class="topic-metadata">

**Author:** [@Gilles\_Dubois](https://discourse.julialang.org/u/Gilles_Dubois)\
**Replies:** 5\
**Last updated:** [October 27, 2021, 8:30pm UTC](https://discourse.julialang.org/t/submodules-abstractalgebra/70308 "2021-10-27T20:30:50Z")

</div>

Hi everybody ! I’m now busy with the submodule concept as described in AbstractAlgebra package documentation. I noticed that, on my point of view, a lot of things are missing in the interface. For example as a minimum…

---

## [Base.run and ansi colours](https://discourse.julialang.org/t/base-run-and-ansi-colours/69611)

<div class="topic-metadata">

**Author:** [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Replies:** 1\
**Last updated:** [October 27, 2021, 6:19pm UTC](https://discourse.julialang.org/t/base-run-and-ansi-colours/69611 "2021-10-27T18:19:49Z")

</div>

Hi, Recently, ansi colours haven’t been working for me (using the git bash shell in VSCode). I thought it might be VSCode, but I’m starting to wonder if it’s Julia (I’m using 1.6.3). I think it might be related to Bas…

---

## [Why the performance varies greatly after @view?](https://discourse.julialang.org/t/why-the-performance-varies-greatly-after-view/70495)

<div class="topic-metadata">

**Author:** [@zhangjin](https://discourse.julialang.org/u/zhangjin)\
**Replies:** 2\
**Last updated:** [October 27, 2021, 5:23pm UTC](https://discourse.julialang.org/t/why-the-performance-varies-greatly-after-view/70495 "2021-10-27T17:23:50Z")

</div>

I focus on the following code’s efficient, and I use the TimerOutputs to measure the performance. using TimerOutputs const to = TimerOutput() abstract type AbstractSN end struct spi \<: AbstractSN M::Int8 …

---

## [How to set resolution in GLMakie.mesh()?](https://discourse.julialang.org/t/how-to-set-resolution-in-glmakie-mesh/70492)

<div class="topic-metadata">

**Author:** [@Simbelmyne](https://discourse.julialang.org/u/Simbelmyne)\
**Replies:** 1\
**Last updated:** [October 27, 2021, 4:56pm UTC](https://discourse.julialang.org/t/how-to-set-resolution-in-glmakie-mesh/70492 "2021-10-27T16:56:01Z")

</div>

Hey, I am trying to change the resolution of a 2D mesh plot: scene = GLMakie.mesh(vertices, faces, color = colors, shading = false, resolution=(500,500)) However, this does not appear to work, it always defaults to 80…

---

## [Question about MLJ](https://discourse.julialang.org/t/question-about-mlj/70458)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 6\
**Last updated:** [October 27, 2021, 2:27pm UTC](https://discourse.julialang.org/t/question-about-mlj/70458 "2021-10-27T14:27:27Z")

</div>

I want to make a multivariate probability prediction, and this is my current MLJ model search, but I don’t know if these models are valid. How can I find an efficient prediction model for my data? task(model) = model.is…

---

## [List comprehension \`no method matching zero\` issue](https://discourse.julialang.org/t/list-comprehension-no-method-matching-zero-issue/70472)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 3\
**Last updated:** [October 27, 2021, 1:41pm UTC](https://discourse.julialang.org/t/list-comprehension-no-method-matching-zero-issue/70472 "2021-10-27T13:41:01Z")

</div>

Hello, good morning, I had a following code block failing when I’m doing a loop for get a vector of results in a monte carlo simulation. Can’t understand why I got the issue above: in line below: mc\_estimate = sum(\[in…

---

## [Selecting DataFrame columns with Symbol Syntax for columns with non-alphabetical characters](https://discourse.julialang.org/t/selecting-dataframe-columns-with-symbol-syntax-for-columns-with-non-alphabetical-characters/70466)

<div class="topic-metadata">

**Author:** [@DorianT](https://discourse.julialang.org/u/DorianT)\
**Replies:** 7\
**Last updated:** [October 27, 2021, 1:55pm UTC](https://discourse.julialang.org/t/selecting-dataframe-columns-with-symbol-syntax-for-columns-with-non-alphabetical-characters/70466 "2021-10-27T13:55:54Z")

</div>

using DataFrames df = DataFrame(Firstcolumn = 1:5, Secondcolumn = 1:5) rename!(df, \["Firstcolumn","Second-column"\]) # this works just fine df\[:,:Firstcolumn\] # this does not work df\[:,:Second-column\] # also does n…

---

## [VS Code debugging video tutorial](https://discourse.julialang.org/t/vs-code-debugging-video-tutorial/70422)

<div class="topic-metadata">

**Author:** [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Replies:** 6\
**Last updated:** [October 27, 2021, 12:58pm UTC](https://discourse.julialang.org/t/vs-code-debugging-video-tutorial/70422 "2021-10-27T12:58:46Z")

</div>

Hello, is there any tutorial video showing debugging using VS Code?

---

## [Cannot install julia on my ssh command line](https://discourse.julialang.org/t/cannot-install-julia-on-my-ssh-command-line/70456)

<div class="topic-metadata">

**Author:** [@iiisoo](https://discourse.julialang.org/u/iiisoo)\
**Replies:** 3\
**Last updated:** [October 27, 2021, 8:13am UTC](https://discourse.julialang.org/t/cannot-install-julia-on-my-ssh-command-line/70456 "2021-10-27T08:13:04Z")

</div>

---

## [FileIO without filesystem access?](https://discourse.julialang.org/t/fileio-without-filesystem-access/70429)

<div class="topic-metadata">

**Author:** [@sporklpony](https://discourse.julialang.org/u/sporklpony)\
**Replies:** 3\
**Last updated:** [October 27, 2021, 7:08am UTC](https://discourse.julialang.org/t/fileio-without-filesystem-access/70429 "2021-10-27T07:08:31Z")

</div>

I’d like to use Pluto.jl to create a small utility which processes and uploaded audio file. However, I’m unsure how to convert the uploaded audio file into a format usable with JuliaAudio’s ecosystem and SampledSignals.j…

---

## [Errors associated with "using GMT"](https://discourse.julialang.org/t/errors-associated-with-using-gmt/70393)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 28\
**Last updated:** [October 27, 2021, 3:50am UTC](https://discourse.julialang.org/t/errors-associated-with-using-gmt/70393 "2021-10-27T03:50:15Z")

</div>

I just installed the mapping package to my Julia and I can verify that my GMT package was installed: Pkg.status("GMT") Status \`~/.julia/environments/v1.6/Project.toml\` \[5752ebe1\] GMT v0.37.1 However, a simple “…

---

## [Getting union/tuple covariance for maps between parallel type hierarchies](https://discourse.julialang.org/t/getting-union-tuple-covariance-for-maps-between-parallel-type-hierarchies/70060)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 17\
**Last updated:** [October 27, 2021, 1:44am UTC](https://discourse.julialang.org/t/getting-union-tuple-covariance-for-maps-between-parallel-type-hierarchies/70060 "2021-10-27T01:44:26Z")

</div>

Sorry, this title isn’t great but not sure what to put there :roll\_eyes: I am working on the parallel type hierarchy that’s part of ScientificTypes.jl and we have a function Scitype that maps types to types. I want the …

---

## [Documentation not deployed despite make.jl saying it is](https://discourse.julialang.org/t/documentation-not-deployed-despite-make-jl-saying-it-is/70441)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 1\
**Last updated:** [October 27, 2021, 1:23am UTC](https://discourse.julialang.org/t/documentation-not-deployed-despite-make-jl-saying-it-is/70441 "2021-10-27T01:23:13Z")

</div>

I think I set up the documentation for my new package correctly. Here’s a screen shot from Github: However, the documentation link is still broken: Home · Knockoffs.jl Does anyone know why? Does this have to do wi…

---

## [Cannot read stream serialized with a newer version of Julia](https://discourse.julialang.org/t/cannot-read-stream-serialized-with-a-newer-version-of-julia/70446)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 2\
**Last updated:** [October 27, 2021, 12:41am UTC](https://discourse.julialang.org/t/cannot-read-stream-serialized-with-a-newer-version-of-julia/70446 "2021-10-27T00:41:05Z")

</div>

I am trying to read a file created in a different machine, and I get this error which seems to be a version mismatch error. My Julia is version 1.5.3. I have no idea how to proceed from this point. julia\> using Serializ…

---

## [How to improve performance in nested loops](https://discourse.julialang.org/t/how-to-improve-performance-in-nested-loops/70407)

<div class="topic-metadata">

**Author:** [@claudio20497](https://discourse.julialang.org/u/claudio20497)\
**Replies:** 3\
**Last updated:** [October 26, 2021, 10:34pm UTC](https://discourse.julialang.org/t/how-to-improve-performance-in-nested-loops/70407 "2021-10-26T22:34:50Z")

</div>

Hello, I’m writing a function whose performance suffers because of a nested for-loop. Below is a simplified version of that function. The function f() takes no arguments, and instantiates vecvec a vector of vectors of I…

---

## [Remove single quote from command line](https://discourse.julialang.org/t/remove-single-quote-from-command-line/70434)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 1\
**Last updated:** [October 26, 2021, 9:07pm UTC](https://discourse.julialang.org/t/remove-single-quote-from-command-line/70434 "2021-10-26T21:07:31Z")

</div>

Why is there extra single quotes in this command? args = \["--arg1 hi.txt", "--arg2 bye.txt"\] cmd = \`myscript $args\` \`myscript '--arg1 hi.txt' '--arg2 bye.txt'\` How do I get just \`myscript --arg1 hi.txt --arg2 bye.txt…

---

## [Understanding dependencies and reproducibility](https://discourse.julialang.org/t/understanding-dependencies-and-reproducibility/70419)

<div class="topic-metadata">

**Author:** [@shiroghost](https://discourse.julialang.org/u/shiroghost)\
**Replies:** 4\
**Last updated:** [October 26, 2021, 8:30pm UTC](https://discourse.julialang.org/t/understanding-dependencies-and-reproducibility/70419 "2021-10-26T20:30:12Z")

</div>

Hi all, I am trying to understand better reproducibility and the working of the Package manager. Let’s say that I develop a Package “A”, that depends on some third party packages (example CUDA.jl). Now I develop a prog…

---

## [Is there an easy way to get at the history of REPL input?](https://discourse.julialang.org/t/is-there-an-easy-way-to-get-at-the-history-of-repl-input/18025)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 23\
**Last updated:** [October 26, 2021, 1:44pm UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-get-at-the-history-of-repl-input/18025 "2021-10-26T13:44:20Z")

</div>

How does one get easily at the history of the input provided at the prompt? The \*nix shell has a function history which spits out numbered list of commands. Is there something like this in Julia?

---

## [Regex matching when string has non-ascii unicode](https://discourse.julialang.org/t/regex-matching-when-string-has-non-ascii-unicode/70311)

<div class="topic-metadata">

**Author:** [@sleak](https://discourse.julialang.org/u/sleak)\
**Replies:** 3\
**Last updated:** [October 26, 2021, 1:04pm UTC](https://discourse.julialang.org/t/regex-matching-when-string-has-non-ascii-unicode/70311 "2021-10-26T13:04:42Z")

</div>

I’m using regex to split a string and getting unexpected results when the input data contains non-ascii characters (specifically, a unicode \\xe8). In python I can do: \>\>\> import re \>\>\> s = "caf\\xe8" \>\>\> re.findall('.', …

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

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