# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1485

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

**Page:** 1486

---

## [How to ensure no arguments are unintentionally mutated when testing a function in Julia](https://discourse.julialang.org/t/how-to-ensure-no-arguments-are-unintentionally-mutated-when-testing-a-function-in-julia/55611)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 19, 2021, 5:09pm UTC](https://discourse.julialang.org/t/how-to-ensure-no-arguments-are-unintentionally-mutated-when-testing-a-function-in-julia/55611 "2021-02-19T17:09:38Z")

</div>

When testing Julia functions I sometimes want to check that none of the arguments are unintentionally mutated. It’s a bit labour intensive at the moment: I write code to backup the arguments via copy, call the function, …

---

## [Spdiag Matlab function in Julia](https://discourse.julialang.org/t/spdiag-matlab-function-in-julia/39604)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 7\
**Last updated:** [February 19, 2021, 4:45pm UTC](https://discourse.julialang.org/t/spdiag-matlab-function-in-julia/39604 "2021-02-19T16:45:08Z")

</div>

Is it possible to create an upper triangular matrix in Julia as fast as in Matlab, given the vectors that occupy “diagonal” positions? To be precise, spdiags allows to locate a vector on the diagonal (index=0) or the fir…

---

## [Can't Complie Makie](https://discourse.julialang.org/t/cant-complie-makie/55607)

<div class="topic-metadata">

**Author:** [@Nitish\_Dubey](https://discourse.julialang.org/u/Nitish_Dubey)\
**Replies:** 14\
**Last updated:** [February 19, 2021, 4:24pm UTC](https://discourse.julialang.org/t/cant-complie-makie/55607 "2021-02-19T16:24:16Z")

</div>

I am trying to use Makie but can’t build it here is the error message using Makie \[ Info: Precompiling Makie \[ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a\] ERROR: LoadError: UndefVarError: to\_gl\_text not defined Stacktrace: \[1…

---

## [Determining whether two methods are both extensions of the same function?](https://discourse.julialang.org/t/determining-whether-two-methods-are-both-extensions-of-the-same-function/55617)

<div class="topic-metadata">

**Author:** [@marty0801](https://discourse.julialang.org/u/marty0801)\
**Replies:** 3\
**Last updated:** [February 19, 2021, 4:18pm UTC](https://discourse.julialang.org/t/determining-whether-two-methods-are-both-extensions-of-the-same-function/55617 "2021-02-19T16:18:21Z")

</div>

I have two functions with the same name, but from two different packages. How do I determine whether one of them is an extension of the other or both are extensions of the same function? I have in mind mean() which occur…

---

## [Does splatting create a shallow copy?](https://discourse.julialang.org/t/does-splatting-create-a-shallow-copy/55566)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 7\
**Last updated:** [February 19, 2021, 3:53pm UTC](https://discourse.julialang.org/t/does-splatting-create-a-shallow-copy/55566 "2021-02-19T15:53:31Z")

</div>

A while ago I asked a question about shallow and deep copies and why a change in the copied array doesn’t reflect on the original. When you splat an array, does it create a shallow or deep copy? As explained in this an…

---

## [Compare patterns in byte array](https://discourse.julialang.org/t/compare-patterns-in-byte-array/55463)

<div class="topic-metadata">

**Author:** [@Michal](https://discourse.julialang.org/u/Michal)\
**Replies:** 4\
**Last updated:** [February 19, 2021, 2:25pm UTC](https://discourse.julialang.org/t/compare-patterns-in-byte-array/55463 "2021-02-19T14:25:43Z")

</div>

How can I find the position in array “a”, where is pattern match from array “b”? Does standard library have implemented this functionality? a = \[0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61\] b = \[0x73, 0x20, 0x…

---

## [Cpufun blog](https://discourse.julialang.org/t/cpufun-blog/55616)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 0\
**Last updated:** [February 19, 2021, 1:56pm UTC](https://discourse.julialang.org/t/cpufun-blog/55616 "2021-02-19T13:56:04Z")

</div>

Might be an interesting blog from JAmes Cownie

---

## [Do we need a policy against one-liner registered packages?](https://discourse.julialang.org/t/do-we-need-a-policy-against-one-liner-registered-packages/54999)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 23\
**Last updated:** [February 19, 2021, 1:39pm UTC](https://discourse.julialang.org/t/do-we-need-a-policy-against-one-liner-registered-packages/54999 "2021-02-19T13:39:40Z")

</div>

I’ve seen a few one or two line packages registered recently. I think the registration process should filter such out, as too soon. WIP is ok with a bit done, but it seem can be misused.

---

## [How do I attach size to a type?](https://discourse.julialang.org/t/how-do-i-attach-size-to-a-type/55614)

<div class="topic-metadata">

**Author:** [@minetest2048](https://discourse.julialang.org/u/minetest2048)\
**Replies:** 1\
**Last updated:** [February 19, 2021, 1:02pm UTC](https://discourse.julialang.org/t/how-do-i-attach-size-to-a-type/55614 "2021-02-19T13:02:36Z")

</div>

I want to make a statically sized bit array, something like Bits{5} = \[0,0,0,0,0\] Bits{N} = \[0,...\] with length of N I want to restrict N to an integer. What do I put in the struct type declaration? struct Bits{???} …

---

## [\[ANN\] "Programación básica con Julia"](https://discourse.julialang.org/t/ann-programacion-basica-con-julia/52527)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 4\
**Last updated:** [February 19, 2021, 1:01pm UTC](https://discourse.julialang.org/t/ann-programacion-basica-con-julia/52527 "2021-02-19T13:01:38Z")

</div>

I want to share with the community yet another guide to introduce programming in Julia… this one in Spanish: :shallow\_pan\_of\_food: :slightly\_smiling\_face: https://hedero.webs.upv.es/julia-basico/ No fancy design; right…

---

## [I am trying to initialize a variable as \`arr = Vector{Tuple{Float64, Vector{Float](https://discourse.julialang.org/t/i-am-trying-to-initialize-a-variable-as-arr-vector-tuple-float64-vector-float/55613)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 19, 2021, 12:51pm UTC](https://discourse.julialang.org/t/i-am-trying-to-initialize-a-variable-as-arr-vector-tuple-float64-vector-float/55613 "2021-02-19T12:51:09Z")

</div>

I am trying to initialize a variable as arr = Vector{Tuple{Float64, Vector{Float64}}}() because I will grow it with push! However, I would like to have more than that, the first type is fixed as Float64 but I want to h…

---

## [Failed to precompile CSV in Pluto...?](https://discourse.julialang.org/t/failed-to-precompile-csv-in-pluto/54633)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 11\
**Last updated:** [February 19, 2021, 11:35am UTC](https://discourse.julialang.org/t/failed-to-precompile-csv-in-pluto/54633 "2021-02-19T11:35:10Z")

</div>

Just started a fresh project environment this morning and CSV won’t compile when calling using CSV from within Pluto. It works just fine when calling from REPL, the error only occurs when using Pluto. The error in my no…

---

## [Jupyter integration with emacs](https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496)

<div class="topic-metadata">

**Author:** [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Replies:** 7\
**Last updated:** [February 19, 2021, 11:08am UTC](https://discourse.julialang.org/t/jupyter-integration-with-emacs/21496 "2021-02-19T11:08:45Z")

</div>

I’ve mentioned in a thread or two that I’ve been using the excellent jupyter emacs package with Julia for several months now, so I thought it might be a good idea to make a topic to highlight the package. For me, this pa…

---

## [Parsing multipart data using HTTP.jl](https://discourse.julialang.org/t/parsing-multipart-data-using-http-jl/55540)

<div class="topic-metadata">

**Author:** [@Michal](https://discourse.julialang.org/u/Michal)\
**Replies:** 3\
**Last updated:** [February 19, 2021, 9:42am UTC](https://discourse.julialang.org/t/parsing-multipart-data-using-http-jl/55540 "2021-02-19T09:42:30Z")

</div>

I’m looking for standard function which can parse body from multipart request. I received json and csv in one multipart request. How can I parse it? Following example is received in one multipart request. Body received …

---

## [Ssh terminal with local files](https://discourse.julialang.org/t/ssh-terminal-with-local-files/55474)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 16\
**Last updated:** [February 19, 2021, 9:30am UTC](https://discourse.julialang.org/t/ssh-terminal-with-local-files/55474 "2021-02-19T09:30:31Z")

</div>

Hello, This is not Julia-specific. I have my files locally and want to continue to edit them locally. However, it would be convenient if my terminal could run on a remote machine via ssh, so that anything I run gets exe…

---

## [Defining tests next to functions](https://discourse.julialang.org/t/defining-tests-next-to-functions/32155)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 17\
**Last updated:** [February 19, 2021, 8:37am UTC](https://discourse.julialang.org/t/defining-tests-next-to-functions/32155 "2021-02-19T08:37:02Z")

</div>

For languages without classes tests are in my opinion a great way to document functions. For example, when I have the function function str2int(letter::String) letter = uppercase(letter) @assert occursin(r"\[A-Z\]+", l…

---

## [Running Julia on remote machine](https://discourse.julialang.org/t/running-julia-on-remote-machine/55578)

<div class="topic-metadata">

**Author:** [@lancejnelson](https://discourse.julialang.org/u/lancejnelson)\
**Replies:** 6\
**Last updated:** [February 19, 2021, 7:36am UTC](https://discourse.julialang.org/t/running-julia-on-remote-machine/55578 "2021-02-19T07:36:21Z")

</div>

Frequently I run code on a remote machine which means executing at the command line. But every time I run a code in Julia it’s going to recompile everything and so it takes longer. Is there a way to remember the compil…

---

## [Say you have \`a=:b\`, how would place the value of \`a\` in an expression such that i](https://discourse.julialang.org/t/say-you-have-a-b-how-would-place-the-value-of-a-in-an-expression-such-that-i/55605)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 19, 2021, 7:26am UTC](https://discourse.julialang.org/t/say-you-have-a-b-how-would-place-the-value-of-a-in-an-expression-such-that-i/55605 "2021-02-19T07:26:05Z")

</div>

Say you have a=:b, how would place the value of a in an expression such that it is retained as the symbol :b and doesn’t become b? I.e. I want Expr(:vect, ???a???) -\> :(\[:b\]) and not :(\[b\]) Note that the original poste…

---

## [Information hiding or modulization in Julia's C/C++ codes](https://discourse.julialang.org/t/information-hiding-or-modulization-in-julias-c-c-codes/55373)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 6\
**Last updated:** [February 19, 2021, 7:21am UTC](https://discourse.julialang.org/t/information-hiding-or-modulization-in-julias-c-c-codes/55373 "2021-02-19T07:21:00Z")

</div>

As suggested in https://github.com/JuliaLang/julia/issues/36903, I also believe that Julia’s ABI needs to be sorted out. In addition to the public/private distinction, IMO, it might be better to promote more modularizat…

---

## [Vectorize an Array of Arrays](https://discourse.julialang.org/t/vectorize-an-array-of-arrays/55577)

<div class="topic-metadata">

**Author:** [@egvila](https://discourse.julialang.org/u/egvila)\
**Replies:** 5\
**Last updated:** [February 19, 2021, 7:02am UTC](https://discourse.julialang.org/t/vectorize-an-array-of-arrays/55577 "2021-02-19T07:02:47Z")

</div>

I have a two-dimensional Array containing two-dimensional arrays of various sizes, something like: nxm Array{Array{Float64,2},2}: zeros(3,3) ones(3,3) zeros(3,3) ones(2,2) zeros(2,2) ones(2,2) Is there a simp…

---

## [How to use a Button in GLMakie](https://discourse.julialang.org/t/how-to-use-a-button-in-glmakie/55583)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [February 19, 2021, 6:11am UTC](https://discourse.julialang.org/t/how-to-use-a-button-in-glmakie/55583 "2021-02-19T06:11:32Z")

</div>

The following code fails: using GLMakie, AbstractPlotting, AbstractPlotting.MakieLayout scene, layout = layoutscene(resolution = (840, 900)) Button(scene, label = "RESET") with the following error: julia\> include("sr…

---

## [Fail to run shell command](https://discourse.julialang.org/t/fail-to-run-shell-command/55543)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 15\
**Last updated:** [February 19, 2021, 5:08am UTC](https://discourse.julialang.org/t/fail-to-run-shell-command/55543 "2021-02-19T05:08:20Z")

</div>

Hei, In Julia 1.4, in Atom-IDE’s REPL, Windows, Julia and I have the following dialog julia\> run(\`echo hello\`) ERROR: IOError: could not spawn \`echo hello\`: no such file or directory (ENOENT) Stacktrace: \[1\] \_spawn\_pr…

---

## [How can I test 3-arg \`show\` methods?\`@test sprint(?, x) == "expected"\`](https://discourse.julialang.org/t/how-can-i-test-3-arg-show-methods-test-sprint-x-expected/55591)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 2\
**Last updated:** [February 19, 2021, 4:53am UTC](https://discourse.julialang.org/t/how-can-i-test-3-arg-show-methods-test-sprint-x-expected/55591 "2021-02-19T04:53:08Z")

</div>

how can I test 3-arg show methods? @test sprint(????, x) == "expected" Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or p…

---

## [Functional programming in Julia](https://discourse.julialang.org/t/functional-programming-in-julia/55548)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 5\
**Last updated:** [February 19, 2021, 3:41am UTC](https://discourse.julialang.org/t/functional-programming-in-julia/55548 "2021-02-19T03:41:19Z")

</div>

I’m recently interested in functional programming (FP) style. I sometimes felt that Julia has probably been inspired by FP but it seems that Julia does not officially provide FP tools, for example, lazy evaluation. I f…

---

## [Any lib for getting Hong Kong stock data?](https://discourse.julialang.org/t/any-lib-for-getting-hong-kong-stock-data/55500)

<div class="topic-metadata">

**Author:** [@hellojason](https://discourse.julialang.org/u/hellojason)\
**Replies:** 2\
**Last updated:** [February 19, 2021, 3:27am UTC](https://discourse.julialang.org/t/any-lib-for-getting-hong-kong-stock-data/55500 "2021-02-19T03:27:46Z")

</div>

I have tried Alpha Vantage, that I can plot chart easily, but it seems no way to retrieve Hong Kong stock data. Does any lib. supporting for it? If really no way then I considering to try it by python … Btw, as I am int…

---

## [How to create a (n-1) dimensional view of a n dimensional array in a general way?](https://discourse.julialang.org/t/how-to-create-a-n-1-dimensional-view-of-a-n-dimensional-array-in-a-general-way/55597)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 2\
**Last updated:** [February 19, 2021, 2:50am UTC](https://discourse.julialang.org/t/how-to-create-a-n-1-dimensional-view-of-a-n-dimensional-array-in-a-general-way/55597 "2021-02-19T02:50:45Z")

</div>

For the n-dimensional array, I can do it separately A\[:, 1\] # for 2D A\[:, :, 1\] # for 3D A\[:, :, :, 1\] # for 4D but how can I do it generally if n is not known in advance? i.e. the number of colons is unknown.

---

## [Modify \`r\`th largest entry of vector in place](https://discourse.julialang.org/t/modify-r-th-largest-entry-of-vector-in-place/55587)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 13\
**Last updated:** [February 19, 2021, 2:48am UTC](https://discourse.julialang.org/t/modify-r-th-largest-entry-of-vector-in-place/55587 "2021-02-19T02:48:27Z")

</div>

I can use sortperm() to get a permutation index that puts a in order: 3-element Array{Float64,1}: 0.9546235783735173 0.15267335513843228 0.3175124947454555 julia\> order = sortperm(a) 3-element Array{Int64,1}: 2 3 …

---

## [Adding a Project.toml to an existing package](https://discourse.julialang.org/t/adding-a-project-toml-to-an-existing-package/55592)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 2\
**Last updated:** [February 19, 2021, 1:46am UTC](https://discourse.julialang.org/t/adding-a-project-toml-to-an-existing-package/55592 "2021-02-19T01:46:03Z")

</div>

I’ve got a repo i’ve been developing, and I would like to start laying it out properly as a package that, in principle, someong could to an add to. However, I’d prefer not to trash what I already have. Is there a way I…

---

## [Why is seek zero-based?](https://discourse.julialang.org/t/why-is-seek-zero-based/55569)

<div class="topic-metadata">

**Author:** [@Benjia](https://discourse.julialang.org/u/Benjia)\
**Replies:** 3\
**Last updated:** [February 18, 2021, 11:59pm UTC](https://discourse.julialang.org/t/why-is-seek-zero-based/55569 "2021-02-18T23:59:20Z")

</div>

To go to the start of an IOStream, you have to do seek(io, 0). Why is this? I just spent about 30 minutes trying to debug an error caused by using seek(io, 1) instead.

---

## [How much performance potential does DataFrames have?](https://discourse.julialang.org/t/how-much-performance-potential-does-dataframes-have/55441)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 7\
**Last updated:** [February 18, 2021, 11:48pm UTC](https://discourse.julialang.org/t/how-much-performance-potential-does-dataframes-have/55441 "2021-02-18T23:48:40Z")

</div>

This benchmark shows that DataFrames is much slower and more verbose than data.table: https://h2oai.github.io/db-benchmark/ I was wondering if DataFrames could reach data.table’s performance in future.

[Previous page](https://discourse.julialang.org/latest.md?page=1484)

[Next page](https://discourse.julialang.org/latest.md?page=1486)
