# Latest

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

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

**Page:** 797

---

## [@test\_logs behavior when using with\_logger](https://discourse.julialang.org/t/test-logs-behavior-when-using-with-logger/80239)

<div class="topic-metadata">

**Author:** [@jdlara-berkeley](https://discourse.julialang.org/u/jdlara-berkeley)\
**Replies:** 3\
**Last updated:** [January 31, 2023, 10:09am UTC](https://discourse.julialang.org/t/test-logs-behavior-when-using-with-logger/80239 "2023-01-31T10:09:17Z")

</div>

When trying to test for logging inside of a custom logger, the @test\_logs macro seems to be unable to capture the logs. Here is an MWE using Test using Logging @test\_logs (:error, "test") match\_mode = :any Logging.with…

---

## [Trying to translate a symbolic differentiation performance benchmark to Julia](https://discourse.julialang.org/t/trying-to-translate-a-symbolic-differentiation-performance-benchmark-to-julia/15735)

<div class="topic-metadata">

**Author:** [@Olof\_Salberger](https://discourse.julialang.org/u/Olof_Salberger)\
**Replies:** 3\
**Last updated:** [September 9, 2019, 1:23am UTC](https://discourse.julialang.org/t/trying-to-translate-a-symbolic-differentiation-performance-benchmark-to-julia/15735 "2019-09-09T01:23:58Z")

</div>

Hi, I was interested in translating Jon Harrop’s symbolic derivatives benchmark to Julia, but since the original code is really heavy on ADT’s and pattern matching I don’t really have a good intuition for what style woul…

---

## [Getting rid of memory allocations in nested functions](https://discourse.julialang.org/t/getting-rid-of-memory-allocations-in-nested-functions/93812)

<div class="topic-metadata">

**Author:** [@p-gw](https://discourse.julialang.org/u/p-gw)\
**Replies:** 3\
**Last updated:** [January 31, 2023, 9:31am UTC](https://discourse.julialang.org/t/getting-rid-of-memory-allocations-in-nested-functions/93812 "2023-01-31T09:31:06Z")

</div>

Hi, I am trying to minimize memory allocations of a function in my package. However, it displays some mysterious behaviour - at least for me. Since there are many experts here, maybe somebody can shed some light on wh…

---

## [Documenter not uploading previews of pull requests](https://discourse.julialang.org/t/documenter-not-uploading-previews-of-pull-requests/93786)

<div class="topic-metadata">

**Author:** [@moble](https://discourse.julialang.org/u/moble)\
**Replies:** 7\
**Last updated:** [January 31, 2023, 5:45am UTC](https://discourse.julialang.org/t/documenter-not-uploading-previews-of-pull-requests/93786 "2023-01-31T05:45:17Z")

</div>

I have Documenter working nicely and deploying my main-branch docs to gh-pages — including both dev, stable, and the various releases. But now I want to see what the docs look like in a PR. From what I can tell of this…

---

## [Vectorized Modulo Function for JuMP](https://discourse.julialang.org/t/vectorized-modulo-function-for-jump/93800)

<div class="topic-metadata">

**Author:** [@Stuart\_Rogers](https://discourse.julialang.org/u/Stuart_Rogers)\
**Replies:** 3\
**Last updated:** [January 31, 2023, 4:25am UTC](https://discourse.julialang.org/t/vectorized-modulo-function-for-jump/93800 "2023-01-31T04:25:01Z")

</div>

I’m trying to write a vectorized modulo function for JuMP to be invoked via: e = reformulate\_mod\_vec(model, A\*\[x;y\], v) A is a Jx(n+m) fixed matrix, x is a nx1 vector of JuMP variables, y is a mx1 vector of JuMP variab…

---

## [Add .exe file in Julia PATH - Bellhop package](https://discourse.julialang.org/t/add-exe-file-in-julia-path-bellhop-package/93808)

<div class="topic-metadata">

**Author:** [@Students](https://discourse.julialang.org/u/Students)\
**Replies:** 0\
**Last updated:** [January 31, 2023, 3:43am UTC](https://discourse.julialang.org/t/add-exe-file-in-julia-path-bellhop-package/93808 "2023-01-31T03:43:25Z")

</div>

Hi everyone, I am trying to run the “UnderwaterAcoustics” package in Julia. In the installation manual they have provided the following statement: Bellhop will only be available if you have a working copy of OALIB bell…

---

## [Download a url (with a password)](https://discourse.julialang.org/t/download-a-url-with-a-password/93669)

<div class="topic-metadata">

**Author:** [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Replies:** 6\
**Last updated:** [January 31, 2023, 1:03am UTC](https://discourse.julialang.org/t/download-a-url-with-a-password/93669 "2023-01-31T01:03:25Z")

</div>

How do I download a file from a URL, if a username and password are required? For example, in MATLAB, I can do url = 'https://n5eil01u.ecs.nsidc.org/DP4/ICEBRIDGE/IRMCR2.001/2010.03.24/IRMCR2\_20100324\_01.csv'; urlread(u…

---

## [Plotting a vector of vector in julia](https://discourse.julialang.org/t/plotting-a-vector-of-vector-in-julia/93797)

<div class="topic-metadata">

**Author:** [@shaurya](https://discourse.julialang.org/u/shaurya)\
**Replies:** 2\
**Last updated:** [January 31, 2023, 12:53am UTC](https://discourse.julialang.org/t/plotting-a-vector-of-vector-in-julia/93797 "2023-01-31T00:53:46Z")

</div>

I have a vector of vector elements, given as follows: sol=\[\[1,2,3\],\[1,1,1\],\[4,3,2\],\[5,1,3\],\[9,4,1\]\]; plot(sol) The above code snippet plots in julia assuming that sol has 3 measurements, and each measurement has 5…

---

## [Automatic resizing of struct internal array when value changes?](https://discourse.julialang.org/t/automatic-resizing-of-struct-internal-array-when-value-changes/93790)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 14\
**Last updated:** [January 30, 2023, 10:43pm UTC](https://discourse.julialang.org/t/automatic-resizing-of-struct-internal-array-when-value-changes/93790 "2023-01-30T22:43:41Z")

</div>

Hello! Suppose I have a struct as such: mutable struct TheStruct N::Int x::AbstractVector{Float32} end And at different times “N” might change, for example from 5 to 7. When this happens I want to resize!(…

---

## [Isusefulnumber()](https://discourse.julialang.org/t/isusefulnumber/93795)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 2\
**Last updated:** [January 30, 2023, 10:24pm UTC](https://discourse.julialang.org/t/isusefulnumber/93795 "2023-01-30T22:24:45Z")

</div>

Is there a function available to check in a large vector, if one of the following occurs in a vector: missing nothing Inf NaN ? Here is my snippet to investigate a vector for such elements: a = \[1.3, NaN, Inf, missi…

---

## [How to use the rule set from ChainRules.jl?](https://discourse.julialang.org/t/how-to-use-the-rule-set-from-chainrules-jl/93658)

<div class="topic-metadata">

**Author:** [@Jonas208](https://discourse.julialang.org/u/Jonas208)\
**Replies:** 1\
**Last updated:** [January 30, 2023, 10:10pm UTC](https://discourse.julialang.org/t/how-to-use-the-rule-set-from-chainrules-jl/93658 "2023-01-30T22:10:59Z")

</div>

What is the best way to use the ruleset from ChainRules.jl if you want to build an AD engine based on operator overloading. I can’t find much useful information in the ChainRules documentation, nor in the ChainRulesOver…

---

## [How to fetch a generator of @spawn correctly?](https://discourse.julialang.org/t/how-to-fetch-a-generator-of-spawn-correctly/93670)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 3\
**Last updated:** [January 30, 2023, 10:02pm UTC](https://discourse.julialang.org/t/how-to-fetch-a-generator-of-spawn-correctly/93670 "2023-01-30T22:02:41Z")

</div>

I have the below MWE for a simple function test\_serial(). I tried to parallelize its p1!()&p2!() functions. However, it seems I am not using the fetch correctly. Could you please guide me here? function p1!(x) x .+= 1…

---

## [Why is there a \`sleep\` in ODBC.jl](https://discourse.julialang.org/t/why-is-there-a-sleep-in-odbc-jl/93562)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 14\
**Last updated:** [January 30, 2023, 9:26pm UTC](https://discourse.julialang.org/t/why-is-there-a-sleep-in-odbc-jl/93562 "2023-01-30T21:26:10Z")

</div>

Hi all :slight\_smile: Just reposting this here # By removing the sleep - query executes much faster #360 Does anyone know why there is an sleep? Does something horrible happen if I remove it? Cheers

---

## [How to label individuals dots in scatterplot?](https://discourse.julialang.org/t/how-to-label-individuals-dots-in-scatterplot/93791)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 4\
**Last updated:** [January 30, 2023, 9:01pm UTC](https://discourse.julialang.org/t/how-to-label-individuals-dots-in-scatterplot/93791 "2023-01-30T21:01:17Z")

</div>

I want to scatter plto a bunch of dots, attaching a label to each. However, the label command gives the first label to each dot. Sample code: using Plots xs = \[1,2,3\] ys = \[2,4,6\] colors = \[:red :blue :green\] labels = \[…

---

## [Dispatch over element type](https://discourse.julialang.org/t/dispatch-over-element-type/93769)

<div class="topic-metadata">

**Author:** [@iago-lito](https://discourse.julialang.org/u/iago-lito)\
**Replies:** 14\
**Last updated:** [January 30, 2023, 8:54pm UTC](https://discourse.julialang.org/t/dispatch-over-element-type/93769 "2023-01-30T20:54:02Z")

</div>

I find the following code too restrictive: function f(collection::Vector{Int64}) for i in collection println("Integer: $i") end end function f(collection::Vector{String}) for s in collection …

---

## [Visualize long pmap process using Gtk.ProgressBarLeaf](https://discourse.julialang.org/t/visualize-long-pmap-process-using-gtk-progressbarleaf/93792)

<div class="topic-metadata">

**Author:** [@abbe](https://discourse.julialang.org/u/abbe)\
**Replies:** 0\
**Last updated:** [January 30, 2023, 8:51pm UTC](https://discourse.julialang.org/t/visualize-long-pmap-process-using-gtk-progressbarleaf/93792 "2023-01-30T20:51:53Z")

</div>

Hey all, I was wondering if it is possible to view the progress of the pmap function using GtkProgressBar when pmap is running on multiple (or all) processes. using Distributed, Statistics id = addprocs() @everywhere b…

---

## [Vmls - sum of vectors, displacement](https://discourse.julialang.org/t/vmls-sum-of-vectors-displacement/93779)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 5\
**Last updated:** [January 30, 2023, 7:52pm UTC](https://discourse.julialang.org/t/vmls-sum-of-vectors-displacement/93779 "2023-01-30T19:52:33Z")

</div>

Hello, good afternoon. I’m reading the VMLS book introduction about algebra linear and trying to draw the vector displacement in a plot. When sum two vectors a and b, the a+b vector dont need to connect to the end of b…

---

## [@fastmath for library functions? (2x slowdown of binary search because of NaN checks in Base)](https://discourse.julialang.org/t/fastmath-for-library-functions-2x-slowdown-of-binary-search-because-of-nan-checks-in-base/93487)

<div class="topic-metadata">

**Author:** [@Az9DBvyVLWBjs8g](https://discourse.julialang.org/u/Az9DBvyVLWBjs8g)\
**Replies:** 14\
**Last updated:** [January 30, 2023, 7:15pm UTC](https://discourse.julialang.org/t/fastmath-for-library-functions-2x-slowdown-of-binary-search-because-of-nan-checks-in-base/93487 "2023-01-30T19:15:52Z")

</div>

Hello everyone, I’ve benchmarked Julia’s implementation of binary search (searchsortedlast) to test whether Julia can match C performance (spoiler: it can). However, I found that isnan checks within isless lead to a 1.5…

---

## [Combining ContinuousSpace with discrete grid property in InteractiveDynamics](https://discourse.julialang.org/t/combining-continuousspace-with-discrete-grid-property-in-interactivedynamics/93684)

<div class="topic-metadata">

**Author:** [@Niall](https://discourse.julialang.org/u/Niall)\
**Replies:** 7\
**Last updated:** [January 30, 2023, 5:27pm UTC](https://discourse.julialang.org/t/combining-continuousspace-with-discrete-grid-property-in-interactivedynamics/93684 "2023-01-30T17:27:10Z")

</div>

Hi, I’m writing simulations for a course on Agent-Based Modeling, and I’m struggling to combine discrete heatmaps with movement in a ContinuousSpace. In the following code, everything works fine until I add the final li…

---

## [Julia 1.9.0-beta2 precompilation taking almost twice as long](https://discourse.julialang.org/t/julia-1-9-0-beta2-precompilation-taking-almost-twice-as-long/92498)

<div class="topic-metadata">

**Author:** [@M-PERSIC](https://discourse.julialang.org/u/M-PERSIC)\
**Replies:** 38\
**Last updated:** [January 30, 2023, 5:19pm UTC](https://discourse.julialang.org/t/julia-1-9-0-beta2-precompilation-taking-almost-twice-as-long/92498 "2023-01-30T17:19:46Z")

</div>

I’ve been testing out the new Docker image for Julia 1.9-beta2. I do indeed notice the FFTX improvements, however I’m also noticing that precompilation of every package now takes on average between 1.5x-2x as long. versi…

---

## [ElementaryChemistry.jl](https://discourse.julialang.org/t/elementarychemistry-jl/63373)

<div class="topic-metadata">

**Author:** [@Baobab\_The\_fruit](https://discourse.julialang.org/u/Baobab_The_fruit)\
**Replies:** 3\
**Last updated:** [January 30, 2023, 4:46pm UTC](https://discourse.julialang.org/t/elementarychemistry-jl/63373 "2023-01-30T16:46:27Z")

</div>

Both an announcement and topic that would fit in here this is my package should be added to the general registry tomorrow. I would love suggestions, ideas on what formulas, ideas, or concepts to add to the project. bao…

---

## [Download with password (digression)](https://discourse.julialang.org/t/download-with-password-digression/93783)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 5\
**Last updated:** [January 30, 2023, 3:51pm UTC](https://discourse.julialang.org/t/download-with-password-digression/93783 "2023-01-30T15:51:04Z")

</div>

I took a look at the docs and (passwords and) .netrc is undocumented (maybe for good reasons… is it clearly supported, I would want its support removed, i.e. curl, is it claimed to be supported, or just an implementation…

---

## [Are circular references problematic?](https://discourse.julialang.org/t/are-circular-references-problematic/93767)

<div class="topic-metadata">

**Author:** [@mariok90](https://discourse.julialang.org/u/mariok90)\
**Replies:** 3\
**Last updated:** [January 30, 2023, 2:36pm UTC](https://discourse.julialang.org/t/are-circular-references-problematic/93767 "2023-01-30T14:36:13Z")

</div>

I have this structure in my code: abstract type SystemComponent end mutable struct System components::Dict{String, \<:SystemComponent} function System() new(Dict{String, Component}()) end end mutab…

---

## [Vector of upper triangle](https://discourse.julialang.org/t/vector-of-upper-triangle/7764)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 7\
**Last updated:** [January 30, 2023, 4:17pm UTC](https://discourse.julialang.org/t/vector-of-upper-triangle/7764 "2023-01-30T16:17:13Z")

</div>

Is there an elegant way of extracting the upper triangle of a matrix as a vector using Base? Besides, of course, writing something like function vec\_triu(M::AbstractMatrix{T}) where T m, n = size(M) m == n || th…

---

## [Compare and swap operation on mmap/shared-memory](https://discourse.julialang.org/t/compare-and-swap-operation-on-mmap-shared-memory/93425)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 7\
**Last updated:** [January 30, 2023, 4:13pm UTC](https://discourse.julialang.org/t/compare-and-swap-operation-on-mmap-shared-memory/93425 "2023-01-30T16:13:05Z")

</div>

Hi all :slight\_smile: How can I do an cas (compare and swap operation) on memory mapped arrays in Julia. julia\> v = SharedArray{UInt8}(abspath("test.bytes"), (1000,)); julia\> using SharedArrays julia\> v = SharedArray…

---

## [Vim plugin for Jupyter notebooks?](https://discourse.julialang.org/t/vim-plugin-for-jupyter-notebooks/31500)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 8\
**Last updated:** [January 30, 2023, 3:57pm UTC](https://discourse.julialang.org/t/vim-plugin-for-jupyter-notebooks/31500 "2023-01-30T15:57:59Z")

</div>

Is it possible to make a VIM plugin to view and edit Jupyter notebooks? When somebody sends me a Jupyter notebook, I always dread opening up my browser to view it. A much simpler solution would be to just open it from V…

---

## [Could CUDA.jl be better at explaining what went wrong](https://discourse.julialang.org/t/could-cuda-jl-be-better-at-explaining-what-went-wrong/93735)

<div class="topic-metadata">

**Author:** [@Euhan](https://discourse.julialang.org/u/Euhan)\
**Replies:** 8\
**Last updated:** [January 30, 2023, 2:51pm UTC](https://discourse.julialang.org/t/could-cuda-jl-be-better-at-explaining-what-went-wrong/93735 "2023-01-30T14:51:37Z")

</div>

Wouldn’t it be possible to include a bit more information in the CUDA error messages? It is often hard to locate the source of an error that manifests itself in the CUDA code and I would think all clues would be welcome…

---

## [Re-using compiled code](https://discourse.julialang.org/t/re-using-compiled-code/93524)

<div class="topic-metadata">

**Author:** [@simsurace](https://discourse.julialang.org/u/simsurace)\
**Replies:** 23\
**Last updated:** [January 30, 2023, 2:05pm UTC](https://discourse.julialang.org/t/re-using-compiled-code/93524 "2023-01-30T14:05:19Z")

</div>

I’m trying to reduce the latency of an application by using precompilation. I went through most of the steps described in the SnoopCompile manual. It seems that I’m running into the issue which is mentioned there, namely…

---

## [Margins controls for PyPlot](https://discourse.julialang.org/t/margins-controls-for-pyplot/93759)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 1\
**Last updated:** [January 30, 2023, 1:07pm UTC](https://discourse.julialang.org/t/margins-controls-for-pyplot/93759 "2023-01-30T13:07:11Z")

</div>

Hello what are the Julia PyPlot equivalents to R’s margin parameters oma and mai? Thank you

---

## [Integral equations in ModelingToolkit](https://discourse.julialang.org/t/integral-equations-in-modelingtoolkit/74346)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 3\
**Last updated:** [January 30, 2023, 1:36pm UTC](https://discourse.julialang.org/t/integral-equations-in-modelingtoolkit/74346 "2023-01-30T13:36:26Z")

</div>

Hi Everyone, I’d like to know how/if the following integral equation can be solved in ModelingToolkit: using ModelingToolkit using DomainSets @parameters t β γ @variables S(..) I(..) R(..) It = Integral(t in DomainSet…

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

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