# Latest

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

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

**Page:** 1319

---

## [From Float type to Integer](https://discourse.julialang.org/t/from-float-type-to-integer/65392)

<div class="topic-metadata">

**Author:** [@juls](https://discourse.julialang.org/u/juls)\
**Replies:** 1\
**Last updated:** [July 27, 2021, 5:18pm UTC](https://discourse.julialang.org/t/from-float-type-to-integer/65392 "2021-07-27T17:18:15Z")

</div>

Hi, I wanted to obtain integer output instead of float type output from functions: floor(4.56), ceil(4.56). I would be glad to know how to obtain integer output for the same. Also, I read in documentation, interger di…

---

## [New Julia install: Downloading artifacts fails behind proxy](https://discourse.julialang.org/t/new-julia-install-downloading-artifacts-fails-behind-proxy/43816)

<div class="topic-metadata">

**Author:** [@danburns](https://discourse.julialang.org/u/danburns)\
**Replies:** 2\
**Last updated:** [July 27, 2021, 4:40pm UTC](https://discourse.julialang.org/t/new-julia-install-downloading-artifacts-fails-behind-proxy/43816 "2021-07-27T16:40:32Z")

</div>

I am installing Julia 1.4.2 on a new computer (MacOS), which is behind an http/https proxy. I have exported environment variables in the shell to set proxy variables: HTTP\_PROXY=http://\<company.server\>:3128 HTTPS\_PROXY=…

---

## [How can I find the subset of dataframe that contain elements with Number datatype?](https://discourse.julialang.org/t/how-can-i-find-the-subset-of-dataframe-that-contain-elements-with-number-datatype/65388)

<div class="topic-metadata">

**Author:** [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Replies:** 2\
**Last updated:** [July 27, 2021, 4:32pm UTC](https://discourse.julialang.org/t/how-can-i-find-the-subset-of-dataframe-that-contain-elements-with-number-datatype/65388 "2021-07-27T16:32:29Z")

</div>

Hi, I am trying to find subset of dataframe having elements with Number datatypes. But I couldn’t find any single function to find the subset. So I have implemented as #df is the dataframe with columns having Number an…

---

## [Found this Blog Post on Hacker News](https://discourse.julialang.org/t/found-this-blog-post-on-hacker-news/65386)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 1\
**Last updated:** [July 27, 2021, 4:26pm UTC](https://discourse.julialang.org/t/found-this-blog-post-on-hacker-news/65386 "2021-07-27T16:26:24Z")

</div>

What’s bad about Julia? The author dives into the problems they encountered while using Julia. What do you think?

---

## [LoopVectorization triggers segfault or deadlock for complex finite difference stencil](https://discourse.julialang.org/t/loopvectorization-triggers-segfault-or-deadlock-for-complex-finite-difference-stencil/65217)

<div class="topic-metadata">

**Author:** [@Chiil](https://discourse.julialang.org/u/Chiil)\
**Replies:** 1\
**Last updated:** [July 27, 2021, 3:54pm UTC](https://discourse.julialang.org/t/loopvectorization-triggers-segfault-or-deadlock-for-complex-finite-difference-stencil/65217 "2021-07-27T15:54:04Z")

</div>

I have written a finite difference 4th-order stencil generator macro and use the @tturbo to accelerate my loop. My code gives perfect results for a single thread run, but triggers either a segfault or a deadlock in multi…

---

## [Is there an equivalent of Haskell's fromMaybe?](https://discourse.julialang.org/t/is-there-an-equivalent-of-haskells-frommaybe/65367)

<div class="topic-metadata">

**Author:** [@orome](https://discourse.julialang.org/u/orome)\
**Replies:** 18\
**Last updated:** [July 27, 2021, 3:34pm UTC](https://discourse.julialang.org/t/is-there-an-equivalent-of-haskells-frommaybe/65367 "2021-07-27T15:34:13Z")

</div>

Is there a Julia equivalent of (or well worn idiom for) Haskell’s fromMaybe, e.g., for use with Union{T, Nothing}?

---

## [Registered package not showing up in general when running docs](https://discourse.julialang.org/t/registered-package-not-showing-up-in-general-when-running-docs/65381)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 1\
**Last updated:** [July 27, 2021, 3:33pm UTC](https://discourse.julialang.org/t/registered-package-not-showing-up-in-general-when-running-docs/65381 "2021-07-27T15:33:32Z")

</div>

Hi there, I registered TypeClasses 1.1.0 however my documenter run within github actions is not able to find it I get Run julia --project=docs -e ' Resolving package versions... Installing known registries into \`…

---

## [How to create an empty TimeArray](https://discourse.julialang.org/t/how-to-create-an-empty-timearray/65372)

<div class="topic-metadata">

**Author:** [@Yuan\_Jiun\_Thai](https://discourse.julialang.org/u/Yuan_Jiun_Thai)\
**Replies:** 1\
**Last updated:** [July 27, 2021, 2:55pm UTC](https://discourse.julialang.org/t/how-to-create-an-empty-timearray/65372 "2021-07-27T14:55:47Z")

</div>

How could I create an empty Time Array? I would like to “vcat” a few TimeArrays using for loop, but I would need an empty TimeArray to initialize the for loop. May I know how could I do that?

---

## [Getting nothing when a key is not present in a Dict](https://discourse.julialang.org/t/getting-nothing-when-a-key-is-not-present-in-a-dict/65376)

<div class="topic-metadata">

**Author:** [@orome](https://discourse.julialang.org/u/orome)\
**Replies:** 1\
**Last updated:** [July 27, 2021, 2:23pm UTC](https://discourse.julialang.org/t/getting-nothing-when-a-key-is-not-present-in-a-dict/65376 "2021-07-27T14:23:37Z")

</div>

Other than just trying, is there an idiom for returning nothing rather than throwing a KeyError when a key is missing from a Dict. I’m imagining something like something(x\[y\], something\_when\_y\_is\_absent) along the lin…

---

## [How to do I define a struct A which refer a struct B which refer A?](https://discourse.julialang.org/t/how-to-do-i-define-a-struct-a-which-refer-a-struct-b-which-refer-a/65373)

<div class="topic-metadata">

**Author:** [@zwtechnb](https://discourse.julialang.org/u/zwtechnb)\
**Replies:** 1\
**Last updated:** [July 27, 2021, 2:16pm UTC](https://discourse.julialang.org/t/how-to-do-i-define-a-struct-a-which-refer-a-struct-b-which-refer-a/65373 "2021-07-27T14:16:00Z")

</div>

For example: mutable struct A a::Int b::Ref{B} end mutable struct B b::Int a::Ref{A} end

---

## [Subtype or enum, which is prefer?](https://discourse.julialang.org/t/subtype-or-enum-which-is-prefer/65359)

<div class="topic-metadata">

**Author:** [@HaoxuanGuo](https://discourse.julialang.org/u/HaoxuanGuo)\
**Replies:** 8\
**Last updated:** [July 27, 2021, 2:10pm UTC](https://discourse.julialang.org/t/subtype-or-enum-which-is-prefer/65359 "2021-07-27T14:10:47Z")

</div>

abstract type AbstractFruit end struct Apple \<: AbstractFruit end struct Banana \<: AbstractFruit end struct Pear \<: AbstractFruit end color(::Apple) = :red color(::Banana) = :yellow color(::Pear) = :green and @enum Fr…

---

## [Understanding MultiAgent in ReinforcementLearning.jl](https://discourse.julialang.org/t/understanding-multiagent-in-reinforcementlearning-jl/65269)

<div class="topic-metadata">

**Author:** [@thae](https://discourse.julialang.org/u/thae)\
**Replies:** 2\
**Last updated:** [July 27, 2021, 2:04pm UTC](https://discourse.julialang.org/t/understanding-multiagent-in-reinforcementlearning-jl/65269 "2021-07-27T14:04:44Z")

</div>

Hello, let it be known that I know little about Julia and even less about Reinforcement Learning. I’ve written an environment so trivial it is meaningless just to understand how everything fits together. It’s a four-pla…

---

## [Get path to julia install?](https://discourse.julialang.org/t/get-path-to-julia-install/65315)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 4\
**Last updated:** [July 27, 2021, 1:47pm UTC](https://discourse.julialang.org/t/get-path-to-julia-install/65315 "2021-07-27T13:47:56Z")

</div>

I’ve been doing some memory profiling using --track-allocation=all. This puts output files in the same location as the source files, including in the base julia install, e.g. base/multidimensional.jl.27819.mem. Now I kno…

---

## [Broken Link on course's Welcome Page](https://discourse.julialang.org/t/broken-link-on-courses-welcome-page/65366)

<div class="topic-metadata">

**Author:** [@Seawolf2913](https://discourse.julialang.org/u/Seawolf2913)\
**Replies:** 0\
**Last updated:** [July 27, 2021, 12:58pm UTC](https://discourse.julialang.org/t/broken-link-on-courses-welcome-page/65366 "2021-07-27T12:58:05Z")

</div>

The “Getting Started with JuliaAcademy” link on the following page is broken. Is it suppose to point to this course: Getting Started With JuliaAcademy | JuliaAcademy or a separate web page?

---

## [How do you indicate that a field should be private?](https://discourse.julialang.org/t/how-do-you-indicate-that-a-field-should-be-private/65339)

<div class="topic-metadata">

**Author:** [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Replies:** 3\
**Last updated:** [July 27, 2021, 12:32pm UTC](https://discourse.julialang.org/t/how-do-you-indicate-that-a-field-should-be-private/65339 "2021-07-27T12:32:25Z")

</div>

In C#/Java we can do so with the private keyword, in Python we can use the underscore. I found this discussion on Github, but it’s from 2015. Is the accepted convention to use the underscore? struct Example \_this\_f…

---

## [Downloading files in \`runtests.jl\`](https://discourse.julialang.org/t/downloading-files-in-runtests-jl/65332)

<div class="topic-metadata">

**Author:** [@markmbaum](https://discourse.julialang.org/u/markmbaum)\
**Replies:** 4\
**Last updated:** [July 27, 2021, 11:34am UTC](https://discourse.julialang.org/t/downloading-files-in-runtests-jl/65332 "2021-07-27T11:34:23Z")

</div>

It would be really useful to download and use some data files when testing my package. The files don’t need to be part of the package, just for testing. Using Downloads.download inside the runtests.jl script seems to wor…

---

## [Need Diffractor.jl for State-of-the-Art Deep Learning Model](https://discourse.julialang.org/t/need-diffractor-jl-for-state-of-the-art-deep-learning-model/59423)

<div class="topic-metadata">

**Author:** [@Freddy\_Chua](https://discourse.julialang.org/u/Freddy_Chua)\
**Replies:** 12\
**Last updated:** [July 27, 2021, 11:03am UTC](https://discourse.julialang.org/t/need-diffractor-jl-for-state-of-the-art-deep-learning-model/59423 "2021-07-27T11:03:15Z")

</div>

Hi, I hope to beta test for your Diffractor.jl next generation AD. I am a co-author of DeepCPCFG \[2103.05908\] DeepCPCFG: Deep Learning and Context Free Grammars for End-to-End Information Extraction. This research is a…

---

## [A simplified example for DiffEqFlux](https://discourse.julialang.org/t/a-simplified-example-for-diffeqflux/65357)

<div class="topic-metadata">

**Author:** [@amit1](https://discourse.julialang.org/u/amit1)\
**Replies:** 1\
**Last updated:** [July 27, 2021, 10:59am UTC](https://discourse.julialang.org/t/a-simplified-example-for-diffeqflux/65357 "2021-07-27T10:59:44Z")

</div>

I am bit new to NeuralODE and hence trying to workout simple examples of own to understand it better. All Examples on DiffEqFlux webpage are equations where the Neural networks depend on u, or p. What about differentia…

---

## [Julia + named pipe crashing bash](https://discourse.julialang.org/t/julia-named-pipe-crashing-bash/65362)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 1\
**Last updated:** [July 27, 2021, 10:17am UTC](https://discourse.julialang.org/t/julia-named-pipe-crashing-bash/65362 "2021-07-27T10:17:52Z")

</div>

@bkamins proposes in this post a way to use Julia over a named pipe. Executing the code mkfifo pipe julia \<pipe \>log.txt 2\>err.txt & exec 3\>pipe echo "1+2" \>&3 echo "X" \>&3 echo "exit()" \>&3 cat log.txt cat err.txt i…

---

## [BoundsError: attempt to access 0-element Array{Any,1} at index \[1\]](https://discourse.julialang.org/t/boundserror-attempt-to-access-0-element-array-any-1-at-index-1/65360)

<div class="topic-metadata">

**Author:** [@kip0d](https://discourse.julialang.org/u/kip0d)\
**Replies:** 3\
**Last updated:** [July 27, 2021, 10:12am UTC](https://discourse.julialang.org/t/boundserror-attempt-to-access-0-element-array-any-1-at-index-1/65360 "2021-07-27T10:12:09Z")

</div>

Hello, this is my code: distvec = \[\] for indm = 1:M global distvec distvec\[indm\] = -(-Nvec\[1\]\* px\[indm\]- Nvec\[2\]\* py\[indm\]- Nvec\[3\]\* pz\[indm\])/sqrt(Nvec\[1\]^2+Nvec\[2\]^2+Nvec\[3\]^2) end The error I get: BoundsEr…

---

## [JuliaCon 2021 schedule of talks and workshops](https://discourse.julialang.org/t/juliacon-2021-schedule-of-talks-and-workshops/64579)

<div class="topic-metadata">

**Author:** [@gianmariomanca](https://discourse.julialang.org/u/gianmariomanca)\
**Replies:** 12\
**Last updated:** [July 27, 2021, 9:13am UTC](https://discourse.julialang.org/t/juliacon-2021-schedule-of-talks-and-workshops/64579 "2021-07-27T09:13:06Z")

</div>

When will the schedule be available? Some time to plan would be helpful (even if it’s online :slight\_smile: ). For example I was interested in the Diffractor.jl workshop, and I can only guess at this point that is some…

---

## [Creating an AbstractDataFrame subtype](https://discourse.julialang.org/t/creating-an-abstractdataframe-subtype/36451)

<div class="topic-metadata">

**Author:** [@DrPapa](https://discourse.julialang.org/u/DrPapa)\
**Replies:** 21\
**Last updated:** [July 27, 2021, 9:12am UTC](https://discourse.julialang.org/t/creating-an-abstractdataframe-subtype/36451 "2021-07-27T09:12:53Z")

</div>

I wish to create a new subtype of AbstractDataFrame that has a single DataFrame member. I then want to forward the AbstractDataFrame interface to the DataFrame member. Something like: using DataFrames using Lazy struct…

---

## [Unable to write DataFrame to Parquet or Arrow?](https://discourse.julialang.org/t/unable-to-write-dataframe-to-parquet-or-arrow/65284)

<div class="topic-metadata">

**Author:** [@NowanIlfideme](https://discourse.julialang.org/u/NowanIlfideme)\
**Replies:** 7\
**Last updated:** [July 27, 2021, 9:07am UTC](https://discourse.julialang.org/t/unable-to-write-dataframe-to-parquet-or-arrow/65284 "2021-07-27T09:07:11Z")

</div>

Hi, I’m trying to save a large DataFrame. Long story short, only the CSV and Feather packages seem to work at all, but I would prefer Arrow or Parquet. I’ve installed Parquet.jl and Arrow.jl, but they fail to work. I ass…

---

## [Add testing for memory allocations](https://discourse.julialang.org/t/add-testing-for-memory-allocations/49398)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 13\
**Last updated:** [July 27, 2021, 8:32am UTC](https://discourse.julialang.org/t/add-testing-for-memory-allocations/49398 "2021-07-27T08:32:21Z")

</div>

In the last few days I have been working in eliminating all unnecessary allocations in a package, found some type-instabilities, etc, and everything is much better now. I created, then, a set of tests to evaluate if, in…

---

## [Golang-like member functions](https://discourse.julialang.org/t/golang-like-member-functions/65254)

<div class="topic-metadata">

**Author:** [@peteole](https://discourse.julialang.org/u/peteole)\
**Replies:** 12\
**Last updated:** [July 27, 2021, 7:30am UTC](https://discourse.julialang.org/t/golang-like-member-functions/65254 "2021-07-27T07:30:58Z")

</div>

Hi, I recently found out about the notation for callables: function (obj::MyType)(x::Int) return obj.mymember\*x end I realized this syntax is extremely similar to the golang and rust-notation for member functions. …

---

## [(L-)BFGS for a user-defined function](https://discourse.julialang.org/t/l-bfgs-for-a-user-defined-function/65309)

<div class="topic-metadata">

**Author:** [@AhmedAlreweny](https://discourse.julialang.org/u/AhmedAlreweny)\
**Replies:** 6\
**Last updated:** [July 27, 2021, 6:28am UTC](https://discourse.julialang.org/t/l-bfgs-for-a-user-defined-function/65309 "2021-07-27T06:28:12Z")

</div>

Hi, I have a complex nonlinear user-defined function (blackbox) that I am trying to minimize using BFGS or L-BFGS. I found this library, but I can’t use it. I think it works only for simple algebraic expressions, it th…

---

## [Equation numbering in Documenter.jl](https://discourse.julialang.org/t/equation-numbering-in-documenter-jl/65349)

<div class="topic-metadata">

**Author:** [@sbrisard](https://discourse.julialang.org/u/sbrisard)\
**Replies:** 0\
**Last updated:** [July 27, 2021, 5:40am UTC](https://discourse.julialang.org/t/equation-numbering-in-documenter-jl/65349 "2021-07-27T05:40:48Z")

</div>

Equation numbering was discussed in this issue (see also this message). The solution proposed above by @mortenpi indeed works with the MathJax3 engine, but not with the… LaTeXWriter! Description of the problem The foll…

---

## [Check distributed Task status](https://discourse.julialang.org/t/check-distributed-task-status/65341)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 0\
**Last updated:** [July 27, 2021, 3:19am UTC](https://discourse.julialang.org/t/check-distributed-task-status/65341 "2021-07-27T03:19:41Z")

</div>

I am running a long session which contains an@distributed job. I forgot to assign the @distributed Task to a variable and now I don’t have a reference to it. Now I want to check when it’s finished. Is it possible to find…

---

## [JuliaFormatter.jl Alignment Help](https://discourse.julialang.org/t/juliaformatter-jl-alignment-help/65313)

<div class="topic-metadata">

**Author:** [@bmit](https://discourse.julialang.org/u/bmit)\
**Replies:** 3\
**Last updated:** [July 27, 2021, 1:26am UTC](https://discourse.julialang.org/t/juliaformatter-jl-alignment-help/65313 "2021-07-27T01:26:42Z")

</div>

I’ve been experimenting with JuliaFormatter v0.15.1 with 1.6.2 and I’ve had some trouble using the alignment flags. I have not changed any default settings or defined a JuliaFormatter.toml file. Here’s the contents of m…

---

## [Reduce allocations and speed up](https://discourse.julialang.org/t/reduce-allocations-and-speed-up/65221)

<div class="topic-metadata">

**Author:** [@daviddoij](https://discourse.julialang.org/u/daviddoij)\
**Replies:** 15\
**Last updated:** [July 27, 2021, 1:12am UTC](https://discourse.julialang.org/t/reduce-allocations-and-speed-up/65221 "2021-07-27T01:12:50Z")

</div>

Hi there, in my attempt to teach myself Julia, I’m solving Project Euler problems. The following code works and give the correct answer, although I was expecting better performance, as the time is similar to what I got …

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

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