# Latest

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

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

**Page:** 566

---

## [Can I dispatch on (mathematical) functions?](https://discourse.julialang.org/t/can-i-dispatch-on-mathematical-functions/105577)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 15\
**Last updated:** [October 31, 2023, 2:20am UTC](https://discourse.julialang.org/t/can-i-dispatch-on-mathematical-functions/105577 "2023-10-31T02:20:33Z")

</div>

Hi, TLDR: Is it possible to dispatch on (mathematical) functions ? Broad context and reasons I am asking thisIn this (just registered) package GitHub - lrnv/WilliamsonTransforms.jl I implemented a bijective mapping bet…

---

## [Truncating BigFloat](https://discourse.julialang.org/t/truncating-bigfloat/105578)

<div class="topic-metadata">

**Author:** [@putianyi888](https://discourse.julialang.org/u/putianyi888)\
**Replies:** 6\
**Last updated:** [October 31, 2023, 1:07am UTC](https://discourse.julialang.org/t/truncating-bigfloat/105578 "2023-10-31T01:07:59Z")

</div>

During computing, I need to truncate some BigFloat results (still to BigFloat, just with less precision) to save memory. Is there a way to truncate BigFloat without changing the global precision?

---

## [How to add the drop-shadow effect to contour plots in Julia with Plots.jl (or Makie.jl)](https://discourse.julialang.org/t/how-to-add-the-drop-shadow-effect-to-contour-plots-in-julia-with-plots-jl-or-makie-jl/105604)

<div class="topic-metadata">

**Author:** [@jondoe297](https://discourse.julialang.org/u/jondoe297)\
**Replies:** 0\
**Last updated:** [October 31, 2023, 1:04am UTC](https://discourse.julialang.org/t/how-to-add-the-drop-shadow-effect-to-contour-plots-in-julia-with-plots-jl-or-makie-jl/105604 "2023-10-31T01:04:27Z")

</div>

I am very new to Julia, coming from python. I am trying to make a contour plot with drop-shadow effect. (From Scientific Visualization Book) import scipy import numpy as np import matplotlib.pyplot as plt from matplotli…

---

## [Custom headers when adding packages](https://discourse.julialang.org/t/custom-headers-when-adding-packages/105554)

<div class="topic-metadata">

**Author:** [@huguesmp](https://discourse.julialang.org/u/huguesmp)\
**Replies:** 4\
**Last updated:** [October 31, 2023, 12:43am UTC](https://discourse.julialang.org/t/custom-headers-when-adding-packages/105554 "2023-10-31T00:43:23Z")

</div>

Is there a way to specify headers for Pkg registry and package downloads? My corporate proxy will only work with a specific User-Agent string. I tested it successfully with Downloads.download using the headers keyword-a…

---

## [Using an assignment outside of threaded for loop degraded performance by a huge amount](https://discourse.julialang.org/t/using-an-assignment-outside-of-threaded-for-loop-degraded-performance-by-a-huge-amount/105552)

<div class="topic-metadata">

**Author:** [@Tortar](https://discourse.julialang.org/u/Tortar)\
**Replies:** 10\
**Last updated:** [October 30, 2023, 11:51pm UTC](https://discourse.julialang.org/t/using-an-assignment-outside-of-threaded-for-loop-degraded-performance-by-a-huge-amount/105552 "2023-10-30T23:51:05Z")

</div>

I created an MWE for this question, in practice the only difference between the fs functions is that T = Int is introduced in different scopes, however the first two versions are very slow: using Base.Threads: @threads,…

---

## [JET reports tons of "runtime dispatch detected:" when using \`Statistics.cov\`](https://discourse.julialang.org/t/jet-reports-tons-of-runtime-dispatch-detected-when-using-statistics-cov/105600)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 0\
**Last updated:** [October 30, 2023, 11:06pm UTC](https://discourse.julialang.org/t/jet-reports-tons-of-runtime-dispatch-detected-when-using-statistics-cov/105600 "2023-10-30T23:06:43Z")

</div>

And it’s much worse in 1.10 A type stability issue? using JET using Statistics @report\_opt cov(rand(10,3)) ═════ 32 possible errors found ═════ ┌ cov(X::Matrix{Float64}) @ Statistics C:\\workdir\\usr\\share\\julia\\stdlib\\…

---

## ["else" in try-catch breaks cell-editor?](https://discourse.julialang.org/t/else-in-try-catch-breaks-cell-editor/92563)

<div class="topic-metadata">

**Author:** [@DOT](https://discourse.julialang.org/u/DOT)\
**Replies:** 3\
**Last updated:** [October 30, 2023, 8:37pm UTC](https://discourse.julialang.org/t/else-in-try-catch-breaks-cell-editor/92563 "2023-10-30T20:37:06Z")

</div>

The new Julia-1.8 else-branch in try-catch seems to break the Pluto cell editor for me. I’m on Julia 1.8.4 (macOS ARM), Pluto 0.19.19. Does anybody else have this problem? Reproducing it I start a new Julia+Pluto sess…

---

## [When should I \`activate\`?](https://discourse.julialang.org/t/when-should-i-activate/105581)

<div class="topic-metadata">

**Author:** [@kaimera](https://discourse.julialang.org/u/kaimera)\
**Replies:** 4\
**Last updated:** [October 30, 2023, 8:33pm UTC](https://discourse.julialang.org/t/when-should-i-activate/105581 "2023-10-30T20:33:29Z")

</div>

I understand this is a super basic question, but I don’t think I know the correct words to find similar questions that have already answered this. I’m attempting to make a package, using Revise.jl. I’m following the coo…

---

## [Speed of ApproxFun.jl solution to Screened Poisson in cylindrical coordinates](https://discourse.julialang.org/t/speed-of-approxfun-jl-solution-to-screened-poisson-in-cylindrical-coordinates/105565)

<div class="topic-metadata">

**Author:** [@parb](https://discourse.julialang.org/u/parb)\
**Replies:** 2\
**Last updated:** [October 30, 2023, 8:26pm UTC](https://discourse.julialang.org/t/speed-of-approxfun-jl-solution-to-screened-poisson-in-cylindrical-coordinates/105565 "2023-10-30T20:26:28Z")

</div>

The examples of ApproxFun.jl examples solutions are fascinating and powerful, and I’d love to figure out the best performance for solving the homogeneous screened Poisson equation but in cylindrical coordinates (with cir…

---

## [Custom environment with continuous state and action spaces](https://discourse.julialang.org/t/custom-environment-with-continuous-state-and-action-spaces/105595)

<div class="topic-metadata">

**Author:** [@hicham\_henna](https://discourse.julialang.org/u/hicham_henna)\
**Replies:** 0\
**Last updated:** [October 30, 2023, 7:58pm UTC](https://discourse.julialang.org/t/custom-environment-with-continuous-state-and-action-spaces/105595 "2023-10-30T19:58:58Z")

</div>

how to implement a custom environment with continuous state and action spaces in the reinforcement learning framework under Julia? for example, to control the attitude of satellite we need the definition of: (i) markovia…

---

## [Status of constraint programming in JuMP](https://discourse.julialang.org/t/status-of-constraint-programming-in-jump/105580)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 3\
**Last updated:** [October 30, 2023, 7:45pm UTC](https://discourse.julialang.org/t/status-of-constraint-programming-in-jump/105580 "2023-10-30T19:45:03Z")

</div>

Now that MathOptInterface v1 supports constraint programming, what is the status of this modeling paradigm in the JuMP ecosystem? I found this checklist issue but it is a bit hard to parse for outsiders, so I wanted to m…

---

## [Replacing Variable Name with a String in a Julia Macro](https://discourse.julialang.org/t/replacing-variable-name-with-a-string-in-a-julia-macro/105579)

<div class="topic-metadata">

**Author:** [@Akhil\_Akkapelli](https://discourse.julialang.org/u/Akhil_Akkapelli)\
**Replies:** 1\
**Last updated:** [October 30, 2023, 5:07pm UTC](https://discourse.julialang.org/t/replacing-variable-name-with-a-string-in-a-julia-macro/105579 "2023-10-30T17:07:19Z")

</div>

I’m working on a project where I need to create a macro in Julia that takes a Julia code expression, a variable name, and a string as input and returns the same expression with the specified variable name replaced by the…

---

## [Transpose columns to rows](https://discourse.julialang.org/t/transpose-columns-to-rows/105508)

<div class="topic-metadata">

**Author:** [@davide445](https://discourse.julialang.org/u/davide445)\
**Replies:** 9\
**Last updated:** [October 30, 2023, 6:37pm UTC](https://discourse.julialang.org/t/transpose-columns-to-rows/105508 "2023-10-30T18:37:23Z")

</div>

To prepare the import into an ERP system of a list of customers (identified from an id) and their related 10 years historical usage data of a system, I needed to shift the data from customer1, y1:value1, y2:value2, … y…

---

## [Block diagonal and sparse matrices](https://discourse.julialang.org/t/block-diagonal-and-sparse-matrices/105551)

<div class="topic-metadata">

**Author:** [@loisel](https://discourse.julialang.org/u/loisel)\
**Replies:** 13\
**Last updated:** [October 30, 2023, 5:07pm UTC](https://discourse.julialang.org/t/block-diagonal-and-sparse-matrices/105551 "2023-10-30T17:07:23Z")

</div>

I have a code that does something like this: Z = inv(ABCDE) Here, A is a diagonal matrix. B is block diagonal, its diagonal blocks are 2x2. C is block diagonal, its diagonal blocks are 4x4. Subsequent matrices have lar…

---

## [Matlab figure replacement](https://discourse.julialang.org/t/matlab-figure-replacement/74942)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 24\
**Last updated:** [October 30, 2023, 4:41pm UTC](https://discourse.julialang.org/t/matlab-figure-replacement/74942 "2023-10-30T16:41:04Z")

</div>

In Matlab it is possible to make a figure and save it to disk. If you re-open this figure you can still zoome, have linked axis and so on. Is there a Julia equivalent? I tried PlotlyJS.jl and saving the plot as a html …

---

## [Odd inlining behaviour with cglobal wrapper, IS THIS A BUG? What am I doing wrong?](https://discourse.julialang.org/t/odd-inlining-behaviour-with-cglobal-wrapper-is-this-a-bug-what-am-i-doing-wrong/104562)

<div class="topic-metadata">

**Author:** [@gmcardle](https://discourse.julialang.org/u/gmcardle)\
**Replies:** 5\
**Last updated:** [October 30, 2023, 3:42pm UTC](https://discourse.julialang.org/t/odd-inlining-behaviour-with-cglobal-wrapper-is-this-a-bug-what-am-i-doing-wrong/104562 "2023-10-30T15:42:44Z")

</div>

Hi, I’m trying to make a convenience wrapper for fetching global variables from a C library. The basic wrapper function works, but multiple-dispatch variants don’t work unless I add some specific lines of debugging outpu…

---

## [How Does Compat Requirement Changes for General Registry Affect Package Maintainers?](https://discourse.julialang.org/t/how-does-compat-requirement-changes-for-general-registry-affect-package-maintainers/104960)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 17\
**Last updated:** [October 30, 2023, 3:21pm UTC](https://discourse.julialang.org/t/how-does-compat-requirement-changes-for-general-registry-affect-package-maintainers/104960 "2023-10-30T15:21:38Z")

</div>

Hi folks! This is a post about the recent announcement: I was curious about a few things here: How does this impact packages that support testing of older Julia versions which did not have this segmentation of stan…

---

## [\[ANN\] ConstraintTrees.jl -- tidy constrained systems for JuMP](https://discourse.julialang.org/t/ann-constrainttrees-jl-tidy-constrained-systems-for-jump/105563)

<div class="topic-metadata">

**Author:** [@MirekKratochvil](https://discourse.julialang.org/u/MirekKratochvil)\
**Replies:** 0\
**Last updated:** [October 30, 2023, 11:43am UTC](https://discourse.julialang.org/t/ann-constrainttrees-jl-tidy-constrained-systems-for-jump/105563 "2023-10-30T11:43:22Z")

</div>

What is it about? We’ve lately spent quite some time on developing constraint-based modeling software that works with JuMP (first COBREXA.jl, then FBCModelTests.jl, and lately DifferentialMetabolism.jl). A common observ…

---

## [Pope tempted by Python!](https://discourse.julialang.org/t/pope-tempted-by-python/105561)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 0\
**Last updated:** [October 30, 2023, 10:24am UTC](https://discourse.julialang.org/t/pope-tempted-by-python/105561 "2023-10-30T10:24:28Z")

</div>

The Pope is a Pythonista!

---

## [Sort matrix based on the elements of a specific column](https://discourse.julialang.org/t/sort-matrix-based-on-the-elements-of-a-specific-column/23475)

<div class="topic-metadata">

**Author:** [@eed](https://discourse.julialang.org/u/eed)\
**Replies:** 8\
**Last updated:** [October 30, 2023, 2:12am UTC](https://discourse.julialang.org/t/sort-matrix-based-on-the-elements-of-a-specific-column/23475 "2023-10-30T02:12:35Z")

</div>

Hi I’m new to Julia but I have some exprience with Matlab. I have an array A (mix of numbers and text columns) and I want to sort the rows based on the values on a specific column of A. In matlab, the code is: B = so…

---

## [Keyboard Buttons in GameZero](https://discourse.julialang.org/t/keyboard-buttons-in-gamezero/105547)

<div class="topic-metadata">

**Author:** [@CallError](https://discourse.julialang.org/u/CallError)\
**Replies:** 2\
**Last updated:** [October 30, 2023, 8:19am UTC](https://discourse.julialang.org/t/keyboard-buttons-in-gamezero/105547 "2023-10-30T08:19:56Z")

</div>

I use g.keyboard.LEFT to check whether the Left button is pressed. What about plus and minus. For minus i can use g.keyboard.MINUS , but it is not working for plus. I believe it is because shift has to be pressed on …

---

## [\[ANN\] ImageColorThresholderApp.jl - GUI tool for thresholding color images](https://discourse.julialang.org/t/ann-imagecolorthresholderapp-jl-gui-tool-for-thresholding-color-images/105474)

<div class="topic-metadata">

**Author:** [@Rakesh](https://discourse.julialang.org/u/Rakesh)\
**Replies:** 2\
**Last updated:** [October 30, 2023, 6:43am UTC](https://discourse.julialang.org/t/ann-imagecolorthresholderapp-jl-gui-tool-for-thresholding-color-images/105474 "2023-10-30T06:43:27Z")

</div>

I am very pleased to announce the ImageColorThresholderApp.jl ImageColorThresholderApp is a GUI application powered by Makie.jl, Inspired by MATLAB Color Thresholder app. ImageColorThresholderApp is a GUI tool for segm…

---

## [Coloring Voronoi cells in Delaunay Triangulations by area](https://discourse.julialang.org/t/coloring-voronoi-cells-in-delaunay-triangulations-by-area/105545)

<div class="topic-metadata">

**Author:** [@charperflow](https://discourse.julialang.org/u/charperflow)\
**Replies:** 3\
**Last updated:** [October 30, 2023, 6:17am UTC](https://discourse.julialang.org/t/coloring-voronoi-cells-in-delaunay-triangulations-by-area/105545 "2023-10-30T06:17:45Z")

</div>

I have a set of points which I have used the DelaunayTriangulation Package to generate voronoi cells. I have calculated the are of each cell, and now I want to color each cell according to the area. When I read the voron…

---

## [Quick guide to get graph of dependencies with import times](https://discourse.julialang.org/t/quick-guide-to-get-graph-of-dependencies-with-import-times/105557)

<div class="topic-metadata">

**Author:** [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Replies:** 0\
**Last updated:** [October 30, 2023, 2:17am UTC](https://discourse.julialang.org/t/quick-guide-to-get-graph-of-dependencies-with-import-times/105557 "2023-10-30T02:17:25Z")

</div>

tl;dr - a script to plot dependencies and the associated @time\_imports time. I’m in the process of putting one of my packages through a diet and wanted to better understand the upstream dependencies and their impact on …

---

## [Makie Heatmap Tooltips](https://discourse.julialang.org/t/makie-heatmap-tooltips/105522)

<div class="topic-metadata">

**Author:** [@bobmccrory](https://discourse.julialang.org/u/bobmccrory)\
**Replies:** 3\
**Last updated:** [October 29, 2023, 11:35pm UTC](https://discourse.julialang.org/t/makie-heatmap-tooltips/105522 "2023-10-29T23:35:01Z")

</div>

I am trying to add tooltips to a heatmap in VS Code/Jupyter/CairoMakie. Could someone please post some simple example code? Thanks.

---

## [Help me with using GtkPaned in Gtk.jl](https://discourse.julialang.org/t/help-me-with-using-gtkpaned-in-gtk-jl/96424)

<div class="topic-metadata">

**Author:** [@samq](https://discourse.julialang.org/u/samq)\
**Replies:** 1\
**Last updated:** [October 29, 2023, 10:52pm UTC](https://discourse.julialang.org/t/help-me-with-using-gtkpaned-in-gtk-jl/96424 "2023-10-29T22:52:16Z")

</div>

OS = Ubuntu 18.04 Julia version = 1.8.5 I looked at the Gtk.jl web site, but could not discern how to resolve the ‘ERROR: LoadError: MethodError(GtkPanedLeaf, (0, 200), 0xffffffffffffffff)’. Using Google, I couldn’t fi…

---

## [How to set a Non-linear function with double summatory](https://discourse.julialang.org/t/how-to-set-a-non-linear-function-with-double-summatory/105542)

<div class="topic-metadata">

**Author:** [@PatrickeTownsend](https://discourse.julialang.org/u/PatrickeTownsend)\
**Replies:** 4\
**Last updated:** [October 29, 2023, 9:18pm UTC](https://discourse.julialang.org/t/how-to-set-a-non-linear-function-with-double-summatory/105542 "2023-10-29T21:18:54Z")

</div>

Hello Again! I’m trying to solve this optimization problem: But i’m not really sure about how to write down that objective function, I tried doing this: using JuMP using Ipopt model = Model(Ipopt.Optimizer) set\_att…

---

## [Dates.Time Parsing a Time String with Nanosecond Resolution](https://discourse.julialang.org/t/dates-time-parsing-a-time-string-with-nanosecond-resolution/105540)

<div class="topic-metadata">

**Author:** [@JohnDuffy](https://discourse.julialang.org/u/JohnDuffy)\
**Replies:** 3\
**Last updated:** [October 29, 2023, 7:34pm UTC](https://discourse.julialang.org/t/dates-time-parsing-a-time-string-with-nanosecond-resolution/105540 "2023-10-29T19:34:55Z")

</div>

Hi Julia 1.9.3 MacOS x86\_64 As I understand the Dates documentation, the resolution for a DateTime object is milliseconds and for a Time object it is nanoseconds. So, I believe I should be able to parse a nanosecond t…

---

## [Calling a more generic method with Parametric Types](https://discourse.julialang.org/t/calling-a-more-generic-method-with-parametric-types/105537)

<div class="topic-metadata">

**Author:** [@rmellema](https://discourse.julialang.org/u/rmellema)\
**Replies:** 10\
**Last updated:** [October 29, 2023, 7:27pm UTC](https://discourse.julialang.org/t/calling-a-more-generic-method-with-parametric-types/105537 "2023-10-29T19:27:08Z")

</div>

Hey all, For some context, I want to do some work with the Agents.jl package in which I want to try to keep track of the movement of the agents (so I can draw their paths and manipulate them later). The easiest way I th…

---

## [UODE error](https://discourse.julialang.org/t/uode-error/105429)

<div class="topic-metadata">

**Author:** [@Marco\_Nesta](https://discourse.julialang.org/u/Marco_Nesta)\
**Replies:** 7\
**Last updated:** [October 29, 2023, 5:41pm UTC](https://discourse.julialang.org/t/uode-error/105429 "2023-10-29T17:41:50Z")

</div>

following this link signal (11.1): Segmentation fault in uODE · Issue #851 · SciML/DiffEqFlux.jl · GitHub I tried the code of the solution proposed by @ChrisRackauckas , but I have this error. can anyone help me? ERROR:…

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

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