# New to Julia

**URL:** https://discourse.julialang.org/c/first-steps/8.md?page=49

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

**Page:** 50

---

## [DrWatson and github](https://discourse.julialang.org/t/drwatson-and-github/44060)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 0\
**Last updated:** [July 31, 2020, 9:09pm UTC](https://discourse.julialang.org/t/drwatson-and-github/44060 "2020-07-31T21:09:01Z")

</div>

I am taking my first steps with Dr.Watson. Any words of wisdom to share? Here is a question: When using @tagsave, I am saving and committing at the same time. But its utility depends on me making sure that the source co…

---

## [Questions related to DrWatson](https://discourse.julialang.org/t/questions-related-to-drwatson/53481)

<div class="topic-metadata">

**Author:** [@dapz](https://discourse.julialang.org/u/dapz)\
**Replies:** 0\
**Last updated:** [January 17, 2021, 11:57am UTC](https://discourse.julialang.org/t/questions-related-to-drwatson/53481 "2021-01-17T11:57:44Z")

</div>

Hi, I just discovered the DrWatson package and I’m curious to see if I could use that in the future (to replace my “custom” package, which works OK until now but is not really clean/documented/extensible… :D). With my p…

---

## [Is there a built-in function for the natural length of a segment represented by an iterator?](https://discourse.julialang.org/t/is-there-a-built-in-function-for-the-natural-length-of-a-segment-represented-by-an-iterator/112414)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 12\
**Last updated:** [April 4, 2024, 10:26am UTC](https://discourse.julialang.org/t/is-there-a-built-in-function-for-the-natural-length-of-a-segment-represented-by-an-iterator/112414 "2024-04-04T10:26:09Z")

</div>

Well, it’s rather simple, but maybe there is already a built-in function to do calculate this? natural\_length(s) = s\[end\]-s\[begin\] natural\_length((1,10)) natural\_length((1:10)) It annoying to copy-paste this snippet w…

---

## [How to define parameters of a model built by Lux.jl in ModelingToolkit.jl and perform optimization or computation?](https://discourse.julialang.org/t/how-to-define-parameters-of-a-model-built-by-lux-jl-in-modelingtoolkit-jl-and-perform-optimization-or-computation/112631)

<div class="topic-metadata">

**Author:** [@chooron](https://discourse.julialang.org/u/chooron)\
**Replies:** 2\
**Last updated:** [April 7, 2024, 12:40pm UTC](https://discourse.julialang.org/t/how-to-define-parameters-of-a-model-built-by-lux-jl-in-modelingtoolkit-jl-and-perform-optimization-or-computation/112631 "2024-04-07T12:40:11Z")

</div>

I’ve just started using ModelingToolkit.jl recently, but I would like to describe and compute an ODE problem with a neural network model using ModelingToolkit.jl. I would like to start by testing the feasibility of this…

---

## [Parameters optimization with pinns of a RC model](https://discourse.julialang.org/t/parameters-optimization-with-pinns-of-a-rc-model/104019)

<div class="topic-metadata">

**Author:** [@Marco\_Nesta](https://discourse.julialang.org/u/Marco_Nesta)\
**Replies:** 14\
**Last updated:** [April 7, 2024, 12:16pm UTC](https://discourse.julialang.org/t/parameters-optimization-with-pinns-of-a-rc-model/104019 "2024-04-07T12:16:11Z")

</div>

I’m trying to optimize the parameters of this first state of a rc model using NeuralPDE but I get error. what am I doing wrong? using NeuralPDE, Lux, ModelingToolkit, Optimization, OptimizationOptimJL, OrdinaryDiffEq, …

---

## [I found a bug in SafeREPL the function round does not work!](https://discourse.julialang.org/t/i-found-a-bug-in-saferepl-the-function-round-does-not-work/112596)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 7\
**Last updated:** [April 7, 2024, 2:39am UTC](https://discourse.julialang.org/t/i-found-a-bug-in-saferepl-the-function-round-does-not-work/112596 "2024-04-07T02:39:02Z")

</div>

\_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_ \_ \_| |\_ \_\_ \_ | Type "?" for help, "\]?" for Pkg help. | | | | | | |/ \_\` | | | | |\_| | | | (\_| |…

---

## [installing JuliaFEM correctly?](https://discourse.julialang.org/t/installing-juliafem-correctly/18522)

<div class="topic-metadata">

**Author:** [@gingerale](https://discourse.julialang.org/u/gingerale)\
**Replies:** 9\
**Last updated:** [April 5, 2024, 6:08pm UTC](https://discourse.julialang.org/t/installing-juliafem-correctly/18522 "2024-04-05T18:08:02Z")

</div>

Happy Monday, I was looking for a less memory intensive alternative (compared to julia fenics) for doing finite element method, so I wanted to try JuliaFEM. As Navier Strokes is not a predefined problem I wanted to defi…

---

## [Dot products: a'b or a'\*b](https://discourse.julialang.org/t/dot-products-ab-or-a-b/112572)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 2\
**Last updated:** [April 5, 2024, 3:49pm UTC](https://discourse.julialang.org/t/dot-products-ab-or-a-b/112572 "2024-04-05T15:49:08Z")

</div>

If I run a=randn(10^8) b=randn(10^8) @time s=a'b the time it takes is 0.129 seconds and it says (22.98 k allocations: 1.613 MiB, 31.73% compilation time) 74.59337300358766. If in the last step I say @time s=a'\*b I …

---

## [Julia in VS Code](https://discourse.julialang.org/t/julia-in-vs-code/112546)

<div class="topic-metadata">

**Author:** [@maggiwu](https://discourse.julialang.org/u/maggiwu)\
**Replies:** 5\
**Last updated:** [April 5, 2024, 10:27am UTC](https://discourse.julialang.org/t/julia-in-vs-code/112546 "2024-04-05T10:27:38Z")

</div>

Im trying to run a Julia Script in VS Code - However, it doesnt work as this error message appears “Could not start the Julia language server. Make sure the julia.executablePath setting is valid.” I dont know why its no…

---

## [Matlab's matmul much faster than julia's](https://discourse.julialang.org/t/matlabs-matmul-much-faster-than-julias/112476)

<div class="topic-metadata">

**Author:** [@yhuang](https://discourse.julialang.org/u/yhuang)\
**Replies:** 6\
**Last updated:** [April 5, 2024, 6:54am UTC](https://discourse.julialang.org/t/matlabs-matmul-much-faster-than-julias/112476 "2024-04-05T06:54:34Z")

</div>

Hey, I observed that on my machine matlab’s matmul faster than julia’s. I am quite confused since it seems I have already aligned all the different factors. Here is a minimal working example. Julia code: using MKL us…

---

## [Gridap function list and explanations](https://discourse.julialang.org/t/gridap-function-list-and-explanations/112559)

<div class="topic-metadata">

**Author:** [@Mishal](https://discourse.julialang.org/u/Mishal)\
**Replies:** 0\
**Last updated:** [April 5, 2024, 6:23am UTC](https://discourse.julialang.org/t/gridap-function-list-and-explanations/112559 "2024-04-05T06:23:16Z")

</div>

Hi Guys Does anyone know a good source which explains the Gridap functions? In the below link many of the functions do not have explanations and it is sometimes hard to follow with the examples. Gridap Functions TestF…

---

## [Code Organization](https://discourse.julialang.org/t/code-organization/112314)

<div class="topic-metadata">

**Author:** [@lancejnelson](https://discourse.julialang.org/u/lancejnelson)\
**Replies:** 20\
**Last updated:** [April 5, 2024, 1:24am UTC](https://discourse.julialang.org/t/code-organization/112314 "2024-04-05T01:24:39Z")

</div>

I’m having a really hard time finding a code structure that works for me. I’m building a pretty big library of interatomic potentials. I’ve broken the code up into several files: One for each of the following sets of t…

---

## [How to transpose Matrix{Any} that contains strings?](https://discourse.julialang.org/t/how-to-transpose-matrix-any-that-contains-strings/112514)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 3\
**Last updated:** [April 4, 2024, 11:24am UTC](https://discourse.julialang.org/t/how-to-transpose-matrix-any-that-contains-strings/112514 "2024-04-04T11:24:16Z")

</div>

How to transpose Matrix{Any} that contains strings? The obvious way doesn’t work: transpose(\["aoeu", 2\]) 1×2 transpose(::Vector{Any}) with eltype Any: Error showing value of type LinearAlgebra.Transpose{Any, Vector{Any}…

---

## [Using MKL, MKLSparse causes error](https://discourse.julialang.org/t/using-mkl-mklsparse-causes-error/112443)

<div class="topic-metadata">

**Author:** [@yhuang](https://discourse.julialang.org/u/yhuang)\
**Replies:** 1\
**Last updated:** [April 4, 2024, 12:10am UTC](https://discourse.julialang.org/t/using-mkl-mklsparse-causes-error/112443 "2024-04-04T00:10:28Z")

</div>

Hi, I noticed that using MKL and MKLSparse together gives me an error. Here is one example: using MKL using LinearAlgebra using SparseArrays using MKLSparse using BenchmarkTools @show BLAS.get\_config() BLAS.set\_num\_…

---

## [REPL development vs script file paths](https://discourse.julialang.org/t/repl-development-vs-script-file-paths/112435)

<div class="topic-metadata">

**Author:** [@ruairidh](https://discourse.julialang.org/u/ruairidh)\
**Replies:** 3\
**Last updated:** [April 3, 2024, 6:07pm UTC](https://discourse.julialang.org/t/repl-development-vs-script-file-paths/112435 "2024-04-03T18:07:07Z")

</div>

I’ve never worked out how to deal with the following situation where I’m developing a script which includes some other files in the REPL, but I also want the LSP to recognise any included functions. Problem . ├── script…

---

## [How to add groups for group distribution plot?](https://discourse.julialang.org/t/how-to-add-groups-for-group-distribution-plot/112119)

<div class="topic-metadata">

**Author:** [@faizanazar](https://discourse.julialang.org/u/faizanazar)\
**Replies:** 4\
**Last updated:** [April 3, 2024, 3:53pm UTC](https://discourse.julialang.org/t/how-to-add-groups-for-group-distribution-plot/112119 "2024-04-03T15:53:53Z")

</div>

Hello ! I am new to julia programming language and I am trying to do tutorial for group distribution plot as mentioned in the script but everytime I am getting an error of UndefVarError: SolventGroup not defined Stackt…

---

## [Error message report](https://discourse.julialang.org/t/error-message-report/112047)

<div class="topic-metadata">

**Author:** [@Andromeda258](https://discourse.julialang.org/u/Andromeda258)\
**Replies:** 11\
**Last updated:** [April 3, 2024, 2:52pm UTC](https://discourse.julialang.org/t/error-message-report/112047 "2024-04-03T14:52:54Z")

</div>

I am encountering a program crash with the following error message: Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks. Exception: EXCEPTION\_AC…

---

## [Failure to add package Gmsh](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652)

<div class="topic-metadata">

**Author:** [@egcjm](https://discourse.julialang.org/u/egcjm)\
**Replies:** 9\
**Last updated:** [April 3, 2024, 9:49am UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652 "2024-04-03T09:49:22Z")

</div>

I fail to install package Gmsh. After Pkg.add(“Gmsh”), using Gmsh and Pkg.build(“Gmsh”) produce the errors below. I am an administrator on my Windows 10 environment running Julia 1.2 yet Pkg.build command seems to thi…

---

## [Why does Pluto crash on loading a certain package?](https://discourse.julialang.org/t/why-does-pluto-crash-on-loading-a-certain-package/111540)

<div class="topic-metadata">

**Author:** [@user23804985096787](https://discourse.julialang.org/u/user23804985096787)\
**Replies:** 4\
**Last updated:** [April 2, 2024, 9:07pm UTC](https://discourse.julialang.org/t/why-does-pluto-crash-on-loading-a-certain-package/111540 "2024-04-02T21:07:12Z")

</div>

When I use the Julia REPL or load a regular julia file from the command line, I can do something like using SomePackage and it will load in a matter of seconds if the package is already installed. However, when I launch …

---

## [Convert value type of dictionary](https://discourse.julialang.org/t/convert-value-type-of-dictionary/67419)

<div class="topic-metadata">

**Author:** [@Mastomaki](https://discourse.julialang.org/u/Mastomaki)\
**Replies:** 4\
**Last updated:** [April 1, 2024, 8:03pm UTC](https://discourse.julialang.org/t/convert-value-type-of-dictionary/67419 "2024-04-01T20:03:06Z")

</div>

Hello! How would I convert Dict{String,String} to Dict{String,Float}? I have got this far so that I can convert the values: map(v-\>parse(Float64,v),values(mydict)) But how can I match these with the original keys and …

---

## [Deforming an image according to a matrix of displacements](https://discourse.julialang.org/t/deforming-an-image-according-to-a-matrix-of-displacements/112295)

<div class="topic-metadata">

**Author:** [@JonathanH](https://discourse.julialang.org/u/JonathanH)\
**Replies:** 6\
**Last updated:** [April 1, 2024, 12:33pm UTC](https://discourse.julialang.org/t/deforming-an-image-according-to-a-matrix-of-displacements/112295 "2024-04-01T12:33:57Z")

</div>

Hi, I’m struggling to do the following in Julia: I have an image and a corresponding matrix of 2D translations at each pixel location. I would like to warp the image according to this transformation and fill with 0 at di…

---

## [Approach to iterative functions in julia?](https://discourse.julialang.org/t/approach-to-iterative-functions-in-julia/112369)

<div class="topic-metadata">

**Author:** [@corpserot](https://discourse.julialang.org/u/corpserot)\
**Replies:** 3\
**Last updated:** [April 1, 2024, 8:30am UTC](https://discourse.julialang.org/t/approach-to-iterative-functions-in-julia/112369 "2024-04-01T08:30:36Z")

</div>

Hello, I’ve just spent yesterday learning Julia and it’s been a blast! Previously, I used Python and Lua for quick projects. In those languages, I used iterative functions (or generators) but I’m having a hard time figur…

---

## [Hard crash using @spawn instead of @async](https://discourse.julialang.org/t/hard-crash-using-spawn-instead-of-async/112209)

<div class="topic-metadata">

**Author:** [@oscarvdvelde](https://discourse.julialang.org/u/oscarvdvelde)\
**Replies:** 7\
**Last updated:** [April 1, 2024, 5:18am UTC](https://discourse.julialang.org/t/hard-crash-using-spawn-instead-of-async/112209 "2024-04-01T05:18:02Z")

</div>

I am trying to modify a function that currently works fine with @async, but by manually feeding it batches (4 hours) to generate about as many processes as I have available threads (on this Linux server, 32). I am changi…

---

## [Understanding Pkg.add() and Environments](https://discourse.julialang.org/t/understanding-pkg-add-and-environments/112313)

<div class="topic-metadata">

**Author:** [@JacobC](https://discourse.julialang.org/u/JacobC)\
**Replies:** 9\
**Last updated:** [March 31, 2024, 7:25am UTC](https://discourse.julialang.org/t/understanding-pkg-add-and-environments/112313 "2024-03-31T07:25:06Z")

</div>

TLDR: When I add a package Julia installs the package and any dependencies (expected), then it says Precompiling project and appears to go through every package that I have ever used and spends a lot of time compiling ev…

---

## [Efficient way to calculate the trace distance](https://discourse.julialang.org/t/efficient-way-to-calculate-the-trace-distance/112343)

<div class="topic-metadata">

**Author:** [@jiyashxi](https://discourse.julialang.org/u/jiyashxi)\
**Replies:** 1\
**Last updated:** [March 31, 2024, 4:49am UTC](https://discourse.julialang.org/t/efficient-way-to-calculate-the-trace-distance/112343 "2024-03-31T04:49:06Z")

</div>

Hi, I am trying to calculate the trace distance of two matrices, which is defined as in trace distance. I noticed that Julia provides opnorm function but it seems that this is not what I want. I wonder if there is some …

---

## [Gradients of strain](https://discourse.julialang.org/t/gradients-of-strain/112344)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 0\
**Last updated:** [March 31, 2024, 4:09am UTC](https://discourse.julialang.org/t/gradients-of-strain/112344 "2024-03-31T04:09:37Z")

</div>

HI, I want to take the derivative of strain with respect to displacement without using the the shape functions and find the gradients in cells in gridap (I can not figure out this derivative mathematically). I used this…

---

## [AoG plotting: column name :x not found in data frame](https://discourse.julialang.org/t/aog-plotting-column-name-x-not-found-in-data-frame/112248)

<div class="topic-metadata">

**Author:** [@shrdlu](https://discourse.julialang.org/u/shrdlu)\
**Replies:** 5\
**Last updated:** [March 30, 2024, 9:14am UTC](https://discourse.julialang.org/t/aog-plotting-column-name-x-not-found-in-data-frame/112248 "2024-03-30T09:14:47Z")

</div>

Hi, I’m trying the AlgebraOfGraphics page demo for heatmap-style visualization (Visual · Algebra of Graphics) using my own local data. I have no issues importing the external .tsv matrix file, but the process throws an…

---

## [Best data structure for recursive functions?](https://discourse.julialang.org/t/best-data-structure-for-recursive-functions/112289)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 6\
**Last updated:** [March 29, 2024, 11:26pm UTC](https://discourse.julialang.org/t/best-data-structure-for-recursive-functions/112289 "2024-03-29T23:26:51Z")

</div>

Hi Hope everyone is having a good friday. Suppose a function tests for an initial condition prior to running an inner function on elements of a series of datasets. If the initial condition fails, the function skips to …

---

## [Update package](https://discourse.julialang.org/t/update-package/112227)

<div class="topic-metadata">

**Author:** [@KianH](https://discourse.julialang.org/u/KianH)\
**Replies:** 7\
**Last updated:** [March 29, 2024, 5:18pm UTC](https://discourse.julialang.org/t/update-package/112227 "2024-03-29T17:18:14Z")

</div>

Hello! I am trying to update my Julia packages. I am working with Julia v1.10 and when I try to update the packages, the package version does not change. This seems to only be a problem for some packages and not all pac…

---

## [Macros not evaluating as per expectation](https://discourse.julialang.org/t/macros-not-evaluating-as-per-expectation/112252)

<div class="topic-metadata">

**Author:** [@kishaloy](https://discourse.julialang.org/u/kishaloy)\
**Replies:** 12\
**Last updated:** [March 29, 2024, 11:21am UTC](https://discourse.julialang.org/t/macros-not-evaluating-as-per-expectation/112252 "2024-03-29T11:21:01Z")

</div>

I am facing a problem in understanding why my macro works the way it does. I have the following macro macro create\_m(m) y = :(a + b \* c + 1) y.args\[3\].args\[2\] = :(2 \* $m) dxr = m global dxy = 2 \* m …

[Previous page](https://discourse.julialang.org/c/first-steps/8.md?page=48)

[Next page](https://discourse.julialang.org/c/first-steps/8.md?page=50)
