# Latest

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

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

**Page:** 561

---

## [Performance of generating uniform Float32 numbers](https://discourse.julialang.org/t/performance-of-generating-uniform-float32-numbers/105863)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 4\
**Last updated:** [November 6, 2023, 6:11pm UTC](https://discourse.julialang.org/t/performance-of-generating-uniform-float32-numbers/105863 "2023-11-06T18:11:22Z")

</div>

I’m trying to generate Float32’s from a uniformly from a range, and found Normal from distributions doesn’t offer great performance compared to just stretching and shifting what rand(Float32) already produces. Am I doing…

---

## [Differentiable image values of a triangle](https://discourse.julialang.org/t/differentiable-image-values-of-a-triangle/105821)

<div class="topic-metadata">

**Author:** [@Jakub\_Mitura](https://discourse.julialang.org/u/Jakub_Mitura)\
**Replies:** 3\
**Last updated:** [November 5, 2023, 8:43pm UTC](https://discourse.julialang.org/t/differentiable-image-values-of-a-triangle/105821 "2023-11-05T20:43:37Z")

</div>

I have a 2D gray and white image and set of coordinates of triangles (generally all of the image is triangluted) is there a differentiable stable way to get mean and variance of the part of the image enclosed by each tr…

---

## [JuliaUserGroupMunich: Ole Kröger, Javis.jl - Julia Animations and Visualizations](https://discourse.julialang.org/t/juliausergroupmunich-ole-kroger-javis-jl-julia-animations-and-visualizations/105183)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 7\
**Last updated:** [November 6, 2023, 5:26pm UTC](https://discourse.julialang.org/t/juliausergroupmunich-ole-kroger-javis-jl-julia-animations-and-visualizations/105183 "2023-11-06T17:26:40Z")

</div>

Join us online :spiral\_calendar: Monday 6. November 2023 :six\_thirty: CET 18:30. organized via meetup Javis.jl - Julia Animations and Visualizations ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ I am glad to welcome Ole Kröger as ou…

---

## [Type functions in structs](https://discourse.julialang.org/t/type-functions-in-structs/105864)

<div class="topic-metadata">

**Author:** [@atteson](https://discourse.julialang.org/u/atteson)\
**Replies:** 3\
**Last updated:** [November 6, 2023, 4:08pm UTC](https://discourse.julialang.org/t/type-functions-in-structs/105864 "2023-11-06T16:08:22Z")

</div>

Is there a way to implement the following without error: B2I(T) = T == Bool ? Int : T struct S{T} x::B2I(T) end s1 = S{Bool}( 3 )

---

## [Creating a call graph for Julia](https://discourse.julialang.org/t/creating-a-call-graph-for-julia/105857)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [November 6, 2023, 3:34pm UTC](https://discourse.julialang.org/t/creating-a-call-graph-for-julia/105857 "2023-11-06T15:34:08Z")

</div>

Is there a tool to create a call graph from a Julia function? See: What is a Call Graph? And How to Generate them Automatically

---

## [Generating Float32 uniform random numbers with Distributions.jl](https://discourse.julialang.org/t/generating-float32-uniform-random-numbers-with-distributions-jl/63889)

<div class="topic-metadata">

**Author:** [@bad\_at\_math](https://discourse.julialang.org/u/bad_at_math)\
**Replies:** 2\
**Last updated:** [November 6, 2023, 2:32pm UTC](https://discourse.julialang.org/t/generating-float32-uniform-random-numbers-with-distributions-jl/63889 "2023-11-06T14:32:43Z")

</div>

I can define and sample from a uniform distribution with Float32 bounds as follows: using Distributions dist = Uniform{Float32}(-1.0f0, 1.0f0) x = rand(dist) However, the x here has type Float64, not Float32. Is there…

---

## [Django/mezzanine like example with genie?](https://discourse.julialang.org/t/django-mezzanine-like-example-with-genie/71083)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 6\
**Last updated:** [November 6, 2023, 2:28pm UTC](https://discourse.julialang.org/t/django-mezzanine-like-example-with-genie/71083 "2023-11-06T14:28:06Z")

</div>

Hi, I am considering porting a website from python to Julia. I have a django/mezzanine website which is dynamic (login, admin backend, backend for building pages, users gestion…) and I am looking for something similar i…

---

## [Dlopen appending file extensions for shared libraries?](https://discourse.julialang.org/t/dlopen-appending-file-extensions-for-shared-libraries/105761)

<div class="topic-metadata">

**Author:** [@Gokhan\_Kof](https://discourse.julialang.org/u/Gokhan_Kof)\
**Replies:** 4\
**Last updated:** [November 6, 2023, 1:11pm UTC](https://discourse.julialang.org/t/dlopen-appending-file-extensions-for-shared-libraries/105761 "2023-11-06T13:11:09Z")

</div>

In the documentation, it says, in the string, you might omit the file extension (.so, .dylib) , dlopen appends it and loads the library but I cannot get it to work. lib = Libdl.dlopen(joinpath(@\_\_DIR\_\_, "mylib")) mylib …

---

## [MonteCarloMeasurements.jl - Object with Particles Passed to Function with Comparison Operator](https://discourse.julialang.org/t/montecarlomeasurements-jl-object-with-particles-passed-to-function-with-comparison-operator/105843)

<div class="topic-metadata">

**Author:** [@matthew3245](https://discourse.julialang.org/u/matthew3245)\
**Replies:** 5\
**Last updated:** [November 6, 2023, 12:56pm UTC](https://discourse.julialang.org/t/montecarlomeasurements-jl-object-with-particles-passed-to-function-with-comparison-operator/105843 "2023-11-06T12:56:06Z")

</div>

I’m trying to pass an object that contains particles to a function that uses comparison operators. Consider the following simple example: using MonteCarloMeasurements mutable struct Foo{T} p::T end function add\_on…

---

## [Stopping a task based on a variable](https://discourse.julialang.org/t/stopping-a-task-based-on-a-variable/105773)

<div class="topic-metadata">

**Author:** [@vettert](https://discourse.julialang.org/u/vettert)\
**Replies:** 15\
**Last updated:** [November 6, 2023, 12:17pm UTC](https://discourse.julialang.org/t/stopping-a-task-based-on-a-variable/105773 "2023-11-06T12:17:04Z")

</div>

Hi, I am trying to stop a @spawn’ed task based on the value of a variable. Here is an example: Using Base.Threads function f(running) i = 0 while running\[\] == true i = i + 1 end println("I'm done…

---

## [How can I control the LaTeX settings of Weave output?](https://discourse.julialang.org/t/how-can-i-control-the-latex-settings-of-weave-output/105692)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 1\
**Last updated:** [November 6, 2023, 8:21am UTC](https://discourse.julialang.org/t/how-can-i-control-the-latex-settings-of-weave-output/105692 "2023-11-06T08:21:12Z")

</div>

How can I configure the LaTeX output of Weave.jl such as packages used, typefaces, etc.? Basically, can I pass LaTeX preamble to Weave?

---

## [Q: Symbolics.jl | How to convert symbolic multivariate polynomial to DynamicPolynomials type?](https://discourse.julialang.org/t/q-symbolics-jl-how-to-convert-symbolic-multivariate-polynomial-to-dynamicpolynomials-type/105618)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 4\
**Last updated:** [November 5, 2023, 3:29am UTC](https://discourse.julialang.org/t/q-symbolics-jl-how-to-convert-symbolic-multivariate-polynomial-to-dynamicpolynomials-type/105618 "2023-11-05T03:29:16Z")

</div>

Hello, How would one go about converting symbolic multivariate polynomials generated in Symbolics.jl to DynamicPolynomials.jl type? The end goal is fast numerical evaluation of multivariate polynomials using FixedPol…

---

## [\[ANN\] PropCheck.jl](https://discourse.julialang.org/t/ann-propcheck-jl/101481)

<div class="topic-metadata">

**Author:** [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Replies:** 29\
**Last updated:** [November 6, 2023, 7:24am UTC](https://discourse.julialang.org/t/ann-propcheck-jl/101481 "2023-11-06T07:24:49Z")

</div>

PropCheck.jl Hello everyone! After more than 4 years of WIP development, I’m very excited to announce PropCheck.jl, a property based testing framework loosely inspired by QuickCheck & Hedgehog. It features type based gen…

---

## [My silly journey into Julia](https://discourse.julialang.org/t/my-silly-journey-into-julia/105794)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 2\
**Last updated:** [November 6, 2023, 7:09am UTC](https://discourse.julialang.org/t/my-silly-journey-into-julia/105794 "2023-11-06T07:09:56Z")

</div>

Well, I wanted to build a game that is simulated, that you could do things like heroes do in movies or so. That would require quite a simulation, and I had to re-think how games are made, for example, should non-game- br…

---

## [Makie: save PNG with a particular num of pixels in x?](https://discourse.julialang.org/t/makie-save-png-with-a-particular-num-of-pixels-in-x/105807)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 7\
**Last updated:** [November 6, 2023, 6:02am UTC](https://discourse.julialang.org/t/makie-save-png-with-a-particular-num-of-pixels-in-x/105807 "2023-11-06T06:02:06Z")

</div>

I’d like to get a “reasonably” high-resolution PNG image. My image is wider than it is tall (which seems to be the default with CairoMakie) and so I’d like to say that “There should be 1200 pixels in the horizontal dire…

---

## [DifferentialEquations & DynamicalSystems: Converting output Vector{Vector{Float64}} to StateSpaceSet](https://discourse.julialang.org/t/differentialequations-dynamicalsystems-converting-output-vector-vector-float64-to-statespaceset/105793)

<div class="topic-metadata">

**Author:** [@MvanSteenbergen](https://discourse.julialang.org/u/MvanSteenbergen)\
**Replies:** 2\
**Last updated:** [November 6, 2023, 3:06am UTC](https://discourse.julialang.org/t/differentialequations-dynamicalsystems-converting-output-vector-vector-float64-to-statespaceset/105793 "2023-11-06T03:06:34Z")

</div>

I edited the post and added my steps below Hey, I am having compatibility issues with the DynamicalSystems and DifferentialEquations packages. I have implemented the following rule set using the DifferentialEquations …

---

## [Importing Python Modules](https://discourse.julialang.org/t/importing-python-modules/105123)

<div class="topic-metadata">

**Author:** [@Hao\_Wang](https://discourse.julialang.org/u/Hao_Wang)\
**Replies:** 8\
**Last updated:** [November 5, 2023, 9:33pm UTC](https://discourse.julialang.org/t/importing-python-modules/105123 "2023-11-05T21:33:51Z")

</div>

Hello mates! This is a new Julia user. I was caught by a trouble to import a Py module “graphviz” to Julia. I’ve checked that I am referring to the correct path of Py ENV\["PYTHON"\]="/Users/whao/anaconda3/bin/python3.11…

---

## [DiscreteCallback does not trigger as expected](https://discourse.julialang.org/t/discretecallback-does-not-trigger-as-expected/105816)

<div class="topic-metadata">

**Author:** [@christianhvejsel](https://discourse.julialang.org/u/christianhvejsel)\
**Replies:** 6\
**Last updated:** [November 5, 2023, 8:21pm UTC](https://discourse.julialang.org/t/discretecallback-does-not-trigger-as-expected/105816 "2023-11-05T20:21:46Z")

</div>

I am testing whether DiscreteCallback could be used instead of ContinuousCallback. For testing purposes I modified the ContinuousCallback bouncing ball example from the documentation: Bouncing ball ContinuousCallback exa…

---

## [Is println type instable?](https://discourse.julialang.org/t/is-println-type-instable/105818)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 10\
**Last updated:** [November 5, 2023, 8:18pm UTC](https://discourse.julialang.org/t/is-println-type-instable/105818 "2023-11-05T20:18:56Z")

</div>

See, there are Any’s poping out in the middle of the journey. julia\> using JET julia\> @report\_opt println(\["Bla", "Bla"\]) ═════ 4 possible errors found ═════ ┌ println(xs::Vector{String}) @ Base ./coreio.jl:4 │┌ printl…

---

## [Battling Tableau at Work](https://discourse.julialang.org/t/battling-tableau-at-work/105804)

<div class="topic-metadata">

**Author:** [@merlin](https://discourse.julialang.org/u/merlin)\
**Replies:** 8\
**Last updated:** [November 5, 2023, 8:18pm UTC](https://discourse.julialang.org/t/battling-tableau-at-work/105804 "2023-11-05T20:18:02Z")

</div>

At my mid-sized US tech company we are adopting more and more of the Tableau ecosystem. Not just the notebooks or server, but there is a cloud service and I was surprised to learn some form of orchestration and data pipe…

---

## [Writting runge-kutta stages as an array of expression](https://discourse.julialang.org/t/writting-runge-kutta-stages-as-an-array-of-expression/105817)

<div class="topic-metadata">

**Author:** [@lieskjur](https://discourse.julialang.org/u/lieskjur)\
**Replies:** 2\
**Last updated:** [November 5, 2023, 7:24pm UTC](https://discourse.julialang.org/t/writting-runge-kutta-stages-as-an-array-of-expression/105817 "2023-11-05T19:24:39Z")

</div>

Hi, I am writting a trajectory optimization scheme and for very specific reasons I want to constrain the change from state x\_j to x\_{j+1} to be a step of a runge-kutta method (I know multi-step methods would be more suit…

---

## [Garbage Compilation enabled in WebAssembly (at least in Google Chrome)](https://discourse.julialang.org/t/garbage-compilation-enabled-in-webassembly-at-least-in-google-chrome/105757)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 7\
**Last updated:** [November 5, 2023, 6:47pm UTC](https://discourse.julialang.org/t/garbage-compilation-enabled-in-webassembly-at-least-in-google-chrome/105757 "2023-11-05T18:47:04Z")

</div>

What does this mean for Julia? Julia can aready work in web browser (with WebAssembly), even with out GC standardized, but possibly it could work better with the web browsers GC used? Phase 5 - The Feature is Stand…

---

## [Generic Associated Types](https://discourse.julialang.org/t/generic-associated-types/105829)

<div class="topic-metadata">

**Author:** [@HashBrown](https://discourse.julialang.org/u/HashBrown)\
**Replies:** 3\
**Last updated:** [November 5, 2023, 6:33pm UTC](https://discourse.julialang.org/t/generic-associated-types/105829 "2023-11-05T18:33:05Z")

</div>

Hi, I am looking to define a type as below: gat1(::Type{Float64}) = Int64 gat2(::Type{Float64}) = String struct Foo{T} a::gat1(T) b::gat2(T) end f = Foo{Float64}(10, "Hello") Is there any way to get generic a…

---

## [Standard library versions required for package registration](https://discourse.julialang.org/t/standard-library-versions-required-for-package-registration/105823)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 4\
**Last updated:** [November 5, 2023, 5:42pm UTC](https://discourse.julialang.org/t/standard-library-versions-required-for-package-registration/105823 "2023-11-05T17:42:35Z")

</div>

The registration of a new version of one of my packages failed with the message: However, two of these packages do not report any versions: How is one supposed to come by this information?

---

## [How to find the best match for one image from an image set?](https://discourse.julialang.org/t/how-to-find-the-best-match-for-one-image-from-an-image-set/102705)

<div class="topic-metadata">

**Author:** [@RunguangLi](https://discourse.julialang.org/u/RunguangLi)\
**Replies:** 12\
**Last updated:** [November 5, 2023, 3:44pm UTC](https://discourse.julialang.org/t/how-to-find-the-best-match-for-one-image-from-an-image-set/102705 "2023-11-05T15:44:42Z")

</div>

Hi, I’m trying to find the best match for one image from an image set. Currently I use assess\_ssim function to do it. For example, img2 is clearly the best match for img1. But assess\_ssim gives very similar estimates for…

---

## [Struggling with Passing Multiple Initial Conditions to ODE](https://discourse.julialang.org/t/struggling-with-passing-multiple-initial-conditions-to-ode/105627)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 2\
**Last updated:** [November 5, 2023, 2:23pm UTC](https://discourse.julialang.org/t/struggling-with-passing-multiple-initial-conditions-to-ode/105627 "2023-11-05T14:23:14Z")

</div>

Hi folks, :wave: Been doing a lot of work with the great SciML ecosystem and building more familiarity with its offerings. I am struggling with an ODE that I am trying to model. Here is the equation: \\frac{dI}{dt} = a…

---

## [RFC: Freeze package versions](https://discourse.julialang.org/t/rfc-freeze-package-versions/105795)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [November 5, 2023, 2:08pm UTC](https://discourse.julialang.org/t/rfc-freeze-package-versions/105795 "2023-11-05T14:08:40Z")

</div>

I wrote the following function freeze(): # freeze the current package versions; overwrites the current Project.toml file using Pkg, TOML """ freeze() Freezes the current package versions by adding them to the Proje…

---

## [Practical Julia book](https://discourse.julialang.org/t/practical-julia-book/105749)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 9\
**Last updated:** [November 5, 2023, 1:55pm UTC](https://discourse.julialang.org/t/practical-julia-book/105749 "2023-11-05T13:55:45Z")

</div>

My hard copy of Practical Julia by @LeePhillips just arrived… woot! Practical Julia | No Starch Press

---

## [ANN: EnumX.jl -- improved enums for Julia](https://discourse.julialang.org/t/ann-enumx-jl-improved-enums-for-julia/78096)

<div class="topic-metadata">

**Author:** [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Replies:** 11\
**Last updated:** [November 5, 2023, 12:50pm UTC](https://discourse.julialang.org/t/ann-enumx-jl-improved-enums-for-julia/78096 "2023-11-05T12:50:55Z")

</div>

I wrote a small package EnumX that I want to introduce. Julia has builtin support for enums with the @enum macro, but such enums have some drawbacks, where the namespace/scope of the instances is the most annoying. This…

---

## [Type-safe conversion of strings to numbers](https://discourse.julialang.org/t/type-safe-conversion-of-strings-to-numbers/105812)

<div class="topic-metadata">

**Author:** [@janonime](https://discourse.julialang.org/u/janonime)\
**Replies:** 7\
**Last updated:** [November 5, 2023, 10:00am UTC](https://discourse.julialang.org/t/type-safe-conversion-of-strings-to-numbers/105812 "2023-11-05T10:00:08Z")

</div>

It is easy to convert a string to a Float64: julia\> parse(Float64,"1.23456789") 1.23456789 It is (obviously) not possible to convert a string to an AbstractFloat: julia\> parse(AbstractFloat,"1.23456789") ERROR: Method…

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

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