# Latest

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

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

**Page:** 1047

---

## [Generate a list of functions](https://discourse.julialang.org/t/generate-a-list-of-functions/80691)

<div class="topic-metadata">

**Author:** [@zhaiyusci](https://discourse.julialang.org/u/zhaiyusci)\
**Replies:** 11\
**Last updated:** [May 9, 2022, 7:05am UTC](https://discourse.julialang.org/t/generate-a-list-of-functions/80691 "2022-05-09T07:05:51Z")

</div>

Hello everyone! I want to generate a list of functions, and run into some unexpected behaviour. # Case 1: using anonymous functions fs=\[\] for i in 1:3 f=()-\>i push!(fs,f) end @show \[p() for p in fs\] # Case 2: …

---

## [Apply function By Row without re-stating column names](https://discourse.julialang.org/t/apply-function-by-row-without-re-stating-column-names/65765)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 36\
**Last updated:** [May 9, 2022, 7:01am UTC](https://discourse.julialang.org/t/apply-function-by-row-without-re-stating-column-names/65765 "2022-05-09T07:01:22Z")

</div>

I’d like to apply a function to each row of a DataFrame and have it add columns based on the output names. I would use transform-ByRow but I’d like to avoid restating the column names on input and output. Is there anythi…

---

## [Optim.jl : first-order (and second-order) optimization without providing an objective function](https://discourse.julialang.org/t/optim-jl-first-order-and-second-order-optimization-without-providing-an-objective-function/80677)

<div class="topic-metadata">

**Author:** [@Rodrigue](https://discourse.julialang.org/u/Rodrigue)\
**Replies:** 13\
**Last updated:** [May 9, 2022, 6:24am UTC](https://discourse.julialang.org/t/optim-jl-first-order-and-second-order-optimization-without-providing-an-objective-function/80677 "2022-05-09T06:24:53Z")

</div>

Hi — I want to use the Optim.jl package to minimize some function. Say the gradient of my objective is “easy” to approximate using some additional procedure. Now, when appealing to first-order methods like gradient desce…

---

## [Changing precision for a dual number calculation with ForwardDiff](https://discourse.julialang.org/t/changing-precision-for-a-dual-number-calculation-with-forwarddiff/80723)

<div class="topic-metadata">

**Author:** [@andrew\_s](https://discourse.julialang.org/u/andrew_s)\
**Replies:** 3\
**Last updated:** [May 9, 2022, 5:37am UTC](https://discourse.julialang.org/t/changing-precision-for-a-dual-number-calculation-with-forwarddiff/80723 "2022-05-09T05:37:17Z")

</div>

I am relatively new to Julia, but have a lot of experience with modern Fortran. I am minimising an objective function, and I wish to use ForwardDiff.jl to calculate the derivatives. The issue is that there is one calcula…

---

## [Add reference lines to plot in VegaLite.jl](https://discourse.julialang.org/t/add-reference-lines-to-plot-in-vegalite-jl/80515)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 2\
**Last updated:** [May 9, 2022, 12:02am UTC](https://discourse.julialang.org/t/add-reference-lines-to-plot-in-vegalite-jl/80515 "2022-05-09T00:02:49Z")

</div>

I’m trying to add 2 reference horizontal lines to this plot, but my attempt doesn’t extend the lines to the y-axis, which is what I want. Any suggestions? using DataFrames using VegaLite df = DataFrame(m = 1:5, ll=21:2…

---

## [Cross-referencing a function from a submodule defined later](https://discourse.julialang.org/t/cross-referencing-a-function-from-a-submodule-defined-later/80597)

<div class="topic-metadata">

**Author:** [@theogf](https://discourse.julialang.org/u/theogf)\
**Replies:** 1\
**Last updated:** [May 8, 2022, 10:58pm UTC](https://discourse.julialang.org/t/cross-referencing-a-function-from-a-submodule-defined-later/80597 "2022-05-08T22:58:35Z")

</div>

I want to cross ref a function defined in a later submodule. Here is an example: module A """ \[\`foo\`\](@ref) """ module B end module C """ foo """ function foo end end end This SO answer suggests that foo should be im…

---

## [How about to simplify the factorial function name?](https://discourse.julialang.org/t/how-about-to-simplify-the-factorial-function-name/80715)

<div class="topic-metadata">

**Author:** [@zhiyuanzhai](https://discourse.julialang.org/u/zhiyuanzhai)\
**Replies:** 18\
**Last updated:** [May 8, 2022, 10:51pm UTC](https://discourse.julialang.org/t/how-about-to-simplify-the-factorial-function-name/80715 "2022-05-08T22:51:49Z")

</div>

Recently I found it quite complicated to call the function factorial(). I feel it too long for such a function that is so frequently used in some situations. Can we make it simpler? Like !(n) (I found that the operator ! …

---

## [How to "force" a Pluto recalculation](https://discourse.julialang.org/t/how-to-force-a-pluto-recalculation/80532)

<div class="topic-metadata">

**Author:** [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Replies:** 6\
**Last updated:** [May 8, 2022, 8:47pm UTC](https://discourse.julialang.org/t/how-to-force-a-pluto-recalculation/80532 "2022-05-08T20:47:22Z")

</div>

Hello It would help me to “force” a recalculation of a Pluto Notebook. This is simply because I use the PrettyTables.jl package. It displays dataframes as “old fashion” tables. It makes uses of ENV\[“LINES”\] to det…

---

## [Does Julia's Linux platform support ever call syscalls directly?](https://discourse.julialang.org/t/does-julias-linux-platform-support-ever-call-syscalls-directly/80718)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 6\
**Last updated:** [May 8, 2022, 8:35pm UTC](https://discourse.julialang.org/t/does-julias-linux-platform-support-ever-call-syscalls-directly/80718 "2022-05-08T20:35:38Z")

</div>

I’m curious about whether Julia’s (or stdlib) Linux-specific parts ever call syscalls directly (without libc involvement)? Does Linux specific code even exist in the implementation of Julia or its stdlib?

---

## [Shadow Base name in REPL](https://discourse.julialang.org/t/shadow-base-name-in-repl/80719)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 1\
**Last updated:** [May 8, 2022, 8:16pm UTC](https://discourse.julialang.org/t/shadow-base-name-in-repl/80719 "2022-05-08T20:16:53Z")

</div>

Inspired by How about to simplify the factorial function name? - #15 by cormullion. Say I want to define !(x) = factorial(x). I can do that in a module julia\> baremodule M import Base !(x) = Base.factoria…

---

## [Logging training loss in Flux](https://discourse.julialang.org/t/logging-training-loss-in-flux/80689)

<div class="topic-metadata">

**Author:** [@bhaveshshrimali](https://discourse.julialang.org/u/bhaveshshrimali)\
**Replies:** 3\
**Last updated:** [May 8, 2022, 2:37pm UTC](https://discourse.julialang.org/t/logging-training-loss-in-flux/80689 "2022-05-08T14:37:23Z")

</div>

Hi all, I had a quick question – seemingly trivial but haven’t managed to figure it out after an hour of trying… What’s the best way to log the training loss and ouput say to a simple text file for visualization using …

---

## [Initializing an empty array in an inner constructor with new](https://discourse.julialang.org/t/initializing-an-empty-array-in-an-inner-constructor-with-new/80705)

<div class="topic-metadata">

**Author:** [@Atiyah](https://discourse.julialang.org/u/Atiyah)\
**Replies:** 11\
**Last updated:** [May 8, 2022, 1:56pm UTC](https://discourse.julialang.org/t/initializing-an-empty-array-in-an-inner-constructor-with-new/80705 "2022-05-08T13:56:33Z")

</div>

Consider the following struct MyAType julia\> abstract type AbstractType end julia\> mutable struct MyAType \<: AbstractType a::Int64 end When having an Array field of type MyAType in a struct, it can be…

---

## [Code running on local Julia, but failing on CI tests with Ububtu\_latest and Windows\_latest](https://discourse.julialang.org/t/code-running-on-local-julia-but-failing-on-ci-tests-with-ububtu-latest-and-windows-latest/80638)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 5\
**Last updated:** [May 8, 2022, 1:15pm UTC](https://discourse.julialang.org/t/code-running-on-local-julia-but-failing-on-ci-tests-with-ububtu-latest-and-windows-latest/80638 "2022-05-08T13:15:33Z")

</div>

The following code is running correctly on my machine using LinearAlgebra using ApproxFun Af = Fun(t -\> \[0 1; -10\*cos(t) -24-10\*sin(t)\],Fourier(0..2π)); D = Derivative(domain(Af)); ND = \[D 0I; 0I D\]; Aop = Af - ND; NA =…

---

## [DiffEq.jl What solver was used](https://discourse.julialang.org/t/diffeq-jl-what-solver-was-used/80706)

<div class="topic-metadata">

**Author:** [@Siempie](https://discourse.julialang.org/u/Siempie)\
**Replies:** 2\
**Last updated:** [May 8, 2022, 12:46pm UTC](https://discourse.julialang.org/t/diffeq-jl-what-solver-was-used/80706 "2022-05-08T12:46:33Z")

</div>

When you do not specify which solver should be used DiffEq.jl has a method for choosing which solver to use. I want to know which solver was used after solving. How can i found out what solver was chosen?

---

## [Import a module only when needed](https://discourse.julialang.org/t/import-a-module-only-when-needed/80654)

<div class="topic-metadata">

**Author:** [@CarloLucibello](https://discourse.julialang.org/u/CarloLucibello)\
**Replies:** 5\
**Last updated:** [May 8, 2022, 11:34am UTC](https://discourse.julialang.org/t/import-a-module-only-when-needed/80654 "2022-05-08T11:34:04Z")

</div>

As a strategy for reducing using SomePkg latency, is it possible for a package to import a module in a lazy way, only when some functionality is required? Something similar to what Requires.jl, but where the user doesn’…

---

## [HMAC\_SHA256 not matching in Julia and python](https://discourse.julialang.org/t/hmac-sha256-not-matching-in-julia-and-python/73873)

<div class="topic-metadata">

**Author:** [@AMJ](https://discourse.julialang.org/u/AMJ)\
**Replies:** 4\
**Last updated:** [May 8, 2022, 11:28am UTC](https://discourse.julialang.org/t/hmac-sha256-not-matching-in-julia-and-python/73873 "2022-05-08T11:28:08Z")

</div>

I have to encode a pass phrase with a “api secret” in SHA256 then base encode64 and send it to the rest api server but I can not manage to match what I get out of python with Julia. This is the python code import hmac …

---

## [Chipping in on pushfirst/popfirst](https://discourse.julialang.org/t/chipping-in-on-pushfirst-popfirst/80704)

<div class="topic-metadata">

**Author:** [@martin.auer](https://discourse.julialang.org/u/martin.auer)\
**Replies:** 2\
**Last updated:** [May 8, 2022, 11:22am UTC](https://discourse.julialang.org/t/chipping-in-on-pushfirst-popfirst/80704 "2022-05-08T11:22:56Z")

</div>

(First-time poster here and new to Julia; adoring the language’s patent elegance and the community’s drive!) I wanted to chip in a few thoughts on the naming of “pushfirst!”/“popfirst!”. This convention was agreed to af…

---

## [Including a Julia model in Simulink](https://discourse.julialang.org/t/including-a-julia-model-in-simulink/80627)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 16\
**Last updated:** [May 8, 2022, 4:50am UTC](https://discourse.julialang.org/t/including-a-julia-model-in-simulink/80627 "2022-05-08T04:50:57Z")

</div>

I wrote a nice dynamic model in Julia (https://github.com/ufechner7/KiteModels.jl) and now get the request to include it in Simulink because some people prefer to do control design with Simulink. Any idea what would be t…

---

## [New and overwhelmed!](https://discourse.julialang.org/t/new-and-overwhelmed/80686)

<div class="topic-metadata">

**Author:** [@skypuppy](https://discourse.julialang.org/u/skypuppy)\
**Replies:** 5\
**Last updated:** [May 8, 2022, 2:47am UTC](https://discourse.julialang.org/t/new-and-overwhelmed/80686 "2022-05-08T02:47:35Z")

</div>

I’ve only been programming since 1977, and have learned several computer languages over the \[task lists\]. :slight\_smile: The more I study Julia, to begin writing code in it, the more and more complex (meaning capabilit…

---

## [Pluto widget for viewing Flux / FluxTraining progress?](https://discourse.julialang.org/t/pluto-widget-for-viewing-flux-fluxtraining-progress/80393)

<div class="topic-metadata">

**Author:** [@maxeonyx](https://discourse.julialang.org/u/maxeonyx)\
**Replies:** 12\
**Last updated:** [May 8, 2022, 1:43am UTC](https://discourse.julialang.org/t/pluto-widget-for-viewing-flux-fluxtraining-progress/80393 "2022-05-08T01:43:25Z")

</div>

Does anyone know if there’s a rich formatter for showing the progress of training in Pluto when training models using Flux or FluxTraining? I’d quite like to use this if it exists. The current UX for training inside a n…

---

## [How do I make an histogram with no vertical edges between bars in Plots.jl?](https://discourse.julialang.org/t/how-do-i-make-an-histogram-with-no-vertical-edges-between-bars-in-plots-jl/80671)

<div class="topic-metadata">

**Author:** [@ultrapoci](https://discourse.julialang.org/u/ultrapoci)\
**Replies:** 2\
**Last updated:** [May 7, 2022, 9:12pm UTC](https://discourse.julialang.org/t/how-do-i-make-an-histogram-with-no-vertical-edges-between-bars-in-plots-jl/80671 "2022-05-07T21:12:49Z")

</div>

I would like to make an histogram like this one: but I don’t know how to do it. I can set the fillalpha option to zero to have empty bars, but the vertical edges remain: And if I set linecolor to :transparent, the…

---

## [How does Experimental.@force\_compile work?](https://discourse.julialang.org/t/how-does-experimental-force-compile-work/80681)

<div class="topic-metadata">

**Author:** [@xlxs4](https://discourse.julialang.org/u/xlxs4)\
**Replies:** 0\
**Last updated:** [May 7, 2022, 9:00pm UTC](https://discourse.julialang.org/t/how-does-experimental-force-compile-work/80681 "2022-05-07T21:00:31Z")

</div>

So I was playing around with @edit: @edit @time exp(1) In the definition of the time macro, timing.jl, line 216: while false; end # compiler heuristic: compile this block (alter this if the heuristic changes) I follo…

---

## [Installing Packages Julia v1.7.2](https://discourse.julialang.org/t/installing-packages-julia-v1-7-2/80678)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 1\
**Last updated:** [May 7, 2022, 8:06pm UTC](https://discourse.julialang.org/t/installing-packages-julia-v1-7-2/80678 "2022-05-07T20:06:21Z")

</div>

Dear all, I m a new user of Julia Language. I have installed Julia 1.7.2 and Atom. However, when I run Julia, the following credentials of Github are requested to install the initial packages: Updating git-repo \`ht…

---

## [Embedding pkg SatelliteToolbox in a Cpp software](https://discourse.julialang.org/t/embedding-pkg-satellitetoolbox-in-a-cpp-software/80679)

<div class="topic-metadata">

**Author:** [@guitarti87](https://discourse.julialang.org/u/guitarti87)\
**Replies:** 2\
**Last updated:** [May 7, 2022, 7:55pm UTC](https://discourse.julialang.org/t/embedding-pkg-satellitetoolbox-in-a-cpp-software/80679 "2022-05-07T19:55:33Z")

</div>

Hello all, I am wondering if anyone could help me. I am new to Julia language and it is being quiete difficult to understand how to embed julia in a cpp code. What I am trying is to use the pkg SatelliteToolbox from ju…

---

## [Create matrix from two vectors](https://discourse.julialang.org/t/create-matrix-from-two-vectors/80651)

<div class="topic-metadata">

**Author:** [@paradoxical-rhapsody](https://discourse.julialang.org/u/paradoxical-rhapsody)\
**Replies:** 6\
**Last updated:** [May 7, 2022, 7:12pm UTC](https://discourse.julialang.org/t/create-matrix-from-two-vectors/80651 "2022-05-07T19:12:25Z")

</div>

After defining a bivariate function f(x::Int, y::Int) , how can I get a matrix A = ( f(a\[i\], b\[j\]) ) using two vector a and b . For example, let a = \[1, 2\] , b = \[1, 2, 3\] and f(x, y) = x + y , the desirble result shoul…

---

## [Mapping polygon or mesh data from array input for satellite swaths](https://discourse.julialang.org/t/mapping-polygon-or-mesh-data-from-array-input-for-satellite-swaths/80568)

<div class="topic-metadata">

**Author:** [@haffner](https://discourse.julialang.org/u/haffner)\
**Replies:** 10\
**Last updated:** [May 7, 2022, 6:21pm UTC](https://discourse.julialang.org/t/mapping-polygon-or-mesh-data-from-array-input-for-satellite-swaths/80568 "2022-05-07T18:21:44Z")

</div>

I am new to Julia and work on satellite remote sensing of the atmosphere and ocean. I am looking for some advice on mapping point and polygon (vector) data in geographic coordinates using Julia. I produce relatively co…

---

## [Stuck trying to register updates](https://discourse.julialang.org/t/stuck-trying-to-register-updates/80673)

<div class="topic-metadata">

**Author:** [@Rratic](https://discourse.julialang.org/u/Rratic)\
**Replies:** 2\
**Last updated:** [May 7, 2022, 5:33pm UTC](https://discourse.julialang.org/t/stuck-trying-to-register-updates/80673 "2022-05-07T17:33:16Z")

</div>

guys, this is the situation: when I first registered, the version was 1.0.0-alpha, which might be a little strange I tried 1.0.0 pull but it didn’t tell me the reason it failed to merge, and I didn’t understand the ERR…

---

## [How to solve nonlinear equations?](https://discourse.julialang.org/t/how-to-solve-nonlinear-equations/80426)

<div class="topic-metadata">

**Author:** [@tugce](https://discourse.julialang.org/u/tugce)\
**Replies:** 3\
**Last updated:** [May 7, 2022, 4:11pm UTC](https://discourse.julialang.org/t/how-to-solve-nonlinear-equations/80426 "2022-05-07T16:11:00Z")

</div>

I am trying to find the y variable in this problem: H = 0.5\*(x^2+y^2)+y\*x^2-(y^3)/3. H values change between 1/20:1/2, and x values change -2:2. I tried to calculate every y value in these conditions but I couldn’t. How …

---

## [Equivalent of hyp2f1 in Julia](https://discourse.julialang.org/t/equivalent-of-hyp2f1-in-julia/80674)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [May 7, 2022, 3:22pm UTC](https://discourse.julialang.org/t/equivalent-of-hyp2f1-in-julia/80674 "2022-05-07T15:22:32Z")

</div>

I am translating some Python code to Julia that uses the SciPy function hyp2f1. What would be the equivalent function in Julia? https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.hyp2f1.html

---

## [Agents.jl: Introductory Tutorial - Error](https://discourse.julialang.org/t/agents-jl-introductory-tutorial-error/80658)

<div class="topic-metadata">

**Author:** [@Floyd\_Gartner](https://discourse.julialang.org/u/Floyd_Gartner)\
**Replies:** 6\
**Last updated:** [May 7, 2022, 3:19pm UTC](https://discourse.julialang.org/t/agents-jl-introductory-tutorial-error/80658 "2022-05-07T15:19:36Z")

</div>

Hello everybody, I’m trying to work through the Youtube Tutorial for Agents.jl (https://www.youtube.com/watch?v=fgwAfAa4kt0) but I got stuck. When I tried plotting the model it worked fine but when I tried to change th…

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

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