# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=278

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

**Page:** 279

---

## [How to compile the julia code into c language?](https://discourse.julialang.org/t/how-to-compile-the-julia-code-into-c-language/76573)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 24\
**Last updated:** [June 18, 2023, 2:23am UTC](https://discourse.julialang.org/t/how-to-compile-the-julia-code-into-c-language/76573 "2023-06-18T02:23:35Z")

</div>

I have my code in julia language, can I generated a C code for it?

---

## [How to get weight and bias from the NeuralPDE after solving](https://discourse.julialang.org/t/how-to-get-weight-and-bias-from-the-neuralpde-after-solving/100481)

<div class="topic-metadata">

**Author:** [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)\
**Replies:** 5\
**Last updated:** [June 17, 2023, 11:52pm UTC](https://discourse.julialang.org/t/how-to-get-weight-and-bias-from-the-neuralpde-after-solving/100481 "2023-06-17T23:52:57Z")

</div>

I try to use NeuralPDE to solve the differential equations. How could I get the weight and bias from network and may I use the weight after solving to predict the similar problem? Thank you all.

---

## [Package extensions for Julia \< 1.9](https://discourse.julialang.org/t/package-extensions-for-julia-1-9/93397)

<div class="topic-metadata">

**Author:** [@tfiers](https://discourse.julialang.org/u/tfiers)\
**Replies:** 23\
**Last updated:** [June 17, 2023, 5:58pm UTC](https://discourse.julialang.org/t/package-extensions-for-julia-1-9/93397 "2023-06-17T17:58:00Z")

</div>

Package extensions are an exciting new feature of julia 1.9 {links for more info about them}julia/NEWS.md at v1.9.0-beta3 · JuliaLang/julia · GitHub https://pkgdocs.julialang.org/dev/creating-packages/#Conditional-loadi…

---

## [Unicode: a bad idea, in general](https://discourse.julialang.org/t/unicode-a-bad-idea-in-general/99897)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 83\
**Last updated:** [June 17, 2023, 3:47am UTC](https://discourse.julialang.org/t/unicode-a-bad-idea-in-general/99897 "2023-06-17T03:47:38Z")

</div>

Can you find the \\rho? And not confuse it with p?

---

## [Filling text! from observable Array](https://discourse.julialang.org/t/filling-text-from-observable-array/100435)

<div class="topic-metadata">

**Author:** [@sransome](https://discourse.julialang.org/u/sransome)\
**Replies:** 2\
**Last updated:** [June 17, 2023, 2:46am UTC](https://discourse.julialang.org/t/filling-text-from-observable-array/100435 "2023-06-17T02:46:01Z")

</div>

Hi, I’m using Makie and need to display a lot of text in a plot and have been using a number of observable vectors to improve performance. However, I ran into syncronization problems when the length of the vectors chan…

---

## [How to update Julia 1.8.x to 1.9.x](https://discourse.julialang.org/t/how-to-update-julia-1-8-x-to-1-9-x/100261)

<div class="topic-metadata">

**Author:** [@kevinqiao](https://discourse.julialang.org/u/kevinqiao)\
**Replies:** 3\
**Last updated:** [June 17, 2023, 2:22am UTC](https://discourse.julialang.org/t/how-to-update-julia-1-8-x-to-1-9-x/100261 "2023-06-17T02:22:19Z")

</div>

Hi there, I’m currently using Julia 1.8.2 on Windows 10 platform, and I wonder how to update Julia to 1.9.1 without re-install my packages, e.g., JuMP, etc. And I don’t like there are several Julia versions on my PC. So…

---

## [Can constant propagation transform integer powers of -1 to an if/else?](https://discourse.julialang.org/t/can-constant-propagation-transform-integer-powers-of-1-to-an-if-else/100462)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 5\
**Last updated:** [June 16, 2023, 10:01pm UTC](https://discourse.julialang.org/t/can-constant-propagation-transform-integer-powers-of-1-to-an-if-else/100462 "2023-06-16T22:01:11Z")

</div>

julia\> @btime (n -\> \[iseven(k) ? 1 : (-1) for k in 1:n\])(500); 890.571 ns (1 allocation: 4.06 KiB) julia\> @btime (n -\> \[(-1)^k for k in 1:n\])(500); 6.170 μs (1 allocation: 4.06 KiB) It would be great if the latter …

---

## [Detect if constant](https://discourse.julialang.org/t/detect-if-constant/100246)

<div class="topic-metadata">

**Author:** [@user664303](https://discourse.julialang.org/u/user664303)\
**Replies:** 49\
**Last updated:** [June 16, 2023, 8:12pm UTC](https://discourse.julialang.org/t/detect-if-constant/100246 "2023-06-16T20:12:17Z")

</div>

Is there a way to test or detect whether a value (let’s say an Int) is constant (i.e. known to the compiler) at runtime? This has been asked before, but not often and not recently. I’m just wondering if this is now possi…

---

## [Is this a valid use of simd?](https://discourse.julialang.org/t/is-this-a-valid-use-of-simd/100463)

<div class="topic-metadata">

**Author:** [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Replies:** 2\
**Last updated:** [June 16, 2023, 6:26pm UTC](https://discourse.julialang.org/t/is-this-a-valid-use-of-simd/100463 "2023-06-16T18:26:57Z")

</div>

I am trying to calculate the sum of the absolute differences between two vectors without allocation. I have no experience with @simd but was wondering if this is a correct use: function sum\_absdiff(x::Vector{T}, y::Vect…

---

## [Problems with installation and configuration of \`PythonCall.jl\`](https://discourse.julialang.org/t/problems-with-installation-and-configuration-of-pythoncall-jl/100460)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 1\
**Last updated:** [June 16, 2023, 5:31pm UTC](https://discourse.julialang.org/t/problems-with-installation-and-configuration-of-pythoncall-jl/100460 "2023-06-16T17:31:27Z")

</div>

I added PythonCall.jl and CondaPkg.jl in my Julia REPL’s pkg mode. I already have Miniconda in my system (Win10) and I want PythonCall and CondaPkg to use my preinstalled Miniconda instead of downloading a new one. So …

---

## [Mixing blocking MPI communication and Julia concurrency](https://discourse.julialang.org/t/mixing-blocking-mpi-communication-and-julia-concurrency/100458)

<div class="topic-metadata">

**Author:** [@lweber](https://discourse.julialang.org/u/lweber)\
**Replies:** 0\
**Last updated:** [June 16, 2023, 4:46pm UTC](https://discourse.julialang.org/t/mixing-blocking-mpi-communication-and-julia-concurrency/100458 "2023-06-16T16:46:51Z")

</div>

Hi Julia users, I have the following problem. I have an MPI code with a controller/worker architecture: one process distributes and coordinates work across a bunch of worker processes. This is implemented using blocking…

---

## [Unregistered sub-packages in a registered main-package](https://discourse.julialang.org/t/unregistered-sub-packages-in-a-registered-main-package/100442)

<div class="topic-metadata">

**Author:** [@imre](https://discourse.julialang.org/u/imre)\
**Replies:** 3\
**Last updated:** [June 16, 2023, 2:45pm UTC](https://discourse.julialang.org/t/unregistered-sub-packages-in-a-registered-main-package/100442 "2023-06-16T14:45:32Z")

</div>

Hi, I would like to create a package (which will be registered at some point), which contains multiple unregistered sub-packages. I’m aware that I can add unregistered sub-packages to my main package via dev in the pack…

---

## [Vim mode in REPL command line](https://discourse.julialang.org/t/vim-mode-in-repl-command-line/9023)

<div class="topic-metadata">

**Author:** [@pasha](https://discourse.julialang.org/u/pasha)\
**Replies:** 31\
**Last updated:** [June 16, 2023, 1:37pm UTC](https://discourse.julialang.org/t/vim-mode-in-repl-command-line/9023 "2023-06-16T13:37:34Z")

</div>

I’m not talking about a julia mode for vim - that exists and is lovely. I’m talking about the command line in the REPL - so that when you can escape partway into a long command you can use vim-flavored actions to change…

---

## [Can Julia achieve fine grained control of performance without sacrificing ease of use?](https://discourse.julialang.org/t/can-julia-achieve-fine-grained-control-of-performance-without-sacrificing-ease-of-use/100437)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 14\
**Last updated:** [June 16, 2023, 1:31pm UTC](https://discourse.julialang.org/t/can-julia-achieve-fine-grained-control-of-performance-without-sacrificing-ease-of-use/100437 "2023-06-16T13:31:53Z")

</div>

Julia was designed to have a good overall performance, being llvm-compiled with a good type inference. However, Julia has some subtle issues when fine-grained control over the inner working is needed, for example… -Wha…

---

## [ERROR: MethodError: no method matching \*(::ForwardDiff.Dual{ForwardDiff.Tag{Pumas.Tag, Float64}, Float64, 6}, ::typeof(time))](https://discourse.julialang.org/t/error-methoderror-no-method-matching-forwarddiff-dual-forwarddiff-tag-pumas-tag-float64-float64-6-typeof-time/100419)

<div class="topic-metadata">

**Author:** [@Valdeene\_Santos](https://discourse.julialang.org/u/Valdeene_Santos)\
**Replies:** 2\
**Last updated:** [June 16, 2023, 12:32pm UTC](https://discourse.julialang.org/t/error-methoderror-no-method-matching-forwarddiff-dual-forwarddiff-tag-pumas-tag-float64-float64-6-typeof-time/100419 "2023-06-16T12:32:11Z")

</div>

During the pharmacodynamic data run (in vitro test with constant concentrations) this error appeared and I cannot identify what could have happened. Can someone help me ? model = @model begin @param begin tvk ∈ Rea…

---

## [PackageCompiler: cpu\_target silently fails to create image for specified architecture](https://discourse.julialang.org/t/packagecompiler-cpu-target-silently-fails-to-create-image-for-specified-architecture/99954)

<div class="topic-metadata">

**Author:** [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Replies:** 4\
**Last updated:** [June 16, 2023, 8:10am UTC](https://discourse.julialang.org/t/packagecompiler-cpu-target-silently-fails-to-create-image-for-specified-architecture/99954 "2023-06-16T08:10:41Z")

</div>

I am trying to build a system image for a package. The system image is built in a different machine than the one that it runs on. For efficiency reasons I want to be able to build for the cpu type of the target which is…

---

## [Incremental online learning of Turing.jl models](https://discourse.julialang.org/t/incremental-online-learning-of-turing-jl-models/100386)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 3\
**Last updated:** [June 16, 2023, 6:59am UTC](https://discourse.julialang.org/t/incremental-online-learning-of-turing-jl-models/100386 "2023-06-16T06:59:21Z")

</div>

Hi there, I am looking for ways to learn probablistic models on timeseries data in an incremental online fashion, processing data point after data point continuously, as they arrive. Hence my question whether there are…

---

## [StatsBase.jl package: Possible Trojan:Win32 /Wacatac.H!m?](https://discourse.julialang.org/t/statsbase-jl-package-possible-trojan-win32-wacatac-h-m/100410)

<div class="topic-metadata">

**Author:** [@JJTex](https://discourse.julialang.org/u/JJTex)\
**Replies:** 7\
**Last updated:** [June 15, 2023, 6:31pm UTC](https://discourse.julialang.org/t/statsbase-jl-package-possible-trojan-win32-wacatac-h-m/100410 "2023-06-15T18:31:51Z")

</div>

Hello. My name is Jair, I’m Brazilian (Goiânia/GO), I’m using google translator for this conversation. as I’m new to Julia, I don’t know if this is where I make such an announcement: Today (06/15/2023) when adding the S…

---

## [FlameGraph ProfileView not showing matrix operations](https://discourse.julialang.org/t/flamegraph-profileview-not-showing-matrix-operations/100359)

<div class="topic-metadata">

**Author:** [@hsgg](https://discourse.julialang.org/u/hsgg)\
**Replies:** 2\
**Last updated:** [June 15, 2023, 9:54pm UTC](https://discourse.julialang.org/t/flamegraph-profileview-not-showing-matrix-operations/100359 "2023-06-15T21:54:04Z")

</div>

Hi, I am using FlameGraphs.jl and ProfileView.jl to profile my code with matrix operations. I am fairly new to these profiling tools. On MacOS M1 the matrix operations are not showing up in the flame graph. Here is a MW…

---

## [Iterator for indexes of true values in BitVector without allocations](https://discourse.julialang.org/t/iterator-for-indexes-of-true-values-in-bitvector-without-allocations/100411)

<div class="topic-metadata">

**Author:** [@gtbil](https://discourse.julialang.org/u/gtbil)\
**Replies:** 5\
**Last updated:** [June 15, 2023, 7:07pm UTC](https://discourse.julialang.org/t/iterator-for-indexes-of-true-values-in-bitvector-without-allocations/100411 "2023-06-15T19:07:11Z")

</div>

I have a BitVector, and I would like to be able to iterate over the indexes in the vector that contain a 1/true, without any allocations. Here’s my attempt - I’m still getting one allocation. bits = BitVector(\[0,1,1,0,1…

---

## [Git for Windows/ bash does not like Julia](https://discourse.julialang.org/t/git-for-windows-bash-does-not-like-julia/100316)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 17\
**Last updated:** [June 15, 2023, 5:47pm UTC](https://discourse.julialang.org/t/git-for-windows-bash-does-not-like-julia/100316 "2023-06-15T17:47:33Z")

</div>

I am using git for windows, which installs a bash shell (MINGW64). I can start Julia 1.9.1 in this shell, but then the input gets stuck. I cannot enter anything on the Julia prompt. Bash and Julia are working if I use i…

---

## [\--heap-size-hint and multithreads](https://discourse.julialang.org/t/heap-size-hint-and-multithreads/100407)

<div class="topic-metadata">

**Author:** [@phymann](https://discourse.julialang.org/u/phymann)\
**Replies:** 1\
**Last updated:** [June 15, 2023, 5:05pm UTC](https://discourse.julialang.org/t/heap-size-hint-and-multithreads/100407 "2023-06-15T17:05:54Z")

</div>

Hi, all When using --heap-size-hint=xG together with -t y, is the total memory size triggering aggressive garbage collection x\*yG or xG?

---

## [Is there any command statement to simulate pressing ctrl-c？](https://discourse.julialang.org/t/is-there-any-command-statement-to-simulate-pressing-ctrl-c/100391)

<div class="topic-metadata">

**Author:** [@13299118606](https://discourse.julialang.org/u/13299118606)\
**Replies:** 3\
**Last updated:** [June 15, 2023, 1:39pm UTC](https://discourse.julialang.org/t/is-there-any-command-statement-to-simulate-pressing-ctrl-c/100391 "2023-06-15T13:39:42Z")

</div>

Is there any command statement to simulate pressing ctrl-c to abort the running program, I am designing a gui abort button, and I want it to press the button to stop the running program. Similar to the “interrupt()” func…

---

## [Readline with default value if no input after timeout](https://discourse.julialang.org/t/readline-with-default-value-if-no-input-after-timeout/100388)

<div class="topic-metadata">

**Author:** [@disberd](https://discourse.julialang.org/u/disberd)\
**Replies:** 1\
**Last updated:** [June 15, 2023, 12:12pm UTC](https://discourse.julialang.org/t/readline-with-default-value-if-no-input-after-timeout/100388 "2023-06-15T12:12:21Z")

</div>

I am to write a code that asks for a prompt from the REPL but defaults to some predefined string if the user does not input anything within e.g. 10 seconds. I was thinking of using readline but I can’t seem to find a wa…

---

## [How can I structure a project in multiple modules and have code run in them?](https://discourse.julialang.org/t/how-can-i-structure-a-project-in-multiple-modules-and-have-code-run-in-them/100286)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 10\
**Last updated:** [June 15, 2023, 10:05am UTC](https://discourse.julialang.org/t/how-can-i-structure-a-project-in-multiple-modules-and-have-code-run-in-them/100286 "2023-06-15T10:05:51Z")

</div>

Hi all! Sorry this is probably noobish but I couldn’t figure it out easily from the docs/Google. I’m developing a small project for my thesis. I generated a project structure (src/, Project.toml and Manifest.toml), and …

---

## [Compiled program from PackageCompiler is much slower than REPL?](https://discourse.julialang.org/t/compiled-program-from-packagecompiler-is-much-slower-than-repl/42640)

<div class="topic-metadata">

**Author:** [@linlinlin](https://discourse.julialang.org/u/linlinlin)\
**Replies:** 3\
**Last updated:** [June 15, 2023, 8:31am UTC](https://discourse.julialang.org/t/compiled-program-from-packagecompiler-is-much-slower-than-repl/42640 "2023-06-15T08:31:43Z")

</div>

Hi, Community members. Recently, I want to compile my code to an executable program, but I have the speed problem. I develop my program based on a package JuliaGrid. In this package, it calls many other packages, like…

---

## [Optimizing code with array assignments](https://discourse.julialang.org/t/optimizing-code-with-array-assignments/99857)

<div class="topic-metadata">

**Author:** [@fergu](https://discourse.julialang.org/u/fergu)\
**Replies:** 12\
**Last updated:** [June 15, 2023, 7:48am UTC](https://discourse.julialang.org/t/optimizing-code-with-array-assignments/99857 "2023-06-15T07:48:49Z")

</div>

TL;DR I have some performance critical code that I am trying to optimize as it will otherwise take unacceptably long to run. Testing seems to suggest that the main culprit is assignments to arrays rather than the computa…

---

## [First run of ModelingToolkit + DE solve() is extremely slow](https://discourse.julialang.org/t/first-run-of-modelingtoolkit-de-solve-is-extremely-slow/100350)

<div class="topic-metadata">

**Author:** [@70Gage70](https://discourse.julialang.org/u/70Gage70)\
**Replies:** 6\
**Last updated:** [June 15, 2023, 3:05am UTC](https://discourse.julialang.org/t/first-run-of-modelingtoolkit-de-solve-is-extremely-slow/100350 "2023-06-15T03:05:08Z")

</div>

The code in question takes some interpolants of wind/water vector fields (in the MWE I have replaced these with interpolations of a constant), then constructs a Clump, which is a system of two first order ODEs for the x,…

---

## [Installing Julia from within R/Python](https://discourse.julialang.org/t/installing-julia-from-within-r-python/100363)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 1\
**Last updated:** [June 15, 2023, 12:41am UTC](https://discourse.julialang.org/t/installing-julia-from-within-r-python/100363 "2023-06-15T00:41:56Z")

</div>

Hi community, I’m trying to write a Python/R wrapper for my Julia package. Initially I was following DifferentialEquations.jl’s example via diffeqr and diffeqpy, but I’m encountering major obstacles because: I want R/P…

---

## [Installation of Julia on SCO OpenServer](https://discourse.julialang.org/t/installation-of-julia-on-sco-openserver/84239)

<div class="topic-metadata">

**Author:** [@Jim](https://discourse.julialang.org/u/Jim)\
**Replies:** 58\
**Last updated:** [June 14, 2023, 11:42pm UTC](https://discourse.julialang.org/t/installation-of-julia-on-sco-openserver/84239 "2023-06-14T23:42:08Z")

</div>

I downloaded the Unix binary, gunzip, tar xvf, and chmod to execute. No errors, it just doesn’t do anything. What did I miss?

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=277)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=279)
