# Latest

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

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

**Page:** 1945

---

## [Extending builtin functions like ifelse()](https://discourse.julialang.org/t/extending-builtin-functions-like-ifelse/27319)

<div class="topic-metadata">

**Author:** [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Replies:** 4\
**Last updated:** [August 9, 2019, 10:40am UTC](https://discourse.julialang.org/t/extending-builtin-functions-like-ifelse/27319 "2019-08-09T10:40:27Z")

</div>

Apparently, it’s currently impossible to extend builtin functions. Is there an effort to change this? Or is there a way around the restriction already? The issue came up in a feature request for NumberIntervals.jl.

---

## [Simple tutorial for PackageCompiler sysimage build?](https://discourse.julialang.org/t/simple-tutorial-for-packagecompiler-sysimage-build/27349)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 0\
**Last updated:** [August 9, 2019, 10:25am UTC](https://discourse.julialang.org/t/simple-tutorial-for-packagecompiler-sysimage-build/27349 "2019-08-09T10:25:20Z")

</div>

Hi I cannot make Julia produce AVX2 instructions (ymm registers) on my machine. I use to build the sysimage before PackageCompiler arrival but now it seems that the documentation is a bit broken for this feature. I am…

---

## [Comment's date is different on the main page and in the thread](https://discourse.julialang.org/t/comments-date-is-different-on-the-main-page-and-in-the-thread/27300)

<div class="topic-metadata">

**Author:** [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Replies:** 3\
**Last updated:** [August 9, 2019, 9:06am UTC](https://discourse.julialang.org/t/comments-date-is-different-on-the-main-page-and-in-the-thread/27300 "2019-08-09T09:06:41Z")

</div>

Not sure if these things should be reported (or where to report them), I encountered this one: On the main page I see the following: If I click on it to see the thread the following: As you can see above it sugge…

---

## [(Gtk.jl) Why does this MWE not produce an animation and only show the last updated draw call?](https://discourse.julialang.org/t/gtk-jl-why-does-this-mwe-not-produce-an-animation-and-only-show-the-last-updated-draw-call/27250)

<div class="topic-metadata">

**Author:** [@mantzaris](https://discourse.julialang.org/u/mantzaris)\
**Replies:** 5\
**Last updated:** [August 9, 2019, 7:16am UTC](https://discourse.julialang.org/t/gtk-jl-why-does-this-mwe-not-produce-an-animation-and-only-show-the-last-updated-draw-call/27250 "2019-08-09T07:16:25Z")

</div>

Using Gtk.jl I would like to be able to produce an animation within a canvas widget. I have this MWE, which when run, produces a window with 2 buttons and a canvas. The first button each time pressed changes the canvas t…

---

## [Metaprogramming with types](https://discourse.julialang.org/t/metaprogramming-with-types/27195)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 14\
**Last updated:** [August 9, 2019, 3:22am UTC](https://discourse.julialang.org/t/metaprogramming-with-types/27195 "2019-08-09T03:22:45Z")

</div>

I had been building my log-density function like this: julia\> sourceLogdensity(linReg1D) :(function ##logdensity#413(pars) @unpack (α, β, σ, x, y) = pars ℓ = 0.0 ℓ += logpdf(Cauchy(0, 10), α) ℓ +…

---

## [A question about variable scope](https://discourse.julialang.org/t/a-question-about-variable-scope/27335)

<div class="topic-metadata">

**Author:** [@wenqi\_kou](https://discourse.julialang.org/u/wenqi_kou)\
**Replies:** 7\
**Last updated:** [August 9, 2019, 1:02am UTC](https://discourse.julialang.org/t/a-question-about-variable-scope/27335 "2019-08-09T01:02:03Z")

</div>

I met a problem that make me confused. It is about the scope of variable in Julia. x = 1 while x \<= 10 x=x+1 println(x) end In this case, julia shows “UndefVarError: x not defined”. Can anyone explain to me…

---

## [Threading 1.3: Success Story](https://discourse.julialang.org/t/threading-1-3-success-story/27111)

<div class="topic-metadata">

**Author:** [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Replies:** 16\
**Last updated:** [August 9, 2019, 12:38am UTC](https://discourse.julialang.org/t/threading-1-3-success-story/27111 "2019-08-09T00:38:14Z")

</div>

Dear @jeff.bezanson and @jameson. Just want to share a success story for the new threading infrastructure (1.3 alpha). The focus in your Juliacon talk seemed to be primary on performance but from my perspective a very im…

---

## [How to construct a video object for display by ImageView.imshow()](https://discourse.julialang.org/t/how-to-construct-a-video-object-for-display-by-imageview-imshow/27323)

<div class="topic-metadata">

**Author:** [@tgf314](https://discourse.julialang.org/u/tgf314)\
**Replies:** 1\
**Last updated:** [August 9, 2019, 12:00am UTC](https://discourse.julialang.org/t/how-to-construct-a-video-object-for-display-by-imageview-imshow/27323 "2019-08-09T00:00:26Z")

</div>

imshow() is described as being able to display a video. The example in the documentation is testimage(“mri”). The type of this object is: \`AxisArray{Gray{Normed{UInt8,8}},3,Array{Gray{Normed{UInt8,8}},3},Tuple{AxisArr…

---

## [Obtain and print IIS using Gurobi](https://discourse.julialang.org/t/obtain-and-print-iis-using-gurobi/27116)

<div class="topic-metadata">

**Author:** [@lgo](https://discourse.julialang.org/u/lgo)\
**Replies:** 2\
**Last updated:** [August 3, 2019, 6:21pm UTC](https://discourse.julialang.org/t/obtain-and-print-iis-using-gurobi/27116 "2019-08-03T18:21:15Z")

</div>

Hello, Gurobi has a function to obtain a Irreducible Inconsistent Subsystem (ISS), which refers to a subset of equations causing infeasibility. This obviously comes in very handy when debugging your problem. I succeede…

---

## [ERROR: syntax: extra token "for" after end of expression](https://discourse.julialang.org/t/error-syntax-extra-token-for-after-end-of-expression/27317)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 1\
**Last updated:** [August 8, 2019, 8:32pm UTC](https://discourse.julialang.org/t/error-syntax-extra-token-for-after-end-of-expression/27317 "2019-08-08T20:32:41Z")

</div>

Hi, the following is the code. function f(a,b) return a+b end then, julia\> f(i,i) for i=1:3 I got an error message, saying that extra token “for” after end of expression. On the other hand, sum( f(i,i) for i …

---

## [Git sha of a project using Pkg](https://discourse.julialang.org/t/git-sha-of-a-project-using-pkg/27211)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [August 8, 2019, 8:22pm UTC](https://discourse.julialang.org/t/git-sha-of-a-project-using-pkg/27211 "2019-08-08T20:22:29Z")

</div>

I am running an estimation as a batch job on a server, saving the results in a JSON file. I would like to add the git sha of the project as extra infromation (so that we can backtrack if necessary), how can I obtain it …

---

## [R session aborted when reading feather file from Julia](https://discourse.julialang.org/t/r-session-aborted-when-reading-feather-file-from-julia/25937)

<div class="topic-metadata">

**Author:** [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Replies:** 3\
**Last updated:** [August 8, 2019, 7:30pm UTC](https://discourse.julialang.org/t/r-session-aborted-when-reading-feather-file-from-julia/25937 "2019-08-08T19:30:26Z")

</div>

I’m trying to output a DataFrame as a Feather file from a Julia script and then import it into R. When I try to load it, though, R crashes (RGui closes out immediately, RStudio gives me an “R session aborted: R encount…

---

## [Threads.@Atomic error](https://discourse.julialang.org/t/threads-atomic-error/27276)

<div class="topic-metadata">

**Author:** [@Saramberr12](https://discourse.julialang.org/u/Saramberr12)\
**Replies:** 4\
**Last updated:** [August 8, 2019, 6:57pm UTC](https://discourse.julialang.org/t/threads-atomic-error/27276 "2019-08-08T18:57:59Z")

</div>

Hi all, hoping someone here can help me answer a MultiThreaded problem I am having. Here is my code: n = 10000000; numprimes = Threads.Atomic{Int}(0); function is\_prime(n) if n == 0 | n == 1 re…

---

## [Download packages in JuliaPro without authentication](https://discourse.julialang.org/t/download-packages-in-juliapro-without-authentication/27321)

<div class="topic-metadata">

**Author:** [@braingatetyler](https://discourse.julialang.org/u/braingatetyler)\
**Replies:** 2\
**Last updated:** [August 8, 2019, 7:00pm UTC](https://discourse.julialang.org/t/download-packages-in-juliapro-without-authentication/27321 "2019-08-08T19:00:10Z")

</div>

Hi there! When I do using Pkg; Pkg.add("Colors") in JuliaPro 1.1.1.1, I am asked to authenticate in an HTML panel. Curious how I can just install packages normally, without having to sign in or anything. I imagine inst…

---

## [Using Python packages in Julia](https://discourse.julialang.org/t/using-python-packages-in-julia/27183)

<div class="topic-metadata">

**Author:** [@C4D](https://discourse.julialang.org/u/C4D)\
**Replies:** 8\
**Last updated:** [August 8, 2019, 5:41pm UTC](https://discourse.julialang.org/t/using-python-packages-in-julia/27183 "2019-08-08T17:41:39Z")

</div>

I’ve not used either Python or Julia (my background is C++/Bash/Perl/Mathematica), but was thinking about learning one or the other, and have a naive question about Julia: Many Python users say they’d “love to use Julia…

---

## [Argument initialisation affects performance of @threads?](https://discourse.julialang.org/t/argument-initialisation-affects-performance-of-threads/27314)

<div class="topic-metadata">

**Author:** [@kcr](https://discourse.julialang.org/u/kcr)\
**Replies:** 3\
**Last updated:** [August 8, 2019, 3:32pm UTC](https://discourse.julialang.org/t/argument-initialisation-affects-performance-of-threads/27314 "2019-08-08T15:32:30Z")

</div>

I’m observing a change in performance in a threaded function which depends on how a write only argument to that function was initialised. Specifically creating the argument by Matrix{Float64}(undef,…) leads to the expect…

---

## [Creating graphs from data](https://discourse.julialang.org/t/creating-graphs-from-data/27199)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 7\
**Last updated:** [August 7, 2019, 7:50pm UTC](https://discourse.julialang.org/t/creating-graphs-from-data/27199 "2019-08-07T19:50:01Z")

</div>

A common procedure in data science and mathematics is building graphs/networks from a large collection of data points. I am interested in the constructing the adjacency matrix for the k-nearest neighbor graph of a collec…

---

## [Windows C++ binary compatibility: MinGW vs MSVC](https://discourse.julialang.org/t/windows-c-binary-compatibility-mingw-vs-msvc/1250)

<div class="topic-metadata">

**Author:** [@barche](https://discourse.julialang.org/u/barche)\
**Replies:** 22\
**Last updated:** [August 8, 2019, 12:06pm UTC](https://discourse.julialang.org/t/windows-c-binary-compatibility-mingw-vs-msvc/1250 "2019-08-08T12:06:51Z")

</div>

Creating a new topic to continue the discussion about binary and compiler compatibility started here in the context of QML.jl. All of this is in the context of CxxWrap.jl, where C++ code is made available in Julia by bu…

---

## [Tracking changes for unregistered packages](https://discourse.julialang.org/t/tracking-changes-for-unregistered-packages/27289)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 4\
**Last updated:** [August 8, 2019, 11:46am UTC](https://discourse.julialang.org/t/tracking-changes-for-unregistered-packages/27289 "2019-08-08T11:46:10Z")

</div>

I am developing package P with dependency D on a local computer. Both packages are unregistered. Locally, changes are tracked by using Pkg.develop(D) and Revise. The actual computations are run on a remote machine. Th…

---

## [How to reshape a 2d array into a 1d array of its rows](https://discourse.julialang.org/t/how-to-reshape-a-2d-array-into-a-1d-array-of-its-rows/27226)

<div class="topic-metadata">

**Author:** [@ko56](https://discourse.julialang.org/u/ko56)\
**Replies:** 8\
**Last updated:** [August 8, 2019, 10:44am UTC](https://discourse.julialang.org/t/how-to-reshape-a-2d-array-into-a-1d-array-of-its-rows/27226 "2019-08-08T10:44:03Z")

</div>

This seems simple, but I can’t see how to do it. I have julia\> X = \[\[1 2\]; \[3 4\]; \[5 6\]\] 3×2 Array{Int64,2}: 1 2 3 4 5 6 julia\> I want to turn this (reshape it) into julia\> X1 = \[\[1 2\], \[3 4\], \[5 6\]\] 3-element…

---

## [NamedTupleTools.jl](https://discourse.julialang.org/t/namedtupletools-jl/27308)

<div class="topic-metadata">

**Author:** [@lamviec4](https://discourse.julialang.org/u/lamviec4)\
**Replies:** 1\
**Last updated:** [August 8, 2019, 10:21am UTC](https://discourse.julialang.org/t/namedtupletools-jl/27308 "2019-08-08T10:21:46Z")

</div>

NamedTupleTools is a small package that makes doing a few things with NamedTuples a bit easier. (Julia v1.0) using NamedTupleTools julia\> namedtuple(:a, :b, :c)(1, 2.0, “three”) (a = 1, b = 2.0, c = “three”) #= n…

---

## [Data Sharing by Microsoft](https://discourse.julialang.org/t/data-sharing-by-microsoft/27307)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 0\
**Last updated:** [August 8, 2019, 9:46am UTC](https://discourse.julialang.org/t/data-sharing-by-microsoft/27307 "2019-08-08T09:46:38Z")

</div>

This might be of interest to people here

---

## [How to shorten type definition with many AbstractArray fields?](https://discourse.julialang.org/t/how-to-shorten-type-definition-with-many-abstractarray-fields/27301)

<div class="topic-metadata">

**Author:** [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Replies:** 3\
**Last updated:** [August 8, 2019, 8:37am UTC](https://discourse.julialang.org/t/how-to-shorten-type-definition-with-many-abstractarray-fields/27301 "2019-08-08T08:37:14Z")

</div>

I have a struct like: mutable struct MyType{A\<:AbstractArray, B\<:AbstractArray, C\<:AbstractArray, D\<:AbstractArray} vertices::A normals::B subsets::C isenabled::BitArray{1} size::Int levelweight:…

---

## [Calling Fortran variables from Julia](https://discourse.julialang.org/t/calling-fortran-variables-from-julia/27293)

<div class="topic-metadata">

**Author:** [@henry2004y](https://discourse.julialang.org/u/henry2004y)\
**Replies:** 3\
**Last updated:** [August 8, 2019, 8:36am UTC](https://discourse.julialang.org/t/calling-fortran-variables-from-julia/27293 "2019-08-08T08:36:07Z")

</div>

Hi all, I am trying to call Fortran from Julia, but there’re some issues. 1. Fortran constants cglobal works fine when calling Fortran static module variables, but it cannot find Fortran constants. For example, here i…

---

## [Canvas in Gtk doesn't work while the loop is running](https://discourse.julialang.org/t/canvas-in-gtk-doesnt-work-while-the-loop-is-running/15398)

<div class="topic-metadata">

**Author:** [@dsHitman](https://discourse.julialang.org/u/dsHitman)\
**Replies:** 9\
**Last updated:** [August 8, 2019, 8:20am UTC](https://discourse.julialang.org/t/canvas-in-gtk-doesnt-work-while-the-loop-is-running/15398 "2019-08-08T08:20:39Z")

</div>

I’m trying to create a “game of life” with GUI (using Gtk.jl) but while the loop is running the canvas doesn’t work (the Windows is not visible,as if it was minimized) anyone knows why?

---

## [How to get the code behind an anonymous function represented as Symbol("##...")](https://discourse.julialang.org/t/how-to-get-the-code-behind-an-anonymous-function-represented-as-symbol/27279)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 2\
**Last updated:** [August 8, 2019, 8:03am UTC](https://discourse.julialang.org/t/how-to-get-the-code-behind-an-anonymous-function-represented-as-symbol/27279 "2019-08-08T08:03:54Z")

</div>

I’m extensively using code like this: route("/") do "Hello World" end which gets custom printed as: \[GET\] / =\> getfield(Main, Symbol("##3#4"))() It would be a lot more usable and informative if I could actually ret…

---

## [Error with \`using\` on remote worker](https://discourse.julialang.org/t/error-with-using-on-remote-worker/17900)

<div class="topic-metadata">

**Author:** [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Replies:** 1\
**Last updated:** [November 23, 2018, 3:48pm UTC](https://discourse.julialang.org/t/error-with-using-on-remote-worker/17900 "2018-11-23T15:48:06Z")

</div>

I am on Julia 0.7 and I add remote workers with ClusterManagers and addprocs\_htc (HTCondor). Workers connect to my master worker and I can run code on them but I encounter an error with @everywhere using. For example: @…

---

## [Plot is not displaying while using Makie package for interactive visualization](https://discourse.julialang.org/t/plot-is-not-displaying-while-using-makie-package-for-interactive-visualization/27203)

<div class="topic-metadata">

**Author:** [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Replies:** 10\
**Last updated:** [August 8, 2019, 4:55am UTC](https://discourse.julialang.org/t/plot-is-not-displaying-while-using-makie-package-for-interactive-visualization/27203 "2019-08-08T04:55:56Z")

</div>

Hi, I am trying to use Mackie for interactive 3D visualization. But after running program from Makie documentation example, I am not getting any plots. using Makie using LinearAlgebra res = 500 game = Scene(resolution…

---

## [Prevent Task from yielding](https://discourse.julialang.org/t/prevent-task-from-yielding/27263)

<div class="topic-metadata">

**Author:** [@jackf](https://discourse.julialang.org/u/jackf)\
**Replies:** 1\
**Last updated:** [August 8, 2019, 12:01am UTC](https://discourse.julialang.org/t/prevent-task-from-yielding/27263 "2019-08-08T00:01:04Z")

</div>

I was thinking this morning about the new 1.3 Task system. Is there any way to prevent a particular task from yielding, even if it is doing operations that would usually yield e.g. i/o, sleeping etc?

---

## [Increase a range object by some amount](https://discourse.julialang.org/t/increase-a-range-object-by-some-amount/27286)

<div class="topic-metadata">

**Author:** [@mgalenb](https://discourse.julialang.org/u/mgalenb)\
**Replies:** 8\
**Last updated:** [August 7, 2019, 11:24pm UTC](https://discourse.julialang.org/t/increase-a-range-object-by-some-amount/27286 "2019-08-07T23:24:29Z")

</div>

Hello, I am trying to increase a range object that has already been created. Basically, I have a range 1,2,3,..,8,9,10 and then i want to add 11,12,13 to the same range object so that i will get a final range of 1,2,3,.…

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

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