# Internals & Design

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

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

**Page:** 11

---

## [How to use julia parser out of julia](https://discourse.julialang.org/t/how-to-use-julia-parser-out-of-julia/111438)

<div class="topic-metadata">

**Author:** [@hsolerkalinovski](https://discourse.julialang.org/u/hsolerkalinovski)\
**Replies:** 8\
**Last updated:** [March 11, 2024, 11:16pm UTC](https://discourse.julialang.org/t/how-to-use-julia-parser-out-of-julia/111438 "2024-03-11T23:16:00Z")

</div>

Hello, and thanks for dedicating your time at reading my question, even if you can’t help em regarding it. For the couple past months, I’ve been enrolled in a project where I must analyze code change patterns in open so…

---

## [\`Libdl.dlopen\` versus \`dlfcn.h\`'s \`dlopen\`](https://discourse.julialang.org/t/libdl-dlopen-versus-dlfcn-h-s-dlopen/111331)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 3\
**Last updated:** [March 8, 2024, 1:26pm UTC](https://discourse.julialang.org/t/libdl-dlopen-versus-dlfcn-h-s-dlopen/111331 "2024-03-08T13:26:12Z")

</div>

On my system, I see // Build with // \`gcc test\_libpython.c -ldl\` #include \<stdio.h\> #include \<dlfcn.h\> int main() { void\* handle = dlopen("/usr/lib/x86\_64-linux-gnu/libpython3.10.so.1.0", RTLD\_LAZY | RTLD\_DEEPBIND…

---

## [Generated functions and reflection](https://discourse.julialang.org/t/generated-functions-and-reflection/111301)

<div class="topic-metadata">

**Author:** [@willtebbutt](https://discourse.julialang.org/u/willtebbutt)\
**Replies:** 1\
**Last updated:** [March 7, 2024, 9:49pm UTC](https://discourse.julialang.org/t/generated-functions-and-reflection/111301 "2024-03-07T21:49:50Z")

</div>

Why is it the case that reflection is not permitted from within generated functions? (I know that e.g. Zygote does it, but I get the impression that’s frowned upon). I had a search through old posts but can’t find a clea…

---

## [Linear relationship between Xoshiro tasks](https://discourse.julialang.org/t/linear-relationship-between-xoshiro-tasks/110454)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 29\
**Last updated:** [March 6, 2024, 4:39pm UTC](https://discourse.julialang.org/t/linear-relationship-between-xoshiro-tasks/110454 "2024-03-06T16:39:36Z")

</div>

Cool, I didn’t see that! Quite sweet addition to my initial unprincipled PR. However, I fear that your construction is somewhat broken. The problem is that you can easily construct task trees that imply linear relatio…

---

## [Naming of ScopedValues](https://discourse.julialang.org/t/naming-of-scopedvalues/110747)

<div class="topic-metadata">

**Author:** [@mnemnion](https://discourse.julialang.org/u/mnemnion)\
**Replies:** 26\
**Last updated:** [March 7, 2024, 7:29pm UTC](https://discourse.julialang.org/t/naming-of-scopedvalues/110747 "2024-03-07T19:29:41Z")

</div>

A bit off topic, but it confuses me that my old friend from Lisp, the \*dynamic-variable\*, is called ScopedValue in Julia. I gather that’s what they’re called in Java? My gripe is that what differs between lexical scope…

---

## [Expose credential methods from LibGit2 in Pkg.jl](https://discourse.julialang.org/t/expose-credential-methods-from-libgit2-in-pkg-jl/111261)

<div class="topic-metadata">

**Author:** [@lklein](https://discourse.julialang.org/u/lklein)\
**Replies:** 0\
**Last updated:** [March 6, 2024, 9:11pm UTC](https://discourse.julialang.org/t/expose-credential-methods-from-libgit2-in-pkg-jl/111261 "2024-03-06T21:11:49Z")

</div>

LibGit2 offers some opportunities to Manage credentials explicitly (SSHCredential and UserPasswordCredential for example). Has there ever been made any effort to expose those to the user of Pkg.jl? Or if not does anyone…

---

## [Build Julia with debug files](https://discourse.julialang.org/t/build-julia-with-debug-files/111131)

<div class="topic-metadata">

**Author:** [@Luc\_W](https://discourse.julialang.org/u/Luc_W)\
**Replies:** 0\
**Last updated:** [March 4, 2024, 12:33pm UTC](https://discourse.julialang.org/t/build-julia-with-debug-files/111131 "2024-03-04T12:33:52Z")

</div>

Is there a way to enable generating debug info with the release build. I know that you can build a debug version in cygwin with “make -j 4 debug” but this will append “-debug” to julia.exe and some dll’s. I tried removin…

---

## [Why are self-referential struct parameters impossible?](https://discourse.julialang.org/t/why-are-self-referential-struct-parameters-impossible/110982)

<div class="topic-metadata">

**Author:** [@mnemnion](https://discourse.julialang.org/u/mnemnion)\
**Replies:** 19\
**Last updated:** [March 2, 2024, 11:46pm UTC](https://discourse.julialang.org/t/why-are-self-referential-struct-parameters-impossible/110982 "2024-03-02T23:46:18Z")

</div>

Neither of these compiles: struct Tree{V\<:Any,T\<:Union{Tree,Nothing}} value::V left::T right::T end struct Tree{V,T} where {V\<:Any,T\<:Union{Tree,Nothing}} value::V left::T right::T end It m…

---

## [\`in\` vs \`=\` in loop expressions](https://discourse.julialang.org/t/in-vs-in-loop-expressions/110569)

<div class="topic-metadata">

**Author:** [@Mason](https://discourse.julialang.org/u/Mason)\
**Replies:** 3\
**Last updated:** [February 25, 2024, 2:34am UTC](https://discourse.julialang.org/t/in-vs-in-loop-expressions/110569 "2024-02-25T02:34:22Z")

</div>

Continuing the discussion from Supporting syntax \`x not in y\` as alias for \`!(x in y)\`: While I agree, I will note that the parser disagrees with you, and literally does treat in as syntactic sugar for = in loop expres…

---

## [Reason for duplicated llvm code in pseudo-vtable](https://discourse.julialang.org/t/reason-for-duplicated-llvm-code-in-pseudo-vtable/110719)

<div class="topic-metadata">

**Author:** [@wheeheee](https://discourse.julialang.org/u/wheeheee)\
**Replies:** 7\
**Last updated:** [February 25, 2024, 11:45pm UTC](https://discourse.julialang.org/t/reason-for-duplicated-llvm-code-in-pseudo-vtable/110719 "2024-02-25T23:45:45Z")

</div>

Apologies if this is answered somewhere else, but I couldn’t find it. I have the following two functions; testvt is intended to do some sort of dispatch, while remaining type-stable: @noinline f(x, a, b, c, ::Val{N}) w…

---

## [LXM splittable prng](https://discourse.julialang.org/t/lxm-splittable-prng/110501)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 5\
**Last updated:** [February 23, 2024, 10:42pm UTC](https://discourse.julialang.org/t/lxm-splittable-prng/110501 "2024-02-23T22:42:29Z")

</div>

Continuing the discussion from Linear relationship between Xoshiro tasks: Just in case it’s interesting, Guy Steele who worked on SplitMix has come up with a newer algorithm. Talk: https://www.youtube.com/watch?v=OXurC…

---

## [Supporting syntax \`x not in y\` as alias for \`!(x in y)\`](https://discourse.julialang.org/t/supporting-syntax-x-not-in-y-as-alias-for-x-in-y/110146)

<div class="topic-metadata">

**Author:** [@fingolfin](https://discourse.julialang.org/u/fingolfin)\
**Replies:** 48\
**Last updated:** [February 23, 2024, 7:01am UTC](https://discourse.julialang.org/t/supporting-syntax-x-not-in-y-as-alias-for-x-in-y/110146 "2024-02-23T07:01:17Z")

</div>

One thing I like in Python is that they allow writing x not in y instead of !(x in y). To me this results in code that is much easier to read (obviously this is subjective). I wonder if it would be possible to support t…

---

## [Julia Pragma Macros](https://discourse.julialang.org/t/julia-pragma-macros/110532)

<div class="topic-metadata">

**Author:** [@mnemnion](https://discourse.julialang.org/u/mnemnion)\
**Replies:** 4\
**Last updated:** [February 21, 2024, 7:33pm UTC](https://discourse.julialang.org/t/julia-pragma-macros/110532 "2024-02-21T19:33:22Z")

</div>

Continuing the discussion from Ifelse vs ternary with tuples: Julia has a few “pragma macros” already and I agree more would be nice. The current collection, such as @inline and @inbounds/@boundscheck, focus on compil…

---

## [Inferring MethodInstance from code\_llvm](https://discourse.julialang.org/t/inferring-methodinstance-from-code-llvm/110330)

<div class="topic-metadata">

**Author:** [@dyatunin](https://discourse.julialang.org/u/dyatunin)\
**Replies:** 5\
**Last updated:** [February 20, 2024, 3:51am UTC](https://discourse.julialang.org/t/inferring-methodinstance-from-code-llvm/110330 "2024-02-20T03:51:38Z")

</div>

I am trying to track down some performance issues by tracing through the output of code\_llvm. Whenever the LLVM code contains a call to a Julia function, I would like to figure out which MethodInstance of that function i…

---

## [Did Logging lose colors on Julia 1.11?](https://discourse.julialang.org/t/did-logging-lose-colors-on-julia-1-11/110416)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 1\
**Last updated:** [February 19, 2024, 7:27pm UTC](https://discourse.julialang.org/t/did-logging-lose-colors-on-julia-1-11/110416 "2024-02-19T19:27:25Z")

</div>

My log messages seem to have lost their color. Is this happening for anyone else on nightly?

---

## [RFC: Some Ideas to Tackle #15276 - performance of captured variables in closures](https://discourse.julialang.org/t/rfc-some-ideas-to-tackle-15276-performance-of-captured-variables-in-closures/95260)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 65\
**Last updated:** [February 16, 2024, 8:56pm UTC](https://discourse.julialang.org/t/rfc-some-ideas-to-tackle-15276-performance-of-captured-variables-in-closures/95260 "2024-02-16T20:56:29Z")

</div>

Naïvely written Julia should be performant. It shouldn’t take memorizing a 35-page manual to reliably beat Matlab. Unless more performance footguns are removed, it’s impossible for a package ecosystem to be performant. F…

---

## [1.11 feature freeze, February 12th](https://discourse.julialang.org/t/1-11-feature-freeze-february-12th/109759)

<div class="topic-metadata">

**Author:** [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Replies:** 1\
**Last updated:** [February 16, 2024, 9:22am UTC](https://discourse.julialang.org/t/1-11-feature-freeze-february-12th/109759 "2024-02-16T09:22:19Z")

</div>

Heads up: this is to let people know that if they have any PRs that they really want to get into Julia 1.11, the feature freeze for the 1.11 release will be on Monday, February 12th. There is some leeway with PRs that h…

---

## [Julia never stops compiling for new recursive Vector types](https://discourse.julialang.org/t/julia-never-stops-compiling-for-new-recursive-vector-types/110232)

<div class="topic-metadata">

**Author:** [@mnemnion](https://discourse.julialang.org/u/mnemnion)\
**Replies:** 18\
**Last updated:** [February 15, 2024, 8:21pm UTC](https://discourse.julialang.org/t/julia-never-stops-compiling-for-new-recursive-vector-types/110232 "2024-02-15T20:21:54Z")

</div>

This is… unexpected behavior. I feel like inference should give up at some point. julia\> w = \[1\]; @time for i = 1:100 global w = \[w\] end 0.227547 seconds (466.23 k allocations: 31.348 MiB, 1.52% gc tim…

---

## [.. broadcast object property](https://discourse.julialang.org/t/broadcast-object-property/47104)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 41\
**Last updated:** [February 15, 2024, 8:21am UTC](https://discourse.julialang.org/t/broadcast-object-property/47104 "2024-02-15T08:21:52Z")

</div>

A few years back I requested … be used to broadcast object property over array of objects. If A.x is property x of object A. Then Array\_of\_A…x is an array of the x properties of the A objects. Was told … was al…

---

## [Narrowing typed globals](https://discourse.julialang.org/t/narrowing-typed-globals/110177)

<div class="topic-metadata">

**Author:** [@Dan](https://discourse.julialang.org/u/Dan)\
**Replies:** 1\
**Last updated:** [February 13, 2024, 11:06pm UTC](https://discourse.julialang.org/t/narrowing-typed-globals/110177 "2024-02-13T23:06:33Z")

</div>

When locking a non-concrete type to a global, it may be reasonable to allow narrowing the locked type to a subtype. Consider: julia\> s::Number = 3 3 julia\> s::Int64 = 5 ERROR: cannot set type for global Main.s. It alr…

---

## [What are the pros and cons of row/column major ordering?](https://discourse.julialang.org/t/what-are-the-pros-and-cons-of-row-column-major-ordering/110045)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 10\
**Last updated:** [February 13, 2024, 4:53pm UTC](https://discourse.julialang.org/t/what-are-the-pros-and-cons-of-row-column-major-ordering/110045 "2024-02-13T16:53:10Z")

</div>

I understand that because matrices in Julia are stored in column major order, it is best to iterate over them in column major order. What is less clear to me is why one would want to store matrices in column major order…

---

## [Internals of types and how they hash](https://discourse.julialang.org/t/internals-of-types-and-how-they-hash/109998)

<div class="topic-metadata">

**Author:** [@mnemnion](https://discourse.julialang.org/u/mnemnion)\
**Replies:** 10\
**Last updated:** [February 9, 2024, 8:30pm UTC](https://discourse.julialang.org/t/internals-of-types-and-how-they-hash/109998 "2024-02-09T20:30:05Z")

</div>

Yes, that makes a lot more sense, occurred to me that one could just do that after I posted. I presume that Base.hash(T::DataType, h) uses the immutable parts of the DataType struct? It would kind of have to. That woul…

---

## [Pkg.jl: Splitting the default environment in two](https://discourse.julialang.org/t/pkg-jl-splitting-the-default-environment-in-two/109950)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 1\
**Last updated:** [February 8, 2024, 8:41pm UTC](https://discourse.julialang.org/t/pkg-jl-splitting-the-default-environment-in-two/109950 "2024-02-08T20:41:07Z")

</div>

It’s useful to have an environment that’s inherited, for things like Revise.jl and OhMyREPL.jl. It’s also useful to have an environment that’s activated by default when running julia, for quick interactive sessions. Cur…

---

## [Memory aliasing rules and reinterpret](https://discourse.julialang.org/t/memory-aliasing-rules-and-reinterpret/109875)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 8\
**Last updated:** [February 7, 2024, 9:22pm UTC](https://discourse.julialang.org/t/memory-aliasing-rules-and-reinterpret/109875 "2024-02-07T21:22:14Z")

</div>

I wanted to ask about the julia aliasing rules for memory accesses. Unfortunately, the docs are not super clear about that, e.g. Julia currently uses LLVM’s Type Based Alias Analysis. To find the comments that documen…

---

## [Left and right division for strings](https://discourse.julialang.org/t/left-and-right-division-for-strings/109839)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 25\
**Last updated:** [February 7, 2024, 8:32pm UTC](https://discourse.julialang.org/t/left-and-right-division-for-strings/109839 "2024-02-07T20:32:03Z")

</div>

For numbers and matrices, we have x \* y / y == x and x \\ (x \* y) == y. Since we have \* for strings, we could implement / and \\ for strings too: "abcd" / "cd" == "ab" "ab" \\ "abcd" == "cd" AFAICT, it would be algebraic…

---

## [How can we maintain easy generics in the face of demand for a “safe” language?](https://discourse.julialang.org/t/how-can-we-maintain-easy-generics-in-the-face-of-demand-for-a-safe-language/109734)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 25\
**Last updated:** [February 7, 2024, 6:01pm UTC](https://discourse.julialang.org/t/how-can-we-maintain-easy-generics-in-the-face-of-demand-for-a-safe-language/109734 "2024-02-07T18:01:05Z")

</div>

Julia is moving in the direction of having a static sub-language and even things like enforceable interface/etc. However, if we are not VERY careful, we can lose one big advantage that Julia has, easy generic. Duck typi…

---

## [Explanation and examples for "Subtyping currently intentionally answers certain queries incorrectly for kind types"?](https://discourse.julialang.org/t/explanation-and-examples-for-subtyping-currently-intentionally-answers-certain-queries-incorrectly-for-kind-types/109722)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 0\
**Last updated:** [February 5, 2024, 4:44am UTC](https://discourse.julialang.org/t/explanation-and-examples-for-subtyping-currently-intentionally-answers-certain-queries-incorrectly-for-kind-types/109722 "2024-02-05T04:44:24Z")

</div>

I noticed this in the Julia source: It was added in this PR: AFAIU isnotbrokensubtype(a, b) basically means “a \<: b is probably valid”? But when is it not valid? I think some examples would help my understanding an…

---

## [Proposal: function for mutating operators?](https://discourse.julialang.org/t/proposal-function-for-mutating-operators/109707)

<div class="topic-metadata">

**Author:** [@aryavorskiy](https://discourse.julialang.org/u/aryavorskiy)\
**Replies:** 9\
**Last updated:** [February 4, 2024, 10:23pm UTC](https://discourse.julialang.org/t/proposal-function-for-mutating-operators/109707 "2024-02-04T22:23:23Z")

</div>

I want my custom type to implement indexed increments A\[...\] += B, but not assignments A\[...\] = B. Currently, syntax like A\[1:3\] += \[1, 2, 3\] is parsed A\[1:3\] = A\[1:3\] + \[1, 2, 3\]. This is straightforward, but unoptimal…

---

## [Suggestion: Explicit anonymous functors?](https://discourse.julialang.org/t/suggestion-explicit-anonymous-functors/109692)

<div class="topic-metadata">

**Author:** [@sgaure](https://discourse.julialang.org/u/sgaure)\
**Replies:** 23\
**Last updated:** [February 4, 2024, 10:12pm UTC](https://discourse.julialang.org/t/suggestion-explicit-anonymous-functors/109692 "2024-02-04T22:12:37Z")

</div>

Before coming to the point, for your amusement I’ll share a well known footgun I er… stumbled across. A simplified version. using .Threads function boxingday(n) result = sum(fetch.(\[ @spawn begin …

---

## [Is it fine to download artifacts from Github for bisecting changes in Julia?](https://discourse.julialang.org/t/is-it-fine-to-download-artifacts-from-github-for-bisecting-changes-in-julia/109159)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 5\
**Last updated:** [February 2, 2024, 12:14am UTC](https://discourse.julialang.org/t/is-it-fine-to-download-artifacts-from-github-for-bisecting-changes-in-julia/109159 "2024-02-02T00:14:24Z")

</div>

Regarding bisecting changes in the Julia implementation (usually on the master branch), I feel like people usually build each commit locally while bisecting? Is there a good reason for doing that, instead of just downloa…

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

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