# Internals & Design

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

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

**Page:** 17

---

## [Mojo, is it just Python Julia?](https://discourse.julialang.org/t/mojo-is-it-just-python-julia/98573)

<div class="topic-metadata">

**Author:** [@cdelv](https://discourse.julialang.org/u/cdelv)\
**Replies:** 1\
**Last updated:** [May 9, 2023, 8:06pm UTC](https://discourse.julialang.org/t/mojo-is-it-just-python-julia/98573 "2023-05-09T20:06:19Z")

</div>

Hey everyone, I just saw this video about a new programing language intended for AI that is coming up. To me, looks a hell of a lot like Python Julia with its JIT. But, I would love to hear everyone’s thoughts. Also, th…

---

## [How is Float16 implemented?](https://discourse.julialang.org/t/how-is-float16-implemented/98554)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 3\
**Last updated:** [May 9, 2023, 2:45pm UTC](https://discourse.julialang.org/t/how-is-float16-implemented/98554 "2023-05-09T14:45:26Z")

</div>

Found a Float16 bug, the rounding of subnormals seems incorrect, however I can’t find the implementation of Float16. The help that’s built into the REPL and @which both just point me to “intrinsic functions”. Is the Flo…

---

## [Is there a mature YAML parsing/saving package?](https://discourse.julialang.org/t/is-there-a-mature-yaml-parsing-saving-package/27989)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 5\
**Last updated:** [May 6, 2023, 7:39am UTC](https://discourse.julialang.org/t/is-there-a-mature-yaml-parsing-saving-package/27989 "2023-05-06T07:39:43Z")

</div>

I know there is a YAML.jl, but it does not even support emitting Julia objects to YAML. Is there a better option?

---

## [Should slices of Adjoint/Transpose be StridedVectors?](https://discourse.julialang.org/t/should-slices-of-adjoint-transpose-be-stridedvectors/98297)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 4\
**Last updated:** [May 4, 2023, 11:55am UTC](https://discourse.julialang.org/t/should-slices-of-adjoint-transpose-be-stridedvectors/98297 "2023-05-04T11:55:06Z")

</div>

julia\> X = rand(2,2); julia\> view(X', :, 1) == view(X, 1, :) true julia\> view(X,1,:) isa StridedVector true julia\> view(X',:,1) isa StridedVector false Ideally, view(X',:,1) would also be a StridedVector and access t…

---

## [Building Julia documentation using Typst](https://discourse.julialang.org/t/building-julia-documentation-using-typst/97498)

<div class="topic-metadata">

**Author:** [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)\
**Replies:** 22\
**Last updated:** [April 20, 2023, 12:50pm UTC](https://discourse.julialang.org/t/building-julia-documentation-using-typst/97498 "2023-04-20T12:50:23Z")

</div>

I just wrote a Typst backend for Documenter.jl and managed to build the latest Julia documentation. Footnotes are not supported yet, while math equations are kept as is since Typst uses a different grammar and there i…

---

## [How to explain recursive generation of method instances for non-concrete types](https://discourse.julialang.org/t/how-to-explain-recursive-generation-of-method-instances-for-non-concrete-types/98020)

<div class="topic-metadata">

**Author:** [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Replies:** 4\
**Last updated:** [April 28, 2023, 2:27pm UTC](https://discourse.julialang.org/t/how-to-explain-recursive-generation-of-method-instances-for-non-concrete-types/98020 "2023-04-28T14:27:01Z")

</div>

I’m trying to understand under what circumstances Julia would trigger a compilation for “bad” Julia codes, so I use MethodAnalysis.jl to help the diagnosis. My first assumption is that each creation of a method instance …

---

## [Wanted: proper enum type and switch statement with pattern matching on enumerable types](https://discourse.julialang.org/t/wanted-proper-enum-type-and-switch-statement-with-pattern-matching-on-enumerable-types/85225)

<div class="topic-metadata">

**Author:** [@Steven\_Sagaert](https://discourse.julialang.org/u/Steven_Sagaert)\
**Replies:** 5\
**Last updated:** [April 27, 2023, 9:57pm UTC](https://discourse.julialang.org/t/wanted-proper-enum-type-and-switch-statement-with-pattern-matching-on-enumerable-types/85225 "2023-04-27T21:57:08Z")

</div>

I’ve returned to Julia development after a break of a couple of years and I was suprised that there still not a proper enum type or a switch (or match if you like Scala) statement. The current enum with @enum is not goo…

---

## [Is dso\_local set in LLVM IR output?](https://discourse.julialang.org/t/is-dso-local-set-in-llvm-ir-output/52707)

<div class="topic-metadata">

**Author:** [@MaskRay](https://discourse.julialang.org/u/MaskRay)\
**Replies:** 1\
**Last updated:** [April 27, 2023, 2:35pm UTC](https://discourse.julialang.org/t/is-dso-local-set-in-llvm-ir-output/52707 "2023-04-27T14:35:35Z")

</div>

https://github.com/llvm/llvm-project/commit/2047c10c22b071cccc57a7e2779d6603512e9113 was to clean up llvm::TargetMachine::shouldAssumeDSOLocal. For Clang, that code is unneeded because Clang sets dso\_local https://github…

---

## [What is the point of the Symmetric type?](https://discourse.julialang.org/t/what-is-the-point-of-the-symmetric-type/40773)

<div class="topic-metadata">

**Author:** [@Grayscale](https://discourse.julialang.org/u/Grayscale)\
**Replies:** 19\
**Last updated:** [April 26, 2023, 9:37pm UTC](https://discourse.julialang.org/t/what-is-the-point-of-the-symmetric-type/40773 "2023-04-26T21:37:56Z")

</div>

Cross-posting this question at the suggestion of a commenter: https://stackoverflow.com/questions/62058109/what-is-the-point-of-the-symmetric-type-in-julia

---

## [Add unicode symbol ⟋](https://discourse.julialang.org/t/add-unicode-symbol/97836)

<div class="topic-metadata">

**Author:** [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)\
**Replies:** 6\
**Last updated:** [April 25, 2023, 4:06am UTC](https://discourse.julialang.org/t/add-unicode-symbol/97836 "2023-04-25T04:06:10Z")

</div>

How do I request the addition of a Unicode symbol? I am interested in the symbol “⟋” (U+27CB Mathematical Rising Diagonal) to use in variable names that represent ratios and derivatives. e.g. dF⟋dx = 0.2 dF⟋dy = 0.5 I…

---

## [Parser bug(?): syntax: extra token after end of expression](https://discourse.julialang.org/t/parser-bug-syntax-extra-token-after-end-of-expression/97832)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 0\
**Last updated:** [April 23, 2023, 11:01pm UTC](https://discourse.julialang.org/t/parser-bug-syntax-extra-token-after-end-of-expression/97832 "2023-04-23T23:01:25Z")

</div>

These two statements error, even though they seem unambiguous: julia\> begin () -\> 3 end() ERROR: syntax: extra token "(" after end of expression Stacktrace: \[1\] top-level scope @ none:1 julia\> funct…

---

## [Where does StdlibArtifacts.toml come from?](https://discourse.julialang.org/t/where-does-stdlibartifacts-toml-come-from/97752)

<div class="topic-metadata">

**Author:** [@Barget](https://discourse.julialang.org/u/Barget)\
**Replies:** 3\
**Last updated:** [April 22, 2023, 5:36pm UTC](https://discourse.julialang.org/t/where-does-stdlibartifacts-toml-come-from/97752 "2023-04-22T17:36:54Z")

</div>

Hello all, While exploring a bit how packages and artifacts are stored locally, I came across a couple of StdlibArtifacts.toml files. Apparently, this is not returned by Artifacts.find\_artifacts\_toml. So the question(…

---

## [Should functions that take AbstractStrings also work for Symbols?](https://discourse.julialang.org/t/should-functions-that-take-abstractstrings-also-work-for-symbols/97687)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 4\
**Last updated:** [April 21, 2023, 9:34am UTC](https://discourse.julialang.org/t/should-functions-that-take-abstractstrings-also-work-for-symbols/97687 "2023-04-21T09:34:03Z")

</div>

I often use Symbols for better efficiency in large DataFrames, but sometimes would still like to filter by calling functions on the value of the Symbols like contains, startswith, endswith, etc. or even length. Is there…

---

## [Staged Compilation](https://discourse.julialang.org/t/staged-compilation/97682)

<div class="topic-metadata">

**Author:** [@olynch](https://discourse.julialang.org/u/olynch)\
**Replies:** 8\
**Last updated:** [April 20, 2023, 10:36pm UTC](https://discourse.julialang.org/t/staged-compilation/97682 "2023-04-20T22:36:22Z")

</div>

I’ve been learning more about Racket’s staged compilation system, and I’m wondering if there is any plan in Julia to have more explicit support for the kind of principled stated metaprogramming that goes on in the Racket…

---

## [Traits via set-theoretic types: proof of concept](https://discourse.julialang.org/t/traits-via-set-theoretic-types-proof-of-concept/97571)

<div class="topic-metadata">

**Author:** [@Jollywatt](https://discourse.julialang.org/u/Jollywatt)\
**Replies:** 2\
**Last updated:** [April 18, 2023, 9:12pm UTC](https://discourse.julialang.org/t/traits-via-set-theoretic-types-proof-of-concept/97571 "2023-04-18T21:12:43Z")

</div>

I was prompted by these discussions: abstract multiple inheritance · Issue #5 · JuliaLang/julia · GitHub RFC: Language Support for Traits — Yay or Nay? … in particular, this comment about intersection types and also t…

---

## [TagBot cannot see the pull request](https://discourse.julialang.org/t/tagbot-cannot-see-the-pull-request/96091)

<div class="topic-metadata">

**Author:** [@GianlucaMastrantonio](https://discourse.julialang.org/u/GianlucaMastrantonio)\
**Replies:** 1\
**Last updated:** [April 17, 2023, 9:31am UTC](https://discourse.julialang.org/t/tagbot-cannot-see-the-pull-request/96091 "2023-04-17T09:31:38Z")

</div>

Hi. I’m trying to use a TagBot for a package I’m writing (here GitHub - GianlucaMastrantonio/BayesSizeAndShape.jl: Bayesian regression models for size-and-shape data). I registered the new version of my package, but th…

---

## [@time vs @btime in docs](https://discourse.julialang.org/t/time-vs-btime-in-docs/97454)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 1\
**Last updated:** [April 14, 2023, 10:49am UTC](https://discourse.julialang.org/t/time-vs-btime-in-docs/97454 "2023-04-14T10:49:07Z")

</div>

Performance Tips · The Julia Language says "Measure performance with @time " but whenever someone comes with a performance question on Discourse they’re always advised to use @btime instead. Should the docs be changed or…

---

## [Has PGO for (re)compiling methods been considered?](https://discourse.julialang.org/t/has-pgo-for-re-compiling-methods-been-considered/97426)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 5\
**Last updated:** [April 13, 2023, 12:50pm UTC](https://discourse.julialang.org/t/has-pgo-for-re-compiling-methods-been-considered/97426 "2023-04-13T12:50:34Z")

</div>

It just crossed my mind that it would be very nice if Julia provided some kind of profile-guided optimization (PGO) API. Something like: The user gathers a performance profile for some of their Julia code The user…

---

## [Should error messages be reversed?](https://discourse.julialang.org/t/should-error-messages-be-reversed/51284)

<div class="topic-metadata">

**Author:** [@tbenst](https://discourse.julialang.org/u/tbenst)\
**Replies:** 8\
**Last updated:** [April 11, 2023, 3:00pm UTC](https://discourse.julialang.org/t/should-error-messages-be-reversed/51284 "2023-04-11T15:00:50Z")

</div>

I find that every time I get an error message in (VScode) Julia, I have to scroll up to the top and then read top down. The first many lines of what is visible are generally not useful at all. This is particularly bad wi…

---

## [Non-standard string literals create global-like objects!?](https://discourse.julialang.org/t/non-standard-string-literals-create-global-like-objects/97283)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 6\
**Last updated:** [April 9, 2023, 6:26pm UTC](https://discourse.julialang.org/t/non-standard-string-literals-create-global-like-objects/97283 "2023-04-09T18:26:31Z")

</div>

I am very confused by the way non-standard string literals work when called inside of other functions. See this example with regex (but it happens with any non-standard string literal): r"a" === r"a" # false Regex("a") …

---

## [Base.Chop API rationale](https://discourse.julialang.org/t/base-chop-api-rationale/96473)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 3\
**Last updated:** [April 9, 2023, 1:10pm UTC](https://discourse.julialang.org/t/base-chop-api-rationale/96473 "2023-04-09T13:10:45Z")

</div>

Base.chop chop(s::AbstractString; head::Integer = 0, tail::Integer = 1) Remove the first head and the last tail characters from s. The call chop(s) removes the last character from s. If it is requested to remove more …

---

## [Expressions with Arbitrary Objects in their \`args\` Arguments](https://discourse.julialang.org/t/expressions-with-arbitrary-objects-in-their-args-arguments/94771)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 6\
**Last updated:** [April 8, 2023, 12:36pm UTC](https://discourse.julialang.org/t/expressions-with-arbitrary-objects-in-their-args-arguments/94771 "2023-04-08T12:36:21Z")

</div>

I checked Core.Expr, Core.eval, Metaprogramming, and Julia ASTs, and I wasn’t able to find an answer. Is this behavior intended and supported? Let’s build a couple of expressions: julia\> ax1, ax2 = :(\[1:5;\]), \[1:5;\] (:…

---

## [Allocations with write(::TCPSocket, x)](https://discourse.julialang.org/t/allocations-with-write-tcpsocket-x/68865)

<div class="topic-metadata">

**Author:** [@DatName](https://discourse.julialang.org/u/DatName)\
**Replies:** 1\
**Last updated:** [April 6, 2023, 2:56pm UTC](https://discourse.julialang.org/t/allocations-with-write-tcpsocket-x/68865 "2023-04-06T14:56:56Z")

</div>

Hi. I am investigating the possibility of using TCPSockets without any dynamic allocations. It seems that plain @allocated write(soc::TCPSocket, x) always allocates (after compilation). --track-allocation=all points …

---

## [Questions about Julia's compilation model](https://discourse.julialang.org/t/questions-about-julias-compilation-model/96831)

<div class="topic-metadata">

**Author:** [@jakobnissen](https://discourse.julialang.org/u/jakobnissen)\
**Replies:** 9\
**Last updated:** [April 4, 2023, 7:50am UTC](https://discourse.julialang.org/t/questions-about-julias-compilation-model/96831 "2023-04-04T07:50:07Z")

</div>

I have a few questions about how Julia’s compiler works. First, I sometimes see invalidated methodinstances with abstract arguments, e.g. nextind(s::AbstractString, i::Int64) from SnoopCompile output like this: backedg…

---

## [Why are spaces not allowed between function names and parentheses?](https://discourse.julialang.org/t/why-are-spaces-not-allowed-between-function-names-and-parentheses/96941)

<div class="topic-metadata">

**Author:** [@SeSodesa](https://discourse.julialang.org/u/SeSodesa)\
**Replies:** 1\
**Last updated:** [April 1, 2023, 11:11am UTC](https://discourse.julialang.org/t/why-are-spaces-not-allowed-between-function-names-and-parentheses/96941 "2023-04-01T11:11:52Z")

</div>

I’ve recently come to realize when using other languages, that I really like to write a space between a function name and the tuple that defines its input arguments, as in fn (x) = x instead of fn(x) = x This feels e…

---

## [How to use locally built LLVM to build Julia?](https://discourse.julialang.org/t/how-to-use-locally-built-llvm-to-build-julia/96660)

<div class="topic-metadata">

**Author:** [@ahsan](https://discourse.julialang.org/u/ahsan)\
**Replies:** 1\
**Last updated:** [March 31, 2023, 5:08pm UTC](https://discourse.julialang.org/t/how-to-use-locally-built-llvm-to-build-julia/96660 "2023-03-31T17:08:07Z")

</div>

I was wondering how could one use a locally built LLVM (with some bug fixes) to build Julia? Is there some document that outlines this. Thanks!

---

## [Singleton Types](https://discourse.julialang.org/t/singleton-types/96817)

<div class="topic-metadata">

**Author:** [@olynch](https://discourse.julialang.org/u/olynch)\
**Replies:** 6\
**Last updated:** [March 30, 2023, 1:02pm UTC](https://discourse.julialang.org/t/singleton-types/96817 "2023-03-30T13:02:43Z")

</div>

Often I want to use zero-sized structs for dispatch purposes, and it’s kind of annoying to have to make up a name for both the struct and the unique instance of that struct. In Scala, they have object as a primitive, wh…

---

## [Middle(x,y) for DateTime, Char, and others](https://discourse.julialang.org/t/middle-x-y-for-datetime-char-and-others/96220)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 3\
**Last updated:** [March 28, 2023, 9:50am UTC](https://discourse.julialang.org/t/middle-x-y-for-datetime-char-and-others/96220 "2023-03-28T09:50:01Z")

</div>

Should these methods exist? middle(x, y) Compute the middle of two numbers x and y, which is equivalent in both value and type to computing their mean ((x + y) / 2). julia\> middle(now(), now()) ERROR: MethodErr…

---

## [Weird interaction between generated function and inlining](https://discourse.julialang.org/t/weird-interaction-between-generated-function-and-inlining/96459)

<div class="topic-metadata">

**Author:** [@mhinsch](https://discourse.julialang.org/u/mhinsch)\
**Replies:** 5\
**Last updated:** [March 27, 2023, 3:50pm UTC](https://discourse.julialang.org/t/weird-interaction-between-generated-function-and-inlining/96459 "2023-03-27T15:50:11Z")

</div>

I am currently working on a way to memoise functions using fully typed containers (see this discussion for the general concept). I have a working implementation (sorry, still very barebone ATM), that seems to largely do …

---

## [Memory usage and performance differences in 1.9-rc1 vs. 1.8.5](https://discourse.julialang.org/t/memory-usage-and-performance-differences-in-1-9-rc1-vs-1-8-5/96209)

<div class="topic-metadata">

**Author:** [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Replies:** 12\
**Last updated:** [March 27, 2023, 4:12am UTC](https://discourse.julialang.org/t/memory-usage-and-performance-differences-in-1-9-rc1-vs-1-8-5/96209 "2023-03-27T04:12:42Z")

</div>

I have some memory- and CPU-intensive multithreaded image analysis code. In 1.8.5, on an AWS Linux system with 64 GB of RAM and 8 vCPUs, the code will run in cycles, spiking up to (for one example) 23 GB of allocated RA…

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

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