# General Usage

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

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

**Page:** 360

---

## [Running a process on several nodes on cluster](https://discourse.julialang.org/t/running-a-process-on-several-nodes-on-cluster/91203)

<div class="topic-metadata">

**Author:** [@Rick](https://discourse.julialang.org/u/Rick)\
**Replies:** 12\
**Last updated:** [December 6, 2022, 3:56am UTC](https://discourse.julialang.org/t/running-a-process-on-several-nodes-on-cluster/91203 "2022-12-06T03:56:42Z")

</div>

Hi everyone, I am trying to run a process that requires a huge amount of memory on several nodes on cluster. I am trying to use the Distributed.jl package, but it does not seem to work, so I would like to seek some advi…

---

## [How to use DataDrivenDiffEq.jl for simple Sparse Identification without ODE](https://discourse.julialang.org/t/how-to-use-datadrivendiffeq-jl-for-simple-sparse-identification-without-ode/91114)

<div class="topic-metadata">

**Author:** [@Molox](https://discourse.julialang.org/u/Molox)\
**Replies:** 2\
**Last updated:** [December 5, 2022, 10:14pm UTC](https://discourse.julialang.org/t/how-to-use-datadrivendiffeq-jl-for-simple-sparse-identification-without-ode/91114 "2022-12-05T22:14:53Z")

</div>

I try to estimate an expression of y=sin(w+x) where I need to have a parameter of w. It gives an error during solve step. I know it is related to the parameter w but has no clue how to debug. I saw examples with differe…

---

## [Fail to render LATEX output using Weave](https://discourse.julialang.org/t/fail-to-render-latex-output-using-weave/75670)

<div class="topic-metadata">

**Author:** [@lobshi](https://discourse.julialang.org/u/lobshi)\
**Replies:** 1\
**Last updated:** [December 5, 2022, 9:17pm UTC](https://discourse.julialang.org/t/fail-to-render-latex-output-using-weave/75670 "2022-12-05T21:17:54Z")

</div>

I am using macOS and VScode. I find Weave.jl fail to render LATEX output. Example code: # Demo \*\*Everything\*\* works fine, \_except\_ for LATEX elements. I want beta in \`LATEX\`: 1. $\\beta$ 2. \`\`\\beta\`\` 3. $$\\beta$$ 4. \`\`…

---

## [Warning: could not download https://pkg.julialang.org/registries julia 1.6.3](https://discourse.julialang.org/t/warning-could-not-download-https-pkg-julialang-org-registries-julia-1-6-3/69186)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 13\
**Last updated:** [September 22, 2022, 12:50pm UTC](https://discourse.julialang.org/t/warning-could-not-download-https-pkg-julialang-org-registries-julia-1-6-3/69186 "2022-09-22T12:50:16Z")

</div>

This alert began to appear 3 days ago !!! Previously, everything was running satisfactorily. \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_ \_ \_| |\_ …

---

## [How To Avoiding Allocations in Static Structs](https://discourse.julialang.org/t/how-to-avoiding-allocations-in-static-structs/91196)

<div class="topic-metadata">

**Author:** [@cdelv](https://discourse.julialang.org/u/cdelv)\
**Replies:** 4\
**Last updated:** [December 5, 2022, 4:48pm UTC](https://discourse.julialang.org/t/how-to-avoiding-allocations-in-static-structs/91196 "2022-12-05T16:48:08Z")

</div>

Hi, I’m doing an MD simulation and have a problem getting good performance with static structs. The idea is to have a struct that represents a particle. I checked that using static structs is the fastest (nice) way of do…

---

## [N-dimensional ConvLayer by scratch with all the bells and whistles but... super super slow :-/](https://discourse.julialang.org/t/n-dimensional-convlayer-by-scratch-with-all-the-bells-and-whistles-but-super-super-slow/91104)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [December 5, 2022, 4:30pm UTC](https://discourse.julialang.org/t/n-dimensional-convlayer-by-scratch-with-all-the-bells-and-whistles-but-super-super-slow/91104 "2022-12-05T16:30:59Z")

</div>

I just implemented a fully-from-scratch convolutional layer on my BetaML ML lib. It works with or without autodiff, it accepts infinite dimensions, nchannels input/output, padding, stride… training even works …

---

## [Makie 3D arrows scale in a strange fashion](https://discourse.julialang.org/t/makie-3d-arrows-scale-in-a-strange-fashion/89371)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 5\
**Last updated:** [December 5, 2022, 4:29pm UTC](https://discourse.julialang.org/t/makie-3d-arrows-scale-in-a-strange-fashion/89371 "2022-12-05T16:29:52Z")

</div>

I’m currently using a plot with a lot of arrows drawn into it. Sometimes I want to have both the length of the arrows and their size (cylinder / cone diameter in 3D) be proportional to a given value. The following plot …

---

## [Performant and user-friendly function only through metaprogramming?](https://discourse.julialang.org/t/performant-and-user-friendly-function-only-through-metaprogramming/91268)

<div class="topic-metadata">

**Author:** [@corbat](https://discourse.julialang.org/u/corbat)\
**Replies:** 1\
**Last updated:** [December 5, 2022, 3:49pm UTC](https://discourse.julialang.org/t/performant-and-user-friendly-function-only-through-metaprogramming/91268 "2022-12-05T15:49:11Z")

</div>

Hi, I have a question on how to write performant functions that are still somewhat convenient for the user. I have an application where I need to run optimizers on custom functions, i.e., the functions are called very o…

---

## [@spawn and @async in producer-consumer problem](https://discourse.julialang.org/t/spawn-and-async-in-producer-consumer-problem/91252)

<div class="topic-metadata">

**Author:** [@achjaj](https://discourse.julialang.org/u/achjaj)\
**Replies:** 4\
**Last updated:** [December 5, 2022, 2:09pm UTC](https://discourse.julialang.org/t/spawn-and-async-in-producer-consumer-problem/91252 "2022-12-05T14:09:37Z")

</div>

Hello, I am trying to implement a producer-consumer problem, where I want one thread to produce some data and a second thread to take the data and write them to a disk. I am using Channel as my queue so that the produce…

---

## [Makie does not update the plot during an animation](https://discourse.julialang.org/t/makie-does-not-update-the-plot-during-an-animation/91109)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 15\
**Last updated:** [December 5, 2022, 9:17am UTC](https://discourse.julialang.org/t/makie-does-not-update-the-plot-during-an-animation/91109 "2022-12-05T09:17:07Z")

</div>

Working with lots of geometry objects, I wrote some recipes to plot such objects using low-level commands like lines! and scatter! I have a master-recipe that combines all of those so that my call sequence remains simpl…

---

## [Error with Julia-Client incompatible with the current version of Atom](https://discourse.julialang.org/t/error-with-julia-client-incompatible-with-the-current-version-of-atom/91229)

<div class="topic-metadata">

**Author:** [@Jorisboyx](https://discourse.julialang.org/u/Jorisboyx)\
**Replies:** 2\
**Last updated:** [December 4, 2022, 9:52pm UTC](https://discourse.julialang.org/t/error-with-julia-client-incompatible-with-the-current-version-of-atom/91229 "2022-12-04T21:52:08Z")

</div>

I suddenly came across this problem on Mac. Do I need to reinstall julia? I clicked the rebuilt but it failed.

---

## [Example for Linear Quadratic Gaussion control design](https://discourse.julialang.org/t/example-for-linear-quadratic-gaussion-control-design/11829)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [December 4, 2022, 6:24pm UTC](https://discourse.julialang.org/t/example-for-linear-quadratic-gaussion-control-design/11829 "2022-12-04T18:24:21Z")

</div>

Hello, My colleague and me wrote the following example for LQG design of a speed controller of a DC motor: using ControlSystems """ Example for designing an LQG speed controller for an electrical DC motor. """ # Const…

---

## [Automatic Function loading](https://discourse.julialang.org/t/automatic-function-loading/91199)

<div class="topic-metadata">

**Author:** [@SergeantMike67](https://discourse.julialang.org/u/SergeantMike67)\
**Replies:** 2\
**Last updated:** [December 4, 2022, 5:54pm UTC](https://discourse.julialang.org/t/automatic-function-loading/91199 "2022-12-04T17:54:41Z")

</div>

I have created a function that calculates the time to either numbers or percentages of an insect emergence that fits a Gompertz model almost exactly. What I am curious about is that I find I am using this function quite…

---

## [About three dot in julia vector](https://discourse.julialang.org/t/about-three-dot-in-julia-vector/91216)

<div class="topic-metadata">

**Author:** [@Xuekui\_wang](https://discourse.julialang.org/u/Xuekui_wang)\
**Replies:** 2\
**Last updated:** [December 4, 2022, 3:13pm UTC](https://discourse.julialang.org/t/about-three-dot-in-julia-vector/91216 "2022-12-04T15:13:14Z")

</div>

I am a newer to julia, and cannot understand the use of three dot although have read some documents. For example as follows: A is two elements vector of (x,y); B is six elements vector of (1,2,3,4,5,6); C is four eleme…

---

## [Cygwin mishap with Julia 1.9.0-alpha1 / Plots (dlopen cant open libcairo-2.dll](https://discourse.julialang.org/t/cygwin-mishap-with-julia-1-9-0-alpha1-plots-dlopen-cant-open-libcairo-2-dll/91179)

<div class="topic-metadata">

**Author:** [@jdad](https://discourse.julialang.org/u/jdad)\
**Replies:** 5\
**Last updated:** [December 4, 2022, 2:10pm UTC](https://discourse.julialang.org/t/cygwin-mishap-with-julia-1-9-0-alpha1-plots-dlopen-cant-open-libcairo-2-dll/91179 "2022-12-04T14:10:50Z")

</div>

I have downloaded julia-1.9.0-alpha1, and in REPL (Terminal) it works OK.\` However, when I try to use it with Plots under Cygwin, Plots does not inits : davidj@vivojdw ~$ julia19 \_ \_ \_ \_(\_)\_ …

---

## [How to extract links from HTML](https://discourse.julialang.org/t/how-to-extract-links-from-html/91175)

<div class="topic-metadata">

**Author:** [@edas](https://discourse.julialang.org/u/edas)\
**Replies:** 2\
**Last updated:** [December 4, 2022, 1:53pm UTC](https://discourse.julialang.org/t/how-to-extract-links-from-html/91175 "2022-12-04T13:53:46Z")

</div>

I want to extract links form HTML using Cascadia using Gumbo using HTTP,AbstractTrees r = HTTP.get("https://example.com/") h = parsehtml(String(r.body)) body = h.root\[2\] link = eachmatch(Selector("a"), body) Result: …

---

## [Scipy.signal.convolve in Julia](https://discourse.julialang.org/t/scipy-signal-convolve-in-julia/91140)

<div class="topic-metadata">

**Author:** [@Resul.Akay](https://discourse.julialang.org/u/Resul.Akay)\
**Replies:** 6\
**Last updated:** [December 4, 2022, 1:02pm UTC](https://discourse.julialang.org/t/scipy-signal-convolve-in-julia/91140 "2022-12-04T13:02:33Z")

</div>

Hi I am looking for an implementation of scipy.signal.convolve. Is there an implementation in Julia? Or convolution Linear Filtering similar to R stats::filter Thanks

---

## [Calling a C function from within a Julia program](https://discourse.julialang.org/t/calling-a-c-function-from-within-a-julia-program/63643)

<div class="topic-metadata">

**Author:** [@mmv](https://discourse.julialang.org/u/mmv)\
**Replies:** 21\
**Last updated:** [December 4, 2022, 9:50am UTC](https://discourse.julialang.org/t/calling-a-c-function-from-within-a-julia-program/63643 "2022-12-04T09:50:33Z")

</div>

Hi! I’m using Julia 1.6.1 on a MacBook Pro and trying to use the MISR-Toolkit library of C functions within Julia programs. This library is maintained by NASA/JPL and available from GitHub at I was able to access func…

---

## [How to overload Base.Complex?](https://discourse.julialang.org/t/how-to-overload-base-complex/91128)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 23\
**Last updated:** [December 4, 2022, 9:12am UTC](https://discourse.julialang.org/t/how-to-overload-base-complex/91128 "2022-12-04T09:12:50Z")

</div>

import Base: Complex struct Complex{T} re::T im::T end gives cannot assign a value to variable Base.Complex from module Main Stacktrace: \[1\] top-level scope @ In\[6\]:1 \[2\] eval @ .\\boot.jl:360 \[inlined…

---

## [Failed to load module "colorreload-gtk-module" / "window-decorations-gtk-module"](https://discourse.julialang.org/t/failed-to-load-module-colorreload-gtk-module-window-decorations-gtk-module/91118)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 6\
**Last updated:** [December 4, 2022, 8:46am UTC](https://discourse.julialang.org/t/failed-to-load-module-colorreload-gtk-module-window-decorations-gtk-module/91118 "2022-12-04T08:46:25Z")

</div>

I am frustrated, under Ubuntu 22.04 it is not possible to pipe the output of PlotlyJS to the default web-browser. Today I found the advice to edit the Gtk-configuration file settings.ini in the following forum thread: ge…

---

## [Creating connection using AMQPClient takes one second](https://discourse.julialang.org/t/creating-connection-using-amqpclient-takes-one-second/91212)

<div class="topic-metadata">

**Author:** [@JesperMartinsson](https://discourse.julialang.org/u/JesperMartinsson)\
**Replies:** 0\
**Last updated:** [December 4, 2022, 8:13am UTC](https://discourse.julialang.org/t/creating-connection-using-amqpclient-takes-one-second/91212 "2022-12-04T08:13:17Z")

</div>

I’m comparing the AMQPClient in julia vs using pika in python based on the tutorials provided by RabbitMQ. I notice that creating a connection with pika is almost instantaneous: connection = pika.BlockingConnection(pika…

---

## [Clang vs CBindingGen](https://discourse.julialang.org/t/clang-vs-cbindinggen/56693)

<div class="topic-metadata">

**Author:** [@mhinsch](https://discourse.julialang.org/u/mhinsch)\
**Replies:** 29\
**Last updated:** [December 4, 2022, 7:43am UTC](https://discourse.julialang.org/t/clang-vs-cbindinggen/56693 "2022-12-04T07:43:50Z")

</div>

I’m thinking about generating a wrapper for a pure C library (raylib). So far I have found two options for doing that (semi-) automatically: Clang and CBindingGen. Clang seems to be the default option, but while documen…

---

## [Equivalent of "lchoose" function from R?](https://discourse.julialang.org/t/equivalent-of-lchoose-function-from-r/91205)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 7\
**Last updated:** [December 4, 2022, 4:42am UTC](https://discourse.julialang.org/t/equivalent-of-lchoose-function-from-r/91205 "2022-12-04T04:42:20Z")

</div>

In R there’s a function lchoose(a,b) which computes the logarithm of the binomial coefficient or choose(a,b) number (number of ways to choose b items from a set of a). This is the only way to work with really big numbers…

---

## [Why \`\`julia -e\`\` does not work on Windows?](https://discourse.julialang.org/t/why-julia-e-does-not-work-on-windows/91195)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 6\
**Last updated:** [December 4, 2022, 2:32am UTC](https://discourse.julialang.org/t/why-julia-e-does-not-work-on-windows/91195 "2022-12-04T02:32:24Z")

</div>

C:\\Users\\joaqu\\zzz\>julia -e "using Pkg; Pkg.activate(".")" ERROR: syntax: invalid identifier name "." Stacktrace: \[1\] top-level scope but no problem on Linux j@Marilu:~/aaa$ julia -e 'using Pkg; Pkg.activate(".");' …

---

## [Computation precision with Float](https://discourse.julialang.org/t/computation-precision-with-float/91180)

<div class="topic-metadata">

**Author:** [@dgagnon](https://discourse.julialang.org/u/dgagnon)\
**Replies:** 8\
**Last updated:** [December 3, 2022, 9:39pm UTC](https://discourse.julialang.org/t/computation-precision-with-float/91180 "2022-12-03T21:39:32Z")

</div>

I see strange behavior for the computation of a very simple formula: julia\> rounding(Float64) RoundingMode{:Nearest}() julia\> p=0.8 0.8 julia\> 1-p 0.19999999999999996 I have the same result with Julia 1.8.0 on Windows1…

---

## [Capture a Julia output in the clipboard](https://discourse.julialang.org/t/capture-a-julia-output-in-the-clipboard/91186)

<div class="topic-metadata">

**Author:** [@\_stla](https://discourse.julialang.org/u/_stla)\
**Replies:** 8\
**Last updated:** [December 3, 2022, 9:22pm UTC](https://discourse.julialang.org/t/capture-a-julia-output-in-the-clipboard/91186 "2022-12-03T21:22:28Z")

</div>

Hello, Currently I don’t have a mouse and the pad of my laptop is really really bad: I can’t select some text. But I need to copy-paste some Julia outputs. How can I capture the output of a function and write it in the…

---

## [Exact integral of a polynomial over a simplex](https://discourse.julialang.org/t/exact-integral-of-a-polynomial-over-a-simplex/91132)

<div class="topic-metadata">

**Author:** [@\_stla](https://discourse.julialang.org/u/_stla)\
**Replies:** 5\
**Last updated:** [December 3, 2022, 8:26pm UTC](https://discourse.julialang.org/t/exact-integral-of-a-polynomial-over-a-simplex/91132 "2022-12-03T20:26:30Z")

</div>

Hello, I wrote a function which computes the exact value of a multivariate polynomial over a simplex. I’m open to any comment on my code. I also implemented this method in Python. I’m sure it is correct, I multi-checke…

---

## [Returning vector of Distribution parameters](https://discourse.julialang.org/t/returning-vector-of-distribution-parameters/91185)

<div class="topic-metadata">

**Author:** [@simonrschultz](https://discourse.julialang.org/u/simonrschultz)\
**Replies:** 2\
**Last updated:** [December 3, 2022, 5:46pm UTC](https://discourse.julialang.org/t/returning-vector-of-distribution-parameters/91185 "2022-12-03T17:46:15Z")

</div>

Hello, apologies if this is a very basic question, but I am still getting to grips with some elements of Julia. I am generating an array of Gamma distributions. I want to pull the distribution parameters out to plot the…

---

## [Memory allocations after reading arrays from .mat file](https://discourse.julialang.org/t/memory-allocations-after-reading-arrays-from-mat-file/91124)

<div class="topic-metadata">

**Author:** [@Gravlax](https://discourse.julialang.org/u/Gravlax)\
**Replies:** 6\
**Last updated:** [December 3, 2022, 2:29pm UTC](https://discourse.julialang.org/t/memory-allocations-after-reading-arrays-from-mat-file/91124 "2022-12-03T14:29:38Z")

</div>

Dear all, I have written script that reads arrays from a .mat file and allocated new arrays based on the size of the arrays read from the .mat file. The issue is that when the new arrays are allocated using the size of…

---

## [How to subset dataframe whose first column is smaller than the second column?](https://discourse.julialang.org/t/how-to-subset-dataframe-whose-first-column-is-smaller-than-the-second-column/91178)

<div class="topic-metadata">

**Author:** [@zhangchunyong](https://discourse.julialang.org/u/zhangchunyong)\
**Replies:** 1\
**Last updated:** [December 3, 2022, 1:30pm UTC](https://discourse.julialang.org/t/how-to-subset-dataframe-whose-first-column-is-smaller-than-the-second-column/91178 "2022-12-03T13:30:26Z")

</div>

I have a dataframe,and I want to subset the dataframe whose first column is smaller than second column. julia\> a=DataFrame(p=\[1,2,3,4,5,6\],q=\[1,2,4,5,2,9\]) 6×2 DataFrame Row │ p q │ Int64 Int64 ─────┼───────…

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

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