# Latest

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

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

**Page:** 1432

---

## [How namespace of Base.Iterators works](https://discourse.julialang.org/t/how-namespace-of-base-iterators-works/58854)

<div class="topic-metadata">

**Author:** [@Tbl](https://discourse.julialang.org/u/Tbl)\
**Replies:** 6\
**Last updated:** [April 9, 2021, 12:44pm UTC](https://discourse.julialang.org/t/how-namespace-of-base-iterators-works/58854 "2021-04-09T12:44:49Z")

</div>

I like to code using more functional-like style working with iterators, so Base.Iterators comes in handy, but I have problem understanding how its namespace is structured. It is part of the Base, yet it is not by defau…

---

## [CI for private repo repending on private repo on Gitlab](https://discourse.julialang.org/t/ci-for-private-repo-repending-on-private-repo-on-gitlab/47352)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 9\
**Last updated:** [April 9, 2021, 12:20pm UTC](https://discourse.julialang.org/t/ci-for-private-repo-repending-on-private-repo-on-gitlab/47352 "2021-04-09T12:20:03Z")

</div>

I have two private repos on Gitlab, lets call them Foo and Bar, the latter depends on Foo. When developing on my local machine, I have Gitlab authentication set up, so I can just did pkg\> activate /path/to/Bar pkg\> add…

---

## [Fast Evaluation of Interpolation Function](https://discourse.julialang.org/t/fast-evaluation-of-interpolation-function/58918)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 1\
**Last updated:** [April 9, 2021, 12:13pm UTC](https://discourse.julialang.org/t/fast-evaluation-of-interpolation-function/58918 "2021-04-09T12:13:03Z")

</div>

Hi everyone. I have a code that depends heavily in this massive interpolated function (a distribution of a property in the Earth). It has X,Y,Z and a Property (Slowness of a wave through the medium). I evaluate the slo…

---

## [Optimizing E-Graphs pattern matcher: a complicated problem](https://discourse.julialang.org/t/optimizing-e-graphs-pattern-matcher-a-complicated-problem/58914)

<div class="topic-metadata">

**Author:** [@0x0f0f0f](https://discourse.julialang.org/u/0x0f0f0f)\
**Replies:** 0\
**Last updated:** [April 9, 2021, 11:13am UTC](https://discourse.julialang.org/t/optimizing-e-graphs-pattern-matcher-a-complicated-problem/58914 "2021-04-09T11:13:44Z")

</div>

With Metatheory.jl, I have a big performance problem when pattern matching against egraphs, a fairly complex algorithm and data structure https://github.com/0x0f0f0f/Metatheory.jl/issues/6 If anyone is skilled enough o…

---

## [Does the Profile package report system time?](https://discourse.julialang.org/t/does-the-profile-package-report-system-time/58911)

<div class="topic-metadata">

**Author:** [@mroavi](https://discourse.julialang.org/u/mroavi)\
**Replies:** 0\
**Last updated:** [April 9, 2021, 10:02am UTC](https://discourse.julialang.org/t/does-the-profile-package-report-system-time/58911 "2021-04-09T10:02:27Z")

</div>

Does the Profile package indicate the relative time the system spends allocating and freeing memory on the heap? Or is this information not included in the profile at all? (edited)

---

## [Set model parameters as Dictionary and define some as trainable](https://discourse.julialang.org/t/set-model-parameters-as-dictionary-and-define-some-as-trainable/58910)

<div class="topic-metadata">

**Author:** [@Sunny](https://discourse.julialang.org/u/Sunny)\
**Replies:** 0\
**Last updated:** [April 9, 2021, 9:02am UTC](https://discourse.julialang.org/t/set-model-parameters-as-dictionary-and-define-some-as-trainable/58910 "2021-04-09T09:02:51Z")

</div>

I defined the following model with a dictionary containing weights mutable struct Affine params end Affine(in::Integer, out::Integer) = Affine(Dict("W"=\>randn(out, in), ("b"=\>randn(out)))) # Overload call, so the …

---

## [Flatten a tuple of Operations/Operation arrays](https://discourse.julialang.org/t/flatten-a-tuple-of-operations-operation-arrays/58906)

<div class="topic-metadata">

**Author:** [@cvanaret](https://discourse.julialang.org/u/cvanaret)\
**Replies:** 2\
**Last updated:** [April 9, 2021, 8:32am UTC](https://discourse.julialang.org/t/flatten-a-tuple-of-operations-operation-arrays/58906 "2021-04-09T08:32:44Z")

</div>

Hi, I’m using the @variables macro of the ModelingToolkit module: (edit) n = 2 vars = @variables x y z\[1:n\] which produces (x, y, Operation\[z₁, z₂\]). I’m now using this tuple as parameter in the constructor of Contra…

---

## [\[ANN\] CompositeStructs.jl](https://discourse.julialang.org/t/ann-compositestructs-jl/58902)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 3\
**Last updated:** [April 9, 2021, 6:34am UTC](https://discourse.julialang.org/t/ann-compositestructs-jl/58902 "2021-04-09T06:34:05Z")

</div>

While I generally view multiple-dispatch as much more powerful and flexible that object-oriented programming (see this talk JuliaCon 2019 | The Unreasonable Effectiveness of Multiple Dispatch | Stefan Karpinski - YouTube …

---

## [Parallel run in for loop](https://discourse.julialang.org/t/parallel-run-in-for-loop/58858)

<div class="topic-metadata">

**Author:** [@Rasoul\_Jafarzadeh](https://discourse.julialang.org/u/Rasoul_Jafarzadeh)\
**Replies:** 10\
**Last updated:** [April 9, 2021, 6:12am UTC](https://discourse.julialang.org/t/parallel-run-in-for-loop/58858 "2021-04-09T06:12:29Z")

</div>

in my code I have 32 parameter, so I used 32 for loop which have 2 steps in each loop. 2^32 computation should be done and it takes long long time. how can I run them parallel to run fast? my code is this form c=\[0,1\]…

---

## [Multiple dimensional sampling with first element string](https://discourse.julialang.org/t/multiple-dimensional-sampling-with-first-element-string/58863)

<div class="topic-metadata">

**Author:** [@GraceMabele](https://discourse.julialang.org/u/GraceMabele)\
**Replies:** 33\
**Last updated:** [April 9, 2021, 5:44am UTC](https://discourse.julialang.org/t/multiple-dimensional-sampling-with-first-element-string/58863 "2021-04-09T05:44:41Z")

</div>

Hi, My equation g below is a function of the variable d which is indexed by s,n. I would like to sampling points to be of d\[s,n\]. how do I create the correct lb and ub. using DataStructures using JuMP using Surrogates …

---

## [Operations on Arrays of CartesianIndex](https://discourse.julialang.org/t/operations-on-arrays-of-cartesianindex/58827)

<div class="topic-metadata">

**Author:** [@ethomag](https://discourse.julialang.org/u/ethomag)\
**Replies:** 2\
**Last updated:** [April 9, 2021, 5:01am UTC](https://discourse.julialang.org/t/operations-on-arrays-of-cartesianindex/58827 "2021-04-09T05:01:06Z")

</div>

I came across a problem that I found surprisingly hard, given Julias excellent support for indexing multidimensional Arrays. I lilke to apply some function along one axis on parts of an Array. The parts are defined by s…

---

## [get(::Function, ::Dict, ::Key) not defined for Base.ImmutableDict?](https://discourse.julialang.org/t/get-function-dict-key-not-defined-for-base-immutabledict/58897)

<div class="topic-metadata">

**Author:** [@murari0](https://discourse.julialang.org/u/murari0)\
**Replies:** 2\
**Last updated:** [April 9, 2021, 3:22am UTC](https://discourse.julialang.org/t/get-function-dict-key-not-defined-for-base-immutabledict/58897 "2021-04-09T03:22:35Z")

</div>

While playing around with Dicts, I found that I was not able to use the do-block syntax, e.g. get(a, key) do @warn "Key not found. Falling back to default" default end when a is of type Base.ImmutableDict inste…

---

## [PlutoCon going on, some talks already online](https://discourse.julialang.org/t/plutocon-going-on-some-talks-already-online/58891)

<div class="topic-metadata">

**Author:** [@rpmuller](https://discourse.julialang.org/u/rpmuller)\
**Replies:** 2\
**Last updated:** [April 9, 2021, 1:26am UTC](https://discourse.julialang.org/t/plutocon-going-on-some-talks-already-online/58891 "2021-04-09T01:26:27Z")

</div>

Taken from the Julia subreddit announcement: To celebrate Pluto’s 1 year anniversary , we are hosting a two day mini conference about… Pluto! It will be a place to share your fun notebooks and to learn techniques from …

---

## [GameZero.jl question](https://discourse.julialang.org/t/gamezero-jl-question/44044)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 5\
**Last updated:** [April 9, 2021, 1:07am UTC](https://discourse.julialang.org/t/gamezero-jl-question/44044 "2021-04-09T01:07:27Z")

</div>

How do I run a game? That seems to be an oversight. Code example?

---

## [Variable global scope](https://discourse.julialang.org/t/variable-global-scope/58518)

<div class="topic-metadata">

**Author:** [@rverdier](https://discourse.julialang.org/u/rverdier)\
**Replies:** 2\
**Last updated:** [April 9, 2021, 1:05am UTC](https://discourse.julialang.org/t/variable-global-scope/58518 "2021-04-09T01:05:19Z")

</div>

In creating a Julia script for interactive plotting of compound interest and mortgages, I’ve run into a problem. Here’s a skeleton of the essential parts: using Gtk w, h = 200, 250 canvas = @GtkCanvas() win = GtkWindow…

---

## [Is there any way I can call an instance of a function repeatedly with the function retaining internally the last state of the GPIO pin](https://discourse.julialang.org/t/is-there-any-way-i-can-call-an-instance-of-a-function-repeatedly-with-the-function-retaining-internally-the-last-state-of-the-gpio-pin/58748)

<div class="topic-metadata">

**Author:** [@GregMcC](https://discourse.julialang.org/u/GregMcC)\
**Replies:** 7\
**Last updated:** [April 8, 2021, 11:54pm UTC](https://discourse.julialang.org/t/is-there-any-way-i-can-call-an-instance-of-a-function-repeatedly-with-the-function-retaining-internally-the-last-state-of-the-gpio-pin/58748 "2021-04-08T23:54:46Z")

</div>

I am wanting to monitor some GPIO pins on a Raspberry Pi. Is there any way I can call an instance of a function repeatedly with the function retaining internally the last state of the GPIO pin - so that I can detect Risi…

---

## [How to add new column to Dataframe](https://discourse.julialang.org/t/how-to-add-new-column-to-dataframe/58794)

<div class="topic-metadata">

**Author:** [@Shazman](https://discourse.julialang.org/u/Shazman)\
**Replies:** 8\
**Last updated:** [April 8, 2021, 11:31pm UTC](https://discourse.julialang.org/t/how-to-add-new-column-to-dataframe/58794 "2021-04-08T23:31:03Z")

</div>

Hi I want to add dataframe A as a first column of dataframe of B. so the first column of new dataframe will be IID from A how can I do that ? thank you in advance! dataframe A Row │ IID │ Int64 …

---

## [Parallel Computing For Loop With Dictionaries](https://discourse.julialang.org/t/parallel-computing-for-loop-with-dictionaries/58402)

<div class="topic-metadata">

**Author:** [@waforbes](https://discourse.julialang.org/u/waforbes)\
**Replies:** 23\
**Last updated:** [April 8, 2021, 11:30pm UTC](https://discourse.julialang.org/t/parallel-computing-for-loop-with-dictionaries/58402 "2021-04-08T23:30:43Z")

</div>

What’s the best way to implement parallel computing here? I’m new to it and Julia. I have eight physical cores. The process function returns two dictionaries. @time begin param = "reaction" # reaction, mesh, diffusion …

---

## [Hypothetical visual programming in Julia - design?](https://discourse.julialang.org/t/hypothetical-visual-programming-in-julia-design/58526)

<div class="topic-metadata">

**Author:** [@bradeneliason](https://discourse.julialang.org/u/bradeneliason)\
**Replies:** 5\
**Last updated:** [April 8, 2021, 11:04pm UTC](https://discourse.julialang.org/t/hypothetical-visual-programming-in-julia-design/58526 "2021-04-08T23:04:58Z")

</div>

I see the discussion of visual programming pop up in other discourse threads periodically and I wanted to have a single thread about what the design of a visual programming environment for Julia would/should look like. F…

---

## [Parametric-type definition](https://discourse.julialang.org/t/parametric-type-definition/58873)

<div class="topic-metadata">

**Author:** [@Germinator](https://discourse.julialang.org/u/Germinator)\
**Replies:** 2\
**Last updated:** [April 8, 2021, 10:37pm UTC](https://discourse.julialang.org/t/parametric-type-definition/58873 "2021-04-08T22:37:45Z")

</div>

Hi all! I have a question defining a parametric type which I defined, subtype of AbstractArray: struct CoreM{N} \<: AbstractArray{Float64,N} core::Array{Float64,N} end I would like to define a CoreM type, which is s…

---

## [Percentage change method in JuliaDB](https://discourse.julialang.org/t/percentage-change-method-in-juliadb/58883)

<div class="topic-metadata">

**Author:** [@quantiota](https://discourse.julialang.org/u/quantiota)\
**Replies:** 0\
**Last updated:** [April 8, 2021, 10:07pm UTC](https://discourse.julialang.org/t/percentage-change-method-in-juliadb/58883 "2021-04-08T22:07:45Z")

</div>

Hey, is there any percentchange method that calculates the percentage change only between timestamps in a JuliaDB column.

---

## [Draw a surface using Gaston with a nonrectangular domain](https://discourse.julialang.org/t/draw-a-surface-using-gaston-with-a-nonrectangular-domain/58825)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 10\
**Last updated:** [April 8, 2021, 10:00pm UTC](https://discourse.julialang.org/t/draw-a-surface-using-gaston-with-a-nonrectangular-domain/58825 "2021-04-08T22:00:10Z")

</div>

Dear all, I have the code: using Gaston X = LinRange(-1,1, 30) # 50 Y = LinRange(-1,1, 30) x = \[u for u in X, v in Y\] y = \[v for u in X, v in Y\] z = \[u^2+v^2 for u in X, v in Y\] # surf(x, y, z, w = :l, lc = :turqu…

---

## [Makie mouse\_in\_scene gives pixel positions](https://discourse.julialang.org/t/makie-mouse-in-scene-gives-pixel-positions/58864)

<div class="topic-metadata">

**Author:** [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Replies:** 2\
**Last updated:** [April 8, 2021, 9:19pm UTC](https://discourse.julialang.org/t/makie-mouse-in-scene-gives-pixel-positions/58864 "2021-04-08T21:19:30Z")

</div>

Hi, I don’t understand why the following code doesn’t work. (maybe I an just blind) using AbstractPlotting X = Node( rand(Point2f0, 10) ) fig = Figure(resolution = (1200, 900)) scatter(fig\[1,1\], X) scene = fig.scen…

---

## [Simple curve fitting with CurveFit (or alternative)](https://discourse.julialang.org/t/simple-curve-fitting-with-curvefit-or-alternative/58737)

<div class="topic-metadata">

**Author:** [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)\
**Replies:** 20\
**Last updated:** [April 8, 2021, 8:59pm UTC](https://discourse.julialang.org/t/simple-curve-fitting-with-curvefit-or-alternative/58737 "2021-04-08T20:59:24Z")

</div>

I’d like to try different curves against data to see which of them would best fit. So in this example x0 = collect(1.0:100.0) y0 = x .^ 4.5 f0 = curve\_fit(LinearFit, x0, y0) I’d like to learn just how bad it is, but is…

---

## [Creating custom indices (or Range?) from a set of arrays](https://discourse.julialang.org/t/creating-custom-indices-or-range-from-a-set-of-arrays/58840)

<div class="topic-metadata">

**Author:** [@youeh1](https://discourse.julialang.org/u/youeh1)\
**Replies:** 1\
**Last updated:** [April 8, 2021, 8:57pm UTC](https://discourse.julialang.org/t/creating-custom-indices-or-range-from-a-set-of-arrays/58840 "2021-04-08T20:57:42Z")

</div>

Hi, I have a sparse array with a size of 257 x 195308. I found that slicing and viewing of a part of the array allocated new memories for every process, and subtraction between two sparse arrays also create another all…

---

## [Type unstable function because same variable name used twice](https://discourse.julialang.org/t/type-unstable-function-because-same-variable-name-used-twice/58810)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 10\
**Last updated:** [April 8, 2021, 8:21pm UTC](https://discourse.julialang.org/t/type-unstable-function-because-same-variable-name-used-twice/58810 "2021-04-08T20:21:19Z")

</div>

Hey, I cannot come up with a minimal example yet, but I encountered that my function return was type unstable because of such a construct: function foo(x) # some code y = (1, 2) # first y = \[x\[1\] for i …

---

## [Is a Phillips-Peron Test Available?](https://discourse.julialang.org/t/is-a-phillips-peron-test-available/58793)

<div class="topic-metadata">

**Author:** [@RalphH](https://discourse.julialang.org/u/RalphH)\
**Replies:** 5\
**Last updated:** [April 8, 2021, 7:57pm UTC](https://discourse.julialang.org/t/is-a-phillips-peron-test-available/58793 "2021-04-08T19:57:12Z")

</div>

Hello everyone, is a Phillips-Peron test available in Julia? If not, when will one be available? I have searched but can’t find one. I’m working with heteroskedastic data, so the ADF test isn’t adequate, and replacing J…

---

## [PrettyTables: Is there a way to show multiple tables when the table is very wide?](https://discourse.julialang.org/t/prettytables-is-there-a-way-to-show-multiple-tables-when-the-table-is-very-wide/58846)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 1\
**Last updated:** [April 8, 2021, 5:49pm UTC](https://discourse.julialang.org/t/prettytables-is-there-a-way-to-show-multiple-tables-when-the-table-is-very-wide/58846 "2021-04-08T17:49:40Z")

</div>

I feel like I’ve seen an example somewhere where, when printing with pretty\_table, if a table is too wide for the terminal, it prints multiple tables until everything is printed. Is that a thing? Or is that a feature I …

---

## [How to create JSON files for finite element meshes?](https://discourse.julialang.org/t/how-to-create-json-files-for-finite-element-meshes/58861)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 0\
**Last updated:** [April 8, 2021, 5:41pm UTC](https://discourse.julialang.org/t/how-to-create-json-files-for-finite-element-meshes/58861 "2021-04-08T17:41:16Z")

</div>

Packages like femgl (GitHub - mikolalysenko/femgl: WebGL finite element viewer) and GridApp (GitHub - gridap/Gridap.jl: Grid-based approximation of partial differential equations in Julia) employ finite element mesh file…

---

## [Xlabel in Gaston](https://discourse.julialang.org/t/xlabel-in-gaston/58773)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 4\
**Last updated:** [April 8, 2021, 5:14pm UTC](https://discourse.julialang.org/t/xlabel-in-gaston/58773 "2021-04-08T17:14:57Z")

</div>

Dear all, i have this code to plot a paramatrized surface: using Gaston Θ = LinRange(0, 2π, 100) # 50 Φ = LinRange(0, π, 20) r = 0.8 x = \[r\*cos(θ)\*sin(ϕ) for θ in Θ, ϕ in Φ\] y = \[r\*sin(θ)\*sin(ϕ) for θ in Θ, ϕ in Φ\] z …

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

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