# General Usage

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

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

**Page:** 210

---

## [MQTT Package?](https://discourse.julialang.org/t/mqtt-package/83148)

<div class="topic-metadata">

**Author:** [@sampope](https://discourse.julialang.org/u/sampope)\
**Replies:** 6\
**Last updated:** [January 19, 2024, 2:14pm UTC](https://discourse.julialang.org/t/mqtt-package/83148 "2024-01-19T14:14:26Z")

</div>

Hi, I need to interact with a MQTT broker service. JuliaHub lists no packages for MQTT itself. I found MQTT.jl on github from 4 years ago. However it doesn’t compile as a package. and it doesn’t run well at all. I start…

---

## [\`include\` can also track the change of the file?](https://discourse.julialang.org/t/include-can-also-track-the-change-of-the-file/108971)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 4\
**Last updated:** [January 19, 2024, 8:04am UTC](https://discourse.julialang.org/t/include-can-also-track-the-change-of-the-file/108971 "2024-01-19T08:04:36Z")

</div>

I found it seems that just include instead includet a file can also track the change of this file. Is this a new feature of julia or Revise.jl?

---

## [Windows Developer Mode and Julia](https://discourse.julialang.org/t/windows-developer-mode-and-julia/108937)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 4\
**Last updated:** [January 19, 2024, 6:21am UTC](https://discourse.julialang.org/t/windows-developer-mode-and-julia/108937 "2024-01-19T06:21:13Z")

</div>

Microsoft Windows has a relatively new Developer Mode that has some impact on how Julia is used and functions on that platform. One effect of Developer Mode is enabling symbolic links. Symbolic links are fancy shortc…

---

## [MethodOfLines](https://discourse.julialang.org/t/methodoflines/108387)

<div class="topic-metadata">

**Author:** [@Naceur\_Bouziani](https://discourse.julialang.org/u/Naceur_Bouziani)\
**Replies:** 8\
**Last updated:** [January 19, 2024, 5:58am UTC](https://discourse.julialang.org/t/methodoflines/108387 "2024-01-19T05:58:30Z")

</div>

Hi Everybody & happy new year to all :slight\_smile: Happy new year Alex and Chris :slight\_smile: I installed the new version of Julia 1.10. I was surprised by not usual error in MethodOfLines package … so I uninstalled…

---

## [Package to extract jll(s) and/or artifact(s) to use as CLI program](https://discourse.julialang.org/t/package-to-extract-jll-s-and-or-artifact-s-to-use-as-cli-program/108989)

<div class="topic-metadata">

**Author:** [@bdk](https://discourse.julialang.org/u/bdk)\
**Replies:** 2\
**Last updated:** [January 19, 2024, 4:15am UTC](https://discourse.julialang.org/t/package-to-extract-jll-s-and-or-artifact-s-to-use-as-cli-program/108989 "2024-01-19T04:15:20Z")

</div>

I swear I once came across a package which which would extract julia artifacts (jll?) into a standalone unit. But I can’t remember the name to find it. Am I dreaming this? As I recall, it could either symlink the deps f…

---

## [Encountering Precompilation Error Messages When Adding NeuralPDE Package in Julia](https://discourse.julialang.org/t/encountering-precompilation-error-messages-when-adding-neuralpde-package-in-julia/108623)

<div class="topic-metadata">

**Author:** [@Edylennyy\_Edy](https://discourse.julialang.org/u/Edylennyy_Edy)\
**Replies:** 3\
**Last updated:** [January 19, 2024, 3:40am UTC](https://discourse.julialang.org/t/encountering-precompilation-error-messages-when-adding-neuralpde-package-in-julia/108623 "2024-01-19T03:40:32Z")

</div>

I’m currently working on a Julia project where I need to use the NeuralPDE package. However, when I try to add and precompile this package, I’m encountering several error messages related to dependencies. Here’s a summar…

---

## [GLMakie crashes during build on Google Colab](https://discourse.julialang.org/t/glmakie-crashes-during-build-on-google-colab/108987)

<div class="topic-metadata">

**Author:** [@pxshen](https://discourse.julialang.org/u/pxshen)\
**Replies:** 5\
**Last updated:** [January 19, 2024, 1:07am UTC](https://discourse.julialang.org/t/glmakie-crashes-during-build-on-google-colab/108987 "2024-01-19T01:07:52Z")

</div>

GLMakie fails to build on Google Colab notebook: Precompiling GLMakie ✗ GLFW\_jll ✗ GLFW Info Given GLMakie was explicitly requested, output will be shown live ERROR: LoadError: InitError: could not load library “/ro…

---

## [How to list all the functions and types in Base?](https://discourse.julialang.org/t/how-to-list-all-the-functions-and-types-in-base/108756)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 7\
**Last updated:** [January 19, 2024, 2:18am UTC](https://discourse.julialang.org/t/how-to-list-all-the-functions-and-types-in-base/108756 "2024-01-19T02:18:56Z")

</div>

I want a complete list of functions in the Base module. What should I do?

---

## [Where do I get/generate exercises for using Julia packages?](https://discourse.julialang.org/t/where-do-i-get-generate-exercises-for-using-julia-packages/108990)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 0\
**Last updated:** [January 19, 2024, 12:10am UTC](https://discourse.julialang.org/t/where-do-i-get-generate-exercises-for-using-julia-packages/108990 "2024-01-19T00:10:36Z")

</div>

I’ve learned to use JuMP and Transducer in Julia by accident because I had problems that I had to solve that served as exercises for me. However, unlike Tensorflow, PyTorch, there is no exercise for Flux, getting started…

---

## [Casting struct into an apparently identical type](https://discourse.julialang.org/t/casting-struct-into-an-apparently-identical-type/108980)

<div class="topic-metadata">

**Author:** [@mike.ingold](https://discourse.julialang.org/u/mike.ingold)\
**Replies:** 2\
**Last updated:** [January 18, 2024, 6:55pm UTC](https://discourse.julialang.org/t/casting-struct-into-an-apparently-identical-type/108980 "2024-01-18T18:55:23Z")

</div>

Is it possible (even if hacky and not advisable) to do something like the following? Forewarning: this is a contrived example that just happens to work as an MWE exercise for my use case. Let Foo be some type whose defi…

---

## [Compilation time with \`@time\` wrong with multi-threading?](https://discourse.julialang.org/t/compilation-time-with-time-wrong-with-multi-threading/108978)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 3\
**Last updated:** [January 18, 2024, 6:45pm UTC](https://discourse.julialang.org/t/compilation-time-with-time-wrong-with-multi-threading/108978 "2024-01-18T18:45:58Z")

</div>

It seems that compilation time is not properly computed when a function is run multi-threaded, apparently increasing with the number of threads. For example, take the standard sum example of the docs: julia\> function su…

---

## [NTuple{N}(v) silently truncates when length(v) \> N](https://discourse.julialang.org/t/ntuple-n-v-silently-truncates-when-length-v-n/108959)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [January 18, 2024, 6:16pm UTC](https://discourse.julialang.org/t/ntuple-n-v-silently-truncates-when-length-v-n/108959 "2024-01-18T18:16:23Z")

</div>

MWE: julia\> NTuple{3}(zeros(4)) (0.0, 0.0, 0.0) I expected an error, am I missing something? (on Julia 1.10, master, 1.9, etc, this is not new)

---

## [Reading a few rows from a BIG CSV file](https://discourse.julialang.org/t/reading-a-few-rows-from-a-big-csv-file/68611)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 39\
**Last updated:** [January 18, 2024, 4:35pm UTC](https://discourse.julialang.org/t/reading-a-few-rows-from-a-big-csv-file/68611 "2024-01-18T16:35:17Z")

</div>

I’m reading a Census bureau CSV file that’s 2.2M rows long. I’d like to just read the first hundred rows to check my stuff works… df = Iterators.take(CSV.Rows("filename.csv"),100) |\> DataFrame Doesn’t terminate in any…

---

## [Different result of \`===\` between \`@runtest\` and REPL](https://discourse.julialang.org/t/different-result-of-between-runtest-and-repl/108924)

<div class="topic-metadata">

**Author:** [@bthorne93](https://discourse.julialang.org/u/bthorne93)\
**Replies:** 6\
**Last updated:** [January 18, 2024, 3:37pm UTC](https://discourse.julialang.org/t/different-result-of-between-runtest-and-repl/108924 "2024-01-18T15:37:21Z")

</div>

In an entirely clean package, the following unit test passes: using Test @testset begin function build\_matrix() A = zeros(2, 2) A\[1, 2\] = A\[2, 1\] = 1 return A end A = build\_mat…

---

## [Status of immutable variable-size arrays?](https://discourse.julialang.org/t/status-of-immutable-variable-size-arrays/108942)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 7\
**Last updated:** [January 18, 2024, 2:21pm UTC](https://discourse.julialang.org/t/status-of-immutable-variable-size-arrays/108942 "2024-01-18T14:21:15Z")

</div>

Hello, which is the situation for arrays that are immutable but their size is known only at run time ? I see there is an old discussion here, and then some “experimental” PR that has been rebased several times (here and…

---

## [How to improve performances of this multiplication -\> sum](https://discourse.julialang.org/t/how-to-improve-performances-of-this-multiplication-sum/108955)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 6\
**Last updated:** [January 18, 2024, 1:48pm UTC](https://discourse.julialang.org/t/how-to-improve-performances-of-this-multiplication-sum/108955 "2024-01-18T13:48:08Z")

</div>

I am trying hard to improve the performances of this function that just sum a serie of multiplications, but where all the data is given in terms of indices: This is my data: using BenchmarkTools, LoopVectorization x …

---

## [Save RuntimeGeneratedFunction or Expr to file for later use](https://discourse.julialang.org/t/save-runtimegeneratedfunction-or-expr-to-file-for-later-use/108775)

<div class="topic-metadata">

**Author:** [@ejmeitz](https://discourse.julialang.org/u/ejmeitz)\
**Replies:** 7\
**Last updated:** [January 18, 2024, 1:15pm UTC](https://discourse.julialang.org/t/save-runtimegeneratedfunction-or-expr-to-file-for-later-use/108775 "2024-01-18T13:15:51Z")

</div>

I am using a library to generate a rather expensive function which is returned as a RuntimeGeneratedFunction that I am also able to convert into an Expr. I would like to avoid having to re-generate this function and was …

---

## [How to do gradient clipping in Julia for large for loops](https://discourse.julialang.org/t/how-to-do-gradient-clipping-in-julia-for-large-for-loops/108402)

<div class="topic-metadata">

**Author:** [@Devetak](https://discourse.julialang.org/u/Devetak)\
**Replies:** 3\
**Last updated:** [January 18, 2024, 10:10am UTC](https://discourse.julialang.org/t/how-to-do-gradient-clipping-in-julia-for-large-for-loops/108402 "2024-01-18T10:10:53Z")

</div>

Hello. I have a function that has many for loops. For example: function f(x) res = 1.0 for i in 1:1000000 res = res \* x^2 end return res / x end of…

---

## [An annoying setting of vscode](https://discourse.julialang.org/t/an-annoying-setting-of-vscode/108944)

<div class="topic-metadata">

**Author:** [@jiang\_ming\_zhang](https://discourse.julialang.org/u/jiang_ming_zhang)\
**Replies:** 1\
**Last updated:** [January 18, 2024, 10:01am UTC](https://discourse.julialang.org/t/an-annoying-setting-of-vscode/108944 "2024-01-18T10:01:42Z")

</div>

I am using vscode. I find it very annoying that the cursor is automatically set in the editor panel. That is code! The cursor should be automatically set in the REPL panel.

---

## [Hand written loop slower than bitVector broadcast](https://discourse.julialang.org/t/hand-written-loop-slower-than-bitvector-broadcast/108881)

<div class="topic-metadata">

**Author:** [@djholiver](https://discourse.julialang.org/u/djholiver)\
**Replies:** 15\
**Last updated:** [January 18, 2024, 2:56am UTC](https://discourse.julialang.org/t/hand-written-loop-slower-than-bitvector-broadcast/108881 "2024-01-18T02:56:42Z")

</div>

Hi, MWE below I have a use case for intersection of lists of sorted integer vectors with a vector of sorted integers i.e. intersect!(vec :: Vector{Int},vectorOfVectors::Vector{Vector{Int}}) because the vectorOfVecto…

---

## [Improving speed with iterative sums and functions within functions](https://discourse.julialang.org/t/improving-speed-with-iterative-sums-and-functions-within-functions/108927)

<div class="topic-metadata">

**Author:** [@clairevalva](https://discourse.julialang.org/u/clairevalva)\
**Replies:** 4\
**Last updated:** [January 17, 2024, 9:56pm UTC](https://discourse.julialang.org/t/improving-speed-with-iterative-sums-and-functions-within-functions/108927 "2024-01-17T21:56:44Z")

</div>

Hi all — I’m having some problems making this bit of code run at a reasonable speed. In essence, I have functions defined within functions, where the innermost function evaluates a sum. Then, I end up combining functions…

---

## [ERROR: X depends on Y, but no such entry exists in the manifest](https://discourse.julialang.org/t/error-x-depends-on-y-but-no-such-entry-exists-in-the-manifest/108920)

<div class="topic-metadata">

**Author:** [@AlexisRenchon](https://discourse.julialang.org/u/AlexisRenchon)\
**Replies:** 0\
**Last updated:** [January 17, 2024, 5:05pm UTC](https://discourse.julialang.org/t/error-x-depends-on-y-but-no-such-entry-exists-in-the-manifest/108920 "2024-01-17T17:05:16Z")

</div>

Hi, I am working on a package , I can instantiate it with no problem on my local computer, and my colleagues have no problem to instantiate it on their computer too. However, we have a CI remote that error when trying …

---

## [How to Collect Data from a Async Call?](https://discourse.julialang.org/t/how-to-collect-data-from-a-async-call/50825)

<div class="topic-metadata">

**Author:** [@DataPsycho](https://discourse.julialang.org/u/DataPsycho)\
**Replies:** 5\
**Last updated:** [November 28, 2020, 5:46am UTC](https://discourse.julialang.org/t/how-to-collect-data-from-a-async-call/50825 "2020-11-28T05:46:54Z")

</div>

Hi, I have build a application where I have a function which collect data from a API call then store it to a Array as follows: using DotEnv, HTTP, JSON3 DotEnv.config(); # Function to collect data function collect\_dat…

---

## [Does Julia optimize code automatically?](https://discourse.julialang.org/t/does-julia-optimize-code-automatically/108913)

<div class="topic-metadata">

**Author:** [@MatheusJanczkowski](https://discourse.julialang.org/u/MatheusJanczkowski)\
**Replies:** 2\
**Last updated:** [January 17, 2024, 4:41pm UTC](https://discourse.julialang.org/t/does-julia-optimize-code-automatically/108913 "2024-01-17T16:41:04Z")

</div>

I have a piece of code as follows for i=1:n b = (M .+d\*N)\*v + (M\*g.+ N\*h)\*a end b, v and a are n x 1 vectors; while M and N are n x n matrices. d, g and h are constants that do not change during the loop as well …

---

## [Non-constructor functions inside struct](https://discourse.julialang.org/t/non-constructor-functions-inside-struct/14078)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 11\
**Last updated:** [January 17, 2024, 1:52pm UTC](https://discourse.julialang.org/t/non-constructor-functions-inside-struct/14078 "2024-01-17T13:52:49Z")

</div>

I was trying to define a function which has access to new, but is different from the constructor. Consider this MnWE: julia\> struct Foo x::Int bar(x::Int) = new(x) end julia\> methods(bar) ERROR: Un…

---

## ["Julia \[IncorrectCallArgs\]: Possible Method Call Error" in Emacs after Julia 1.10 Update](https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113)

<div class="topic-metadata">

**Author:** [@ehsani63](https://discourse.julialang.org/u/ehsani63)\
**Replies:** 7\
**Last updated:** [January 17, 2024, 11:30am UTC](https://discourse.julialang.org/t/julia-incorrectcallargs-possible-method-call-error-in-emacs-after-julia-1-10-update/108113 "2024-01-17T11:30:00Z")

</div>

I’ve just updated to Julia 1.10 and have encountered an issue in Emacs (version 30) using eglot and eglot-jl. Specifically, I’m receiving flymake messages stating “Julia \[IncorrectCallArgs\]: Possible method call error” o…

---

## [Julia Circles Unicode Emoji](https://discourse.julialang.org/t/julia-circles-unicode-emoji/108539)

<div class="topic-metadata">

**Author:** [@svretina](https://discourse.julialang.org/u/svretina)\
**Replies:** 8\
**Last updated:** [January 17, 2024, 11:21am UTC](https://discourse.julialang.org/t/julia-circles-unicode-emoji/108539 "2024-01-17T11:21:22Z")

</div>

I wanted the julia circles logo for my personal website. Although this is possible to draw and include it as a picture, I wondered if there was a unicode character that I could use. It seems there is none. Is there inte…

---

## [Using CSV.read() to import data from a data input file into a DataFrame](https://discourse.julialang.org/t/using-csv-read-to-import-data-from-a-data-input-file-into-a-dataframe/77120)

<div class="topic-metadata">

**Author:** [@jjdegruijter](https://discourse.julialang.org/u/jjdegruijter)\
**Replies:** 27\
**Last updated:** [March 1, 2022, 7:38am UTC](https://discourse.julialang.org/t/using-csv-read-to-import-data-from-a-data-input-file-into-a-dataframe/77120 "2022-03-01T07:38:57Z")

</div>

In my homemade function ‘readdata()’ I have: Data = csv.read(filename; delim=‘,’, DataFrame) where ‘filename’ refers to one of my data inputfiles, named e.g. ‘instance.txt’. This resulted from my code in julia-1.0. W…

---

## [Must the return value of a function be printed on the last line of the REPL? (when called without a \`;\`)](https://discourse.julialang.org/t/must-the-return-value-of-a-function-be-printed-on-the-last-line-of-the-repl-when-called-without-a/108867)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 7\
**Last updated:** [January 17, 2024, 4:04am UTC](https://discourse.julialang.org/t/must-the-return-value-of-a-function-be-printed-on-the-last-line-of-the-repl-when-called-without-a/108867 "2024-01-17T04:04:06Z")

</div>

function f(x, y) s = x + y println("Look! The sum is $s.") return s end When I call this function with f(1, 2) the REPL prints: julia\> f(1, 2) Look! The sum is 3. 3 But I want the function to print the res…

---

## [From MKL back to OpenBLAS](https://discourse.julialang.org/t/from-mkl-back-to-openblas/37722)

<div class="topic-metadata">

**Author:** [@martincornejo](https://discourse.julialang.org/u/martincornejo)\
**Replies:** 15\
**Last updated:** [January 17, 2024, 2:04am UTC](https://discourse.julialang.org/t/from-mkl-back-to-openblas/37722 "2024-01-17T02:04:06Z")

</div>

After building MKL on Julia. julia\>\]add https://github.com/JuliaComputing/MKL.jl julia\>\] build MKL Is there a way to set OpenBLAS back?

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

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