# Latest

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

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

**Page:** 521

---

## [Cannot catch Ctrl-C gracefully in this script](https://discourse.julialang.org/t/cannot-catch-ctrl-c-gracefully-in-this-script/79757)

<div class="topic-metadata">

**Author:** [@chunjiw](https://discourse.julialang.org/u/chunjiw)\
**Replies:** 12\
**Last updated:** [December 31, 2023, 10:54am UTC](https://discourse.julialang.org/t/cannot-catch-ctrl-c-gracefully-in-this-script/79757 "2023-12-31T10:54:03Z")

</div>

This is related to this issue. Put the following into a script file.jl: function try\_interrupt() while true try sleep(1) println("trying...") @async 1+1 catch e …

---

## [Advice on Command Line Usage on HPC with Julia](https://discourse.julialang.org/t/advice-on-command-line-usage-on-hpc-with-julia/108176)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 6\
**Last updated:** [December 31, 2023, 3:50am UTC](https://discourse.julialang.org/t/advice-on-command-line-usage-on-hpc-with-julia/108176 "2023-12-31T03:50:50Z")

</div>

Hello, I have been working and re-working the method I use to generate and submit runs on my HPC and I’d appreciate any advice or comments on the process (I’m sure there is plenty of room for improvement). Apologies if …

---

## [Composite type comparison](https://discourse.julialang.org/t/composite-type-comparison/108192)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 1\
**Last updated:** [December 30, 2023, 7:20pm UTC](https://discourse.julialang.org/t/composite-type-comparison/108192 "2023-12-30T19:20:58Z")

</div>

Something similar to this probably has been asked and answered before, but my search-Fu is not strong enough to find the answer. I can’t figure out why the last comparison doesn’t succeed. julia\> x (\[1\], \[1\]) julia\> t…

---

## [Compiling Julia from source vs release binaries](https://discourse.julialang.org/t/compiling-julia-from-source-vs-release-binaries/108180)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 6\
**Last updated:** [December 30, 2023, 5:26pm UTC](https://discourse.julialang.org/t/compiling-julia-from-source-vs-release-binaries/108180 "2023-12-30T17:26:42Z")

</div>

I have always been compiling Julia from sources (checking out the relevant release- branch in the git repo), but since juliaup is so convenient, I am wondering if I should do that. Specifically, compiling from source ta…

---

## [Convex.jl, possible to have a product as an operation?](https://discourse.julialang.org/t/convex-jl-possible-to-have-a-product-as-an-operation/108101)

<div class="topic-metadata">

**Author:** [@1m1](https://discourse.julialang.org/u/1m1)\
**Replies:** 8\
**Last updated:** [December 30, 2023, 5:21pm UTC](https://discourse.julialang.org/t/convex-jl-possible-to-have-a-product-as-an-operation/108101 "2023-12-30T17:21:17Z")

</div>

My constraints have a product. It is a convex set. I cannot find an operation to simply have the product of the components of a vector (or matrix/tensor in general). Is that not possible?

---

## [Undefined variable error in Julia: UndefVarError:castnot defined](https://discourse.julialang.org/t/undefined-variable-error-in-julia-undefvarerror-castnot-defined/108190)

<div class="topic-metadata">

**Author:** [@Mallikarjuna\_G\_B](https://discourse.julialang.org/u/Mallikarjuna_G_B)\
**Replies:** 2\
**Last updated:** [December 30, 2023, 4:17pm UTC](https://discourse.julialang.org/t/undefined-variable-error-in-julia-undefvarerror-castnot-defined/108190 "2023-12-30T16:17:36Z")

</div>

Description: I’m trying to build a transformer-based classifier model in Julia using the TransformersLite package, but I’m encountering an error that says UndefVarError:castnot defined. I’ve updated all of the packages …

---

## [Issues in conda-based simultaneous installation of PyCall and RCall](https://discourse.julialang.org/t/issues-in-conda-based-simultaneous-installation-of-pycall-and-rcall/108183)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [December 30, 2023, 3:27pm UTC](https://discourse.julialang.org/t/issues-in-conda-based-simultaneous-installation-of-pycall-and-rcall/108183 "2023-12-30T15:27:56Z")

</div>

Hello, I have a project where I use both PyCall and RCall with both downloaded using conda (i.e. I set both ENV\["PYTHON"\] = "" and ENV\["R\_HOME"\] = "\*"). Now the issue is in github CI, where conda complains of package co…

---

## [How do i expand anaconda jupyterlab editor window?](https://discourse.julialang.org/t/how-do-i-expand-anaconda-jupyterlab-editor-window/108187)

<div class="topic-metadata">

**Author:** [@awaliaro](https://discourse.julialang.org/u/awaliaro)\
**Replies:** 0\
**Last updated:** [December 30, 2023, 1:18pm UTC](https://discourse.julialang.org/t/how-do-i-expand-anaconda-jupyterlab-editor-window/108187 "2023-12-30T13:18:45Z")

</div>

How do i expand anaconda Jupyterlab editor window?

---

## [GPU parallelization for a very large system of ODEs](https://discourse.julialang.org/t/gpu-parallelization-for-a-very-large-system-of-odes/107187)

<div class="topic-metadata">

**Author:** [@ian](https://discourse.julialang.org/u/ian)\
**Replies:** 5\
**Last updated:** [December 30, 2023, 10:46am UTC](https://discourse.julialang.org/t/gpu-parallelization-for-a-very-large-system-of-odes/107187 "2023-12-30T10:46:48Z")

</div>

Hi all, I need to simulate a very large system of ODEs (~10^5 states). At every time step in the simulation I need to update a matrix using the current value of the state vector. Here is an MWE of the matrix updating f…

---

## [Bad performance of anonymous functions even when they are type-stable](https://discourse.julialang.org/t/bad-performance-of-anonymous-functions-even-when-they-are-type-stable/108173)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 2\
**Last updated:** [December 30, 2023, 6:56am UTC](https://discourse.julialang.org/t/bad-performance-of-anonymous-functions-even-when-they-are-type-stable/108173 "2023-12-30T06:56:46Z")

</div>

MWE: julia\> f1 = function (x) x/2 end #3 (generic function with 1 method) julia\> function f1\_2(x) x/2 end f1\_2 (generic function with 1 method) julia\> f2 = function (x) …

---

## [Some notes on performance of callable structs](https://discourse.julialang.org/t/some-notes-on-performance-of-callable-structs/108042)

<div class="topic-metadata">

**Author:** [@arik](https://discourse.julialang.org/u/arik)\
**Replies:** 17\
**Last updated:** [December 30, 2023, 3:52am UTC](https://discourse.julialang.org/t/some-notes-on-performance-of-callable-structs/108042 "2023-12-30T03:52:05Z")

</div>

Hello together. I want to showcase some performance characteristics and slight problems with ‘homemade closures’. By that I mean some kind of struct that carries some data and has a call method in which this data is use…

---

## [Failing to plot correlograms in Julia: Makie vs. AoG vs StatsPlots](https://discourse.julialang.org/t/failing-to-plot-correlograms-in-julia-makie-vs-aog-vs-statsplots/107971)

<div class="topic-metadata">

**Author:** [@enzomar](https://discourse.julialang.org/u/enzomar)\
**Replies:** 30\
**Last updated:** [December 30, 2023, 1:00am UTC](https://discourse.julialang.org/t/failing-to-plot-correlograms-in-julia-makie-vs-aog-vs-statsplots/107971 "2023-12-30T01:00:47Z")

</div>

I am trying with any possible package to plot a classic correlation plot (scatterplots for each variable vs each other and density histogram on the diagonal in the middle). Sometime they are cold correlogram or pairplots…

---

## [Monte Carlo ray tracing flow chart algorithm pseudocode: A @goto-implementation and a recursion based implementation, any ideas for a more modern implementation?](https://discourse.julialang.org/t/monte-carlo-ray-tracing-flow-chart-algorithm-pseudocode-a-goto-implementation-and-a-recursion-based-implementation-any-ideas-for-a-more-modern-implementation/108089)

<div class="topic-metadata">

**Author:** [@NikoBiele](https://discourse.julialang.org/u/NikoBiele)\
**Replies:** 3\
**Last updated:** [December 29, 2023, 11:59pm UTC](https://discourse.julialang.org/t/monte-carlo-ray-tracing-flow-chart-algorithm-pseudocode-a-goto-implementation-and-a-recursion-based-implementation-any-ideas-for-a-more-modern-implementation/108089 "2023-12-29T23:59:58Z")

</div>

Hi Julia-people :slight\_smile: I am working with heat transfer, more specifically simulating thermal radiation heat transfer in participating media through Monte Carlo ray tracing. I am currently working with a 2D algor…

---

## [Conceptual Question on GPU Integration with Optimization.jl](https://discourse.julialang.org/t/conceptual-question-on-gpu-integration-with-optimization-jl/108165)

<div class="topic-metadata">

**Author:** [@bdas123](https://discourse.julialang.org/u/bdas123)\
**Replies:** 2\
**Last updated:** [December 29, 2023, 11:55pm UTC](https://discourse.julialang.org/t/conceptual-question-on-gpu-integration-with-optimization-jl/108165 "2023-12-29T23:55:05Z")

</div>

This is more of a conceptual question about CUDA integration (CUDA.jl) with Optimization.jl Does the CUDA integration speed up both compilation AND solving time, or just solving time?

---

## [Provide repl mode for my package](https://discourse.julialang.org/t/provide-repl-mode-for-my-package/108166)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 2\
**Last updated:** [December 29, 2023, 9:15pm UTC](https://discourse.julialang.org/t/provide-repl-mode-for-my-package/108166 "2023-12-29T21:15:02Z")

</div>

I want to provide a REPL mode for my package. I’m looking for help to set it up. I’ve looked at RCall.jl but it’s too complicated for me to understand. Also Pkg.jl, there’s too much stuff for me to understand. here is wh…

---

## [Understanding and Overcoming Zygote's Functional Limitations for distributed](https://discourse.julialang.org/t/understanding-and-overcoming-zygotes-functional-limitations-for-distributed/108143)

<div class="topic-metadata">

**Author:** [@josemanuel22](https://discourse.julialang.org/u/josemanuel22)\
**Replies:** 5\
**Last updated:** [December 29, 2023, 8:57pm UTC](https://discourse.julialang.org/t/understanding-and-overcoming-zygotes-functional-limitations-for-distributed/108143 "2023-12-29T20:57:00Z")

</div>

Hello everyone, I am trying to parallelize a cost function. I am using Distributed and Zygote as an autodifferentiator for this. The example is as follows function sliced\_invariant\_statistical\_loss\_distributed(nn\_model,…

---

## [Set spatial reference system to a geodataframe and plot it](https://discourse.julialang.org/t/set-spatial-reference-system-to-a-geodataframe-and-plot-it/108086)

<div class="topic-metadata">

**Author:** [@anjelinejeline](https://discourse.julialang.org/u/anjelinejeline)\
**Replies:** 8\
**Last updated:** [December 29, 2023, 6:11pm UTC](https://discourse.julialang.org/t/set-spatial-reference-system-to-a-geodataframe-and-plot-it/108086 "2023-12-29T18:11:48Z")

</div>

Hello, I am trying to create a geotable from a csv and plot it along with a shapefile, However I am not able to to set the right spatial reference system as I am getting a method error when using the setspatialref! fun…

---

## [Strategies for Parallelizing Long Tasks with Many Parts](https://discourse.julialang.org/t/strategies-for-parallelizing-long-tasks-with-many-parts/108162)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 0\
**Last updated:** [December 29, 2023, 6:11pm UTC](https://discourse.julialang.org/t/strategies-for-parallelizing-long-tasks-with-many-parts/108162 "2023-12-29T18:11:40Z")

</div>

I have a pipeline that concatenates parquet tables from S3 and writes them back out at the end. It goes something like: Read in the metadata for a bunch of parquet files in a partition Get their RowGroups (the unit of …

---

## [Understanding LoadError: ArgumentError in Tables.jl interface](https://discourse.julialang.org/t/understanding-loaderror-argumenterror-in-tables-jl-interface/108159)

<div class="topic-metadata">

**Author:** [@WekawTirso](https://discourse.julialang.org/u/WekawTirso)\
**Replies:** 4\
**Last updated:** [December 29, 2023, 3:56pm UTC](https://discourse.julialang.org/t/understanding-loaderror-argumenterror-in-tables-jl-interface/108159 "2023-12-29T15:56:55Z")

</div>

I am trying to create and save simple array using either of the two methods: using CSV, DataFrames #Attempt 1 let N = 20 My\_Array = \[\] i = 0 for b=2:N-1 i += 1 summation = 0.0 f…

---

## [I am building a simple to use autoencoder model.. anyone interested?](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [December 29, 2023, 3:33pm UTC](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146 "2023-12-29T15:33:44Z")

</div>

Hello, I saw that all autoencoders presented in the various blogs require to actually implement the autoencoder from a DL framework. I am implementing instead one where the user just creates the model m =AutoEncoder(out…

---

## [Learn and Use Linux for Programming](https://discourse.julialang.org/t/learn-and-use-linux-for-programming/107947)

<div class="topic-metadata">

**Author:** [@benslinux](https://discourse.julialang.org/u/benslinux)\
**Replies:** 34\
**Last updated:** [December 29, 2023, 10:17am UTC](https://discourse.julialang.org/t/learn-and-use-linux-for-programming/107947 "2023-12-29T10:17:20Z")

</div>

This is just my opinion, but I think it’s important and gets missed all the time. I would urge students to use Linux to learn Julia and indeed, for any and all programming. Windows is the dominant OS in the world and it’…

---

## [I'm Creating a 2D Platformer Using Julia!](https://discourse.julialang.org/t/im-creating-a-2d-platformer-using-julia/108057)

<div class="topic-metadata">

**Author:** [@Kyjor](https://discourse.julialang.org/u/Kyjor)\
**Replies:** 11\
**Last updated:** [December 29, 2023, 9:18am UTC](https://discourse.julialang.org/t/im-creating-a-2d-platformer-using-julia/108057 "2023-12-29T09:18:35Z")

</div>

Hello everyone! I just wanted to post some progress about a small project I’m working on using my game engine written in Julia. I’m using this game as a reference, as I’m not worried about designing a game at this point.…

---

## [Are branches in Julia a problem for performance?](https://discourse.julialang.org/t/are-branches-in-julia-a-problem-for-performance/108062)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 10\
**Last updated:** [December 29, 2023, 8:55am UTC](https://discourse.julialang.org/t/are-branches-in-julia-a-problem-for-performance/108062 "2023-12-29T08:55:14Z")

</div>

Due to how modern CPU and computer memory works, branching, like using if statement, can produce high cost for the performance and produce cache misses. At basic level I understand that, but I’m deficiently not expert in…

---

## [Help with Symbolic Programming](https://discourse.julialang.org/t/help-with-symbolic-programming/107842)

<div class="topic-metadata">

**Author:** [@ContactPatch22](https://discourse.julialang.org/u/ContactPatch22)\
**Replies:** 4\
**Last updated:** [December 29, 2023, 7:38am UTC](https://discourse.julialang.org/t/help-with-symbolic-programming/107842 "2023-12-29T07:38:09Z")

</div>

Hi all, I am new to Julia (coming from Python). I need some help with defining equations and extracting Mass, Stiffness and Damping Matrices. Does anyone have some advice to generate these matrices using the following e…

---

## [Multi-objective: have no optimal solutions after changing the priority of the objectives](https://discourse.julialang.org/t/multi-objective-have-no-optimal-solutions-after-changing-the-priority-of-the-objectives/108078)

<div class="topic-metadata">

**Author:** [@Shaolin](https://discourse.julialang.org/u/Shaolin)\
**Replies:** 3\
**Last updated:** [December 29, 2023, 2:38am UTC](https://discourse.julialang.org/t/multi-objective-have-no-optimal-solutions-after-changing-the-priority-of-the-objectives/108078 "2023-12-29T02:38:59Z")

</div>

Hi, I have a 4-objective optimization model using Gurobi, and there was the optimal solution when I set the poriority of one order (e.g. \[4,3,2,1\]). but when the priority changes ((e.g. \[2,3,4,1\])), the optimal solutio…

---

## [JuMP: MathOptInterface.ScalarNonlinearFunction](https://discourse.julialang.org/t/jump-mathoptinterface-scalarnonlinearfunction/108139)

<div class="topic-metadata">

**Author:** [@a\_jae](https://discourse.julialang.org/u/a_jae)\
**Replies:** 5\
**Last updated:** [December 28, 2023, 10:47pm UTC](https://discourse.julialang.org/t/jump-mathoptinterface-scalarnonlinearfunction/108139 "2023-12-28T22:47:36Z")

</div>

is there a way to run a function only under certain conditions? For example, I have the following model: using JuMP, Gurobi; model = Model(Gurobi.Optimizer); @variable(model, x\[1:t\] \>= 0, Int); @variable(model, y\[1:h…

---

## [Trouble with NeuralODE and Metal](https://discourse.julialang.org/t/trouble-with-neuralode-and-metal/107826)

<div class="topic-metadata">

**Author:** [@tobydriscoll](https://discourse.julialang.org/u/tobydriscoll)\
**Replies:** 3\
**Last updated:** [December 28, 2023, 10:17pm UTC](https://discourse.julialang.org/t/trouble-with-neuralode-and-metal/107826 "2023-12-28T22:17:17Z")

</div>

I’m trying to do the canned basic neural ODE demo using Metal. First off, I was getting errors even with gdev=cpu\_device(), but I guessed at wrapping the solve() and prob\_neuralode() outputs with Array(), and then it se…

---

## [Differential equation with periodic orbit: Can Diffeq.jl determine the period?](https://discourse.julialang.org/t/differential-equation-with-periodic-orbit-can-diffeq-jl-determine-the-period/107982)

<div class="topic-metadata">

**Author:** [@HMegh](https://discourse.julialang.org/u/HMegh)\
**Replies:** 9\
**Last updated:** [December 28, 2023, 10:09pm UTC](https://discourse.julialang.org/t/differential-equation-with-periodic-orbit-can-diffeq-jl-determine-the-period/107982 "2023-12-28T22:09:37Z")

</div>

Hi, I am working on a problem where the differential equation \\mathbf{x}'(t)=F(\\mathbf{x}(t)) admits a periodic solution. For example: \\begin{cases} x'(t) = -y(t) \\\\ y'(t)=x(t)\\end{cases},\\qquad x(0)=1,\\ y(0)=0. The…

---

## [Error parsing Dates.DateTime](https://discourse.julialang.org/t/error-parsing-dates-datetime/108135)

<div class="topic-metadata">

**Author:** [@Phebe](https://discourse.julialang.org/u/Phebe)\
**Replies:** 2\
**Last updated:** [December 28, 2023, 9:42pm UTC](https://discourse.julialang.org/t/error-parsing-dates-datetime/108135 "2023-12-28T21:42:53Z")

</div>

I am trying to use the LWFBrook90 model, while running the code below I kept getting an error, can you please help me? model = loadSPAC(input\_path, input\_prefix; simulate\_isotopes = true); ERROR: thread = 1 error parsi…

---

## [16 bit float on Transformers.jl](https://discourse.julialang.org/t/16-bit-float-on-transformers-jl/107867)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 7\
**Last updated:** [December 28, 2023, 7:40pm UTC](https://discourse.julialang.org/t/16-bit-float-on-transformers-jl/107867 "2023-12-28T19:40:13Z")

</div>

I am new to LLMs but thought to give it a shot using Transformers.jl. This worked rather well, after creating an account at HuggingFace and getting permission for Llama-7B from Meta. Yet, I was surprised how much GPU ram…

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

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