# Latest

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

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

**Page:** 1129

---

## [Construct NamedTuple dynamically](https://discourse.julialang.org/t/construct-namedtuple-dynamically/15394)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 12\
**Last updated:** [February 8, 2022, 9:11am UTC](https://discourse.julialang.org/t/construct-namedtuple-dynamically/15394 "2022-02-08T09:11:06Z")

</div>

In Julia 1.0, I can constructed a named tuple with known names and values. x = (a = 1, b = 2.0, c = "hello world") Let’s say I have the names and values in separate arrays. How could I construct a named tuple dynamica…

---

## [How to calculate cross-correlation on a 2D domain](https://discourse.julialang.org/t/how-to-calculate-cross-correlation-on-a-2d-domain/75161)

<div class="topic-metadata">

**Author:** [@Frazze](https://discourse.julialang.org/u/Frazze)\
**Replies:** 18\
**Last updated:** [February 6, 2022, 8:23pm UTC](https://discourse.julialang.org/t/how-to-calculate-cross-correlation-on-a-2d-domain/75161 "2022-02-06T20:23:50Z")

</div>

Hi everyone, I’m studying a scalar field u(x,t) on a 2D box LxL, with periodic boundary conditions. What I would like to do is to calculate the cross-correlation between u(x,t1) and u(x+r,t1) at varying of r, where r i…

---

## [Function to calculate temperature from steamtable look up in Julia](https://discourse.julialang.org/t/function-to-calculate-temperature-from-steamtable-look-up-in-julia/75974)

<div class="topic-metadata">

**Author:** [@Curio\_math](https://discourse.julialang.org/u/Curio_math)\
**Replies:** 5\
**Last updated:** [February 8, 2022, 5:50am UTC](https://discourse.julialang.org/t/function-to-calculate-temperature-from-steamtable-look-up-in-julia/75974 "2022-02-08T05:50:30Z")

</div>

I have been using a dynamic mathematical model, where I assume to replace some nonlinear functions corresponding to finding temperature (as a function of pressure and enthalpy) by substituting them with functions inbuild…

---

## [Why Julia doesn't have function types?](https://discourse.julialang.org/t/why-julia-doesnt-have-function-types/75934)

<div class="topic-metadata">

**Author:** [@davibarreira](https://discourse.julialang.org/u/davibarreira)\
**Replies:** 25\
**Last updated:** [February 8, 2022, 5:36am UTC](https://discourse.julialang.org/t/why-julia-doesnt-have-function-types/75934 "2022-02-08T05:36:25Z")

</div>

I was wondering what’s the reason that in Julia we don’t have function types based on input variables, and output variables respective types. I mean, f(x::Int) = x would be of type Function{input\<: Int} while f(x::Int)::…

---

## [Counting iterations to a type fixpoint](https://discourse.julialang.org/t/counting-iterations-to-a-type-fixpoint/75876)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 11\
**Last updated:** [February 8, 2022, 3:35am UTC](https://discourse.julialang.org/t/counting-iterations-to-a-type-fixpoint/75876 "2022-02-08T03:35:25Z")

</div>

I have a function that typically gives a value of a different type, but repeated application eventually hits a fixpoint. Say the function is called next. I need the fixpoint in order to statically build a loop like @gen…

---

## [Unsatisfiable requirements when trying to release new version of QuantumControl package](https://discourse.julialang.org/t/unsatisfiable-requirements-when-trying-to-release-new-version-of-quantumcontrol-package/75965)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 3\
**Last updated:** [February 8, 2022, 3:33am UTC](https://discourse.julialang.org/t/unsatisfiable-requirements-when-trying-to-release-new-version-of-quantumcontrol-package/75965 "2022-02-08T03:33:36Z")

</div>

I’m having trouble parsing the following error message from https://github.com/JuliaRegistries/General/runs/5088377586?check\_suite\_focus=true ERROR: Unsatisfiable requirements detected for package GRAPE \[6b52fcaf\]: GRA…

---

## [Pkg problems with Pluto and github page](https://discourse.julialang.org/t/pkg-problems-with-pluto-and-github-page/75724)

<div class="topic-metadata">

**Author:** [@RickandMortyforever](https://discourse.julialang.org/u/RickandMortyforever)\
**Replies:** 2\
**Last updated:** [February 8, 2022, 2:40am UTC](https://discourse.julialang.org/t/pkg-problems-with-pluto-and-github-page/75724 "2022-02-08T02:40:55Z")

</div>

I need some help on a package problem. I’ve read this document https://github.com/fonsp/Pluto.jl/wiki/%F0%9F%8E%81-Package-management, but it was hard to understand even though the doc explain very kindly. The problem …

---

## [Using Debugger in Julia 1.6.3](https://discourse.julialang.org/t/using-debugger-in-julia-1-6-3/71095)

<div class="topic-metadata">

**Author:** [@kw\_martin](https://discourse.julialang.org/u/kw_martin)\
**Replies:** 17\
**Last updated:** [February 8, 2022, 1:30am UTC](https://discourse.julialang.org/t/using-debugger-in-julia-1-6-3/71095 "2022-02-08T01:30:45Z")

</div>

I am having difficulties using Debugger in Julia 1.6.3. I attempted to run the simple example from Debugger at github and if failed. Can someone suggest what I am doing wrong or a work-around. I do have vscode working, b…

---

## [\[ANN\] ManualDispatch.jl](https://discourse.julialang.org/t/ann-manualdispatch-jl/47346)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 15\
**Last updated:** [February 7, 2022, 10:24pm UTC](https://discourse.julialang.org/t/ann-manualdispatch-jl/47346 "2022-02-07T22:24:39Z")

</div>

This trivial macro was suggested (or a similar macro was) by @tim.holy and @tkf. It is not registered. Provides the macro @unionsplit to dispatch “manually” on types rather than rely on runtime multiple dispatch. If …

---

## [Solving MPC using JuMP and Gurobi](https://discourse.julialang.org/t/solving-mpc-using-jump-and-gurobi/75962)

<div class="topic-metadata">

**Author:** [@alre5639](https://discourse.julialang.org/u/alre5639)\
**Replies:** 3\
**Last updated:** [February 7, 2022, 9:55pm UTC](https://discourse.julialang.org/t/solving-mpc-using-jump-and-gurobi/75962 "2022-02-07T21:55:06Z")

</div>

I am attempting to translate the MPC implemented in python and cvxpy here in Julia using JuMP and Gurobi. However when attempting to solve the first iteration of the optimization I set up I am getting an unconstrained/i…

---

## [User defined functions in a module](https://discourse.julialang.org/t/user-defined-functions-in-a-module/75971)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 1\
**Last updated:** [February 7, 2022, 8:54pm UTC](https://discourse.julialang.org/t/user-defined-functions-in-a-module/75971 "2022-02-07T20:54:12Z")

</div>

Howdy, folks. I have a code which allows for a user defined function. I do this with a struct: Base.@kwdef mutable struct Solver{T\<:Function} Δt :: Float64 = 0.3 t :: Float64 = 0.0 ... kinematicVelocity…

---

## [Can a method push! to a Vector that is a field in a struct?](https://discourse.julialang.org/t/can-a-method-push-to-a-vector-that-is-a-field-in-a-struct/75964)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 5\
**Last updated:** [February 7, 2022, 8:39pm UTC](https://discourse.julialang.org/t/can-a-method-push-to-a-vector-that-is-a-field-in-a-struct/75964 "2022-02-07T20:39:38Z")

</div>

In https://github.com/dmbates/Wordlegames.jl I use a struct to represent the state of a Wordle (or similar) game. I am thinking of recording the history of guesses and scores from these guess as fields which will be Vec…

---

## [How to add/subtract probability distributions?](https://discourse.julialang.org/t/how-to-add-subtract-probability-distributions/75673)

<div class="topic-metadata">

**Author:** [@CentraCep](https://discourse.julialang.org/u/CentraCep)\
**Replies:** 25\
**Last updated:** [February 7, 2022, 6:27pm UTC](https://discourse.julialang.org/t/how-to-add-subtract-probability-distributions/75673 "2022-02-07T18:27:50Z")

</div>

As part of a mini-project where I am numerically solving a linear differential equation, I have to subtract a probability distribution from another distribution. Is there a way to do this in Julia? When I try: a = Chi(3…

---

## [Efficiently type alias Float128, Float64, and Float32](https://discourse.julialang.org/t/efficiently-type-alias-float128-float64-and-float32/75958)

<div class="topic-metadata">

**Author:** [@bburnett](https://discourse.julialang.org/u/bburnett)\
**Replies:** 9\
**Last updated:** [February 7, 2022, 6:12pm UTC](https://discourse.julialang.org/t/efficiently-type-alias-float128-float64-and-float32/75958 "2022-02-07T18:12:18Z")

</div>

I am trying to make some of my scripts more convenient by using command line options to switch between using Float128, Float64, and Float32 in multiple locations. My attempt does this by doing something like the followin…

---

## [Finding DataFrame rows with \`missing\` values in specific columns?](https://discourse.julialang.org/t/finding-dataframe-rows-with-missing-values-in-specific-columns/75811)

<div class="topic-metadata">

**Author:** [@forestacorn](https://discourse.julialang.org/u/forestacorn)\
**Replies:** 12\
**Last updated:** [February 7, 2022, 6:01pm UTC](https://discourse.julialang.org/t/finding-dataframe-rows-with-missing-values-in-specific-columns/75811 "2022-02-07T18:01:56Z")

</div>

I have a DataFrame, like the following example, where I am trying to find the rows where the columns x2 and x3 are missing values: df = DataFrame(\[1 2 3; 4 5 6; 7 missing missing; 10 11 12; 13 missing missing; 16 17 18\]…

---

## [Performance differences between \`Array\` and \`Tuple\` when combined with \`zip\` of index range in \`for\` loop](https://discourse.julialang.org/t/performance-differences-between-array-and-tuple-when-combined-with-zip-of-index-range-in-for-loop/75932)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 2\
**Last updated:** [February 7, 2022, 4:56pm UTC](https://discourse.julialang.org/t/performance-differences-between-array-and-tuple-when-combined-with-zip-of-index-range-in-for-loop/75932 "2022-02-07T16:56:00Z")

</div>

julia\> v1 = rand(20); julia\> v2 = rand(20); julia\> @benchmark for i in v1, j in v2 i \* j end BenchmarkTools.Trial: 10000 samples with 1 evaluation. Range (min … max): 21.300 μs … 412.600 μs ┊ GC (min ……

---

## [Makie - mouseposition with respect to image plot](https://discourse.julialang.org/t/makie-mouseposition-with-respect-to-image-plot/51268)

<div class="topic-metadata">

**Author:** [@arnief3](https://discourse.julialang.org/u/arnief3)\
**Replies:** 2\
**Last updated:** [February 7, 2022, 4:40pm UTC](https://discourse.julialang.org/t/makie-mouseposition-with-respect-to-image-plot/51268 "2022-02-07T16:40:08Z")

</div>

I am attempting to get the x, y position of a mouse click with respect to a plotted image. The code shown below is working except for a white border around the image. The returned x, y values include this border and the …

---

## [\[ANN\] PlutoStaticHTML.jl](https://discourse.julialang.org/t/ann-plutostatichtml-jl/71785)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 9\
**Last updated:** [February 7, 2022, 4:25pm UTC](https://discourse.julialang.org/t/ann-plutostatichtml-jl/71785 "2022-02-07T16:25:37Z")

</div>

Sometimes, a project idea sounds nice, but the outcome just doesn’t work. Sometimes, a project sounds nice and the outcome works reasonably well. And sometimes, a project sounds nice and the outcome works better than exp…

---

## [Errors loading dataframes from JLD files in Pluto](https://discourse.julialang.org/t/errors-loading-dataframes-from-jld-files-in-pluto/74948)

<div class="topic-metadata">

**Author:** [@thompsonmj](https://discourse.julialang.org/u/thompsonmj)\
**Replies:** 1\
**Last updated:** [February 7, 2022, 3:30pm UTC](https://discourse.julialang.org/t/errors-loading-dataframes-from-jld-files-in-pluto/74948 "2022-02-07T15:30:19Z")

</div>

I load a df from a \*.jld file and try to do stuff with one of the columns. In VS Code, it works, but in in Pluto, I get errors. I’ve tried a couple different ways of indexing the df, but I’m not sure how to get into th…

---

## [MultiFunctions: Context dispatch and binary cache](https://discourse.julialang.org/t/multifunctions-context-dispatch-and-binary-cache/11565)

<div class="topic-metadata">

**Author:** [@TsurHerman](https://discourse.julialang.org/u/TsurHerman)\
**Replies:** 9\
**Last updated:** [July 16, 2018, 5:22pm UTC](https://discourse.julialang.org/t/multifunctions-context-dispatch-and-binary-cache/11565 "2018-07-16T17:22:46Z")

</div>

I have been writing this draft for several days , and got a little mixed up verbalising these ideas , which are simpler to understand using code and examples… If you want to jump straight into code, there is a link at t…

---

## [CoolProp use in Julia](https://discourse.julialang.org/t/coolprop-use-in-julia/75947)

<div class="topic-metadata">

**Author:** [@Michael\_Giovannini](https://discourse.julialang.org/u/Michael_Giovannini)\
**Replies:** 4\
**Last updated:** [February 7, 2022, 3:06pm UTC](https://discourse.julialang.org/t/coolprop-use-in-julia/75947 "2022-02-07T15:06:08Z")

</div>

Hello everyone I need help using CoolpProp in Julia. I have been using CoolProp in Python, but I would like to try it in Julia to improve code speed. I’m a Linux user. I followed the guide on the CoolProp site about Jul…

---

## [Broken \`eigen\` in DoubleFloats?](https://discourse.julialang.org/t/broken-eigen-in-doublefloats/75946)

<div class="topic-metadata">

**Author:** [@swishmas](https://discourse.julialang.org/u/swishmas)\
**Replies:** 1\
**Last updated:** [February 7, 2022, 2:41pm UTC](https://discourse.julialang.org/t/broken-eigen-in-doublefloats/75946 "2022-02-07T14:41:19Z")

</div>

I wanted to try some additional precision in julia and I found the DoubleFloats package. I ran the small example but received an error when using the eigen function #using LinearAlgebra #did not change the result using…

---

## [Best way to export Catalyst models to SBML format](https://discourse.julialang.org/t/best-way-to-export-catalyst-models-to-sbml-format/75951)

<div class="topic-metadata">

**Author:** [@Polina](https://discourse.julialang.org/u/Polina)\
**Replies:** 2\
**Last updated:** [February 7, 2022, 2:16pm UTC](https://discourse.julialang.org/t/best-way-to-export-catalyst-models-to-sbml-format/75951 "2022-02-07T14:16:59Z")

</div>

Hello! I know it is possible to import SBML to Catalyst ReactionSystem using https://github.com/SciML/SBMLToolkit.jl However, I’m having troubles to find out what is the best way to export Catalyst models to SBML forma…

---

## [Vscode not leading me to documentation for submodules?](https://discourse.julialang.org/t/vscode-not-leading-me-to-documentation-for-submodules/75949)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 2\
**Last updated:** [February 7, 2022, 2:11pm UTC](https://discourse.julialang.org/t/vscode-not-leading-me-to-documentation-for-submodules/75949 "2022-02-07T14:11:10Z")

</div>

Hi there julia noob using vscode to learn and working with someone elses code. I hit a line that I had no real idea how to interpret but couldn’t get vcode to guide me to the docs. What was I doing wrong please? here i…

---

## [How to keep the value of function pointer?](https://discourse.julialang.org/t/how-to-keep-the-value-of-function-pointer/75576)

<div class="topic-metadata">

**Author:** [@Laco\_Kovac](https://discourse.julialang.org/u/Laco_Kovac)\
**Replies:** 5\
**Last updated:** [February 7, 2022, 1:48pm UTC](https://discourse.julialang.org/t/how-to-keep-the-value-of-function-pointer/75576 "2022-02-07T13:48:27Z")

</div>

How to keep the value of function pointer? This is roughly how the code looks like: gCallBackFunc = Ref{Function}(func1) ... callBack::Function = gCallBackFunc\[\] ... gCallBackFunc\[\] = func2 ... callBack(params) I want…

---

## [Efficient use of test or assert](https://discourse.julialang.org/t/efficient-use-of-test-or-assert/75895)

<div class="topic-metadata">

**Author:** [@benoitseron](https://discourse.julialang.org/u/benoitseron)\
**Replies:** 6\
**Last updated:** [February 7, 2022, 1:32pm UTC](https://discourse.julialang.org/t/efficient-use-of-test-or-assert/75895 "2022-02-07T13:32:27Z")

</div>

Suppose you want to check a property of some arguments given to a function, for instance, that x is positive. What is the best practice regarding this? I’m tempted to use @test x\>0 instead of writing a block such as i…

---

## [Failed in test CUDA v3.8.0](https://discourse.julialang.org/t/failed-in-test-cuda-v3-8-0/75642)

<div class="topic-metadata">

**Author:** [@Jie](https://discourse.julialang.org/u/Jie)\
**Replies:** 8\
**Last updated:** [February 7, 2022, 1:17pm UTC](https://discourse.julialang.org/t/failed-in-test-cuda-v3-8-0/75642 "2022-02-07T13:17:13Z")

</div>

I have add CUDA. When I test CUDA, it failed Testing Running tests… ┌ Info: System information: │ CUDA toolkit 11.6, artifact installation │ NVIDIA driver 470.82.1, for CUDA 11.4 │ CUDA driver 11.6 │ │ Libraries: …

---

## [Trying to write a macro for simple debugging](https://discourse.julialang.org/t/trying-to-write-a-macro-for-simple-debugging/75943)

<div class="topic-metadata">

**Author:** [@bcsj](https://discourse.julialang.org/u/bcsj)\
**Replies:** 3\
**Last updated:** [February 7, 2022, 12:57pm UTC](https://discourse.julialang.org/t/trying-to-write-a-macro-for-simple-debugging/75943 "2022-02-07T12:57:02Z")

</div>

I’m trying to wrap my head around macros and wanted to make (what I assumed is) a simple macro which you prefix to an expression in order to get the expression printed with its evaluated value. Example Let us call the m…

---

## [\`not\`, \`and\`, \`or\` as logical operator keyword](https://discourse.julialang.org/t/not-and-or-as-logical-operator-keyword/75933)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 9\
**Last updated:** [February 7, 2022, 12:36pm UTC](https://discourse.julialang.org/t/not-and-or-as-logical-operator-keyword/75933 "2022-02-07T12:36:15Z")

</div>

https://github.com/JuliaLang/julia/issues/5238 I guess many people want to use not, and, or as logical operator keyword. I prefer if A and not B foo() end rather than if A && !B foo() end because above one i…

---

## [Getting inconsistent error from walkdir](https://discourse.julialang.org/t/getting-inconsistent-error-from-walkdir/74068)

<div class="topic-metadata">

**Author:** [@nyloc](https://discourse.julialang.org/u/nyloc)\
**Replies:** 5\
**Last updated:** [February 4, 2022, 4:27pm UTC](https://discourse.julialang.org/t/getting-inconsistent-error-from-walkdir/74068 "2022-02-04T16:27:10Z")

</div>

walkdir works for some directories and not others. julia\> file\_list = readdir("dummy\_dir/") 5-element Vector{String}: "0458899-1920x1080.jpg" "2nd\_dir" "The Unbelievable Truth S01E01.mp3" "lena.jpg" "second\_level" …

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

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