# Latest

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

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

**Page:** 1865

---

## [Map vs list comprehension](https://discourse.julialang.org/t/map-vs-list-comprehension/916)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 23\
**Last updated:** [December 11, 2019, 12:22pm UTC](https://discourse.julialang.org/t/map-vs-list-comprehension/916 "2019-12-11T12:22:11Z")

</div>

What is the difference between map(v -\> f(v), lst) and \[f(v) for v in lst\]? I have seen this discussion but the focus was on speed and memory allocation.

---

## [Communication between julia and python using TCP socket](https://discourse.julialang.org/t/communication-between-julia-and-python-using-tcp-socket/32146)

<div class="topic-metadata">

**Author:** [@HiroIshida](https://discourse.julialang.org/u/HiroIshida)\
**Replies:** 1\
**Last updated:** [December 11, 2019, 12:20pm UTC](https://discourse.julialang.org/t/communication-between-julia-and-python-using-tcp-socket/32146 "2019-12-11T12:20:53Z")

</div>

The following echo server and client written in Julia work well. # server written in Julia using Sockets server = listen(ip"127.0.0.1", 2000) sock = accept(server) while true write(sock, "echo: " \* readline(sock) \*…

---

## [Tricky signature for convertible types](https://discourse.julialang.org/t/tricky-signature-for-convertible-types/32145)

<div class="topic-metadata">

**Author:** [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Replies:** 3\
**Last updated:** [December 11, 2019, 12:00pm UTC](https://discourse.julialang.org/t/tricky-signature-for-convertible-types/32145 "2019-12-11T12:00:01Z")

</div>

Hi, I’m trying to figure out whether its possible to write a signature for a function f(x, y) such that y can be converted to x via convert. Actually it is a bit simpler: I want to constraint x and y to be both either \<:…

---

## [DataFrame join error](https://discourse.julialang.org/t/dataframe-join-error/32141)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 6\
**Last updated:** [December 11, 2019, 9:47am UTC](https://discourse.julialang.org/t/dataframe-join-error/32141 "2019-12-11T09:47:31Z")

</div>

I have julia\> timeuse = join(people\[:, \[:idhh, :idpers, :gender\]\], timeuse; on = \[:idhh, :idpers\], kind = :inner) ERROR: DimensionMismatch("destination must have length equal to sums of concatenated vectors") Sta…

---

## [Issue with integration close to 0](https://discourse.julialang.org/t/issue-with-integration-close-to-0/32138)

<div class="topic-metadata">

**Author:** [@Vardges\_Tserunyan](https://discourse.julialang.org/u/Vardges_Tserunyan)\
**Replies:** 1\
**Last updated:** [December 11, 2019, 8:47am UTC](https://discourse.julialang.org/t/issue-with-integration-close-to-0/32138 "2019-12-11T08:47:46Z")

</div>

I am trying to integrate a fairly simple set of linear differential equations. When getting closer to 0, one of the variables in question (x1) starts oscillating going from negative to positive and back. This must be wro…

---

## [Dot syntax with tuples](https://discourse.julialang.org/t/dot-syntax-with-tuples/15222)

<div class="topic-metadata">

**Author:** [@nantonel](https://discourse.julialang.org/u/nantonel)\
**Replies:** 4\
**Last updated:** [December 11, 2019, 6:25am UTC](https://discourse.julialang.org/t/dot-syntax-with-tuples/15222 "2019-12-11T06:25:27Z")

</div>

In Julia 0.6 the it was possible to do: julia\> x = ones(2), zeros(3,4); julia\> x .+ 3 (\[4.0, 4.0\], \[3.0 3.0 3.0 3.0; 3.0 3.0 3.0 3.0; 3.0 3.0 3.0 3.0\]) Now in 1.0 this is no longer possible: julia\> x .+ 3 ERROR: Me…

---

## [RData load error](https://discourse.julialang.org/t/rdata-load-error/32133)

<div class="topic-metadata">

**Author:** [@ggrolt](https://discourse.julialang.org/u/ggrolt)\
**Replies:** 0\
**Last updated:** [December 11, 2019, 5:08am UTC](https://discourse.julialang.org/t/rdata-load-error/32133 "2019-12-11T05:08:41Z")

</div>

Hi, I’m trying to read in some xz compressed data using the RData package. I have a module with the line include(“constants.jl”) Inside constants.jl is the following: using CodecXz using RData const x = RData.lo…

---

## [Find the index of a bin where a value between two bin value](https://discourse.julialang.org/t/find-the-index-of-a-bin-where-a-value-between-two-bin-value/32080)

<div class="topic-metadata">

**Author:** [@yusri-dh](https://discourse.julialang.org/u/yusri-dh)\
**Replies:** 2\
**Last updated:** [December 11, 2019, 5:08am UTC](https://discourse.julialang.org/t/find-the-index-of-a-bin-where-a-value-between-two-bin-value/32080 "2019-12-11T05:08:37Z")

</div>

Is there any related function in julia like numpy.digitize? Basically I want to find the index of a bin where a value between two bin value. Here is the example from numpy \>\>\> my\_list = \[3,2,56,4,32,4,7,88,4,3,4\] \>\>\> b…

---

## [HTTP.jl unsupported keyword argument when running on Heroku, but same Docker container works fine on local machine](https://discourse.julialang.org/t/http-jl-unsupported-keyword-argument-when-running-on-heroku-but-same-docker-container-works-fine-on-local-machine/27629)

<div class="topic-metadata">

**Author:** [@milesf](https://discourse.julialang.org/u/milesf)\
**Replies:** 4\
**Last updated:** [December 11, 2019, 4:48am UTC](https://discourse.julialang.org/t/http-jl-unsupported-keyword-argument-when-running-on-heroku-but-same-docker-container-works-fine-on-local-machine/27629 "2019-12-11T04:48:58Z")

</div>

I have a simple Docker container (repo link) that successfully launches on my local machine, but produces a Julia error when I attempt to run it on Heroku. It seems to be complaining that verbose is an unsupported keywor…

---

## [SolveTime() for Multi-Start options](https://discourse.julialang.org/t/solvetime-for-multi-start-options/32065)

<div class="topic-metadata">

**Author:** [@SingingKim](https://discourse.julialang.org/u/SingingKim)\
**Replies:** 2\
**Last updated:** [December 11, 2019, 2:42am UTC](https://discourse.julialang.org/t/solvetime-for-multi-start-options/32065 "2019-12-11T02:42:42Z")

</div>

Hi all, Is there a way to call solution time for each starting point of the solver? For example, when an NLP solver (e.g. KNITRO) generates 100 different starting points, you get 100 local optimal values (or infeasibil…

---

## [Illustrating a point from a function in p-dimensional space](https://discourse.julialang.org/t/illustrating-a-point-from-a-function-in-p-dimensional-space/31875)

<div class="topic-metadata">

**Author:** [@taqtiqa-mark](https://discourse.julialang.org/u/taqtiqa-mark)\
**Replies:** 7\
**Last updated:** [December 10, 2019, 8:41am UTC](https://discourse.julialang.org/t/illustrating-a-point-from-a-function-in-p-dimensional-space/31875 "2019-12-10T08:41:13Z")

</div>

Are there any ‘pre-built’ utilities for plotting/illustrating a point in p-dimensional space? Specifically, the value returned by a function with p-parameters. I’ve hand sketched an illustration of the point in terms o…

---

## [CPLEX evaluate solution quality (get basis condition number kappa value)](https://discourse.julialang.org/t/cplex-evaluate-solution-quality-get-basis-condition-number-kappa-value/32128)

<div class="topic-metadata">

**Author:** [@Bastian\_Moya](https://discourse.julialang.org/u/Bastian_Moya)\
**Replies:** 0\
**Last updated:** [December 11, 2019, 2:23am UTC](https://discourse.julialang.org/t/cplex-evaluate-solution-quality-get-basis-condition-number-kappa-value/32128 "2019-12-11T02:23:47Z")

</div>

There is a way to evaluate the solution quality in CPLEX which is getting a kappa value. I have been trying getting this with CPX\_PARAM\_MIPKAPPASTATS command with the following line: m = Model(with\_optimizer(CPLEX.Optim…

---

## [Functions, Modules, and Scope](https://discourse.julialang.org/t/functions-modules-and-scope/32112)

<div class="topic-metadata">

**Author:** [@manderson](https://discourse.julialang.org/u/manderson)\
**Replies:** 5\
**Last updated:** [December 11, 2019, 12:44am UTC](https://discourse.julialang.org/t/functions-modules-and-scope/32112 "2019-12-11T00:44:59Z")

</div>

Alright, so I have been working on an algorithm with lots of variables and lots of repeated function calls, so I put all of my functions into a module and everything works just fine. As I’m nearing the publishing of a pa…

---

## [Error installing RCall and Feather](https://discourse.julialang.org/t/error-installing-rcall-and-feather/32100)

<div class="topic-metadata">

**Author:** [@curious](https://discourse.julialang.org/u/curious)\
**Replies:** 2\
**Last updated:** [December 11, 2019, 12:39am UTC](https://discourse.julialang.org/t/error-installing-rcall-and-feather/32100 "2019-12-11T00:39:34Z")

</div>

I am getting the following error when trying to add the RCall package. Got the same error when I tried installing Feather before RCall. I don’t understand what is wrong. Would appreciate if someone can help. Thank you. …

---

## [How to get number of current BLAS threads?](https://discourse.julialang.org/t/how-to-get-number-of-current-blas-threads/32090)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 4\
**Last updated:** [December 11, 2019, 12:23am UTC](https://discourse.julialang.org/t/how-to-get-number-of-current-blas-threads/32090 "2019-12-11T00:23:52Z")

</div>

LinearAlgebra.BLAS.set\_num\_threads() sets the number of threads. But, how to get the number of threads (so that I could save it, set another one, then restore the value)? Thanks.

---

## [Flux: Feed minibatch into Neural Network](https://discourse.julialang.org/t/flux-feed-minibatch-into-neural-network/32072)

<div class="topic-metadata">

**Author:** [@patdax](https://discourse.julialang.org/u/patdax)\
**Replies:** 1\
**Last updated:** [December 10, 2019, 10:45pm UTC](https://discourse.julialang.org/t/flux-feed-minibatch-into-neural-network/32072 "2019-12-10T22:45:40Z")

</div>

I built the following model: function my\_model(n) conv\_1 = Conv((8,8), 3 =\> 32, stride=(4,4), relu) conv\_2 = Conv((4,4), 32 =\>64, stride=(2,2), relu) conv\_3 = Conv((3,3), 64 =\>64, stride=(1,1), relu) mod…

---

## [Regex performance on Windows 10](https://discourse.julialang.org/t/regex-performance-on-windows-10/32113)

<div class="topic-metadata">

**Author:** [@Dictino](https://discourse.julialang.org/u/Dictino)\
**Replies:** 0\
**Last updated:** [December 10, 2019, 6:53pm UTC](https://discourse.julialang.org/t/regex-performance-on-windows-10/32113 "2019-12-10T18:53:52Z")

</div>

Hi This is my first post here so sorry if this is not a good place for this question. I’ve observed that there is an important performance difference between Windows 10 and Linux in regex match performance MWE: module…

---

## [Unknown error from ForwardDiff](https://discourse.julialang.org/t/unknown-error-from-forwarddiff/32119)

<div class="topic-metadata">

**Author:** [@bdeonovic](https://discourse.julialang.org/u/bdeonovic)\
**Replies:** 1\
**Last updated:** [December 10, 2019, 9:34pm UTC](https://discourse.julialang.org/t/unknown-error-from-forwarddiff/32119 "2019-12-10T21:34:26Z")

</div>

Need some help debugging an error from ForwardDiff. Let me know what additional information would help! ERROR: Stacktrace: \[1\] ≺(::Nothing, ::Type) at C:\\Users\\bdeon\\.julia\\packages\\ForwardDiff\\DVizx\\src\\dual.jl:49 \[…

---

## [Documenter colors for backticked code](https://discourse.julialang.org/t/documenter-colors-for-backticked-code/32073)

<div class="topic-metadata">

**Author:** [@jarl](https://discourse.julialang.org/u/jarl)\
**Replies:** 6\
**Last updated:** [December 10, 2019, 8:41pm UTC](https://discourse.julialang.org/t/documenter-colors-for-backticked-code/32073 "2019-12-10T20:41:33Z")

</div>

After an update to the newest version of Documenter.jl some things changed, most of which are positive changes. The colors of backticked code (e.g. a\_typical\_variable) has changed. It is now foreground red, and used to b…

---

## [Optimize benchmark-code](https://discourse.julialang.org/t/optimize-benchmark-code/32105)

<div class="topic-metadata">

**Author:** [@Johannes](https://discourse.julialang.org/u/Johannes)\
**Replies:** 11\
**Last updated:** [December 10, 2019, 8:25pm UTC](https://discourse.julialang.org/t/optimize-benchmark-code/32105 "2019-12-10T20:25:31Z")

</div>

Hey all, I found this benchmark comparing different languages in economics and I wonder whether the underlying Julia code can be optimized further (full repository is available here): ## Basic RBC model with full deprec…

---

## [SharedArrays crashes on Julia 1.3 Windows](https://discourse.julialang.org/t/sharedarrays-crashes-on-julia-1-3-windows/32099)

<div class="topic-metadata">

**Author:** [@Diger](https://discourse.julialang.org/u/Diger)\
**Replies:** 13\
**Last updated:** [December 10, 2019, 8:05pm UTC](https://discourse.julialang.org/t/sharedarrays-crashes-on-julia-1-3-windows/32099 "2019-12-10T20:05:15Z")

</div>

Even though people will always tell you to upgrade to the latest version, this is the reason I hate updating old but working stuff… So since I updated from 1.0 to 1.3 SharedArrays doesn’t work anymore. using SharedArray…

---

## [Reluctance to switch to Julia; PyPy and Cython](https://discourse.julialang.org/t/reluctance-to-switch-to-julia-pypy-and-cython/12420)

<div class="topic-metadata">

**Author:** [@Thomas\_Benardo](https://discourse.julialang.org/u/Thomas_Benardo)\
**Replies:** 35\
**Last updated:** [December 10, 2019, 6:58pm UTC](https://discourse.julialang.org/t/reluctance-to-switch-to-julia-pypy-and-cython/12420 "2019-12-10T18:58:26Z")

</div>

Im quite reluctant to completely switch to Julia and the main reason being static compilation. Python is fast enough with {fully-compatible} PyPy(close to Julia if given chance to warm up) {limited} Python can be stat…

---

## [Flux & Float 64 + model deconstruction?](https://discourse.julialang.org/t/flux-float-64-model-deconstruction/32048)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 10\
**Last updated:** [December 10, 2019, 6:53pm UTC](https://discourse.julialang.org/t/flux-float-64-model-deconstruction/32048 "2019-12-10T18:53:30Z")

</div>

I’m trying to run my past Flux networks, and have a couple of questions. First, I figured out that with model m and data X, I now find predictions by m(X) instead of the old Tracker.data(m(X)) — great, I like that. Nex…

---

## ["Press Enter to start a new session. - Julia has exited." error](https://discourse.julialang.org/t/press-enter-to-start-a-new-session-julia-has-exited-error/32107)

<div class="topic-metadata">

**Author:** [@lko](https://discourse.julialang.org/u/lko)\
**Replies:** 2\
**Last updated:** [December 10, 2019, 6:14pm UTC](https://discourse.julialang.org/t/press-enter-to-start-a-new-session-julia-has-exited-error/32107 "2019-12-10T18:14:48Z")

</div>

I’m a new user, trying to set up Julia/Juno under Ubuntu 18.04 derivative. Julia runs fine when started in a terminal, by when I start up atom, I just get "Press Enter to start a new session. Julia has exited". I’ve …

---

## [Promote constructor causing stack overflow](https://discourse.julialang.org/t/promote-constructor-causing-stack-overflow/32070)

<div class="topic-metadata">

**Author:** [@doomphoenix-qxz](https://discourse.julialang.org/u/doomphoenix-qxz)\
**Replies:** 2\
**Last updated:** [December 10, 2019, 4:01pm UTC](https://discourse.julialang.org/t/promote-constructor-causing-stack-overflow/32070 "2019-12-10T16:01:05Z")

</div>

julia\> struct parametrict{T} a::T b::T end julia\> parametrict(a::Real, b::Real) = parametrict(promote(a, b)...) parametrict julia\> parametrict(0.5, 0.5) ERROR: StackOverflowErr…

---

## [How to initialize a dictionary with empty arrays of type Array{Float64, 2}?](https://discourse.julialang.org/t/how-to-initialize-a-dictionary-with-empty-arrays-of-type-array-float64-2/32085)

<div class="topic-metadata">

**Author:** [@Volker](https://discourse.julialang.org/u/Volker)\
**Replies:** 6\
**Last updated:** [December 10, 2019, 3:40pm UTC](https://discourse.julialang.org/t/how-to-initialize-a-dictionary-with-empty-arrays-of-type-array-float64-2/32085 "2019-12-10T15:40:57Z")

</div>

Hi, can somebody tell me how to initialize a dictionary with empty arrays of type Array{Float64, 2}? 1. Alternative dict\_data = \[Dict(name =\> Array{Float64, 2} for name in \[:x1, :x2, :y1, :y2\]) for i in 1:10\] dict\_da…

---

## [VS Code with jupyter notebooks looks really cool - except the python kernel :)](https://discourse.julialang.org/t/vs-code-with-jupyter-notebooks-looks-really-cool-except-the-python-kernel/32091)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 1\
**Last updated:** [December 10, 2019, 3:13pm UTC](https://discourse.julialang.org/t/vs-code-with-jupyter-notebooks-looks-really-cool-except-the-python-kernel/32091 "2019-12-10T15:13:24Z")

</div>

How can I change the kernel?

---

## [Developping non registered packages: should I always do dev package?](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013)

<div class="topic-metadata">

**Author:** [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Replies:** 9\
**Last updated:** [December 10, 2019, 2:11pm UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013 "2019-12-10T14:11:31Z")

</div>

Hello everyone, I have a few questions regarding the use of Pkg. I know there are some other threads with similar titles but I could not really find a clear answer to my questions. It’s also hard to make a MWE, since m…

---

## [SnoopCompile 1.0 and 1.1](https://discourse.julialang.org/t/snoopcompile-1-0-and-1-1/31453)

<div class="topic-metadata">

**Author:** [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Replies:** 8\
**Last updated:** [December 10, 2019, 1:18pm UTC](https://discourse.julialang.org/t/snoopcompile-1-0-and-1-1/31453 "2019-12-10T13:18:30Z")

</div>

I’m pleased to announce the 1.0 release of SnoopCompile, a package that can be used to diagnose and sometimes reduce package startup latencies (a.k.a., “time to first plot”). Version 1.0 brings a couple of new features: …

---

## [Best way to access docstings (like ? mode)](https://discourse.julialang.org/t/best-way-to-access-docstings-like-mode/32096)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 3\
**Last updated:** [December 10, 2019, 1:17pm UTC](https://discourse.julialang.org/t/best-way-to-access-docstings-like-mode/32096 "2019-12-10T13:17:40Z")

</div>

In the emacs interface julia-repl.el currently we access docstrings with @docs, eg when the user requests help for foo, @docs foo is sent to the Julia REPL. But this does not work for keywords like break or continue, …

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

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