# Latest

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

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

**Page:** 616

---

## [Mathematical description of functions](https://discourse.julialang.org/t/mathematical-description-of-functions/103021)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [August 21, 2023, 2:39pm UTC](https://discourse.julialang.org/t/mathematical-description-of-functions/103021 "2023-08-21T14:39:32Z")

</div>

I am solving an optimization problem which is somewhat easy to solve. The function I want to minimize is the absolute value of the real part of the FFT of a signal at a specific frequency. But what are the correct math…

---

## [JuMP: how to find which constraints a variable appears in](https://discourse.julialang.org/t/jump-how-to-find-which-constraints-a-variable-appears-in/103014)

<div class="topic-metadata">

**Author:** [@rjuly7](https://discourse.julialang.org/u/rjuly7)\
**Replies:** 2\
**Last updated:** [August 21, 2023, 2:37pm UTC](https://discourse.julialang.org/t/jump-how-to-find-which-constraints-a-variable-appears-in/103014 "2023-08-21T14:37:14Z")

</div>

I am using JuMP to formulate a large optimization problem. Is there any function which allows me to see all constraints in which a specific variable appears? Or if I have the reference to a specific constraint, is there …

---

## [Is there a way to Preview a CSV file in VSCode programatically?](https://discourse.julialang.org/t/is-there-a-way-to-preview-a-csv-file-in-vscode-programatically/103029)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 1\
**Last updated:** [August 21, 2023, 1:12pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-preview-a-csv-file-in-vscode-programatically/103029 "2023-08-21T13:12:42Z")

</div>

My program saves a CSV file that I open through VSCode by going to the Explorer pane, right-clicking on the file, and choosing Open Preview on the menu that pops up. Is there a way to do the same thing from inside my pr…

---

## [Help for improving the performance of my algorithm](https://discourse.julialang.org/t/help-for-improving-the-performance-of-my-algorithm/102907)

<div class="topic-metadata">

**Author:** [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Replies:** 6\
**Last updated:** [August 21, 2023, 12:52pm UTC](https://discourse.julialang.org/t/help-for-improving-the-performance-of-my-algorithm/102907 "2023-08-21T12:52:06Z")

</div>

I aim to develop a package for solving the standard quadratic optimization problem which maximizes (minimizes) a quadratic form over the unit simplex. That is \\max x^T Q x : \\sum\_{i \\in \[1:n\]} x\_i = 1, x\\in \\mathbb{R}\_+^…

---

## [Julia: Start REPL](https://discourse.julialang.org/t/julia-start-repl/103025)

<div class="topic-metadata">

**Author:** [@gsinha](https://discourse.julialang.org/u/gsinha)\
**Replies:** 3\
**Last updated:** [August 21, 2023, 12:48pm UTC](https://discourse.julialang.org/t/julia-start-repl/103025 "2023-08-21T12:48:22Z")

</div>

Why does this happen after you’ve selected the python interpreter from a conda env? Julia\> C:/ProgramData/anaconda3/Scripts/activate ERROR: syntax: "/" is not a unary operator Stacktrace: \[1\] top-level scope @ non…

---

## [Singular Exception](https://discourse.julialang.org/t/singular-exception/99092)

<div class="topic-metadata">

**Author:** [@yoshi](https://discourse.julialang.org/u/yoshi)\
**Replies:** 8\
**Last updated:** [August 21, 2023, 12:12pm UTC](https://discourse.julialang.org/t/singular-exception/99092 "2023-08-21T12:12:03Z")

</div>

I’m running a simulation and obtain the following error. I’m struggling to interpret what it means. The code producing the error is also pasted below. ERROR: LinearAlgebra.SingularException(4) Stacktrace: \[1\] checknon…

---

## [\[ANN\] Announcing Eikonal.jl](https://discourse.julialang.org/t/ann-announcing-eikonal-jl/102960)

<div class="topic-metadata">

**Author:** [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Replies:** 6\
**Last updated:** [August 21, 2023, 11:06am UTC](https://discourse.julialang.org/t/ann-announcing-eikonal-jl/102960 "2023-08-21T11:06:18Z")

</div>

Eikonal.jl implements solvers for Eikonal equations of the form: \\begin{align} &\\qquad \\left\\Vert\\nabla \\tau\\right\\Vert = \\sigma(x), &&\\forall x\\in\\Omega\\subset\\mathbb{R}^N,\\\\ &\\qquad\\tau(x\_0) = 0, &&\\forall x\_0\\in\\Gamm…

---

## [How to debug julia code in Genie framework](https://discourse.julialang.org/t/how-to-debug-julia-code-in-genie-framework/102903)

<div class="topic-metadata">

**Author:** [@Jayesh\_Patil](https://discourse.julialang.org/u/Jayesh_Patil)\
**Replies:** 1\
**Last updated:** [August 21, 2023, 9:54am UTC](https://discourse.julialang.org/t/how-to-debug-julia-code-in-genie-framework/102903 "2023-08-21T09:54:35Z")

</div>

I Learn how to debug normal julia code with Debugger.jl package and @enter macros now i want to debug julia code inside the genie framework. please help me

---

## [Run Pkg.test with several processors](https://discourse.julialang.org/t/run-pkg-test-with-several-processors/6917)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 16\
**Last updated:** [August 21, 2023, 9:48am UTC](https://discourse.julialang.org/t/run-pkg-test-with-several-processors/6917 "2023-08-21T09:48:50Z")

</div>

I have tests that use several processors. If I run julia -p 4 and then Pkg.test I only get 1 as a worker.

---

## [Why are these violin plots "clipped"?](https://discourse.julialang.org/t/why-are-these-violin-plots-clipped/103006)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 7\
**Last updated:** [August 21, 2023, 9:09am UTC](https://discourse.julialang.org/t/why-are-these-violin-plots-clipped/103006 "2023-08-21T09:09:37Z")

</div>

Hi all, I produced some violin plots from some data I have: df\_temp = DataFrame(mnemonic = df\_model\_master\[:, :mnemonic\], instruction = df\_model\_master\[:, instruction\_sym\], shift = df\_model\_master\[:, has\_barrel\_…

---

## [Taking the gradient of an einsum](https://discourse.julialang.org/t/taking-the-gradient-of-an-einsum/103003)

<div class="topic-metadata">

**Author:** [@yuvalw](https://discourse.julialang.org/u/yuvalw)\
**Replies:** 4\
**Last updated:** [August 21, 2023, 8:55am UTC](https://discourse.julialang.org/t/taking-the-gradient-of-an-einsum/103003 "2023-08-21T08:55:21Z")

</div>

Hello, I would really appreciate some help optimizing my optimization. What I calculate makes the most sense (to me) as an einsum but I cannot seem to take its gradient properly. What I managed to do instead is iterate o…

---

## [Directly modifying partials in ForwardDiff](https://discourse.julialang.org/t/directly-modifying-partials-in-forwarddiff/102755)

<div class="topic-metadata">

**Author:** [@Pablo\_Marchant](https://discourse.julialang.org/u/Pablo_Marchant)\
**Replies:** 14\
**Last updated:** [August 21, 2023, 8:19am UTC](https://discourse.julialang.org/t/directly-modifying-partials-in-forwarddiff/102755 "2023-08-21T08:19:09Z")

</div>

Hi all, I am currently trying to optimize a package I’ve written to model stellar evolution. Just in case I prefer to give some context to know if there might be a much better way to do what I’m trying to achieve. Stell…

---

## [Discourse page extremely slow?](https://discourse.julialang.org/t/discourse-page-extremely-slow/102937)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 4\
**Last updated:** [August 21, 2023, 7:05am UTC](https://discourse.julialang.org/t/discourse-page-extremely-slow/102937 "2023-08-21T07:05:36Z")

</div>

I’m experiencing extremely erratic/slow response in MS Edge for the discourse page at the moment (https://discourse.julialang.org). All other url:s have snappy response. Anyone else experiences this?

---

## [Not possible to create a post request with more than 268 strings for create\_embeddings() of OpenAI.jl?](https://discourse.julialang.org/t/not-possible-to-create-a-post-request-with-more-than-268-strings-for-create-embeddings-of-openai-jl/102985)

<div class="topic-metadata">

**Author:** [@Alex\_Tantos](https://discourse.julialang.org/u/Alex_Tantos)\
**Replies:** 2\
**Last updated:** [August 21, 2023, 6:15am UTC](https://discourse.julialang.org/t/not-possible-to-create-a-post-request-with-more-than-268-strings-for-create-embeddings-of-openai-jl/102985 "2023-08-21T06:15:26Z")

</div>

Hi there. It seems there is a time or string limit for doing post requests? Although I am able to do a one time request for 1000 strings out of the overview column in R, I cannot do more than 268 right now with OpenAI.j…

---

## [Common allocation mistakes](https://discourse.julialang.org/t/common-allocation-mistakes/66127)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 47\
**Last updated:** [August 21, 2023, 5:42am UTC](https://discourse.julialang.org/t/common-allocation-mistakes/66127 "2023-08-21T05:42:20Z")

</div>

@amrods, splitting here the question you posted. 1. Create a mutable array inside a loop, explicitly: julia\> function f(x) z = 0. for i in 1:10 y = \[ i+1, i+2 \] z += x\[1\]\*y\[1\] + x…

---

## [Towards implementing CSE in the Julia compiler](https://discourse.julialang.org/t/towards-implementing-cse-in-the-julia-compiler/102922)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 12\
**Last updated:** [August 21, 2023, 3:40am UTC](https://discourse.julialang.org/t/towards-implementing-cse-in-the-julia-compiler/102922 "2023-08-21T03:40:34Z")

</div>

Specifically implementing CSE on Julia IR could be a pretty good introduction to the compiler for someone. We already have all the analysis needed (it’s the same analysis for dead code elimination), so it’s mostly just a…

---

## [Solving this without a loop (learning purposes)](https://discourse.julialang.org/t/solving-this-without-a-loop-learning-purposes/103013)

<div class="topic-metadata">

**Author:** [@CodeGodz](https://discourse.julialang.org/u/CodeGodz)\
**Replies:** 14\
**Last updated:** [August 21, 2023, 12:46am UTC](https://discourse.julialang.org/t/solving-this-without-a-loop-learning-purposes/103013 "2023-08-21T00:46:23Z")

</div>

I’m trying to get more familiar with using Transducers.jl or related functions that avoid loops - just to learn. Let’s say I have this simple vector x = Bool\[1,1,0,0,1,1,0,1\] and I want to find the indices of adjacent …

---

## [Why is accessing a typed global different from dereferencing a const Ref](https://discourse.julialang.org/t/why-is-accessing-a-typed-global-different-from-dereferencing-a-const-ref/102992)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 9\
**Last updated:** [August 20, 2023, 11:29pm UTC](https://discourse.julialang.org/t/why-is-accessing-a-typed-global-different-from-dereferencing-a-const-ref/102992 "2023-08-20T23:29:58Z")

</div>

I had expected these to be implemented the same way, just loading a value of the specified type from a memory address, but it appears that the typed global needs 2 different loads. Why is that? Doesn’t seem to be a perfo…

---

## [Are there ways to preallocate memory via structs for JuMP autodiff?](https://discourse.julialang.org/t/are-there-ways-to-preallocate-memory-via-structs-for-jump-autodiff/102945)

<div class="topic-metadata">

**Author:** [@told](https://discourse.julialang.org/u/told)\
**Replies:** 2\
**Last updated:** [August 20, 2023, 8:58pm UTC](https://discourse.julialang.org/t/are-there-ways-to-preallocate-memory-via-structs-for-jump-autodiff/102945 "2023-08-20T20:58:20Z")

</div>

I’m very aware of the limitations of ForwardDiff.jl that code has to be written general enough to accept {T\<:Real}. The JuMP docs suggest to write target functions like function good\_f(x::T...) where {T\<:Real} y = …

---

## [RegexMatch to NamedTuple?](https://discourse.julialang.org/t/regexmatch-to-namedtuple/22551)

<div class="topic-metadata">

**Author:** [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Replies:** 3\
**Last updated:** [August 20, 2023, 5:42pm UTC](https://discourse.julialang.org/t/regexmatch-to-namedtuple/22551 "2023-08-20T17:42:28Z")

</div>

When parsing a string with regex like m = match(r"^(?\<str\_a\>\\S+) (?\<str\_b\>\\S+)$", "abc def") it is possible to get group values like m\[:str\_a\] and so on. But how do I convert the match to namedtuple, (str\_a = "abc", str\_…

---

## [Construct DataFrame From Uneven Named Tuples](https://discourse.julialang.org/t/construct-dataframe-from-uneven-named-tuples/102970)

<div class="topic-metadata">

**Author:** [@quietlight](https://discourse.julialang.org/u/quietlight)\
**Replies:** 18\
**Last updated:** [August 20, 2023, 4:47pm UTC](https://discourse.julialang.org/t/construct-dataframe-from-uneven-named-tuples/102970 "2023-08-20T16:47:56Z")

</div>

I am trying to construct a DataFrame from an array of named tuples where some key:value pairs may be missing from some tuples. They come from querying Airtable using Airtable,jl. If you have missing values in your table…

---

## [Does redefinition of const variables always create unpredictable behavior?](https://discourse.julialang.org/t/does-redefinition-of-const-variables-always-create-unpredictable-behavior/103001)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 6\
**Last updated:** [August 20, 2023, 4:28pm UTC](https://discourse.julialang.org/t/does-redefinition-of-const-variables-always-create-unpredictable-behavior/103001 "2023-08-20T16:28:42Z")

</div>

I have a program that runs fine. I want it to run faster. So I redefined some of its top-level variables to be const, like this const myvar = 1 Now when I run the program I get the following message: WARNING: redefini…

---

## [How can I show the mean in a groupedboxplot?](https://discourse.julialang.org/t/how-can-i-show-the-mean-in-a-groupedboxplot/102980)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 4\
**Last updated:** [August 20, 2023, 4:03pm UTC](https://discourse.julialang.org/t/how-can-i-show-the-mean-in-a-groupedboxplot/102980 "2023-08-20T16:03:16Z")

</div>

Hi all! I have this kind of DataFrame containing data: julia\> df\_filtered = filter(:mnemonic =\> m -\> m ∈ selected\_instructions, df\_temp) 1990×4 DataFrame Row │ mnemonic instruction forwarding value …

---

## [Any breaking changes in NLopt v1.0.0?](https://discourse.julialang.org/t/any-breaking-changes-in-nlopt-v1-0-0/102988)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 2\
**Last updated:** [August 20, 2023, 2:05pm UTC](https://discourse.julialang.org/t/any-breaking-changes-in-nlopt-v1-0-0/102988 "2023-08-20T14:05:35Z")

</div>

NLopt v1.0.0 just got tagged (:tada:). See Release v1.0.0 · JuliaOpt/NLopt.jl · GitHub. Were there any breaking changes compared to the previous stable version, v0.6.5? This is not transparent from looking at the commit…

---

## [Briefly Talked with John Carmack at Quakecon about Julia](https://discourse.julialang.org/t/briefly-talked-with-john-carmack-at-quakecon-about-julia/102890)

<div class="topic-metadata">

**Author:** [@Snowy](https://discourse.julialang.org/u/Snowy)\
**Replies:** 14\
**Last updated:** [August 20, 2023, 1:27pm UTC](https://discourse.julialang.org/t/briefly-talked-with-john-carmack-at-quakecon-about-julia/102890 "2023-08-20T13:27:47Z")

</div>

I went to Quakecon this past week and John Carmack made a short appearance on Saturday. As part of this, you could talk with him, ask a question, or get your photo taken. Some may know that Carmack left Oculus / META a …

---

## [Why does Julia say 1/26=0.038461538461538464](https://discourse.julialang.org/t/why-does-julia-say-1-26-0-038461538461538464/102995)

<div class="topic-metadata">

**Author:** [@a-boy](https://discourse.julialang.org/u/a-boy)\
**Replies:** 5\
**Last updated:** [August 20, 2023, 1:05pm UTC](https://discourse.julialang.org/t/why-does-julia-say-1-26-0-038461538461538464/102995 "2023-08-20T13:05:44Z")

</div>

julia\> BigFloat(1/26) 0.0384615384615384636735058165868395008146762847900390625 julia\> 1/26 0.038461538461538464 In fact, 1/26=0.0384615\[384615\]… 384615 as a decimal cycle section. So I doubt the value of BigFloat(1/…

---

## [Bayesian Cognitive Modeling with Turing.jl (Part 2,3)](https://discourse.julialang.org/t/bayesian-cognitive-modeling-with-turing-jl-part-2-3/103002)

<div class="topic-metadata">

**Author:** [@quangtiencs](https://discourse.julialang.org/u/quangtiencs)\
**Replies:** 0\
**Last updated:** [August 20, 2023, 12:05pm UTC](https://discourse.julialang.org/t/bayesian-cognitive-modeling-with-turing-jl-part-2-3/103002 "2023-08-20T12:05:45Z")

</div>

Github: GitHub - quangtiencs/bayesian-cognitive-modeling-with-turing.jl: Bayesian Cognitive Modeling with Turing.jl (Julia Programming Language) Status: All models of these chapters are done: 3, 4, 5, 6 (5/7), 8, 9. I’m…

---

## [Not getting inline result in VS Code after switching to Julia 1.9.2](https://discourse.julialang.org/t/not-getting-inline-result-in-vs-code-after-switching-to-julia-1-9-2/102916)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 1\
**Last updated:** [August 20, 2023, 11:42am UTC](https://discourse.julialang.org/t/not-getting-inline-result-in-vs-code-after-switching-to-julia-1-9-2/102916 "2023-08-20T11:42:12Z")

</div>

Dear All, After switching to Julia 1.9.2 I am having issues in having inline results in VS Code for some reason. Sometimes it works and sometimes it does not. I have tried removing vs code, removing Julia extension, and…

---

## [Help on changing the color of a poly edge in Makie](https://discourse.julialang.org/t/help-on-changing-the-color-of-a-poly-edge-in-makie/102999)

<div class="topic-metadata">

**Author:** [@marteaua](https://discourse.julialang.org/u/marteaua)\
**Replies:** 0\
**Last updated:** [August 20, 2023, 9:18am UTC](https://discourse.julialang.org/t/help-on-changing-the-color-of-a-poly-edge-in-makie/102999 "2023-08-20T09:18:29Z")

</div>

Hi, I plotted a small 3D mesh using poly in Makie, I use a LScene because I want to put several 3D axis and do camera rotations. I try to change the color of one of the edge of the mesh. My idea is to plot the edge abov…

---

## [Vcat DataFrame columns based on multiple columns in Julia](https://discourse.julialang.org/t/vcat-dataframe-columns-based-on-multiple-columns-in-julia/102932)

<div class="topic-metadata">

**Author:** [@Mark01](https://discourse.julialang.org/u/Mark01)\
**Replies:** 6\
**Last updated:** [August 20, 2023, 8:48am UTC](https://discourse.julialang.org/t/vcat-dataframe-columns-based-on-multiple-columns-in-julia/102932 "2023-08-20T08:48:19Z")

</div>

I have 3 DataFrames, each containing 3 columns: A, B, and C. using DataFrames common\_data = Dict("A" =\> \[1, 2, 3\], "B" =\> \[10, 20, 30\]) df1 = DataFrame(merge(common\_data, Dict("C" =\> \[100, 200, 300\]))) df2 = DataFra…

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

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