# Latest

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

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

**Page:** 289

---

## [Implementation of AND with the if statement](https://discourse.julialang.org/t/implementation-of-and-with-the-if-statement/121777)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 5\
**Last updated:** [October 30, 2024, 6:22am UTC](https://discourse.julialang.org/t/implementation-of-and-with-the-if-statement/121777 "2024-10-30T06:22:41Z")

</div>

Hello, I want to implement (h \>= 1) && (h \<= 99) with an if statement. Is it possible? Thank you.

---

## [Juliaup failing with time out](https://discourse.julialang.org/t/juliaup-failing-with-time-out/121970)

<div class="topic-metadata">

**Author:** [@screw\_dog](https://discourse.julialang.org/u/screw_dog)\
**Replies:** 1\
**Last updated:** [October 30, 2024, 3:47am UTC](https://discourse.julialang.org/t/juliaup-failing-with-time-out/121970 "2024-10-30T03:47:46Z")

</div>

I’m attempting to update to 1.11.1 on Linux but juliaup keeps timing out when trying to contact https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.1-linux-x86\_64.tar.gz Just checking if there is maintenanc…

---

## [JuMP, moi wrapper, interface problem](https://discourse.julialang.org/t/jump-moi-wrapper-interface-problem/121776)

<div class="topic-metadata">

**Author:** [@zhenweilin](https://discourse.julialang.org/u/zhenweilin)\
**Replies:** 8\
**Last updated:** [October 30, 2024, 3:11am UTC](https://discourse.julialang.org/t/jump-moi-wrapper-interface-problem/121776 "2024-10-30T03:11:55Z")

</div>

JuMP, moi wrapper, interface problem. I am currently developing an SOCP solver designed to address the following optimization problem. min\_{x=(x\_1,x\_2),l \\leq x\_1 \\leq u, x\_2\\in\\mathcal{K}}c^\\top x \\text{ s.t.}Gx-h\\in …

---

## [Genie /Project level how to fix UndefVarError: \`TodoMVC\` not defined](https://discourse.julialang.org/t/genie-project-level-how-to-fix-undefvarerror-todomvc-not-defined/121966)

<div class="topic-metadata">

**Author:** [@andreh](https://discourse.julialang.org/u/andreh)\
**Replies:** 0\
**Last updated:** [October 30, 2024, 1:02am UTC](https://discourse.julialang.org/t/genie-project-level-how-to-fix-undefvarerror-todomvc-not-defined/121966 "2024-10-30T01:02:49Z")

</div>

Hi, I am learning Julia with Genie Framework I am following the book Web-Development-with-Julia-and-Genie On Chapter 8, db/migations there is the module “GenerateFakeTodos” chapter 8-GenerateFakeTodos.jl After running…

---

## [Optimizing a puzzle from the Balatro game: discarding part of a poker hand to get a pair](https://discourse.julialang.org/t/optimizing-a-puzzle-from-the-balatro-game-discarding-part-of-a-poker-hand-to-get-a-pair/121912)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 14\
**Last updated:** [October 30, 2024, 12:55am UTC](https://discourse.julialang.org/t/optimizing-a-puzzle-from-the-balatro-game-discarding-part-of-a-poker-hand-to-get-a-pair/121912 "2024-10-30T00:55:22Z")

</div>

Interesting problem from Balatro, from a hand of 8 without any pairs, if you discard n and draw n from the remaining deck of 44 cards. What’s the optimum n to maximize your chance of obtaining at least a pair? I am sure…

---

## [Error when filtering stdlibs during app compilation](https://discourse.julialang.org/t/error-when-filtering-stdlibs-during-app-compilation/121930)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 2\
**Last updated:** [October 29, 2024, 5:11pm UTC](https://discourse.julialang.org/t/error-when-filtering-stdlibs-during-app-compilation/121930 "2024-10-29T17:11:40Z")

</div>

\- PackageCompiler: creating compiler .ji image (incremental=false) - PackageCompiler: compiling fresh sysimage (incremental=false) error during bootstrap: LoadError("/tmp/jl\_srxx2I/sysimage\_packagecompiler\_c8bc2d1a-960b-…

---

## [Scheduler errors when trying to graph agents](https://discourse.julialang.org/t/scheduler-errors-when-trying-to-graph-agents/121706)

<div class="topic-metadata">

**Author:** [@tfranks](https://discourse.julialang.org/u/tfranks)\
**Replies:** 4\
**Last updated:** [October 29, 2024, 10:35pm UTC](https://discourse.julialang.org/t/scheduler-errors-when-trying-to-graph-agents/121706 "2024-10-29T22:35:05Z")

</div>

Hello, I’ve created an agent-based model where depositor agents withdraw money from bank agents. I’m now trying to create a visual of the network by using Graphs.jl to show the banks as nodes and the depositors’ paths a…

---

## [Sampling from custom distribution: "No method matching iterate..."](https://discourse.julialang.org/t/sampling-from-custom-distribution-no-method-matching-iterate/121925)

<div class="topic-metadata">

**Author:** [@alexdmeyer](https://discourse.julialang.org/u/alexdmeyer)\
**Replies:** 5\
**Last updated:** [October 29, 2024, 10:24pm UTC](https://discourse.julialang.org/t/sampling-from-custom-distribution-no-method-matching-iterate/121925 "2024-10-29T22:24:10Z")

</div>

Hello fellow Julians, I’m trying to use a custom distribution/sampleable for inference in Turing.jl, and I’ve encountered a problem I can’t solve. Following the instructions on the Turing docs, I made the following mini…

---

## [The 'do'-keyword when it doesn't create an anonymous function and pass it as the first argument to a function call](https://discourse.julialang.org/t/the-do-keyword-when-it-doesnt-create-an-anonymous-function-and-pass-it-as-the-first-argument-to-a-function-call/94471)

<div class="topic-metadata">

**Author:** [@kingoslo](https://discourse.julialang.org/u/kingoslo)\
**Replies:** 4\
**Last updated:** [October 29, 2024, 9:54pm UTC](https://discourse.julialang.org/t/the-do-keyword-when-it-doesnt-create-an-anonymous-function-and-pass-it-as-the-first-argument-to-a-function-call/94471 "2024-10-29T21:54:59Z")

</div>

Hello there, I am trying to learn Julia, and I came by the do keyword in a setting that I do not understand. So I am asking for some help to work out what happens here. HDF5.h5open(fname, "r") do fd #= lots of stuff in…

---

## [Non-linear analysis](https://discourse.julialang.org/t/non-linear-analysis/121890)

<div class="topic-metadata">

**Author:** [@SergeantMike67](https://discourse.julialang.org/u/SergeantMike67)\
**Replies:** 18\
**Last updated:** [October 29, 2024, 9:34pm UTC](https://discourse.julialang.org/t/non-linear-analysis/121890 "2024-10-29T21:34:30Z")

</div>

Having a bit of an issue and I don’t quite know where to turn. I have insect emergence data that fits a Gompertz model quite well. Example Data Row │ ED Wasp │ Float64 Float64 ─────┼────────────────── 1 │ 14…

---

## [10x faster sortperm()](https://discourse.julialang.org/t/10x-faster-sortperm/93026)

<div class="topic-metadata">

**Author:** [@LSchwerdt](https://discourse.julialang.org/u/LSchwerdt)\
**Replies:** 10\
**Last updated:** [October 29, 2024, 8:59pm UTC](https://discourse.julialang.org/t/10x-faster-sortperm/93026 "2024-10-29T20:59:31Z")

</div>

Motivated by LilithHafner s work to add radix sorting to Julia 1.9 and the resulting performance improvements of sort(), I did some tests to see if sortperm() could be sped up as well. To test this, I implemented diffe…

---

## [Can callable structs subtype Function? Should they?](https://discourse.julialang.org/t/can-callable-structs-subtype-function-should-they/121909)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 10\
**Last updated:** [October 29, 2024, 8:36pm UTC](https://discourse.julialang.org/t/can-callable-structs-subtype-function-should-they/121909 "2024-10-29T20:36:02Z")

</div>

The docstring of Function doesn’t specify any constraints on subtypes, so I’m wondering whether it makes sense to define callable structs (functors) as \<: Function.

---

## [Argmax over columns of a large matrix](https://discourse.julialang.org/t/argmax-over-columns-of-a-large-matrix/121924)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 2\
**Last updated:** [October 29, 2024, 6:50pm UTC](https://discourse.julialang.org/t/argmax-over-columns-of-a-large-matrix/121924 "2024-10-29T18:50:52Z")

</div>

Hi there, I have a large matrix for e.g (7x10000) and I want to iterate over each of the columns and compute the index of the maximum element. There are naive ways I can think of but since this part of my code is perfor…

---

## [Relocatable Makie app](https://discourse.julialang.org/t/relocatable-makie-app/119742)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 11\
**Last updated:** [October 29, 2024, 3:44pm UTC](https://discourse.julialang.org/t/relocatable-makie-app/119742 "2024-10-29T15:44:16Z")

</div>

I want to share some results with a college so that he can have a look at the data himself. Plotly can export an HTML which is interactive, but WGLMakie can not (as far as I known). It is mainly time series charts where…

---

## [Convolutions - Computational Thinking](https://discourse.julialang.org/t/convolutions-computational-thinking/121922)

<div class="topic-metadata">

**Author:** [@elwwan](https://discourse.julialang.org/u/elwwan)\
**Replies:** 0\
**Last updated:** [October 29, 2024, 3:14pm UTC](https://discourse.julialang.org/t/convolutions-computational-thinking/121922 "2024-10-29T15:14:36Z")

</div>

Hello, I’m trying to follow the computational thinking course to learn Julia unfortunately I am stuck at question 2.2 in homework 2. This is the exercise is this : Implement a new method convolve(M, K) that applies …

---

## [Treating NaN as error: Helping debugging](https://discourse.julialang.org/t/treating-nan-as-error-helping-debugging/36933)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 19\
**Last updated:** [October 29, 2024, 3:08pm UTC](https://discourse.julialang.org/t/treating-nan-as-error-helping-debugging/36933 "2024-10-29T15:08:49Z")

</div>

I am writing a large hydrological model, and for some sets of parameters I get a NaN value, but I do not know which first function is giving me NaN. Therefore, I would like to stop my program at the first NaN. A dirty …

---

## [Problems relating to "gradient is nothing"](https://discourse.julialang.org/t/problems-relating-to-gradient-is-nothing/121879)

<div class="topic-metadata">

**Author:** [@Yaozhong\_Liu](https://discourse.julialang.org/u/Yaozhong_Liu)\
**Replies:** 11\
**Last updated:** [October 29, 2024, 2:48pm UTC](https://discourse.julialang.org/t/problems-relating-to-gradient-is-nothing/121879 "2024-10-29T14:48:31Z")

</div>

Hi, I am doing a machine learning using gradient descend # I have a set of data, called samples # I have two models: model1 and model2 global par = Flux.params(model1, model2) #wrap them in params gs = gradient(par) do …

---

## [Print vector](https://discourse.julialang.org/t/print-vector/121917)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 5\
**Last updated:** [October 29, 2024, 2:47pm UTC](https://discourse.julialang.org/t/print-vector/121917 "2024-10-29T14:47:22Z")

</div>

How does one get @show to print the vector as it is shown in the REPL, that is vertically?

---

## [Lack of improvement from distributed pmap, understanding a simple example](https://discourse.julialang.org/t/lack-of-improvement-from-distributed-pmap-understanding-a-simple-example/121880)

<div class="topic-metadata">

**Author:** [@ma-y](https://discourse.julialang.org/u/ma-y)\
**Replies:** 6\
**Last updated:** [October 29, 2024, 2:25pm UTC](https://discourse.julialang.org/t/lack-of-improvement-from-distributed-pmap-understanding-a-simple-example/121880 "2024-10-29T14:25:31Z")

</div>

Dear all, I am relatively new to Julia and have spent the last weeks trying to parallelize my code, without much success. Therefore I would like to understand the following minimal example. My computer has 16 cores, an…

---

## [How to write multithreading matrix multiplication](https://discourse.julialang.org/t/how-to-write-multithreading-matrix-multiplication/121865)

<div class="topic-metadata">

**Author:** [@Enc](https://discourse.julialang.org/u/Enc)\
**Replies:** 4\
**Last updated:** [October 29, 2024, 1:31pm UTC](https://discourse.julialang.org/t/how-to-write-multithreading-matrix-multiplication/121865 "2024-10-29T13:31:46Z")

</div>

Hello! I’m studying parallel programming in Julia, so i decided to write some basics matrix multiplication without using Linear Algebra package, because it’s already multi-threaded. using Base.Threads using BenchmarkToo…

---

## [Implement saturation of DAEs output using a combination of continuous and discrete callbacks](https://discourse.julialang.org/t/implement-saturation-of-daes-output-using-a-combination-of-continuous-and-discrete-callbacks/121238)

<div class="topic-metadata">

**Author:** [@Mouhamed](https://discourse.julialang.org/u/Mouhamed)\
**Replies:** 6\
**Last updated:** [October 29, 2024, 1:05pm UTC](https://discourse.julialang.org/t/implement-saturation-of-daes-output-using-a-combination-of-continuous-and-discrete-callbacks/121238 "2024-10-29T13:05:15Z")

</div>

Hello, In a nutshell what I do is the following : 1- First I monitor the evolution of one output through a continuous callback and when it hits a limit value I saturate the derivative output by multiplying it by a bool…

---

## [Using a sparse Hessian in Optim.jl](https://discourse.julialang.org/t/using-a-sparse-hessian-in-optim-jl/121768)

<div class="topic-metadata">

**Author:** [@rsenne](https://discourse.julialang.org/u/rsenne)\
**Replies:** 21\
**Last updated:** [October 29, 2024, 1:05pm UTC](https://discourse.julialang.org/t/using-a-sparse-hessian-in-optim-jl/121768 "2024-10-29T13:05:02Z")

</div>

I’m currently trying to make code for a package I’m developing as performant as possible. One function I’m writing is to perform smoothing for a state-space model using a method advocated in this paper: where one uses…

---

## [Julia 1.11 is slower than 1.10?](https://discourse.julialang.org/t/julia-1-11-is-slower-than-1-10/121077)

<div class="topic-metadata">

**Author:** [@dqeeq](https://discourse.julialang.org/u/dqeeq)\
**Replies:** 48\
**Last updated:** [October 29, 2024, 12:40pm UTC](https://discourse.julialang.org/t/julia-1-11-is-slower-than-1-10/121077 "2024-10-29T12:40:42Z")

</div>

So I was reading the blog post and decided to test the speedup of the Stdlib excision section, % hyperfine 'julia +1.10 --startup-file=no -e "1+1"' Benchmark 1: julia +1.10 --startup-file=no -e "1+1" Time (mean ± σ): …

---

## [Conflict between Proj and GeoStats in a package](https://discourse.julialang.org/t/conflict-between-proj-and-geostats-in-a-package/121862)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 8\
**Last updated:** [October 29, 2024, 12:25pm UTC](https://discourse.julialang.org/t/conflict-between-proj-and-geostats-in-a-package/121862 "2024-10-29T12:25:45Z")

</div>

I am new to creating packages and usually just run scripts. This script runs fine: using CSV using DataFrames using Dates using GeoIO using GeoStats using Proj using ZipArchives include("mweNLHFmethod.jl") #using Revi…

---

## [Julia typesystem](https://discourse.julialang.org/t/julia-typesystem/121860)

<div class="topic-metadata">

**Author:** [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Replies:** 22\
**Last updated:** [October 29, 2024, 12:12pm UTC](https://discourse.julialang.org/t/julia-typesystem/121860 "2024-10-29T12:12:06Z")

</div>

Here is a demonstration of some behavior of the Julia typesystem. function mine(x::Vector{Union{Int64, T}}) where T println(typeof(x)) println(T) end julia\> mine(Vector{Union{Int64, String}}(\[1, 2, 3, "hello"\])…

---

## [Problem relating to use gradient descends two models using GPU](https://discourse.julialang.org/t/problem-relating-to-use-gradient-descends-two-models-using-gpu/121911)

<div class="topic-metadata">

**Author:** [@Yaozhong\_Liu](https://discourse.julialang.org/u/Yaozhong_Liu)\
**Replies:** 2\
**Last updated:** [October 29, 2024, 11:54am UTC](https://discourse.julialang.org/t/problem-relating-to-use-gradient-descends-two-models-using-gpu/121911 "2024-10-29T11:54:17Z")

</div>

Hi. I am using GPU and Flux to train 2 models. Example code: using CUDA using Flux using Random Random.seed!(333) model1 = Chain( Dense(3, 3) |\> gpu ) model2 = Chain( model1, Dense(ones(3,3),true,relu) |\> g…

---

## [Having trouble installing DifferentialEquations.jl](https://discourse.julialang.org/t/having-trouble-installing-differentialequations-jl/105217)

<div class="topic-metadata">

**Author:** [@aplund](https://discourse.julialang.org/u/aplund)\
**Replies:** 7\
**Last updated:** [October 29, 2024, 11:33am UTC](https://discourse.julialang.org/t/having-trouble-installing-differentialequations-jl/105217 "2024-10-29T11:33:40Z")

</div>

I’m trying to get up and running with the DifferentialEquations.jl package. It seems that there is some problem when installing due to a soname bump in the libklu library which is part of SuiteSparse. My system has Sui…

---

## [Problem with Julia Language Server, Execution of code and code cells in REPL](https://discourse.julialang.org/t/problem-with-julia-language-server-execution-of-code-and-code-cells-in-repl/121628)

<div class="topic-metadata">

**Author:** [@mariie](https://discourse.julialang.org/u/mariie)\
**Replies:** 8\
**Last updated:** [October 29, 2024, 11:32am UTC](https://discourse.julialang.org/t/problem-with-julia-language-server-execution-of-code-and-code-cells-in-repl/121628 "2024-10-29T11:32:49Z")

</div>

Hello everyone! After 2 months of using julia in vscode without any problems I am having this issue now: I cannot execute active files in the REPL and I can also not execute the code line by line. In the output of Julia …

---

## [ODESystem usage in NeuralPDE/NNODE](https://discourse.julialang.org/t/odesystem-usage-in-neuralpde-nnode/121906)

<div class="topic-metadata">

**Author:** [@maccha](https://discourse.julialang.org/u/maccha)\
**Replies:** 3\
**Last updated:** [October 29, 2024, 10:32am UTC](https://discourse.julialang.org/t/odesystem-usage-in-neuralpde-nnode/121906 "2024-10-29T10:32:02Z")

</div>

Hi everyone, I have to infer some parameters (~ 10^4, forget for now about the possiblity of doing this) of interactions strength for a ~ 90 variables network of ODEs whose interactions links I know beforehand. I wanted…

---

## [Avoid allocations in retrieving array parts](https://discourse.julialang.org/t/avoid-allocations-in-retrieving-array-parts/121908)

<div class="topic-metadata">

**Author:** [@JTHesse](https://discourse.julialang.org/u/JTHesse)\
**Replies:** 2\
**Last updated:** [October 29, 2024, 9:32am UTC](https://discourse.julialang.org/t/avoid-allocations-in-retrieving-array-parts/121908 "2024-10-29T09:32:11Z")

</div>

Hello, I’m trying to reduce memory allocations and increase efficiency of our software. Most of the allocations will occur while retrieving part of an array. As you can see below, the retrieval is allocating much more…

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

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