# Latest

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

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

**Page:** 1957

---

## [How to understand the following crop! function excerpted from the OpenStreetMapX package?](https://discourse.julialang.org/t/how-to-understand-the-following-crop-function-excerpted-from-the-openstreetmapx-package/26585)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 0\
**Last updated:** [July 20, 2019, 3:12pm UTC](https://discourse.julialang.org/t/how-to-understand-the-following-crop-function-excerpted-from-the-openstreetmapx-package/26585 "2019-07-20T15:12:47Z")

</div>

Hi, I was reading the following function excerpted from OpenStreetMapX package and got a bit confused. Could anyone please let me know how to understand the following function, especially new\_node = OpenStreetMapX.bound…

---

## [Is this superfluous](https://discourse.julialang.org/t/is-this-superfluous/26571)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 5\
**Last updated:** [July 20, 2019, 2:55pm UTC](https://discourse.julialang.org/t/is-this-superfluous/26571 "2019-07-20T14:55:02Z")

</div>

I have seen some code in a package that includes this method: SOME(v::T) where {T} = v Another method of SOME is defined as: SOME(::Type{String}, p::Parser) = String(take!(p.charbuffer)) The first method appears to d…

---

## [Escaping unkown user input to LaTeX](https://discourse.julialang.org/t/escaping-unkown-user-input-to-latex/26583)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 2\
**Last updated:** [July 20, 2019, 2:48pm UTC](https://discourse.julialang.org/t/escaping-unkown-user-input-to-latex/26583 "2019-07-20T14:48:39Z")

</div>

I’m using PGFPlotsX and LaTeXTabulars to generate PDF reports which include (amongst other things) string comments (user-input via some beyond-my-control GUI) that might contain any of these characters: """!@#$%^&\*()\_-+…

---

## [\[ANN\] Turf.jl: a port of the Turf.js library](https://discourse.julialang.org/t/ann-turf-jl-a-port-of-the-turf-js-library/26151)

<div class="topic-metadata">

**Author:** [@philoez98](https://discourse.julialang.org/u/philoez98)\
**Replies:** 1\
**Last updated:** [July 20, 2019, 2:08pm UTC](https://discourse.julialang.org/t/ann-turf-jl-a-port-of-the-turf-js-library/26151 "2019-07-20T14:08:14Z")

</div>

Hello everyone, I’m pleased to announce that Turf.jl is an officially registered package and available now to use! If you want to check it out, Turf.jl is on GitHub! Turf.jl is a port of the Turf.js library, a geospat…

---

## [Help to build shared library Using PackageCompiler.jl](https://discourse.julialang.org/t/help-to-build-shared-library-using-packagecompiler-jl/23117)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 5\
**Last updated:** [July 20, 2019, 10:00am UTC](https://discourse.julialang.org/t/help-to-build-shared-library-using-packagecompiler-jl/23117 "2019-07-20T10:00:58Z")

</div>

Hi guys! I need help. I want to build a shared library (.dylib, .dll) so that I can send it with my code to be loaded by another ground in a C++ software. I know that I can use PackageCompiler.jl to build a shared libra…

---

## [Comprehensive setup for including Unicode Julia code in LaTeX document](https://discourse.julialang.org/t/comprehensive-setup-for-including-unicode-julia-code-in-latex-document/26553)

<div class="topic-metadata">

**Author:** [@kapple](https://discourse.julialang.org/u/kapple)\
**Replies:** 4\
**Last updated:** [July 20, 2019, 1:58am UTC](https://discourse.julialang.org/t/comprehensive-setup-for-including-unicode-julia-code-in-latex-document/26553 "2019-07-20T01:58:44Z")

</div>

TL; DR: What is the complete setup for VSCode to run XeLaTeX or LuaLaTeX, with working examples using unicode characters with minted? I’ve looked everywhere, finding the latex-workshop.latex.tools in one spot, the latex-…

---

## [HTTP 404 Error when building CxxWrap](https://discourse.julialang.org/t/http-404-error-when-building-cxxwrap/25228)

<div class="topic-metadata">

**Author:** [@Coralie](https://discourse.julialang.org/u/Coralie)\
**Replies:** 1\
**Last updated:** [July 20, 2019, 12:55am UTC](https://discourse.julialang.org/t/http-404-error-when-building-cxxwrap/25228 "2019-07-20T00:55:54Z")

</div>

Hi, I’m trying to install CxxWrap but I have this error: (v1.1) pkg\> add C:\\\\Users\\\\Coralie\\\\CxxWrap.jl Updating git-repo \`C:\\\\Users\\\\Coralie\\\\CxxWrap.jl\` Resolving package versions... Updating \`C:\\Users\\Coralie\\.…

---

## [How to correctly handle batches in this model](https://discourse.julialang.org/t/how-to-correctly-handle-batches-in-this-model/26570)

<div class="topic-metadata">

**Author:** [@danipozo](https://discourse.julialang.org/u/danipozo)\
**Replies:** 0\
**Last updated:** [July 20, 2019, 12:03am UTC](https://discourse.julialang.org/t/how-to-correctly-handle-batches-in-this-model/26570 "2019-07-20T00:03:09Z")

</div>

I’m trying to write a model similar to the one in Image to markup with coarse to fine attention, where a fully convolutional network is first applied to an image (resulting in a smaller image with a greater number of cha…

---

## [Converting LibPQ result into dataframe](https://discourse.julialang.org/t/converting-libpq-result-into-dataframe/26567)

<div class="topic-metadata">

**Author:** [@abeburnett](https://discourse.julialang.org/u/abeburnett)\
**Replies:** 1\
**Last updated:** [July 19, 2019, 11:26pm UTC](https://discourse.julialang.org/t/converting-libpq-result-into-dataframe/26567 "2019-07-19T23:26:03Z")

</div>

So coming from R and Python I’m finding it astonishingly mysterious how I can connect to my Postgres DB and pull (select) data down into a dataframe format. I discovered the LibPQ package, but the documentation is very c…

---

## [Trouble importing a module that depends on another globally imported module](https://discourse.julialang.org/t/trouble-importing-a-module-that-depends-on-another-globally-imported-module/26482)

<div class="topic-metadata">

**Author:** [@zachmatson](https://discourse.julialang.org/u/zachmatson)\
**Replies:** 9\
**Last updated:** [July 19, 2019, 9:53pm UTC](https://discourse.julialang.org/t/trouble-importing-a-module-that-depends-on-another-globally-imported-module/26482 "2019-07-19T21:53:16Z")

</div>

I have a project which is structured like: Connect4Solver: -\>Connect4Board.jl -\>MCTS.jl Connect4Board.jl defines a module Connect4Board which defines a type Board. MCTS.jl defines a module MCTS which imports Connect4B…

---

## [End of line whitespace & git](https://discourse.julialang.org/t/end-of-line-whitespace-git/26544)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 1\
**Last updated:** [July 19, 2019, 9:36pm UTC](https://discourse.julialang.org/t/end-of-line-whitespace-git/26544 "2019-07-19T21:36:07Z")

</div>

I would like to ask if there is a robust and/or recommended solution for stripping EOL whitespace of Julia code in Git repos, more or less automatically, before commits. I read a bit about various solutions, and there a…

---

## [Stop adding plots with plot! and start a new plot](https://discourse.julialang.org/t/stop-adding-plots-with-plot-and-start-a-new-plot/26561)

<div class="topic-metadata">

**Author:** [@Masacroso](https://discourse.julialang.org/u/Masacroso)\
**Replies:** 4\
**Last updated:** [July 19, 2019, 8:18pm UTC](https://discourse.julialang.org/t/stop-adding-plots-with-plot-and-start-a-new-plot/26561 "2019-07-19T20:18:17Z")

</div>

I have a code with two functions, both of them uses the plot! command (I need it), however I dont know how to say to Julia when start to adding the plots in a new empty plot. There is a command to restart the action of p…

---

## [Multi-Objective Optimization Support](https://discourse.julialang.org/t/multi-objective-optimization-support/16731)

<div class="topic-metadata">

**Author:** [@PastelBelem8](https://discourse.julialang.org/u/PastelBelem8)\
**Replies:** 3\
**Last updated:** [July 19, 2019, 7:09pm UTC](https://discourse.julialang.org/t/multi-objective-optimization-support/16731 "2019-07-19T19:09:19Z")

</div>

I’m working on my master thesis on Multi-Objective Optimization (MOO) and I found JuMP to be a clean and elegant framework. However, JuMP does not currently support Multi-Objective optimization. Are you planning to suppo…

---

## [Puzzled by the difference in performance when summing an array in different ways](https://discourse.julialang.org/t/puzzled-by-the-difference-in-performance-when-summing-an-array-in-different-ways/26555)

<div class="topic-metadata">

**Author:** [@Nicolas\_Gagne](https://discourse.julialang.org/u/Nicolas_Gagne)\
**Replies:** 4\
**Last updated:** [July 19, 2019, 6:59pm UTC](https://discourse.julialang.org/t/puzzled-by-the-difference-in-performance-when-summing-an-array-in-different-ways/26555 "2019-07-19T18:59:12Z")

</div>

Hi everybody, While trying to test my understanding of “views vs slice of arrays” and “row-major vs column major”, I time (using @time) the following functions : A = rand(10000,10000); function sum\_1(x) counter = 0…

---

## [Terminology confusion: environment vs project](https://discourse.julialang.org/t/terminology-confusion-environment-vs-project/26547)

<div class="topic-metadata">

**Author:** [@ianfiske](https://discourse.julialang.org/u/ianfiske)\
**Replies:** 5\
**Last updated:** [July 19, 2019, 6:50pm UTC](https://discourse.julialang.org/t/terminology-confusion-environment-vs-project/26547 "2019-07-19T18:50:44Z")

</div>

Hi, I’ve been using Julia’s Pkg for almost a year with plenty of success. However, I’m giving a presentation at my workplace on Julia workflow and package development next week and realized that I’m pretty confused abou…

---

## [Making plots with background bands](https://discourse.julialang.org/t/making-plots-with-background-bands/26549)

<div class="topic-metadata">

**Author:** [@gerycruz](https://discourse.julialang.org/u/gerycruz)\
**Replies:** 0\
**Last updated:** [July 19, 2019, 4:20pm UTC](https://discourse.julialang.org/t/making-plots-with-background-bands/26549 "2019-07-19T16:20:08Z")

</div>

I’m trying to plot something similar to the leftmost plot in the image below. With the horizontal bands defined by y-axis values. Specifically, I want to do three bands one from Y1 to Y2, one from Y2 to Y3, and the last …

---

## [Fluctuations when measuring execution time of linear algebra code](https://discourse.julialang.org/t/fluctuations-when-measuring-execution-time-of-linear-algebra-code/26385)

<div class="topic-metadata">

**Author:** [@henrik227](https://discourse.julialang.org/u/henrik227)\
**Replies:** 12\
**Last updated:** [July 19, 2019, 2:07pm UTC](https://discourse.julialang.org/t/fluctuations-when-measuring-execution-time-of-linear-algebra-code/26385 "2019-07-19T14:07:08Z")

</div>

I’m trying to measure the execution time of linear algebra expressions, and I’m seeing strange patterns in the results. This is a MWE that reproduces this behavior for me: using DelimitedFiles using LinearAlgebra BLAS.s…

---

## [GTK: AssertionError: xor(prev, current\_task() !== g\_stack)](https://discourse.julialang.org/t/gtk-assertionerror-xor-prev-current-task-g-stack/26519)

<div class="topic-metadata">

**Author:** [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Replies:** 2\
**Last updated:** [July 19, 2019, 1:25pm UTC](https://discourse.julialang.org/t/gtk-assertionerror-xor-prev-current-task-g-stack/26519 "2019-07-19T13:25:59Z")

</div>

I’m getting this exception when calling GAccessor.text(buffer, "", -1) while handling an file-activated signal. I’ve spent the last 2 hours trying to recreate it with a single example, and so far I cannot reproduce it. …

---

## [Interact + Mux: how to get independent connections?](https://discourse.julialang.org/t/interact-mux-how-to-get-independent-connections/26538)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [July 19, 2019, 12:05pm UTC](https://discourse.julialang.org/t/interact-mux-how-to-get-independent-connections/26538 "2019-07-19T12:05:56Z")

</div>

Hello, I am trying to get a model whose controls and results are exposed on the web (for now on my own development machine). I did manage to get a dummy model working, but I noticed that different connections are not in…

---

## [Real Time Logging](https://discourse.julialang.org/t/real-time-logging/26509)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 5\
**Last updated:** [July 19, 2019, 10:40am UTC](https://discourse.julialang.org/t/real-time-logging/26509 "2019-07-19T10:40:03Z")

</div>

Hey guys I am trying to log some data down - it is going well, but I want to do real time logging. Currently my code like this: date = \`cmd /c date /t\` time = \`cmd /c time /t\` datestr = chomp(read(date,String)) times…

---

## [How to generate methods based on different types of the parameter?](https://discourse.julialang.org/t/how-to-generate-methods-based-on-different-types-of-the-parameter/26530)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 4\
**Last updated:** [July 19, 2019, 9:43am UTC](https://discourse.julialang.org/t/how-to-generate-methods-based-on-different-types-of-the-parameter/26530 "2019-07-19T09:43:47Z")

</div>

For example, I have the following code using FilePaths macro iostream\_to\_lines(methodname) return quote function $methodname(io::IOStream) $methodname(readlines(io)) end end end # m…

---

## [Trouble displaying an image using ImageView.imshow()](https://discourse.julialang.org/t/trouble-displaying-an-image-using-imageview-imshow/26493)

<div class="topic-metadata">

**Author:** [@Didier\_Chatenay](https://discourse.julialang.org/u/Didier_Chatenay)\
**Replies:** 11\
**Last updated:** [July 19, 2019, 9:28am UTC](https://discourse.julialang.org/t/trouble-displaying-an-image-using-imageview-imshow/26493 "2019-07-19T09:28:21Z")

</div>

I am using Julia with Atom on a MacBook Pro When I try to display an image like in the following few lines at the REPL using Images, ImageView, TestImages img = testimage(“mandrill”) ImageView.imshow(img) a window a…

---

## [Extended control flow?](https://discourse.julialang.org/t/extended-control-flow/26529)

<div class="topic-metadata">

**Author:** [@Masacroso](https://discourse.julialang.org/u/Masacroso)\
**Replies:** 4\
**Last updated:** [July 19, 2019, 5:14am UTC](https://discourse.julialang.org/t/extended-control-flow/26529 "2019-07-19T05:14:51Z")

</div>

I wrote some code with this structure function(x) x \>=0 && plot!(something) x \<=0 && plot!(something different) end because I tried to select with the value of x what would be plotted: one of them of both plots at …

---

## [Julia multiprocessing is not using fork in Linux?](https://discourse.julialang.org/t/julia-multiprocessing-is-not-using-fork-in-linux/26513)

<div class="topic-metadata">

**Author:** [@jwu](https://discourse.julialang.org/u/jwu)\
**Replies:** 2\
**Last updated:** [July 19, 2019, 1:39am UTC](https://discourse.julialang.org/t/julia-multiprocessing-is-not-using-fork-in-linux/26513 "2019-07-19T01:39:45Z")

</div>

I am not sure I understand it correctly or not. In python multiprocessing, it is using fork in Linux, so the children processes shares memory directly. The memory sharing will not change if you are not changing it since …

---

## [PyObjects as keys](https://discourse.julialang.org/t/pyobjects-as-keys/26521)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 2\
**Last updated:** [July 18, 2019, 10:07pm UTC](https://discourse.julialang.org/t/pyobjects-as-keys/26521 "2019-07-18T22:07:29Z")

</div>

As part of some work toward code generation from SymPy.jl, I need to map sympy functions to Julia functions. My current approach is a Dict: symfuncs = Dict( sympy.log =\> log , sympy.Pow =\> :^ , sympy.Abs =\>…

---

## [Is there a way to slice an \`IOStream\`?](https://discourse.julialang.org/t/is-there-a-way-to-slice-an-iostream/26517)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 4\
**Last updated:** [July 18, 2019, 9:59pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-slice-an-iostream/26517 "2019-07-18T21:59:19Z")

</div>

I have an IOStream, and I only want to read between the mth line and nth line. How should I do? I have a pseudocode: using ResumableFunctions @resumable function iterate\_io\_between(io::IOStream, m::Int, n::Int) io…

---

## [Indexing multidimensional arrays of arbitrary dimension](https://discourse.julialang.org/t/indexing-multidimensional-arrays-of-arbitrary-dimension/25728)

<div class="topic-metadata">

**Author:** [@hrchen](https://discourse.julialang.org/u/hrchen)\
**Replies:** 11\
**Last updated:** [June 26, 2019, 9:00pm UTC](https://discourse.julialang.org/t/indexing-multidimensional-arrays-of-arbitrary-dimension/25728 "2019-06-26T21:00:57Z")

</div>

I am writing a simulation that outputs a multidimensional array A that changes over time, and whose ndims depends on the input dimension (1 or 2 for now). I would like to save A over time in a larger array A\_t in my for-…

---

## [\`deepcopy(::Module)\` and mocking for tests](https://discourse.julialang.org/t/deepcopy-module-and-mocking-for-tests/24214)

<div class="topic-metadata">

**Author:** [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Replies:** 6\
**Last updated:** [July 18, 2019, 9:36pm UTC](https://discourse.julialang.org/t/deepcopy-module-and-mocking-for-tests/24214 "2019-07-18T21:36:42Z")

</div>

I have a crazy question/proposal. Currently, deepcopy isn’t defined for Modules: julia\> deepcopy(MyModule) ERROR: deepcopy of Modules not supported I think it might not be too hard to implement this. I wrote a somewha…

---

## [Bad performance using DistributedArray SPMD for 1D diffusion problem](https://discourse.julialang.org/t/bad-performance-using-distributedarray-spmd-for-1d-diffusion-problem/26443)

<div class="topic-metadata">

**Author:** [@henry2004y](https://discourse.julialang.org/u/henry2004y)\
**Replies:** 2\
**Last updated:** [July 18, 2019, 9:12pm UTC](https://discourse.julialang.org/t/bad-performance-using-distributedarray-spmd-for-1d-diffusion-problem/26443 "2019-07-18T21:12:50Z")

</div>

Hi all, I am writing my first parallel program in Julia 1.1 using the SPMD feature in the DistributedArray package. However, I am nowhere closer to the serial performance, and the parallel scaling is not good neither. …

---

## [Y-tick placement on log scale](https://discourse.julialang.org/t/y-tick-placement-on-log-scale/26515)

<div class="topic-metadata">

**Author:** [@cgeoga](https://discourse.julialang.org/u/cgeoga)\
**Replies:** 0\
**Last updated:** [July 18, 2019, 7:29pm UTC](https://discourse.julialang.org/t/y-tick-placement-on-log-scale/26515 "2019-07-18T19:29:36Z")

</div>

Hello, I’m hoping to get some advice on controlling y-tick placement on a log-log plot. I’m try to make the axis ticks on a plot bigger, and I’m running into this issue: Considering that I need to make the font that…

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

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