# Internals & Design

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

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

**Page:** 60

---

## [Julia : Cosine Similarity algorithm implementation](https://discourse.julialang.org/t/julia-cosine-similarity-algorithm-implementation/11441)

<div class="topic-metadata">

**Author:** [@vishwanath](https://discourse.julialang.org/u/vishwanath)\
**Replies:** 3\
**Last updated:** [June 5, 2018, 1:32pm UTC](https://discourse.julialang.org/t/julia-cosine-similarity-algorithm-implementation/11441 "2018-06-05T13:32:32Z")

</div>

As a beginner, i am trying to implement cosine similarity algorithm in julia. Below is a piece of code which i got from one of the resource. I just want to know the flow of the code. # Cosine dist a: \[2, 0, 1, 1…

---

## [Bug in doc system? And question on "pure" \[in docs\]; meaning Julia 1.0 is close?](https://discourse.julialang.org/t/bug-in-doc-system-and-question-on-pure-in-docs-meaning-julia-1-0-is-close/11292)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 12\
**Last updated:** [June 5, 2018, 6:41am UTC](https://discourse.julialang.org/t/bug-in-doc-system-and-question-on-pure-in-docs-meaning-julia-1-0-is-close/11292 "2018-06-05T06:41:56Z")

</div>

On ‘’’ @pure constructor.\* ‘’’ in NEWS.md and biggest PR ever in Julia: https://github.com/JuliaLang/julia/commit/dbe1ae0a7e5a53a3afc92c5edb5876c522506258#diff-8312ad0561ef661716b48d09478362f3 Congratulation! Wasn…

---

## [Test v0.7 on Travis CI (Pkg3)](https://discourse.julialang.org/t/test-v0-7-on-travis-ci-pkg3/11421)

<div class="topic-metadata">

**Author:** [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Replies:** 0\
**Last updated:** [June 4, 2018, 6:05pm UTC](https://discourse.julialang.org/t/test-v0-7-on-travis-ci-pkg3/11421 "2018-06-04T18:05:07Z")

</div>

I am trying to make Yao.jl work on v0.7’s CI with the new Pkg3. But I got this error: ERROR: Cannot add package with the same name or uuid as the project It seems that CI will use develop inside a package directory (I …

---

## [Reserving names in Base](https://discourse.julialang.org/t/reserving-names-in-base/11390)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 26\
**Last updated:** [June 4, 2018, 5:13pm UTC](https://discourse.julialang.org/t/reserving-names-in-base/11390 "2018-06-04T17:13:07Z")

</div>

In view of recent discussions on inner products https://github.com/JuliaLang/julia/issues/25565 and the move of basic stats functions https://github.com/JuliaLang/julia/pull/27375, I wanted to ask: One of the big reason…

---

## [Strftime & strptime bug #27239 is present on all platforms, not just Windows](https://discourse.julialang.org/t/strftime-strptime-bug-27239-is-present-on-all-platforms-not-just-windows/11191)

<div class="topic-metadata">

**Author:** [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Replies:** 12\
**Last updated:** [June 3, 2018, 9:56am UTC](https://discourse.julialang.org/t/strftime-strptime-bug-27239-is-present-on-all-platforms-not-just-windows/11191 "2018-06-03T09:56:55Z")

</div>

The bug which #27273 fixes (for Windows) is really very old, it goes back to a Jan. 11, 2012 (over a year before Julia v0.1 was released!) commit by @jeff.bezanson to j/libc.j (over a year before Julia v0.1 was released…

---

## ["Meaning", type-piracy, and method merging](https://discourse.julialang.org/t/meaning-type-piracy-and-method-merging/11003)

<div class="topic-metadata">

**Author:** [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Replies:** 67\
**Last updated:** [June 3, 2018, 5:58am UTC](https://discourse.julialang.org/t/meaning-type-piracy-and-method-merging/11003 "2018-06-03T05:58:37Z")

</div>

The meaning of “meaning” A common theme that comes up when discussing type-piracy/method merging, etc. is that there “can only be one meaning” for a given function without namespace qualifications (I am being careful th…

---

## [Status of femtocleaner](https://discourse.julialang.org/t/status-of-femtocleaner/11371)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [June 2, 2018, 6:08pm UTC](https://discourse.julialang.org/t/status-of-femtocleaner/11371 "2018-06-02T18:08:47Z")

</div>

Hi, Any idea when femtocleaner.jl is ready for cleaning warnings on 0.7alpha? Thanks for the good work! Uwe

---

## [Compiler Performance](https://discourse.julialang.org/t/compiler-performance/11307)

<div class="topic-metadata">

**Author:** [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Replies:** 20\
**Last updated:** [June 2, 2018, 5:05pm UTC](https://discourse.julialang.org/t/compiler-performance/11307 "2018-06-02T17:05:56Z")

</div>

Don’t know if this is the correct category but maybe: Since Julia 0.6 has been released I have seen major performance issues with Julia. After analyzing the issue a little bit I found out that it seems the compile perfo…

---

## [Promote\_op and preallocating result of linear operators](https://discourse.julialang.org/t/promote-op-and-preallocating-result-of-linear-operators/11332)

<div class="topic-metadata">

**Author:** [@lostella](https://discourse.julialang.org/u/lostella)\
**Replies:** 5\
**Last updated:** [June 2, 2018, 12:15pm UTC](https://discourse.julialang.org/t/promote-op-and-preallocating-result-of-linear-operators/11332 "2018-06-02T12:15:08Z")

</div>

Hi fellow Julians, I would like to correctly pre-allocate the space for storing the result of some custom linear operators. In particular, the eltype of the resulting collection should depend on the type of the coeffici…

---

## [Build of master fails in new openSUSE Leap 15: llvm undefined references](https://discourse.julialang.org/t/build-of-master-fails-in-new-opensuse-leap-15-llvm-undefined-references/11163)

<div class="topic-metadata">

**Author:** [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Replies:** 7\
**Last updated:** [June 1, 2018, 11:13pm UTC](https://discourse.julialang.org/t/build-of-master-fails-in-new-opensuse-leap-15-llvm-undefined-references/11163 "2018-06-01T23:13:29Z")

</div>

Yesterday openSUSE released Leap 15.0, upgrade from Leap 42.3. I upgraded and tried to build Julia from master, but process fails with a number of undefined references in llvm. The message “use make cleanall” was suggest…

---

## [Using Spanish question mark \`¿\` for \`missing\` short syntax?](https://discourse.julialang.org/t/using-spanish-question-mark-for-missing-short-syntax/11299)

<div class="topic-metadata">

**Author:** [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Replies:** 7\
**Last updated:** [June 1, 2018, 1:30am UTC](https://discourse.julialang.org/t/using-spanish-question-mark-for-missing-short-syntax/11299 "2018-06-01T01:30:36Z")

</div>

I saw the debate on GitHub over ?? T? ?= etc. being used for nothing, and I thought, maybe a Spanish upsidedown question mark could be used? It’s generally easy to type (a single keystroke on the Mac, even without a Sp…

---

## [Let with kwargs?](https://discourse.julialang.org/t/let-with-kwargs/11280)

<div class="topic-metadata">

**Author:** [@QuantumFractal](https://discourse.julialang.org/u/QuantumFractal)\
**Replies:** 1\
**Last updated:** [May 31, 2018, 6:52am UTC](https://discourse.julialang.org/t/let-with-kwargs/11280 "2018-05-31T06:52:44Z")

</div>

Hi there, I was going through the docs and had a quick question regarding let keyword. Typical usage: let a=1, b=2 println("a: $a, b: $b") end Which parses to: (let println("a: $a, b: $b") (= a 1) (= b 2)) My ques…

---

## [Sorting strings by Unicode Collation order?](https://discourse.julialang.org/t/sorting-strings-by-unicode-collation-order/11195)

<div class="topic-metadata">

**Author:** [@digital\_carver](https://discourse.julialang.org/u/digital_carver)\
**Replies:** 3\
**Last updated:** [May 30, 2018, 5:20pm UTC](https://discourse.julialang.org/t/sorting-strings-by-unicode-collation-order/11195 "2018-05-30T17:20:06Z")

</div>

Is there a way to sort strings by the Unicode specified Collation order in Julia? Currently, a plain sort seems to sort just by codepoint order, for eg. julia\> current\_order = sort(\["மனம்", "மயம்", "மகம்", "மறம்", "மலம…

---

## [CI tools for testing packages on ARM and POWER platforms](https://discourse.julialang.org/t/ci-tools-for-testing-packages-on-arm-and-power-platforms/11267)

<div class="topic-metadata">

**Author:** [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Replies:** 0\
**Last updated:** [May 30, 2018, 5:01pm UTC](https://discourse.julialang.org/t/ci-tools-for-testing-packages-on-arm-and-power-platforms/11267 "2018-05-30T17:01:45Z")

</div>

Are there any CI tools, like Travis or Appveyor, for testing on 32-bit and 64-bit ARM platforms and on the POWER platform that I’ve heard that Julia supports? I’ve been trying to make sure that the JuliaString packages …

---

## [documentation of \`return nothing\` in Manual/Functions?](https://discourse.julialang.org/t/documentation-of-return-nothing-in-manual-functions/10684)

<div class="topic-metadata">

**Author:** [@pierre-haessig](https://discourse.julialang.org/u/pierre-haessig)\
**Replies:** 13\
**Last updated:** [May 30, 2018, 4:20pm UTC](https://discourse.julialang.org/t/documentation-of-return-nothing-in-manual-functions/10684 "2018-05-30T16:20:41Z")

</div>

Looking at the Julia 0.6 manual in the FAQ section How does “null” or “nothingness” work in Julia?, I understand that a function returning nothing should use return nothing. However, in the The return Keyword section of…

---

## [Editing a package in stdlib](https://discourse.julialang.org/t/editing-a-package-in-stdlib/10199)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 5\
**Last updated:** [May 30, 2018, 1:56pm UTC](https://discourse.julialang.org/t/editing-a-package-in-stdlib/10199 "2018-05-30T13:56:55Z")

</div>

I am editing a package in julia (0.7 dev) stdlib and after every edit I have to run make from the julia base dir and it always takes an awful lot of time to finish, is there an easier way? Also Pkg.test(“SHA”) does not …

---

## [Making method errors more helpful by indicating the defining module](https://discourse.julialang.org/t/making-method-errors-more-helpful-by-indicating-the-defining-module/10935)

<div class="topic-metadata">

**Author:** [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Replies:** 2\
**Last updated:** [May 29, 2018, 10:01pm UTC](https://discourse.julialang.org/t/making-method-errors-more-helpful-by-indicating-the-defining-module/10935 "2018-05-29T22:01:49Z")

</div>

Currently, MethodErrors for missing methods do not print any information about the module to which the underlying function belongs. For example: julia\> module Bar f(x::Int) = 10 end Bar julia\> using .Ba…

---

## [How does coverage testing work on github?](https://discourse.julialang.org/t/how-does-coverage-testing-work-on-github/11210)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 2\
**Last updated:** [May 29, 2018, 2:37pm UTC](https://discourse.julialang.org/t/how-does-coverage-testing-work-on-github/11210 "2018-05-29T14:37:30Z")

</div>

A pull-request I posted on Github is showing unexpectedly low code coverage from the CI tool, and I’d like to check it locally. Could someone explain how Github’s coverage tool works? Is it based on Coverage.jl? Does …

---

## [dependencies picking up strange CFLAGS](https://discourse.julialang.org/t/dependencies-picking-up-strange-cflags/11185)

<div class="topic-metadata">

**Author:** [@schnaitterm](https://discourse.julialang.org/u/schnaitterm)\
**Replies:** 0\
**Last updated:** [May 27, 2018, 6:02pm UTC](https://discourse.julialang.org/t/dependencies-picking-up-strange-cflags/11185 "2018-05-27T18:02:44Z")

</div>

I’m not sure if this happens on other platforms as well, but I am noticing that dependencies like GMP are picking up strange flags like “-march=k8 -mtune=k8” on macOS, even when MARCH is set to ‘native’ (it actually puts…

---

## [Two Feature Requests for \`merge\`](https://discourse.julialang.org/t/two-feature-requests-for-merge/11137)

<div class="topic-metadata">

**Author:** [@nickeubank](https://discourse.julialang.org/u/nickeubank)\
**Replies:** 10\
**Last updated:** [May 25, 2018, 10:02pm UTC](https://discourse.julialang.org/t/two-feature-requests-for-merge/11137 "2018-05-25T22:02:19Z")

</div>

I’d like to propose two added functions to the merge function. I’m not sure if this needs to be in core language or somewhere like in DataFrames, but as long as merge is in core, seems reasonable to put here (though inpu…

---

## [A Pirate's Life For Me](https://discourse.julialang.org/t/a-pirates-life-for-me/11135)

<div class="topic-metadata">

**Author:** [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Replies:** 4\
**Last updated:** [May 25, 2018, 8:37am UTC](https://discourse.julialang.org/t/a-pirates-life-for-me/11135 "2018-05-25T08:37:10Z")

</div>

There are several problems with the Regex support in Base. It uses an old version of PCRE2 (10.30, from 8/14/2017 instead of the released version 10.31 from 2/12/2018) It only has the 8-bit PCRE2 library It is pretty m…

---

## [For package authors: how to test IteratorSize and IteratorEltype?](https://discourse.julialang.org/t/for-package-authors-how-to-test-iteratorsize-and-iteratoreltype/11071)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 1\
**Last updated:** [May 22, 2018, 3:56pm UTC](https://discourse.julialang.org/t/for-package-authors-how-to-test-iteratorsize-and-iteratoreltype/11071 "2018-05-22T15:56:05Z")

</div>

The new iteration protocol involves the functions Base.IteratorSize and Base.IteratorEltype. Is there a recommended methodology for writing tests for these functions? In particular, how are their effects observable in …

---

## [New iteration protocol- could be even simpler?](https://discourse.julialang.org/t/new-iteration-protocol-could-be-even-simpler/11045)

<div class="topic-metadata">

**Author:** [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Replies:** 3\
**Last updated:** [May 21, 2018, 8:23pm UTC](https://discourse.julialang.org/t/new-iteration-protocol-could-be-even-simpler/11045 "2018-05-21T20:23:52Z")

</div>

I’m implementing the new iteration protocol for some library code, and, first, I have to say that I like it. It seems to make my code clearer and shorter. But I’m wondering whether further simplification is possible. F…

---

## [Syntactic sugar: (x==2) and y=12 ; or even (x == 2) && y=12](https://discourse.julialang.org/t/syntactic-sugar-x-2-and-y-12-or-even-x-2-y-12/10969)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 8\
**Last updated:** [May 21, 2018, 4:53pm UTC](https://discourse.julialang.org/t/syntactic-sugar-x-2-and-y-12-or-even-x-2-y-12/10969 "2018-05-21T16:53:36Z")

</div>

can you tell that I used perl a lot :wink: . could julia\> (x == 2) && y=12 clash with anything? julia does not have the less binding “and” and “or” keywords afaik. I would love them, too. I think the user meaning …

---

## [Bug with new iteration code in parse](https://discourse.julialang.org/t/bug-with-new-iteration-code-in-parse/11034)

<div class="topic-metadata">

**Author:** [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Replies:** 0\
**Last updated:** [May 21, 2018, 3:34am UTC](https://discourse.julialang.org/t/bug-with-new-iteration-code-in-parse/11034 "2018-05-21T03:34:06Z")

</div>

parse is currently broken when trying do use an AbstractString whose eltype is not Char, but some other type of AbstractChar. The issue is that the code has a type assertion ::Tuple{Char,Int} on the calls to iterate, in…

---

## [Difficulties with promoting numbers](https://discourse.julialang.org/t/difficulties-with-promoting-numbers/11009)

<div class="topic-metadata">

**Author:** [@jandehaan](https://discourse.julialang.org/u/jandehaan)\
**Replies:** 19\
**Last updated:** [May 20, 2018, 4:12pm UTC](https://discourse.julialang.org/t/difficulties-with-promoting-numbers/11009 "2018-05-20T16:12:29Z")

</div>

Here is an example of two independent packages colliding when they overload the same method. Package MyPackage Module MyPackage struct MyNumber \<: Number value end Base.promote\_rule(::Type{MyNumber}…

---

## [Proposal: Allow variable assignments inside loop headers](https://discourse.julialang.org/t/proposal-allow-variable-assignments-inside-loop-headers/11005)

<div class="topic-metadata">

**Author:** [@Robert\_Honig](https://discourse.julialang.org/u/Robert_Honig)\
**Replies:** 2\
**Last updated:** [May 19, 2018, 10:46am UTC](https://discourse.julialang.org/t/proposal-allow-variable-assignments-inside-loop-headers/11005 "2018-05-19T10:46:19Z")

</div>

Occasionally, I want to write loops like the following: foo = 2 while foo^=2 \< 32 println(foo) end In julia 0.6.2, this throws the following error: syntax: invalid identifier name "^=" Assignments return the assi…

---

## [Julep: Taking multiple dispatch,export,import,binary compilation seriously](https://discourse.julialang.org/t/julep-taking-multiple-dispatch-export-import-binary-compilation-seriously/10882)

<div class="topic-metadata">

**Author:** [@TsurHerman](https://discourse.julialang.org/u/TsurHerman)\
**Replies:** 120\
**Last updated:** [May 18, 2018, 6:56pm UTC](https://discourse.julialang.org/t/julep-taking-multiple-dispatch-export-import-binary-compilation-seriously/10882 "2018-05-18T18:56:14Z")

</div>

I want to formalize a julep for a design idea, I am asking the help of the community , please read and criticise freely. The problems it is addressing: Type piracy: It is too easy to break code in module M, even with…

---

## [Strange issue with \`Pipe\` read in \`Test\` environment](https://discourse.julialang.org/t/strange-issue-with-pipe-read-in-test-environment/10939)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 2\
**Last updated:** [May 18, 2018, 6:47pm UTC](https://discourse.julialang.org/t/strange-issue-with-pipe-read-in-test-environment/10939 "2018-05-18T18:47:33Z")

</div>

Hi folks, I seem to have run into a very strange issue with the Test environment. Background The specifics of this example are irrelevant, but consider the matrix 3×3 Array{Any,2}: :(gam \* σ + 1) :(-gam \* σ) 0 …

---

## [Functional inverse](https://discourse.julialang.org/t/functional-inverse/10959)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 16\
**Last updated:** [May 18, 2018, 2:47pm UTC](https://discourse.julialang.org/t/functional-inverse/10959 "2018-05-18T14:47:08Z")

</div>

An idea: A function finv that returns the functional inverse of a function. For instance finv(::typeof(cos)) = acos I thought of this not for cos, but for a particular function whose inverse does not have a recognized …

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

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