# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=863

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

**Page:** 864

---

## [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…

---

## [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?

---

## [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…

---

## [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…

---

## [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…

---

## [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…

---

## [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,), …

---

## [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…

---

## [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 \_ \_ …

---

## [Unsupported call through a literal pointer on float power broadcast (CuArrays)](https://discourse.julialang.org/t/unsupported-call-through-a-literal-pointer-on-float-power-broadcast-cuarrays/24477)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 1\
**Last updated:** [May 22, 2019, 1:38pm UTC](https://discourse.julialang.org/t/unsupported-call-through-a-literal-pointer-on-float-power-broadcast-cuarrays/24477 "2019-05-22T13:38:40Z")

</div>

A compiler error occurs when broadcasting a Float power function on a CuArray: .^(::CuArray{Float32,1}, ::Float32) I opened an issue on github as well here. I post here in case this is a usage error. The Minimal Workin…

---

## [UnDefVarError - Model not defined in Julia optimization problem](https://discourse.julialang.org/t/undefvarerror-model-not-defined-in-julia-optimization-problem/24451)

<div class="topic-metadata">

**Author:** [@RohiniShetty](https://discourse.julialang.org/u/RohiniShetty)\
**Replies:** 5\
**Last updated:** [May 22, 2019, 1:22pm UTC](https://discourse.julialang.org/t/undefvarerror-model-not-defined-in-julia-optimization-problem/24451 "2019-05-22T13:22:26Z")

</div>

using ExcelReaders, JuMP, CPLEX, DataFrames; using JuMP, Clp; MinCD = JuMP.Model(solver=CPLEX.CplexSolver(CPX\_PARAM\_TILIM = 3600)); “UnDefVarError Model not defined” I did read most of the fixes for Model not defined,…

---

## [Is priority queue more efficient than a vector / list, in terms of inserting an element into a structure which keeps a decreasing / increasing order?](https://discourse.julialang.org/t/is-priority-queue-more-efficient-than-a-vector-list-in-terms-of-inserting-an-element-into-a-structure-which-keeps-a-decreasing-increasing-order/24461)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 4\
**Last updated:** [May 22, 2019, 11:46am UTC](https://discourse.julialang.org/t/is-priority-queue-more-efficient-than-a-vector-list-in-terms-of-inserting-an-element-into-a-structure-which-keeps-a-decreasing-increasing-order/24461 "2019-05-22T11:46:36Z")

</div>

Hi. The task is to insert an element into a structure which keeps a decreasing / increasing order in terms of a certain property, say height, of the elements in the structure. One way to do it, is to use vector / list st…

---

## [typeof(myFunction) does not work for a self-defined function myFunction](https://discourse.julialang.org/t/typeof-myfunction-does-not-work-for-a-self-defined-function-myfunction/24464)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 7\
**Last updated:** [May 22, 2019, 9:39am UTC](https://discourse.julialang.org/t/typeof-myfunction-does-not-work-for-a-self-defined-function-myfunction/24464 "2019-05-22T09:39:12Z")

</div>

julia\> function myFunction() println(“haha, you die”) end myFunction (generic function with 1 method) julia\> println(“type of myFunction:”, typeof(myFunction)) type of myFunction:typeof(myFunction) a bit strange,…

---

## [Short circuit evaluation with an assignment statement](https://discourse.julialang.org/t/short-circuit-evaluation-with-an-assignment-statement/24443)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 8\
**Last updated:** [May 22, 2019, 4:21am UTC](https://discourse.julialang.org/t/short-circuit-evaluation-with-an-assignment-statement/24443 "2019-05-22T04:21:22Z")

</div>

There is an example in the (increasingly more excellent) manual under short circuit evaluation that shows an assignment statement as the follow-on statement: julia\> true && (x = (1, 2, 3)) (1, 2, 3) julia\> false && (x …

---

## [Problem about option-readtimeout@HTTP](https://discourse.julialang.org/t/problem-about-option-readtimeout-http/24458)

<div class="topic-metadata">

**Author:** [@remedisbetty](https://discourse.julialang.org/u/remedisbetty)\
**Replies:** 0\
**Last updated:** [May 22, 2019, 3:36am UTC](https://discourse.julialang.org/t/problem-about-option-readtimeout-http/24458 "2019-05-22T03:36:14Z")

</div>

When I used the HTTP.request to send job to clients, I get a response of timeout and connection closed after 60s. While, it seems that the option readtimeout doesn’t work. for details, please refer to this URL https:…

---

## [Setting breakpoint: no luck](https://discourse.julialang.org/t/setting-breakpoint-no-luck/24418)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 8\
**Last updated:** [May 22, 2019, 1:28am UTC](https://discourse.julialang.org/t/setting-breakpoint-no-luck/24418 "2019-05-22T01:28:00Z")

</div>

This code simply runs: it does not stop for the breakpoint. module Utils using Debugger function myfunc(x) x = x .^2 @bp return x .+ 3 end end using Main.Utils Main.Utils.myfunc(3) ???

---

## [Iteration of SVD factorization](https://discourse.julialang.org/t/iteration-of-svd-factorization/24445)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 3\
**Last updated:** [May 21, 2019, 7:38pm UTC](https://discourse.julialang.org/t/iteration-of-svd-factorization/24445 "2019-05-21T19:38:27Z")

</div>

I was suprised to see that iterating a SVD gives U, S, and V instead of U, S, and Vt. After all it is U \* Diagonal(S) \* Vt which restores the factorized matrix. Returning Vt would also make more sense to me from a techn…

---

## [No v1.2 binary available for download](https://discourse.julialang.org/t/no-v1-2-binary-available-for-download/24444)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 9\
**Last updated:** [May 21, 2019, 6:45pm UTC](https://discourse.julialang.org/t/no-v1-2-binary-available-for-download/24444 "2019-05-21T18:45:16Z")

</div>

Similar to previous transitions between versions, we’re now in a state where no binary for julia v1.2 is available for download. Latest release is v1.1 and nightly is v1.3 (which constantly segfaults for me). Could a v1…

---

## [Networks' Simulation](https://discourse.julialang.org/t/networks-simulation/24239)

<div class="topic-metadata">

**Author:** [@ennvvy](https://discourse.julialang.org/u/ennvvy)\
**Replies:** 7\
**Last updated:** [May 21, 2019, 5:18pm UTC](https://discourse.julialang.org/t/networks-simulation/24239 "2019-05-21T17:18:41Z")

</div>

I have been using Julia to simulate calculations involving directed networks. Monte Carlo simulations(100 iterations) with a network with 100 nodes used to take 10mins. But the code doesn’t scale well, for a directed net…

---

## [Mystery function disappearance](https://discourse.julialang.org/t/mystery-function-disappearance/24442)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 1\
**Last updated:** [May 21, 2019, 4:44pm UTC](https://discourse.julialang.org/t/mystery-function-disappearance/24442 "2019-05-21T16:44:11Z")

</div>

I have written a rather large module. I use it locally so I have not gone through the complex process to make it a package. I just refactored some functions, always fraught with peril. A smaller function in a separate…

---

## [Documenter stop deploying](https://discourse.julialang.org/t/documenter-stop-deploying/24429)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 14\
**Last updated:** [May 21, 2019, 3:51pm UTC](https://discourse.julialang.org/t/documenter-stop-deploying/24429 "2019-05-21T15:51:20Z")

</div>

Hi, Since two weeks ago the Documenter stop deploying the docs. It doesn’t tell me why, only Info: skipping docs deployment. What is wrong here? Thanks ... \[ Info: SetupBuildDirectory: setting up build directory. \[ I…

---

## [Closures: Is this docs sentence still relevant?](https://discourse.julialang.org/t/closures-is-this-docs-sentence-still-relevant/24432)

<div class="topic-metadata">

**Author:** [@francesco.alemanno](https://discourse.julialang.org/u/francesco.alemanno)\
**Replies:** 1\
**Last updated:** [May 21, 2019, 2:01pm UTC](https://discourse.julialang.org/t/closures-is-this-docs-sentence-still-relevant/24432 "2019-05-21T14:01:32Z")

</div>

Last sentence in the page performance tips “In the mean time, some user-contributed packages like FastClosures automate the insertion of let statements as in abmult3 .” Perf. Tips \[latest docs\] i used closures heavily…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=862)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=864)
