# Latest

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

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

**Page:** 1819

---

## [Programmaticly build expression for JuMP NLconstraint](https://discourse.julialang.org/t/programmaticly-build-expression-for-jump-nlconstraint/34950)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 2\
**Last updated:** [February 21, 2020, 1:28am UTC](https://discourse.julialang.org/t/programmaticly-build-expression-for-jump-nlconstraint/34950 "2020-02-21T01:28:06Z")

</div>

I’m trying to define a nonlinear constraint programmatically via expressions. Specifically, I have a function f that takes in arguments x (a JuMP Variable), i (the index of the variable), and p (some parameters). The rea…

---

## [How to create private arrays for each thread before a loop?](https://discourse.julialang.org/t/how-to-create-private-arrays-for-each-thread-before-a-loop/34987)

<div class="topic-metadata">

**Author:** [@pedrohnv](https://discourse.julialang.org/u/pedrohnv)\
**Replies:** 2\
**Last updated:** [February 21, 2020, 10:39pm UTC](https://discourse.julialang.org/t/how-to-create-private-arrays-for-each-thread-before-a-loop/34987 "2020-02-21T22:39:30Z")

</div>

I have a loop that does some linear algebra. Each iteration is independent of each other. I need some helper arrays in each iteration. How can I make each thread allocate its helper arrays once before the loop? In the e…

---

## [Issues querying a DataFrame](https://discourse.julialang.org/t/issues-querying-a-dataframe/34943)

<div class="topic-metadata">

**Author:** [@bensetterholm](https://discourse.julialang.org/u/bensetterholm)\
**Replies:** 5\
**Last updated:** [February 21, 2020, 8:21pm UTC](https://discourse.julialang.org/t/issues-querying-a-dataframe/34943 "2020-02-21T20:21:57Z")

</div>

Suppose I have a DataFrame df which was generated by a Dictionary which may include whitespace in the keys using DataFrames myDict = Dict() myDict\["aKey"\] = 1:10 myDict\["anotherKey"\] = zeros(10) myDict\["a\_nice\_key"\] = …

---

## [Parametric and Union Types](https://discourse.julialang.org/t/parametric-and-union-types/34932)

<div class="topic-metadata">

**Author:** [@fedario](https://discourse.julialang.org/u/fedario)\
**Replies:** 11\
**Last updated:** [February 21, 2020, 8:11pm UTC](https://discourse.julialang.org/t/parametric-and-union-types/34932 "2020-02-21T20:11:50Z")

</div>

Hi Community! While playing around with types, some questions came up: What is the difference between Type{\<:Union{Int,String}} and Union{Type{Int}, Type{String}}? Type{\<:Union{Int,String}} |\> supertype # Any Typ…

---

## [Asynchronously storing results](https://discourse.julialang.org/t/asynchronously-storing-results/34989)

<div class="topic-metadata">

**Author:** [@Andre\_Mello](https://discourse.julialang.org/u/Andre_Mello)\
**Replies:** 2\
**Last updated:** [February 21, 2020, 7:03pm UTC](https://discourse.julialang.org/t/asynchronously-storing-results/34989 "2020-02-21T19:03:08Z")

</div>

I’ve been experimenting with the @sync and @async macros and I need some advice. Basically, I have some (nested) embarrassingly parallel loops. The issue is, I want to store the calculations from each function call asyn…

---

## [Getting user input like with Java's Scanner](https://discourse.julialang.org/t/getting-user-input-like-with-javas-scanner/34960)

<div class="topic-metadata">

**Author:** [@Lorenzo](https://discourse.julialang.org/u/Lorenzo)\
**Replies:** 12\
**Last updated:** [February 21, 2020, 6:24pm UTC](https://discourse.julialang.org/t/getting-user-input-like-with-javas-scanner/34960 "2020-02-21T18:24:41Z")

</div>

Hi guys, this is my first post with a super-newbie question I’d like to ask: As you may have noticed, I’m new to Julia and I have been coding with Java for a year. I’d like to get user-input just like in Java but I’m s…

---

## [Broadcasting over an anonymous function much slower than map](https://discourse.julialang.org/t/broadcasting-over-an-anonymous-function-much-slower-than-map/34874)

<div class="topic-metadata">

**Author:** [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Replies:** 4\
**Last updated:** [February 21, 2020, 5:35pm UTC](https://discourse.julialang.org/t/broadcasting-over-an-anonymous-function-much-slower-than-map/34874 "2020-02-21T17:35:56Z")

</div>

I am on Julia 1.3. I do not understand why broadcasting over an anonymous function is much slower than map: julia\> x1, x2 = rand(10^6), rand(10^6); julia\> @time ((x1, x2) -\> x1 \< x2).(x1, x2); 0.265166 seconds (241.2…

---

## [Declaring a structure as a subtype?](https://discourse.julialang.org/t/declaring-a-structure-as-a-subtype/34917)

<div class="topic-metadata">

**Author:** [@squirrel](https://discourse.julialang.org/u/squirrel)\
**Replies:** 5\
**Last updated:** [February 21, 2020, 4:43pm UTC](https://discourse.julialang.org/t/declaring-a-structure-as-a-subtype/34917 "2020-02-21T16:43:33Z")

</div>

So I have an algorithm that has several different steps to perform on matrices. I started declaring new types to ensure that matrices aren’t passed prematurely to the next step, or redundantly to a previous one. For exa…

---

## [Sharing a private package](https://discourse.julialang.org/t/sharing-a-private-package/34982)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 1\
**Last updated:** [February 21, 2020, 4:39pm UTC](https://discourse.julialang.org/t/sharing-a-private-package/34982 "2020-02-21T16:39:57Z")

</div>

I want to share a private package that I have as a repo but I don’t want to share the repo itself. Is there a way to just use a folder and load it? How can this be done if I have two packages where one depends on the o…

---

## [Vector vs Column vector](https://discourse.julialang.org/t/vector-vs-column-vector/34699)

<div class="topic-metadata">

**Author:** [@ea42gh](https://discourse.julialang.org/u/ea42gh)\
**Replies:** 13\
**Last updated:** [February 21, 2020, 4:27pm UTC](https://discourse.julialang.org/t/vector-vs-column-vector/34699 "2020-02-21T16:27:20Z")

</div>

I can’t wrap my mind around the following: a=\[ 2 4\]; b = \[3; 6\]; c = a\*b a is a row vector (matrix) I expected b to be a column vector: it is a vector, though, so the computation of c=a\*b fails. How should I think a…

---

## [Best way to implement shortcut connections for feed-forward neural networks in Flux.jl](https://discourse.julialang.org/t/best-way-to-implement-shortcut-connections-for-feed-forward-neural-networks-in-flux-jl/10633)

<div class="topic-metadata">

**Author:** [@Azamat](https://discourse.julialang.org/u/Azamat)\
**Replies:** 10\
**Last updated:** [February 21, 2020, 3:19pm UTC](https://discourse.julialang.org/t/best-way-to-implement-shortcut-connections-for-feed-forward-neural-networks-in-flux-jl/10633 "2020-02-21T15:19:32Z")

</div>

Using Flux.jl, I would like to build Feed-Forward Neural Network, but with shortcut connections like those found in ResNet. What would be the best way to do this? I know that something like Chain(Dense(10, 5, relu), Den…

---

## [Serious slowdown with FFTW v1.1.0 and v1.2.0 on Windows](https://discourse.julialang.org/t/serious-slowdown-with-fftw-v1-1-0-and-v1-2-0-on-windows/34726)

<div class="topic-metadata">

**Author:** [@turtle](https://discourse.julialang.org/u/turtle)\
**Replies:** 21\
**Last updated:** [February 21, 2020, 2:22pm UTC](https://discourse.julialang.org/t/serious-slowdown-with-fftw-v1-1-0-and-v1-2-0-on-windows/34726 "2020-02-21T14:22:38Z")

</div>

I have just upgraded from Julia 0.7.0 → 1.0.5 and 1.3.1, and experienced a serious slowdown. It seems to me that the reason is the default FFTW version that is: FFTW v0.2.4 for Julia 0.7.0 FFTW v1.1.0 for Julia 1.0.5 …

---

## [Multi-thread parsing json](https://discourse.julialang.org/t/multi-thread-parsing-json/33389)

<div class="topic-metadata">

**Author:** [@racinmat](https://discourse.julialang.org/u/racinmat)\
**Replies:** 16\
**Last updated:** [February 21, 2020, 2:07pm UTC](https://discourse.julialang.org/t/multi-thread-parsing-json/33389 "2020-02-21T14:07:31Z")

</div>

Hi, I am loading lots of gzipped jsons, parsing and further processing them. TL;DR: Why is map much slower than list comprehension/dot notation when using in tmap on multiple threads? I am trying to use multiple thread…

---

## [Pmap and udp socket communication causes segmentation fault](https://discourse.julialang.org/t/pmap-and-udp-socket-communication-causes-segmentation-fault/34977)

<div class="topic-metadata">

**Author:** [@racinmat](https://discourse.julialang.org/u/racinmat)\
**Replies:** 0\
**Last updated:** [February 21, 2020, 2:05pm UTC](https://discourse.julialang.org/t/pmap-and-udp-socket-communication-causes-segmentation-fault/34977 "2020-02-21T14:05:04Z")

</div>

I need to do some data processing in a highly parallel manner and want to track how many of it was done. For that, I am using pmap and sending some message over UDP to signal that a single sample was processed (to send …

---

## [StructuredOptimization.jl : parsing issue when adding constraints](https://discourse.julialang.org/t/structuredoptimization-jl-parsing-issue-when-adding-constraints/34411)

<div class="topic-metadata">

**Author:** [@rpetit](https://discourse.julialang.org/u/rpetit)\
**Replies:** 8\
**Last updated:** [February 21, 2020, 1:50pm UTC](https://discourse.julialang.org/t/structuredoptimization-jl-parsing-issue-when-adding-constraints/34411 "2020-02-21T13:50:49Z")

</div>

Hi, I’m trying to solve a modified LASSO where weights are constrained to be nonnegative, using StructuredOptimization.jl. The documentation suggests this should be possible using a code similar to the one below : usin…

---

## [Warntype from anonymous function](https://discourse.julialang.org/t/warntype-from-anonymous-function/34975)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 1\
**Last updated:** [February 21, 2020, 1:23pm UTC](https://discourse.julialang.org/t/warntype-from-anonymous-function/34975 "2020-02-21T13:23:02Z")

</div>

anonymous = (x -\> 2x) callanonymous(a) = anonymous(a) normal(x) = 2x callnormal(a) = normal(a) julia\> @code\_warntype callanonymous(1) Body::Any 1 ─ %1 = Main.anonymous(a)::Any └── return %1 julia\> @code\_warntype …

---

## [Data Layout](https://discourse.julialang.org/t/data-layout/34974)

<div class="topic-metadata">

**Author:** [@Kruxigt](https://discourse.julialang.org/u/Kruxigt)\
**Replies:** 1\
**Last updated:** [February 21, 2020, 1:04pm UTC](https://discourse.julialang.org/t/data-layout/34974 "2020-02-21T13:04:26Z")

</div>

Good day! I’m trying to come up with the best data layout using structs for the following situation. I have a struct mutable struct MyStruct field1::Float64 field2::String end From this struct I would like to li…

---

## [\[ANN\] TensorBoardLogger.jl v0.1.6 - Easy peasy logging to TensorBoard from Julia](https://discourse.julialang.org/t/ann-tensorboardlogger-jl-v0-1-6-easy-peasy-logging-to-tensorboard-from-julia/34931)

<div class="topic-metadata">

**Author:** [@PhilipV](https://discourse.julialang.org/u/PhilipV)\
**Replies:** 2\
**Last updated:** [February 21, 2020, 1:04pm UTC](https://discourse.julialang.org/t/ann-tensorboardlogger-jl-v0-1-6-easy-peasy-logging-to-tensorboard-from-julia/34931 "2020-02-21T13:04:02Z")

</div>

Hi everyone! In the last 6 months, also thanks to the help of @oxinabox and @shashikdm, we have slowly-but-steadily developed a nice package to work with TensorBoard directly from Julia. The package is called TensorBoa…

---

## [Aggregated Binary Data in MixedModels](https://discourse.julialang.org/t/aggregated-binary-data-in-mixedmodels/34919)

<div class="topic-metadata">

**Author:** [@talat](https://discourse.julialang.org/u/talat)\
**Replies:** 1\
**Last updated:** [February 21, 2020, 9:03am UTC](https://discourse.julialang.org/t/aggregated-binary-data-in-mixedmodels/34919 "2020-02-21T09:03:29Z")

</div>

Hello all, I’m trying to fit a generalized linear mixed model using the MixedModels package. It works fine as long as I use “normal” binary data i.e. response vector is simply 0/1 and each observartion is one row. I wou…

---

## [Type system limitations](https://discourse.julialang.org/t/type-system-limitations/34963)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 5\
**Last updated:** [February 21, 2020, 12:39pm UTC](https://discourse.julialang.org/t/type-system-limitations/34963 "2020-02-21T12:39:09Z")

</div>

Conceptually I want to do something like function f(x::V{T}, y::W{U}) where V where T where W where U yy = convert(V{U}, y) ... end which is not possible, and seems to be a common problem (https://discourse.juli…

---

## [Best practice for saving models (MixedModels.jk](https://discourse.julialang.org/t/best-practice-for-saving-models-mixedmodels-jk/21753)

<div class="topic-metadata">

**Author:** [@amillscampisi](https://discourse.julialang.org/u/amillscampisi)\
**Replies:** 1\
**Last updated:** [February 21, 2020, 11:14am UTC](https://discourse.julialang.org/t/best-practice-for-saving-models-mixedmodels-jk/21753 "2020-02-21T11:14:30Z")

</div>

I build a model in MixedModels.jl. I need to save this model. If this were Python I would pickle it. What is the best practice for Julia?

---

## [Open Source Energy Optimization JuMP Model: REopt Lite](https://discourse.julialang.org/t/open-source-energy-optimization-jump-model-reopt-lite/34934)

<div class="topic-metadata">

**Author:** [@JosiahPohl](https://discourse.julialang.org/u/JosiahPohl)\
**Replies:** 1\
**Last updated:** [February 21, 2020, 11:05am UTC](https://discourse.julialang.org/t/open-source-energy-optimization-jump-model-reopt-lite/34934 "2020-02-21T11:05:47Z")

</div>

My team at the National Renewable Energy Laboratory (NREL) recently converted the optimization engine for the REopt Lite Web Tool from Mosel to JuMP and open-sourced the whole API. Would love for you to check it and feel…

---

## [Packages that depend on unregistered packages](https://discourse.julialang.org/t/packages-that-depend-on-unregistered-packages/34908)

<div class="topic-metadata">

**Author:** [@RJDennis](https://discourse.julialang.org/u/RJDennis)\
**Replies:** 2\
**Last updated:** [February 21, 2020, 10:27am UTC](https://discourse.julialang.org/t/packages-that-depend-on-unregistered-packages/34908 "2020-02-21T10:27:27Z")

</div>

Hi All, I have a package that was registered pre-0.7 and that has a REQUIRE file and not a Project.toml file. I want to make improvements to this package and tag an update. The improvements that I want to make will ma…

---

## [How to test a program with command line parameters](https://discourse.julialang.org/t/how-to-test-a-program-with-command-line-parameters/34901)

<div class="topic-metadata">

**Author:** [@johnculpin](https://discourse.julialang.org/u/johnculpin)\
**Replies:** 2\
**Last updated:** [February 21, 2020, 9:45am UTC](https://discourse.julialang.org/t/how-to-test-a-program-with-command-line-parameters/34901 "2020-02-21T09:45:00Z")

</div>

Hello, I have written a program that accepts command line arguments e.g. $ julia compiler.jl filename1 where “filename1” could be the file to compile or a directory name where all the code resides. What I was wonderi…

---

## [Flux failing on GPU](https://discourse.julialang.org/t/flux-failing-on-gpu/18948)

<div class="topic-metadata">

**Author:** [@jcreinhold](https://discourse.julialang.org/u/jcreinhold)\
**Replies:** 25\
**Last updated:** [February 21, 2020, 8:00am UTC](https://discourse.julialang.org/t/flux-failing-on-gpu/18948 "2020-02-21T08:00:01Z")

</div>

Hello all, I’ve been trying to get up and running with Flux to create some DNNs in Julia, but I’ve been running into some issues with getting CUDA working with Flux. I have some preliminary work in this notebook. I tri…

---

## [ERROR: \[...\] is not satisfied, cannot generate deps.jl! when building after a Pkg.update()](https://discourse.julialang.org/t/error-is-not-satisfied-cannot-generate-deps-jl-when-building-after-a-pkg-update/34953)

<div class="topic-metadata">

**Author:** [@ElectronicTeaCup](https://discourse.julialang.org/u/ElectronicTeaCup)\
**Replies:** 0\
**Last updated:** [February 21, 2020, 7:40am UTC](https://discourse.julialang.org/t/error-is-not-satisfied-cannot-generate-deps-jl-when-building-after-a-pkg-update/34953 "2020-02-21T07:40:55Z")

</div>

I’m getting this kind of error on a couple of dependencies of a package (MAT.jl). I get an idea from the error that the requirements for the package aren’t fulfilled—but these packages weren’t updated recently. Can anyon…

---

## [Unknown hang-up in v1.3.1](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 8\
**Last updated:** [February 21, 2020, 7:16am UTC](https://discourse.julialang.org/t/unknown-hang-up-in-v1-3-1/34912 "2020-02-21T07:16:37Z")

</div>

Julia v1.3.1 hangs when running the following call of pickvarnames(:(a + b)): pickvarnames(ex::Symbol) = ex function pickvarnames(ex::Expr) varnames = () if ex.head == :call for arg in ex.args\[2:end\] …

---

## [\[ANN\] Garamond.jl, a neural search engine](https://discourse.julialang.org/t/ann-garamond-jl-a-neural-search-engine/34926)

<div class="topic-metadata">

**Author:** [@zgornel](https://discourse.julialang.org/u/zgornel)\
**Replies:** 2\
**Last updated:** [February 21, 2020, 7:09am UTC](https://discourse.julialang.org/t/ann-garamond-jl-a-neural-search-engine/34926 "2020-02-21T07:09:51Z")

</div>

Hello everyone, I’m happy to announce my work from the last couple of years, Garamond.jl, a neural search engine. It is still under heavy development however one can get a glance at the features and start hacking at it. …

---

## [Using Julia in Binder: interactive web environment for running your code](https://discourse.julialang.org/t/using-julia-in-binder-interactive-web-environment-for-running-your-code/21802)

<div class="topic-metadata">

**Author:** [@giordano](https://discourse.julialang.org/u/giordano)\
**Replies:** 12\
**Last updated:** [February 21, 2020, 5:40am UTC](https://discourse.julialang.org/t/using-julia-in-binder-interactive-web-environment-for-running-your-code/21802 "2020-02-21T05:40:06Z")

</div>

Update: Binder now fully supports Julia v1 and its Project.toml and Manifest.toml, which make creating reproducible environments even more easy and reliable. See here for the announcement. Today I’ve been introduced t…

---

## [Future.randjump peculiar speed](https://discourse.julialang.org/t/future-randjump-peculiar-speed/34862)

<div class="topic-metadata">

**Author:** [@stephenll](https://discourse.julialang.org/u/stephenll)\
**Replies:** 1\
**Last updated:** [February 21, 2020, 3:05am UTC](https://discourse.julialang.org/t/future-randjump-peculiar-speed/34862 "2020-02-21T03:05:07Z")

</div>

At my company we typically break up the simulations into predefined fixed “chunks”, and assign a seed to each chunk this way the dynamic scheduler in the threading is repeatable no matter the number of threads. I have b…

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

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