# Latest

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

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

**Page:** 1059

---

## [Creating a new tuple from an existing one](https://discourse.julialang.org/t/creating-a-new-tuple-from-an-existing-one/80034)

<div class="topic-metadata">

**Author:** [@johnbb](https://discourse.julialang.org/u/johnbb)\
**Replies:** 5\
**Last updated:** [April 26, 2022, 7:41am UTC](https://discourse.julialang.org/t/creating-a-new-tuple-from-an-existing-one/80034 "2022-04-26T07:41:17Z")

</div>

Is there a general way to create a new tuple from an existing one of any length where one the element is set to something else?

---

## [Not able convert string to missing](https://discourse.julialang.org/t/not-able-convert-string-to-missing/80032)

<div class="topic-metadata">

**Author:** [@sai\_matcha](https://discourse.julialang.org/u/sai_matcha)\
**Replies:** 2\
**Last updated:** [April 26, 2022, 7:07am UTC](https://discourse.julialang.org/t/not-able-convert-string-to-missing/80032 "2022-04-26T07:07:29Z")

</div>

Hi, I have a string variable in my dataframe. Im tryng to convert that to float 64. below is the process and problems im faced first i tried to convert string varaible to float64. Below is the error. phen7\[!,:ALB\] = p…

---

## [ENOENT error suddently appearing for both Atom editor and VSCode Julia on a Windows 10 machine](https://discourse.julialang.org/t/enoent-error-suddently-appearing-for-both-atom-editor-and-vscode-julia-on-a-windows-10-machine/37276)

<div class="topic-metadata">

**Author:** [@Zhong\_Pan](https://discourse.julialang.org/u/Zhong_Pan)\
**Replies:** 4\
**Last updated:** [April 26, 2022, 4:59am UTC](https://discourse.julialang.org/t/enoent-error-suddently-appearing-for-both-atom-editor-and-vscode-julia-on-a-windows-10-machine/37276 "2022-04-26T04:59:32Z")

</div>

I am facing a very strange problem on one of my Windows 10 64-bit machines with Julia 1.4.0. The Atom editor with Juno were working fine. Then one day, maybe after a Windows update or installing Slack - couldn’t remembe…

---

## [Recording mouse position coordinates in plots?](https://discourse.julialang.org/t/recording-mouse-position-coordinates-in-plots/28848)

<div class="topic-metadata">

**Author:** [@davide](https://discourse.julialang.org/u/davide)\
**Replies:** 16\
**Last updated:** [April 26, 2022, 4:56am UTC](https://discourse.julialang.org/t/recording-mouse-position-coordinates-in-plots/28848 "2022-04-26T04:56:50Z")

</div>

Is there a way to click on a plot and have the coordinates at the pointer recorded (read)? (E.g. like, in R, the locator() function). I mostly use Plots.jl but I may use a different package (and I would prefer interact…

---

## [Most solid/easiest way to plot Earth on 3D with specific points on it using Pluto?](https://discourse.julialang.org/t/most-solid-easiest-way-to-plot-earth-on-3d-with-specific-points-on-it-using-pluto/76942)

<div class="topic-metadata">

**Author:** [@eduardosalaz](https://discourse.julialang.org/u/eduardosalaz)\
**Replies:** 2\
**Last updated:** [April 26, 2022, 4:39am UTC](https://discourse.julialang.org/t/most-solid-easiest-way-to-plot-earth-on-3d-with-specific-points-on-it-using-pluto/76942 "2022-04-26T04:39:56Z")

</div>

Hi there. I am currently working on a project to visualize a worldwide TSP in which the nodes have specific coordinates on Earth. For a quick viz, I have successfully used GMT.jl (which is quite a great package) to plot…

---

## [Limiting tab autocompletion in REPL?](https://discourse.julialang.org/t/limiting-tab-autocompletion-in-repl/80028)

<div class="topic-metadata">

**Author:** [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Replies:** 0\
**Last updated:** [April 26, 2022, 3:29am UTC](https://discourse.julialang.org/t/limiting-tab-autocompletion-in-repl/80028 "2022-04-26T03:29:28Z")

</div>

I’ve occasionally found myself pressing TAB twice in the REPL, either at the prompt or after whitespace, and getting the full list of loaded symbols dumped into the buffer (and scrolls away other information I’m using ne…

---

## [Filter rows after a perticular value in column](https://discourse.julialang.org/t/filter-rows-after-a-perticular-value-in-column/77225)

<div class="topic-metadata">

**Author:** [@sai\_matcha](https://discourse.julialang.org/u/sai_matcha)\
**Replies:** 5\
**Last updated:** [April 26, 2022, 2:55am UTC](https://discourse.julialang.org/t/filter-rows-after-a-perticular-value-in-column/77225 "2022-04-26T02:55:58Z")

</div>

Hi , I have a dafataframe that looks like df = DataFrame() df.id = sort!(repeat(1:3,5)) df.a = repeat(\[0,5,7,15,17\],3) df.diff\_a = repeat(\[0,5,2,8,2\],3) I want to drop all coming rows whenever ‘df.diff\_a’ value goes mo…

---

## [How to use MPI.jl to scatter a matrix to a 2D processor grid?](https://discourse.julialang.org/t/how-to-use-mpi-jl-to-scatter-a-matrix-to-a-2d-processor-grid/80013)

<div class="topic-metadata">

**Author:** [@Neo](https://discourse.julialang.org/u/Neo)\
**Replies:** 1\
**Last updated:** [April 25, 2022, 11:24pm UTC](https://discourse.julialang.org/t/how-to-use-mpi-jl-to-scatter-a-matrix-to-a-2d-processor-grid/80013 "2022-04-25T23:24:58Z")

</div>

For example, I have a 5 by 5 matrix A = \[1, 2, 3, 4, 5; 1, 2, 3, 4, 5; 1, 2, 3, 4, 5; 1, 2, 3, 4, 5; 1, 2 ,3 ,4, 5\] and I want to scatter A to four processors like \[2,3; 4, 5\]. More precisely, I want to broadcast \[1,2…

---

## [Analytic derivatives for multivariate functions in JuMP](https://discourse.julialang.org/t/analytic-derivatives-for-multivariate-functions-in-jump/79750)

<div class="topic-metadata">

**Author:** [@optimist](https://discourse.julialang.org/u/optimist)\
**Replies:** 2\
**Last updated:** [April 26, 2022, 2:26am UTC](https://discourse.julialang.org/t/analytic-derivatives-for-multivariate-functions-in-jump/79750 "2022-04-26T02:26:32Z")

</div>

I am trying to provide derivatives for a function to see if it can speed up the optimization, but I am running in to errors. Unexpected array VariableRef\[x\[1\], x\[2\], x\[3\], x\[4\]\] in nonlinear expression. Nonlinear expres…

---

## [Lasso fit with non-negative coefficients](https://discourse.julialang.org/t/lasso-fit-with-non-negative-coefficients/79923)

<div class="topic-metadata">

**Author:** [@Aminath\_Shausan](https://discourse.julialang.org/u/Aminath_Shausan)\
**Replies:** 4\
**Last updated:** [April 26, 2022, 1:40am UTC](https://discourse.julialang.org/t/lasso-fit-with-non-negative-coefficients/79923 "2022-04-26T01:40:49Z")

</div>

Hi I am using a Lasso model for feature selection. At present I use the function lassoFit = fit(LassoPath, X\_train, Y\_train, λ = lamGrid, maxncoef=maxncoef) I have the following question. (1) Some estimated coefficie…

---

## [Why are my higher order functions a million times slower than they should be?](https://discourse.julialang.org/t/why-are-my-higher-order-functions-a-million-times-slower-than-they-should-be/80021)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 7\
**Last updated:** [April 26, 2022, 12:41am UTC](https://discourse.julialang.org/t/why-are-my-higher-order-functions-a-million-times-slower-than-they-should-be/80021 "2022-04-26T00:41:25Z")

</div>

While this example looks highly constructed, I ran into this performance issue in real code and got this as a MWE. I expect a slight penalty for calling a function dynamically (i.e. \_slow instead of the constant slow) bu…

---

## [How do I use an @sync inside a macro](https://discourse.julialang.org/t/how-do-i-use-an-sync-inside-a-macro/80023)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 0\
**Last updated:** [April 26, 2022, 12:40am UTC](https://discourse.julialang.org/t/how-do-i-use-an-sync-inside-a-macro/80023 "2022-04-26T00:40:10Z")

</div>

I’d like to understand how I could use @sync inside a macro instead of using fetch. Below is a simple example with some code borrowed from Base src (and butchered). How would I do it? function yuck( iter, lbody, n ) …

---

## [What's the difference between the tilde ~ and exclamation ! operators?](https://discourse.julialang.org/t/whats-the-difference-between-the-tilde-and-exclamation-operators/79945)

<div class="topic-metadata">

**Author:** [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Replies:** 12\
**Last updated:** [April 25, 2022, 11:51pm UTC](https://discourse.julialang.org/t/whats-the-difference-between-the-tilde-and-exclamation-operators/79945 "2022-04-25T23:51:18Z")

</div>

I’m new to Julia and trying to understand when to use ~ and when to use ! operators. The documentation describes each operator as: ! an exclamation mark is a prefix operator for logical negation (“not”) ~ the tild…

---

## [How to view source of import/using Package?](https://discourse.julialang.org/t/how-to-view-source-of-import-using-package/79893)

<div class="topic-metadata">

**Author:** [@guidorice](https://discourse.julialang.org/u/guidorice)\
**Replies:** 5\
**Last updated:** [April 25, 2022, 11:51pm UTC](https://discourse.julialang.org/t/how-to-view-source-of-import-using-package/79893 "2022-04-25T23:51:16Z")

</div>

When I have installed some packages, then I can view docstrings of imported/using packages, by hovering over an expression or variable. However, Go to Definition (F12) does not work for imported or using Packages. This …

---

## [Visual Studio Code terminal dies when creating plot](https://discourse.julialang.org/t/visual-studio-code-terminal-dies-when-creating-plot/80019)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 1\
**Last updated:** [April 25, 2022, 10:20pm UTC](https://discourse.julialang.org/t/visual-studio-code-terminal-dies-when-creating-plot/80019 "2022-04-25T22:20:25Z")

</div>

Sometimes the plots plot and sometimes the REPL simply dies. I think if I make the terminal display in the editor works. The error message is pretty impenetrable: The terminal process “julia ‘-i’, ‘–banner=no’, ‘–proj…

---

## [Creating an empty dataframe from a vector of strings fails?](https://discourse.julialang.org/t/creating-an-empty-dataframe-from-a-vector-of-strings-fails/80008)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 8\
**Last updated:** [April 25, 2022, 9:55pm UTC](https://discourse.julialang.org/t/creating-an-empty-dataframe-from-a-vector-of-strings-fails/80008 "2022-04-25T21:55:10Z")

</div>

Hi all got a string vector col\_names = \["start","interval","goal","num\_hedgeHogs"\] I want to create an empty dataframe using col\_names as the column names and a data type of Any. I thought this might do the trick d…

---

## [Problem with invoking objects of user defined types](https://discourse.julialang.org/t/problem-with-invoking-objects-of-user-defined-types/80017)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 2\
**Last updated:** [April 25, 2022, 9:50pm UTC](https://discourse.julialang.org/t/problem-with-invoking-objects-of-user-defined-types/80017 "2022-04-25T21:50:15Z")

</div>

Why am I not able to assign a value to a mutable struct field if I have not restricted it to a particular type for the following case: mutable struct TestStruct field1 field2 function TestStruct(field1) …

---

## [How to use Pluto when developping a package](https://discourse.julialang.org/t/how-to-use-pluto-when-developping-a-package/80016)

<div class="topic-metadata">

**Author:** [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Replies:** 0\
**Last updated:** [April 25, 2022, 9:28pm UTC](https://discourse.julialang.org/t/how-to-use-pluto-when-developping-a-package/80016 "2022-04-25T21:28:19Z")

</div>

Hello The last version of Pluto has its own built-in package manager. Unfortunately I need to include a Pkg.activate() statement in the notebooks for testing. And this statement should be removed before distribution. …

---

## [Why do I keep getting a Method Error for Graphs package every time?](https://discourse.julialang.org/t/why-do-i-keep-getting-a-method-error-for-graphs-package-every-time/80004)

<div class="topic-metadata">

**Author:** [@Temi-Tory](https://discourse.julialang.org/u/Temi-Tory)\
**Replies:** 6\
**Last updated:** [April 25, 2022, 8:28pm UTC](https://discourse.julialang.org/t/why-do-i-keep-getting-a-method-error-for-graphs-package-every-time/80004 "2022-04-25T20:28:23Z")

</div>

Hello there, I am having a seemingly recurring issue here. Lets say I am working on a Julia file with graphs for a while and everything is going well. Then I close that file and don’t use it for ages, and then the next…

---

## [Known Security Vulnerabilities](https://discourse.julialang.org/t/known-security-vulnerabilities/67828)

<div class="topic-metadata">

**Author:** [@hmray2025](https://discourse.julialang.org/u/hmray2025)\
**Replies:** 8\
**Last updated:** [April 25, 2022, 8:21pm UTC](https://discourse.julialang.org/t/known-security-vulnerabilities/67828 "2022-04-25T20:21:55Z")

</div>

Is there any comprehensive list of known security vulnerabilities or associated strengths with Julia? I’m working with the DoD to enable ML applications for data science and am hoping to use Julia in our implementation. …

---

## [Plot a plot with subplot, given plots](https://discourse.julialang.org/t/plot-a-plot-with-subplot-given-plots/80011)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 5\
**Last updated:** [April 25, 2022, 8:06pm UTC](https://discourse.julialang.org/t/plot-a-plot-with-subplot-given-plots/80011 "2022-04-25T20:06:59Z")

</div>

I don’t know how to better describe this. Given: p1 = plot(rand(10)) p2 = plot(rand(10)) is there a way to use p1 and p2 to produce a two-subplot figure? Something like: p = plot(layout=(2,1)) plot!(p, p1, subplot=1)…

---

## [Declare functions of type](https://discourse.julialang.org/t/declare-functions-of-type/80006)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 0\
**Last updated:** [April 25, 2022, 6:53pm UTC](https://discourse.julialang.org/t/declare-functions-of-type/80006 "2022-04-25T18:53:32Z")

</div>

Moved from another thread Let’s say you want to know the methods to modify a Dict. In e.g. rust you can find those methods in the documentation of the Dict datatype. But if you execute apropos(“Dict”) in Julia you find…

---

## [Anything like Halide in the Julia ecosystem?](https://discourse.julialang.org/t/anything-like-halide-in-the-julia-ecosystem/80005)

<div class="topic-metadata">

**Author:** [@Phil\_Tomson](https://discourse.julialang.org/u/Phil_Tomson)\
**Replies:** 1\
**Last updated:** [April 25, 2022, 6:47pm UTC](https://discourse.julialang.org/t/anything-like-halide-in-the-julia-ecosystem/80005 "2022-04-25T18:47:13Z")

</div>

Halide (https://halide-lang.org/) is an embedded DSL in C++ that allows you to describe an algorithm as well as a “schedule” with the intent on targeting an algorithm to a specific architecture (CPU, GPU, etc) in an opt…

---

## [Tracing Functions: Problem printing parameter values](https://discourse.julialang.org/t/tracing-functions-problem-printing-parameter-values/80003)

<div class="topic-metadata">

**Author:** [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Replies:** 0\
**Last updated:** [April 25, 2022, 5:58pm UTC](https://discourse.julialang.org/t/tracing-functions-problem-printing-parameter-values/80003 "2022-04-25T17:58:19Z")

</div>

I’m trying to implement a function tracing facility in Julia. Each time the designated function is called I want to log the parameters and return values. I have something partially working that is checked in at @tra…

---

## [Parenthesizing conditions](https://discourse.julialang.org/t/parenthesizing-conditions/80000)

<div class="topic-metadata">

**Author:** [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Replies:** 3\
**Last updated:** [April 25, 2022, 5:54pm UTC](https://discourse.julialang.org/t/parenthesizing-conditions/80000 "2022-04-25T17:54:34Z")

</div>

The Julia Style Guide says: Don’t parenthesize conditions …Write: if a == b instead of: if (a == b) However, I recently discovered a potentially dangerous characteristic of Julia, which, as far as I know, can only…

---

## [Where are parameters stored within ForneyLab](https://discourse.julialang.org/t/where-are-parameters-stored-within-forneylab/79999)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 0\
**Last updated:** [April 25, 2022, 5:15pm UTC](https://discourse.julialang.org/t/where-are-parameters-stored-within-forneylab/79999 "2022-04-25T17:15:51Z")

</div>

Consider the following code snippet: using ForneyLab g = FactorGraph() @RV x ~ Bernoulli(0.7) My question is: in what data structure is 0.7 stored? I found that Bernoulli is a struct by examining the ForneyLab source c…

---

## [Open a vs code workspace in two separate windows](https://discourse.julialang.org/t/open-a-vs-code-workspace-in-two-separate-windows/53581)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 2\
**Last updated:** [April 25, 2022, 3:42pm UTC](https://discourse.julialang.org/t/open-a-vs-code-workspace-in-two-separate-windows/53581 "2022-04-25T15:42:36Z")

</div>

I tried to open the same folder in a separate window, in order to work on a separate part of the project that is already running in the first window. But the folder-open command just brings up the first window instead. …

---

## [Makie - Massive growth of memory usage when updating an image](https://discourse.julialang.org/t/makie-massive-growth-of-memory-usage-when-updating-an-image/72460)

<div class="topic-metadata">

**Author:** [@nelsonah](https://discourse.julialang.org/u/nelsonah)\
**Replies:** 5\
**Last updated:** [April 25, 2022, 3:33pm UTC](https://discourse.julialang.org/t/makie-massive-growth-of-memory-usage-when-updating-an-image/72460 "2022-04-25T15:33:41Z")

</div>

I have spent a week on this issue and need help. My application is to generate a file of images that I later massage and make into a movie. All works great EXCEPT the memory usage limits my number of frames before it c…

---

## [Why does Julia not support JSON syntax to create a Dict?](https://discourse.julialang.org/t/why-does-julia-not-support-json-syntax-to-create-a-dict/42873)

<div class="topic-metadata">

**Author:** [@xareelee](https://discourse.julialang.org/u/xareelee)\
**Replies:** 27\
**Last updated:** [April 25, 2022, 3:27pm UTC](https://discourse.julialang.org/t/why-does-julia-not-support-json-syntax-to-create-a-dict/42873 "2022-04-25T15:27:55Z")

</div>

JSON syntax for creating Dict/Array is really handy, especially in web development. It’s useful and high productivity when you copy data and paste to code from Stackoverflow, MongoDB or any JSON string. Just curious, wh…

---

## [Json/bson dsl](https://discourse.julialang.org/t/json-bson-dsl/79940)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 1\
**Last updated:** [April 25, 2022, 3:16pm UTC](https://discourse.julialang.org/t/json-bson-dsl/79940 "2022-04-25T15:16:44Z")

</div>

Hi, I’ve been playing a bit with Mongoc which is a thin layer on top of the MongoDB C library. MongoDB is leaning heavily into JSON, which makes for non-intuitive code (from the Mongoc docs): create\_indexes\_cmd = Mongo…

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

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