# Latest

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

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

**Page:** 1783

---

## [How to use local module within a Project directory?](https://discourse.julialang.org/t/how-to-use-local-module-within-a-project-directory/26358)

<div class="topic-metadata">

**Author:** [@tuckermcclure](https://discourse.julialang.org/u/tuckermcclure)\
**Replies:** 13\
**Last updated:** [April 6, 2020, 4:45pm UTC](https://discourse.julialang.org/t/how-to-use-local-module-within-a-project-directory/26358 "2020-04-06T16:45:35Z")

</div>

When I’m not in a Project directory, I can make a file like so: # M1.jl module M1 export M1Type struct M1Type data::Real end end and then from that directory: push!(LOAD\_PATH, pwd() and then usin…

---

## [Trouble understanding how time() works](https://discourse.julialang.org/t/trouble-understanding-how-time-works/37061)

<div class="topic-metadata">

**Author:** [@kw\_martin](https://discourse.julialang.org/u/kw_martin)\
**Replies:** 3\
**Last updated:** [April 6, 2020, 4:20pm UTC](https://discourse.julialang.org/t/trouble-understanding-how-time-works/37061 "2020-04-06T16:20:50Z")

</div>

I have a simple program using the time() function and can’t understand the results the time() function is giving. My guess is it has something to do with Julia’s optimization. I expect that two different calls to time() …

---

## [Is there a way to traverse the indices of @polyvar p11 p12...pnn](https://discourse.julialang.org/t/is-there-a-way-to-traverse-the-indices-of-polyvar-p11-p12-pnn/37096)

<div class="topic-metadata">

**Author:** [@Yusen\_Liu](https://discourse.julialang.org/u/Yusen_Liu)\
**Replies:** 5\
**Last updated:** [April 6, 2020, 3:39pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-traverse-the-indices-of-polyvar-p11-p12-pnn/37096 "2020-04-06T15:39:04Z")

</div>

Hi all, I’ve been stuck with a problem traversing the indices of @polyvar. My code is as follows @polyvar p11 p12 p13 p21 p22 p23 p31 p32 p33 which is a way to declare 9 polyvars of a 3x3 matrix. Since there are only …

---

## [Question about computing the partial derivatives of a multivariate polynomial](https://discourse.julialang.org/t/question-about-computing-the-partial-derivatives-of-a-multivariate-polynomial/36835)

<div class="topic-metadata">

**Author:** [@Yusen\_Liu](https://discourse.julialang.org/u/Yusen_Liu)\
**Replies:** 5\
**Last updated:** [April 6, 2020, 8:03am UTC](https://discourse.julialang.org/t/question-about-computing-the-partial-derivatives-of-a-multivariate-polynomial/36835 "2020-04-06T08:03:03Z")

</div>

Hi all, I got stuck on computing the partial derivatives of a multivariate polynomial. The following is my code: using TypedPolynomials using LinearAlgebra @polyvar p1 p2 p3 p4 p5 p6 p11 p12 p13 p21 p22 p23 p31 p32 p3…

---

## [Defining functions using begin](https://discourse.julialang.org/t/defining-functions-using-begin/37090)

<div class="topic-metadata">

**Author:** [@risingganymede](https://discourse.julialang.org/u/risingganymede)\
**Replies:** 4\
**Last updated:** [April 6, 2020, 1:43pm UTC](https://discourse.julialang.org/t/defining-functions-using-begin/37090 "2020-04-06T13:43:49Z")

</div>

I found that it is possible to define functions like this: f(x, y) = begin x + y end I couldn’t find documentation for this style of function definition in the Julia manual. My question is thus: what differences do…

---

## [ForwardDiff - slowed down by Real vs. Float operations](https://discourse.julialang.org/t/forwarddiff-slowed-down-by-real-vs-float-operations/36987)

<div class="topic-metadata">

**Author:** [@danicaratelli](https://discourse.julialang.org/u/danicaratelli)\
**Replies:** 13\
**Last updated:** [April 6, 2020, 1:36pm UTC](https://discourse.julialang.org/t/forwarddiff-slowed-down-by-real-vs-float-operations/36987 "2020-04-06T13:36:24Z")

</div>

Hello, I am using ForwardDiff to solve a minimization problem. Following the suggestions I read, I need to specify what were my Float64 arrays as Real arrays. I do so and my code works! However, it is really slow compar…

---

## [ANN: Underscores.jl: Placeholder syntax for closures](https://discourse.julialang.org/t/ann-underscores-jl-placeholder-syntax-for-closures/36482)

<div class="topic-metadata">

**Author:** [@c42f](https://discourse.julialang.org/u/c42f)\
**Replies:** 49\
**Last updated:** [April 6, 2020, 1:22pm UTC](https://discourse.julialang.org/t/ann-underscores-jl-placeholder-syntax-for-closures/36482 "2020-04-06T13:22:28Z")

</div>

I’m happy to announce Underscores.jl, a small but general package for \_ placeholder syntax which makes it easier to pass anonymous functions to other functions. The package provides a single @\_ macro which is helpful in…

---

## [@async read(stdin, Char)](https://discourse.julialang.org/t/async-read-stdin-char/36942)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 7\
**Last updated:** [April 6, 2020, 12:42pm UTC](https://discourse.julialang.org/t/async-read-stdin-char/36942 "2020-04-06T12:42:23Z")

</div>

I want to listen on the stdin but my module stucks loading. I see kinda the problem. Is there a way around? module T t() = @async while true read(stdin, Char) end t() end

---

## [Julia PlotlyJS block show plot, update plot](https://discourse.julialang.org/t/julia-plotlyjs-block-show-plot-update-plot/37104)

<div class="topic-metadata">

**Author:** [@Xeno](https://discourse.julialang.org/u/Xeno)\
**Replies:** 0\
**Last updated:** [April 6, 2020, 11:15am UTC](https://discourse.julialang.org/t/julia-plotlyjs-block-show-plot-update-plot/37104 "2020-04-06T11:15:08Z")

</div>

I’m trying to include a plot using the PlotlyJS package in a small application using Blink. So far, whenever I use the plot function, it opens a new window, which I want to avoid… Furthermore, when updating the plot, ano…

---

## [Interpolations: boundary conditions for the second and first derivative](https://discourse.julialang.org/t/interpolations-boundary-conditions-for-the-second-and-first-derivative/37036)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 4\
**Last updated:** [April 6, 2020, 10:19am UTC](https://discourse.julialang.org/t/interpolations-boundary-conditions-for-the-second-and-first-derivative/37036 "2020-04-06T10:19:53Z")

</div>

Is there a way to have a cubic interpolation with boundary conditions for the 2nd and 1st derivative? I am using Interpolations.jl Here is an example using Interpolations, Plots x = 1:10 y = rand(10) y\[1\] = 0 y\[10\] = …

---

## [Computing log liklihood given a probability function](https://discourse.julialang.org/t/computing-log-liklihood-given-a-probability-function/36971)

<div class="topic-metadata">

**Author:** [@samantp](https://discourse.julialang.org/u/samantp)\
**Replies:** 1\
**Last updated:** [April 3, 2020, 3:53pm UTC](https://discourse.julialang.org/t/computing-log-liklihood-given-a-probability-function/36971 "2020-04-03T15:53:06Z")

</div>

I am a bit overwhelmed with regard to all the information out there about this and would like some guidance with regard to how to evaluate the log liklihood (or cross entropy) function for a given probability distributio…

---

## [Solving an optimal control problem with JuMP](https://discourse.julialang.org/t/solving-an-optimal-control-problem-with-jump/36570)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 16\
**Last updated:** [March 28, 2020, 4:50pm UTC](https://discourse.julialang.org/t/solving-an-optimal-control-problem-with-jump/36570 "2020-03-28T16:50:55Z")

</div>

I am trying to solve an optimal control problem using JuMP. My problem involves a set of ODEs and an objective function that needs the final conditions of the solution of the ODEs. The input on which I want to optimize …

---

## [How to estimate the jacobian matrix of the ODE systems at end solutions](https://discourse.julialang.org/t/how-to-estimate-the-jacobian-matrix-of-the-ode-systems-at-end-solutions/37099)

<div class="topic-metadata">

**Author:** [@yanriver](https://discourse.julialang.org/u/yanriver)\
**Replies:** 0\
**Last updated:** [April 6, 2020, 7:59am UTC](https://discourse.julialang.org/t/how-to-estimate-the-jacobian-matrix-of-the-ode-systems-at-end-solutions/37099 "2020-04-06T07:59:26Z")

</div>

Hello, I am a R user, and just start to learn Julia. I used to use R ‘desolve’ package to solve systems of ODEs, but the speed of Julia ‘DifferentialEquations’ make me switch to Julia to handle some large systems. My qu…

---

## [Interact.jl live reload](https://discourse.julialang.org/t/interact-jl-live-reload/35109)

<div class="topic-metadata">

**Author:** [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Replies:** 4\
**Last updated:** [April 6, 2020, 7:49am UTC](https://discourse.julialang.org/t/interact-jl-live-reload/35109 "2020-04-06T07:49:38Z")

</div>

Hi! I’m trying out Interact.jl and use Mux as they suggest for serving the web page: ui = ... WebIO.webio\_serve(Mux.page("/", req -\> ui), 8000) What I don’t understand is how to get “live reload” or something similar? …

---

## [Type Stability for Distinct Returns](https://discourse.julialang.org/t/type-stability-for-distinct-returns/37076)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 7\
**Last updated:** [April 6, 2020, 7:11am UTC](https://discourse.julialang.org/t/type-stability-for-distinct-returns/37076 "2020-04-06T07:11:10Z")

</div>

I have the following situation. I am iterating something (i.e., numerical integration) forward in time, and sometimes I want to return the full trajectory of values at the intermediate steps, while other times I want to…

---

## [Question about computing the determinant of matrix of indeterminate variables](https://discourse.julialang.org/t/question-about-computing-the-determinant-of-matrix-of-indeterminate-variables/36818)

<div class="topic-metadata">

**Author:** [@Yusen\_Liu](https://discourse.julialang.org/u/Yusen_Liu)\
**Replies:** 4\
**Last updated:** [April 6, 2020, 7:01am UTC](https://discourse.julialang.org/t/question-about-computing-the-determinant-of-matrix-of-indeterminate-variables/36818 "2020-04-06T07:01:45Z")

</div>

Hi all, I’ve been struggling with computing the determinant of the matrix of indeterminate variables. My code is as follows: using TypedPolynomials using LinearAlgebra @polyvar p1 p2 p3 p4 p5 p6 A = \[p1 p2 p3\] AT=t…

---

## [Is there something similar to R's pmap in Julia?](https://discourse.julialang.org/t/is-there-something-similar-to-rs-pmap-in-julia/37055)

<div class="topic-metadata">

**Author:** [@ameresv](https://discourse.julialang.org/u/ameresv)\
**Replies:** 7\
**Last updated:** [April 6, 2020, 6:22am UTC](https://discourse.julialang.org/t/is-there-something-similar-to-rs-pmap-in-julia/37055 "2020-04-06T06:22:39Z")

</div>

Hi! I am new with Julia (being an R-guy) I have a question: Is something similar to pmap here in Julia? Why I am asking this, because I have this dataframe: m = DataFrame( x = \[1,2,3\], y = \[\[1,2,3\],\[4,5,6\],\[7,8…

---

## [What and why: Downloading artifact Zlib, Bzip2, MbedTLS](https://discourse.julialang.org/t/what-and-why-downloading-artifact-zlib-bzip2-mbedtls/37044)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 3\
**Last updated:** [April 6, 2020, 6:00am UTC](https://discourse.julialang.org/t/what-and-why-downloading-artifact-zlib-bzip2-mbedtls/37044 "2020-04-06T06:00:05Z")

</div>

At some companies one have to get permission to download software, and it’s a major effort. Thus, it’s necessary to identify the set of packages needed. (In fact at my previous company, cloning git repos was simply bloc…

---

## [Apr 11 online talk: Intro to Lattices; Riemann Theta function in Julia](https://discourse.julialang.org/t/apr-11-online-talk-intro-to-lattices-riemann-theta-function-in-julia/37085)

<div class="topic-metadata">

**Author:** [@chrisvwx](https://discourse.julialang.org/u/chrisvwx)\
**Replies:** 0\
**Last updated:** [April 6, 2020, 2:45am UTC](https://discourse.julialang.org/t/apr-11-online-talk-intro-to-lattices-riemann-theta-function-in-julia/37085 "2020-04-06T02:45:55Z")

</div>

On Apr 11 the Bay Area Julia Users group will have an online event that all are welcome to join; the event will be at 11am California time, or 1800 UTC. Lynn Chua will present Theta.jl for computing the Riemann theta f…

---

## [How do I plot a curve in plots?](https://discourse.julialang.org/t/how-do-i-plot-a-curve-in-plots/36995)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 23\
**Last updated:** [April 6, 2020, 1:18am UTC](https://discourse.julialang.org/t/how-do-i-plot-a-curve-in-plots/36995 "2020-04-06T01:18:12Z")

</div>

function Π(E,W) E = 1:10 W = 1:10 sqrt(E)+4\*W end When I try to enter this function, it gives me Π as an output, and If if I try to use Π as a function, I’m told that I don’t get a function.

---

## [ANN: Tensars.jl: Tensors as linear mappings of multidimensional arrays](https://discourse.julialang.org/t/ann-tensars-jl-tensors-as-linear-mappings-of-multidimensional-arrays/36576)

<div class="topic-metadata">

**Author:** [@thisrod](https://discourse.julialang.org/u/thisrod)\
**Replies:** 16\
**Last updated:** [April 6, 2020, 12:12am UTC](https://discourse.julialang.org/t/ann-tensars-jl-tensors-as-linear-mappings-of-multidimensional-arrays/36576 "2020-04-06T00:12:39Z")

</div>

The Tensar package is the first software that I have publically released, so please be gentle. It is my attempt to solve the following problems: I have a n×n matrix that discretises d/dx. I am trying to compute the c…

---

## [@constraint macro vs autodiff vs provide gradient](https://discourse.julialang.org/t/constraint-macro-vs-autodiff-vs-provide-gradient/37073)

<div class="topic-metadata">

**Author:** [@ramon.abritta](https://discourse.julialang.org/u/ramon.abritta)\
**Replies:** 2\
**Last updated:** [April 5, 2020, 11:56pm UTC](https://discourse.julialang.org/t/constraint-macro-vs-autodiff-vs-provide-gradient/37073 "2020-04-05T23:56:28Z")

</div>

Hello, I have been using Julia for about 3 weeks. A lot still to learn. In my optimization problem, I need as much speed as possible (using Grey Wolf Optimizer with many NLP calls). I am aware that, as mentioned in JuM…

---

## [Type Instability with AbstractArray](https://discourse.julialang.org/t/type-instability-with-abstractarray/37074)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 2\
**Last updated:** [April 5, 2020, 11:12pm UTC](https://discourse.julialang.org/t/type-instability-with-abstractarray/37074 "2020-04-05T23:12:46Z")

</div>

Consider the following code: using Random mutable struct mystate{Tq} x::AbstractArray{Tq,1} end function update!(state::mystate{Tq}) where Tq @. state.x\[1\] = 0.5 \* state.x\[2\] + randn(); @. state.x\[2\] = -0…

---

## [Problem with Type of Vector of Colors/Colorants](https://discourse.julialang.org/t/problem-with-type-of-vector-of-colors-colorants/37072)

<div class="topic-metadata">

**Author:** [@mlanghinrichs](https://discourse.julialang.org/u/mlanghinrichs)\
**Replies:** 4\
**Last updated:** [April 5, 2020, 8:57pm UTC](https://discourse.julialang.org/t/problem-with-type-of-vector-of-colors-colorants/37072 "2020-04-05T20:57:35Z")

</div>

Hi all, I’m trying to write a function that accepts an 1d-array/vector of Colors. I want to use the most abstract type Colorant from ColorTypes.jl; i.e. like this: using Colors using ColorTypes function test(colors::V…

---

## [Julia-based articles to JStatSoft](https://discourse.julialang.org/t/julia-based-articles-to-jstatsoft/37029)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 1\
**Last updated:** [April 5, 2020, 7:47pm UTC](https://discourse.julialang.org/t/julia-based-articles-to-jstatsoft/37029 "2020-04-05T19:47:13Z")

</div>

Does anyone have experience with submitting articles describing Julia packages to Journal of Statistical Software? I have tried some searches at https://www.jstatsoft.org but without luck. Mostly I am interested in the…

---

## [Supressing verbosity of dual Models (JuMP, Dualization and Mosek)](https://discourse.julialang.org/t/supressing-verbosity-of-dual-models-jump-dualization-and-mosek/37065)

<div class="topic-metadata">

**Author:** [@martincornejo](https://discourse.julialang.org/u/martincornejo)\
**Replies:** 2\
**Last updated:** [April 5, 2020, 7:25pm UTC](https://discourse.julialang.org/t/supressing-verbosity-of-dual-models-jump-dualization-and-mosek/37065 "2020-04-05T19:25:33Z")

</div>

I have tried multiple methods to silence the verbosity of “dualized Mosek”. (Currently using JuMP v0.20.2 and Dualization v0.2.2) julia\> model = Model(with\_optimizer(() -\> Dualization.DualOptimizer(Mosek.Optimizer()))) …

---

## [Why zip behaves differently in list comprehension?](https://discourse.julialang.org/t/why-zip-behaves-differently-in-list-comprehension/17119)

<div class="topic-metadata">

**Author:** [@sirex](https://discourse.julialang.org/u/sirex)\
**Replies:** 6\
**Last updated:** [April 5, 2020, 7:18pm UTC](https://discourse.julialang.org/t/why-zip-behaves-differently-in-list-comprehension/17119 "2020-04-05T19:18:51Z")

</div>

Here is what I got: julia\> for i in zip(1:3, 2:5) println(i) end (1, 2) (2, 3) (3, 4) julia\> \[i for i in zip(1:3, 2:5)\] ERROR: DimensionMismatch("dimensions must match") Why zip works differently in …

---

## [How to deserialize inside a module](https://discourse.julialang.org/t/how-to-deserialize-inside-a-module/37020)

<div class="topic-metadata">

**Author:** [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Replies:** 3\
**Last updated:** [April 5, 2020, 6:49pm UTC](https://discourse.julialang.org/t/how-to-deserialize-inside-a-module/37020 "2020-04-05T18:49:35Z")

</div>

Consider the following scenario: I define a custom type and a function in Main: mutable struct MyType x f end my\_f(x) = 2x v = MyType(2,my\_f) using Serialization serialize("v.a",v) I create an instance of tha…

---

## [Yet another virus sim, but this time combing Actors.jl and agents](https://discourse.julialang.org/t/yet-another-virus-sim-but-this-time-combing-actors-jl-and-agents/37039)

<div class="topic-metadata">

**Author:** [@richiejp](https://discourse.julialang.org/u/richiejp)\
**Replies:** 6\
**Last updated:** [April 5, 2020, 6:32pm UTC](https://discourse.julialang.org/t/yet-another-virus-sim-but-this-time-combing-actors-jl-and-agents/37039 "2020-04-05T18:32:51Z")

</div>

I have implemented a toy agent based model using Actors.jl. Somehow I missed the existence of Agents.jl, but it is probably good to have a few different options. At any rate it is possible to implement the agent model w…

---

## [Can you update a plot in Julia?](https://discourse.julialang.org/t/can-you-update-a-plot-in-julia/22448)

<div class="topic-metadata">

**Author:** [@HenrikM](https://discourse.julialang.org/u/HenrikM)\
**Replies:** 9\
**Last updated:** [April 5, 2020, 5:50pm UTC](https://discourse.julialang.org/t/can-you-update-a-plot-in-julia/22448 "2020-04-05T17:50:40Z")

</div>

Can you update an existing plot in Julia? For example, if I have a plot with two lines (series), can I change the data or color of one of the lines? For example: using Plots gr() x = range(0, 2π, length=1000) w = plot…

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

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