# Latest

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

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

**Page:** 1530

---

## [Mesh3D Only Plotting Half](https://discourse.julialang.org/t/mesh3d-only-plotting-half/52760)

<div class="topic-metadata">

**Author:** [@Nkrause](https://discourse.julialang.org/u/Nkrause)\
**Replies:** 15\
**Last updated:** [January 6, 2021, 3:35pm UTC](https://discourse.julialang.org/t/mesh3d-only-plotting-half/52760 "2021-01-06T15:35:44Z")

</div>

Hello, I’m trying to plot a 3d surface. I’ve used a marching cubes algorithm to generate a tuple of points. When I plot them in scatter() I get the following image, which is what I want and expect. scatter(\[a for (a,…

---

## [While loop and UndefVarError](https://discourse.julialang.org/t/while-loop-and-undefvarerror/52940)

<div class="topic-metadata">

**Author:** [@Aman\_Atman](https://discourse.julialang.org/u/Aman_Atman)\
**Replies:** 2\
**Last updated:** [January 6, 2021, 2:57pm UTC](https://discourse.julialang.org/t/while-loop-and-undefvarerror/52940 "2021-01-06T14:57:01Z")

</div>

The variable gets undefined in a while loop. julia\> index = length(fruits) 4 julia\> while index \> 0 println(fruits\[index\]) index -= 1 end ERROR: UndefVarError: index not defined Stacktrace:…

---

## [Makie consistency problem in iteratively saved png resolution](https://discourse.julialang.org/t/makie-consistency-problem-in-iteratively-saved-png-resolution/52582)

<div class="topic-metadata">

**Author:** [@YohanSassi](https://discourse.julialang.org/u/YohanSassi)\
**Replies:** 8\
**Last updated:** [January 6, 2021, 2:46pm UTC](https://discourse.julialang.org/t/makie-consistency-problem-in-iteratively-saved-png-resolution/52582 "2021-01-06T14:46:33Z")

</div>

Hi all, In the following MWE there is a problem of resolution consistency when saving iteratively png from a Makie scene: using GLMakie,AbstractPlotting,ImageCore function save\_png(img, i) fn=string(i)\*".png" s…

---

## [I implemented a type for defining arbitrary lazy sequences that performs well, but the implementation is so trivial that I'm not sure if it's worth making a package](https://discourse.julialang.org/t/i-implemented-a-type-for-defining-arbitrary-lazy-sequences-that-performs-well-but-the-implementation-is-so-trivial-that-im-not-sure-if-its-worth-making-a-package/35875)

<div class="topic-metadata">

**Author:** [@ninjaaron](https://discourse.julialang.org/u/ninjaaron)\
**Replies:** 21\
**Last updated:** [January 6, 2021, 2:41pm UTC](https://discourse.julialang.org/t/i-implemented-a-type-for-defining-arbitrary-lazy-sequences-that-performs-well-but-the-implementation-is-so-trivial-that-im-not-sure-if-its-worth-making-a-package/35875 "2021-01-06T14:41:24Z")

</div>

… so I thought I’d post it here and see what people thought. Lazy sequences have been a point of frustration for me with Julia. Python is my main background, and I always liked generator functions, and I really enjoy pl…

---

## [Problem with trivial arithmetic](https://discourse.julialang.org/t/problem-with-trivial-arithmetic/52899)

<div class="topic-metadata">

**Author:** [@jjdegruijter](https://discourse.julialang.org/u/jjdegruijter)\
**Replies:** 7\
**Last updated:** [January 6, 2021, 2:32pm UTC](https://discourse.julialang.org/t/problem-with-trivial-arithmetic/52899 "2021-01-06T14:32:43Z")

</div>

In my function “main” I have: floor1 = floor(Int64, 4382/6) println("floor1 = ", floor1) Hfloor1 = 6floor1 println("Hfloor1 = ", Hfloor1) missing1 = 4382 - Hfloor1 println("missing1 = ", missing1) Hfloor2 = -6floo…

---

## [Struggling with signatures](https://discourse.julialang.org/t/struggling-with-signatures/52935)

<div class="topic-metadata">

**Author:** [@stefkuypers](https://discourse.julialang.org/u/stefkuypers)\
**Replies:** 2\
**Last updated:** [January 6, 2021, 2:02pm UTC](https://discourse.julialang.org/t/struggling-with-signatures/52935 "2021-01-06T14:02:19Z")

</div>

Hi, I’m struggling with type signatures. The following code only works if all the types I pass are of the exact same type. abstract type S end struct S1 \<: S value::Int64 end struct S2 \<: S value::Float…

---

## [Python packages and CI](https://discourse.julialang.org/t/python-packages-and-ci/52903)

<div class="topic-metadata">

**Author:** [@marcobonici](https://discourse.julialang.org/u/marcobonici)\
**Replies:** 8\
**Last updated:** [January 6, 2021, 1:36pm UTC](https://discourse.julialang.org/t/python-packages-and-ci/52903 "2021-01-06T13:36:22Z")

</div>

Hi to everybody! I am a new Julia user, I just started to use Julia a week ago. As a first project, I’d like to translate one of my Python projects, hopefully finding better performances. Following some tutorials, I sta…

---

## [Why is statistics so difficult?](https://discourse.julialang.org/t/why-is-statistics-so-difficult/52416)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 40\
**Last updated:** [January 6, 2021, 1:33pm UTC](https://discourse.julialang.org/t/why-is-statistics-so-difficult/52416 "2021-01-06T13:33:50Z")

</div>

Hi all! I see a few very interesting discussions going on on this forum, and would like to ask for your opinions on the difficulty of statistics. I see many people hanging around here with much experience with stats, and…

---

## [Repl\_history depending on current working directory](https://discourse.julialang.org/t/repl-history-depending-on-current-working-directory/52890)

<div class="topic-metadata">

**Author:** [@circonflexe](https://discourse.julialang.org/u/circonflexe)\
**Replies:** 3\
**Last updated:** [January 6, 2021, 12:34pm UTC](https://discourse.julialang.org/t/repl-history-depending-on-current-working-directory/52890 "2021-01-06T12:34:47Z")

</div>

So I am working concurrently on two separate projects, let us call them A and B. When I am in the working directory of project A, anything in repl\_history.jl that is connected to project B is basically clutter, and vice-…

---

## [Type instability when indexing](https://discourse.julialang.org/t/type-instability-when-indexing/52918)

<div class="topic-metadata">

**Author:** [@jlchan](https://discourse.julialang.org/u/jlchan)\
**Replies:** 8\
**Last updated:** [January 6, 2021, 6:08am UTC](https://discourse.julialang.org/t/type-instability-when-indexing/52918 "2021-01-06T06:08:45Z")

</div>

I’m trying to understand why type instability appears for certain indexing operations. Suppose I define three functions (MWE for a longer code where type parameter d is used to index into part of a tuple/array) struct b…

---

## [Devops and MLops with the MIT Julia Lab](https://discourse.julialang.org/t/devops-and-mlops-with-the-mit-julia-lab/52795)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 1\
**Last updated:** [January 6, 2021, 3:53am UTC](https://discourse.julialang.org/t/devops-and-mlops-with-the-mit-julia-lab/52795 "2021-01-06T03:53:41Z")

</div>

We’re looking for a new devops and MLops engineer to work with the Julia Lab. You’d be in charge of keeping all of our systems running and creating new schemes to accelerate Julia development. Julia’s Base CI, the FluxML…

---

## [Question about SubString in DataFrames](https://discourse.julialang.org/t/question-about-substring-in-dataframes/52910)

<div class="topic-metadata">

**Author:** [@florian](https://discourse.julialang.org/u/florian)\
**Replies:** 1\
**Last updated:** [January 6, 2021, 2:38am UTC](https://discourse.julialang.org/t/question-about-substring-in-dataframes/52910 "2021-01-06T02:38:41Z")

</div>

Hi everyone, I have a question about SubStrings. The documentation states that they are views into a parent string. Suppose I want to clean up the following DataFrame: df = DataFrame(type\_year = \[“Red 2019”, “Red 2020…

---

## [Debugging in Juno constantly stops in low-level functions](https://discourse.julialang.org/t/debugging-in-juno-constantly-stops-in-low-level-functions/52915)

<div class="topic-metadata">

**Author:** [@boranzhao](https://discourse.julialang.org/u/boranzhao)\
**Replies:** 0\
**Last updated:** [January 6, 2021, 2:35am UTC](https://discourse.julialang.org/t/debugging-in-juno-constantly-stops-in-low-level-functions/52915 "2021-01-06T02:35:47Z")

</div>

Hello, I am a new user of Julia and Juno. I created a nonlinear optimization problem using JuMP, which uses nonlinear expressions and constraints. I tried to debug my code using the Debugger in Juno. However, when I c…

---

## [Use condition result inside conditional](https://discourse.julialang.org/t/use-condition-result-inside-conditional/52893)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 8\
**Last updated:** [January 6, 2021, 1:58am UTC](https://discourse.julialang.org/t/use-condition-result-inside-conditional/52893 "2021-01-06T01:58:19Z")

</div>

I find myself with some frequency having to test a condition and, if that condition returns some value, do something with that value. For example: x = \[ 1, 2, 3 \] itest = findfirst(isequal(2),x) # get value if itest != …

---

## [Slow start up and package loading times](https://discourse.julialang.org/t/slow-start-up-and-package-loading-times/52639)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 42\
**Last updated:** [January 6, 2021, 1:40am UTC](https://discourse.julialang.org/t/slow-start-up-and-package-loading-times/52639 "2021-01-06T01:40:53Z")

</div>

I’m new to Julia, and I’m a little dismayed by what seems like excessively long times for starting up the kernel and and loading packages. First I timed how long it took for julia\> to appear in the REPL, starting from th…

---

## [Solving equation within Distributed loop](https://discourse.julialang.org/t/solving-equation-within-distributed-loop/52905)

<div class="topic-metadata">

**Author:** [@danicaratelli](https://discourse.julialang.org/u/danicaratelli)\
**Replies:** 3\
**Last updated:** [January 6, 2021, 12:00am UTC](https://discourse.julialang.org/t/solving-equation-within-distributed-loop/52905 "2021-01-06T00:00:11Z")

</div>

Hello, I am trying to solve an equation within a distributed loop. A MWE follows: using Distributed addprocs(2); include("newfile.jl") #Parameters: par1 = 5; par2 = 2; @everywhere begin using CSV, DataFrames, Blac…

---

## [Adding Your Blog to JuliaBloggers](https://discourse.julialang.org/t/adding-your-blog-to-juliabloggers/50128)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 9\
**Last updated:** [January 5, 2021, 7:06pm UTC](https://discourse.julialang.org/t/adding-your-blog-to-juliabloggers/50128 "2021-01-05T19:06:32Z")

</div>

Hi everyone! If you have a personal blog where you write on Julia, consider adding it to JuliaBloggers! This post will serve to contain info for various website hosting solutions and how you can add your own blog’s RSS …

---

## [\[ANN\] IJuliaTimeMachine](https://discourse.julialang.org/t/ann-ijuliatimemachine/52891)

<div class="topic-metadata">

**Author:** [@danspielman](https://discourse.julialang.org/u/danspielman)\
**Replies:** 0\
**Last updated:** [January 5, 2021, 6:47pm UTC](https://discourse.julialang.org/t/ann-ijuliatimemachine/52891 "2021-01-05T18:47:24Z")

</div>

IJuliaTimeMachine provides two capabilities that I have found useful when running long computational experiments in Jupyter / IJulia notebooks, It allows you to return variables to a previous state. This is useful if …

---

## [Distributed loop and "include"](https://discourse.julialang.org/t/distributed-loop-and-include/52886)

<div class="topic-metadata">

**Author:** [@danicaratelli](https://discourse.julialang.org/u/danicaratelli)\
**Replies:** 4\
**Last updated:** [January 5, 2021, 5:19pm UTC](https://discourse.julialang.org/t/distributed-loop-and-include/52886 "2021-01-05T17:19:56Z")

</div>

Hello. My question is how I include an external file within a distributed loop. For example, the following works: using Distributed addprocs(2); #Parameters: par1 = 5; par2 = 2; @everywhere begin using CSV, DataF…

---

## [Package does not have AnotherPackage in its dependencies](https://discourse.julialang.org/t/package-does-not-have-anotherpackage-in-its-dependencies/52888)

<div class="topic-metadata">

**Author:** [@Laco\_Kovac](https://discourse.julialang.org/u/Laco_Kovac)\
**Replies:** 2\
**Last updated:** [January 5, 2021, 5:09pm UTC](https://discourse.julialang.org/t/package-does-not-have-anotherpackage-in-its-dependencies/52888 "2021-01-05T17:09:36Z")

</div>

I have a small functioning Julia project. I needed to add JSONSchema package so I did: pkg\> add JSONSchema It added following line to my Project.toml under \[deps\]: JSONSchema = "7d188eb4-7ad8-530c-ae41-71a32a6d4692" …

---

## [Finding index and value of largest two elements in a CuArray](https://discourse.julialang.org/t/finding-index-and-value-of-largest-two-elements-in-a-cuarray/52110)

<div class="topic-metadata">

**Author:** [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)\
**Replies:** 11\
**Last updated:** [January 5, 2021, 4:36pm UTC](https://discourse.julialang.org/t/finding-index-and-value-of-largest-two-elements-in-a-cuarray/52110 "2021-01-05T16:36:24Z")

</div>

I need to find the indices and values of the two largest elements in a 2D array. I whipped up a foldl-based solution for the CPU that’s much faster than Base.findmax and Base.partialsortperm, but it runs like molasses on…

---

## [@everywhere and Dictionaries](https://discourse.julialang.org/t/everywhere-and-dictionaries/52880)

<div class="topic-metadata">

**Author:** [@danicaratelli](https://discourse.julialang.org/u/danicaratelli)\
**Replies:** 6\
**Last updated:** [January 5, 2021, 4:28pm UTC](https://discourse.julialang.org/t/everywhere-and-dictionaries/52880 "2021-01-05T16:28:23Z")

</div>

I am running some code in parallel. I have some parameters that I save in a dictionary: mod\_pars = Dict("par1"=\>par1,"par2"=\>par2); and for different values of par1 I want to run a particular function. So given a list…

---

## [Problem using NLopt in JuMP model](https://discourse.julialang.org/t/problem-using-nlopt-in-jump-model/52499)

<div class="topic-metadata">

**Author:** [@Emmanouil\_Bakirtzis](https://discourse.julialang.org/u/Emmanouil_Bakirtzis)\
**Replies:** 11\
**Last updated:** [January 5, 2021, 2:55pm UTC](https://discourse.julialang.org/t/problem-using-nlopt-in-jump-model/52499 "2021-01-05T14:55:23Z")

</div>

Hi, I am trying to create a JuMP model using NLopt solver in Julia 1.5.3 using JuMP using NLopt model = Model(NLopt.Optimizer) but I get the following error ERROR: UndefVarError: Optimizer not defined Stacktrace: \[…

---

## [Playing with live plots in Pluto](https://discourse.julialang.org/t/playing-with-live-plots-in-pluto/44062)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 4\
**Last updated:** [January 5, 2021, 1:29pm UTC](https://discourse.julialang.org/t/playing-with-live-plots-in-pluto/44062 "2021-01-05T13:29:33Z")

</div>

I’m playing with live plotting using Pluto.jl. I have a simple plot updating at about 20 fps depending on what my computer is doing. I’m curious if anyone else is trying this sort of thing and if there are ways to get be…

---

## [Custom broadcasting](https://discourse.julialang.org/t/custom-broadcasting/39945)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 5\
**Last updated:** [January 5, 2021, 1:27pm UTC](https://discourse.julialang.org/t/custom-broadcasting/39945 "2021-01-05T13:27:43Z")

</div>

After spending quite a bit of time in the Customizing broadcasting section of the doc, reading a few questions here and trawling through the source code of StaticArrays.jl I’m throwing the sponge. (Once I’ve figured thi…

---

## [Anyone can help me to solve this error?](https://discourse.julialang.org/t/anyone-can-help-me-to-solve-this-error/52877)

<div class="topic-metadata">

**Author:** [@samuelyen](https://discourse.julialang.org/u/samuelyen)\
**Replies:** 2\
**Last updated:** [January 5, 2021, 1:05pm UTC](https://discourse.julialang.org/t/anyone-can-help-me-to-solve-this-error/52877 "2021-01-05T13:05:20Z")

</div>

julia\> import Printf julia\> @printf(“%3.2f”, 3.1416) ERROR: LoadError: UndefVarError: @printf not defined in expression starting at REPL\[12\]:1

---

## [Can I create something like histogram2d using filter in Julia](https://discourse.julialang.org/t/can-i-create-something-like-histogram2d-using-filter-in-julia/52473)

<div class="topic-metadata">

**Author:** [@galihaktan](https://discourse.julialang.org/u/galihaktan)\
**Replies:** 2\
**Last updated:** [January 5, 2021, 11:31am UTC](https://discourse.julialang.org/t/can-i-create-something-like-histogram2d-using-filter-in-julia/52473 "2021-01-05T11:31:47Z")

</div>

i learned it is possible to create histogram like chart by using the Julia code using Plots a = randn(1000); b = \[length(filter(x -\> i \<= x \< i+.2, a)) for i = -4:.2:4\]; bar(b); i know this code is no good in terms of …

---

## [Can we call a julia function %%?](https://discourse.julialang.org/t/can-we-call-a-julia-function/52809)

<div class="topic-metadata">

**Author:** [@ZdM87](https://discourse.julialang.org/u/ZdM87)\
**Replies:** 9\
**Last updated:** [January 5, 2021, 10:42am UTC](https://discourse.julialang.org/t/can-we-call-a-julia-function/52809 "2021-01-05T10:42:03Z")

</div>

I was trying to name a function as %% but I did not succeed. I got: ERROR: LoadError: syntax: "%" is not a unary operator Can we name a function in julia as %%?

---

## [How to map Posgres json/jsonb type](https://discourse.julialang.org/t/how-to-map-posgres-json-jsonb-type/52831)

<div class="topic-metadata">

**Author:** [@Laco\_Kovac](https://discourse.julialang.org/u/Laco_Kovac)\
**Replies:** 4\
**Last updated:** [January 5, 2021, 10:06am UTC](https://discourse.julialang.org/t/how-to-map-posgres-json-jsonb-type/52831 "2021-01-05T10:06:07Z")

</div>

I am quite new to Julia and struggling with quite simple task. mutable struct XYZ id::Int64 item::JSON3.Object end To that structure I am trying to add default/empty constructor (setting item to empty JSON3.Object): …

---

## [Passing multiple C arguments to Julia function](https://discourse.julialang.org/t/passing-multiple-c-arguments-to-julia-function/51607)

<div class="topic-metadata">

**Author:** [@eduardovrs](https://discourse.julialang.org/u/eduardovrs)\
**Replies:** 4\
**Last updated:** [January 5, 2021, 9:33am UTC](https://discourse.julialang.org/t/passing-multiple-c-arguments-to-julia-function/51607 "2021-01-05T09:33:59Z")

</div>

Passing multiple C arguments to Julia function Hello, I am new to Julia, and I am trying to pass some C arguments to Julia. So far, I was able to send only one argument from C to Julia, but when trying to send multipl…

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

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