# Latest

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

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

**Page:** 514

---

## [Plots; pythonplot(): approximate heatmap as gradients to save space](https://discourse.julialang.org/t/plots-pythonplot-approximate-heatmap-as-gradients-to-save-space/108293)

<div class="topic-metadata">

**Author:** [@maltee1](https://discourse.julialang.org/u/maltee1)\
**Replies:** 8\
**Last updated:** [January 10, 2024, 8:02am UTC](https://discourse.julialang.org/t/plots-pythonplot-approximate-heatmap-as-gradients-to-save-space/108293 "2024-01-10T08:02:44Z")

</div>

Hi, Is it possible to turn a heatmap from individual pixels into something that’s a little easier on storage? Especially, if nothing very exciting is happening in most places of the heatmap, a collection of gradients co…

---

## [Expr to String conversion](https://discourse.julialang.org/t/expr-to-string-conversion/4118)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 4\
**Last updated:** [January 10, 2024, 7:57am UTC](https://discourse.julialang.org/t/expr-to-string-conversion/4118 "2024-01-10T07:57:45Z")

</div>

Is there a function that converts an expression or symbol to a String representation?

---

## [Check if function accepts specific keyword argument](https://discourse.julialang.org/t/check-if-function-accepts-specific-keyword-argument/108605)

<div class="topic-metadata">

**Author:** [@sandyspiers](https://discourse.julialang.org/u/sandyspiers)\
**Replies:** 3\
**Last updated:** [January 10, 2024, 7:06am UTC](https://discourse.julialang.org/t/check-if-function-accepts-specific-keyword-argument/108605 "2024-01-10T07:06:15Z")

</div>

Suppose I have julia\> f(;y=1) = y f (generic function with 1 method) If I want to check whether f accepts y as a keyword argument I can do julia\> hasmethod(f, Tuple{}, (:y,)) true But this requires knowing the number…

---

## [Odd behavior with mul!() and @view](https://discourse.julialang.org/t/odd-behavior-with-mul-and-view/108606)

<div class="topic-metadata">

**Author:** [@johnb](https://discourse.julialang.org/u/johnb)\
**Replies:** 3\
**Last updated:** [January 10, 2024, 5:44am UTC](https://discourse.julialang.org/t/odd-behavior-with-mul-and-view/108606 "2024-01-10T05:44:21Z")

</div>

I’m trying to use mul!() to perform low-memory multiplications on subsets of larger matrices using code. My actual code loops through many slices of smaller views of a large matrix (large set of ODEs chunked for easier u…

---

## [Dictionaries for StaticCompiler?](https://discourse.julialang.org/t/dictionaries-for-staticcompiler/108601)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 1\
**Last updated:** [January 10, 2024, 3:50am UTC](https://discourse.julialang.org/t/dictionaries-for-staticcompiler/108601 "2024-01-10T03:50:35Z")

</div>

Is there any dictionary implementation that does not need GC and is therefore compatible with StaticCompiler.jl for the purpose of compiling small binary executables?

---

## [New fresh talks on GeoStats.jl](https://discourse.julialang.org/t/new-fresh-talks-on-geostats-jl/108593)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 3\
**Last updated:** [January 10, 2024, 12:23am UTC](https://discourse.julialang.org/t/new-fresh-talks-on-geostats-jl/108593 "2024-01-10T00:23:50Z")

</div>

---

## [Fix variables or add as a contraint?](https://discourse.julialang.org/t/fix-variables-or-add-as-a-contraint/108594)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 5\
**Last updated:** [January 9, 2024, 11:04pm UTC](https://discourse.julialang.org/t/fix-variables-or-add-as-a-contraint/108594 "2024-01-09T23:04:48Z")

</div>

Dear all, I have an Integer (binary) problem where I want to fix some variables to obtain an heuristic solution. I use to add the constraint: @constraint(model, x\[j\] == 1) if I want to fix x\_j in 1. I would like to …

---

## [Physics-enhanced deep surrogates for partial differential equations](https://discourse.julialang.org/t/physics-enhanced-deep-surrogates-for-partial-differential-equations/108596)

<div class="topic-metadata">

**Author:** [@Perrin\_Meyer](https://discourse.julialang.org/u/Perrin_Meyer)\
**Replies:** 0\
**Last updated:** [January 9, 2024, 11:03pm UTC](https://discourse.julialang.org/t/physics-enhanced-deep-surrogates-for-partial-differential-equations/108596 "2024-01-09T23:03:50Z")

</div>

Very Interesting new Nature ML paper from some of the core Julia developers (using Julia as well). (It’s nice the journal article is open access, it’s worth a read).

---

## [Seeking Suggestions for a Julia Tech Talk to Python Data Scientists](https://discourse.julialang.org/t/seeking-suggestions-for-a-julia-tech-talk-to-python-data-scientists/108575)

<div class="topic-metadata">

**Author:** [@ehsani63](https://discourse.julialang.org/u/ehsani63)\
**Replies:** 5\
**Last updated:** [January 9, 2024, 9:38pm UTC](https://discourse.julialang.org/t/seeking-suggestions-for-a-julia-tech-talk-to-python-data-scientists/108575 "2024-01-09T21:38:03Z")

</div>

Hello everyone, I’m preparing to give a tech talk to my colleagues, who are primarily data scientists and developers using Python. Our products are software solutions related to the mining industry. The focus of the tal…

---

## [How to read model weights using FluxTraining (stateaccess issues)?](https://discourse.julialang.org/t/how-to-read-model-weights-using-fluxtraining-stateaccess-issues/106409)

<div class="topic-metadata">

**Author:** [@neuromancer](https://discourse.julialang.org/u/neuromancer)\
**Replies:** 3\
**Last updated:** [January 9, 2024, 9:35pm UTC](https://discourse.julialang.org/t/how-to-read-model-weights-using-fluxtraining-stateaccess-issues/106409 "2024-01-09T21:35:21Z")

</div>

Summary I am looking for some help with implementing a custom validation loop using FluxTraining. Briefly, I am using Flux to optimize a matrix to satisfy a data-driven cost-function. Since the cost function depends on t…

---

## [Does Lux work with FluxTraining?](https://discourse.julialang.org/t/does-lux-work-with-fluxtraining/108591)

<div class="topic-metadata">

**Author:** [@neuromancer](https://discourse.julialang.org/u/neuromancer)\
**Replies:** 0\
**Last updated:** [January 9, 2024, 9:33pm UTC](https://discourse.julialang.org/t/does-lux-work-with-fluxtraining/108591 "2024-01-09T21:33:38Z")

</div>

I’m thinking about switching from Flux to Lux, since I really need a WeightNorm layer and I am struggling to write one for myself. I am heavily entrenched into using FluxTraining. Does anyone know if Lux works with FluxT…

---

## [Mutlithread functions within for loop](https://discourse.julialang.org/t/mutlithread-functions-within-for-loop/108577)

<div class="topic-metadata">

**Author:** [@trasor](https://discourse.julialang.org/u/trasor)\
**Replies:** 3\
**Last updated:** [January 9, 2024, 8:58pm UTC](https://discourse.julialang.org/t/mutlithread-functions-within-for-loop/108577 "2024-01-09T20:58:29Z")

</div>

Hello everyone, im kinda new to julia (self learning since a few weeks). I am wondering how to use multithreading properly for functions within a for loop like: A = … (some 3d array) B = …(some 3d array) for i in 1:1…

---

## [Tuning parameters](https://discourse.julialang.org/t/tuning-parameters/108573)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 1\
**Last updated:** [January 9, 2024, 8:44pm UTC](https://discourse.julialang.org/t/tuning-parameters/108573 "2024-01-09T20:44:45Z")

</div>

I need to solve a hard MIP model using Gurobi. There is a tool to set the best parameters combination to solve this problem called “Parameter Tunning”. How can I find parameter tuning using Julia? Here, I present a simp…

---

## [CI on Linux: which system fonts are available?](https://discourse.julialang.org/t/ci-on-linux-which-system-fonts-are-available/108588)

<div class="topic-metadata">

**Author:** [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Replies:** 2\
**Last updated:** [January 9, 2024, 8:40pm UTC](https://discourse.julialang.org/t/ci-on-linux-which-system-fonts-are-available/108588 "2024-01-09T20:40:55Z")

</div>

Documentation for a package is built on Linux CI. Does anybody know what system fonts are available to Julia when the docs are being built? I want to specify some different fonts for some examples but don’t know which on…

---

## [How to pass Ref of struct containing Cstring to Fortran](https://discourse.julialang.org/t/how-to-pass-ref-of-struct-containing-cstring-to-fortran/107878)

<div class="topic-metadata">

**Author:** [@danielmatz](https://discourse.julialang.org/u/danielmatz)\
**Replies:** 3\
**Last updated:** [January 9, 2024, 8:04pm UTC](https://discourse.julialang.org/t/how-to-pass-ref-of-struct-containing-cstring-to-fortran/107878 "2024-01-09T20:04:05Z")

</div>

I have a struct that contains a Cstring. I saw this older post about how to pass such a struct to C: I need to pass such a struct to Fortran (the Fortran code converts the C-style string to a Fortran string), so that …

---

## [Call for Speakers for the 2024 Carolina Code Conference is open until April 15th](https://discourse.julialang.org/t/call-for-speakers-for-the-2024-carolina-code-conference-is-open-until-april-15th/108583)

<div class="topic-metadata">

**Author:** [@brightball](https://discourse.julialang.org/u/brightball)\
**Replies:** 0\
**Last updated:** [January 9, 2024, 7:12pm UTC](https://discourse.julialang.org/t/call-for-speakers-for-the-2024-carolina-code-conference-is-open-until-april-15th/108583 "2024-01-09T19:12:44Z")

</div>

A polyglot conference for all who code! Just wanted to drop by and let everyone know that our Call for Speakers has opened for 2024. We’re growing this year, doubling from 150 to 300 attendees and a 2 day event in beaut…

---

## [Clean way to use mean value with distributions](https://discourse.julialang.org/t/clean-way-to-use-mean-value-with-distributions/108580)

<div class="topic-metadata">

**Author:** [@lenz](https://discourse.julialang.org/u/lenz)\
**Replies:** 0\
**Last updated:** [January 9, 2024, 6:03pm UTC](https://discourse.julialang.org/t/clean-way-to-use-mean-value-with-distributions/108580 "2024-01-09T18:03:30Z")

</div>

I have a model that is called with a strut with all the arguments (with units) needed. I would like to use this model to do uncertainty analysis by setting some of these values to a distribution. I would like to be able…

---

## [How to use discrete events with an affect](https://discourse.julialang.org/t/how-to-use-discrete-events-with-an-affect/108503)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [January 8, 2024, 10:40am UTC](https://discourse.julialang.org/t/how-to-use-discrete-events-with-an-affect/108503 "2024-01-08T10:40:53Z")

</div>

I am trying to add an affect function to a discrete event. Not working: function bb\_affect!(integ, u, p, ctx) println(integ.u) end discrete\_events = \[\[1.0, 4.0\] =\> bb\_affect!\] @named sys = ODESystem(eqs…

---

## [How to delete the number of lines plotted in the graph](https://discourse.julialang.org/t/how-to-delete-the-number-of-lines-plotted-in-the-graph/108541)

<div class="topic-metadata">

**Author:** [@kim1](https://discourse.julialang.org/u/kim1)\
**Replies:** 6\
**Last updated:** [January 9, 2024, 5:01pm UTC](https://discourse.julialang.org/t/how-to-delete-the-number-of-lines-plotted-in-the-graph/108541 "2024-01-09T17:01:40Z")

</div>

Hi guys Im trying to plot my graph but it keep on increasing the number of line plotted each time. Plot{Plots.GRBackend() n=5} I want only n=2. How do I delete the unnecessary lines.

---

## [Failure to optimize due to type recursion](https://discourse.julialang.org/t/failure-to-optimize-due-to-type-recursion/108568)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [January 9, 2024, 4:56pm UTC](https://discourse.julialang.org/t/failure-to-optimize-due-to-type-recursion/108568 "2024-01-09T16:56:31Z")

</div>

I find that it is relatively easy to get non-inferred code where the mapfoldl family is involved, because their implementation has so many layers. Eg a simple example is \_length(c::Real) = 1 \_length(c::Tuple) = mapfoldl…

---

## [PrecompileTools.@compile\_workload does not seem to work at all - what am I doing wrong?](https://discourse.julialang.org/t/precompiletools-compile-workload-does-not-seem-to-work-at-all-what-am-i-doing-wrong/108481)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 4\
**Last updated:** [January 9, 2024, 3:24pm UTC](https://discourse.julialang.org/t/precompiletools-compile-workload-does-not-seem-to-work-at-all-what-am-i-doing-wrong/108481 "2024-01-09T15:24:38Z")

</div>

Hi there, I am testing PrecompileTools, and I just don’t get it to work - despite precompilation seems to work (check by MethodAnalysis.methodinstances), julia just recompiles again and again und process restart… module…

---

## [Build DiffEq functions from Expr](https://discourse.julialang.org/t/build-diffeq-functions-from-expr/17469)

<div class="topic-metadata">

**Author:** [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Replies:** 11\
**Last updated:** [January 9, 2024, 3:19pm UTC](https://discourse.julialang.org/t/build-diffeq-functions-from-expr/17469 "2024-01-09T15:19:14Z")

</div>

Hello, my question is both related to building functions from expressions and DiffEq domain. I am working on a simulation engine based on ODE solver and the input problems for the solver are provided as JSON files, whic…

---

## [Fix git artifact on NixOS](https://discourse.julialang.org/t/fix-git-artifact-on-nixos/108567)

<div class="topic-metadata">

**Author:** [@laikq](https://discourse.julialang.org/u/laikq)\
**Replies:** 1\
**Last updated:** [January 9, 2024, 3:09pm UTC](https://discourse.julialang.org/t/fix-git-artifact-on-nixos/108567 "2024-01-09T15:09:48Z")

</div>

I’m using Documenter on NixOS. When I run julia --project make.jl, I get the following error: ┌ Warning: Unable to determine HTML(edit\_link = ...) from remote HEAD branch, defaulting to "master". │ Calling \`git remote\` …

---

## [Implement the "SHA512withRSA" algorithm using OpenSSL](https://discourse.julialang.org/t/implement-the-sha512withrsa-algorithm-using-openssl/108566)

<div class="topic-metadata">

**Author:** [@yshadrin](https://discourse.julialang.org/u/yshadrin)\
**Replies:** 0\
**Last updated:** [January 9, 2024, 2:42pm UTC](https://discourse.julialang.org/t/implement-the-sha512withrsa-algorithm-using-openssl/108566 "2024-01-09T14:42:49Z")

</div>

I have a bash script that allows you to encrypt data using a secret key and the “SHA512withRSA” algorithm: secret="LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2d0lCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktrd2dnU2xBZ0VBQW9JQkFR…

---

## [Adding agents in mixed agent model with continuous space (Agents.jl)](https://discourse.julialang.org/t/adding-agents-in-mixed-agent-model-with-continuous-space-agents-jl/108560)

<div class="topic-metadata">

**Author:** [@eleonoragatti44](https://discourse.julialang.org/u/eleonoragatti44)\
**Replies:** 6\
**Last updated:** [January 9, 2024, 1:52pm UTC](https://discourse.julialang.org/t/adding-agents-in-mixed-agent-model-with-continuous-space-agents-jl/108560 "2024-01-09T13:52:10Z")

</div>

Hi all, I am trying to create an ABM with mixed agents on a continuous space. I tried to do the same on a grid space and everything worked well but when moving to a continuous space I face some issues I didn’t find the w…

---

## [Error bar color in Gadfly](https://discourse.julialang.org/t/error-bar-color-in-gadfly/108561)

<div class="topic-metadata">

**Author:** [@mattwigway](https://discourse.julialang.org/u/mattwigway)\
**Replies:** 0\
**Last updated:** [January 9, 2024, 1:32pm UTC](https://discourse.julialang.org/t/error-bar-color-in-gadfly/108561 "2024-01-09T13:32:18Z")

</div>

I’m trying to make a dodged bar plot with error bars in Gadfly. The problem is that the error bars are the same color as the bars, so you can’t see them. I’d like to just make the error bars black. plot( base\_race\_c…

---

## [StaticArrays forces recompilation of JLLs on Windows with Julia 1.8.1](https://discourse.julialang.org/t/staticarrays-forces-recompilation-of-jlls-on-windows-with-julia-1-8-1/87725)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 18\
**Last updated:** [January 9, 2024, 12:59pm UTC](https://discourse.julialang.org/t/staticarrays-forces-recompilation-of-jlls-on-windows-with-julia-1-8-1/87725 "2024-01-09T12:59:40Z")

</div>

Eric Davies, @longemen3000, I and others encountered an unexpected result after looking at @time\_imports and discussed it on Slack. Something was forcing JLL packages to recompile a lot of code. We narrowed it down to th…

---

## [Compact string representation of a float](https://discourse.julialang.org/t/compact-string-representation-of-a-float/108526)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 2\
**Last updated:** [January 8, 2024, 6:35pm UTC](https://discourse.julialang.org/t/compact-string-representation-of-a-float/108526 "2024-01-08T18:35:19Z")

</div>

I want the compact (in the sense of IOContext(io, :compact =\> true)) string representation of a floating point number or vector for inclusion in a Quarto document. Currently I define a function function compact(x; buf:…

---

## [How to apply an in-place function to a slice of a vector?](https://discourse.julialang.org/t/how-to-apply-an-in-place-function-to-a-slice-of-a-vector/108520)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 11\
**Last updated:** [January 9, 2024, 11:02am UTC](https://discourse.julialang.org/t/how-to-apply-an-in-place-function-to-a-slice-of-a-vector/108520 "2024-01-09T11:02:07Z")

</div>

I want to have an in-place function that takes a vector as an argument and applies another in-place function to a subarray (in general sense). How do I do this? function f!(du, u) println("\\nf called") @show u …

---

## [What is supposed to be copied from the context menu of a plot?](https://discourse.julialang.org/t/what-is-supposed-to-be-copied-from-the-context-menu-of-a-plot/108522)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 2\
**Last updated:** [January 9, 2024, 9:03am UTC](https://discourse.julialang.org/t/what-is-supposed-to-be-copied-from-the-context-menu-of-a-plot/108522 "2024-01-09T09:03:36Z")

</div>

What is supposed to be copies from the context menu of a plot and where can it be pasted?

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

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