# General Usage

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

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

**Page:** 310

---

## [HTTP.jl. Can I get r::Request object before HTTP.request()](https://discourse.julialang.org/t/http-jl-can-i-get-r-request-object-before-http-request/96783)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 1\
**Last updated:** [March 30, 2023, 8:10pm UTC](https://discourse.julialang.org/t/http-jl-can-i-get-r-request-object-before-http-request/96783 "2023-03-30T20:10:19Z")

</div>

Hello, can I get r::Request object before HTTP.request() ? now only: import HTTP response = HTTP.request("GET", "https://docs.julialang.org/") request = response.request somewhere about: import HTTP request = ... ? …

---

## [PyCall Workaround for Automatic Conversion, Looking for Alternative](https://discourse.julialang.org/t/pycall-workaround-for-automatic-conversion-looking-for-alternative/96855)

<div class="topic-metadata">

**Author:** [@isaac.rubberducky](https://discourse.julialang.org/u/isaac.rubberducky)\
**Replies:** 3\
**Last updated:** [March 30, 2023, 7:41pm UTC](https://discourse.julialang.org/t/pycall-workaround-for-automatic-conversion-looking-for-alternative/96855 "2023-03-30T19:41:55Z")

</div>

So here is a solved problem, but it feels like I have solved it incorrectly, and I would love to know if there is a better way. I want to create a PyObject using the Body constructor from this library. Here is a basic M…

---

## [Declaration of CUDA variables in module results in undefined reference](https://discourse.julialang.org/t/declaration-of-cuda-variables-in-module-results-in-undefined-reference/96765)

<div class="topic-metadata">

**Author:** [@dcasbol](https://discourse.julialang.org/u/dcasbol)\
**Replies:** 3\
**Last updated:** [March 30, 2023, 6:53pm UTC](https://discourse.julialang.org/t/declaration-of-cuda-variables-in-module-results-in-undefined-reference/96765 "2023-03-30T18:53:41Z")

</div>

Hi everyone, I am working on a project that makes intensive use of GPU computation and we wanted to have some module constants that were already placed on the GPU memory, but apparently the memory is freed after the mod…

---

## [Compiler optimizations for ComplexF64 vs Fortran](https://discourse.julialang.org/t/compiler-optimizations-for-complexf64-vs-fortran/96346)

<div class="topic-metadata">

**Author:** [@bremez](https://discourse.julialang.org/u/bremez)\
**Replies:** 7\
**Last updated:** [March 30, 2023, 6:23pm UTC](https://discourse.julialang.org/t/compiler-optimizations-for-complexf64-vs-fortran/96346 "2023-03-30T18:23:49Z")

</div>

My former colleague Michael Rutter now posted his comparison of Fortran compilers regarding their optimization of complex number arithmetic. I was wondering if anyone would like to see how Julia matches these? For examp…

---

## [Parellelization for large ODEs, Multithreading fails](https://discourse.julialang.org/t/parellelization-for-large-odes-multithreading-fails/96811)

<div class="topic-metadata">

**Author:** [@Rezair](https://discourse.julialang.org/u/Rezair)\
**Replies:** 16\
**Last updated:** [March 30, 2023, 5:49pm UTC](https://discourse.julialang.org/t/parellelization-for-large-odes-multithreading-fails/96811 "2023-03-30T17:49:48Z")

</div>

Hey everyone, I am new to Julia and I wanted to solve a large ODE as fast as possible. I’ve tried multithreading using Threads.@threads and EnsembleThreads() approaches, but they both reduce performance. I’ve also tried …

---

## [\`\`\`@turbo\`\`\` producing different (and wrong) results compared to \`\`\`@inbounds @simd\`\`\`](https://discourse.julialang.org/t/turbo-producing-different-and-wrong-results-compared-to-inbounds-simd/96851)

<div class="topic-metadata">

**Author:** [@bremez](https://discourse.julialang.org/u/bremez)\
**Replies:** 3\
**Last updated:** [March 30, 2023, 5:34pm UTC](https://discourse.julialang.org/t/turbo-producing-different-and-wrong-results-compared-to-inbounds-simd/96851 "2023-03-30T17:34:30Z")

</div>

I have a use case where an integer array contains only values between 1 and some maxValue, and I would like the histogram of the array values. I found that counts(array, maxValue) was too slow, and as best as I could und…

---

## [Question about type stability and struct](https://discourse.julialang.org/t/question-about-type-stability-and-struct/96834)

<div class="topic-metadata">

**Author:** [@fdekerme](https://discourse.julialang.org/u/fdekerme)\
**Replies:** 2\
**Last updated:** [March 30, 2023, 1:07pm UTC](https://discourse.julialang.org/t/question-about-type-stability-and-struct/96834 "2023-03-30T13:07:21Z")

</div>

Hello ! :smiley: How do you achieve type stability with handwritten structures? For example, in the following code example, what do I need to return in the second return for the function test to be type stable? It retu…

---

## [How do I share a script with multiple local dependencies?](https://discourse.julialang.org/t/how-do-i-share-a-script-with-multiple-local-dependencies/96810)

<div class="topic-metadata">

**Author:** [@minetest2048](https://discourse.julialang.org/u/minetest2048)\
**Replies:** 2\
**Last updated:** [March 30, 2023, 12:41pm UTC](https://discourse.julialang.org/t/how-do-i-share-a-script-with-multiple-local-dependencies/96810 "2023-03-30T12:41:35Z")

</div>

I’m currently developing a script with a lot of dependencies that are locally edited, some in .julia/dev, some in the working directory of the script. The problem is that if I just give my working directory with Manifes…

---

## [4D dataset plotting](https://discourse.julialang.org/t/4d-dataset-plotting/96841)

<div class="topic-metadata">

**Author:** [@abehersan](https://discourse.julialang.org/u/abehersan)\
**Replies:** 1\
**Last updated:** [March 30, 2023, 11:48am UTC](https://discourse.julialang.org/t/4d-dataset-plotting/96841 "2023-03-30T11:48:27Z")

</div>

Hi! I have 4D experimental data that I would like to plot just like in the figure below. Does anyone have an idea how this could be done with Plots.jl? It is basically a superposition of three 3D heatmaps for which so…

---

## [PyCall pyimport segfault for the poliastro module](https://discourse.julialang.org/t/pycall-pyimport-segfault-for-the-poliastro-module/96812)

<div class="topic-metadata">

**Author:** [@isaac.rubberducky](https://discourse.julialang.org/u/isaac.rubberducky)\
**Replies:** 2\
**Last updated:** [March 30, 2023, 11:02am UTC](https://discourse.julialang.org/t/pycall-pyimport-segfault-for-the-poliastro-module/96812 "2023-03-30T11:02:06Z")

</div>

I am trying to use the package poliastro with PyCall. The following lines of code work fine: using PyCall poliastro\_body = pyimport("poliastro.bodies") poliastro\_planes = pyimport("poliastro.frames") These do not: p…

---

## [Can I remove dependency on Pkg from my package using xxx\_jll?](https://discourse.julialang.org/t/can-i-remove-dependency-on-pkg-from-my-package-using-xxx-jll/96704)

<div class="topic-metadata">

**Author:** [@jsjie](https://discourse.julialang.org/u/jsjie)\
**Replies:** 5\
**Last updated:** [March 30, 2023, 8:36am UTC](https://discourse.julialang.org/t/can-i-remove-dependency-on-pkg-from-my-package-using-xxx-jll/96704 "2023-03-30T08:36:58Z")

</div>

For some reason, I want to compile my package into binaries with PackageCompiler. It generally works fine, but compiled directories always include something like libgit2, which should be of no use to my package. After s…

---

## [Can I enable the ContinuousCallback only on certain intervals?](https://discourse.julialang.org/t/can-i-enable-the-continuouscallback-only-on-certain-intervals/96788)

<div class="topic-metadata">

**Author:** [@vtfanta](https://discourse.julialang.org/u/vtfanta)\
**Replies:** 1\
**Last updated:** [March 30, 2023, 8:10am UTC](https://discourse.julialang.org/t/can-i-enable-the-continuouscallback-only-on-certain-intervals/96788 "2023-03-30T08:10:36Z")

</div>

I understand the difference between the DiscreteCallback and the ContinuousCallback. My question is, how could I use the continuous one while being active only on a specified interval of the independent variable? For ex…

---

## [Broadcast Multiplication on Custom Type](https://discourse.julialang.org/t/broadcast-multiplication-on-custom-type/96728)

<div class="topic-metadata">

**Author:** [@tgautam03](https://discourse.julialang.org/u/tgautam03)\
**Replies:** 1\
**Last updated:** [March 28, 2023, 10:24pm UTC](https://discourse.julialang.org/t/broadcast-multiplication-on-custom-type/96728 "2023-03-28T22:24:13Z")

</div>

Hi I’ve created a custom struct named MyNum and want to create broadcast operations on this type, like a = MyNum(rand(3,2)) b = MyNum(rand(3,2)) c = a .\* b I can’t figure out how to do this. I’ve been able to do this…

---

## [How to parse EDT time zone?](https://discourse.julialang.org/t/how-to-parse-edt-time-zone/96824)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 0\
**Last updated:** [March 30, 2023, 5:46am UTC](https://discourse.julialang.org/t/how-to-parse-edt-time-zone/96824 "2023-03-30T05:46:56Z")

</div>

For example, I have the following time “2012-01-09 12:00:10 EDT”. How do I parse it to a ZonedDateTime using TimeZones.jl? “EDT” is not a standard time zone, and tz"EDT" fails to parse. The thing is I want to make it gen…

---

## [Permissions error in ArtifactUtils.upload\_to\_gist](https://discourse.julialang.org/t/permissions-error-in-artifactutils-upload-to-gist/96469)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 7\
**Last updated:** [March 29, 2023, 9:59pm UTC](https://discourse.julialang.org/t/permissions-error-in-artifactutils-upload-to-gist/96469 "2023-03-29T21:59:49Z")

</div>

I am having the following issue with ArtifactUtils.upload\_to\_gist: julia\> gist = ArtifactUtils.upload\_to\_gist(artifact\_id) - Creating gist... ✓ Created gist Cloning into '.'... ERROR: Repository not found. fatal: Could …

---

## [Error when installing packages](https://discourse.julialang.org/t/error-when-installing-packages/96793)

<div class="topic-metadata">

**Author:** [@Jorge\_Luis\_Horta\_San](https://discourse.julialang.org/u/Jorge_Luis_Horta_San)\
**Replies:** 2\
**Last updated:** [March 29, 2023, 8:54pm UTC](https://discourse.julialang.org/t/error-when-installing-packages/96793 "2023-03-29T20:54:53Z")

</div>

I am trying to install packages in a new installation of julia. I always get this error. ERROR: ArgumentError: “H:\\Temp\\Admin” is not a directory. The problem is that I don’t even have a hard disk H drive. I understan…

---

## [How to use "Callback" while solving differential equation with uncertain initial condition and uncertain parameters?](https://discourse.julialang.org/t/how-to-use-callback-while-solving-differential-equation-with-uncertain-initial-condition-and-uncertain-parameters/96801)

<div class="topic-metadata">

**Author:** [@Ashu](https://discourse.julialang.org/u/Ashu)\
**Replies:** 0\
**Last updated:** [March 29, 2023, 7:52pm UTC](https://discourse.julialang.org/t/how-to-use-callback-while-solving-differential-equation-with-uncertain-initial-condition-and-uncertain-parameters/96801 "2023-03-29T19:52:49Z")

</div>

Hello all, I am solving nonlinear differential equation using “ReachabilityAnalysis.jl” package (Example: Lotka-Volterra · ReachabilityAnalysis.jl). Both initial condition and parameters are uncertain, so I tool interva…

---

## [Clamped View](https://discourse.julialang.org/t/clamped-view/96717)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 13\
**Last updated:** [March 29, 2023, 3:05pm UTC](https://discourse.julialang.org/t/clamped-view/96717 "2023-03-29T15:05:28Z")

</div>

I am trying to define a performant read-only view into an array where the index is clamped to lie within the array axis. The motivation for this is to apply stencils like finite differences and convolutions without needi…

---

## [Using end variable in ranges passed to functions other than getindex?](https://discourse.julialang.org/t/using-end-variable-in-ranges-passed-to-functions-other-than-getindex/7591)

<div class="topic-metadata">

**Author:** [@tlnagy](https://discourse.julialang.org/u/tlnagy)\
**Replies:** 23\
**Last updated:** [March 29, 2023, 1:55pm UTC](https://discourse.julialang.org/t/using-end-variable-in-ranges-passed-to-functions-other-than-getindex/7591 "2023-03-29T13:55:47Z")

</div>

I expected the following to work: julia\> a = \[1,2,3,4,5\] 5-element Array{Int64,1}: 1 2 3 4 5 julia\> deleteat!(a, end-1:end) ERROR: syntax: unexpected "end" julia\> a\[end-1:end\] 2-element Array{Int64,1}: 4 5 I e…

---

## [Enlistment for corsairing the map function (in REPL/Main only)](https://discourse.julialang.org/t/enlistment-for-corsairing-the-map-function-in-repl-main-only/96768)

<div class="topic-metadata">

**Author:** [@martin.auer](https://discourse.julialang.org/u/martin.auer)\
**Replies:** 2\
**Last updated:** [March 29, 2023, 1:51pm UTC](https://discourse.julialang.org/t/enlistment-for-corsairing-the-map-function-in-repl-main-only/96768 "2023-03-29T13:51:56Z")

</div>

Hi, I am toying with a module that end users are supposed to mainly be using via the Julia REPL, to leverage its piping capabilities. In this specific tool’s REPL context, I would like to find a (somewhat safe, somewha…

---

## [Error compiling package using JavaCall](https://discourse.julialang.org/t/error-compiling-package-using-javacall/96779)

<div class="topic-metadata">

**Author:** [@bvanderbeek](https://discourse.julialang.org/u/bvanderbeek)\
**Replies:** 3\
**Last updated:** [March 29, 2023, 1:47pm UTC](https://discourse.julialang.org/t/error-compiling-package-using-javacall/96779 "2023-03-29T13:47:43Z")

</div>

I’m trying to build a package that is dependent on the JavaCall package. The JavaCall package has some known issues with Mac which can be avoided by setting the environment variable ‘JULIA\_COPY\_STACKS=yes’ and starting J…

---

## [A pydoc but for julia?](https://discourse.julialang.org/t/a-pydoc-but-for-julia/96778)

<div class="topic-metadata">

**Author:** [@rye](https://discourse.julialang.org/u/rye)\
**Replies:** 3\
**Last updated:** [March 29, 2023, 1:21pm UTC](https://discourse.julialang.org/t/a-pydoc-but-for-julia/96778 "2023-03-29T13:21:43Z")

</div>

Hi, In python I have the handy pydoc executable to show me documentation on the fly (without needing lsp, but via a few vimscript functions handling import aliases still automatic). Is there something similar to pydoc f…

---

## [Why does add-assign to Ref{Float64} allocate?](https://discourse.julialang.org/t/why-does-add-assign-to-ref-float64-allocate/96767)

<div class="topic-metadata">

**Author:** [@AlexanderNenninger](https://discourse.julialang.org/u/AlexanderNenninger)\
**Replies:** 3\
**Last updated:** [March 29, 2023, 12:50pm UTC](https://discourse.julialang.org/t/why-does-add-assign-to-ref-float64-allocate/96767 "2023-03-29T12:50:57Z")

</div>

While optimizing some ODE code, I noticed that += on Ref{Float64} allocates, while .+= on a vector slice doen’t. Why is that? I wasn’t able to reproduce the effect without DifferentialEquations, but I feel like it shoul…

---

## [How to provide a ca.cert file to HTTP.jl requests (I don't have a key file)](https://discourse.julialang.org/t/how-to-provide-a-ca-cert-file-to-http-jl-requests-i-dont-have-a-key-file/96757)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 0\
**Last updated:** [March 29, 2023, 8:27am UTC](https://discourse.julialang.org/t/how-to-provide-a-ca-cert-file-to-http-jl-requests-i-dont-have-a-key-file/96757 "2023-03-29T08:27:48Z")

</div>

the documentation lists a couple of ssl configs which can be set a for a http request: SSL arguments: require\_ssl\_verification = NetworkOptions.verify\_host(host), pass MBEDTLS\_SSL\_VERIFY\_REQUIRED to the mbed TLS libr…

---

## [Outer product of more than two vectors](https://discourse.julialang.org/t/outer-product-of-more-than-two-vectors/96310)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 16\
**Last updated:** [March 29, 2023, 7:57am UTC](https://discourse.julialang.org/t/outer-product-of-more-than-two-vectors/96310 "2023-03-29T07:57:17Z")

</div>

Is there a built-in function for an outer product of more than two vectors, i.e.: julia\> a = \[0.2, 0.8\]; julia\> b = \[0.1,0.9\]; julia\> c = \[0.2,0.2,0.6\]; julia\> vs = \[a,b,c\]; # vector of vectors julia\> function ou…

---

## [PlotlyJS: Select Browser to display html output](https://discourse.julialang.org/t/plotlyjs-select-browser-to-display-html-output/96277)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 7\
**Last updated:** [March 29, 2023, 7:02am UTC](https://discourse.julialang.org/t/plotlyjs-select-browser-to-display-html-output/96277 "2023-03-29T07:02:48Z")

</div>

I have tried to find advise, how to specify the browser that is used to display the interactive html-ouput from PlotlyJS: I found some discussion how to change the default browser, but I would not like to change the the…

---

## [Produced pie gauge chart using statisticalgraphics package](https://discourse.julialang.org/t/produced-pie-gauge-chart-using-statisticalgraphics-package/96753)

<div class="topic-metadata">

**Author:** [@akshdfyehd](https://discourse.julialang.org/u/akshdfyehd)\
**Replies:** 0\
**Last updated:** [March 29, 2023, 6:17am UTC](https://discourse.julialang.org/t/produced-pie-gauge-chart-using-statisticalgraphics-package/96753 "2023-03-29T06:17:59Z")

</div>

Hi, I have a dataset which looks like this: code to get this dataset: using InMemoryDatasets,DLMReader import Downloads data=Downloads.download("https://raw.githubusercontent.com/akshdfyehd/travel/main/Travel%20deta…

---

## [What is the deal with @kwdef](https://discourse.julialang.org/t/what-is-the-deal-with-kwdef/96733)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [March 29, 2023, 12:32am UTC](https://discourse.julialang.org/t/what-is-the-deal-with-kwdef/96733 "2023-03-29T00:32:04Z")

</div>

It is not in the manual, yet it seems to be ubiquitous in packages. What’s up with that? Edit: online search finally yielded something useful: What does @kwdef do? - #4 by j-fu I couldn’t find it before in this forum, …

---

## [Is it possible to splat into ccall?](https://discourse.julialang.org/t/is-it-possible-to-splat-into-ccall/95761)

<div class="topic-metadata">

**Author:** [@lmtzx9h4qqnt](https://discourse.julialang.org/u/lmtzx9h4qqnt)\
**Replies:** 31\
**Last updated:** [March 28, 2023, 7:15pm UTC](https://discourse.julialang.org/t/is-it-possible-to-splat-into-ccall/95761 "2023-03-28T19:15:52Z")

</div>

As the title says – is it possible? A straightforward attempt doesn’t seem to work: julia\> ccall(:pow, Cdouble, (Cdouble, Cdouble), (2, 10)...) ERROR: syntax: more types than arguments for ccall around REPL\[65\]:1 The s…

---

## [Julia \`Pkg\` seems to look in the wrong place when installing private package in Github CI](https://discourse.julialang.org/t/julia-pkg-seems-to-look-in-the-wrong-place-when-installing-private-package-in-github-ci/96694)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 8\
**Last updated:** [March 28, 2023, 2:48pm UTC](https://discourse.julialang.org/t/julia-pkg-seems-to-look-in-the-wrong-place-when-installing-private-package-in-github-ci/96694 "2023-03-28T14:48:15Z")

</div>

I am using Github CI for package development. My package is private, and it has dependencies on some other private packages that I developed. While I can successfully clone the private dependency packages from github int…

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

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