# Latest

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

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

**Page:** 702

---

## [Understanding the performance of trait based dispatch together with type annotations](https://discourse.julialang.org/t/understanding-the-performance-of-trait-based-dispatch-together-with-type-annotations/98732)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 1\
**Last updated:** [May 12, 2023, 12:54pm UTC](https://discourse.julialang.org/t/understanding-the-performance-of-trait-based-dispatch-together-with-type-annotations/98732 "2023-05-12T12:54:35Z")

</div>

I’m trying to write performant code, and in general opted for adding type annotations to help the compiler, since writing general code is often not very important in my code. I was currently trying to implement trait-ba…

---

## [Transducers vs Iterators](https://discourse.julialang.org/t/transducers-vs-iterators/98771)

<div class="topic-metadata">

**Author:** [@jekyllstein](https://discourse.julialang.org/u/jekyllstein)\
**Replies:** 0\
**Last updated:** [May 12, 2023, 11:03pm UTC](https://discourse.julialang.org/t/transducers-vs-iterators/98771 "2023-05-12T23:03:42Z")

</div>

I have an example of a simple processing pipeline where I noticed Transducers.jl was making a lot of allocations and behaving slowly compared to compositing iterators and generators together. I’m wondering if there’s a …

---

## [Can't build IJulia in 1.9](https://discourse.julialang.org/t/cant-build-ijulia-in-1-9/98757)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 4\
**Last updated:** [May 12, 2023, 10:44pm UTC](https://discourse.julialang.org/t/cant-build-ijulia-in-1-9/98757 "2023-05-12T22:44:59Z")

</div>

I’m trying to build IJulia so my new notebook with know about it. I am having Conda problems again. I have tried deleting .julia and starting over with no luck. I get this message and am stuck. I have followed the direct…

---

## [How to control output type with Flux?](https://discourse.julialang.org/t/how-to-control-output-type-with-flux/98770)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 3\
**Last updated:** [May 12, 2023, 10:34pm UTC](https://discourse.julialang.org/t/how-to-control-output-type-with-flux/98770 "2023-05-12T22:34:34Z")

</div>

Here is a MWE: using Flux function NeuralNetwork(; nb\_in=1, nb\_out=1, layer\_size=8, nb\_hid\_layers=1) # Note the use of Any\[\] since the Dense layers are of different types layers = Any\[Flux.Dense(nb\_in =\> layer\_…

---

## [Debugging ::Any types in Cthulhu's descend](https://discourse.julialang.org/t/debugging-any-types-in-cthulhus-descend/98734)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 0\
**Last updated:** [May 12, 2023, 11:11am UTC](https://discourse.julialang.org/t/debugging-any-types-in-cthulhus-descend/98734 "2023-05-12T11:11:02Z")

</div>

I’m trying to understand how to best interpret @descend from Cthulhu.jl in certain cases. Consider: julia\> using DataStructures, Cthulhu julia\> d = DefaultDict(-1, Dict(1 =\> 2)); julia\> @descend delete!(d, 1) delete!(…

---

## [Transferred several packages to JuliaMath](https://discourse.julialang.org/t/transferred-several-packages-to-juliamath/98761)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 0\
**Last updated:** [May 12, 2023, 8:14pm UTC](https://discourse.julialang.org/t/transferred-several-packages-to-juliamath/98761 "2023-05-12T20:14:53Z")

</div>

FYI: I moved the following packages from my GH account to JuliaMath. First I spruced up the CI for each. Test for appropriate Julia versions, and OS’s and 64 and 32-bit platforms where possible. Also added Aqua and JET t…

---

## [Difference between \`take!(IOBuffer(test))\` and \`Vector{UInt8}(test)\`](https://discourse.julialang.org/t/difference-between-take-iobuffer-test-and-vector-uint8-test/98664)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 1\
**Last updated:** [May 12, 2023, 9:06pm UTC](https://discourse.julialang.org/t/difference-between-take-iobuffer-test-and-vector-uint8-test/98664 "2023-05-12T21:06:36Z")

</div>

Hi all :slight\_smile: there are often more than one way to do one thing in programming. My question is, why is the on thing faster than the other. Should we change it? julia\> length(test) 1000000 julia\> @btime take!(I…

---

## [SimplePDLP: a directory to illustrate how to implement a Julia optimization solver for teaching purpose](https://discourse.julialang.org/t/simplepdlp-a-directory-to-illustrate-how-to-implement-a-julia-optimization-solver-for-teaching-purpose/98763)

<div class="topic-metadata">

**Author:** [@HaihaoLu](https://discourse.julialang.org/u/HaihaoLu)\
**Replies:** 0\
**Last updated:** [May 12, 2023, 8:38pm UTC](https://discourse.julialang.org/t/simplepdlp-a-directory-to-illustrate-how-to-implement-a-julia-optimization-solver-for-teaching-purpose/98763 "2023-05-12T20:38:23Z")

</div>

Dear friends, SimplePDLP (BUSN-36919-Modern-Large-Scale-Optimization--Theory-and-Computation-2023/SimplePDLP at main · haihaolu/BUSN-36919-Modern-Large-Scale-Optimization--Theory-and-Computation-2023 · GitHub) is a dire…

---

## [Stuck in slider tutorial and don't know why (GLMakie)](https://discourse.julialang.org/t/stuck-in-slider-tutorial-and-dont-know-why-glmakie/98737)

<div class="topic-metadata">

**Author:** [@llovalin](https://discourse.julialang.org/u/llovalin)\
**Replies:** 3\
**Last updated:** [May 12, 2023, 8:01pm UTC](https://discourse.julialang.org/t/stuck-in-slider-tutorial-and-dont-know-why-glmakie/98737 "2023-05-12T20:01:02Z")

</div>

I’m trying to recreate the tutorial from “doggo dot jl” Youtube: \[02x10\] GLMakie Interactive Widgets: Sliders, Buttons & Menus But im stuck at the labelslidergrid! function() I get the error message: ERROR: MethodErro…

---

## [Subtyping vs adding a function to a struct's fields](https://discourse.julialang.org/t/subtyping-vs-adding-a-function-to-a-structs-fields/98638)

<div class="topic-metadata">

**Author:** [@jdossgollin](https://discourse.julialang.org/u/jdossgollin)\
**Replies:** 22\
**Last updated:** [May 12, 2023, 8:30am UTC](https://discourse.julialang.org/t/subtyping-vs-adding-a-function-to-a-structs-fields/98638 "2023-05-12T08:30:09Z")

</div>

I have a general strategic question about when to create subclasses versus when to do something else. As a motivating example, let’s say I have three boxes that I’d like to model. Boxes have various properties like mater…

---

## [What's the \`In \[N\]:\` prompt? Does it support copy-paste?](https://discourse.julialang.org/t/whats-the-in-n-prompt-does-it-support-copy-paste/98750)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 6\
**Last updated:** [May 12, 2023, 6:56pm UTC](https://discourse.julialang.org/t/whats-the-in-n-prompt-does-it-support-copy-paste/98750 "2023-05-12T18:56:41Z")

</div>

What prompt is that? (Does the copy/paste works as with the standard Julia prompt?)

---

## [Intersection of two plots](https://discourse.julialang.org/t/intersection-of-two-plots/98687)

<div class="topic-metadata">

**Author:** [@Desmond](https://discourse.julialang.org/u/Desmond)\
**Replies:** 4\
**Last updated:** [May 12, 2023, 5:38pm UTC](https://discourse.julialang.org/t/intersection-of-two-plots/98687 "2023-05-12T17:38:07Z")

</div>

I have two lines on a plot and I want Julia to find the intersection between the two lines but I can’t seem to find a package that can help with that.

---

## [Unix2datetime giving wrong time and date?](https://discourse.julialang.org/t/unix2datetime-giving-wrong-time-and-date/98658)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 11\
**Last updated:** [May 12, 2023, 4:52pm UTC](https://discourse.julialang.org/t/unix2datetime-giving-wrong-time-and-date/98658 "2023-05-12T16:52:18Z")

</div>

Hi I’m sure I’m missing something simple here but when I test for the time of a file that was created on 5-10-2023, I get a result julia\> unix2datetime(mtime("/Users/Desktop/Test Data 2023 5 10.numbers")) 2023-05-11T04:…

---

## [Confusing performance results from simple conditional code](https://discourse.julialang.org/t/confusing-performance-results-from-simple-conditional-code/98618)

<div class="topic-metadata">

**Author:** [@enderw88](https://discourse.julialang.org/u/enderw88)\
**Replies:** 17\
**Last updated:** [May 12, 2023, 4:51pm UTC](https://discourse.julialang.org/t/confusing-performance-results-from-simple-conditional-code/98618 "2023-05-12T16:51:25Z")

</div>

I am writing a toy game that uses very simple keyboard commands. I need to do a lot of checking to see if certain keys are pressed and I want to ignore case so I do a lot of things like this: if keycode == 'c' || keyco…

---

## [Julia 1.9 on macOS modifies bundle contents, causing issues in VSCode](https://discourse.julialang.org/t/julia-1-9-on-macos-modifies-bundle-contents-causing-issues-in-vscode/98752)

<div class="topic-metadata">

**Author:** [@mattwigway](https://discourse.julialang.org/u/mattwigway)\
**Replies:** 0\
**Last updated:** [May 12, 2023, 4:39pm UTC](https://discourse.julialang.org/t/julia-1-9-on-macos-modifies-bundle-contents-causing-issues-in-vscode/98752 "2023-05-12T16:39:52Z")

</div>

When running Julia in VSCode, I’ve seen this message a few times: Digging into the syslog a bit (using the log show command), I see this: 2023-05-12 12:27:19.701485-0400 ... Error ... sandboxd: \[com.apple…

---

## [Use a macro inside a function's definition](https://discourse.julialang.org/t/use-a-macro-inside-a-functions-definition/86321)

<div class="topic-metadata">

**Author:** [@Jeroen](https://discourse.julialang.org/u/Jeroen)\
**Replies:** 2\
**Last updated:** [May 12, 2023, 4:30pm UTC](https://discourse.julialang.org/t/use-a-macro-inside-a-functions-definition/86321 "2023-05-12T16:30:37Z")

</div>

Hello, I have a function called f′ and I want to use a macro called @diff inside the function’s definition: macro diff(expression) return :(2x) end f′(x) = @diff x^2 print(f′(10)) Yet once I run this code, this …

---

## [Postdoc at KTH in Stockholm. Physical and Data-Driven Modeling](https://discourse.julialang.org/t/postdoc-at-kth-in-stockholm-physical-and-data-driven-modeling/98751)

<div class="topic-metadata">

**Author:** [@Alberto\_Lazzarotto](https://discourse.julialang.org/u/Alberto_Lazzarotto)\
**Replies:** 0\
**Last updated:** [May 12, 2023, 4:29pm UTC](https://discourse.julialang.org/t/postdoc-at-kth-in-stockholm-physical-and-data-driven-modeling/98751 "2023-05-12T16:29:06Z")

</div>

We are hiring a postdoc at KTH (Stockholm) to work on physical and data-driven modelling of geothermal systems. We are looking for a skilled person interested in mathematical modeling, data-driven methods, ML and program…

---

## [Status outdated after updating to Julia 1.9](https://discourse.julialang.org/t/status-outdated-after-updating-to-julia-1-9/98700)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 4\
**Last updated:** [May 12, 2023, 3:46pm UTC](https://discourse.julialang.org/t/status-outdated-after-updating-to-julia-1-9/98700 "2023-05-12T15:46:21Z")

</div>

I updated from version 1.8.5 to version 1.9. Now I am getting this message: (BWModule) pkg\> status --outdated -m Status C:\\Users\\fsald\\Dropbox\\Code\\Julia\\bootstrapwalkforward\\BWModule\\Manifest.toml ⌃ \[ad839575\] Blink …

---

## [What is the Julian equivalent of Python's \`np.eye(5, 5, 1)\`](https://discourse.julialang.org/t/what-is-the-julian-equivalent-of-pythons-np-eye-5-5-1/98746)

<div class="topic-metadata">

**Author:** [@originalsouth](https://discourse.julialang.org/u/originalsouth)\
**Replies:** 5\
**Last updated:** [May 12, 2023, 3:10pm UTC](https://discourse.julialang.org/t/what-is-the-julian-equivalent-of-pythons-np-eye-5-5-1/98746 "2023-05-12T15:10:11Z")

</div>

What is the Julian equivalent of Python’s np.eye(5, 5, 1) % python -q \>\>\> import numpy as np \>\>\> np.eye(5, 5, 1) array(\[\[0., 1., 0., 0., 0.\], \[0., 0., 1., 0., 0.\], \[0., 0., 0., 1., 0.\], \[0., 0., 0.,…

---

## [Warning: attempt to link a linked vi](https://discourse.julialang.org/t/warning-attempt-to-link-a-linked-vi/98723)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 1\
**Last updated:** [May 12, 2023, 10:54am UTC](https://discourse.julialang.org/t/warning-attempt-to-link-a-linked-vi/98723 "2023-05-12T10:54:46Z")

</div>

I’m getting this warning while running my Turing model. I also went through previous posts related to same warning but I couldn’t find anything solid. I just want to know from where this warning is coming. I can’t share …

---

## [Unable to install IJulia after upgrading to version 1.9](https://discourse.julialang.org/t/unable-to-install-ijulia-after-upgrading-to-version-1-9/98724)

<div class="topic-metadata">

**Author:** [@vsoler](https://discourse.julialang.org/u/vsoler)\
**Replies:** 11\
**Last updated:** [May 12, 2023, 2:59pm UTC](https://discourse.julialang.org/t/unable-to-install-ijulia-after-upgrading-to-version-1-9/98724 "2023-05-12T14:59:45Z")

</div>

Trying to install IJulia, but unable to after upgrading to version 1.9 Any ideas?

---

## [Julia version 1.9.0 on VSCODE , for loops and other weird output](https://discourse.julialang.org/t/julia-version-1-9-0-on-vscode-for-loops-and-other-weird-output/98716)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 5\
**Last updated:** [May 12, 2023, 2:51pm UTC](https://discourse.julialang.org/t/julia-version-1-9-0-on-vscode-for-loops-and-other-weird-output/98716 "2023-05-12T14:51:58Z")

</div>

trying to do simple for loop on julia 1.9.0 (in vscode), for i in 1:10 println(i) end julia seems to start evaluating endlessly up what i see on the repl is the following line #87 for i in 1:10 julia\> versionin…

---

## [How to construct the variational equation of an ODE without handwriting the Jacobi matrix](https://discourse.julialang.org/t/how-to-construct-the-variational-equation-of-an-ode-without-handwriting-the-jacobi-matrix/98735)

<div class="topic-metadata">

**Author:** [@xiaoming](https://discourse.julialang.org/u/xiaoming)\
**Replies:** 1\
**Last updated:** [May 12, 2023, 2:50pm UTC](https://discourse.julialang.org/t/how-to-construct-the-variational-equation-of-an-ode-without-handwriting-the-jacobi-matrix/98735 "2023-05-12T14:50:38Z")

</div>

Hello! I am new to Julia. I want to solve the variational equation of an ODE without handwriting the Jacobi matrix. Here is an MME. Suppose that the ODE equations are the followings: \\dot{x}=y\\\\ \\dot{y}=x-x^3-0.1y+0.…

---

## [Best random number generator for Monte Carlo simulations](https://discourse.julialang.org/t/best-random-number-generator-for-monte-carlo-simulations/98318)

<div class="topic-metadata">

**Author:** [@steve1313](https://discourse.julialang.org/u/steve1313)\
**Replies:** 12\
**Last updated:** [May 12, 2023, 2:48pm UTC](https://discourse.julialang.org/t/best-random-number-generator-for-monte-carlo-simulations/98318 "2023-05-12T14:48:15Z")

</div>

I often write small Monte Carlo simulations to solve difficult probability problems. What’s the best (fastest, most accurate) RNG for this type of use?

---

## [Very different performance in different computers due to garbage collection?](https://discourse.julialang.org/t/very-different-performance-in-different-computers-due-to-garbage-collection/87563)

<div class="topic-metadata">

**Author:** [@TheLeache](https://discourse.julialang.org/u/TheLeache)\
**Replies:** 28\
**Last updated:** [May 12, 2023, 12:54pm UTC](https://discourse.julialang.org/t/very-different-performance-in-different-computers-due-to-garbage-collection/87563 "2023-05-12T12:54:26Z")

</div>

So, I have a code which calculates a measure of “openness” or “sprawl” around points in a series of big rasters from the National Land Cover Dataset. I had used this code on my personal laptop (A 2020 ROG G14 with a Ryze…

---

## [Why are stdout, stderr etc. not const global variables?](https://discourse.julialang.org/t/why-are-stdout-stderr-etc-not-const-global-variables/98721)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 1\
**Last updated:** [May 12, 2023, 12:25pm UTC](https://discourse.julialang.org/t/why-are-stdout-stderr-etc-not-const-global-variables/98721 "2023-05-12T12:25:16Z")

</div>

I can overwrite their values (in Julia 1.9.0): julia\> Base.stderr = Base.stdout Base.TTY(RawFD(13) open, 0 bytes waiting) So whenever I write print(stderr, "some message") I’m using a non-const global variable from B…

---

## [Resumable function as a struct field var...error: "struct" expression not at top level](https://discourse.julialang.org/t/resumable-function-as-a-struct-field-var-error-struct-expression-not-at-top-level/98730)

<div class="topic-metadata">

**Author:** [@mongi](https://discourse.julialang.org/u/mongi)\
**Replies:** 1\
**Last updated:** [May 12, 2023, 10:27am UTC](https://discourse.julialang.org/t/resumable-function-as-a-struct-field-var-error-struct-expression-not-at-top-level/98730 "2023-05-12T10:27:24Z")

</div>

Greetings, A resumable function (singleton type of function , subtype of Function) , when put as a struct field variable, causes the error “struct expression not at top level” while a normal function does not. Could an…

---

## [Can a package be registered that is not on v0.01, v0.1 or v1?](https://discourse.julialang.org/t/can-a-package-be-registered-that-is-not-on-v0-01-v0-1-or-v1/98722)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [May 12, 2023, 9:41am UTC](https://discourse.julialang.org/t/can-a-package-be-registered-that-is-not-on-v0-01-v0-1-or-v1/98722 "2023-05-12T09:41:45Z")

</div>

Can I develop a package without register it and only when it is on a certain version, let’s say v0.5, register it ?

---

## [Usage of Measurements.jl](https://discourse.julialang.org/t/usage-of-measurements-jl/98726)

<div class="topic-metadata">

**Author:** [@Fourier](https://discourse.julialang.org/u/Fourier)\
**Replies:** 3\
**Last updated:** [May 12, 2023, 9:36am UTC](https://discourse.julialang.org/t/usage-of-measurements-jl/98726 "2023-05-12T09:36:19Z")

</div>

I want to use measurements.jl for my data analysis, because it can propagate uncertainites. However for example this input: julia\> 1 ± 1 \* 1 ± 0.5 1.0 ± 1.0 ± 0.5 ± 0.0 gives me an answer I did not expect, I thought t…

---

## [Different of df\[!, :name\] and df\[:, :name\]](https://discourse.julialang.org/t/different-of-df-name-and-df-name/98727)

<div class="topic-metadata">

**Author:** [@June](https://discourse.julialang.org/u/June)\
**Replies:** 3\
**Last updated:** [May 12, 2023, 9:27am UTC](https://discourse.julialang.org/t/different-of-df-name-and-df-name/98727 "2023-05-12T09:27:40Z")

</div>

Dear Julia Users, I’m learning Julia with DataFrames.jl and see this one example df\[!, :name\] to get all column elements under :name, which shows the same result as df\[:, :name\]. My question is: What does the “!” mean…

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

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