# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1208

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

**Page:** 1209

---

## [ERROR: Unsatisfiable requirements detected for package HDF5 \[f67ccb44\]](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-hdf5-f67ccb44/71404)

<div class="topic-metadata">

**Author:** [@Jing\_Zhang](https://discourse.julialang.org/u/Jing_Zhang)\
**Replies:** 3\
**Last updated:** [November 13, 2021, 12:19am UTC](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-hdf5-f67ccb44/71404 "2021-11-13T00:19:56Z")

</div>

I tried to \]rm HDF5 and then \]add HDF5. But here is what it showed Can anyone help on this? Thank you so much!

---

## [Round vector Float64](https://discourse.julialang.org/t/round-vector-float64/71413)

<div class="topic-metadata">

**Author:** [@Sbeltranj](https://discourse.julialang.org/u/Sbeltranj)\
**Replies:** 1\
**Last updated:** [November 13, 2021, 12:13am UTC](https://discourse.julialang.org/t/round-vector-float64/71413 "2021-11-13T00:13:15Z")

</div>

Hi I want to round a vector, I want each element to round 0.1. how I do this?

---

## [Trampolines](https://discourse.julialang.org/t/trampolines/71351)

<div class="topic-metadata">

**Author:** [@goerch](https://discourse.julialang.org/u/goerch)\
**Replies:** 6\
**Last updated:** [November 13, 2021, 12:03am UTC](https://discourse.julialang.org/t/trampolines/71351 "2021-11-13T00:03:16Z")

</div>

Hi guys, I was playing around with trampolines and the following program using BenchmarkTools fac(n) = n == 0 ? 1 : n \* fac(n - 1) pow(x, n) = n == 0 ? 1 : x \* pow(x, n - 1) n = 63 @btime fac($n) x = 2. n = 64 @btim…

---

## [How to query CoinMarketCap with Julia (rest api)](https://discourse.julialang.org/t/how-to-query-coinmarketcap-with-julia-rest-api/71406)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 11:37pm UTC](https://discourse.julialang.org/t/how-to-query-coinmarketcap-with-julia-rest-api/71406 "2021-11-12T23:37:24Z")

</div>

Hello, How can I translate the following request to a Julia function: curl -H "X-CMC\_PRO\_API\_KEY: b54bcf4d-1bca-4e8e-9a24-22ff2c3d462c" -H "Accept: application/json" -d "start=1&limit=5000&convert=USD" -G https://sandb…

---

## [Overloading operators](https://discourse.julialang.org/t/overloading-operators/6773)

<div class="topic-metadata">

**Author:** [@UserMorocco](https://discourse.julialang.org/u/UserMorocco)\
**Replies:** 7\
**Last updated:** [November 12, 2021, 10:45pm UTC](https://discourse.julialang.org/t/overloading-operators/6773 "2021-11-12T22:45:25Z")

</div>

Hello, How I can oveload base operators in Julia ? Thanks

---

## [Syntax for active patterns](https://discourse.julialang.org/t/syntax-for-active-patterns/71407)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 10:37pm UTC](https://discourse.julialang.org/t/syntax-for-active-patterns/71407 "2021-11-12T22:37:42Z")

</div>

@active Split(xs) begin n = length(xs) n%2==0 ? (xs\[begin:Int(n/2)\], xs\[Int(n/2+1):end\]) : (xs\[begin:Int(floor(n/2))\], xs\[Int(ceil(n/2))\], xs\[Int(floor(n/2+1)):end\]) end @match \[-2,-1,0,1,2\] begi…

---

## [Is NLopt thread safe?](https://discourse.julialang.org/t/is-nlopt-thread-safe/71398)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 6\
**Last updated:** [November 12, 2021, 10:25pm UTC](https://discourse.julialang.org/t/is-nlopt-thread-safe/71398 "2021-11-12T22:25:33Z")

</div>

I’ve got a constrained optimization situation where restarting NLopt from multiple initial points tends to be a good idea. I’d like to simply do @threads and split them over several threads, but I don’t know if this is s…

---

## [Can Programming in Julia Be "Pure"?](https://discourse.julialang.org/t/can-programming-in-julia-be-pure/71165)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 13\
**Last updated:** [November 12, 2021, 10:13pm UTC](https://discourse.julialang.org/t/can-programming-in-julia-be-pure/71165 "2021-11-12T22:13:09Z")

</div>

Hi all, I am learning about pure functions. The definition I have is: A pure function is one in which the same result is always produced with no side effects given the same input. This comes from Category Theory for…

---

## [Getting the last element of an iterator](https://discourse.julialang.org/t/getting-the-last-element-of-an-iterator/49696)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 45\
**Last updated:** [November 12, 2021, 9:51pm UTC](https://discourse.julialang.org/t/getting-the-last-element-of-an-iterator/49696 "2021-11-12T21:51:31Z")

</div>

Question 1: Is there a nice one-liner to get the last element of an iterator, without collecting in a temporary array? The obvious doesn’t work: julia\> eachline(\`dir\`) |\> last ERROR: MethodError: no method matching last…

---

## [Julia for VS Code: error when trying to output plot](https://discourse.julialang.org/t/julia-for-vs-code-error-when-trying-to-output-plot/71394)

<div class="topic-metadata">

**Author:** [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 9:39pm UTC](https://discourse.julialang.org/t/julia-for-vs-code-error-when-trying-to-output-plot/71394 "2021-11-12T21:39:20Z")

</div>

I get this error: Error loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state.. Here are the versions: Julia1.63 julia…

---

## [Looking for simple guide for installing Julia/VSC links](https://discourse.julialang.org/t/looking-for-simple-guide-for-installing-julia-vsc-links/71400)

<div class="topic-metadata">

**Author:** [@skypuppy](https://discourse.julialang.org/u/skypuppy)\
**Replies:** 0\
**Last updated:** [November 12, 2021, 7:12pm UTC](https://discourse.julialang.org/t/looking-for-simple-guide-for-installing-julia-vsc-links/71400 "2021-11-12T19:12:15Z")

</div>

I use MVSC for 3D printer firmware but am unsure how to link Julia to it. Can you point me toward a simple(istic?) guide on doing that, please? And I can’t figure out how to set the “working directory” in Linux. Thank…

---

## [Makie animations broken?](https://discourse.julialang.org/t/makie-animations-broken/56847)

<div class="topic-metadata">

**Author:** [@tross](https://discourse.julialang.org/u/tross)\
**Replies:** 4\
**Last updated:** [November 12, 2021, 7:07pm UTC](https://discourse.julialang.org/t/makie-animations-broken/56847 "2021-11-12T19:07:01Z")

</div>

I was using a script to animate plots using Makie without any issue for a while, however now I am getting an error and I have no idea how to resolve it. Here is an example script from an earlier post using Makie Abstra…

---

## [How to convert vectors and arrays from Float32 to Float64?](https://discourse.julialang.org/t/how-to-convert-vectors-and-arrays-from-float32-to-float64/71393)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 3\
**Last updated:** [November 12, 2021, 7:02pm UTC](https://discourse.julialang.org/t/how-to-convert-vectors-and-arrays-from-float32-to-float64/71393 "2021-11-12T19:02:50Z")

</div>

I have an Array A that is in Float32. My goal is to convert it from Float32 to Float64. I tried the below and neither of them worked: B = float(A); B = convert(Float64, A) When I tried to check the type using typeof, …

---

## [Setting the editor for \`@edit\` in the REPL](https://discourse.julialang.org/t/setting-the-editor-for-edit-in-the-repl/4812)

<div class="topic-metadata">

**Author:** [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Replies:** 4\
**Last updated:** [November 12, 2021, 5:55pm UTC](https://discourse.julialang.org/t/setting-the-editor-for-edit-in-the-repl/4812 "2021-11-12T17:55:40Z")

</div>

Right now, @edit opens up TextEdit on my mac, which is not great for editing (especially since it has no line numbering by default, which makes it difficult to jump to the function). How does one specify the editor (e.g.…

---

## [Applying weights to Randomized Arrays In a Dataframe](https://discourse.julialang.org/t/applying-weights-to-randomized-arrays-in-a-dataframe/65514)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 1\
**Last updated:** [November 12, 2021, 4:32pm UTC](https://discourse.julialang.org/t/applying-weights-to-randomized-arrays-in-a-dataframe/65514 "2021-11-12T16:32:36Z")

</div>

Hello Everyone: Is there a way to apply weights to arrays in a data such as: DF = DataFrame(Id = 1:10, Tablets = (rand(1:02:50),10), Desktops =(rand(1:02:50),10), Mobiles = (rand(1:01:50), 10)) If I wanted to apply …

---

## [Downloads.jl: Error: curl\_easy\_setopt: 48](https://discourse.julialang.org/t/downloads-jl-error-curl-easy-setopt-48/58222)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 11\
**Last updated:** [November 12, 2021, 4:27pm UTC](https://discourse.julialang.org/t/downloads-jl-error-curl-easy-setopt-48/58222 "2021-11-12T16:27:05Z")

</div>

On one of the supercomputers that I use I get: (@v1.6) pkg\> add BenchmarkTools Installing known registries into \`/p/project/chku27/hku273/.julia\` ┌ Error: curl\_easy\_setopt: 48 └ @ Downloads.Curl /buildworker/worker/pa…

---

## [Specify digits in contour plot scale](https://discourse.julialang.org/t/specify-digits-in-contour-plot-scale/71384)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 4\
**Last updated:** [November 12, 2021, 4:14pm UTC](https://discourse.julialang.org/t/specify-digits-in-contour-plot-scale/71384 "2021-11-12T16:14:31Z")

</div>

I have a grid of contour plots. Depending on input, some subplots only have a single value on the z dimension. The problem is that the scale displays multiple digits, which decreases the size of all subplots in the grid.…

---

## [Failed build of documentation on CI due to missing "Qt plugin" (?)](https://discourse.julialang.org/t/failed-build-of-documentation-on-ci-due-to-missing-qt-plugin/71389)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 3:45pm UTC](https://discourse.julialang.org/t/failed-build-of-documentation-on-ci-due-to-missing-qt-plugin/71389 "2021-11-12T15:45:43Z")

</div>

It is a few weeks that my documentation doesn’t build anymore on GitHub, and I can’t get back to the problem. The actions log just tells me that the line where I call makedocs returns the above error: qt.qpa.xcb: coul…

---

## [Is there a way to specify the breakpoints in the time vector for SDEproblem?](https://discourse.julialang.org/t/is-there-a-way-to-specify-the-breakpoints-in-the-time-vector-for-sdeproblem/71387)

<div class="topic-metadata">

**Author:** [@rimi](https://discourse.julialang.org/u/rimi)\
**Replies:** 1\
**Last updated:** [November 12, 2021, 3:52pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-specify-the-breakpoints-in-the-time-vector-for-sdeproblem/71387 "2021-11-12T15:52:29Z")

</div>

Hello, I am very new to Julia so forgive me if this is obvious. I am trying to solve an SDE system and each time I run the iteration to solve it, the variables (say X and Y) are calculated for my tspan (0, 200); the iss…

---

## [Get\_variables from Symbolics](https://discourse.julialang.org/t/get-variables-from-symbolics/71366)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 3:51pm UTC](https://discourse.julialang.org/t/get-variables-from-symbolics/71366 "2021-11-12T15:51:09Z")

</div>

the issue is more clearly described at this github issue comment link https://github.com/SciML/Catalyst.jl/issues/422#issuecomment-966919073 If anybody could explain, how to obtain variables from such expressions, eg, …

---

## [How to simulate the average trajectories of the SDE variables?](https://discourse.julialang.org/t/how-to-simulate-the-average-trajectories-of-the-sde-variables/71378)

<div class="topic-metadata">

**Author:** [@rimi](https://discourse.julialang.org/u/rimi)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 3:47pm UTC](https://discourse.julialang.org/t/how-to-simulate-the-average-trajectories-of-the-sde-variables/71378 "2021-11-12T15:47:34Z")

</div>

Hello, I have a code to solve to SDEs I am working on, in R. The equations in question are, dX = (-X\*a + (Y-X)b + h)dt + g dW and dY = (-Ya + (X-Y)\*b)dt for time \[0,200\], a=0.30, b=0.2, g=1 and h is 1 for time \[50,70\] …

---

## [ANN: a new version of package BifurcationKit.jl](https://discourse.julialang.org/t/ann-a-new-version-of-package-bifurcationkit-jl/71352)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 3\
**Last updated:** [November 12, 2021, 3:40pm UTC](https://discourse.julialang.org/t/ann-a-new-version-of-package-bifurcationkit-jl/71352 "2021-11-12T15:40:51Z")

</div>

Dear all, I am glad to report a new version of BifurcationKit.jl. Compared to the previous one, axed around codim 2 continuation, emphasis was put on the computation of periodic orbits and waves, and documentation. More…

---

## [All permutations example in Erlang](https://discourse.julialang.org/t/all-permutations-example-in-erlang/71380)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 4\
**Last updated:** [November 12, 2021, 2:37pm UTC](https://discourse.julialang.org/t/all-permutations-example-in-erlang/71380 "2021-11-12T14:37:20Z")

</div>

Wondering how this compact Erlang code perms(\[\]) -\> \[\[\]\]; perms(L) -\> \[\[H|T\] || H \<- L, T \<- perms(L--\[H\])\]. could look in Julia language. Common Lisp apparently uses the same logic, but is more verbose: (defun per…

---

## [Type inference for recursive broadcasting operations](https://discourse.julialang.org/t/type-inference-for-recursive-broadcasting-operations/71336)

<div class="topic-metadata">

**Author:** [@Marco\_Lombardi](https://discourse.julialang.org/u/Marco_Lombardi)\
**Replies:** 6\
**Last updated:** [November 12, 2021, 2:21pm UTC](https://discourse.julialang.org/t/type-inference-for-recursive-broadcasting-operations/71336 "2021-11-12T14:21:49Z")

</div>

Apologizes for the relatively long minimal example. I want to write an efficient broadcasting which is able to sum results from different objects. As an example, suppose I want to compute the sum of periodic functions, …

---

## [RecipesBase: How to define the same recipe for different packages?](https://discourse.julialang.org/t/recipesbase-how-to-define-the-same-recipe-for-different-packages/71283)

<div class="topic-metadata">

**Author:** [@giancarloantonucci](https://discourse.julialang.org/u/giancarloantonucci)\
**Replies:** 9\
**Last updated:** [November 12, 2021, 2:10pm UTC](https://discourse.julialang.org/t/recipesbase-how-to-define-the-same-recipe-for-different-packages/71283 "2021-11-12T14:10:57Z")

</div>

I have packages A, B, C, where both B and C depend on A. In order to make some function f available to both B and C at the same time, I first define it in A and then overload it in B and C with some local methods, e.g. m…

---

## [Meta.parse + eval does not work as expected in the loop](https://discourse.julialang.org/t/meta-parse-eval-does-not-work-as-expected-in-the-loop/71356)

<div class="topic-metadata">

**Author:** [@ryszard314159](https://discourse.julialang.org/u/ryszard314159)\
**Replies:** 6\
**Last updated:** [November 12, 2021, 1:22pm UTC](https://discourse.julialang.org/t/meta-parse-eval-does-not-work-as-expected-in-the-loop/71356 "2021-11-12T13:22:02Z")

</div>

I would expect the first for loop below to work, but apparently for some reason loop index (n) is not recognized in eval(xpr). I am guessing it has something to do with scoping etc. Is there a way to make it work “as ex…

---

## [VSCode: Disabling session revive](https://discourse.julialang.org/t/vscode-disabling-session-revive/71379)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 0\
**Last updated:** [November 12, 2021, 12:36pm UTC](https://discourse.julialang.org/t/vscode-disabling-session-revive/71379 "2021-11-12T12:36:59Z")

</div>

It seems that VSCode enabled “session revive” by default. At least I received various kinds of errors about “session restore” when restarting VS Code recently. I had to disable this setting and thought I would share thi…

---

## [Making the result of \`nullspace\` sparse](https://discourse.julialang.org/t/making-the-result-of-nullspace-sparse/71310)

<div class="topic-metadata">

**Author:** [@jchen975](https://discourse.julialang.org/u/jchen975)\
**Replies:** 1\
**Last updated:** [November 12, 2021, 12:22pm UTC](https://discourse.julialang.org/t/making-the-result-of-nullspace-sparse/71310 "2021-11-12T12:22:07Z")

</div>

Is it possible to make the result of LinearAlgebra.nullspace as sparse as possible? How about when using the package Nemo for sparse matrices over \\mathbb{R}? Regardless of whether or not this is possible, what would be…

---

## [Terminate condition in ContinuousCallback in DifferentialEquations.jl](https://discourse.julialang.org/t/terminate-condition-in-continuouscallback-in-differentialequations-jl/69748)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 13\
**Last updated:** [November 12, 2021, 11:45am UTC](https://discourse.julialang.org/t/terminate-condition-in-continuouscallback-in-differentialequations-jl/69748 "2021-11-12T11:45:09Z")

</div>

using DifferentialEquations u0 = \[1.,0.\] harmonic! = @ode\_def HarmonicOscillator begin dv = -x dx = v end tspan = (0.0,10.0) prob = ODEProblem(harmonic!,u0,tspan) function terminate\_affect!…

---

## [Add comment to generated code file from expressions](https://discourse.julialang.org/t/add-comment-to-generated-code-file-from-expressions/71377)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 0\
**Last updated:** [November 12, 2021, 11:43am UTC](https://discourse.julialang.org/t/add-comment-to-generated-code-file-from-expressions/71377 "2021-11-12T11:43:40Z")

</div>

hellow! How can i add a comment to file with generated code based on expression i use Expr(:line, “comment”) , but it is not a best solution , because julia\> expr = Expr(:line, "comment") :(#= line comment =#)

[Previous page](https://discourse.julialang.org/latest.md?page=1207)

[Next page](https://discourse.julialang.org/latest.md?page=1209)
