# Internals & Design

**URL:** https://discourse.julialang.org/c/dev/5.md?page=12

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

**Page:** 13

---

## [Does libjulia support dynamic reinitialization?](https://discourse.julialang.org/t/does-libjulia-support-dynamic-reinitialization/108035)

<div class="topic-metadata">

**Author:** [@Yurii\_Hamann](https://discourse.julialang.org/u/Yurii_Hamann)\
**Replies:** 4\
**Last updated:** [December 27, 2023, 1:12pm UTC](https://discourse.julialang.org/t/does-libjulia-support-dynamic-reinitialization/108035 "2023-12-27T13:12:44Z")

</div>

I need a dynamic Julia re-initialization but I guess it’s not supported or there is a bug in the libjulia because in the example below variable x keeps it’s previous value after second jl\_init call. #include \<julia.h\> #…

---

## [Should Base.literal\_pow be public?](https://discourse.julialang.org/t/should-base-literal-pow-be-public/107942)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [December 25, 2023, 12:40am UTC](https://discourse.julialang.org/t/should-base-literal-pow-be-public/107942 "2023-12-25T00:40:28Z")

</div>

Currently, x^2 is lowered to Base.literal\_pow(^, x, ::Val{2}). If no method is defined for this, it calls ^(x,2). This seems to imply that packages should specialize Base.literal\_pow for custom types, but they shouldn’t …

---

## [Advice on contributing to std libs](https://discourse.julialang.org/t/advice-on-contributing-to-std-libs/107980)

<div class="topic-metadata">

**Author:** [@nomadbl](https://discourse.julialang.org/u/nomadbl)\
**Replies:** 4\
**Last updated:** [December 24, 2023, 3:08am UTC](https://discourse.julialang.org/t/advice-on-contributing-to-std-libs/107980 "2023-12-24T03:08:49Z")

</div>

Hello everyone. I would like to contribute a small improvement to LinearAlgebra. However I’m encountering some difficulty and came to ask for further instructions. I started by cloning and ran make at the root of the /…

---

## [Possible performance improvements for \`deepcopy\`?](https://discourse.julialang.org/t/possible-performance-improvements-for-deepcopy/107719)

<div class="topic-metadata">

**Author:** [@Tortar](https://discourse.julialang.org/u/Tortar)\
**Replies:** 4\
**Last updated:** [December 21, 2023, 1:09am UTC](https://discourse.julialang.org/t/possible-performance-improvements-for-deepcopy/107719 "2023-12-21T01:09:42Z")

</div>

I created this small package here GitHub - Tortar/FastDeepCopy.jl which outperform the current deepcopy implementation by quite a bit, for a vector of mutable structs it is more than 200 times faster as you can see in th…

---

## [Passing duplicate key in function through \`kwargs\` doesn't error](https://discourse.julialang.org/t/passing-duplicate-key-in-function-through-kwargs-doesnt-error/107870)

<div class="topic-metadata">

**Author:** [@Tortar](https://discourse.julialang.org/u/Tortar)\
**Replies:** 1\
**Last updated:** [December 20, 2023, 6:09pm UTC](https://discourse.julialang.org/t/passing-duplicate-key-in-function-through-kwargs-doesnt-error/107870 "2023-12-20T18:09:46Z")

</div>

If in Julia I try to do something like this, I’m rightly stopped by the program: julia\> f(; x, x) = x ERROR: syntax: function argument name not unique: "x" around REPL\[1\]:1 Stacktrace: \[1\] top-level scope @ REPL\[1\]:…

---

## [Does it make sense to short-circuit \`isassigned\` for arrays of bitstypes?](https://discourse.julialang.org/t/does-it-make-sense-to-short-circuit-isassigned-for-arrays-of-bitstypes/107666)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [December 15, 2023, 2:11pm UTC](https://discourse.julialang.org/t/does-it-make-sense-to-short-circuit-isassigned-for-arrays-of-bitstypes/107666 "2023-12-15T14:11:29Z")

</div>

E.g. something like julia\> @inline \_isassigned(A::Array{Float64}, inds...) = (@boundscheck checkbounds(Bool, A, inds...); true) \_isassigned (generic function with 1 method) julia\> @code\_typed (A -\> @inbounds \_isassigne…

---

## [Failure to match a set element](https://discourse.julialang.org/t/failure-to-match-a-set-element/107478)

<div class="topic-metadata">

**Author:** [@canthonissen](https://discourse.julialang.org/u/canthonissen)\
**Replies:** 4\
**Last updated:** [December 12, 2023, 1:59pm UTC](https://discourse.julialang.org/t/failure-to-match-a-set-element/107478 "2023-12-12T13:59:49Z")

</div>

Hi, I found some unexpected behavour when checking set membership. Specifically, I get a key error when I try to pop! a known member of a set. The problem does not occur in a pattern that I could predict, but I prepar…

---

## [Understanding Module Loading: System Image vs. Precompilation Cache](https://discourse.julialang.org/t/understanding-module-loading-system-image-vs-precompilation-cache/107431)

<div class="topic-metadata">

**Author:** [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Replies:** 9\
**Last updated:** [December 12, 2023, 4:35am UTC](https://discourse.julialang.org/t/understanding-module-loading-system-image-vs-precompilation-cache/107431 "2023-12-12T04:35:38Z")

</div>

Hi everyone :wave: I’m curious about the module loading process. Recently, I’ve noticed a shift in recommendations regarding package loading. In the past, there was a focus on incorporating packages like Makie and Diffe…

---

## [Regression in Precompile time with 1.10.0-rc2 compared to the rc1 version](https://discourse.julialang.org/t/regression-in-precompile-time-with-1-10-0-rc2-compared-to-the-rc1-version/107324)

<div class="topic-metadata">

**Author:** [@svretina](https://discourse.julialang.org/u/svretina)\
**Replies:** 6\
**Last updated:** [December 11, 2023, 4:31pm UTC](https://discourse.julialang.org/t/regression-in-precompile-time-with-1-10-0-rc2-compared-to-the-rc1-version/107324 "2023-12-11T16:31:25Z")

</div>

I recently upgraded to the 1.10.0-rc2 version and I see a regression in the precompilation time of my package. There is no option in juliaup to revert back to rc1. Do you also see this with the rc2 version?

---

## [Should we distribute multiple official system images for Julia 1.11?](https://discourse.julialang.org/t/should-we-distribute-multiple-official-system-images-for-julia-1-11/107353)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 50\
**Last updated:** [December 11, 2023, 9:45am UTC](https://discourse.julialang.org/t/should-we-distribute-multiple-official-system-images-for-julia-1-11/107353 "2023-12-11T09:45:02Z")

</div>

In Julia 1.11, REPL.jl and Pkg.jl are now independent packages and not standard in the system image. This will help slim down the system image and make Julia’s packaging more modular. REPL.jl and Pkg.jl will be able to u…

---

## [What is the IO interface?](https://discourse.julialang.org/t/what-is-the-io-interface/107350)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 2\
**Last updated:** [December 9, 2023, 4:29am UTC](https://discourse.julialang.org/t/what-is-the-io-interface/107350 "2023-12-09T04:29:45Z")

</div>

@jameson recently mentioned an IO interface in a review. The lack of documentation on this matter was mentioned several years ago. My best guess at that moment is that the core interface is inferrable from this part of …

---

## [Separating the standard libraries from Julia executable](https://discourse.julialang.org/t/separating-the-standard-libraries-from-julia-executable/107208)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 1\
**Last updated:** [December 6, 2023, 1:36pm UTC](https://discourse.julialang.org/t/separating-the-standard-libraries-from-julia-executable/107208 "2023-12-06T13:36:59Z")

</div>

Hi all :slight\_smile: @jeff.bezanson in your talk at JuliaCon Eindhoven you mentioned that lots of standard libraries should be separate. Here are two options I see. Do 2.0 sooner, non destructive than later take it …

---

## [Is software-checked integer division actually necessary?](https://discourse.julialang.org/t/is-software-checked-integer-division-actually-necessary/107226)

<div class="topic-metadata">

**Author:** [@mikmoore](https://discourse.julialang.org/u/mikmoore)\
**Replies:** 5\
**Last updated:** [December 6, 2023, 5:26pm UTC](https://discourse.julialang.org/t/is-software-checked-integer-division-actually-necessary/107226 "2023-12-06T17:26:01Z")

</div>

Continuing the discussion from zero(a::Real)?: I’m getting out of my depth now, but it appears that a big limitation in avoiding checks on integer division is that division is handled via LLVM’s sdiv/udiv intrinsics. sd…

---

## [What workflows for missing values are more ergonomic in Julia?](https://discourse.julialang.org/t/what-workflows-for-missing-values-are-more-ergonomic-in-julia/106923)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 2\
**Last updated:** [November 30, 2023, 5:59pm UTC](https://discourse.julialang.org/t/what-workflows-for-missing-values-are-more-ergonomic-in-julia/106923 "2023-11-30T17:59:48Z")

</div>

Continuing the discussion from Why are missing values not ignored by default?: Hi, all, we started talking about some issues about dropping missing automatically, in the discussion it became clear that some people tend …

---

## [Is the 1.10. development stalled?](https://discourse.julialang.org/t/is-the-1-10-development-stalled/106660)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [November 25, 2023, 1:32pm UTC](https://discourse.julialang.org/t/is-the-1-10-development-stalled/106660 "2023-11-25T13:32:18Z")

</div>

Since two weeks no commits to Backports for 1.10.0-rc2 by KristofferC · Pull Request #52045 · JuliaLang/julia · GitHub . Shall I learn how to back-port commits? Or are hard to reproduce GC issues blocking the progress? …

---

## [Make \`only\` use \`first\` for dictionaries (or other types)?](https://discourse.julialang.org/t/make-only-use-first-for-dictionaries-or-other-types/106606)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 15\
**Last updated:** [November 25, 2023, 3:24am UTC](https://discourse.julialang.org/t/make-only-use-first-for-dictionaries-or-other-types/106606 "2023-11-25T03:24:02Z")

</div>

I’ve noticed that only is not as fast as it could be. I compare it to function only2(x) length(x) == 1 || error("Collection must contain exactly one element") @inbounds first(x) # EDIT: added @inbounds end In…

---

## [Materials about AbstractInterpreter](https://discourse.julialang.org/t/materials-about-abstractinterpreter/106442)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 7\
**Last updated:** [November 24, 2023, 8:55pm UTC](https://discourse.julialang.org/t/materials-about-abstractinterpreter/106442 "2023-11-24T20:55:28Z")

</div>

Hi All, one more question emerged from the discussion with Keno, that all the hard work with modification of IRCode and manual typing is useless, since the only nice way to seamlessly put the modified IRCode to compilat…

---

## [MethodErrors suggest fixes that may depend on internal bindings](https://discourse.julialang.org/t/methoderrors-suggest-fixes-that-may-depend-on-internal-bindings/106468)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 5\
**Last updated:** [November 21, 2023, 6:35pm UTC](https://discourse.julialang.org/t/methoderrors-suggest-fixes-that-may-depend-on-internal-bindings/106468 "2023-11-21T18:35:21Z")

</div>

On Julia v1.11: julia\> using FillArrays, LinearAlgebra julia\> Zeros(2,2) \* UpperTriangular(Zeros(2,2)) ERROR: MethodError: \*(::Zeros{Float64, 2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}, ::UpperTriangular{Float64, …

---

## [Julia on iOS and Android](https://discourse.julialang.org/t/julia-on-ios-and-android/7346)

<div class="topic-metadata">

**Author:** [@pitao](https://discourse.julialang.org/u/pitao)\
**Replies:** 62\
**Last updated:** [November 21, 2023, 9:32am UTC](https://discourse.julialang.org/t/julia-on-ios-and-android/7346 "2023-11-21T09:32:36Z")

</div>

Can anyone see any path towards running Julia code on iOS / Android? It would be fantastic to be able to solve the two-language problem (e.g. prototyping in Python and deploying in C++). The idea would be to release an…

---

## [Output distribution of rand(Float32) and rand(Float64), thread 2](https://discourse.julialang.org/t/output-distribution-of-rand-float32-and-rand-float64-thread-2/105184)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 437\
**Last updated:** [November 19, 2023, 12:45pm UTC](https://discourse.julialang.org/t/output-distribution-of-rand-float32-and-rand-float64-thread-2/105184 "2023-11-19T12:45:38Z")

</div>

A recent hackernews post lead me to necro https://discourse.julialang.org/t/output-distribution-of-rand/12192. If we want to reopen that can, I think a new thread is in order. Summary rand(), and much more acutely rand(…

---

## [How diffractor hooks to the compiler and what is the role of OpaqueClosuer and IRCode?](https://discourse.julialang.org/t/how-diffractor-hooks-to-the-compiler-and-what-is-the-role-of-opaqueclosuer-and-ircode/106421)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 4\
**Last updated:** [November 19, 2023, 10:44am UTC](https://discourse.julialang.org/t/how-diffractor-hooks-to-the-compiler-and-what-is-the-role-of-opaqueclosuer-and-ircode/106421 "2023-11-19T10:44:06Z")

</div>

Hi, Zygote hooks to the compiler through generated functions. According to my understanding, when calling gradient(foo, (1.0,1.0)) it calls fval, pullback = forward(foo, 1.0, 1.0) calls pullback(1.0) The forward(foo…

---

## [Julia 1.10 introduces "Tuple field type cannot be Union{}" error in AlgebraOfGraphics.jl](https://discourse.julialang.org/t/julia-1-10-introduces-tuple-field-type-cannot-be-union-error-in-algebraofgraphics-jl/106389)

<div class="topic-metadata">

**Author:** [@rdboyes](https://discourse.julialang.org/u/rdboyes)\
**Replies:** 5\
**Last updated:** [November 18, 2023, 6:41pm UTC](https://discourse.julialang.org/t/julia-1-10-introduces-tuple-field-type-cannot-be-union-error-in-algebraofgraphics-jl/106389 "2023-11-18T18:41:07Z")

</div>

Hi All - I’m trying to fix an error introduced in AlgebraOfGraphics by Julia 1.10 and I’m having a hard time understanding what is actually happening. The error is now thrown any time the function AlgebraOfGraphics.dens…

---

## [Why is displaying a stack trace with values difficult](https://discourse.julialang.org/t/why-is-displaying-a-stack-trace-with-values-difficult/104556)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 3\
**Last updated:** [November 17, 2023, 8:00pm UTC](https://discourse.julialang.org/t/why-is-displaying-a-stack-trace-with-values-difficult/104556 "2023-11-17T20:00:07Z")

</div>

Inspecting the stack immediately after an error occurred would be fantastic for debugging… Right now, GitHub - JuliaDebug/Debugger.jl: Julia debugger can do it, but it’s slow. And of course @Keno of all people gave it a …

---

## [What is the difference between CodeInfo and Core.Compiler.IRCode?](https://discourse.julialang.org/t/what-is-the-difference-between-codeinfo-and-core-compiler-ircode/106089)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 8\
**Last updated:** [November 13, 2023, 8:07pm UTC](https://discourse.julialang.org/t/what-is-the-difference-between-codeinfo-and-core-compiler-ircode/106089 "2023-11-13T20:07:47Z")

</div>

Dear All, I wanted to update my lecture notes about IR modifications. Two years ago, when I have written them, I wanted to have some introductory material into mechanisms Zygote relies on. Now, I have the feeling that i…

---

## [Function pointers & signatures](https://discourse.julialang.org/t/function-pointers-signatures/106114)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 3\
**Last updated:** [November 12, 2023, 9:57pm UTC](https://discourse.julialang.org/t/function-pointers-signatures/106114 "2023-11-12T21:57:43Z")

</div>

So afaik, it is accepted function pointers are not needed in Julia since we can pass functions, into other functions, causing the appropriate method to be compiled just in time, so that there shouldn’t be any performance…

---

## [\`outer\` keyword to automatically \`local\` a variable?](https://discourse.julialang.org/t/outer-keyword-to-automatically-local-a-variable/105964)

<div class="topic-metadata">

**Author:** [@Dan](https://discourse.julialang.org/u/Dan)\
**Replies:** 19\
**Last updated:** [November 10, 2023, 12:52am UTC](https://discourse.julialang.org/t/outer-keyword-to-automatically-local-a-variable/105964 "2023-11-10T00:52:39Z")

</div>

When using the outer keyword, as desribed in Scope of Variables · The Julia Language : julia\> function f() i = 0 for outer i = 1:3 # empty end return i e…

---

## [Should \`conj\` always materialize the result?](https://discourse.julialang.org/t/should-conj-always-materialize-the-result/105911)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 2\
**Last updated:** [November 7, 2023, 9:51pm UTC](https://discourse.julialang.org/t/should-conj-always-materialize-the-result/105911 "2023-11-07T21:51:42Z")

</div>

The docstring for conj states that conj(A::AbstractArray) Return an array containing the complex conjugate of each entry in array A. Equivalent to \`conj.(A)\`, except that when \`eltype(A) \<: Real\` \`A\` is returned w…

---

## [Why \`const\` fields in a \`mutable struct\` instead of \`mutable\` field in ordinary \`struct\`?](https://discourse.julialang.org/t/why-const-fields-in-a-mutable-struct-instead-of-mutable-field-in-ordinary-struct/103454)

<div class="topic-metadata">

**Author:** [@ForceBru](https://discourse.julialang.org/u/ForceBru)\
**Replies:** 9\
**Last updated:** [November 5, 2023, 3:02am UTC](https://discourse.julialang.org/t/why-const-fields-in-a-mutable-struct-instead-of-mutable-field-in-ordinary-struct/103454 "2023-11-05T03:02:41Z")

</div>

The documentation praises immutable structs: Composite objects declared with struct are immutable; they cannot be modified after construction. This may seem odd at first, but it has several advantages: It can be more…

---

## [In closure, compile away a step in a calculation internal to some function called in a closure?](https://discourse.julialang.org/t/in-closure-compile-away-a-step-in-a-calculation-internal-to-some-function-called-in-a-closure/105765)

<div class="topic-metadata">

**Author:** [@croberts](https://discourse.julialang.org/u/croberts)\
**Replies:** 4\
**Last updated:** [November 3, 2023, 4:46pm UTC](https://discourse.julialang.org/t/in-closure-compile-away-a-step-in-a-calculation-internal-to-some-function-called-in-a-closure/105765 "2023-11-03T16:46:06Z")

</div>

I probably should have posted this thread in ‘internals’ rather than ‘general usage’. Is there a way to compile away a step in a calculation internal to some function called in a closure but without manually decomposing…

---

## [Compiler tools and workflow for compiler optimization](https://discourse.julialang.org/t/compiler-tools-and-workflow-for-compiler-optimization/100016)

<div class="topic-metadata">

**Author:** [@martin.d.maas](https://discourse.julialang.org/u/martin.d.maas)\
**Replies:** 18\
**Last updated:** [November 3, 2023, 3:33pm UTC](https://discourse.julialang.org/t/compiler-tools-and-workflow-for-compiler-optimization/100016 "2023-11-03T15:33:32Z")

</div>

Hi, I’m trying to teach myself how to work with the native Julia compiler, and was trying to get the basics of how would you set up a workflow to try to write a compiler optimization pass. So the tools I found out there…

[Previous page](https://discourse.julialang.org/c/dev/5.md?page=11)

[Next page](https://discourse.julialang.org/c/dev/5.md?page=13)
