# Latest

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

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

**Page:** 878

---

## [Running files multiple times and saving output of each instance](https://discourse.julialang.org/t/running-files-multiple-times-and-saving-output-of-each-instance/89625)

<div class="topic-metadata">

**Author:** [@Max\_Beez](https://discourse.julialang.org/u/Max_Beez)\
**Replies:** 3\
**Last updated:** [November 1, 2022, 6:51pm UTC](https://discourse.julialang.org/t/running-files-multiple-times-and-saving-output-of-each-instance/89625 "2022-11-01T18:51:13Z")

</div>

If I have a file I would like to run multiple times I know I could use an include statement within a for-loop. I would like to run such a file say N times, and for each iteration I would like to save the output. What wo…

---

## [Floating point optimizations](https://discourse.julialang.org/t/floating-point-optimizations/89585)

<div class="topic-metadata">

**Author:** [@guilhermebodin](https://discourse.julialang.org/u/guilhermebodin)\
**Replies:** 5\
**Last updated:** [November 1, 2022, 2:59pm UTC](https://discourse.julialang.org/t/floating-point-optimizations/89585 "2022-11-01T14:59:14Z")

</div>

Running julia with --math-mode=ieee is somehow equivalent to compiling a c++ project in MSVC with /fp:strict?

---

## [Suppressing precompilation](https://discourse.julialang.org/t/suppressing-precompilation/89624)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 2\
**Last updated:** [November 1, 2022, 5:33pm UTC](https://discourse.julialang.org/t/suppressing-precompilation/89624 "2022-11-01T17:33:14Z")

</div>

Is there a way to suppress precompilation when adding packages? Right now I am adding and removing packages repeatedly to resolve package version compatibility, and waiting for precompilation to finish every time is exh…

---

## [HPC Workflow with VS remote extension](https://discourse.julialang.org/t/hpc-workflow-with-vs-remote-extension/78657)

<div class="topic-metadata">

**Author:** [@jmair](https://discourse.julialang.org/u/jmair)\
**Replies:** 8\
**Last updated:** [November 1, 2022, 4:34pm UTC](https://discourse.julialang.org/t/hpc-workflow-with-vs-remote-extension/78657 "2022-11-01T16:34:14Z")

</div>

Hi all, I would like to hear from people about their workflow in VS code while working with a HPC. In my experience, I use VS code (with remote extension) to be able to edit my code. I share my code via Git (and GitHub)…

---

## [Discrepancy between lme4 and GLM.jl](https://discourse.julialang.org/t/discrepancy-between-lme4-and-glm-jl/85601)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 7\
**Last updated:** [November 1, 2022, 4:18pm UTC](https://discourse.julialang.org/t/discrepancy-between-lme4-and-glm-jl/85601 "2022-11-01T16:18:30Z")

</div>

There I was, happily running thousands of linear models with GLM.jl, but the results didn’t seem quite right. For one thing, all of my p-values were exceptionally low (\>90% of features significant, even after FDR correct…

---

## [Best \`separate\` performance?](https://discourse.julialang.org/t/best-separate-performance/25841)

<div class="topic-metadata">

**Author:** [@louisponet](https://discourse.julialang.org/u/louisponet)\
**Replies:** 18\
**Last updated:** [November 1, 2022, 3:13pm UTC](https://discourse.julialang.org/t/best-separate-performance/25841 "2022-11-01T15:13:57Z")

</div>

Hi all, I’ve been trying out some ways of separating a Vector into a true and false part based on predicate f, and the basic code below is what I ended up with. My question/challenge is whether anyone knows a faster way …

---

## [Does TensorOperations.jl not support Zygote.jl?](https://discourse.julialang.org/t/does-tensoroperations-jl-not-support-zygote-jl/89174)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 1\
**Last updated:** [November 1, 2022, 3:11pm UTC](https://discourse.julialang.org/t/does-tensoroperations-jl-not-support-zygote-jl/89174 "2022-11-01T15:11:50Z")

</div>

julia\> using Zygote julia\> using TensorOperations julia\> function f(x) @tensor b\[i,k\] := x\[i,j\]\*x\[j,k\] sum(b) end f (generic function with 1 method) julia\> a=rand(10,10); julia\> gradient(f,a)…

---

## [@spawn map(x -\> f(x), collection) only returns Task (Done)](https://discourse.julialang.org/t/spawn-map-x-f-x-collection-only-returns-task-done/89575)

<div class="topic-metadata">

**Author:** [@JohnS](https://discourse.julialang.org/u/JohnS)\
**Replies:** 5\
**Last updated:** [November 1, 2022, 2:46pm UTC](https://discourse.julialang.org/t/spawn-map-x-f-x-collection-only-returns-task-done/89575 "2022-11-01T14:46:23Z")

</div>

Hello! I want to multiply a series of matrices by a vector, and it looks like @spawn is the fastest multithreading process. Unfortunately, the below MWE only returns Task Done. x = collect(1:1:10) y = x .+ x vecmat = …

---

## [Open REPL in VS Code](https://discourse.julialang.org/t/open-repl-in-vs-code/48436)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 5\
**Last updated:** [November 1, 2022, 1:21pm UTC](https://discourse.julialang.org/t/open-repl-in-vs-code/48436 "2022-11-01T13:21:56Z")

</div>

Everytime I restart VS Code, I forget how to switch from PowerShell to REPL. I know there is a command, and a mouse, toolbar path, but I can’t keep track of either, and I don’t see an option that works in the documentati…

---

## [Need a rarely used binary operator for matrices](https://discourse.julialang.org/t/need-a-rarely-used-binary-operator-for-matrices/89263)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 15\
**Last updated:** [November 1, 2022, 12:52pm UTC](https://discourse.julialang.org/t/need-a-rarely-used-binary-operator-for-matrices/89263 "2022-11-01T12:52:08Z")

</div>

Could you suggest a good binary operator that is not commonly used for matrices in Julia Base or packages? I need to use it for some common matrix operations in my code. I don’t want to step on something else.

---

## [How to mutate the value (not binding) of a scalar?](https://discourse.julialang.org/t/how-to-mutate-the-value-not-binding-of-a-scalar/89607)

<div class="topic-metadata">

**Author:** [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Replies:** 8\
**Last updated:** [November 1, 2022, 12:45pm UTC](https://discourse.julialang.org/t/how-to-mutate-the-value-not-binding-of-a-scalar/89607 "2022-11-01T12:45:42Z")

</div>

I can do the following to mutate the original memory, w = ones(3) 3-element Vector{Float64}: 1.0 1.0 1.0 x = w 3-element Vector{Float64}: 1.0 1.0 1.0 x\[2\]=2. 2.0 but I can’t find a way to mutate w if it…

---

## [PlotlyJS users poll](https://discourse.julialang.org/t/plotlyjs-users-poll/89576)

<div class="topic-metadata">

**Author:** [@halleysfifthinc](https://discourse.julialang.org/u/halleysfifthinc)\
**Replies:** 6\
**Last updated:** [November 1, 2022, 12:43pm UTC](https://discourse.julialang.org/t/plotlyjs-users-poll/89576 "2022-11-01T12:43:34Z")

</div>

I just opened a PR to remove support/dependency on Blink that I expect will be controversial, check it out for more details. There are some good reasons to remove the dependency on Blink, but I recognize that my workflow…

---

## [How to return k largest elements of a vector in descending order?](https://discourse.julialang.org/t/how-to-return-k-largest-elements-of-a-vector-in-descending-order/89559)

<div class="topic-metadata">

**Author:** [@Alex\_ricci](https://discourse.julialang.org/u/Alex_ricci)\
**Replies:** 10\
**Last updated:** [November 1, 2022, 12:37pm UTC](https://discourse.julialang.org/t/how-to-return-k-largest-elements-of-a-vector-in-descending-order/89559 "2022-11-01T12:37:27Z")

</div>

Let’s say I have a vector a = rand(1:20, 10) 10-element Vector{Int64}: 2 13 10 12 10 8 10 14 1 19 I want to define a function such as f() which takes two inputs including a vector a and k as the number of …

---

## [Prevent escaping for single symbol inside macro body](https://discourse.julialang.org/t/prevent-escaping-for-single-symbol-inside-macro-body/89609)

<div class="topic-metadata">

**Author:** [@disberd](https://discourse.julialang.org/u/disberd)\
**Replies:** 0\
**Last updated:** [November 1, 2022, 10:37am UTC](https://discourse.julialang.org/t/prevent-escaping-for-single-symbol-inside-macro-body/89609 "2022-11-01T10:37:12Z")

</div>

Is there a function or any other way to prevent escaping of a specific symbol when wrapping the expr returned by a macro with esc()? I sometime want to have a few symbols within the macro body to be unescaped and it wou…

---

## [Recommended packages for graph theory?](https://discourse.julialang.org/t/recommended-packages-for-graph-theory/89594)

<div class="topic-metadata">

**Author:** [@amca01](https://discourse.julialang.org/u/amca01)\
**Replies:** 4\
**Last updated:** [November 1, 2022, 10:03am UTC](https://discourse.julialang.org/t/recommended-packages-for-graph-theory/89594 "2022-11-01T10:03:21Z")

</div>

I’ve just started to explore graph theory in Julia. And there’s a bewildering array of packages. Some are unmaintained, such LightGraphs.jl and the old Graphs.jl. To confuse matters, LightGraphs.jl seems to be been fo…

---

## [Promote Julia to NeuroAI community?](https://discourse.julialang.org/t/promote-julia-to-neuroai-community/89606)

<div class="topic-metadata">

**Author:** [@YitaoCai](https://discourse.julialang.org/u/YitaoCai)\
**Replies:** 0\
**Last updated:** [November 1, 2022, 9:26am UTC](https://discourse.julialang.org/t/promote-julia-to-neuroai-community/89606 "2022-11-01T09:26:46Z")

</div>

As everyone knows that current AI was dominated by Pytorch, Tensorflow, and Jax, so there seems little chance for Julia in the Deep Learning field. A lot of people think that current deep learning is not intelligent, it …

---

## [JuliaCN 2022 meetup is calling for proposals](https://discourse.julialang.org/t/juliacn-2022-meetup-is-calling-for-proposals/89529)

<div class="topic-metadata">

**Author:** [@1115](https://discourse.julialang.org/u/1115)\
**Replies:** 1\
**Last updated:** [November 1, 2022, 9:20am UTC](https://discourse.julialang.org/t/juliacn-2022-meetup-is-calling-for-proposals/89529 "2022-11-01T09:20:05Z")

</div>

Dear friends, the annual meetup of JuliaCN is now calling for proposals! In the last several years, JuliaCN has put a lot of effort to make the Julia language and its ecosystem more accessible to the Chinese Julia commu…

---

## [Saving extra values during DifferentialEquations solution only at specific times](https://discourse.julialang.org/t/saving-extra-values-during-differentialequations-solution-only-at-specific-times/89586)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 1\
**Last updated:** [November 1, 2022, 9:11am UTC](https://discourse.julialang.org/t/saving-extra-values-during-differentialequations-solution-only-at-specific-times/89586 "2022-11-01T09:11:29Z")

</div>

I have a problem where I want to solve some extra parameters produced while solving a differential equation. For example, the following saves some random number everytime the ODE is evaluated: f = (u, p, t) -\> (a = rand…

---

## [Recommended way to set up global buffers](https://discourse.julialang.org/t/recommended-way-to-set-up-global-buffers/89597)

<div class="topic-metadata">

**Author:** [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Replies:** 2\
**Last updated:** [November 1, 2022, 8:39am UTC](https://discourse.julialang.org/t/recommended-way-to-set-up-global-buffers/89597 "2022-11-01T08:39:54Z")

</div>

Say my package needs some global buffers to avoid allocations of many small vectors of a fixed type but with variable length (with benchmark results showing that this gives indeed a nice speedup). This could look as foll…

---

## [LoadError: InitError: could not load library "avcodec-58.dll" (Windows 10)](https://discourse.julialang.org/t/loaderror-initerror-could-not-load-library-avcodec-58-dll-windows-10/48091)

<div class="topic-metadata">

**Author:** [@afishy](https://discourse.julialang.org/u/afishy)\
**Replies:** 14\
**Last updated:** [November 1, 2022, 8:39am UTC](https://discourse.julialang.org/t/loaderror-initerror-could-not-load-library-avcodec-58-dll-windows-10/48091 "2022-11-01T08:39:16Z")

</div>

As of today I haven’t been able to precompile any package that requires FFMPEG.jl, getting this error: ERROR: LoadError: InitError: could not load library "C:\\Users\\aresf\\.julia\\artifacts\\7350a6401f1c0d38cc3518193083bc4…

---

## [Parsing a Julia file](https://discourse.julialang.org/t/parsing-a-julia-file/32622)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 4\
**Last updated:** [November 1, 2022, 7:53am UTC](https://discourse.julialang.org/t/parsing-a-julia-file/32622 "2022-11-01T07:53:18Z")

</div>

How can I parse a .jl file into a Vector{Expr}, similar to what include does (but without executing of course). I expected Meta.parse to accept an IO, but it doesn’t.

---

## [Reading values from .txt file](https://discourse.julialang.org/t/reading-values-from-txt-file/89466)

<div class="topic-metadata">

**Author:** [@bdas123](https://discourse.julialang.org/u/bdas123)\
**Replies:** 8\
**Last updated:** [October 31, 2022, 11:40pm UTC](https://discourse.julialang.org/t/reading-values-from-txt-file/89466 "2022-10-31T23:40:13Z")

</div>

Hello, I am exporting certain values from Python into a txt file using the following command: a = np.random.rand(2) np.savetxt('a.txt',a) How can I call this .txt file from Julia and store the value into a variable?

---

## [How to define an array of variables in JuMP that has different lengths in different dimensions](https://discourse.julialang.org/t/how-to-define-an-array-of-variables-in-jump-that-has-different-lengths-in-different-dimensions/89598)

<div class="topic-metadata">

**Author:** [@Alex\_ricci](https://discourse.julialang.org/u/Alex_ricci)\
**Replies:** 1\
**Last updated:** [November 1, 2022, 6:43am UTC](https://discourse.julialang.org/t/how-to-define-an-array-of-variables-in-jump-that-has-different-lengths-in-different-dimensions/89598 "2022-11-01T06:43:44Z")

</div>

I have a parameter called z\_{t, w} with the size of 2 \\times 2 which is a vector of vectors. For example, z\_{1,1} and z\_{2,1} are z\[1,1\] = \[10 10 30 40 50\] z\[2,1\] = \[20 30 40\] I want to define a variable y based on z…

---

## [Jump quadratic problem](https://discourse.julialang.org/t/jump-quadratic-problem/89475)

<div class="topic-metadata">

**Author:** [@Muhammad\_Nadeem](https://discourse.julialang.org/u/Muhammad_Nadeem)\
**Replies:** 2\
**Last updated:** [November 1, 2022, 3:34am UTC](https://discourse.julialang.org/t/jump-quadratic-problem/89475 "2022-11-01T03:34:25Z")

</div>

Hello all, I am solving a simple quadratric problem of the form x\* = argmin 0.5 x'Qx + x'q # x # s.t. l1 ≤ Ax ≤ u1 my code is as follows: model = Model(HiGHS.Optimi…

---

## [No matching method error after using range](https://discourse.julialang.org/t/no-matching-method-error-after-using-range/89503)

<div class="topic-metadata">

**Author:** [@ejlongman](https://discourse.julialang.org/u/ejlongman)\
**Replies:** 4\
**Last updated:** [November 1, 2022, 12:54am UTC](https://discourse.julialang.org/t/no-matching-method-error-after-using-range/89503 "2022-11-01T00:54:43Z")

</div>

Hello, The last line of my code returns the following error, but both appear to be matrixes. I cannot seem to figure out what is wrong? MethodError: no method matching +(::Float64, ::Matrix{Float64}) For element-wise a…

---

## [Resizing ODE integrator with matrix or VectorOfArray initial condition](https://discourse.julialang.org/t/resizing-ode-integrator-with-matrix-or-vectorofarray-initial-condition/89583)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 3\
**Last updated:** [November 1, 2022, 12:48am UTC](https://discourse.julialang.org/t/resizing-ode-integrator-with-matrix-or-vectorofarray-initial-condition/89583 "2022-11-01T00:48:05Z")

</div>

Consider the following: using OrdinaryDiffEq using ElasticArrays function sysde!(du, u, p, t) du\[:, 1\] .= rand(2) du\[:, 2\] .= rand(2) du\[:, 3\] .= rand(2) nothing end u0 = ElasticArray{Float64}(\[0.0 0.0 …

---

## [How to include a customized function which takes expressions as input values inside a constraint?](https://discourse.julialang.org/t/how-to-include-a-customized-function-which-takes-expressions-as-input-values-inside-a-constraint/89187)

<div class="topic-metadata">

**Author:** [@Alex\_ricci](https://discourse.julialang.org/u/Alex_ricci)\
**Replies:** 3\
**Last updated:** [November 1, 2022, 12:37am UTC](https://discourse.julialang.org/t/how-to-include-a-customized-function-which-takes-expressions-as-input-values-inside-a-constraint/89187 "2022-11-01T00:37:38Z")

</div>

consider this program H=4 J=3 m = Model(GLPK.Optimizer) @variable(m, x\[ 1:H , 1:J \], Bin) I am trying to model this constraint: Where 1.() is an indicator function. After a few hours of playing this is the best I c…

---

## [Is there a structure that combines NammedArray and DotMap functionality?](https://discourse.julialang.org/t/is-there-a-structure-that-combines-nammedarray-and-dotmap-functionality/89541)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 5\
**Last updated:** [November 1, 2022, 12:26am UTC](https://discourse.julialang.org/t/is-there-a-structure-that-combines-nammedarray-and-dotmap-functionality/89541 "2022-11-01T00:26:52Z")

</div>

x = NamedArray(\[1,2,3\],\["a","b","c"\]) x = DotMap( Dict( zip(\["a","b","c"\],\[1,2,3\]) ) ) So you could write both exp.(x) and x.b

---

## [Broadcasting and piping](https://discourse.julialang.org/t/broadcasting-and-piping/89542)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 4\
**Last updated:** [October 31, 2022, 11:22pm UTC](https://discourse.julialang.org/t/broadcasting-and-piping/89542 "2022-10-31T23:22:25Z")

</div>

The basic pipe operator allows for broacasting e.g. 1:5 .|\> exp As far as I know @chain and Lazy @\> don’t support this. You can get around this by defining. ⬅map(a,b) = map(b,a) and writing @\> 1:5 …

---

## [Get notified when cell is finished running](https://discourse.julialang.org/t/get-notified-when-cell-is-finished-running/89582)

<div class="topic-metadata">

**Author:** [@bdas123](https://discourse.julialang.org/u/bdas123)\
**Replies:** 1\
**Last updated:** [October 31, 2022, 11:05pm UTC](https://discourse.julialang.org/t/get-notified-when-cell-is-finished-running/89582 "2022-10-31T23:05:15Z")

</div>

Hello! Is there a feature that would notify me when a Julia Jupyter Notebook cell is finished running? Ideally I would get an email or something.

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

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