# General Usage

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

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

**Page:** 398

---

## [How to return one value for a Matrix comparison with a value?](https://discourse.julialang.org/t/how-to-return-one-value-for-a-matrix-comparison-with-a-value/87159)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 7\
**Last updated:** [September 13, 2022, 2:24pm UTC](https://discourse.julialang.org/t/how-to-return-one-value-for-a-matrix-comparison-with-a-value/87159 "2022-09-13T14:24:28Z")

</div>

I want to compare the values of a matrix with a value (such such if bigger than zero) and return true if so. How can I do that, cause below is returning a mtrix? julia\> RR=ones(5,10) 5×10 Matrix{Float64}: 1.0 1.0 1.0…

---

## [Julia 1.8.1 absolutely does not work in VSCode](https://discourse.julialang.org/t/julia-1-8-1-absolutely-does-not-work-in-vscode/87141)

<div class="topic-metadata">

**Author:** [@abharg](https://discourse.julialang.org/u/abharg)\
**Replies:** 11\
**Last updated:** [September 13, 2022, 2:15pm UTC](https://discourse.julialang.org/t/julia-1-8-1-absolutely-does-not-work-in-vscode/87141 "2022-09-13T14:15:17Z")

</div>

I have tried uninstalling and reinstalling Julia 1.8.1, I have tried uninstalling and reinstalling VSCode, I have tried uninstalling and reinstalling the Julia extension in VSCode, I have checked that the settings.json f…

---

## [Updating to the current stable release (v1.8.1) using juliaup](https://discourse.julialang.org/t/updating-to-the-current-stable-release-v1-8-1-using-juliaup/87132)

<div class="topic-metadata">

**Author:** [@rud-lucien](https://discourse.julialang.org/u/rud-lucien)\
**Replies:** 4\
**Last updated:** [September 13, 2022, 2:11pm UTC](https://discourse.julialang.org/t/updating-to-the-current-stable-release-v1-8-1-using-juliaup/87132 "2022-09-13T14:11:30Z")

</div>

Hi, I was attempting to update to the latest stable release of Julia (v1.8.1) using juliaup, however I was unsuccessful. I tried \[juliaup self update\] and \[juliaup update release\] commands but was only able to update to…

---

## [Withprogress for Folds.jl](https://discourse.julialang.org/t/withprogress-for-folds-jl/87212)

<div class="topic-metadata">

**Author:** [@joeldahne](https://discourse.julialang.org/u/joeldahne)\
**Replies:** 0\
**Last updated:** [September 13, 2022, 1:16pm UTC](https://discourse.julialang.org/t/withprogress-for-folds-jl/87212 "2022-09-13T13:16:46Z")

</div>

I have been using Folds.jl for some computations and wanted to add a progress bar. I founds a withprogress function in Transducers.jl but it doesn’t seem to work with Folds.jl, at least not directly. This works using Fo…

---

## [Does Julia have more regressions than other languages? Possible solutions](https://discourse.julialang.org/t/does-julia-have-more-regressions-than-other-languages-possible-solutions/87203)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 1\
**Last updated:** [September 13, 2022, 12:05pm UTC](https://discourse.julialang.org/t/does-julia-have-more-regressions-than-other-languages-possible-solutions/87203 "2022-09-13T12:05:23Z")

</div>

First, I’m just asking what other people feel or know regarding compared to other languages, say Python or C++. This one, and BigInt in general isn’t a huge concern, just a talking point: Another: I DO see regressio…

---

## [Able to use Plots without adding it to the active environment](https://discourse.julialang.org/t/able-to-use-plots-without-adding-it-to-the-active-environment/87201)

<div class="topic-metadata">

**Author:** [@tom-plaa](https://discourse.julialang.org/u/tom-plaa)\
**Replies:** 4\
**Last updated:** [September 13, 2022, 11:33am UTC](https://discourse.julialang.org/t/able-to-use-plots-without-adding-it-to-the-active-environment/87201 "2022-09-13T11:33:14Z")

</div>

As the title implies, I am able to use Plots without adding it to the active environment. It does not disrupt my workflow; in fact, it’s very convenient for testing my modules. I just created the thread because I would …

---

## [Overload function application](https://discourse.julialang.org/t/overload-function-application/87205)

<div class="topic-metadata">

**Author:** [@qwerty](https://discourse.julialang.org/u/qwerty)\
**Replies:** 1\
**Last updated:** [September 13, 2022, 11:24am UTC](https://discourse.julialang.org/t/overload-function-application/87205 "2022-09-13T11:24:25Z")

</div>

I defined a struct like this: struct MyType a::Float64 end The problem is that I want to use all the functions defined on Float64 on MyType without having to rewrite them all. What is the best way to do this? My a…

---

## [Debugging Julia code in VSCode opens Python debugger instead](https://discourse.julialang.org/t/debugging-julia-code-in-vscode-opens-python-debugger-instead/87198)

<div class="topic-metadata">

**Author:** [@Shayan](https://discourse.julialang.org/u/Shayan)\
**Replies:** 1\
**Last updated:** [September 13, 2022, 10:27am UTC](https://discourse.julialang.org/t/debugging-julia-code-in-vscode-opens-python-debugger-instead/87198 "2022-09-13T10:27:40Z")

</div>

I’m trying to debug a Julia script in VSCode, But the debugger opens the Python debugger instead: There isn’t an option for debugging .jl files. According to the official doc, I can hit F5 to trigger the debugger…

---

## [How to Clean Julia Directory, Registries, etc After Long Usage?](https://discourse.julialang.org/t/how-to-clean-julia-directory-registries-etc-after-long-usage/87194)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [September 13, 2022, 10:17am UTC](https://discourse.julialang.org/t/how-to-clean-julia-directory-registries-etc-after-long-usage/87194 "2022-09-13T10:17:03Z")

</div>

Hi all, I have been using Julia everyday, I understand why people love Julia lang… #MeToo Thus, today I want to clean up things, where / which directories to clean? I am using Linux OS. Must be a lot of stacks that can …

---

## [Findn(triu()) in Julia](https://discourse.julialang.org/t/findn-triu-in-julia/87167)

<div class="topic-metadata">

**Author:** [@m\_shah2](https://discourse.julialang.org/u/m_shah2)\
**Replies:** 7\
**Last updated:** [September 13, 2022, 6:47am UTC](https://discourse.julialang.org/t/findn-triu-in-julia/87167 "2022-09-13T06:47:36Z")

</div>

I am trying to run ai, aj = findn(triu(NA, 1)) and I am getting an error of function not defined UndefVarError: triu not defined Stacktrace: \[1\] top-level scope @ In\[62\]:2 \[2\] eval @ .\\boot.jl:368 \[inlined\] \[3\] in…

---

## [FLoops for updating a vector by index](https://discourse.julialang.org/t/floops-for-updating-a-vector-by-index/87186)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 7\
**Last updated:** [September 13, 2022, 6:03am UTC](https://discourse.julialang.org/t/floops-for-updating-a-vector-by-index/87186 "2022-09-13T06:03:40Z")

</div>

I want to make the following function parallel. function build\_vector\_explicit(du, elements) for k ∈ elements du\[k\] += sin(k) end return nothing end This function takes in a vector du (not necessari…

---

## [Dynamical label text using @lift (makie)](https://discourse.julialang.org/t/dynamical-label-text-using-lift-makie/87117)

<div class="topic-metadata">

**Author:** [@Iker96](https://discourse.julialang.org/u/Iker96)\
**Replies:** 4\
**Last updated:** [September 13, 2022, 6:02am UTC](https://discourse.julialang.org/t/dynamical-label-text-using-lift-makie/87117 "2022-09-13T06:02:28Z")

</div>

Hi, I am trying to simulate a football game with Makie. Thereby the score and the time are updated in each step of the animstep!() function. I do not get an error message, but neither the time nor the result is updated. …

---

## [How can I find where a method is called within my code?](https://discourse.julialang.org/t/how-can-i-find-where-a-method-is-called-within-my-code/87121)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 4\
**Last updated:** [September 13, 2022, 6:01am UTC](https://discourse.julialang.org/t/how-can-i-find-where-a-method-is-called-within-my-code/87121 "2022-09-13T06:01:59Z")

</div>

While using Julia’s multiple dispatch feature I built quite a few methods of the same function. For example: function foo(df::DataFrame) ... end function foo(x::Float64) ... end function foo(d::Dict(Symbol,Vector{Flo…

---

## [Pmap timeout](https://discourse.julialang.org/t/pmap-timeout/87187)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 0\
**Last updated:** [September 13, 2022, 5:26am UTC](https://discourse.julialang.org/t/pmap-timeout/87187 "2022-09-13T05:26:18Z")

</div>

I am using pmap for multiprocessing on a single machine. Sometimes a worker hangs and never returns. Is it possible to set a timeout? Alternatively, how can I work around this problem? I see there is JULIA\_WORKER\_TIMEOU…

---

## [Rank 1 and rank 2 cholesky updates?](https://discourse.julialang.org/t/rank-1-and-rank-2-cholesky-updates/87176)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 2\
**Last updated:** [September 13, 2022, 3:48am UTC](https://discourse.julialang.org/t/rank-1-and-rank-2-cholesky-updates/87176 "2022-09-13T03:48:00Z")

</div>

According to the docs on lowrankupdate!, I can compute the cholesky factor of A + vv' in \\mathcal{O}(n^2) time by updating an existing cholesky factor of A. How would this syntax work if I want the cholesky factor of A …

---

## [Bucket sorting in Julia, with functions](https://discourse.julialang.org/t/bucket-sorting-in-julia-with-functions/87173)

<div class="topic-metadata">

**Author:** [@Alejandro\_Quiaro\_San](https://discourse.julialang.org/u/Alejandro_Quiaro_San)\
**Replies:** 1\
**Last updated:** [September 13, 2022, 2:53am UTC](https://discourse.julialang.org/t/bucket-sorting-in-julia-with-functions/87173 "2022-09-13T02:53:53Z")

</div>

Hello guys, I finished writing a Bucket Sorting package, that supports the following operations: build bucket, update bucket, empty bucket, top\_bucket and search bucket. I am using these codes for ray tracing. It is supp…

---

## [Constant propagation: Irrationals doing much better than Float64](https://discourse.julialang.org/t/constant-propagation-irrationals-doing-much-better-than-float64/87142)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 15\
**Last updated:** [September 13, 2022, 2:10am UTC](https://discourse.julialang.org/t/constant-propagation-irrationals-doing-much-better-than-float64/87142 "2022-09-13T02:10:06Z")

</div>

@oschulz and I have been talking about a deterministic RNG, with the main application being to generate an arbitrary point in the support of a given distribution. Here’s our current implementation: export FixedRNG struc…

---

## [Findn() function not found in Julia](https://discourse.julialang.org/t/findn-function-not-found-in-julia/87175)

<div class="topic-metadata">

**Author:** [@m\_shah2](https://discourse.julialang.org/u/m_shah2)\
**Replies:** 3\
**Last updated:** [September 13, 2022, 2:08am UTC](https://discourse.julialang.org/t/findn-function-not-found-in-julia/87175 "2022-09-13T02:08:57Z")

</div>

I am trying to run the code: ai, aj = findn(triu(NA, 1)) But it throws an error of undefined variable. I don’t know which package has this function. UndefVarError: findn not defined Stacktrace: \[1\] top-level scope …

---

## [max(A, A') gives isless() error](https://discourse.julialang.org/t/max-a-a-gives-isless-error/87165)

<div class="topic-metadata">

**Author:** [@m\_shah2](https://discourse.julialang.org/u/m_shah2)\
**Replies:** 2\
**Last updated:** [September 12, 2022, 10:24pm UTC](https://discourse.julialang.org/t/max-a-a-gives-isless-error/87165 "2022-09-12T22:24:44Z")

</div>

I am trying to generate a graph G by taking maxof SparseArrays.SparseMatrixCSC{Float64, Int64} and LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}} But it throws me an error when I do G = m…

---

## [Avoiding eval() - struggling with correct macro syntax](https://discourse.julialang.org/t/avoiding-eval-struggling-with-correct-macro-syntax/70665)

<div class="topic-metadata">

**Author:** [@hhaensel](https://discourse.julialang.org/u/hhaensel)\
**Replies:** 3\
**Last updated:** [September 12, 2022, 10:05pm UTC](https://discourse.julialang.org/t/avoiding-eval-struggling-with-correct-macro-syntax/70665 "2022-09-12T22:05:25Z")

</div>

I’m again struggling with correct macro syntax. I have a macro that is doing it’s job as required but relies on eval(), which I understand is not ideal. The macro should insert fields of an existing struct into a new st…

---

## [What do you think about using generated functions for constants?](https://discourse.julialang.org/t/what-do-you-think-about-using-generated-functions-for-constants/87149)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 3\
**Last updated:** [September 12, 2022, 5:35pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-using-generated-functions-for-constants/87149 "2022-09-12T17:35:16Z")

</div>

Hellow, what do you think about using generated functions for constants like this? @generated get\_const() = :($(\[i for i = 1:100\_000\_000\])) # constant is evaluated when called

---

## [Forcing data points containing one sinusoidal signal to be symetric around zero and multithreading](https://discourse.julialang.org/t/forcing-data-points-containing-one-sinusoidal-signal-to-be-symetric-around-zero-and-multithreading/87139)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 4\
**Last updated:** [September 12, 2022, 3:27pm UTC](https://discourse.julialang.org/t/forcing-data-points-containing-one-sinusoidal-signal-to-be-symetric-around-zero-and-multithreading/87139 "2022-09-12T15:27:49Z")

</div>

Starting point are real world measurements containing one unique sinusoidal signal. For signal processing purposes it might be beneficial to reduce the offset around zero before evaluating the signal either with fft() o…

---

## [CxxWrap can't find .dylib on MacOS](https://discourse.julialang.org/t/cxxwrap-cant-find-dylib-on-macos/86997)

<div class="topic-metadata">

**Author:** [@danny.s](https://discourse.julialang.org/u/danny.s)\
**Replies:** 3\
**Last updated:** [September 12, 2022, 2:41pm UTC](https://discourse.julialang.org/t/cxxwrap-cant-find-dylib-on-macos/86997 "2022-09-12T14:41:53Z")

</div>

I’m working on a C++ package (called MParT) for MacOS and Linux, as well as creating bindings to it in Julia. So far, I’ve had moderate success, where I can use Linux to \]add https://github.com/MeasureTransport/MParT.jl …

---

## [How to interpret return type shown by Cthulhu?](https://discourse.julialang.org/t/how-to-interpret-return-type-shown-by-cthulhu/87145)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [September 12, 2022, 2:36pm UTC](https://discourse.julialang.org/t/how-to-interpret-return-type-shown-by-cthulhu/87145 "2022-09-12T14:36:33Z")

</div>

Looking at the output of @descend\_code\_warntype reduce(vcat, eachcol(rand(2,2))) on nightly, I find Advanced: dump \[P\]arams cache. %69 = invoke throw\_boundserror(::Matrix{Float64},::Tuple{Base.Slice{Base.OneTo{Int64}…

---

## [Mapsplat function](https://discourse.julialang.org/t/mapsplat-function/87020)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 1\
**Last updated:** [September 12, 2022, 2:29pm UTC](https://discourse.julialang.org/t/mapsplat-function/87020 "2022-09-12T14:29:46Z")

</div>

Does this function exist already somewhere? mapsplat(f, xs...) = map(Base.splat(f), xs...)

---

## [Fitting Sinusoidal Signal with LsqFit](https://discourse.julialang.org/t/fitting-sinusoidal-signal-with-lsqfit/84777)

<div class="topic-metadata">

**Author:** [@WC1991](https://discourse.julialang.org/u/WC1991)\
**Replies:** 5\
**Last updated:** [August 16, 2022, 3:24pm UTC](https://discourse.julialang.org/t/fitting-sinusoidal-signal-with-lsqfit/84777 "2022-08-16T15:24:45Z")

</div>

Hi everyone, I have problems with fitting a sinusoidal signal with 4 parameters. Everything works just fine, if the Signal Frequency is under 800Hz. Above that Frequency the fitting is very bad (except for 802Hz and 804H…

---

## [Outer-only constructors and concrete types](https://discourse.julialang.org/t/outer-only-constructors-and-concrete-types/87036)

<div class="topic-metadata">

**Author:** [@pgoulart](https://discourse.julialang.org/u/pgoulart)\
**Replies:** 4\
**Last updated:** [September 12, 2022, 1:26pm UTC](https://discourse.julialang.org/t/outer-only-constructors-and-concrete-types/87036 "2022-09-12T13:26:25Z")

</div>

Suppose I have a type like this, taken from the docs on outer-only constructors: struct Foo{T\<:Number,S\<:Number} \<: SuperType{T} data::Vector{T} sum::S function Foo(a::Vector{T}) where T S = widen(T)…

---

## [Making types available across all submodules](https://discourse.julialang.org/t/making-types-available-across-all-submodules/87125)

<div class="topic-metadata">

**Author:** [@Tharsalys](https://discourse.julialang.org/u/Tharsalys)\
**Replies:** 7\
**Last updated:** [September 12, 2022, 11:05am UTC](https://discourse.julialang.org/t/making-types-available-across-all-submodules/87125 "2022-09-12T11:05:47Z")

</div>

I have a main module and some submodules. Right now, there’s a types.jl in the main module whose types are also required in the submodules. But naturally I can’t make these types accessible in the submodules without incl…

---

## [Intraday prices from Yahoo with MarketData.jl?](https://discourse.julialang.org/t/intraday-prices-from-yahoo-with-marketdata-jl/87122)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 1\
**Last updated:** [September 12, 2022, 10:17am UTC](https://discourse.julialang.org/t/intraday-prices-from-yahoo-with-marketdata-jl/87122 "2022-09-12T10:17:08Z")

</div>

Is it possible to get intraday prices from Yahoo using MarketData.jl?

---

## [Best Practices for Using "Off-the-Shelf" ML Solutions?](https://discourse.julialang.org/t/best-practices-for-using-off-the-shelf-ml-solutions/86991)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 1\
**Last updated:** [September 12, 2022, 7:54am UTC](https://discourse.julialang.org/t/best-practices-for-using-off-the-shelf-ml-solutions/86991 "2022-09-12T07:54:25Z")

</div>

Hi folks! :wave: I am not a formal ML researcher (I couldn’t tell you how to build a Neural Network from scratch) but I know about ML models and when what species of models make sense for what problems. A question that…

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

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