# Internals & Design

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

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

**Page:** 25

---

## [Does Julia's Linux platform support ever call syscalls directly?](https://discourse.julialang.org/t/does-julias-linux-platform-support-ever-call-syscalls-directly/80718)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 6\
**Last updated:** [May 8, 2022, 8:35pm UTC](https://discourse.julialang.org/t/does-julias-linux-platform-support-ever-call-syscalls-directly/80718 "2022-05-08T20:35:38Z")

</div>

I’m curious about whether Julia’s (or stdlib) Linux-specific parts ever call syscalls directly (without libc involvement)? Does Linux specific code even exist in the implementation of Julia or its stdlib?

---

## [Chipping in on pushfirst/popfirst](https://discourse.julialang.org/t/chipping-in-on-pushfirst-popfirst/80704)

<div class="topic-metadata">

**Author:** [@martin.auer](https://discourse.julialang.org/u/martin.auer)\
**Replies:** 2\
**Last updated:** [May 8, 2022, 11:22am UTC](https://discourse.julialang.org/t/chipping-in-on-pushfirst-popfirst/80704 "2022-05-08T11:22:56Z")

</div>

(First-time poster here and new to Julia; adoring the language’s patent elegance and the community’s drive!) I wanted to chip in a few thoughts on the naming of “pushfirst!”/“popfirst!”. This convention was agreed to af…

---

## [\`eltype\` could be smarter](https://discourse.julialang.org/t/eltype-could-be-smarter/80485)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 8\
**Last updated:** [May 4, 2022, 7:17pm UTC](https://discourse.julialang.org/t/eltype-could-be-smarter/80485 "2022-05-04T19:17:46Z")

</div>

There have been plenty of eltype discussions before, for example Generator - iterators should deliver accurate eltype. I understand that this can sometimes be a hard problem. But then there are cases like this: julia\> …

---

## [Implicitly loaded modules in the future?](https://discourse.julialang.org/t/implicitly-loaded-modules-in-the-future/62646)

<div class="topic-metadata">

**Author:** [@panos.asproulis](https://discourse.julialang.org/u/panos.asproulis)\
**Replies:** 278\
**Last updated:** [May 4, 2022, 12:47pm UTC](https://discourse.julialang.org/t/implicitly-loaded-modules-in-the-future/62646 "2022-05-04T12:47:28Z")

</div>

I find the modules implementation in Julia the most annoying “feature” of the language. For large projects it makes sense that developers would want to organise their code in separate modules (not packages), each one in…

---

## [One feature we could learn from Matlab?](https://discourse.julialang.org/t/one-feature-we-could-learn-from-matlab/79965)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 5\
**Last updated:** [April 26, 2022, 7:47am UTC](https://discourse.julialang.org/t/one-feature-we-could-learn-from-matlab/79965 "2022-04-26T07:47:13Z")

</div>

I really like how Matlab can automatically load some types of files into its memory. For example, if I have a MAT file, I can just drag and drop it into Matlab, that’s all it takes to load the file into Matlab. By typin…

---

## [Why does Julia not support JSON syntax to create a Dict?](https://discourse.julialang.org/t/why-does-julia-not-support-json-syntax-to-create-a-dict/42873)

<div class="topic-metadata">

**Author:** [@xareelee](https://discourse.julialang.org/u/xareelee)\
**Replies:** 27\
**Last updated:** [April 25, 2022, 3:27pm UTC](https://discourse.julialang.org/t/why-does-julia-not-support-json-syntax-to-create-a-dict/42873 "2022-04-25T15:27:55Z")

</div>

JSON syntax for creating Dict/Array is really handy, especially in web development. It’s useful and high productivity when you copy data and paste to code from Stackoverflow, MongoDB or any JSON string. Just curious, wh…

---

## [Does the julia executable already include a git client?](https://discourse.julialang.org/t/does-the-julia-executable-already-include-a-git-client/79985)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [April 25, 2022, 12:43pm UTC](https://discourse.julialang.org/t/does-the-julia-executable-already-include-a-git-client/79985 "2022-04-25T12:43:53Z")

</div>

I think so, but can someone confirm that a git client to manage packages is already present in the Julia executable that is downloaded from julialang.org, so that a stand-alone git client is not strictly required ?

---

## [Memory Leak: GC does not deallocate values allocated while it was turned off, unless specifically requested](https://discourse.julialang.org/t/memory-leak-gc-does-not-deallocate-values-allocated-while-it-was-turned-off-unless-specifically-requested/79904)

<div class="topic-metadata">

**Author:** [@Clemapfel](https://discourse.julialang.org/u/Clemapfel)\
**Replies:** 6\
**Last updated:** [April 24, 2022, 4:19pm UTC](https://discourse.julialang.org/t/memory-leak-gc-does-not-deallocate-values-allocated-while-it-was-turned-off-unless-specifically-requested/79904 "2022-04-24T16:19:10Z")

</div>

Hi, I’m considering opening a bug report about this, so I’d like to get your guys opinion on this behavior. The following is a memory leak: x = 1234 while (true) GC.enable(false) x = rand() GC.enable(true) …

---

## [Printing of unsigned numbers](https://discourse.julialang.org/t/printing-of-unsigned-numbers/79611)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 29\
**Last updated:** [April 22, 2022, 1:53pm UTC](https://discourse.julialang.org/t/printing-of-unsigned-numbers/79611 "2022-04-22T13:53:11Z")

</div>

One of the common uses of unsigned numbers is as bitmasks. I would be greatly annoyed if they did not print as hexadecimals, as that is exactly what I need them for. And that seems to be fairly common in other languages …

---

## [One-line \`if ... then ...\` syntax](https://discourse.julialang.org/t/one-line-if-then-syntax/79573)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 26\
**Last updated:** [April 22, 2022, 7:17am UTC](https://discourse.julialang.org/t/one-line-if-then-syntax/79573 "2022-04-22T07:17:20Z")

</div>

Which of the following two options do you prefer for a one-line if-then syntax? poll Related Github issue: https://github.com/JuliaLang/julia/issues/16389

---

## [Tests passing on 1.6, segfault on 1.7](https://discourse.julialang.org/t/tests-passing-on-1-6-segfault-on-1-7/79487)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 6\
**Last updated:** [April 22, 2022, 1:09am UTC](https://discourse.julialang.org/t/tests-passing-on-1-6-segfault-on-1-7/79487 "2022-04-22T01:09:35Z")

</div>

I’m seeing some strange behavior here. I have some tests that pass for Julia 1.6, and also pass locally for Julia 1.7.0, but cause a segfault on 1.7 in Github actions (I think that’s 1.7.2?). Especially surprising is th…

---

## [Arrays of abstract types within a parametric type](https://discourse.julialang.org/t/arrays-of-abstract-types-within-a-parametric-type/79769)

<div class="topic-metadata">

**Author:** [@tverho](https://discourse.julialang.org/u/tverho)\
**Replies:** 17\
**Last updated:** [April 21, 2022, 4:49pm UTC](https://discourse.julialang.org/t/arrays-of-abstract-types-within-a-parametric-type/79769 "2022-04-21T16:49:00Z")

</div>

Hi all, I’m wondering if this behavior is intentional. Let’s look at this example # This works struct A n::Real v::Vector{Real} end # This works struct B{T} n::T v::Real end # This doesn't work struct C{T} n…

---

## [Allow convert(String, :test)](https://discourse.julialang.org/t/allow-convert-string-test/79786)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 4\
**Last updated:** [April 21, 2022, 4:24pm UTC](https://discourse.julialang.org/t/allow-convert-string-test/79786 "2022-04-21T16:24:08Z")

</div>

I came to miss this during plotting. Is there a reason why Base does not define conversion from Symbol to String with a simple call of string?

---

## [LOAD\_PATH includes unquoted individual entries](https://discourse.julialang.org/t/load-path-includes-unquoted-individual-entries/57746)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 10\
**Last updated:** [March 23, 2021, 7:46am UTC](https://discourse.julialang.org/t/load-path-includes-unquoted-individual-entries/57746 "2021-03-23T07:46:47Z")

</div>

It seems that somehow individual entries in LOAD\_PATH are not quoted: lobianco@NCY-BETA-ALOBIANCO:~/.julia/dev/BetaML$ cd "docs/src/tutorials/A regression task: sharing bike demand prediction" lobianco@NCY-BETA-ALOBIANC…

---

## [How to get a function instance from a function type?](https://discourse.julialang.org/t/how-to-get-a-function-instance-from-a-function-type/79585)

<div class="topic-metadata">

**Author:** [@o314](https://discourse.julialang.org/u/o314)\
**Replies:** 3\
**Last updated:** [April 17, 2022, 4:53am UTC](https://discourse.julialang.org/t/how-to-get-a-function-instance-from-a-function-type/79585 "2022-04-17T04:53:17Z")

</div>

How can we get a function instance from a function type eg. let’s suppose that we def ft = typeof(abs) , how can we get abs again ? Currently, i have the following code that runs ft = typeof(abs) using Test @test abs…

---

## [What’s stopping Julia from using Boolean values as Singleton types?](https://discourse.julialang.org/t/what-s-stopping-julia-from-using-boolean-values-as-singleton-types/78898)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 15\
**Last updated:** [April 11, 2022, 4:41pm UTC](https://discourse.julialang.org/t/what-s-stopping-julia-from-using-boolean-values-as-singleton-types/78898 "2022-04-11T16:41:29Z")

</div>

To keep type stability for functions with conditional arguments, folks often write branches like… if arg == Val{true} return A else return B end What would be the downside of making a special case for boolean v…

---

## [What does \`$(Expr(:static\_parameter, 1))\` do?](https://discourse.julialang.org/t/what-does-expr-static-parameter-1-do/79302)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 8\
**Last updated:** [April 10, 2022, 10:19pm UTC](https://discourse.julialang.org/t/what-does-expr-static-parameter-1-do/79302 "2022-04-10T22:19:27Z")

</div>

After I ran across this here, @dfdx pointed me to @Oscar\_Smith 's suggestion of better documentation for this here. But I still have no idea what this does, or how to handle it when working with ASTs. Can someone give so…

---

## [Optional positional arguments must occur at end](https://discourse.julialang.org/t/optional-positional-arguments-must-occur-at-end/79051)

<div class="topic-metadata">

**Author:** [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)\
**Replies:** 12\
**Last updated:** [April 6, 2022, 9:46pm UTC](https://discourse.julialang.org/t/optional-positional-arguments-must-occur-at-end/79051 "2022-04-06T21:46:52Z")

</div>

It seems to me that wanting optional arguments not at end needs unnecessary contortions in Julia. Here is a typical example: julia\> test(io::IO=stdout,x)=print(io,x) ERROR: syntax: optional positional arguments must oc…

---

## [Inconsistency between zero(x) and zero(T::Type) for matrices](https://discourse.julialang.org/t/inconsistency-between-zero-x-and-zero-t-type-for-matrices/79117)

<div class="topic-metadata">

**Author:** [@Tbl](https://discourse.julialang.org/u/Tbl)\
**Replies:** 6\
**Last updated:** [April 6, 2022, 8:58pm UTC](https://discourse.julialang.org/t/inconsistency-between-zero-x-and-zero-t-type-for-matrices/79117 "2022-04-06T20:58:57Z")

</div>

I was experimenting with function sum and found out that it does not work for empty collections of matrices, Julia 1.7.2. The reason is there is no method zero(::Type{Array{T,N}}), thus you must specify init manually. Ho…

---

## [Why are there type-unstable matrix operations in \`Base\`?](https://discourse.julialang.org/t/why-are-there-type-unstable-matrix-operations-in-base/78999)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 6\
**Last updated:** [April 5, 2022, 12:06pm UTC](https://discourse.julialang.org/t/why-are-there-type-unstable-matrix-operations-in-base/78999 "2022-04-05T12:06:56Z")

</div>

In other domains, type stability is given more priority than generalizability, e.g. for sqrt with numbers. But not for matrices: julia\> code\_warntype(sqrt, (Float64,)) # this is type-stable MethodInstance for sqrt(::Flo…

---

## [How is the behaviour of using changed in the REPL?](https://discourse.julialang.org/t/how-is-the-behaviour-of-using-changed-in-the-repl/79009)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 0\
**Last updated:** [April 4, 2022, 3:32pm UTC](https://discourse.julialang.org/t/how-is-the-behaviour-of-using-changed-in-the-repl/79009 "2022-04-04T15:32:44Z")

</div>

In the REPL using can trigger Pkg.add. Is it possible to use this also in non-REPL sessions?

---

## [Julia code browsing via Sourcetrail](https://discourse.julialang.org/t/julia-code-browsing-via-sourcetrail/58260)

<div class="topic-metadata">

**Author:** [@Willem](https://discourse.julialang.org/u/Willem)\
**Replies:** 1\
**Last updated:** [March 31, 2022, 4:05pm UTC](https://discourse.julialang.org/t/julia-code-browsing-via-sourcetrail/58260 "2022-03-31T16:05:55Z")

</div>

Sourcetrail is a fantastic source code browser for C and C++. Among others, it can make great call trees and it’s very fast. I want to use it to browse Julia code… but I have little experience with Julia, I am coming fro…

---

## [PATH variable ignored when finding nsys executable (Windows 11)](https://discourse.julialang.org/t/path-variable-ignored-when-finding-nsys-executable-windows-11/78714)

<div class="topic-metadata">

**Author:** [@adam246](https://discourse.julialang.org/u/adam246)\
**Replies:** 2\
**Last updated:** [March 31, 2022, 3:35pm UTC](https://discourse.julialang.org/t/path-variable-ignored-when-finding-nsys-executable-windows-11/78714 "2022-03-31T15:35:06Z")

</div>

Running Julia 1.7.2 under Nsight Systems 2022.2.1 on Windows 11. When the CUDA.@profile macro is called, the nsys executable is not found, even though it’s on the PATH. Instead, the JULIA\_CUDA\_NSYS variable has to be exp…

---

## [How to support passing temporary buffers around](https://discourse.julialang.org/t/how-to-support-passing-temporary-buffers-around/70880)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 23\
**Last updated:** [March 31, 2022, 2:47pm UTC](https://discourse.julialang.org/t/how-to-support-passing-temporary-buffers-around/70880 "2022-03-31T14:47:36Z")

</div>

Right now if a user wants to re-use a pre-allocated buffer for sorting multiple data-sets of similar size and type, they must dig into sorting internals (e.g. calling Sort.sort!(v, alg, ord), which bypasses the automati…

---

## [Inconsistencies in Julia syntax and semantics](https://discourse.julialang.org/t/inconsistencies-in-julia-syntax-and-semantics/78577)

<div class="topic-metadata">

**Author:** [@nharr](https://discourse.julialang.org/u/nharr)\
**Replies:** 7\
**Last updated:** [March 29, 2022, 9:12am UTC](https://discourse.julialang.org/t/inconsistencies-in-julia-syntax-and-semantics/78577 "2022-03-29T09:12:19Z")

</div>

I’m not sure where is right for an average user to put their thoughts, but I’ll give it a try here. I’m interested in some inconsistencies (as I see them) in Julia that I can only guess arose from its developmental root…

---

## [What if the \`if\` filter from generator statements worked in for loops too?](https://discourse.julialang.org/t/what-if-the-if-filter-from-generator-statements-worked-in-for-loops-too/78581)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 4\
**Last updated:** [March 28, 2022, 6:42am UTC](https://discourse.julialang.org/t/what-if-the-if-filter-from-generator-statements-worked-in-for-loops-too/78581 "2022-03-28T06:42:57Z")

</div>

Julia lets you append if to a list comprehension to filter it inline: julia\> \[j for j in rand(1:100, 20) if iseven(j)\] 7-element Vector{Int64}: 12 82 64 58 84 76 32 Sometimes you want to do something similar in …

---

## [Optimisations for loops of known size at compile time](https://discourse.julialang.org/t/optimisations-for-loops-of-known-size-at-compile-time/78474)

<div class="topic-metadata">

**Author:** [@Luapulu](https://discourse.julialang.org/u/Luapulu)\
**Replies:** 3\
**Last updated:** [March 25, 2022, 6:05pm UTC](https://discourse.julialang.org/t/optimisations-for-loops-of-known-size-at-compile-time/78474 "2022-03-25T18:05:29Z")

</div>

Say I write a function like function func(n, ::Val{N}) where N s = 0 for i in 1:n for j in 1:N # some kind of logic here, e.g. s += i \* j end end return s end doe…

---

## [Base including notnan, notnothing, ...?](https://discourse.julialang.org/t/base-including-notnan-notnothing/78458)

<div class="topic-metadata">

**Author:** [@markmbaum](https://discourse.julialang.org/u/markmbaum)\
**Replies:** 9\
**Last updated:** [March 25, 2022, 5:24pm UTC](https://discourse.julialang.org/t/base-including-notnan-notnothing/78458 "2022-03-25T17:24:42Z")

</div>

has there been discussion about including a notnan function and its analogs like notnothing in the Base library? I frequently find myself doing things like filter(x -\> !isnan(x), Y) where it would be nice to simply fi…

---

## [Why is there no \`permutedims!(dest,src)\`?](https://discourse.julialang.org/t/why-is-there-no-permutedims-dest-src/78320)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [March 24, 2022, 4:17am UTC](https://discourse.julialang.org/t/why-is-there-no-permutedims-dest-src/78320 "2022-03-24T04:17:29Z")

</div>

There is a permutedims(A::AbstractMatrix), and a permutedims!(dest, src, perm). Seems like there should be a method permutedims!(dest::AbstractMatrix, src::AbstractMatrix), with the default perm being \[2,1\].

---

## [Keyword behaves differently using \`;\` or \`,\`](https://discourse.julialang.org/t/keyword-behaves-differently-using-or/78233)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 13\
**Last updated:** [March 22, 2022, 9:17pm UTC](https://discourse.julialang.org/t/keyword-behaves-differently-using-or/78233 "2022-03-22T21:17:21Z")

</div>

Is this intended? It had @ccoffrin and I quite confused (not the subtle difference between , and ;): julia\> sum(0.0 for i in \[\]; init = 0.0) 0.0 julia\> sum(0.0 for i in \[\], init = 0.0) ERROR: ArgumentError: reducing ov…

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

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