# Latest

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

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

**Page:** 1991

---

## [Is possible to set some variable to Julia form another aplication ? (C++)](https://discourse.julialang.org/t/is-possible-to-set-some-variable-to-julia-form-another-aplication-c/24530)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 6\
**Last updated:** [May 23, 2019, 7:19pm UTC](https://discourse.julialang.org/t/is-possible-to-set-some-variable-to-julia-form-another-aplication-c/24530 "2019-05-23T19:19:50Z")

</div>

I run my Julia code nauka.jl by file.exe compiled in c++ { system("C:\\\\Users\\\\PC\\\\AppData\\\\Local\\\\Julia-0.7.0\\\\bin\\\\julia.exe --history-file=no -L nauka.jl"); } Is possible to set into this sesion Julia some variable…

---

## [Gtk.jl - GTKFileChooserButton question](https://discourse.julialang.org/t/gtk-jl-gtkfilechooserbutton-question/24526)

<div class="topic-metadata">

**Author:** [@Frank\_Applin](https://discourse.julialang.org/u/Frank_Applin)\
**Replies:** 9\
**Last updated:** [May 23, 2019, 6:59pm UTC](https://discourse.julialang.org/t/gtk-jl-gtkfilechooserbutton-question/24526 "2019-05-23T18:59:20Z")

</div>

I have created a GtkWindow (with a GtkFixed grid on it) in Glade and place a GTKFileChooserButton on the grid and I give the GTKFileChooserButton object the ID - fileChooser. I saved as fileChooser.glade. So, in Julia I…

---

## [Code optimization a (simple) advection difference scheme](https://discourse.julialang.org/t/code-optimization-a-simple-advection-difference-scheme/24532)

<div class="topic-metadata">

**Author:** [@fdevuyst](https://discourse.julialang.org/u/fdevuyst)\
**Replies:** 2\
**Last updated:** [May 23, 2019, 6:43pm UTC](https://discourse.julialang.org/t/code-optimization-a-simple-advection-difference-scheme/24532 "2019-05-23T18:43:50Z")

</div>

Hi, I’m beginner in Julia. I tried a simple code, but was a little bit disappointed with the performance. Could you give me hints in optimizing this snippet ? Kind regards, Florian 2D advection equation, periodic boun…

---

## [Classes in Julia](https://discourse.julialang.org/t/classes-in-julia/24521)

<div class="topic-metadata">

**Author:** [@kirui](https://discourse.julialang.org/u/kirui)\
**Replies:** 12\
**Last updated:** [May 23, 2019, 5:23pm UTC](https://discourse.julialang.org/t/classes-in-julia/24521 "2019-05-23T17:23:09Z")

</div>

How do we create classes in Julia that involves the init part in Python?

---

## [Recipe to plot unit points](https://discourse.julialang.org/t/recipe-to-plot-unit-points/24510)

<div class="topic-metadata">

**Author:** [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Replies:** 7\
**Last updated:** [May 23, 2019, 4:17pm UTC](https://discourse.julialang.org/t/recipe-to-plot-unit-points/24510 "2019-05-23T16:17:58Z")

</div>

I am bring to define a Recipe for my own data type, but following any thread here (for example Understanding recipes in Plots.jl ) I always end up with No user recipe defined for MyType errors and I would like to unders…

---

## [Julia 0.7 log file where is?](https://discourse.julialang.org/t/julia-0-7-log-file-where-is/24525)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 3:04pm UTC](https://discourse.julialang.org/t/julia-0-7-log-file-where-is/24525 "2019-05-23T15:04:45Z")

</div>

Windows 7 julia 0.7 Where is log file ? I have also Julia-1.0.3 and is file C:\\Users\\PC.julia\_history but inside no my history from working on ver 0.7 Of course I searched the disks for julia\_history Paul

---

## [not able to connect to Hive with Hive.jl](https://discourse.julialang.org/t/not-able-to-connect-to-hive-with-hive-jl/24522)

<div class="topic-metadata">

**Author:** [@ditto](https://discourse.julialang.org/u/ditto)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 2:31pm UTC](https://discourse.julialang.org/t/not-able-to-connect-to-hive-with-hive-jl/24522 "2019-05-23T14:31:14Z")

</div>

Any help will be grateful!

---

## [Reduce on recursive function?](https://discourse.julialang.org/t/reduce-on-recursive-function/24511)

<div class="topic-metadata">

**Author:** [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Replies:** 5\
**Last updated:** [May 23, 2019, 12:53pm UTC](https://discourse.julialang.org/t/reduce-on-recursive-function/24511 "2019-05-23T12:53:54Z")

</div>

Sometimes I want to recursively traverse a structure and collect elements along the way, an example is this function that collects all the concret subtypes of a type T: function allsubtypes(T::Type) isconcretetype(T…

---

## [Multi-cut Benders decomposition?](https://discourse.julialang.org/t/multi-cut-benders-decomposition/23472)

<div class="topic-metadata">

**Author:** [@deschase](https://discourse.julialang.org/u/deschase)\
**Replies:** 4\
**Last updated:** [May 23, 2019, 11:57am UTC](https://discourse.julialang.org/t/multi-cut-benders-decomposition/23472 "2019-05-23T11:57:57Z")

</div>

I have coded a Benders decomposition with JuMP, but it is currently running too slow for my needs. I have a way to speed up the process theoretically by collecting several solutions from the solver at each iteration of m…

---

## [Array of functions - is there a way to avoid allocations performance penalty?](https://discourse.julialang.org/t/array-of-functions-is-there-a-way-to-avoid-allocations-performance-penalty/24471)

<div class="topic-metadata">

**Author:** [@donboyd5](https://discourse.julialang.org/u/donboyd5)\
**Replies:** 23\
**Last updated:** [May 23, 2019, 11:04am UTC](https://discourse.julialang.org/t/array-of-functions-is-there-a-way-to-avoid-allocations-performance-penalty/24471 "2019-05-23T11:04:26Z")

</div>

Edited version of my initial post based upon the response from @Raf. After I wrote this post (1) I got advice on how to write a better post. I have taken that advice below, and (2) I actually found the answer to my post…

---

## [\`\`Any\[1, 1.0\]\`\` is valid code, but I can't find why in the docs](https://discourse.julialang.org/t/any-1-1-0-is-valid-code-but-i-cant-find-why-in-the-docs/24485)

<div class="topic-metadata">

**Author:** [@Henri\_Laurie](https://discourse.julialang.org/u/Henri_Laurie)\
**Replies:** 9\
**Last updated:** [May 23, 2019, 10:51am UTC](https://discourse.julialang.org/t/any-1-1-0-is-valid-code-but-i-cant-find-why-in-the-docs/24485 "2019-05-23T10:51:42Z")

</div>

I love the fact that I can decorate \[1.0, 1\] as Any\[1, 1.0\] and Real\[1, 1.0\] and have mixed number type as elements. But I can’t find where in the docs this is described, and I am not even sure where in the docs it shou…

---

## [VAE training giving weird error](https://discourse.julialang.org/t/vae-training-giving-weird-error/24507)

<div class="topic-metadata">

**Author:** [@mllera14](https://discourse.julialang.org/u/mllera14)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 10:01am UTC](https://discourse.julialang.org/t/vae-training-giving-weird-error/24507 "2019-05-23T10:01:12Z")

</div>

I’m trying to get this autoencoder working. I started with the implementation in the model-zoo and have this: using Flux include("../src/modules.jl") using .Tools, Distributions import Distributions: logpdf ########…

---

## [CUDAnative: ^ and other operators](https://discourse.julialang.org/t/cudanative-and-other-operators/24506)

<div class="topic-metadata">

**Author:** [@samo](https://discourse.julialang.org/u/samo)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 9:58am UTC](https://discourse.julialang.org/t/cudanative-and-other-operators/24506 "2019-05-23T09:58:47Z")

</div>

A simple question: is there a particular reason why there is no ^ operator in CUDAnative, but only CUDAnative.pow(x, y)? Could we have something like: x^y = pow(x,y) What about other operators? Can this be added? Tha…

---

## [Temporary solution from user side for type piracy between packages?](https://discourse.julialang.org/t/temporary-solution-from-user-side-for-type-piracy-between-packages/24496)

<div class="topic-metadata">

**Author:** [@tlnagy](https://discourse.julialang.org/u/tlnagy)\
**Replies:** 8\
**Last updated:** [May 23, 2019, 9:15am UTC](https://discourse.julialang.org/t/temporary-solution-from-user-side-for-type-piracy-between-packages/24496 "2019-05-23T09:15:23Z")

</div>

Is there a quick fix for a package introducing type piracy? Currently, importing Images clobbers Distances because it imports ImageDistances that overloads evaluate (see avoid type piracy? · Issue #28 · JuliaImages/Image…

---

## [Construct Shell Command and Run in Function](https://discourse.julialang.org/t/construct-shell-command-and-run-in-function/24504)

<div class="topic-metadata">

**Author:** [@Donut\_Meepo](https://discourse.julialang.org/u/Donut_Meepo)\
**Replies:** 5\
**Last updated:** [May 23, 2019, 8:42am UTC](https://discourse.julialang.org/t/construct-shell-command-and-run-in-function/24504 "2019-05-23T08:42:15Z")

</div>

I am trying to construct a command out of the function arguments and run it. Here is an failed example function display\_file(fn, method) cmd = join(\[method, fn\], " ") run(\`$cmd\`) end It seems you cannot run the…

---

## [Stats package installation error](https://discourse.julialang.org/t/stats-package-installation-error/24502)

<div class="topic-metadata">

**Author:** [@WangQuanmeng](https://discourse.julialang.org/u/WangQuanmeng)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 5:56am UTC](https://discourse.julialang.org/t/stats-package-installation-error/24502 "2019-05-23T05:56:01Z")

</div>

Hi all, I am trying to install a statistics package, but both StatsBase and Statistics fail to be installed. According to the error message , there is something called ASTInterpreter2, but I can not find this pacakage… …

---

## [How do I create an anonymous function from external variables?](https://discourse.julialang.org/t/how-do-i-create-an-anonymous-function-from-external-variables/24497)

<div class="topic-metadata">

**Author:** [@Elmer\_Cusipuma](https://discourse.julialang.org/u/Elmer_Cusipuma)\
**Replies:** 8\
**Last updated:** [May 23, 2019, 12:02am UTC](https://discourse.julialang.org/t/how-do-i-create-an-anonymous-function-from-external-variables/24497 "2019-05-23T00:02:08Z")

</div>

I am trying create a anomymous function with external variables idx = 3; #External Variable f = x -\> x\[idx\]; As an example idx = 2 #change the value x = \[2,3,5\] f(x) 3 I would expect the output to be like f = x -\> x…

---

## [Julia 1.1.1 for linux 64 wrong file](https://discourse.julialang.org/t/julia-1-1-1-for-linux-64-wrong-file/24482)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 5\
**Last updated:** [May 22, 2019, 11:49pm UTC](https://discourse.julialang.org/t/julia-1-1-1-for-linux-64-wrong-file/24482 "2019-05-22T23:49:06Z")

</div>

Hi, just downloaded the lnux 64bit binaries of Julia 1.1.1 and found, after installation, that it just installs julia 0.6.4… Maybe this can be fixed? Thanks, Ferran

---

## [Mapping along a dimension with findfirst, sometimes failing](https://discourse.julialang.org/t/mapping-along-a-dimension-with-findfirst-sometimes-failing/24428)

<div class="topic-metadata">

**Author:** [@spaceLem](https://discourse.julialang.org/u/spaceLem)\
**Replies:** 8\
**Last updated:** [May 22, 2019, 11:33pm UTC](https://discourse.julialang.org/t/mapping-along-a-dimension-with-findfirst-sometimes-failing/24428 "2019-05-22T23:33:13Z")

</div>

I have a 3d array of records from a model (looking at the spread of disease resistance), the first two dimensions are for some parameter values, the third is for time so X\[1,1,:\] would be how the prevalence of disease re…

---

## [Lagrange Interpolation Function Generator](https://discourse.julialang.org/t/lagrange-interpolation-function-generator/3427)

<div class="topic-metadata">

**Author:** [@anodos](https://discourse.julialang.org/u/anodos)\
**Replies:** 3\
**Last updated:** [May 22, 2019, 10:31pm UTC](https://discourse.julialang.org/t/lagrange-interpolation-function-generator/3427 "2019-05-22T22:31:59Z")

</div>

I couldn’t find an implementation of Lagrange Interpolation in Julia, so built my own. This function simply takes a set of points, as stored in the two vectors xvals and yvals, and spits out the Lagrange Polynomial that …

---

## [Julia with respect to reliability, sustainability, critical application, dynamic/static typing, big data, HPC?](https://discourse.julialang.org/t/julia-with-respect-to-reliability-sustainability-critical-application-dynamic-static-typing-big-data-hpc/23135)

<div class="topic-metadata">

**Author:** [@steph\_de\_paris](https://discourse.julialang.org/u/steph_de_paris)\
**Replies:** 51\
**Last updated:** [May 22, 2019, 10:01pm UTC](https://discourse.julialang.org/t/julia-with-respect-to-reliability-sustainability-critical-application-dynamic-static-typing-big-data-hpc/23135 "2019-05-22T22:01:21Z")

</div>

Hello, I am testing Julia langage for critical applications for which our codes do not have the right to bug. So, together with my practical tests, I would like to find some general informations coming from universities…

---

## [@code\_typed for ccall](https://discourse.julialang.org/t/code-typed-for-ccall/24487)

<div class="topic-metadata">

**Author:** [@vitreo12](https://discourse.julialang.org/u/vitreo12)\
**Replies:** 6\
**Last updated:** [May 22, 2019, 8:55pm UTC](https://discourse.julialang.org/t/code-typed-for-ccall/24487 "2019-05-22T20:55:17Z")

</div>

Hello everyone, I was wondering if there was a way of checking what happens on Julia side when executing a ccall function. Consider the following code: @code\_typed ccall(("expm1", Base.Math.libm), Float64, (Float64,), …

---

## [JuMP (0.18): summing up elements of solution vector allocates memory?](https://discourse.julialang.org/t/jump-0-18-summing-up-elements-of-solution-vector-allocates-memory/24488)

<div class="topic-metadata">

**Author:** [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Replies:** 9\
**Last updated:** [May 22, 2019, 8:09pm UTC](https://discourse.julialang.org/t/jump-0-18-summing-up-elements-of-solution-vector-allocates-memory/24488 "2019-05-22T20:09:07Z")

</div>

Dear folks, I observe a strange behavior (note that the following snippets are embedded in a function): let x be some decision vector of size n. Then, sum\_x = 0.0 x\_val = getvalue( model\[:x\] ) println("typeof x\_val: ",…

---

## [Skipping over loop index](https://discourse.julialang.org/t/skipping-over-loop-index/24489)

<div class="topic-metadata">

**Author:** [@tyleransom](https://discourse.julialang.org/u/tyleransom)\
**Replies:** 2\
**Last updated:** [May 22, 2019, 7:31pm UTC](https://discourse.julialang.org/t/skipping-over-loop-index/24489 "2019-05-22T19:31:03Z")

</div>

Consider the following code, where I want to take a difference across columns of a matrix. for j=1:(J-1) Z\[:,j\] .= X\[:,j\].-X\[:,J\] end However, I want to allow the last term to be a column potentially di…

---

## [Project.toml causes Travis to fail with: ERROR: Cannot develop package with the same name or uuid as the project](https://discourse.julialang.org/t/project-toml-causes-travis-to-fail-with-error-cannot-develop-package-with-the-same-name-or-uuid-as-the-project/24474)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 9\
**Last updated:** [May 22, 2019, 4:45pm UTC](https://discourse.julialang.org/t/project-toml-causes-travis-to-fail-with-error-cannot-develop-package-with-the-same-name-or-uuid-as-the-project/24474 "2019-05-22T16:45:29Z")

</div>

Yesterday I finally added a Project.toml file to my repo. Had to do it directly via the Github page because the attempts to do that via a PR always resulted in ERROR: Cannot develop package with the same name or uuid as…

---

## [Why not cossin?](https://discourse.julialang.org/t/why-not-cossin/24484)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 8\
**Last updated:** [May 22, 2019, 4:40pm UTC](https://discourse.julialang.org/t/why-not-cossin/24484 "2019-05-22T16:40:11Z")

</div>

We have sincos, why not cossin? I have no idea why sincos is here and not cossin (perhaps because of the “awkward” ss in the name…), but for me the convention of xy in a 2D coordinate means that calculating a new coordin…

---

## [Getting parent's parametric types parameter](https://discourse.julialang.org/t/getting-parents-parametric-types-parameter/24470)

<div class="topic-metadata">

**Author:** [@cedeerwe](https://discourse.julialang.org/u/cedeerwe)\
**Replies:** 10\
**Last updated:** [May 22, 2019, 3:45pm UTC](https://discourse.julialang.org/t/getting-parents-parametric-types-parameter/24470 "2019-05-22T15:45:35Z")

</div>

Hey there, I have some code of this form: abstract type AbstractFoo{T}; end struct SomeFoo \<: AbstractFoo{Integer} field1::Integer field2::Vector{Integer} end struct OtherFoo \<: AbstractFoo{Float64} field1::Flo…

---

## [Pkg.status and Project.toml out of sync?](https://discourse.julialang.org/t/pkg-status-and-project-toml-out-of-sync/24473)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 7\
**Last updated:** [May 22, 2019, 3:41pm UTC](https://discourse.julialang.org/t/pkg-status-and-project-toml-out-of-sync/24473 "2019-05-22T15:41:17Z")

</div>

I have had the following issue several times and i dont’ understand. the output of \] st and what is written in my Project.toml does not correspond. How come? Synopsis: ➜ OsRo git:(master) ✗ julia \_ \_ …

---

## [GPU memory layout for custom type with different array lengths: StructArrays?](https://discourse.julialang.org/t/gpu-memory-layout-for-custom-type-with-different-array-lengths-structarrays/24479)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 0\
**Last updated:** [May 22, 2019, 3:04pm UTC](https://discourse.julialang.org/t/gpu-memory-layout-for-custom-type-with-different-array-lengths-structarrays/24479 "2019-05-22T15:04:34Z")

</div>

I have the following example of a structure for a data type (real type has more fields): mutable struct Worker id :: Int # name T :: Int # number of periods observed t :: Int # current period w …

---

## [Monte Carlo problem, saving at different time points with 'saveat' from DifferentialEquations pkg](https://discourse.julialang.org/t/monte-carlo-problem-saving-at-different-time-points-with-saveat-from-differentialequations-pkg/24476)

<div class="topic-metadata">

**Author:** [@moesphere](https://discourse.julialang.org/u/moesphere)\
**Replies:** 1\
**Last updated:** [May 22, 2019, 2:17pm UTC](https://discourse.julialang.org/t/monte-carlo-problem-saving-at-different-time-points-with-saveat-from-differentialequations-pkg/24476 "2019-05-22T14:17:51Z")

</div>

Is it possible to save at different time points for each ODE problem in a Monte Carlo study? DifferentialEquations.solve(MCprob, saveat=\[10.0,20.0\]) works fine, but saves each ODE problem at the same time points. I am…

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

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