# Latest

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

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

**Page:** 1953

---

## [Global optimization: Simulated Method of Moments](https://discourse.julialang.org/t/global-optimization-simulated-method-of-moments/23844)

<div class="topic-metadata">

**Author:** [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Replies:** 9\
**Last updated:** [July 26, 2019, 4:36pm UTC](https://discourse.julialang.org/t/global-optimization-simulated-method-of-moments/23844 "2019-07-26T16:36:12Z")

</div>

I work with non-linear models that need to be calibrated to match data moments. The setup is simple. I have a function that takes a set of parameters as input (for example, a vector of floats), solves the model, and retu…

---

## [A seriously interesting and interestingly serious talk](https://discourse.julialang.org/t/a-seriously-interesting-and-interestingly-serious-talk/26853)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 0\
**Last updated:** [July 26, 2019, 4:19pm UTC](https://discourse.julialang.org/t/a-seriously-interesting-and-interestingly-serious-talk/26853 "2019-07-26T16:19:48Z")

</div>

Everyone here in this forum has or should have appreciation of OSS. This talk is a must-see: JuliaCon 2019 | Keynote: Professor Heather Miller - YouTube Extremely well done! And a lot of very useful information.

---

## ["Textbook" use of pmap but strange execution times](https://discourse.julialang.org/t/textbook-use-of-pmap-but-strange-execution-times/26852)

<div class="topic-metadata">

**Author:** [@mgiugliano](https://discourse.julialang.org/u/mgiugliano)\
**Replies:** 0\
**Last updated:** [July 26, 2019, 4:15pm UTC](https://discourse.julialang.org/t/textbook-use-of-pmap-but-strange-execution-times/26852 "2019-07-26T16:15:28Z")

</div>

I have 28 cores and 56 threads and I call julia with “-p auto”. When starting from a (non-parallel) example, @time for x in \[10;ones(Int, 10)\] sleep(x/10); println(x) end its execution time (~2s) makes perfect se…

---

## [How to split package?](https://discourse.julialang.org/t/how-to-split-package/26850)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 2\
**Last updated:** [July 26, 2019, 4:06pm UTC](https://discourse.julialang.org/t/how-to-split-package/26850 "2019-07-26T16:06:47Z")

</div>

Hey! I am a bit new to package development but I started making a package and now it has been a bit clouded with funtionality. Say I want to split my module into two files: PostSPH.jl (main file, which holds the module…

---

## [Return NaN instead of DomainError](https://discourse.julialang.org/t/return-nan-instead-of-domainerror/15493)

<div class="topic-metadata">

**Author:** [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Replies:** 21\
**Last updated:** [July 26, 2019, 2:19pm UTC](https://discourse.julialang.org/t/return-nan-instead-of-domainerror/15493 "2019-07-26T14:19:39Z")

</div>

I could not find a way to make function calls like sqrt(-2) return NaN instead of raising an error. Is that possible? It would be quite useful, at least sometimes, to just let the NaN propagate to the final result. Also…

---

## [What's the best way to compare items in an array to every other item?](https://discourse.julialang.org/t/whats-the-best-way-to-compare-items-in-an-array-to-every-other-item/26806)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 11\
**Last updated:** [July 26, 2019, 2:08pm UTC](https://discourse.julialang.org/t/whats-the-best-way-to-compare-items-in-an-array-to-every-other-item/26806 "2019-07-26T14:08:52Z")

</div>

Say I have the following array: names = \["John Doe", "Bugs Bunny", "Cosmo Kramer", "Jon Doe", "Elmer Fudd", "Kosmo Cramer"\] I would like to compare each string in the array with every other string in the array and comp…

---

## [Jupyterlab IJulia kernel "too many file descriptors in select()"](https://discourse.julialang.org/t/jupyterlab-ijulia-kernel-too-many-file-descriptors-in-select/26606)

<div class="topic-metadata">

**Author:** [@ralphmrm1](https://discourse.julialang.org/u/ralphmrm1)\
**Replies:** 8\
**Last updated:** [July 26, 2019, 11:34am UTC](https://discourse.julialang.org/t/jupyterlab-ijulia-kernel-too-many-file-descriptors-in-select/26606 "2019-07-26T11:34:53Z")

</div>

Jupyterlab (Windows 10, local) works for a while (~15 min), then the kernel dies with the message Server Connection Error A connection to the Jupyter server could not be established. JupyterLab will continue trying to …

---

## [Can this be done using a struct?](https://discourse.julialang.org/t/can-this-be-done-using-a-struct/26833)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 2\
**Last updated:** [July 26, 2019, 10:27am UTC](https://discourse.julialang.org/t/can-this-be-done-using-a-struct/26833 "2019-07-26T10:27:50Z")

</div>

Hey guys. Say that I am reading an XML file and getting the following information: k\[1:2\] 2-element Array{XMLElement,1}: \<floating mkbound="1" mk="12" begin="7206" count="21" property="hard-wood"\> \<mas…

---

## [Problem building CUDAnative](https://discourse.julialang.org/t/problem-building-cudanative/26540)

<div class="topic-metadata">

**Author:** [@vargonis](https://discourse.julialang.org/u/vargonis)\
**Replies:** 2\
**Last updated:** [July 26, 2019, 7:29am UTC](https://discourse.julialang.org/t/problem-building-cudanative/26540 "2019-07-26T07:29:41Z")

</div>

Hi there. I’m trying to setup Julia to use CuArrays. I have Julia 1.0.4 and the cuda toolkit 10.1, on Pop!\_OS. I’m doing (on the REPL) ENV\["LD\_LIBRARY\_PATH"\] = "/usr/lib/cuda/lib64" ENV\["CUDA\_PATH"\] = "/usr/lib/cuda" u…

---

## [Error building FFTW](https://discourse.julialang.org/t/error-building-fftw/26827)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 1\
**Last updated:** [July 26, 2019, 7:20am UTC](https://discourse.julialang.org/t/error-building-fftw/26827 "2019-07-26T07:20:50Z")

</div>

Does anybody understand what the problem is here and how I can fix it? PS C:\\Users\\Ilja\> jlpkg build FFTW Building Conda → \`C:\\Users\\Ilja\\.julia\\packages\\Conda\\kLXeC\\deps\\build.log\` Building FFTW ─→ \`C:\\Users\\Ilja\\.…

---

## [Build a website with Julia](https://discourse.julialang.org/t/build-a-website-with-julia/26741)

<div class="topic-metadata">

**Author:** [@General\_Augustus](https://discourse.julialang.org/u/General_Augustus)\
**Replies:** 2\
**Last updated:** [July 26, 2019, 6:54am UTC](https://discourse.julialang.org/t/build-a-website-with-julia/26741 "2019-07-26T06:54:41Z")

</div>

Very attracted by the concept of Julia, I’d like to try myself on an exercice. I wonder if its possible to use the Julia base to design a website and build a little interactive ERP, doing calls to multiple languages (py…

---

## [I cannot precompile Approxfun because of StackOverflowError](https://discourse.julialang.org/t/i-cannot-precompile-approxfun-because-of-stackoverflowerror/26652)

<div class="topic-metadata">

**Author:** [@charlierch](https://discourse.julialang.org/u/charlierch)\
**Replies:** 4\
**Last updated:** [July 26, 2019, 6:54am UTC](https://discourse.julialang.org/t/i-cannot-precompile-approxfun-because-of-stackoverflowerror/26652 "2019-07-26T06:54:14Z")

</div>

Hi everyone, I am completely new to Julia. I have tried to use the package Approxfun. I have no problem with its installation: input: import Pkg; Pkg.add(“ApproxFun”) Pkg.status() output: Resolving package version…

---

## [NLP Engineer in London UK](https://discourse.julialang.org/t/nlp-engineer-in-london-uk/26826)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 0\
**Last updated:** [July 26, 2019, 6:06am UTC](https://discourse.julialang.org/t/nlp-engineer-in-london-uk/26826 "2019-07-26T06:06:39Z")

</div>

No direct mention of Julia, but this might be good for someone on here. I do not work at this company.

---

## [Roc meetup persons?](https://discourse.julialang.org/t/roc-meetup-persons/26825)

<div class="topic-metadata">

**Author:** [@telepterodact](https://discourse.julialang.org/u/telepterodact)\
**Replies:** 0\
**Last updated:** [July 26, 2019, 5:56am UTC](https://discourse.julialang.org/t/roc-meetup-persons/26825 "2019-07-26T05:56:15Z")

</div>

Y’all persons out here? Let’s get it…

---

## [Macro for enabling/disabling parts of code](https://discourse.julialang.org/t/macro-for-enabling-disabling-parts-of-code/26543)

<div class="topic-metadata">

**Author:** [@phlavenk](https://discourse.julialang.org/u/phlavenk)\
**Replies:** 4\
**Last updated:** [July 26, 2019, 4:55am UTC](https://discourse.julialang.org/t/macro-for-enabling-disabling-parts-of-code/26543 "2019-07-26T04:55:55Z")

</div>

I’ve often desired to have “optional” execution paths in my code that I could activate from outside of the function. This would be helpful in situations where I have a complex function that does several data processing s…

---

## [What type of code is \`threads\` good for?](https://discourse.julialang.org/t/what-type-of-code-is-threads-good-for/26759)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 12\
**Last updated:** [July 26, 2019, 4:46am UTC](https://discourse.julialang.org/t/what-type-of-code-is-threads-good-for/26759 "2019-07-26T04:46:32Z")

</div>

I was reading the latest blog post on multithreading and have a few questions on what applications can benefit from threading. This is how I visualize threads in my head: Suppose a CPU has two threads. You can spawn tas…

---

## [ForwardDiff question](https://discourse.julialang.org/t/forwarddiff-question/26712)

<div class="topic-metadata">

**Author:** [@mbeach42](https://discourse.julialang.org/u/mbeach42)\
**Replies:** 6\
**Last updated:** [July 26, 2019, 4:22am UTC](https://discourse.julialang.org/t/forwarddiff-question/26712 "2019-07-26T04:22:42Z")

</div>

I’m having trouble debugging why ForwardDiff is not working for my function. Below is a mwe. Its very close to working, but I can’t figure it out. using ForwardDiff using LinearAlgebra struct Stack M::Matrix{Int} …

---

## [Reduce allocations in @distributed for](https://discourse.julialang.org/t/reduce-allocations-in-distributed-for/26819)

<div class="topic-metadata">

**Author:** [@xzackli](https://discourse.julialang.org/u/xzackli)\
**Replies:** 1\
**Last updated:** [July 26, 2019, 3:29am UTC](https://discourse.julialang.org/t/reduce-allocations-in-distributed-for/26819 "2019-07-26T03:29:44Z")

</div>

I’m doing some cheap operations on a set of huge SharedArrays, i.e. computing the distance from x,y,z. using Distributed addprocs(40); @everywhere using SharedArrays function compute\_distance(result::SharedArray, pos::…

---

## [Ignore CSV comments in a DataFrame](https://discourse.julialang.org/t/ignore-csv-comments-in-a-dataframe/26785)

<div class="topic-metadata">

**Author:** [@MuadhF](https://discourse.julialang.org/u/MuadhF)\
**Replies:** 1\
**Last updated:** [July 26, 2019, 3:14am UTC](https://discourse.julialang.org/t/ignore-csv-comments-in-a-dataframe/26785 "2019-07-26T03:14:12Z")

</div>

Hi, I’ve noticed that when creating a DataFrame using a CSV file, it registers comments as missing. For example, a section of my CSV file is “Annual Interest Rate, 0.08 #ignore this” but when I create the DataFra…

---

## [libLLVM Issue when Adding/Building Packages](https://discourse.julialang.org/t/libllvm-issue-when-adding-building-packages/17523)

<div class="topic-metadata">

**Author:** [@GabrielYin](https://discourse.julialang.org/u/GabrielYin)\
**Replies:** 3\
**Last updated:** [July 26, 2019, 2:37am UTC](https://discourse.julialang.org/t/libllvm-issue-when-adding-building-packages/17523 "2019-07-26T02:37:44Z")

</div>

Hi there, I tried to install JuMP 0.18.4 in Julia version 1.0.1, and it succeeded. When I tested the package, however, it told me to rebuild the SpecialFunctions. But then it failed to build this because of a LoadError:…

---

## [Should I use either Dataframes.jl or Named Array for a long and wide array for sci computing](https://discourse.julialang.org/t/should-i-use-either-dataframes-jl-or-named-array-for-a-long-and-wide-array-for-sci-computing/26803)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 7\
**Last updated:** [July 25, 2019, 11:41pm UTC](https://discourse.julialang.org/t/should-i-use-either-dataframes-jl-or-named-array-for-a-long-and-wide-array-for-sci-computing/26803 "2019-07-25T23:41:02Z")

</div>

I am writing a simulation that captures a lot of statistics from a mathematical model. Hence I have an array that is long (like 100,000) rows, but also very wide, like 100 columns. I am actually moving the simulation fro…

---

## [Waveform Characterization](https://discourse.julialang.org/t/waveform-characterization/20654)

<div class="topic-metadata">

**Author:** [@bomber8013](https://discourse.julialang.org/u/bomber8013)\
**Replies:** 3\
**Last updated:** [July 25, 2019, 10:45pm UTC](https://discourse.julialang.org/t/waveform-characterization/20654 "2019-07-25T22:45:57Z")

</div>

I am developing a library for basic waveform characterization. Linked WaveformAnalysis.jl I have a few of the functions done pretty well done in the most efficient way I can think of. I am getting hung up right now with…

---

## [How to force single column array?](https://discourse.julialang.org/t/how-to-force-single-column-array/26746)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 31\
**Last updated:** [July 25, 2019, 9:28pm UTC](https://discourse.julialang.org/t/how-to-force-single-column-array/26746 "2019-07-25T21:28:28Z")

</div>

Hey guys, I want to make an array with only a single column, so ie. something like 4x1 Array{Int32,1} Whenever I use zeros or undef I get like this: zeros(Int32,4,1) 4×1 Array{Int32,2}: 0 0 0 0 Can I force the out…

---

## [Possible Issue? Performance making tuples from vectors](https://discourse.julialang.org/t/possible-issue-performance-making-tuples-from-vectors/26809)

<div class="topic-metadata">

**Author:** [@clinton](https://discourse.julialang.org/u/clinton)\
**Replies:** 0\
**Last updated:** [July 25, 2019, 8:08pm UTC](https://discourse.julialang.org/t/possible-issue-performance-making-tuples-from-vectors/26809 "2019-07-25T20:08:06Z")

</div>

I am posting this here first since it seems very similar to #32673, including that it only seems to affect compile time. Happy to file an issue though. Switching to any union type makes performance far worse (as in (O(N…

---

## [Convert all strings in a DataFrame to upper case in the most performant way possible](https://discourse.julialang.org/t/convert-all-strings-in-a-dataframe-to-upper-case-in-the-most-performant-way-possible/26794)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 9\
**Last updated:** [July 25, 2019, 5:24pm UTC](https://discourse.julialang.org/t/convert-all-strings-in-a-dataframe-to-upper-case-in-the-most-performant-way-possible/26794 "2019-07-25T17:24:07Z")

</div>

Converting all strings to either upper- or lower-case is a common task in data prep/cleaning. Currently, I do this as follows: function uppercase\_strings(df::DataFrame) for row in eachrow(describe(df)) if ro…

---

## [How do you structure your code?](https://discourse.julialang.org/t/how-do-you-structure-your-code/26566)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 12\
**Last updated:** [July 25, 2019, 5:03pm UTC](https://discourse.julialang.org/t/how-do-you-structure-your-code/26566 "2019-07-25T17:03:42Z")

</div>

I’m defining N types and let’s say there are 5-15 functions for each types. How would you structure your code? Each file contains a single type and related definitions One file contains all types, and a separate file …

---

## [Tracking initial condition to optimize starting value too Diffeqflux](https://discourse.julialang.org/t/tracking-initial-condition-to-optimize-starting-value-too-diffeqflux/26596)

<div class="topic-metadata">

**Author:** [@freemint](https://discourse.julialang.org/u/freemint)\
**Replies:** 11\
**Last updated:** [July 25, 2019, 4:21pm UTC](https://discourse.julialang.org/t/tracking-initial-condition-to-optimize-starting-value-too-diffeqflux/26596 "2019-07-25T16:21:44Z")

</div>

Hello, i am curious whether i can use existing tooling to optimize initial conditions too. So far i only got the error: \*\*MethodError: no method matching OrdinaryDiffEq.Tsit5Cache(::TrackedArray{…,Array{Float64,1}}, :…

---

## [Variable reference in a function created by a macro](https://discourse.julialang.org/t/variable-reference-in-a-function-created-by-a-macro/26722)

<div class="topic-metadata">

**Author:** [@bocc](https://discourse.julialang.org/u/bocc)\
**Replies:** 7\
**Last updated:** [July 25, 2019, 3:56pm UTC](https://discourse.julialang.org/t/variable-reference-in-a-function-created-by-a-macro/26722 "2019-07-25T15:56:31Z")

</div>

Hello, I am trying to use IntervalConstraintProgramming & associated packages to solve a geometric feasibility problem. In order to be able to use functions in constraints, the ICP package provides a macro for function …

---

## [Best practices for parallel generation of pseudo-random numbers](https://discourse.julialang.org/t/best-practices-for-parallel-generation-of-pseudo-random-numbers/26504)

<div class="topic-metadata">

**Author:** [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Replies:** 11\
**Last updated:** [July 25, 2019, 3:35pm UTC](https://discourse.julialang.org/t/best-practices-for-parallel-generation-of-pseudo-random-numbers/26504 "2019-07-25T15:35:08Z")

</div>

I’m relatively new to the world of simulation and am running some discrete event simulations using SimJulia.jl and Distributions.jl for a graduate-level class. I noticed that the Wikipedia article for Mersenne Twister (w…

---

## [Subtypes or parametric types to define constructor-dependent functions](https://discourse.julialang.org/t/subtypes-or-parametric-types-to-define-constructor-dependent-functions/26681)

<div class="topic-metadata">

**Author:** [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Replies:** 6\
**Last updated:** [July 25, 2019, 3:23pm UTC](https://discourse.julialang.org/t/subtypes-or-parametric-types-to-define-constructor-dependent-functions/26681 "2019-07-25T15:23:53Z")

</div>

I have a structure of data that can be returned by two (or more) different functions, such as: struct MyType x::Int end f1(x) = MyType(x) f2(x, y) = MyType(x - y) Now, I want another function g to take such object…

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

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