# Latest

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

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

**Page:** 1995

---

## [How to use debugger with HTTP.jl](https://discourse.julialang.org/t/how-to-use-debugger-with-http-jl/24248)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 7\
**Last updated:** [May 16, 2019, 6:14pm UTC](https://discourse.julialang.org/t/how-to-use-debugger-with-http-jl/24248 "2019-05-16T18:14:23Z")

</div>

I’ve been struggling to use the new debugging tools with HTTP but I can’t get it to work. Take this simple example: using HTTP, Sockets function handleReq(req) "200 OK" end HTTP.serve(ip"127.0.0.1", 8000, verbose = …

---

## [Find gradient of a posterior](https://discourse.julialang.org/t/find-gradient-of-a-posterior/24254)

<div class="topic-metadata">

**Author:** [@Uche](https://discourse.julialang.org/u/Uche)\
**Replies:** 12\
**Last updated:** [May 16, 2019, 5:25pm UTC](https://discourse.julialang.org/t/find-gradient-of-a-posterior/24254 "2019-05-16T17:25:45Z")

</div>

Please can anyone help me with this. I have been trying to use ForwardDiff or Flux.Tracker or Zygote to get the gradient of this posterior but has not had any success yet: using AltDistributions, Distributions using L…

---

## [Security scanning of Julia code](https://discourse.julialang.org/t/security-scanning-of-julia-code/24253)

<div class="topic-metadata">

**Author:** [@bluesmoon](https://discourse.julialang.org/u/bluesmoon)\
**Replies:** 5\
**Last updated:** [May 16, 2019, 3:51pm UTC](https://discourse.julialang.org/t/security-scanning-of-julia-code/24253 "2019-05-16T15:51:29Z")

</div>

Hi all, I was wondering what other people do to keep track of scanning Julia code for security vulnerabilities and if any vulnerabilities get reported to CVE. Thanks, Philip

---

## [writeMPS()](https://discourse.julialang.org/t/writemps/21669)

<div class="topic-metadata">

**Author:** [@Di11on](https://discourse.julialang.org/u/Di11on)\
**Replies:** 10\
**Last updated:** [May 16, 2019, 3:28pm UTC](https://discourse.julialang.org/t/writemps/21669 "2019-05-16T15:28:08Z")

</div>

Hi folks, In JuMP 0.19, has writeMPS been removed? This issue alludes to it : https://github.com/JuliaOpt/JuMP.jl/issues/1403 If so, why and is there a replacement? And if not, where is the function documented - a go…

---

## [BinaryBuilder for Deldir](https://discourse.julialang.org/t/binarybuilder-for-deldir/24120)

<div class="topic-metadata">

**Author:** [@robertdj](https://discourse.julialang.org/u/robertdj)\
**Replies:** 9\
**Last updated:** [May 16, 2019, 3:13pm UTC](https://discourse.julialang.org/t/binarybuilder-for-deldir/24120 "2019-05-16T15:13:49Z")

</div>

I’m trying out BinaryBuilder for my Deldir package that wraps Fortran code from the R package deldir. On my own computer I can create a working shared object file with the following Bash commands extracted from the R pa…

---

## [I feel like I am over complicating this - HDF5 saving array](https://discourse.julialang.org/t/i-feel-like-i-am-over-complicating-this-hdf5-saving-array/24284)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [May 16, 2019, 3:13pm UTC](https://discourse.julialang.org/t/i-feel-like-i-am-over-complicating-this-hdf5-saving-array/24284 "2019-05-16T15:13:07Z")

</div>

Hello guys I want to save an array of the following type; Array{Array{Float32,2},1} I have called it “B” and I want to save it in a hdf5 file. It gives me an error, with no method matching and I don’t know how to get …

---

## [Sprint/writedlm digit precision](https://discourse.julialang.org/t/sprint-writedlm-digit-precision/24275)

<div class="topic-metadata">

**Author:** [@timmm](https://discourse.julialang.org/u/timmm)\
**Replies:** 2\
**Last updated:** [May 16, 2019, 2:59pm UTC](https://discourse.julialang.org/t/sprint-writedlm-digit-precision/24275 "2019-05-16T14:59:57Z")

</div>

Hi, Is there a simple why for me to set the number of digits when writing to a file? I have something like: using DelimitedFiles writedlm ("$filename.xyz",\[x y z\]," ") or write(io, "xyz");print(io,"\\r\\n"); print(io,…

---

## [Bypassing Forced Termination in Nlopt](https://discourse.julialang.org/t/bypassing-forced-termination-in-nlopt/24224)

<div class="topic-metadata">

**Author:** [@CPPhysics](https://discourse.julialang.org/u/CPPhysics)\
**Replies:** 5\
**Last updated:** [May 16, 2019, 2:19pm UTC](https://discourse.julialang.org/t/bypassing-forced-termination-in-nlopt/24224 "2019-05-16T14:19:30Z")

</div>

So, I am using Nlopt to minimize a nonlinear optimization problem, and for awhile I have been running the code and I will get zero as my return value after 2 iterations, with Nlopt showing “Forced\_Stop” I just read that…

---

## [Help with making multidimensional algorithm type generic](https://discourse.julialang.org/t/help-with-making-multidimensional-algorithm-type-generic/24232)

<div class="topic-metadata">

**Author:** [@francesco.alemanno](https://discourse.julialang.org/u/francesco.alemanno)\
**Replies:** 5\
**Last updated:** [May 16, 2019, 11:51am UTC](https://discourse.julialang.org/t/help-with-making-multidimensional-algorithm-type-generic/24232 "2019-05-16T11:51:40Z")

</div>

Hi Everyone! first i’d like to say that i’m really enjoying using Julia, i’m using it in my PhD with increasing success! lately i’ve been developing a MeanShift algorithm and i managed to make the code dimension generi…

---

## [How to use Dagger.jl's blocks to read a multifile NCDataset?](https://discourse.julialang.org/t/how-to-use-dagger-jls-blocks-to-read-a-multifile-ncdataset/24264)

<div class="topic-metadata">

**Author:** [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)\
**Replies:** 3\
**Last updated:** [May 16, 2019, 11:08am UTC](https://discourse.julialang.org/t/how-to-use-dagger-jls-blocks-to-read-a-multifile-ncdataset/24264 "2019-05-16T11:08:46Z")

</div>

Hi! I’m trying to load a multifile dataset using NCDatasets, and to speed things up I am trying to use dagger in this way include("test/test\_catarrays.jl") # this creates some small test files mfds = Dataset(fnames); X…

---

## [Broadcast of .== slow performance, allocations](https://discourse.julialang.org/t/broadcast-of-slow-performance-allocations/24259)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 5\
**Last updated:** [May 16, 2019, 9:57am UTC](https://discourse.julialang.org/t/broadcast-of-slow-performance-allocations/24259 "2019-05-16T09:57:53Z")

</div>

Why is .== so slow compared to broadcast in this example? julia\> test = \[1\] 1-element Array{Int64,1}: 1 julia\> @btime test .== 1 3.304 μs (13 allocations: 4.72 KiB) 1-element BitArray{1}: true julia\> @btime broadc…

---

## [Own module and how to run it](https://discourse.julialang.org/t/own-module-and-how-to-run-it/24273)

<div class="topic-metadata">

**Author:** [@wiktorkujawa](https://discourse.julialang.org/u/wiktorkujawa)\
**Replies:** 3\
**Last updated:** [May 16, 2019, 10:44am UTC](https://discourse.julialang.org/t/own-module-and-how-to-run-it/24273 "2019-05-16T10:44:54Z")

</div>

I have to files: test.jl x=5 y=4 include("./file.jl") using .File xyzadd(x,y) xyzmultiply(x,y) and 2)file.jl module File export xyzadd,xyzmultiply function xyzadd(a,b) print("Add: ") return a+b end functi…

---

## [Error while including a file](https://discourse.julialang.org/t/error-while-including-a-file/24238)

<div class="topic-metadata">

**Author:** [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)\
**Replies:** 6\
**Last updated:** [May 16, 2019, 9:13am UTC](https://discourse.julialang.org/t/error-while-including-a-file/24238 "2019-05-16T09:13:01Z")

</div>

Sometimes I get this error while including a file include("filename.jl"). Then I have to restart Julia and it works again. I am using Revise. No a single line of the included file is executed. What could be the problem…

---

## [Possible ways to accelerate LinearMapping computation](https://discourse.julialang.org/t/possible-ways-to-accelerate-linearmapping-computation/24270)

<div class="topic-metadata">

**Author:** [@Mr.Robot](https://discourse.julialang.org/u/Mr.Robot)\
**Replies:** 5\
**Last updated:** [May 16, 2019, 7:57am UTC](https://discourse.julialang.org/t/possible-ways-to-accelerate-linearmapping-computation/24270 "2019-05-16T07:57:48Z")

</div>

Problem I am trying to solve a large scale (about 1 million webpages) PageRank problem with iterative solvers. The problem could be cast into solving the linear system \\left\[\\frac{1}{n}(1-p)\\mathbf{11}^T+p\\mathbf{A}^T\\…

---

## [Resetting the canvas within Cairo.jl and Gtk.jl for an image selection viewing gui](https://discourse.julialang.org/t/resetting-the-canvas-within-cairo-jl-and-gtk-jl-for-an-image-selection-viewing-gui/24251)

<div class="topic-metadata">

**Author:** [@mantzaris](https://discourse.julialang.org/u/mantzaris)\
**Replies:** 7\
**Last updated:** [May 16, 2019, 5:18am UTC](https://discourse.julialang.org/t/resetting-the-canvas-within-cairo-jl-and-gtk-jl-for-an-image-selection-viewing-gui/24251 "2019-05-16T05:18:58Z")

</div>

I have here a MWE for what is a Gtk window (Gkt.jl) that uses Cairo to draw on the canvas some png image files. There is a ‘button’ that changes a counter for the selection of which image is drawn, but the images are ove…

---

## [How to iterate over a RemoteChannel?](https://discourse.julialang.org/t/how-to-iterate-over-a-remotechannel/24263)

<div class="topic-metadata">

**Author:** [@jonas-schulze](https://discourse.julialang.org/u/jonas-schulze)\
**Replies:** 1\
**Last updated:** [May 16, 2019, 4:40am UTC](https://discourse.julialang.org/t/how-to-iterate-over-a-remotechannel/24263 "2019-05-16T04:40:03Z")

</div>

For regular Channels chan it is ok to do for val in chan @show val end but for a RemoteChannel there is no iterate(::RemoteChannel). Is that one missing on purpose? What’s the proper way to spawn a task on a worker…

---

## [Why is it \`close(::Channel)\` instead of \`close!(::Channel)\`?](https://discourse.julialang.org/t/why-is-it-close-channel-instead-of-close-channel/24261)

<div class="topic-metadata">

**Author:** [@jonas-schulze](https://discourse.julialang.org/u/jonas-schulze)\
**Replies:** 4\
**Last updated:** [May 16, 2019, 4:27am UTC](https://discourse.julialang.org/t/why-is-it-close-channel-instead-of-close-channel/24261 "2019-05-16T04:27:35Z")

</div>

Out of curiosity, why does closing a channel not have a ! in its name?

---

## [Best Practice: Default Values/Optional Arguments/Readable Code](https://discourse.julialang.org/t/best-practice-default-values-optional-arguments-readable-code/24226)

<div class="topic-metadata">

**Author:** [@taqtiqa-mark](https://discourse.julialang.org/u/taqtiqa-mark)\
**Replies:** 5\
**Last updated:** [May 16, 2019, 4:05am UTC](https://discourse.julialang.org/t/best-practice-default-values-optional-arguments-readable-code/24226 "2019-05-16T04:05:48Z")

</div>

Some time you want to have default values. Sometimes you want to be relaxed about the order parameters are handed in. Sometimes you just want to write readable code: discount\_rate() discount\_rate(;risk\_category = 'AA+…

---

## [JuliaDB column names](https://discourse.julialang.org/t/juliadb-column-names/24250)

<div class="topic-metadata">

**Author:** [@alphasig329](https://discourse.julialang.org/u/alphasig329)\
**Replies:** 4\
**Last updated:** [May 16, 2019, 2:11am UTC](https://discourse.julialang.org/t/juliadb-column-names/24250 "2019-05-16T02:11:55Z")

</div>

I have pulled data from an Oracle database using JDBC and collected the results using the following code: oracle\_cursor = JDBC.cursor(oracle\_connection) execute!(oracle\_cursor, "SQL STATEMENT") column\_names = map(x -\> …

---

## [Untyped keyword arguments](https://discourse.julialang.org/t/untyped-keyword-arguments/24228)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 2\
**Last updated:** [May 16, 2019, 12:02am UTC](https://discourse.julialang.org/t/untyped-keyword-arguments/24228 "2019-05-16T00:02:23Z")

</div>

Summary: Is there any performance benefit to annotating keyword arguments with types? I understand that typed keyword arguments are as efficient as positional arguments. Is that correct? But what are the performance ch…

---

## [Easiest way oj getting Julia with MKL on ubuntu](https://discourse.julialang.org/t/easiest-way-oj-getting-julia-with-mkl-on-ubuntu/24260)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 0\
**Last updated:** [May 15, 2019, 10:13pm UTC](https://discourse.julialang.org/t/easiest-way-oj-getting-julia-with-mkl-on-ubuntu/24260 "2019-05-15T22:13:47Z")

</div>

Hi folks, i know this is not the standard, and from other, older posts, not quite an easy thing to have… but I was wondering if there is a simplemway to get/compile Julia with the MKL libraries instead of OpenBlas. What…

---

## [Right-handed unary operator?](https://discourse.julialang.org/t/right-handed-unary-operator/6280)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 4\
**Last updated:** [May 15, 2019, 8:18pm UTC](https://discourse.julialang.org/t/right-handed-unary-operator/6280 "2019-05-15T20:18:24Z")

</div>

Is it possible to define unary operators that act from the right? For example, typically ! is placed on the right for factorial like 5!. Specifically, I’d like to define some operation like xˡ and xʳ or alternatively x…

---

## [Selecting parts of an array based on the conjunction of two conditions in v1](https://discourse.julialang.org/t/selecting-parts-of-an-array-based-on-the-conjunction-of-two-conditions-in-v1/24255)

<div class="topic-metadata">

**Author:** [@jhcooperman](https://discourse.julialang.org/u/jhcooperman)\
**Replies:** 1\
**Last updated:** [May 15, 2019, 7:30pm UTC](https://discourse.julialang.org/t/selecting-parts-of-an-array-based-on-the-conjunction-of-two-conditions-in-v1/24255 "2019-05-15T19:30:16Z")

</div>

I am updating some code from v0.6 to v1, and I have not been able to resolve one particular issue (except by workaround). In v0.6 my code included the construction A\[:,(A\[1,:\].==1) & (A\[2,:\].==10)\] for selecting the pa…

---

## [Joining two DataFrames with same columns](https://discourse.julialang.org/t/joining-two-dataframes-with-same-columns/5671)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 2\
**Last updated:** [May 15, 2019, 5:49pm UTC](https://discourse.julialang.org/t/joining-two-dataframes-with-same-columns/5671 "2019-05-15T17:49:34Z")

</div>

Hi there, I would like to join two DataFrames that have the same column, let’s say: DataFrameA: country GDP Germany 1 DataFrameB: country GDP USA 2 The resulting DataFrame should be: country GDP …

---

## [Advice on using singleton types for dispatch](https://discourse.julialang.org/t/advice-on-using-singleton-types-for-dispatch/24245)

<div class="topic-metadata">

**Author:** [@jbmuir](https://discourse.julialang.org/u/jbmuir)\
**Replies:** 1\
**Last updated:** [May 15, 2019, 4:41pm UTC](https://discourse.julialang.org/t/advice-on-using-singleton-types-for-dispatch/24245 "2019-05-15T16:41:02Z")

</div>

I’m writing an extension for LightGraphs.jl to calculate solutions of the eikonal equation over weighted graphs; I would like to provide for the option to use different norms when calculating solutions. Currently my setu…

---

## [Hi, I have just started learning. Do you have any suggestions on how to improve my code?](https://discourse.julialang.org/t/hi-i-have-just-started-learning-do-you-have-any-suggestions-on-how-to-improve-my-code/24237)

<div class="topic-metadata">

**Author:** [@Cameron\_Belcher](https://discourse.julialang.org/u/Cameron_Belcher)\
**Replies:** 3\
**Last updated:** [May 15, 2019, 4:40pm UTC](https://discourse.julialang.org/t/hi-i-have-just-started-learning-do-you-have-any-suggestions-on-how-to-improve-my-code/24237 "2019-05-15T16:40:30Z")

</div>

positionX = 0 positionY = 0 while true global positionX global positionY println(“X: $positionX”) println(“Y: $positionY”) print("Enter command: ") userInput = readline() if userInput == “a” positionX -= 1 els…

---

## [How to formulate a complex JuMP variable array](https://discourse.julialang.org/t/how-to-formulate-a-complex-jump-variable-array/24222)

<div class="topic-metadata">

**Author:** [@CPPhysics](https://discourse.julialang.org/u/CPPhysics)\
**Replies:** 3\
**Last updated:** [May 15, 2019, 3:53pm UTC](https://discourse.julialang.org/t/how-to-formulate-a-complex-jump-variable-array/24222 "2019-05-15T15:53:10Z")

</div>

I would like to create a complex jump array variable and I have been looking through the documentation for awhile and things are still not clear. Lets say for a trivial example I want to minimize the trace of a DxD comp…

---

## [What is the purpose of this function definition in Wavelets package?](https://discourse.julialang.org/t/what-is-the-purpose-of-this-function-definition-in-wavelets-package/24236)

<div class="topic-metadata">

**Author:** [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Replies:** 2\
**Last updated:** [May 15, 2019, 3:50pm UTC](https://discourse.julialang.org/t/what-is-the-purpose-of-this-function-definition-in-wavelets-package/24236 "2019-05-15T15:50:29Z")

</div>

I like to look inside different Julia packages to get familiar with the syntax and sometimes find function definitions like this (example from Wavelets package): function dwt end And later on in the same file(a part of…

---

## [Very slow array creation (and Benchmark iterate error)](https://discourse.julialang.org/t/very-slow-array-creation-and-benchmark-iterate-error/24020)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 6\
**Last updated:** [May 15, 2019, 3:03pm UTC](https://discourse.julialang.org/t/very-slow-array-creation-and-benchmark-iterate-error/24020 "2019-05-15T15:03:28Z")

</div>

I am a beginner Julia user and am having a hard time developing a model because it takes a very long time to initialize certain arrays. I tried using BenchmarkTools.jl to get an accurate time but it generated an iterate …

---

## [Library for (algebraically) complicated sums (and other expressions)?](https://discourse.julialang.org/t/library-for-algebraically-complicated-sums-and-other-expressions/17810)

<div class="topic-metadata">

**Author:** [@rotsoc](https://discourse.julialang.org/u/rotsoc)\
**Replies:** 10\
**Last updated:** [May 15, 2019, 2:08pm UTC](https://discourse.julialang.org/t/library-for-algebraically-complicated-sums-and-other-expressions/17810 "2019-05-15T14:08:29Z")

</div>

I was wondering if anyone knows of a library that easily handles expressions like this: This would greatly help in what I am trying to do… This expression can be calculated using loops but in what I am writing end-u…

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

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