# Latest

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

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

**Page:** 1045

---

## [How to mark a function argument for specialization on types while still staying as a generic argument?](https://discourse.julialang.org/t/how-to-mark-a-function-argument-for-specialization-on-types-while-still-staying-as-a-generic-argument/80652)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 8\
**Last updated:** [May 10, 2022, 4:41pm UTC](https://discourse.julialang.org/t/how-to-mark-a-function-argument-for-specialization-on-types-while-still-staying-as-a-generic-argument/80652 "2022-05-10T16:41:01Z")

</div>

This is a follow up question which cristallized from this other discourse topic Problem I am struggeling with improving performance of my package ExtensibleEffects.jl because Julia is not specializing a function on type…

---

## [Faster Alternatives to sortperm](https://discourse.julialang.org/t/faster-alternatives-to-sortperm/80170)

<div class="topic-metadata">

**Author:** [@Josa9321](https://discourse.julialang.org/u/Josa9321)\
**Replies:** 9\
**Last updated:** [May 10, 2022, 4:33pm UTC](https://discourse.julialang.org/t/faster-alternatives-to-sortperm/80170 "2022-05-10T16:33:18Z")

</div>

Hi, I am manipulating an matrix (one or more lines) that has the priority numbers of another one, for example: priority = \[0.1 0.9 0.4 0.7 0.3\] # matrix filled using rand() A = \[col1 col2 col3 col4 col5\] # matrix fille…

---

## [HDF5 cannot compile in M1 pro mac](https://discourse.julialang.org/t/hdf5-cannot-compile-in-m1-pro-mac/71097)

<div class="topic-metadata">

**Author:** [@wzy](https://discourse.julialang.org/u/wzy)\
**Replies:** 12\
**Last updated:** [May 10, 2022, 3:38pm UTC](https://discourse.julialang.org/t/hdf5-cannot-compile-in-m1-pro-mac/71097 "2022-05-10T15:38:46Z")

</div>

The julia version is v1.7.0 rc-2, installed by official dmg. OS: OSX Monterey Hope to learn about how to resolve this problem, thanks! The log: julia\> using HDF5 \[ Info: Precompiling HDF5 \[f67ccb44-e63f-5c2f-98bd-…

---

## [\[ANN\] CounterfactualExplanations.jl: explain any model through counterfactuals](https://discourse.julialang.org/t/ann-counterfactualexplanations-jl-explain-any-model-through-counterfactuals/80826)

<div class="topic-metadata">

**Author:** [@pat-alt](https://discourse.julialang.org/u/pat-alt)\
**Replies:** 0\
**Last updated:** [May 10, 2022, 3:35pm UTC](https://discourse.julialang.org/t/ann-counterfactualexplanations-jl-explain-any-model-through-counterfactuals/80826 "2022-05-10T15:35:52Z")

</div>

Hi there :love\_you\_gesture: I’m excited to share the first major release of CounterfactualExplanations.jl with the community. Looking for feedback, challenge and hopefully contributions :star\_struck:. CounterfactualExpl…

---

## [Change endianness in reinterpret](https://discourse.julialang.org/t/change-endianness-in-reinterpret/80815)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 3\
**Last updated:** [May 10, 2022, 3:22pm UTC](https://discourse.julialang.org/t/change-endianness-in-reinterpret/80815 "2022-05-10T15:22:16Z")

</div>

Hello! I am trying to reinterpret a Vector of bytes into a predefined type I have. However, primitive types are always intepreted as being little endian. Is there any way I can change this? MWE: julia\> struct P …

---

## [Solver for stiff differential equations](https://discourse.julialang.org/t/solver-for-stiff-differential-equations/80772)

<div class="topic-metadata">

**Author:** [@graeffd](https://discourse.julialang.org/u/graeffd)\
**Replies:** 13\
**Last updated:** [May 10, 2022, 3:21pm UTC](https://discourse.julialang.org/t/solver-for-stiff-differential-equations/80772 "2022-05-10T15:21:11Z")

</div>

Hi everybody, I’m now to Julia and trying to translate a simple slider-block model from Python. The code is modelling earthquake cycles. It consists mainly of a set of 3 differential equations. In Python, I use from sci…

---

## [Zygote returning wrong gradient on GPU](https://discourse.julialang.org/t/zygote-returning-wrong-gradient-on-gpu/80750)

<div class="topic-metadata">

**Author:** [@maxfreu](https://discourse.julialang.org/u/maxfreu)\
**Replies:** 4\
**Last updated:** [May 10, 2022, 3:11pm UTC](https://discourse.julialang.org/t/zygote-returning-wrong-gradient-on-gpu/80750 "2022-05-10T15:11:35Z")

</div>

Hi! As an exercise, I want to optimize the potential energy of a system of springs, which are coupled if they are closer than some threshold. On cpu, the gradient is correct but on gpu it is nothing. Am I doing something…

---

## [First value different from nothing](https://discourse.julialang.org/t/first-value-different-from-nothing/80818)

<div class="topic-metadata">

**Author:** [@whatsthecraic](https://discourse.julialang.org/u/whatsthecraic)\
**Replies:** 1\
**Last updated:** [May 10, 2022, 2:58pm UTC](https://discourse.julialang.org/t/first-value-different-from-nothing/80818 "2022-05-10T14:58:11Z")

</div>

Does it exist a generic coalesce function that returns the first value that is not nothing, e.g. a = nothing b = nothing c = "hello" d = nothing coalesce(a, b, c, d) should return “hello”.

---

## [SCIP Concurrency (Multi-threading)](https://discourse.julialang.org/t/scip-concurrency-multi-threading/80814)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 1\
**Last updated:** [May 10, 2022, 2:44pm UTC](https://discourse.julialang.org/t/scip-concurrency-multi-threading/80814 "2022-05-10T14:44:12Z")

</div>

As of version 4 SCIP supports concurrency. It mentions here that the option "parallel/maxnthreads" must be set as appropriate, it also mentions that SCIP must be compiled differently to leverage this functionality and th…

---

## [Sum of logs](https://discourse.julialang.org/t/sum-of-logs/80370)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 19\
**Last updated:** [May 10, 2022, 2:40pm UTC](https://discourse.julialang.org/t/sum-of-logs/80370 "2022-05-10T14:40:13Z")

</div>

In some statistical applications (and probably many others) we sometimes have to evaluate sum(log.(x)) for some large vector x. The obvious improvement to this is sum(log, x), but this still requires computing log for ea…

---

## [Zooming and date axes in Makie](https://discourse.julialang.org/t/zooming-and-date-axes-in-makie/80790)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 14\
**Last updated:** [May 10, 2022, 1:47pm UTC](https://discourse.julialang.org/t/zooming-and-date-axes-in-makie/80790 "2022-05-10T13:47:39Z")

</div>

Hi there! I recently got acquainted with Makie and I absolutely love it! Here are 2 small questions related to zooming (in GLMakie): Is it possible to update the ticks dynamically when zooming? For instance I would l…

---

## [Numbers sampled from exponential distribution seems to be incorrect](https://discourse.julialang.org/t/numbers-sampled-from-exponential-distribution-seems-to-be-incorrect/80810)

<div class="topic-metadata">

**Author:** [@efJerryYang](https://discourse.julialang.org/u/efJerryYang)\
**Replies:** 4\
**Last updated:** [May 10, 2022, 1:40pm UTC](https://discourse.julialang.org/t/numbers-sampled-from-exponential-distribution-seems-to-be-incorrect/80810 "2022-05-10T13:40:22Z")

</div>

I am running a simulation task which is supposed to sample data from an exponential distribution, but the results are always larger than correct ones. I converted my julia code to matlab and it produced correct results (…

---

## [Searching for Julia tutoring for a project](https://discourse.julialang.org/t/searching-for-julia-tutoring-for-a-project/80769)

<div class="topic-metadata">

**Author:** [@Floyd\_Gartner](https://discourse.julialang.org/u/Floyd_Gartner)\
**Replies:** 1\
**Last updated:** [May 10, 2022, 1:37pm UTC](https://discourse.julialang.org/t/searching-for-julia-tutoring-for-a-project/80769 "2022-05-10T13:37:30Z")

</div>

Hello everybody, I’m currently working on a project to “solve” the patient-bed assignment problem in emergency department (ED) of hospitals using agent-based modelling and reinforcement learning. I’m very new to using J…

---

## [Question about Bayesian Survival Analysis with Cox (proportional hazards) regression method in Julia with Turing](https://discourse.julialang.org/t/question-about-bayesian-survival-analysis-with-cox-proportional-hazards-regression-method-in-julia-with-turing/80672)

<div class="topic-metadata">

**Author:** [@RyanKuo](https://discourse.julialang.org/u/RyanKuo)\
**Replies:** 6\
**Last updated:** [May 10, 2022, 1:17pm UTC](https://discourse.julialang.org/t/question-about-bayesian-survival-analysis-with-cox-proportional-hazards-regression-method-in-julia-with-turing/80672 "2022-05-10T13:17:11Z")

</div>

Dear All, I am trying to implement Bayesian Survival Analysis with Cox (proportional hazards) regression method in Julia based on the PyMC3 code written by Austin Rochford https://austinrochford.com/posts/2015-10-05-ba…

---

## [Pluto on Binder: use a repo environment rather than Pluto managed environment?](https://discourse.julialang.org/t/pluto-on-binder-use-a-repo-environment-rather-than-pluto-managed-environment/75311)

<div class="topic-metadata">

**Author:** [@thompsonmj](https://discourse.julialang.org/u/thompsonmj)\
**Replies:** 6\
**Last updated:** [May 10, 2022, 1:33pm UTC](https://discourse.julialang.org/t/pluto-on-binder-use-a-repo-environment-rather-than-pluto-managed-environment/75311 "2022-05-10T13:33:23Z")

</div>

I would like to load a Pluto notebook in Binder that uses an environment managed outside the notebook itself (but in the same repository). Is this possible somehow to swing using the raw URL for a Pluto notebook in a re…

---

## [How to write a program as a Julia package?](https://discourse.julialang.org/t/how-to-write-a-program-as-a-julia-package/80574)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 29\
**Last updated:** [May 10, 2022, 1:26pm UTC](https://discourse.julialang.org/t/how-to-write-a-program-as-a-julia-package/80574 "2022-05-10T13:26:20Z")

</div>

All the Julia packages I have encountered export functions to be used as building blocks for other code. The main file looks something like this: module Package using Dependency1, Dependency2 export function1, functi…

---

## [How to reference argument of expression](https://discourse.julialang.org/t/how-to-reference-argument-of-expression/80213)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 19\
**Last updated:** [May 10, 2022, 12:50pm UTC](https://discourse.julialang.org/t/how-to-reference-argument-of-expression/80213 "2022-05-10T12:50:07Z")

</div>

Hi, I’m trying to make an alias to an argument of an expression within a macro, and then change it to something else. Something like: macro foo(exp) arg1 = exp.args\[1\] arg1 = 3 end However, I find that if I do t…

---

## [Parameter Estimation using Least Squares with missing data](https://discourse.julialang.org/t/parameter-estimation-using-least-squares-with-missing-data/80797)

<div class="topic-metadata">

**Author:** [@BinaryBot](https://discourse.julialang.org/u/BinaryBot)\
**Replies:** 2\
**Last updated:** [May 10, 2022, 12:21pm UTC](https://discourse.julialang.org/t/parameter-estimation-using-least-squares-with-missing-data/80797 "2022-05-10T12:21:36Z")

</div>

I am trying to estimate 4 parameters for an ode that outputs as solution 4 values at any given time point. I have actual data for 2 of those values. I would like to preform parameter estimation using the available incomp…

---

## [SDE estimation based on a set of features](https://discourse.julialang.org/t/sde-estimation-based-on-a-set-of-features/80798)

<div class="topic-metadata">

**Author:** [@mobar](https://discourse.julialang.org/u/mobar)\
**Replies:** 1\
**Last updated:** [May 10, 2022, 12:20pm UTC](https://discourse.julialang.org/t/sde-estimation-based-on-a-set-of-features/80798 "2022-05-10T12:20:47Z")

</div>

I would like to get started with non-linear time timeseries learning and extrapolation in Julia by learning the drift parameters in an SDE based on a pre-defined set of latent features (for this particular application it…

---

## [\`mul\_float: types of a and b must match\` error in ModelingToolkit](https://discourse.julialang.org/t/mul-float-types-of-a-and-b-must-match-error-in-modelingtoolkit/77485)

<div class="topic-metadata">

**Author:** [@anandpathak31](https://discourse.julialang.org/u/anandpathak31)\
**Replies:** 7\
**Last updated:** [May 10, 2022, 12:16pm UTC](https://discourse.julialang.org/t/mul-float-types-of-a-and-b-must-match-error-in-modelingtoolkit/77485 "2022-05-10T12:16:20Z")

</div>

I am getting the mul\_float: types of a and b must match error in my code that uses ModelingToolkit in which I am solving an ODAEProblem costructed from ODESystem in a loop. In each iteration I am modifying the ODESystem …

---

## [How to make Stat.x\_jitter work with Geom.subplot\_grid](https://discourse.julialang.org/t/how-to-make-stat-x-jitter-work-with-geom-subplot-grid/80152)

<div class="topic-metadata">

**Author:** [@rkmalaiya](https://discourse.julialang.org/u/rkmalaiya)\
**Replies:** 1\
**Last updated:** [May 10, 2022, 11:01am UTC](https://discourse.julialang.org/t/how-to-make-stat-x-jitter-work-with-geom-subplot-grid/80152 "2022-05-10T11:01:32Z")

</div>

Hello Everyone, The plot, using Gadfly.jl, that I am trying to make requires me to jitter the points in a grid plot. But I cannot figure out how? The code example below replicates my situation. Please suggest what may I…

---

## [Better way to suppress error/backtrace on SIGPIPE in a pipeline?](https://discourse.julialang.org/t/better-way-to-suppress-error-backtrace-on-sigpipe-in-a-pipeline/80801)

<div class="topic-metadata">

**Author:** [@martin.auer](https://discourse.julialang.org/u/martin.auer)\
**Replies:** 0\
**Last updated:** [May 10, 2022, 10:51am UTC](https://discourse.julialang.org/t/better-way-to-suppress-error-backtrace-on-sigpipe-in-a-pipeline/80801 "2022-05-10T10:51:26Z")

</div>

We are using custom scripts in a Linux/shell/pipeline environment shared by users with different language backgrounds. Julia would be a nice fit to some of the process stages. As any such scripts might later be used and…

---

## [Need help on understanding type inference / performance](https://discourse.julialang.org/t/need-help-on-understanding-type-inference-performance/80600)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 13\
**Last updated:** [May 10, 2022, 9:54am UTC](https://discourse.julialang.org/t/need-help-on-understanding-type-inference-performance/80600 "2022-05-10T09:54:29Z")

</div>

Hi there, I am the author of ExtensibleEffects.jl and several people approached me that it would be great to improve performance (it is currently super slow). I made a first attempt on inspecting and found the followin…

---

## [Couple JuMP with the simulator](https://discourse.julialang.org/t/couple-jump-with-the-simulator/80792)

<div class="topic-metadata">

**Author:** [@Jack\_Tang](https://discourse.julialang.org/u/Jack_Tang)\
**Replies:** 4\
**Last updated:** [May 10, 2022, 8:42am UTC](https://discourse.julialang.org/t/couple-jump-with-the-simulator/80792 "2022-05-10T08:42:24Z")

</div>

Hi I am working on a project about multi-reservoir control optimization problem and the objective function is calculated by Telemac simulator. Do you have some examples or best practices for such integration? I have r…

---

## [What did I do wrong when installing my MATLAB.jl package?](https://discourse.julialang.org/t/what-did-i-do-wrong-when-installing-my-matlab-jl-package/73546)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 4\
**Last updated:** [May 10, 2022, 8:10am UTC](https://discourse.julialang.org/t/what-did-i-do-wrong-when-installing-my-matlab-jl-package/73546 "2022-05-10T08:10:06Z")

</div>

Unfortunately, MATLAB.jl has not been working for me. Not sure if it is because I first installed MATLAB.jl by Pkg.add("MATLAB"), then realized I did not set the environment variable as above first. So I set the environ…

---

## [Writing large DiskArrays to geotiff using ArchGDAL](https://discourse.julialang.org/t/writing-large-diskarrays-to-geotiff-using-archgdal/80709)

<div class="topic-metadata">

**Author:** [@sunayana](https://discourse.julialang.org/u/sunayana)\
**Replies:** 1\
**Last updated:** [May 10, 2022, 8:22am UTC](https://discourse.julialang.org/t/writing-large-diskarrays-to-geotiff-using-archgdal/80709 "2022-05-10T08:22:01Z")

</div>

Hi, I have a large 2D DiskArrays.BroadDiskArray which I want to write to a Geotiff file without a huge memory overhead. But I do not see a memory efficient way of doing thisDiskArrays.BroadcastDiskArray: So this is how…

---

## [Stack plot-pane and terminal](https://discourse.julialang.org/t/stack-plot-pane-and-terminal/56013)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 15\
**Last updated:** [May 10, 2022, 7:54am UTC](https://discourse.julialang.org/t/stack-plot-pane-and-terminal/56013 "2022-05-10T07:54:40Z")

</div>

Currently, my layout looks like this: I would LOVE for it to look like this to utilize the space better: I could not find out how - does anyone know if it is possible? If not, this is a feature request …

---

## [Joinpath() in wsl2 mounted drives](https://discourse.julialang.org/t/joinpath-in-wsl2-mounted-drives/80788)

<div class="topic-metadata">

**Author:** [@huang\_min](https://discourse.julialang.org/u/huang_min)\
**Replies:** 2\
**Last updated:** [May 10, 2022, 6:02am UTC](https://discourse.julialang.org/t/joinpath-in-wsl2-mounted-drives/80788 "2022-05-10T06:02:02Z")

</div>

I would like to read/write files in a folder in D drives say D:\\data. I hope it works for Julia both in windows and wsl2. I tried joinpath() but cannot figure out how to make it. I start Julia in the home dir (or some p…

---

## [Why are kwargs printed in full in a MethodError?](https://discourse.julialang.org/t/why-are-kwargs-printed-in-full-in-a-methoderror/80592)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [May 10, 2022, 5:11am UTC](https://discourse.julialang.org/t/why-are-kwargs-printed-in-full-in-a-methoderror/80592 "2022-05-10T05:11:38Z")

</div>

julia\> f(a::Int; b = nothing) = a f (generic function with 1 method) julia\> f(2.0, b = zeros(10)) ERROR: MethodError: no method matching f(::Float64; b=\[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0\]) Closest candida…

---

## [Expected julia 1.8 release date](https://discourse.julialang.org/t/expected-julia-1-8-release-date/80785)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 1\
**Last updated:** [May 10, 2022, 3:41am UTC](https://discourse.julialang.org/t/expected-julia-1-8-release-date/80785 "2022-05-10T03:41:07Z")

</div>

Hello, What is the expected release date for Julia 1.8? Thanks!

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

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