# Latest

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

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

**Page:** 1986

---

## [Automatic threshold](https://discourse.julialang.org/t/automatic-threshold/24790)

<div class="topic-metadata">

**Author:** [@GERSON\_EZEQUIEL\_HERN](https://discourse.julialang.org/u/GERSON_EZEQUIEL_HERN)\
**Replies:** 8\
**Last updated:** [June 2, 2019, 5:02pm UTC](https://discourse.julialang.org/t/automatic-threshold/24790 "2019-06-02T17:02:26Z")

</div>

good night friends. I’m working with some images (mandril and lighthouse) and I want to do the procedure as the diagram shows. Could someone help me … I’m not good at programming in Julia. And I would like to learn…

---

## [\[ANN\] AutomaticDocstrings.jl](https://discourse.julialang.org/t/ann-automaticdocstrings-jl/24675)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 4\
**Last updated:** [June 2, 2019, 8:00am UTC](https://discourse.julialang.org/t/ann-automaticdocstrings-jl/24675 "2019-06-02T08:00:03Z")

</div>

AutomaticDocstrings.jl: This small package automatically generates docstring stubs for you to fill in. Install using import Pkg; Pkg.add("AutomaticDocstrings") Usage Place the macro call @autodoc above the function or …

---

## [Use of variable in Julia REPL](https://discourse.julialang.org/t/use-of-variable-in-julia-repl/24843)

<div class="topic-metadata">

**Author:** [@Mr.Robot](https://discourse.julialang.org/u/Mr.Robot)\
**Replies:** 4\
**Last updated:** [June 2, 2019, 1:38am UTC](https://discourse.julialang.org/t/use-of-variable-in-julia-repl/24843 "2019-06-02T01:38:31Z")

</div>

Problem This issue has bothered me for a long time. Previously I thought it was related to my program, but the following example shows it should not. As could be seen in the snapshot The REPL does have access to varia…

---

## [Keyword argument name same as variable name: Short hand notation](https://discourse.julialang.org/t/keyword-argument-name-same-as-variable-name-short-hand-notation/24838)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 1\
**Last updated:** [June 1, 2019, 7:31pm UTC](https://discourse.julialang.org/t/keyword-argument-name-same-as-variable-name-short-hand-notation/24838 "2019-06-01T19:31:47Z")

</div>

I think it was a change from v0.6 to 1.0 that we use ; for extra named keyword arguments. Now I’m thinking this can be used to achieve some short hand notation similar to this: ECMAScript 6 and Object Literal Property Va…

---

## [Is this a fair GPU benchmark?](https://discourse.julialang.org/t/is-this-a-fair-gpu-benchmark/24814)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 1\
**Last updated:** [June 1, 2019, 2:31pm UTC](https://discourse.julialang.org/t/is-this-a-fair-gpu-benchmark/24814 "2019-06-01T14:31:20Z")

</div>

Hi, I’m totally new to GPU computing, really enjoying the ease of using Julia GPU libraries, but had a question about whether my benchmark code is correct, or whether I’m leaving something on the table. The computation …

---

## [Issue with StaticArrays and PDMP](https://discourse.julialang.org/t/issue-with-staticarrays-and-pdmp/24392)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 16\
**Last updated:** [June 1, 2019, 12:34pm UTC](https://discourse.julialang.org/t/issue-with-staticarrays-and-pdmp/24392 "2019-06-01T12:34:14Z")

</div>

Dear All, I am trying to make PiecewiseDeterministicMarkovProcesses.jl (I am the creator) work with StaticArrays.jl. To this end, I try running the example file by appending using StaticArrays sxc0 = @MVector \[ 1.0 \] s…

---

## [Importing modules from function](https://discourse.julialang.org/t/importing-modules-from-function/24834)

<div class="topic-metadata">

**Author:** [@oli](https://discourse.julialang.org/u/oli)\
**Replies:** 2\
**Last updated:** [June 1, 2019, 12:05pm UTC](https://discourse.julialang.org/t/importing-modules-from-function/24834 "2019-06-01T12:05:37Z")

</div>

Hi, I’m working on a project at the moment that involves many packages and modules, as well as many different files. I have a “setup.jl” file that adds all the packages (Pkg.add("Pkg\_name"); using Pkg\_name;) and include…

---

## [Idea: Rewriting Love2d for Julia allows to code more interactive diagram applications and games](https://discourse.julialang.org/t/idea-rewriting-love2d-for-julia-allows-to-code-more-interactive-diagram-applications-and-games/24819)

<div class="topic-metadata">

**Author:** [@freemint](https://discourse.julialang.org/u/freemint)\
**Replies:** 0\
**Last updated:** [May 31, 2019, 11:31pm UTC](https://discourse.julialang.org/t/idea-rewriting-love2d-for-julia-allows-to-code-more-interactive-diagram-applications-and-games/24819 "2019-05-31T23:31:33Z")

</div>

Hello, i think Julia could really gain from having something similar to Love2d but with Julia instead of LUA. It is a game engine which loads a LUA file and calls LUA functions defined in their to update the applicatio…

---

## [How to tell which package is holding back which package](https://discourse.julialang.org/t/how-to-tell-which-package-is-holding-back-which-package/24827)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 1\
**Last updated:** [June 1, 2019, 8:10am UTC](https://discourse.julialang.org/t/how-to-tell-which-package-is-holding-back-which-package/24827 "2019-06-01T08:10:03Z")

</div>

I’m having unsatisfiable requirements problems. It would be great to see which package is holding back which package. Regardless of the unsatisfiable requirements, it would be cool to know which packages are holding bac…

---

## [OpenCV support](https://discourse.julialang.org/t/opencv-support/24828)

<div class="topic-metadata">

**Author:** [@javadba](https://discourse.julialang.org/u/javadba)\
**Replies:** 1\
**Last updated:** [June 1, 2019, 5:58am UTC](https://discourse.julialang.org/t/opencv-support/24828 "2019-06-01T05:58:57Z")

</div>

The OpenCV repo seems moribund: GitHub - maxruby/OpenCV.jl: The OpenCV (C++) interface for Julia . Is there any more recent activity in another repo or framework? Will I instead likely need to stick to python (or c++)…

---

## [Circle data structures to implement sequential allocations in Julia](https://discourse.julialang.org/t/circle-data-structures-to-implement-sequential-allocations-in-julia/24808)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 2\
**Last updated:** [June 1, 2019, 3:36am UTC](https://discourse.julialang.org/t/circle-data-structures-to-implement-sequential-allocations-in-julia/24808 "2019-06-01T03:36:47Z")

</div>

Hi. I need to implement a simple task, which is to choose the available (means it is currently un-used) server from a bunch of given servers based on a sequential ordering, i.e., the server which has not been used for th…

---

## [Is this a bug with Cholesky?](https://discourse.julialang.org/t/is-this-a-bug-with-cholesky/16970)

<div class="topic-metadata">

**Author:** [@spinkney](https://discourse.julialang.org/u/spinkney)\
**Replies:** 6\
**Last updated:** [June 1, 2019, 2:57am UTC](https://discourse.julialang.org/t/is-this-a-bug-with-cholesky/16970 "2019-06-01T02:57:17Z")

</div>

I have a matrix called “post\_var” that fails with a cholesky decomposition but when I copy and paste the matrix and run cholseky on that it works. Can someone check out what’s going on? The original code was from a 2014…

---

## [ADD IJulia installation: Julia 1.1 failed, 1.0.3 works](https://discourse.julialang.org/t/add-ijulia-installation-julia-1-1-failed-1-0-3-works/20147)

<div class="topic-metadata">

**Author:** [@sloggers](https://discourse.julialang.org/u/sloggers)\
**Replies:** 31\
**Last updated:** [May 31, 2019, 10:37pm UTC](https://discourse.julialang.org/t/add-ijulia-installation-julia-1-1-failed-1-0-3-works/20147 "2019-05-31T22:37:51Z")

</div>

I tried adding Blosc and ZMQ manually (both “works meaning error-free”) but same error as below: \_ \_ \_ ( )\_ | Documentation: https://docs.julialang.org ( ) | ( ) ( ) | \_ \_ | | \_\_ \_ | Type “?” for help, “\]?” for Pk…

---

## [Should memory in worker be freed after fetching result?](https://discourse.julialang.org/t/should-memory-in-worker-be-freed-after-fetching-result/24780)

<div class="topic-metadata">

**Author:** [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)\
**Replies:** 1\
**Last updated:** [May 31, 2019, 10:22pm UTC](https://discourse.julialang.org/t/should-memory-in-worker-be-freed-after-fetching-result/24780 "2019-05-31T22:22:11Z")

</div>

Hi there! I was doing some processing using Julia 1.1.0 and ClusterManagers v0.3.2 I have two nodes and I tried launching a function in the second node using the worker 3 with fetch(@spawnat 3 function()) This is bec…

---

## [GLMakie fails test on FreeBSD 12, Julia 1.1.0](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783)

<div class="topic-metadata">

**Author:** [@ko56](https://discourse.julialang.org/u/ko56)\
**Replies:** 9\
**Last updated:** [May 31, 2019, 9:59pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783 "2019-05-31T21:59:11Z")

</div>

(v1.1) pkg\> test GLMakie Testing GLMakie Resolving package versions... Status \`/tmp/tmp8KVQL5/Manifest.toml\` \[621f4979\] AbstractFFTs v0.4.1 \[537997a7\] AbstractPlotting v0.9.7 ... \[cf7118a7\] UUIDs \[\`@stdl…

---

## [Travis-based LaTeX + Weave Demo](https://discourse.julialang.org/t/travis-based-latex-weave-demo/24812)

<div class="topic-metadata">

**Author:** [@arnavsood](https://discourse.julialang.org/u/arnavsood)\
**Replies:** 0\
**Last updated:** [May 31, 2019, 8:24pm UTC](https://discourse.julialang.org/t/travis-based-latex-weave-demo/24812 "2019-05-31T20:24:40Z")

</div>

One problem I encountered over the past year was keeping track of compiled output (i.e., TeX PDFs and Jupyter notebooks) in my Julia project repositories. There are a few solutions, but we (me and @jlperla) found Travis…

---

## [Date function to DataFrame](https://discourse.julialang.org/t/date-function-to-dataframe/24807)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 3\
**Last updated:** [May 31, 2019, 7:19pm UTC](https://discourse.julialang.org/t/date-function-to-dataframe/24807 "2019-05-31T19:19:26Z")

</div>

Hello. Would somebody help me? I am a dataframe. one of the columns is Date. I need to round all Dates to month. I know how it to do for one variable. But how it can be don for the column from DataFrame. something li…

---

## [Julia protips](https://discourse.julialang.org/t/julia-protips/16749)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 55\
**Last updated:** [May 31, 2019, 7:06pm UTC](https://discourse.julialang.org/t/julia-protips/16749 "2019-05-31T19:06:19Z")

</div>

I’m not a Julia pro by any stretch of the imagination but I just found something that wasn’t obvious and blew my mind in a very small way, and I figure there are probably other little things like this that people are dis…

---

## [JuliaDB flatten multiple columns](https://discourse.julialang.org/t/juliadb-flatten-multiple-columns/24804)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 7\
**Last updated:** [May 31, 2019, 5:39pm UTC](https://discourse.julialang.org/t/juliadb-flatten-multiple-columns/24804 "2019-05-31T17:39:02Z")

</div>

I want to “flatten” a table with multiple cells that contain vectors (these have equal lengths per table-row): t = table((group = \[1,1,2,2\], x = \[1,2,3,4\])) t2 = groupby(t, :group, usekey = true) do k, r (x2 = r.x .…

---

## [Basic setup for documentation](https://discourse.julialang.org/t/basic-setup-for-documentation/24689)

<div class="topic-metadata">

**Author:** [@simsurace](https://discourse.julialang.org/u/simsurace)\
**Replies:** 3\
**Last updated:** [May 31, 2019, 5:22pm UTC](https://discourse.julialang.org/t/basic-setup-for-documentation/24689 "2019-05-31T17:22:14Z")

</div>

I’m trying to follow the Guide to set up a basic documentation. I used pkg\> generate Example in order to generate an example package and then DocumenterTools.generate as suggested. I then created an empty index.md file i…

---

## [Replace behaving strange?](https://discourse.julialang.org/t/replace-behaving-strange/20008)

<div class="topic-metadata">

**Author:** [@OvidiusCicero](https://discourse.julialang.org/u/OvidiusCicero)\
**Replies:** 6\
**Last updated:** [May 31, 2019, 5:00pm UTC](https://discourse.julialang.org/t/replace-behaving-strange/20008 "2019-05-31T17:00:19Z")

</div>

Initialize string array s = SubString{String}\["Julia", "uses", "multiple", "dispatch", "as", "a", "paradigm,", "making", "it", "easy", "to", "express", "many", "object-oriented", "and", "functional", "programming", "pat…

---

## [Modify variable in closure and type inference](https://discourse.julialang.org/t/modify-variable-in-closure-and-type-inference/24765)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 11\
**Last updated:** [May 31, 2019, 4:25pm UTC](https://discourse.julialang.org/t/modify-variable-in-closure-and-type-inference/24765 "2019-05-31T16:25:25Z")

</div>

I would like to have a closure modify a captured variable. Here is a simple example: function fancy\_iteration(f::F, itr) where {F} for pt in itr f(pt) end end function mysum(f, itr) sum = 0. fan…

---

## [Setting ENV for a shared library in \_\_init\_\_](https://discourse.julialang.org/t/setting-env-for-a-shared-library-in-init/24724)

<div class="topic-metadata">

**Author:** [@visr](https://discourse.julialang.org/u/visr)\
**Replies:** 6\
**Last updated:** [May 31, 2019, 2:23pm UTC](https://discourse.julialang.org/t/setting-env-for-a-shared-library-in-init/24724 "2019-05-31T14:23:31Z")

</div>

In this GDAL.jl PR I want to set an environment variable PROJ\_LIB that one of the underlying shared libraries uses to find resources. If I set this environment globally, in the shell, or in startup.jl with ENV\["PROJ\_LIB"…

---

## [Macro to print line number and time of execution (@time + line number)?](https://discourse.julialang.org/t/macro-to-print-line-number-and-time-of-execution-time-line-number/4919)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 17\
**Last updated:** [May 29, 2019, 8:35pm UTC](https://discourse.julialang.org/t/macro-to-print-line-number-and-time-of-execution-time-line-number/4919 "2019-05-29T20:35:43Z")

</div>

@time prints useful information about the time it took to evaluate a command. Is there a way to also print on the same line the line number where @time is located in a source file?

---

## [Warning: Method definition (::Type{SIM.simulation})() in module SIM at /home/Desktop/myFile.jl:57 overwritten at /home/Desktop/myFile.jl:57](https://discourse.julialang.org/t/warning-method-definition-type-sim-simulation-in-module-sim-at-home-desktop-myfile-jl-57-overwritten-at-home-desktop-myfile-jl-57/24762)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 5\
**Last updated:** [May 31, 2019, 1:23pm UTC](https://discourse.julialang.org/t/warning-method-definition-type-sim-simulation-in-module-sim-at-home-desktop-myfile-jl-57-overwritten-at-home-desktop-myfile-jl-57/24762 "2019-05-31T13:23:48Z")

</div>

The code works earlier. But when I run it this time, I got the above warning as indicated by the title. I checked the line 57 of the file myFile.jl, and only to find that it is the constructor definition inside of the mu…

---

## [Speed-up JuMP model storing objects as Indexed tables](https://discourse.julialang.org/t/speed-up-jump-model-storing-objects-as-indexed-tables/24760)

<div class="topic-metadata">

**Author:** [@lgo](https://discourse.julialang.org/u/lgo)\
**Replies:** 5\
**Last updated:** [May 31, 2019, 11:02am UTC](https://discourse.julialang.org/t/speed-up-jump-model-storing-objects-as-indexed-tables/24760 "2019-05-31T11:02:59Z")

</div>

Hello, I’m new to Jula/JuMP and working on a very large optimization model, which generation I aim to fully automatize based on sets, relations among sets and parameters provided externally. I developed a basic procedur…

---

## [Calling c function strtok in julia](https://discourse.julialang.org/t/calling-c-function-strtok-in-julia/24738)

<div class="topic-metadata">

**Author:** [@mwolff](https://discourse.julialang.org/u/mwolff)\
**Replies:** 40\
**Last updated:** [May 31, 2019, 12:54am UTC](https://discourse.julialang.org/t/calling-c-function-strtok-in-julia/24738 "2019-05-31T00:54:02Z")

</div>

Hello, i just wrapped the C function strtok to Julia to practice. I wanted to try it myself only with the help of the documentation. Can I leave this approach as it is or are there other possibilities? I didn’t know ex…

---

## [@distributed fails for many workers?](https://discourse.julialang.org/t/distributed-fails-for-many-workers/24145)

<div class="topic-metadata">

**Author:** [@dkiese](https://discourse.julialang.org/u/dkiese)\
**Replies:** 21\
**Last updated:** [May 14, 2019, 10:10am UTC](https://discourse.julialang.org/t/distributed-fails-for-many-workers/24145 "2019-05-14T10:10:19Z")

</div>

Hello folks, I am currently running some data analysis on a cluster with 68 cores per node. To this end I set up a SharedArray for 68 workers and let them operate on it via @sync @distributed. For small datasets this wo…

---

## [Beginner - NumericalMath -- Use trapz routine and Number type](https://discourse.julialang.org/t/beginner-numericalmath-use-trapz-routine-and-number-type/24777)

<div class="topic-metadata">

**Author:** [@fer](https://discourse.julialang.org/u/fer)\
**Replies:** 1\
**Last updated:** [May 30, 2019, 5:50pm UTC](https://discourse.julialang.org/t/beginner-numericalmath-use-trapz-routine-and-number-type/24777 "2019-05-30T17:50:17Z")

</div>

It seems that NumericalMath.jl have some installation problems with julia 1.1.1 : here is my error message: \[ Info: Precompiling NumericalMath \[2d69212a-5df0-5a1f-8e4a-e8e814bdb11a\] ERROR: LoadError: LoadError: syntax: …

---

## [How to get the key with the maximum priority in a priority queue using Julia](https://discourse.julialang.org/t/how-to-get-the-key-with-the-maximum-priority-in-a-priority-queue-using-julia/24764)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 7\
**Last updated:** [May 30, 2019, 5:25pm UTC](https://discourse.julialang.org/t/how-to-get-the-key-with-the-maximum-priority-in-a-priority-queue-using-julia/24764 "2019-05-30T17:25:16Z")

</div>

I checked the following link https://juliacollections.github.io/DataStructures.jl/latest/priority-queue.html and did not find any related information. I guess one can use some trick with Base.Order.ForwardOrdering to acc…

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

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