# Latest

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

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

**Page:** 1079

---

## [Extending Base.\_searchindex to "findall"?](https://discourse.julialang.org/t/extending-base-searchindex-to-findall/78938)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 1\
**Last updated:** [April 3, 2022, 10:47am UTC](https://discourse.julialang.org/t/extending-base-searchindex-to-findall/78938 "2022-04-03T10:47:41Z")

</div>

Hello! I have a Vector{UInt8}, in which I want to find all occurences of “Lorem”. (Text from https://www.lipsum.com/) TextToSearch = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem …

---

## [A few questions about my workflow for quickly investigating data!](https://discourse.julialang.org/t/a-few-questions-about-my-workflow-for-quickly-investigating-data/78913)

<div class="topic-metadata">

**Author:** [@charperflow](https://discourse.julialang.org/u/charperflow)\
**Replies:** 10\
**Last updated:** [April 3, 2022, 10:47am UTC](https://discourse.julialang.org/t/a-few-questions-about-my-workflow-for-quickly-investigating-data/78913 "2022-04-03T10:47:12Z")

</div>

I am taking an upper level stats course taught in r. I have been doing a duplicate of the assignments in Julia, which has been a lot of fun. However, I have come across a few sticking points. I’ll just stick to one in th…

---

## [Is there a unified API for loading/saving JSON, YAML, and TOML files?](https://discourse.julialang.org/t/is-there-a-unified-api-for-loading-saving-json-yaml-and-toml-files/78934)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 0\
**Last updated:** [April 3, 2022, 9:09am UTC](https://discourse.julialang.org/t/is-there-a-unified-api-for-loading-saving-json-yaml-and-toml-files/78934 "2022-04-03T09:09:28Z")

</div>

I wonder if there exists a unified API for reading/writing JSON, YAML, and TOML files. Currently, I am doing it by myself. I am treating them as configuration files to store my calculations settings. But it would be nice…

---

## [Basic expression manipulation with Symbolics.jl](https://discourse.julialang.org/t/basic-expression-manipulation-with-symbolics-jl/77799)

<div class="topic-metadata">

**Author:** [@Gravlax](https://discourse.julialang.org/u/Gravlax)\
**Replies:** 2\
**Last updated:** [April 3, 2022, 7:10am UTC](https://discourse.julialang.org/t/basic-expression-manipulation-with-symbolics-jl/77799 "2022-04-03T07:10:46Z")

</div>

Hi everyone, I’m trying out a basic exercise which consists in generating the heat transfer equation (1D diffusion) by substitution the expressions of heat and heat flux in a balance equation, assuming constant coeffici…

---

## [Julia complains that I haven't added standard libraries to my package manifest](https://discourse.julialang.org/t/julia-complains-that-i-havent-added-standard-libraries-to-my-package-manifest/78719)

<div class="topic-metadata">

**Author:** [@SamuraiAku](https://discourse.julialang.org/u/SamuraiAku)\
**Replies:** 6\
**Last updated:** [April 2, 2022, 9:39pm UTC](https://discourse.julialang.org/t/julia-complains-that-i-havent-added-standard-libraries-to-my-package-manifest/78719 "2022-04-02T21:39:23Z")

</div>

I’m currently developing a package (unreleased). I added it to my working environment by giving Pkg the URL to my Github repository This package uses some the standard libraries such as Dates. So at the top of my modul…

---

## [Is it necessary for sleep to allocate?](https://discourse.julialang.org/t/is-it-necessary-for-sleep-to-allocate/77795)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 5\
**Last updated:** [April 2, 2022, 8:39pm UTC](https://discourse.julialang.org/t/is-it-necessary-for-sleep-to-allocate/77795 "2022-04-02T20:39:30Z")

</div>

I was optimizing a complex block of multithreaded code and discovered that sleep was allocating. julia\> @btime sleep(0) 1.720 μs (5 allocations: 144 bytes) I was pretty surprised, so checked the source which is basic…

---

## [Maintaining a fixed size "top N" values list](https://discourse.julialang.org/t/maintaining-a-fixed-size-top-n-values-list/78868)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 14\
**Last updated:** [April 2, 2022, 3:55pm UTC](https://discourse.julialang.org/t/maintaining-a-fixed-size-top-n-values-list/78868 "2022-04-02T15:55:50Z")

</div>

My high level need: loop through lots of entries and keep track of the top nth value so I can continue filtering out anything lower than the nth highest value. My assumption is that I would need to store the n top value…

---

## [\[ANN\] KissSmoothing.jl - Hassle free & simple data smoothing](https://discourse.julialang.org/t/ann-kisssmoothing-jl-hassle-free-simple-data-smoothing/78014)

<div class="topic-metadata">

**Author:** [@francesco.alemanno](https://discourse.julialang.org/u/francesco.alemanno)\
**Replies:** 7\
**Last updated:** [April 2, 2022, 8:04pm UTC](https://discourse.julialang.org/t/ann-kisssmoothing-jl-hassle-free-simple-data-smoothing/78014 "2022-04-02T20:04:52Z")

</div>

I would like to announce a tiny package I made, KissSmoothing, it can be helpful to those like me that sometimes for visualization/processing purposes just want to reasonably smooth some data in a matrix. This package o…

---

## [TorchDrug equivalence in Julia?](https://discourse.julialang.org/t/torchdrug-equivalence-in-julia/78910)

<div class="topic-metadata">

**Author:** [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Replies:** 3\
**Last updated:** [April 2, 2022, 7:24pm UTC](https://discourse.julialang.org/t/torchdrug-equivalence-in-julia/78910 "2022-04-02T19:24:52Z")

</div>

I ran into TorchDrug a few months ago and it looks really useful. Is anyone in this community doing drug discovery using Julia? My question is mainly due to thinking about how useful/hard it would be to create a communit…

---

## [How to train Flux to learn a sequence conditional to some initial "seeds"?](https://discourse.julialang.org/t/how-to-train-flux-to-learn-a-sequence-conditional-to-some-initial-seeds/78330)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [April 2, 2022, 7:15pm UTC](https://discourse.julialang.org/t/how-to-train-flux-to-learn-a-sequence-conditional-to-some-initial-seeds/78330 "2022-04-02T19:15:35Z")

</div>

I am trying to write a RNN that given an initial “seed” sequence, it reproduces the continuation of the sequence. In the code above dummy sequences are generated as function of these initial seed points and a RNN approa…

---

## [Join / Append dataLoaders structures](https://discourse.julialang.org/t/join-append-dataloaders-structures/78873)

<div class="topic-metadata">

**Author:** [@lgmendes](https://discourse.julialang.org/u/lgmendes)\
**Replies:** 3\
**Last updated:** [April 2, 2022, 4:55pm UTC](https://discourse.julialang.org/t/join-append-dataloaders-structures/78873 "2022-04-02T16:55:54Z")

</div>

Hi all, How can I add / join /append two dataLoaders structures ?

---

## [JuMP--how to take the gradient of quadratic constraints?](https://discourse.julialang.org/t/jump-how-to-take-the-gradient-of-quadratic-constraints/78893)

<div class="topic-metadata">

**Author:** [@rjuly](https://discourse.julialang.org/u/rjuly)\
**Replies:** 2\
**Last updated:** [April 2, 2022, 2:45pm UTC](https://discourse.julialang.org/t/jump-how-to-take-the-gradient-of-quadratic-constraints/78893 "2022-04-02T14:45:37Z")

</div>

I need to get the constraint Jacobian for a model which contains linear, quadratic, and nonlinear constraints. For the nonlinear constraints, I can use the NLPEvaluator with function eval\_constraint\_jacobian. For the lin…

---

## [ODE system solvable with forward Euler but not general solvers (early stiffness)](https://discourse.julialang.org/t/ode-system-solvable-with-forward-euler-but-not-general-solvers-early-stiffness/78701)

<div class="topic-metadata">

**Author:** [@differentialoperator](https://discourse.julialang.org/u/differentialoperator)\
**Replies:** 9\
**Last updated:** [April 2, 2022, 2:27pm UTC](https://discourse.julialang.org/t/ode-system-solvable-with-forward-euler-but-not-general-solvers-early-stiffness/78701 "2022-04-02T14:27:09Z")

</div>

I have a system of 4 coupled ODEs that model an astrophysical system. The dynamic range of the state variables (masses) and the independent time variable are huge – the masses are expected to go from ~0 grams in the earl…

---

## [Check if a value is rooted by the Garbage Collector (GC)](https://discourse.julialang.org/t/check-if-a-value-is-rooted-by-the-garbage-collector-gc/78887)

<div class="topic-metadata">

**Author:** [@Clemapfel](https://discourse.julialang.org/u/Clemapfel)\
**Replies:** 5\
**Last updated:** [April 2, 2022, 2:20pm UTC](https://discourse.julialang.org/t/check-if-a-value-is-rooted-by-the-garbage-collector-gc/78887 "2022-04-02T14:20:28Z")

</div>

Given a C-pointer jl\_value\_t\*, I would like to check whether the GC currently has a root to it. With root, I mean that the memory is marked such that it cannot be released when the gc starts its sweeping process. I’m pr…

---

## [Function array performance](https://discourse.julialang.org/t/function-array-performance/78889)

<div class="topic-metadata">

**Author:** [@smith-isaac](https://discourse.julialang.org/u/smith-isaac)\
**Replies:** 5\
**Last updated:** [April 2, 2022, 2:05pm UTC](https://discourse.julialang.org/t/function-array-performance/78889 "2022-04-02T14:05:26Z")

</div>

I have an array of functions that each return a float, and so I am trying to assign the results of those functions to an array. So I had something like this results = similar(f\_arr, Float64) results .= \[f(a, b, c) for f…

---

## [How to load a portion of image dataset](https://discourse.julialang.org/t/how-to-load-a-portion-of-image-dataset/78896)

<div class="topic-metadata">

**Author:** [@zed\_unseened](https://discourse.julialang.org/u/zed_unseened)\
**Replies:** 5\
**Last updated:** [April 2, 2022, 1:11pm UTC](https://discourse.julialang.org/t/how-to-load-a-portion-of-image-dataset/78896 "2022-04-02T13:11:00Z")

</div>

I am working with an 8GB image dataset and I am trying to use only a portion of the dataset in my model since my pc has pretty low ram. I am not sure exactly how to go about doing this but this is what I have tried so fa…

---

## [Can I input an invalid string into a variable?](https://discourse.julialang.org/t/can-i-input-an-invalid-string-into-a-variable/78769)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 15\
**Last updated:** [April 2, 2022, 7:11am UTC](https://discourse.julialang.org/t/can-i-input-an-invalid-string-into-a-variable/78769 "2022-04-02T07:11:14Z")

</div>

Hi! Suppose I have string such as: Part\_\\d{4} Putting it into a variable will give: ERROR: syntax: invalid escape sequence But if instead do: Variable = r"Part\_\\d{4}" Which works, which is great. But what if I wan…

---

## [ANN: SimulatedNeuralMoments](https://discourse.julialang.org/t/ann-simulatedneuralmoments/52032)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 3\
**Last updated:** [April 2, 2022, 7:02am UTC](https://discourse.julialang.org/t/ann-simulatedneuralmoments/52032 "2022-04-02T07:02:55Z")

</div>

I’m happy to announce that the package SimulatedNeuralMoments is available in the general registry. This is a package for inference methods that can be thought of as approximate Bayesian computing (ABC), with a particula…

---

## [Resources for Distributed Training w/ Flux](https://discourse.julialang.org/t/resources-for-distributed-training-w-flux/78105)

<div class="topic-metadata">

**Author:** [@austinbean](https://discourse.julialang.org/u/austinbean)\
**Replies:** 1\
**Last updated:** [April 2, 2022, 5:07am UTC](https://discourse.julialang.org/t/resources-for-distributed-training-w-flux/78105 "2022-04-02T05:07:39Z")

</div>

Hello - Is there a current (c. 2022) guide to parallel / distributed training in Flux, especially on GPUs? I found this archived repo but if there’s anything more current or if anyone has done this recently, I’d love …

---

## [Zygote.jl: @adjoint! (mutating / inplace adjoints)](https://discourse.julialang.org/t/zygote-jl-adjoint-mutating-inplace-adjoints/78241)

<div class="topic-metadata">

**Author:** [@MaximilianGelbrecht](https://discourse.julialang.org/u/MaximilianGelbrecht)\
**Replies:** 1\
**Last updated:** [April 2, 2022, 5:05am UTC](https://discourse.julialang.org/t/zygote-jl-adjoint-mutating-inplace-adjoints/78241 "2022-04-02T05:05:13Z")

</div>

Inspecting the Zygote code, I can see that aside from @adjoint there is also @adjoint! that is used to declare the adjoints of some mutating functions (like push! etc). I can’t find any doc strings or documentation when …

---

## [A problem with JuMP Tutorial-linear problem-cannery problem](https://discourse.julialang.org/t/a-problem-with-jump-tutorial-linear-problem-cannery-problem/78795)

<div class="topic-metadata">

**Author:** [@mahon](https://discourse.julialang.org/u/mahon)\
**Replies:** 15\
**Last updated:** [April 2, 2022, 4:26am UTC](https://discourse.julialang.org/t/a-problem-with-jump-tutorial-linear-problem-cannery-problem/78795 "2022-04-02T04:26:13Z")

</div>

when I code like this , it leads a error

---

## [Converts the given string into code with metaprogramming](https://discourse.julialang.org/t/converts-the-given-string-into-code-with-metaprogramming/78819)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 6\
**Last updated:** [April 2, 2022, 1:40am UTC](https://discourse.julialang.org/t/converts-the-given-string-into-code-with-metaprogramming/78819 "2022-04-02T01:40:55Z")

</div>

When I get a string s=“x^2+1” (It can only be a string), then how do I create a function f(x)=x^2+1. I tried the following with metaprogramming, but it didn’t work julia\> s="x^2+1" "x^2+1" julia\> f(x)=eval(Meta.parse(s…

---

## [How to build functions from symbolic expressions with symbolics.jl](https://discourse.julialang.org/t/how-to-build-functions-from-symbolic-expressions-with-symbolics-jl/78879)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 3\
**Last updated:** [April 2, 2022, 1:38am UTC](https://discourse.julialang.org/t/how-to-build-functions-from-symbolic-expressions-with-symbolics-jl/78879 "2022-04-02T01:38:14Z")

</div>

I want to build functions from symbolic expressions with symbolics.jl. I tried the following according to the documentation instructions. using Symbolics @variables x p=(1+x)^2 f\_expr=build\_function(p,x) f=eval(f\_expr)…

---

## [Current behavior of fill and the like..?](https://discourse.julialang.org/t/current-behavior-of-fill-and-the-like/78888)

<div class="topic-metadata">

**Author:** [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Replies:** 17\
**Last updated:** [April 2, 2022, 1:30am UTC](https://discourse.julialang.org/t/current-behavior-of-fill-and-the-like/78888 "2022-04-02T01:30:04Z")

</div>

fill is very useful for creating arrays having the same vaule at all locations. However, if this vaule is a mutable object, fill will place that very same object at all locations. This behavior can be confusing, especial…

---

## [Managing temporaries](https://discourse.julialang.org/t/managing-temporaries/78890)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 1\
**Last updated:** [April 2, 2022, 1:26am UTC](https://discourse.julialang.org/t/managing-temporaries/78890 "2022-04-02T01:26:42Z")

</div>

I’ve been told that C++ can now manage temporary matrices in loops automatically. For instance, for (...) { // create B, D K += B' \* D \* B \* Jw } would apparently allocate temporaries only once, before the …

---

## [How to specify only certain inital conditions as parameters](https://discourse.julialang.org/t/how-to-specify-only-certain-inital-conditions-as-parameters/78884)

<div class="topic-metadata">

**Author:** [@xztt](https://discourse.julialang.org/u/xztt)\
**Replies:** 1\
**Last updated:** [April 1, 2022, 10:06pm UTC](https://discourse.julialang.org/t/how-to-specify-only-certain-inital-conditions-as-parameters/78884 "2022-04-01T22:06:11Z")

</div>

Hi there My questions resolves around the code below function circ\_local(x) \_prob = remake(prob,u0=x\[1:3\],p=x\[4:end\]) sol = solve(\_prob,Tsit5(), reltol=1e-6, abstol=1e-6,saveat=savetime) \[mean(sol\[1,:\]),max…

---

## [JuMP optimize! used two much time and memory to solve a cplex model, do anyone knows why?](https://discourse.julialang.org/t/jump-optimize-used-two-much-time-and-memory-to-solve-a-cplex-model-do-anyone-knows-why/77966)

<div class="topic-metadata">

**Author:** [@yahengcui](https://discourse.julialang.org/u/yahengcui)\
**Replies:** 12\
**Last updated:** [April 1, 2022, 9:24pm UTC](https://discourse.julialang.org/t/jump-optimize-used-two-much-time-and-memory-to-solve-a-cplex-model-do-anyone-knows-why/77966 "2022-04-01T21:24:54Z")

</div>

I am solving cplex models using julia, while writing (in julia) the model (to .lp file) and solve the .lp file directly by cplex can be done in secs and mins, but when I want to solve the model directly in julia by using…

---

## [Issue using Convex with HiGHS for QP](https://discourse.julialang.org/t/issue-using-convex-with-highs-for-qp/78883)

<div class="topic-metadata">

**Author:** [@Graham\_Gill](https://discourse.julialang.org/u/Graham_Gill)\
**Replies:** 1\
**Last updated:** [April 1, 2022, 8:05pm UTC](https://discourse.julialang.org/t/issue-using-convex-with-highs-for-qp/78883 "2022-04-01T20:05:29Z")

</div>

I’ve been using HiGHS with Convex.jl lately for some MILPs and needed also to solve a simple continuous sum of squares minimisation. HiGHS can do this and HiGHS.jl should support this since https://github.com/jump-dev/Hi…

---

## [Ways to plot LEO orbit](https://discourse.julialang.org/t/ways-to-plot-leo-orbit/75336)

<div class="topic-metadata">

**Author:** [@yashi](https://discourse.julialang.org/u/yashi)\
**Replies:** 4\
**Last updated:** [April 1, 2022, 7:56pm UTC](https://discourse.julialang.org/t/ways-to-plot-leo-orbit/75336 "2022-04-01T19:56:16Z")

</div>

What would be a good way to start ploting an LEO orbit using Plots, or in Pluto.jl? I’d like to make sliders for 6 Keplerian elements to visualize how each parameter interact with the orbit. One is something like Wolfr…

---

## [Malloc error with Model(Cbc.Optimizer) on v1.8.0-beta3 and M1](https://discourse.julialang.org/t/malloc-error-with-model-cbc-optimizer-on-v1-8-0-beta3-and-m1/78876)

<div class="topic-metadata">

**Author:** [@evad](https://discourse.julialang.org/u/evad)\
**Replies:** 2\
**Last updated:** [April 1, 2022, 7:48pm UTC](https://discourse.julialang.org/t/malloc-error-with-model-cbc-optimizer-on-v1-8-0-beta3-and-m1/78876 "2022-04-01T19:48:25Z")

</div>

I have the following error crashing julia 1.8.0-beta3 on M1 MacOS when using m=Model(Cbc.Optimizer): julia(17828,0x100220580) malloc: \*\*\* error for object 0xe00000000000000: pointer being freed was not allocated julia(1…

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

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