# Latest

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

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

**Page:** 258

---

## [Package directories query](https://discourse.julialang.org/t/package-directories-query/123626)

<div class="topic-metadata">

**Author:** [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Replies:** 21\
**Last updated:** [December 10, 2024, 4:28pm UTC](https://discourse.julialang.org/t/package-directories-query/123626 "2024-12-10T16:28:44Z")

</div>

This question is based from information present in this documentation page: Code Loading · The Julia Language Specifically, under the Package directories section, the following is written: Which dependencies a packa…

---

## [Use of \`global\` in a module for global variable is pointless?](https://discourse.julialang.org/t/use-of-global-in-a-module-for-global-variable-is-pointless/123669)

<div class="topic-metadata">

**Author:** [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Replies:** 1\
**Last updated:** [December 10, 2024, 4:26pm UTC](https://discourse.julialang.org/t/use-of-global-in-a-module-for-global-variable-is-pointless/123669 "2024-12-10T16:26:17Z")

</div>

A quick query about the use of global in a module. module MyModule global gTest = nothing end module MyModule gTest = nothing end I think these two codes are exactly identical with no difference between them. Is t…

---

## [Module with global variables vs initialization with \`\_\_init\_\_\` function](https://discourse.julialang.org/t/module-with-global-variables-vs-initialization-with-init-function/123668)

<div class="topic-metadata">

**Author:** [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Replies:** 2\
**Last updated:** [December 10, 2024, 4:21pm UTC](https://discourse.julialang.org/t/module-with-global-variables-vs-initialization-with-init-function/123668 "2024-12-10T16:21:46Z")

</div>

Quick query about modules. Is there any difference between writing a module with initialized global variables and using an \_\_init\_\_ function to initialize those variables? Allow me to explain with two demonstrations mo…

---

## [Unsafe\_wrap perform memory allocations](https://discourse.julialang.org/t/unsafe-wrap-perform-memory-allocations/123662)

<div class="topic-metadata">

**Author:** [@Sergey](https://discourse.julialang.org/u/Sergey)\
**Replies:** 6\
**Last updated:** [December 10, 2024, 3:48pm UTC](https://discourse.julialang.org/t/unsafe-wrap-perform-memory-allocations/123662 "2024-12-10T15:48:15Z")

</div>

Hi! Im trying to wrap c pointer array into julia as follows: function WrapArray(arr :: Ptr{Cdouble}, length :: Cint) :: Cdouble @timev wrapped = unsafe\_wrap(Vector{Cdouble}, arr, length) 0.000003 seconds (2 a…

---

## [Is there a particular reason why one sense algorithm will give an error whereas other will not?](https://discourse.julialang.org/t/is-there-a-particular-reason-why-one-sense-algorithm-will-give-an-error-whereas-other-will-not/123667)

<div class="topic-metadata">

**Author:** [@sunaina2821](https://discourse.julialang.org/u/sunaina2821)\
**Replies:** 0\
**Last updated:** [December 10, 2024, 3:41pm UTC](https://discourse.julialang.org/t/is-there-a-particular-reason-why-one-sense-algorithm-will-give-an-error-whereas-other-will-not/123667 "2024-12-10T15:41:22Z")

</div>

So, my script completely works when I use the ForwardDiffSensitivity() algorithm to solve the ODE but it does not work when I use QuadratureAdjoint(autojacvec=ZygoteVJP(true)). I will probably update this with a MWE late…

---

## [Performance optimization by NPUs](https://discourse.julialang.org/t/performance-optimization-by-npus/123661)

<div class="topic-metadata">

**Author:** [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Replies:** 1\
**Last updated:** [December 10, 2024, 3:10pm UTC](https://discourse.julialang.org/t/performance-optimization-by-npus/123661 "2024-12-10T15:10:01Z")

</div>

This is less about concrete implemention in Julia, and more about curiosity. My understanding suggests, that NPUs would be suitable to calculate method dispatch, pattern matching, and certain other aspects of Julia. Is…

---

## [Basic example for using Transformers.jl for sequential autoencoding](https://discourse.julialang.org/t/basic-example-for-using-transformers-jl-for-sequential-autoencoding/123663)

<div class="topic-metadata">

**Author:** [@spolk](https://discourse.julialang.org/u/spolk)\
**Replies:** 0\
**Last updated:** [December 10, 2024, 3:06pm UTC](https://discourse.julialang.org/t/basic-example-for-using-transformers-jl-for-sequential-autoencoding/123663 "2024-12-10T15:06:19Z")

</div>

I am interested in using Transformers.jl for sequence-to-sequence autoencoding and was hoping to get help solving a minimum working example building and training an appropriate transformer-based sequence-to-sequence aut…

---

## [Decoupling of differential equation not presenting good correlation](https://discourse.julialang.org/t/decoupling-of-differential-equation-not-presenting-good-correlation/123655)

<div class="topic-metadata">

**Author:** [@Mishal](https://discourse.julialang.org/u/Mishal)\
**Replies:** 5\
**Last updated:** [December 10, 2024, 2:28pm UTC](https://discourse.julialang.org/t/decoupling-of-differential-equation-not-presenting-good-correlation/123655 "2024-12-10T14:28:14Z")

</div>

Hi Guys Please refer to the below code. I am not going to break down the mathematics, but this system essentially presents a cart with a vertical pendulum that has a rotational stiffness, the cart also has a spring atta…

---

## [Distributed ODE solving](https://discourse.julialang.org/t/distributed-ode-solving/123569)

<div class="topic-metadata">

**Author:** [@xztt](https://discourse.julialang.org/u/xztt)\
**Replies:** 5\
**Last updated:** [December 10, 2024, 2:25pm UTC](https://discourse.julialang.org/t/distributed-ode-solving/123569 "2024-12-10T14:25:54Z")

</div>

Hi all, I am interested in been able to manually solve ODEs distributed as below. I am aware of ensembledistributed() however I want greater control over the outcome of each trajectory. My thinking is then to solve a se…

---

## [Using Regex() function, how do I match the end of the string?](https://discourse.julialang.org/t/using-regex-function-how-do-i-match-the-end-of-the-string/123659)

<div class="topic-metadata">

**Author:** [@francisbarton](https://discourse.julialang.org/u/francisbarton)\
**Replies:** 4\
**Last updated:** [December 10, 2024, 2:05pm UTC](https://discourse.julialang.org/t/using-regex-function-how-do-i-match-the-end-of-the-string/123659 "2024-12-10T14:05:22Z")

</div>

I am using the Regex() function to create a regular expression pattern, instead of just using r"", because I need to interpolate a variable. If I write Regex("$(f)$") - interpolating the variable f and wanting to match …

---

## [Why doesn't the VS Code Julia Extension jump to definitions for Standard Library types, when it will jump to definitions for installed packages?](https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616)

<div class="topic-metadata">

**Author:** [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Replies:** 7\
**Last updated:** [December 10, 2024, 2:04pm UTC](https://discourse.julialang.org/t/why-doesnt-the-vs-code-julia-extension-jump-to-definitions-for-standard-library-types-when-it-will-jump-to-definitions-for-installed-packages/123616 "2024-12-10T14:04:04Z")

</div>

I am doing some tests with Julia and VS Code to try and figure out why the Julia Extension doesn’t seem to be able to find definitions for some functions. I wrote a short test file containing the following contents. us…

---

## [Solid boundary for ABM model](https://discourse.julialang.org/t/solid-boundary-for-abm-model/113984)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 28\
**Last updated:** [December 10, 2024, 1:18pm UTC](https://discourse.julialang.org/t/solid-boundary-for-abm-model/113984 "2024-12-10T13:18:07Z")

</div>

Hello everyone, I’m building a model where particles roam around randomly in 3d space. At the moment issue is that I want particles to be contained in space though what I see is that it escapes boundary and comes on the…

---

## [Memory-free multivariate polynomials](https://discourse.julialang.org/t/memory-free-multivariate-polynomials/117361)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 26\
**Last updated:** [December 10, 2024, 12:26pm UTC](https://discourse.julialang.org/t/memory-free-multivariate-polynomials/117361 "2024-12-10T12:26:41Z")

</div>

I was looking for a package, that allows higher-order coordinate transforms. The idea would be an interface somewhat related to Base.evalpoly but capable of handling multiple dimensions. The use-case is non-linear deform…

---

## [How to set JuliaMono in Jupyter Notebook, version \>7](https://discourse.julialang.org/t/how-to-set-juliamono-in-jupyter-notebook-version-7/123636)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 2\
**Last updated:** [December 10, 2024, 12:02pm UTC](https://discourse.julialang.org/t/how-to-set-juliamono-in-jupyter-notebook-version-7/123636 "2024-12-10T12:02:03Z")

</div>

For Julia 1.11.2 I have installed Jupyter Notebook 7.3.1 and I fail to set the JuliaMono font, to get a notebook style as I had before with version \<7.

---

## [Small seeds in Xoshiro?](https://discourse.julialang.org/t/small-seeds-in-xoshiro/123652)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 3\
**Last updated:** [December 10, 2024, 11:15am UTC](https://discourse.julialang.org/t/small-seeds-in-xoshiro/123652 "2024-12-10T11:15:26Z")

</div>

There used to be a rule of thumb for Mersenne Twister that it’s good to pick a large number for rng seed. Is that still relevant for newer families like Xoshiro?

---

## [Listen on both IPv4 and IPv6](https://discourse.julialang.org/t/listen-on-both-ipv4-and-ipv6/123651)

<div class="topic-metadata">

**Author:** [@phma](https://discourse.julialang.org/u/phma)\
**Replies:** 4\
**Last updated:** [December 10, 2024, 9:43am UTC](https://discourse.julialang.org/t/listen-on-both-ipv4-and-ipv6/123651 "2024-12-10T09:43:39Z")

</div>

I’m trying to listen on both IPv4 and IPv6. ear4=listen(IPv4(0),port) ear6=listen(IPv6(0),port) This resulted in IOError: listen: address already in use (EADDRINUSE) on the IPv6 line. I’m running Linux, and if I re…

---

## [Accelerate column-wise subtraction of a vector to a matrix](https://discourse.julialang.org/t/accelerate-column-wise-subtraction-of-a-vector-to-a-matrix/123619)

<div class="topic-metadata">

**Author:** [@matnbo](https://discourse.julialang.org/u/matnbo)\
**Replies:** 10\
**Last updated:** [December 10, 2024, 8:06am UTC](https://discourse.julialang.org/t/accelerate-column-wise-subtraction-of-a-vector-to-a-matrix/123619 "2024-12-10T08:06:27Z")

</div>

I try to accelerate the computation of the following operation: I have a matrix X (n, p) and a vector v (p). For each j {= 1,…,p}, I want to compute the differences X\[i, j\] - v\[j\] {i = 1,…,n}. and, this, on CPU (not G…

---

## [Plotting sensitivity of variable to parameter](https://discourse.julialang.org/t/plotting-sensitivity-of-variable-to-parameter/123534)

<div class="topic-metadata">

**Author:** [@laurence\_jj](https://discourse.julialang.org/u/laurence_jj)\
**Replies:** 7\
**Last updated:** [December 10, 2024, 6:49am UTC](https://discourse.julialang.org/t/plotting-sensitivity-of-variable-to-parameter/123534 "2024-12-10T06:49:00Z")

</div>

Hi! I am using JuMP to model bertran competition in a market with firms and households. One of the parameters in the model is the marginal cost for firms. I would like to evaluate how the average price of goods varies a…

---

## [Auxiliary variable in MTK connector](https://discourse.julialang.org/t/auxiliary-variable-in-mtk-connector/121572)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 6\
**Last updated:** [December 10, 2024, 6:29am UTC](https://discourse.julialang.org/t/auxiliary-variable-in-mtk-connector/121572 "2024-12-10T06:29:33Z")

</div>

Consider the MTK Pin example. @connector Pin begin v(t) = 0.0, \[description = "Voltage"\] i(t), \[connect = Flow\] end Suppose I wanted to also define the auxiliary variable p(t) = v \* i (for power), such that I c…

---

## [Handling dependencies for non-src, non-test code](https://discourse.julialang.org/t/handling-dependencies-for-non-src-non-test-code/123634)

<div class="topic-metadata">

**Author:** [@NelisDrost](https://discourse.julialang.org/u/NelisDrost)\
**Replies:** 1\
**Last updated:** [December 10, 2024, 3:47am UTC](https://discourse.julialang.org/t/handling-dependencies-for-non-src-non-test-code/123634 "2024-12-10T03:47:37Z")

</div>

I’m developing a package that has a different set of dependencies during development than it should for the user. Specifically, the user version depends on a specific set of DifferentialEquations packages, rather than th…

---

## [Default constructor not generated for struct created by \`eval\`](https://discourse.julialang.org/t/default-constructor-not-generated-for-struct-created-by-eval/123602)

<div class="topic-metadata">

**Author:** [@cuihantao](https://discourse.julialang.org/u/cuihantao)\
**Replies:** 5\
**Last updated:** [December 10, 2024, 3:01am UTC](https://discourse.julialang.org/t/default-constructor-not-generated-for-struct-created-by-eval/123602 "2024-12-10T03:01:58Z")

</div>

I’m trying to write a function to “vectorize” a struct. A plain struct would be defined like: struct Bus{T} vm::T end And I want the output to be: struct BusVec{T} vm::Vector{T} end A function is implemented …

---

## [Should Dict avoid GC allocations for isbits key/value types?](https://discourse.julialang.org/t/should-dict-avoid-gc-allocations-for-isbits-key-value-types/123613)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 3\
**Last updated:** [December 10, 2024, 1:16am UTC](https://discourse.julialang.org/t/should-dict-avoid-gc-allocations-for-isbits-key-value-types/123613 "2024-12-10T01:16:36Z")

</div>

Resizing arrays, when elements have primitive types or more generally isbits types, does not trigger any GC, as this is handled by the C runtime. Dictionaries are also allocation-free during most operations, except durin…

---

## [Concise way to apply one docstring to multiple items](https://discourse.julialang.org/t/concise-way-to-apply-one-docstring-to-multiple-items/123637)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 2\
**Last updated:** [December 9, 2024, 11:13pm UTC](https://discourse.julialang.org/t/concise-way-to-apply-one-docstring-to-multiple-items/123637 "2024-12-09T23:13:33Z")

</div>

Eg, I would like to put all of these in the same docstring: padintm5 = generate\_formatter( "%-5i") padstrm21 = generate\_formatter( "%-21s") padstr4 = generate\_formatter( "%4s") padint3 = generate\_formatter( "%3i") …

---

## [FiniteContinuedFractions.jl - a number type for rational numbers](https://discourse.julialang.org/t/finitecontinuedfractions-jl-a-number-type-for-rational-numbers/123007)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 4\
**Last updated:** [December 8, 2024, 12:01pm UTC](https://discourse.julialang.org/t/finitecontinuedfractions-jl-a-number-type-for-rational-numbers/123007 "2024-12-08T12:01:38Z")

</div>

A package that provides the FiniteContinuedFraction type, an alternative to Rational. Both subtype Real. I don’t know if FiniteContinuedFraction is ever a good replacement for Rational in package code, seeing as it’s …

---

## [Parameter inference with Turing with Observed Distribution](https://discourse.julialang.org/t/parameter-inference-with-turing-with-observed-distribution/123065)

<div class="topic-metadata">

**Author:** [@Fourier](https://discourse.julialang.org/u/Fourier)\
**Replies:** 2\
**Last updated:** [December 9, 2024, 9:08pm UTC](https://discourse.julialang.org/t/parameter-inference-with-turing-with-observed-distribution/123065 "2024-12-09T21:08:57Z")

</div>

Lets say I have a model using Turing, StatsPlots @model function model(a) p ~ Normal(1,1) a ~ Normal(p,1) end and I do an experiment and I observe a to be equal to 1.5: Then I can update my prior believe rega…

---

## [Using or import search current directory?](https://discourse.julialang.org/t/using-or-import-search-current-directory/123463)

<div class="topic-metadata">

**Author:** [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Replies:** 68\
**Last updated:** [December 9, 2024, 9:03pm UTC](https://discourse.julialang.org/t/using-or-import-search-current-directory/123463 "2024-12-09T21:03:04Z")

</div>

This is really an idea which comes from Python. (Rust uses it too, actually.) Please don’t write it off just for this reason, as there is a practical problem to be solved here. Consider the following example package. M…

---

## [Formatting problems with Greek letters julia](https://discourse.julialang.org/t/formatting-problems-with-greek-letters-julia/123627)

<div class="topic-metadata">

**Author:** [@Hani.G](https://discourse.julialang.org/u/Hani.G)\
**Replies:** 3\
**Last updated:** [December 9, 2024, 8:30pm UTC](https://discourse.julialang.org/t/formatting-problems-with-greek-letters-julia/123627 "2024-12-09T20:30:30Z")

</div>

Hello everyone! Config: vscode; Win11-64bits; JuliaMono (Release v0.058) I would like to know if anyone else has had to deal with a problem with Greek letters font formatting and how to solve it, if you know of any sol…

---

## [Modules and Submodules for a Better User Experience](https://discourse.julialang.org/t/modules-and-submodules-for-a-better-user-experience/123600)

<div class="topic-metadata">

**Author:** [@co1emi11er](https://discourse.julialang.org/u/co1emi11er)\
**Replies:** 7\
**Last updated:** [December 9, 2024, 7:46pm UTC](https://discourse.julialang.org/t/modules-and-submodules-for-a-better-user-experience/123600 "2024-12-09T19:46:23Z")

</div>

Better User Experience with Submodules Experience and Found Issues I have been experimenting with multiple modules/submodules in my latest package, and I am finding it to be maybe a little clunky but I think overall the …

---

## [Wrapping libwebsockets C Library with Julia](https://discourse.julialang.org/t/wrapping-libwebsockets-c-library-with-julia/102959)

<div class="topic-metadata">

**Author:** [@DeevsDeevs](https://discourse.julialang.org/u/DeevsDeevs)\
**Replies:** 11\
**Last updated:** [December 9, 2024, 6:49pm UTC](https://discourse.julialang.org/t/wrapping-libwebsockets-c-library-with-julia/102959 "2024-12-09T18:49:07Z")

</div>

I’m wrapping libwebsockets in Julia for better integration and performance. Unfortunately, I didn’t find it in JuliaBinaryWrappers. After that i want to introduce simpler analogue for HTTP.jl based on this c lib (previou…

---

## [Sparse loss with Flux](https://discourse.julialang.org/t/sparse-loss-with-flux/123624)

<div class="topic-metadata">

**Author:** [@niltsz](https://discourse.julialang.org/u/niltsz)\
**Replies:** 3\
**Last updated:** [December 9, 2024, 6:24pm UTC](https://discourse.julialang.org/t/sparse-loss-with-flux/123624 "2024-12-09T18:24:49Z")

</div>

Hello, I want to train a Neural network that improves the pixels of an image, but with a sparse loss function, i.e. the true pixel information exists only sparsely, and the positions are different for each training examp…

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

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