# Internals & Design

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

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

**Page:** 51

---

## [What is the return type for a function which will possibly raise an error?](https://discourse.julialang.org/t/what-is-the-return-type-for-a-function-which-will-possibly-raise-an-error/19966)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 1\
**Last updated:** [January 23, 2019, 9:52am UTC](https://discourse.julialang.org/t/what-is-the-return-type-for-a-function-which-will-possibly-raise-an-error/19966 "2019-01-23T09:52:35Z")

</div>

For example, if I have a function function f(x::Int) if x == 0 throw(DivideError()) return 2.0 / x end What return type should I specify at the end of f(x::Int)? Should I consider Union{DivideError, Flo…

---

## [Plans regarding caching of generated code?](https://discourse.julialang.org/t/plans-regarding-caching-of-generated-code/18379)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 7\
**Last updated:** [January 22, 2019, 9:30pm UTC](https://discourse.julialang.org/t/plans-regarding-caching-of-generated-code/18379 "2019-01-22T21:30:27Z")

</div>

I wonder, are there any concrete medium to long-term plans regarding opportunistic caching of generated binary code (separately per architecture, to support computing environments with mixed CPU generations, AVX versions…

---

## [Minor print bug of nested arrays](https://discourse.julialang.org/t/minor-print-bug-of-nested-arrays/19936)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 0\
**Last updated:** [January 22, 2019, 4:10pm UTC](https://discourse.julialang.org/t/minor-print-bug-of-nested-arrays/19936 "2019-01-22T16:10:21Z")

</div>

I could not find an issue for this, checking here before opening one (the problem is with the last output): julia\> VERSION v"1.2.0-DEV.192" julia\> A = collect(reshape(1:24, 2, 3, 4)) 2×3×4 Array{Int64,3}: \[:, :, 1\] = …

---

## [Bug in Printf?](https://discourse.julialang.org/t/bug-in-printf/19919)

<div class="topic-metadata">

**Author:** [@gcalderone](https://discourse.julialang.org/u/gcalderone)\
**Replies:** 2\
**Last updated:** [January 22, 2019, 9:20am UTC](https://discourse.julialang.org/t/bug-in-printf/19919 "2019-01-22T09:20:22Z")

</div>

Is the following a bug in Printf? julia\> using Printf julia\> @sprintf "%8.3g" 1.99e-5 "1.99e-05" julia\> @sprintf "%8.3g" 1.999e-5 "2e-05" I would expect the resulting string to be 8 characters long in both cases, whi…

---

## [Internal representation of \`using Foo\`](https://discourse.julialang.org/t/internal-representation-of-using-foo/19771)

<div class="topic-metadata">

**Author:** [@hhaensel](https://discourse.julialang.org/u/hhaensel)\
**Replies:** 4\
**Last updated:** [January 21, 2019, 10:36pm UTC](https://discourse.julialang.org/t/internal-representation-of-using-foo/19771 "2019-01-21T22:36:26Z")

</div>

When trying to make Lint.jl working in Juno with Julia 1.0.1, I realised that Lint would stumble across any line with using \[...\]. Digging into the root cause I found that dump(:(using Foo)) has different results in dif…

---

## [Switch from HttpServer.jl to HTTP.jl](https://discourse.julialang.org/t/switch-from-httpserver-jl-to-http-jl/19717)

<div class="topic-metadata">

**Author:** [@NiharikaPatel](https://discourse.julialang.org/u/NiharikaPatel)\
**Replies:** 6\
**Last updated:** [January 17, 2019, 8:05pm UTC](https://discourse.julialang.org/t/switch-from-httpserver-jl-to-http-jl/19717 "2019-01-17T20:05:29Z")

</div>

Hi, I recently upgraded to Julia 7 and one of the HttpServer.jl package is not compatible anymore. Im trying to switch to HTTP.jl instead but I am very new to this concept. This is the how the current code looks: func…

---

## [Pkg.add behaves very strongly for Julia version 0.7](https://discourse.julialang.org/t/pkg-add-behaves-very-strongly-for-julia-version-0-7/19686)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 6\
**Last updated:** [January 16, 2019, 1:39pm UTC](https://discourse.julialang.org/t/pkg-add-behaves-very-strongly-for-julia-version-0-7/19686 "2019-01-16T13:39:21Z")

</div>

I’m using Julia version 0.7. and I’d like to add version 0.1.2 of the package “GDAL” and pin it. The following is the command I used. ‘using Pkg Pkg.add(PackageSpec(name = “GDAL”, version = “0.1.2”)) Pkg.pin(“GDAL”) …

---

## [A for loop where the counter isn't used](https://discourse.julialang.org/t/a-for-loop-where-the-counter-isnt-used/19535)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 8\
**Last updated:** [January 13, 2019, 12:28pm UTC](https://discourse.julialang.org/t/a-for-loop-where-the-counter-isnt-used/19535 "2019-01-13T12:28:45Z")

</div>

I sometimes need to repeat some code n times, but I don’t care what iteration I’m on. In those cases I do this: for \_ in 1:n ... end Is there anything out there better than that? I’m merely curious if I’ve missed …

---

## [TypeScript's type system -- how does it compare to Julia's?](https://discourse.julialang.org/t/typescripts-type-system-how-does-it-compare-to-julias/19565)

<div class="topic-metadata">

**Author:** [@waldyrious](https://discourse.julialang.org/u/waldyrious)\
**Replies:** 0\
**Last updated:** [January 12, 2019, 6:14pm UTC](https://discourse.julialang.org/t/typescripts-type-system-how-does-it-compare-to-julias/19565 "2019-01-12T18:14:23Z")

</div>

I recently watched the video of Anders Hejlsberg’s talk at Microsoft Build 2018, What’s New in TypeScript, and besides finding it quite interesting in its own, I thought it had lots of content that could be relevant to t…

---

## [Why can't we have precompiled \*.ji files for multiple versions of a package?](https://discourse.julialang.org/t/why-cant-we-have-precompiled-ji-files-for-multiple-versions-of-a-package/19533)

<div class="topic-metadata">

**Author:** [@denizyuret](https://discourse.julialang.org/u/denizyuret)\
**Replies:** 1\
**Last updated:** [January 11, 2019, 10:17pm UTC](https://discourse.julialang.org/t/why-cant-we-have-precompiled-ji-files-for-multiple-versions-of-a-package/19533 "2019-01-11T22:17:46Z")

</div>

Under ~/.julia/packages/PkgName I can have multiple versions of the same package co-existing peacefully. Is there any reason why the same thing cannot happen under ~/.julia/compiled/v1.0/PkgName? Currently each time I …

---

## [UniformScaling with SparseMatrixCSC{T,Int32} loses integer type](https://discourse.julialang.org/t/uniformscaling-with-sparsematrixcsc-t-int32-loses-integer-type/19371)

<div class="topic-metadata">

**Author:** [@abelsiqueira](https://discourse.julialang.org/u/abelsiqueira)\
**Replies:** 7\
**Last updated:** [January 10, 2019, 5:14pm UTC](https://discourse.julialang.org/t/uniformscaling-with-sparsematrixcsc-t-int32-loses-integer-type/19371 "2019-01-10T17:14:58Z")

</div>

Is this a bug? A = sparse(Int32\[\], Int32\[\], Float64\[\], 2, 2) A + I # Loses Int32 A is of type SparseMatrixCSC{Float64,Int32} and A + I is of type SparseMatrixCSC{Float64,Int64}, losing the integer type. Thanks

---

## [\`ccall\` macros for controlling SIGINT handling](https://discourse.julialang.org/t/ccall-macros-for-controlling-sigint-handling/19431)

<div class="topic-metadata">

**Author:** [@ninjaaron](https://discourse.julialang.org/u/ninjaaron)\
**Replies:** 17\
**Last updated:** [January 10, 2019, 3:04am UTC](https://discourse.julialang.org/t/ccall-macros-for-controlling-sigint-handling/19431 "2019-01-10T03:04:49Z")

</div>

If you are wrapping ccall, another thing you can do is to wrap it with disable\_sigint C Interface · The Julia Language so that you don’t have to worry when calling the C functions that may not be interrupt safe.

---

## [recent broadcast changes (iterate by default), scalar struct, and \`@.\`](https://discourse.julialang.org/t/recent-broadcast-changes-iterate-by-default-scalar-struct-and/11178)

<div class="topic-metadata">

**Author:** [@ederag](https://discourse.julialang.org/u/ederag)\
**Replies:** 68\
**Last updated:** [January 9, 2019, 7:18pm UTC](https://discourse.julialang.org/t/recent-broadcast-changes-iterate-by-default-scalar-struct-and/11178 "2019-01-09T19:18:37Z")

</div>

The current broadcasting behavior is non-intuitive when used with @. Julia Version 0.7.0-DEV.5222, Commit 7144b6b816 (2018-05-25 20:23 UTC) This is a minimal example, stripped down from a real use case. struct Materi…

---

## [Cbc solver in Julia 1.0.2.1](https://discourse.julialang.org/t/cbc-solver-in-julia-1-0-2-1/19406)

<div class="topic-metadata">

**Author:** [@heliofuchigami](https://discourse.julialang.org/u/heliofuchigami)\
**Replies:** 0\
**Last updated:** [January 9, 2019, 12:06am UTC](https://discourse.julialang.org/t/cbc-solver-in-julia-1-0-2-1/19406 "2019-01-09T00:06:17Z")

</div>

Hi all, Is Cbc solver not working in Julia 1.0.2.1?

---

## [Discussion: an operator for mul!](https://discourse.julialang.org/t/discussion-an-operator-for-mul/19350)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 16\
**Last updated:** [January 8, 2019, 3:36pm UTC](https://discourse.julialang.org/t/discussion-an-operator-for-mul/19350 "2019-01-08T15:36:46Z")

</div>

Hi guys! After my last post related to optimization (Help to reduce number of allocations - #23 by baggepinnen) I realized how much I can gain if I use mul! to avoid allocation on every loop iteration. However, the code…

---

## [Install script for Linux (for use in container)](https://discourse.julialang.org/t/install-script-for-linux-for-use-in-container/19301)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 6\
**Last updated:** [January 7, 2019, 5:27pm UTC](https://discourse.julialang.org/t/install-script-for-linux-for-use-in-container/19301 "2019-01-07T17:27:26Z")

</div>

Is there a reasonably maintained shell script for Linux that downloads and extracts a specified Julia version? Something like this script for Appveyor, but using bash or sh in a Linux setup. I am aware of the Travis buil…

---

## [Unreachable Reached with Dict, NTuple, Union](https://discourse.julialang.org/t/unreachable-reached-with-dict-ntuple-union/19328)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 2\
**Last updated:** [January 6, 2019, 8:06pm UTC](https://discourse.julialang.org/t/unreachable-reached-with-dict-ntuple-union/19328 "2019-01-06T20:06:46Z")

</div>

Dear makers of julia, I reached the unreachable and tried to simplify it to share it with you. It is still a bit messy however at least it fits into here by now. The code below reaches the unreachable, however when unc…

---

## [Any plans to distribute Julia through the W10 store?](https://discourse.julialang.org/t/any-plans-to-distribute-julia-through-the-w10-store/19276)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 2\
**Last updated:** [January 4, 2019, 7:26pm UTC](https://discourse.julialang.org/t/any-plans-to-distribute-julia-through-the-w10-store/19276 "2019-01-04T19:26:02Z")

</div>

Even though the Microsoft store on W10 is not as popular as other platforms, I don’t think it’s too difficult a job to distributed Julia through the Microsoft store. Recently Python 3.7 was put in the store. I am not su…

---

## [Compliation problems: libosxunwind binds deprecated libstdc++](https://discourse.julialang.org/t/compliation-problems-libosxunwind-binds-deprecated-libstdc/16910)

<div class="topic-metadata">

**Author:** [@jballanc](https://discourse.julialang.org/u/jballanc)\
**Replies:** 1\
**Last updated:** [January 4, 2019, 3:46pm UTC](https://discourse.julialang.org/t/compliation-problems-libosxunwind-binds-deprecated-libstdc/16910 "2019-01-04T15:46:01Z")

</div>

Just wanted to post here quickly before opening a GitHub issue, since I’m not sure if there is just some cleaning/resetting step that I’m forgetting… Trying to build the v1.0.1 tag on macOS 10.14 (Mojave), I keep runnin…

---

## [Julia install crashes under MacPorts ("PCRE JIT error: no more memory")](https://discourse.julialang.org/t/julia-install-crashes-under-macports-pcre-jit-error-no-more-memory/19273)

<div class="topic-metadata">

**Author:** [@Dave66](https://discourse.julialang.org/u/Dave66)\
**Replies:** 2\
**Last updated:** [January 4, 2019, 3:14pm UTC](https://discourse.julialang.org/t/julia-install-crashes-under-macports-pcre-jit-error-no-more-memory/19273 "2019-01-04T15:14:34Z")

</div>

Hi, Julia is not installing under MacPorts. There’s an open ticket there for some time, #57452 (julia @0.6.2\_3: destroot stage of install fails "no more memory") – MacPorts but there is no progress. I am really inter…

---

## [What are all the components that make Julia?](https://discourse.julialang.org/t/what-are-all-the-components-that-make-julia/19252)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 2\
**Last updated:** [January 3, 2019, 10:12pm UTC](https://discourse.julialang.org/t/what-are-all-the-components-that-make-julia/19252 "2019-01-03T22:12:30Z")

</div>

What are all the components that make Julia from the bottom? What I mean to ask is at the bottom what compilers (and their versions), shared system libraries, LLVM, OpenBLAS (MKL?), Arpack, Base, Stdlib, and so on that J…

---

## [Core.Compiler.Const and parametric types](https://discourse.julialang.org/t/core-compiler-const-and-parametric-types/19222)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 1\
**Last updated:** [January 3, 2019, 9:02am UTC](https://discourse.julialang.org/t/core-compiler-const-and-parametric-types/19222 "2019-01-03T09:02:48Z")

</div>

Consider struct data{M} b::Int end get(::data{M}) where M = M f(x::data) = x.b + get(x) g(x::data{M}) where M = x.b + M x = data{7}(8) Then julia\> @code\_warntype get(x) Body::Int64 1 1 ─ return $(Expr(:static\_…

---

## [1.1 branch date approaching: Dec. 6](https://discourse.julialang.org/t/1-1-branch-date-approaching-dec-6/18233)

<div class="topic-metadata">

**Author:** [@jeff.bezanson](https://discourse.julialang.org/u/jeff.bezanson)\
**Replies:** 8\
**Last updated:** [January 1, 2019, 7:54pm UTC](https://discourse.julialang.org/t/1-1-branch-date-approaching-dec-6/18233 "2019-01-01T19:54:02Z")

</div>

Hello all, we’re aiming to branch for the 1.1 release on Dec. 6. That coincides with the next scheduled triage call, so we can prioritize release blockers right away. This is in accordance with the process described in P…

---

## [Dead code in base/broadcast.jl](https://discourse.julialang.org/t/dead-code-in-base-broadcast-jl/18977)

<div class="topic-metadata">

**Author:** [@cnliao](https://discourse.julialang.org/u/cnliao)\
**Replies:** 6\
**Last updated:** [January 1, 2019, 3:28pm UTC](https://discourse.julialang.org/t/dead-code-in-base-broadcast-jl/18977 "2019-01-01T15:28:29Z")

</div>

If I read correctly some code in base/broadcast.jl is never executed now. To be specific: # Indices utilities @inline combine\_axes(A, B...) = broadcast\_shape(axes(A), combine\_axes(B...)) combine\_axes(A) = axes(A) broa…

---

## [Argument types not inferred when constrained in function signature](https://discourse.julialang.org/t/argument-types-not-inferred-when-constrained-in-function-signature/19020)

<div class="topic-metadata">

**Author:** [@cnliao](https://discourse.julialang.org/u/cnliao)\
**Replies:** 5\
**Last updated:** [December 28, 2018, 4:02pm UTC](https://discourse.julialang.org/t/argument-types-not-inferred-when-constrained-in-function-signature/19020 "2018-12-28T16:02:40Z")

</div>

It is a curious case when I tried to see how julia handles type constraints: julia\> f(a::A, b::B) where{B\<:Tuple{C}} where {A,C\<:A} = (A, B, C) f (generic function with 1 method) julia\> @code\_warntype f(1, (2,)) Body::…

---

## [Performant conversion of Symmetric(SparseMatrixCSC) to SparseMatrixCSC](https://discourse.julialang.org/t/performant-conversion-of-symmetric-sparsematrixcsc-to-sparsematrixcsc/18865)

<div class="topic-metadata">

**Author:** [@klacru](https://discourse.julialang.org/u/klacru)\
**Replies:** 2\
**Last updated:** [December 27, 2018, 6:51pm UTC](https://discourse.julialang.org/t/performant-conversion-of-symmetric-sparsematrixcsc-to-sparsematrixcsc/18865 "2018-12-27T18:51:00Z")

</div>

I would like to bring the following improvements to stdlib/SparseArrays. julia\> n = 10000 julia\> Random.seed!(0); A = sprandn(n, n, 0.01); b = randn(n); nnz(A) 1000598 julia\> SA = Symmetric(A); julia\> @btime B = Spars…

---

## [Reason behind designing parametric types as invariant](https://discourse.julialang.org/t/reason-behind-designing-parametric-types-as-invariant/18971)

<div class="topic-metadata">

**Author:** [@Azamat](https://discourse.julialang.org/u/Azamat)\
**Replies:** 11\
**Last updated:** [December 27, 2018, 8:33am UTC](https://discourse.julialang.org/t/reason-behind-designing-parametric-types-as-invariant/18971 "2018-12-27T08:33:53Z")

</div>

I was looking into Rust where types (mostly) have variance yet that does not seem to prevent Rust’s compiler from generating efficient machine code. So my question is what is the reason behind designing parametric types…

---

## [How to check the inferred type of a specific variable in a function?](https://discourse.julialang.org/t/how-to-check-the-inferred-type-of-a-specific-variable-in-a-function/18962)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 9\
**Last updated:** [December 25, 2018, 11:59am UTC](https://discourse.julialang.org/t/how-to-check-the-inferred-type-of-a-specific-variable-in-a-function/18962 "2018-12-25T11:59:53Z")

</div>

Hi, I am having this problem which I can solve best if I could find out the inferred type of certain variables in a function. Basically, I am looking for a generalized Core.Compiler.return\_type for arbitrary variables, …

---

## [Fully Interpreted Julia](https://discourse.julialang.org/t/fully-interpreted-julia/18935)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 7\
**Last updated:** [December 24, 2018, 9:35pm UTC](https://discourse.julialang.org/t/fully-interpreted-julia/18935 "2018-12-24T21:35:33Z")

</div>

A dummy question from a rainy sunday morning… I use Julia for two different kinds of work: Heavy Computations (as a replacement for C++/Fortran…) Light Computations (as a replacement for Python/Matlab…) That is great…

---

## [How to compile Julia to WASM](https://discourse.julialang.org/t/how-to-compile-julia-to-wasm/18857)

<div class="topic-metadata">

**Author:** [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Replies:** 5\
**Last updated:** [December 21, 2018, 11:43am UTC](https://discourse.julialang.org/t/how-to-compile-julia-to-wasm/18857 "2018-12-21T11:43:41Z")

</div>

Hi everyone, I wrote an article about the different ways julia can run in the browser, together with a reproducible tutorial about how to compile Julia to Wasm: Most of the work has been done by @Keno. Hopefully this …

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

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