# New to Julia

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

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

**Page:** 33

---

## [How to do sparse row vector\*matrix?](https://discourse.julialang.org/t/how-to-do-sparse-row-vector-matrix/121166)

<div class="topic-metadata">

**Author:** [@happyxie](https://discourse.julialang.org/u/happyxie)\
**Replies:** 3\
**Last updated:** [October 11, 2024, 1:43pm UTC](https://discourse.julialang.org/t/how-to-do-sparse-row-vector-matrix/121166 "2024-10-11T13:43:41Z")

</div>

I am trying to do a row vector times a matrix but it give an adjoint type instead of a row vector? should I do (A’A\[1,:\])'? I need the results to be a vector so I can continue other calculation. Thanks. A=sparse(\[1 2;3…

---

## [Startup.jl being replaced constantly](https://discourse.julialang.org/t/startup-jl-being-replaced-constantly/121185)

<div class="topic-metadata">

**Author:** [@Gilham](https://discourse.julialang.org/u/Gilham)\
**Replies:** 2\
**Last updated:** [October 11, 2024, 12:52pm UTC](https://discourse.julialang.org/t/startup-jl-being-replaced-constantly/121185 "2024-10-11T12:52:18Z")

</div>

Hi Guys, Im hoping you could assist with an issue im having, I work at a university and I have never used Julia before so im getting a little lost. We have Julia installed for students and we had a request to have a sh…

---

## [An experimental Julia library: copyout csv from postgresql using rust and Clang.jl](https://discourse.julialang.org/t/an-experimental-julia-library-copyout-csv-from-postgresql-using-rust-and-clang-jl/121100)

<div class="topic-metadata">

**Author:** [@bluebug](https://discourse.julialang.org/u/bluebug)\
**Replies:** 3\
**Last updated:** [October 11, 2024, 7:17am UTC](https://discourse.julialang.org/t/an-experimental-julia-library-copyout-csv-from-postgresql-using-rust-and-clang-jl/121100 "2024-10-11T07:17:11Z")

</div>

copyout csv from postgresql, using rust postgres/cbindgen and Clang.jl to interop rust and julia together, without jirs. Any suggestions for sharing complex data structures from Rust to Julia? like: #\[repr(C)\] pub enum…

---

## [Missing source file for ZMQ](https://discourse.julialang.org/t/missing-source-file-for-zmq/121090)

<div class="topic-metadata">

**Author:** [@Kristijan\_Slonka](https://discourse.julialang.org/u/Kristijan_Slonka)\
**Replies:** 2\
**Last updated:** [October 10, 2024, 3:23pm UTC](https://discourse.julialang.org/t/missing-source-file-for-zmq/121090 "2024-10-10T15:23:13Z")

</div>

---

## [Detect functions that are never used](https://discourse.julialang.org/t/detect-functions-that-are-never-used/121147)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 0\
**Last updated:** [October 10, 2024, 1:36pm UTC](https://discourse.julialang.org/t/detect-functions-that-are-never-used/121147 "2024-10-10T13:36:16Z")

</div>

Hi, I’ve been writing quite some code for a project I’m working on and I’m noticing that there is quite some legacy code piling up. In particular, there are some functions that I’ve implemented at some point but that, du…

---

## [Juliaup really is magic](https://discourse.julialang.org/t/juliaup-really-is-magic/121073)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 21\
**Last updated:** [October 10, 2024, 11:57am UTC](https://discourse.julialang.org/t/juliaup-really-is-magic/121073 "2024-10-10T11:57:43Z")

</div>

I used to install Julia manually using DMG file on my M2 Mac and I used rosetta2 to emulate X86 on my macbook. Lately I switch to Apple Silicon Code Juliaup I did it by removing all traces of ~/.julia and the old x8…

---

## [Flux has no Lecun Normalization weight init function?](https://discourse.julialang.org/t/flux-has-no-lecun-normalization-weight-init-function/121109)

<div class="topic-metadata">

**Author:** [@neoa](https://discourse.julialang.org/u/neoa)\
**Replies:** 0\
**Last updated:** [October 9, 2024, 2:54pm UTC](https://discourse.julialang.org/t/flux-has-no-lecun-normalization-weight-init-function/121109 "2024-10-09T14:54:40Z")

</div>

I want to migrate from keras to Flux, but i found Flux has no Lecun Normalization init function?

---

## [Is Julia safe?](https://discourse.julialang.org/t/is-julia-safe/121006)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 12\
**Last updated:** [October 9, 2024, 7:33am UTC](https://discourse.julialang.org/t/is-julia-safe/121006 "2024-10-09T07:33:43Z")

</div>

Hello, Some programming languages ​​like Rust-Lang are secure. How about Julia? Thank you.

---

## [Compliance on displacement control model](https://discourse.julialang.org/t/compliance-on-displacement-control-model/120934)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 1\
**Last updated:** [October 7, 2024, 6:49pm UTC](https://discourse.julialang.org/t/compliance-on-displacement-control-model/120934 "2024-10-07T18:49:28Z")

</div>

Hi, I have a domain with applied displacement BC. To find the compliance I read this in a paper “due to equilibrium requirements and the use of displacement control, the components of the external force vector, f F , …

---

## [Has Julia met your need for AI and ML?](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 26\
**Last updated:** [October 7, 2024, 5:28pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818 "2024-10-07T17:28:12Z")

</div>

Hello, Has Julia met your AI and ML needs? I mean, have you ever regretted choosing Julia when doing AI and ML projects? Thank you.

---

## [Best practices for NonlinearSolve definition with temporary arrays](https://discourse.julialang.org/t/best-practices-for-nonlinearsolve-definition-with-temporary-arrays/115763)

<div class="topic-metadata">

**Author:** [@dieg0](https://discourse.julialang.org/u/dieg0)\
**Replies:** 6\
**Last updated:** [October 7, 2024, 1:01pm UTC](https://discourse.julialang.org/t/best-practices-for-nonlinearsolve-definition-with-temporary-arrays/115763 "2024-10-07T13:01:48Z")

</div>

Hi all, I am relatively new to Julia. Apologies as it’s a long one but I couldn’t find a solution. I am using NonlinearSolve.jl to solve a somewhat “complicated” system of equations g(u, p) = 0. The reason the function …

---

## [Julia interactive learning](https://discourse.julialang.org/t/julia-interactive-learning/120955)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 2\
**Last updated:** [October 6, 2024, 6:22pm UTC](https://discourse.julialang.org/t/julia-interactive-learning/120955 "2024-10-06T18:22:20Z")

</div>

Hello, Is there a site like https://try.ruby-lang.org/ to learn Julia? Thank you.

---

## [Help needed to learn Julia](https://discourse.julialang.org/t/help-needed-to-learn-julia/113783)

<div class="topic-metadata">

**Author:** [@Hassan1](https://discourse.julialang.org/u/Hassan1)\
**Replies:** 3\
**Last updated:** [October 5, 2024, 10:49am UTC](https://discourse.julialang.org/t/help-needed-to-learn-julia/113783 "2024-10-05T10:49:06Z")

</div>

Hi all I am going to start my graduate studies in energy Optimization in fall 24. With some time in hand I want to learn basics of Julia. I know about power flow and know coding in Python. Can someone suggest some refe…

---

## [I can't suppress printing of a SharedArray; I must be doing something wrong. Help?](https://discourse.julialang.org/t/i-cant-suppress-printing-of-a-sharedarray-i-must-be-doing-something-wrong-help/120876)

<div class="topic-metadata">

**Author:** [@rcorless](https://discourse.julialang.org/u/rcorless)\
**Replies:** 11\
**Last updated:** [October 5, 2024, 12:20am UTC](https://discourse.julialang.org/t/i-cant-suppress-printing-of-a-sharedarray-i-must-be-doing-something-wrong-help/120876 "2024-10-05T00:20:56Z")

</div>

I’m using Julia 1.9.3 on a Windows machine. Two lines in my file ParallelWatson.jl: N = 10^4 y = SharedArray{Float64}(N); In spite of the semicolon, the full Shared Array is printed in the output file when I issue t…

---

## [Optimizing function with vector reassignments](https://discourse.julialang.org/t/optimizing-function-with-vector-reassignments/120938)

<div class="topic-metadata">

**Author:** [@lancejnelson](https://discourse.julialang.org/u/lancejnelson)\
**Replies:** 11\
**Last updated:** [October 4, 2024, 10:05pm UTC](https://discourse.julialang.org/t/optimizing-function-with-vector-reassignments/120938 "2024-10-04T22:05:34Z")

</div>

Wanting to optimize this function and I know I have some un-needed allocations. Just wondering what the best choice is to fix a few lines: function singleAtomDistances!(distMat::Array{Float64,3},crystal::Crystal,LJ::LJ,…

---

## [When to use or not use \`reinterpret\`?](https://discourse.julialang.org/t/when-to-use-or-not-use-reinterpret/40394)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 7\
**Last updated:** [October 4, 2024, 4:33pm UTC](https://discourse.julialang.org/t/when-to-use-or-not-use-reinterpret/40394 "2024-10-04T16:33:49Z")

</div>

I reinterpret an array of bytes (UInt8) as Int64 like this dict = reinterpret(Int64, uncompressed\_data) and when I use dict via a bunch of essentially random indices like so for i in indices do\_something(dict\[i\]) en…

---

## [Contour3D does not work](https://discourse.julialang.org/t/contour3d-does-not-work/120914)

<div class="topic-metadata">

**Author:** [@NaSi](https://discourse.julialang.org/u/NaSi)\
**Replies:** 1\
**Last updated:** [October 4, 2024, 2:10pm UTC](https://discourse.julialang.org/t/contour3d-does-not-work/120914 "2024-10-04T14:10:52Z")

</div>

Hello =) I am very new to Julia… I want to make a simple contour but it doesn’t work :frowning: I alwyas have the error : ERROR: Can’t convert to a Vector. Please supply a range/vector/interval using GLMakie functio…

---

## [% of missingness per column](https://discourse.julialang.org/t/of-missingness-per-column/120888)

<div class="topic-metadata">

**Author:** [@ShakiraBabirye25](https://discourse.julialang.org/u/ShakiraBabirye25)\
**Replies:** 3\
**Last updated:** [October 4, 2024, 8:46am UTC](https://discourse.julialang.org/t/of-missingness-per-column/120888 "2024-10-04T08:46:02Z")

</div>

Hello there! How do i proceed from here (describe(df, :nmissing)) to get the % of missingness per column in my df dataframe?

---

## [LoadError: UndefVarError \`Normal\` not defined](https://discourse.julialang.org/t/loaderror-undefvarerror-normal-not-defined/120865)

<div class="topic-metadata">

**Author:** [@anon91151494](https://discourse.julialang.org/u/anon91151494)\
**Replies:** 2\
**Last updated:** [October 4, 2024, 8:26am UTC](https://discourse.julialang.org/t/loaderror-undefvarerror-normal-not-defined/120865 "2024-10-04T08:26:31Z")

</div>

The following Julia code produces the error specified in the title of this post: import Random Random.Normal(0.0, 1.0) However, the following code works: using Random Normal(0.0, 1.0) I thought that import performe…

---

## [I am new to Julia Programming](https://discourse.julialang.org/t/i-am-new-to-julia-programming/120851)

<div class="topic-metadata">

**Author:** [@SafalShrestha](https://discourse.julialang.org/u/SafalShrestha)\
**Replies:** 9\
**Last updated:** [October 4, 2024, 7:40am UTC](https://discourse.julialang.org/t/i-am-new-to-julia-programming/120851 "2024-10-04T07:40:14Z")

</div>

Someone provides me the best resources to getting started with Julia for datascience and ML.

---

## [Managing concurrent running shell tasks without a manual counter](https://discourse.julialang.org/t/managing-concurrent-running-shell-tasks-without-a-manual-counter/119712)

<div class="topic-metadata">

**Author:** [@ivoytov](https://discourse.julialang.org/u/ivoytov)\
**Replies:** 5\
**Last updated:** [October 4, 2024, 12:45am UTC](https://discourse.julialang.org/t/managing-concurrent-running-shell-tasks-without-a-manual-counter/119712 "2024-10-04T00:45:27Z")

</div>

I’m doing multi-processing in a “cheat way”, with my long running code encapsulated in a Node Puppeteer script. I’m trying to not overload the server, so have at most 12 jobs running simultaneously. I hacked this way tog…

---

## [Correct handling of LOAD\_PATH in Julia script for running with julia - -project= . .](https://discourse.julialang.org/t/correct-handling-of-load-path-in-julia-script-for-running-with-julia-project/120812)

<div class="topic-metadata">

**Author:** [@EvgenijGr](https://discourse.julialang.org/u/EvgenijGr)\
**Replies:** 8\
**Last updated:** [October 3, 2024, 5:21pm UTC](https://discourse.julialang.org/t/correct-handling-of-load-path-in-julia-script-for-running-with-julia-project/120812 "2024-10-03T17:21:29Z")

</div>

Hello, I have the following questions. Below is a MWE script that I want to run with julia --project=myLocalEnv .\\mySimpleScript.jl. What I’ve discovered is that even if the package DataFrames is not installed in myLoca…

---

## [Setting up Julia in WSL (Windows Subsystem for Linux)](https://discourse.julialang.org/t/setting-up-julia-in-wsl-windows-subsystem-for-linux/120858)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 6\
**Last updated:** [October 3, 2024, 4:48pm UTC](https://discourse.julialang.org/t/setting-up-julia-in-wsl-windows-subsystem-for-linux/120858 "2024-10-03T16:48:46Z")

</div>

Hi everyone! Does anyone know of a good step-by-step tutorial explaining how to install Julia under WSL (Windows Subsystem for Linux)? Bonus points if it could also explain how to get VSCode to work with Julia, when als…

---

## [Function to obtain the maximum value of each element of an array with a second argument of zero?](https://discourse.julialang.org/t/function-to-obtain-the-maximum-value-of-each-element-of-an-array-with-a-second-argument-of-zero/120852)

<div class="topic-metadata">

**Author:** [@anon91151494](https://discourse.julialang.org/u/anon91151494)\
**Replies:** 1\
**Last updated:** [October 3, 2024, 11:19am UTC](https://discourse.julialang.org/t/function-to-obtain-the-maximum-value-of-each-element-of-an-array-with-a-second-argument-of-zero/120852 "2024-10-03T11:19:44Z")

</div>

Is there a function in Julia which takes an array and a scalar as input and returns an array as output where the values of each element of the array are as follows: out\_i = max(input\_i, v) where v is some arbitrary sca…

---

## [Figuring out Float64 representation for Newbies](https://discourse.julialang.org/t/figuring-out-float64-representation-for-newbies/120836)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 2\
**Last updated:** [October 3, 2024, 3:39am UTC](https://discourse.julialang.org/t/figuring-out-float64-representation-for-newbies/120836 "2024-10-03T03:39:46Z")

</div>

Ever want to know how Float64 numbers are represented in the raw machine bits? I have written a julia code to show it to you. function DescribeFloat64(x::Float64;verbose=false) # Local function convert binary stri…

---

## [How to run a Julia script from the command line which has package dependencies?](https://discourse.julialang.org/t/how-to-run-a-julia-script-from-the-command-line-which-has-package-dependencies/120813)

<div class="topic-metadata">

**Author:** [@anon91151494](https://discourse.julialang.org/u/anon91151494)\
**Replies:** 4\
**Last updated:** [October 2, 2024, 3:10pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-script-from-the-command-line-which-has-package-dependencies/120813 "2024-10-02T15:10:01Z")

</div>

I’m trying to run a Julia script like an executable program from the command line. $ julia myscript.jl If this script has dependencies on packages, such as the Distributions package, how can I run such a script from th…

---

## [Can I register a package without doing unit tests? If it only has three functions and is meant to be simple](https://discourse.julialang.org/t/can-i-register-a-package-without-doing-unit-tests-if-it-only-has-three-functions-and-is-meant-to-be-simple/120803)

<div class="topic-metadata">

**Author:** [@sumant28](https://discourse.julialang.org/u/sumant28)\
**Replies:** 4\
**Last updated:** [October 2, 2024, 11:31am UTC](https://discourse.julialang.org/t/can-i-register-a-package-without-doing-unit-tests-if-it-only-has-three-functions-and-is-meant-to-be-simple/120803 "2024-10-02T11:31:05Z")

</div>

I am trying to register this package GitHub - sumant-28/AppleHealthParser.jl I don’t have a software background so unit tests have always been foreign to me. Do I test this by adding a Monte Carlo function to my main so…

---

## [Optimization question](https://discourse.julialang.org/t/optimization-question/120707)

<div class="topic-metadata">

**Author:** [@lancejnelson](https://discourse.julialang.org/u/lancejnelson)\
**Replies:** 31\
**Last updated:** [October 1, 2024, 10:14pm UTC](https://discourse.julialang.org/t/optimization-question/120707 "2024-10-01T22:14:05Z")

</div>

I’m trying to optimize the code block below: using Distributions order = 2 σ\_Priors = Array{Distribution,2}(undef,order,order) ϵ\_Priors = Array{Distribution,2}(undef,order,order) σ\_Priors\[:,:\] .= Gamma(10,0.1) ϵ\_Priors\[…

---

## [Use ⟹ instead of &&?](https://discourse.julialang.org/t/use-instead-of/120729)

<div class="topic-metadata">

**Author:** [@Sariel](https://discourse.julialang.org/u/Sariel)\
**Replies:** 12\
**Last updated:** [October 1, 2024, 6:00pm UTC](https://discourse.julialang.org/t/use-instead-of/120729 "2024-10-01T18:00:03Z")

</div>

I find the && notation a bit weird for shortening ifs - it works, but it feels like a hack. A nicer format might be: (condition) ⟹ do\_something It would be cool if there is a way to already define \\implies to do so, bu…

---

## [Save\_positions parameter in solve's callback function](https://discourse.julialang.org/t/save-positions-parameter-in-solves-callback-function/102409)

<div class="topic-metadata">

**Author:** [@yoshi](https://discourse.julialang.org/u/yoshi)\
**Replies:** 3\
**Last updated:** [August 3, 2023, 2:48am UTC](https://discourse.julialang.org/t/save-positions-parameter-in-solves-callback-function/102409 "2023-08-03T02:48:07Z")

</div>

How does the save\_positions parameter in DiscreteCallback work? In the code example provided in Event Handling and Callback Functions · DifferentialEquations.jl (second example) the following discrete callbacks are writ…

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

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