# General Usage

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

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

**Page:** 500

---

## [How does \`Base.ImmutableDict\` work internally?](https://discourse.julialang.org/t/how-does-base-immutabledict-work-internally/74117)

<div class="topic-metadata">

**Author:** [@wmanning-cra](https://discourse.julialang.org/u/wmanning-cra)\
**Replies:** 1\
**Last updated:** [January 6, 2022, 2:20am UTC](https://discourse.julialang.org/t/how-does-base-immutabledict-work-internally/74117 "2022-01-06T02:20:16Z")

</div>

I just discovered Base.ImmutableDict, and it appears to be a very strange type. I get the core concept of a linked list of key-value pairs. But the reference to the next node is of type Base.ImmutableDict{K, V}. How can …

---

## [Julia is not rendering text correctly in the REPL](https://discourse.julialang.org/t/julia-is-not-rendering-text-correctly-in-the-repl/74098)

<div class="topic-metadata">

**Author:** [@etorkia](https://discourse.julialang.org/u/etorkia)\
**Replies:** 9\
**Last updated:** [January 5, 2022, 10:05pm UTC](https://discourse.julialang.org/t/julia-is-not-rendering-text-correctly-in-the-repl/74098 "2022-01-05T22:05:53Z")

</div>

Currently, I am running very simple loops using a custom function that generate an array. I am then taking the last value of the array and pushing it into another. Fortunately the function returns the right values but al…

---

## [Predict fails for simple case of GLM?](https://discourse.julialang.org/t/predict-fails-for-simple-case-of-glm/74102)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 6\
**Last updated:** [January 5, 2022, 8:09pm UTC](https://discourse.julialang.org/t/predict-fails-for-simple-case-of-glm/74102 "2022-01-05T20:09:52Z")

</div>

I am trying a simple example using the ISLR dataset ols = lm(@formula(sales ~ TV + radio + newspaper), adsData) this works OK: \`\`StatsModels.TableRegressionModel{LinearModel{GLM.LmResp{Vector{Float64}}, GLM.DensePred…

---

## [How make a true distributed program](https://discourse.julialang.org/t/how-make-a-true-distributed-program/73919)

<div class="topic-metadata">

**Author:** [@GalloLuigi](https://discourse.julialang.org/u/GalloLuigi)\
**Replies:** 5\
**Last updated:** [January 5, 2022, 4:18pm UTC](https://discourse.julialang.org/t/how-make-a-true-distributed-program/73919 "2022-01-05T16:18:31Z")

</div>

Hi on my local machine i have a program like this : using Distributed @distributed for(...) # some code end I want to “distribute” the for iterations to some remote virtual machines. How can I do it?

---

## [Can pluto handle real time data from python code](https://discourse.julialang.org/t/can-pluto-handle-real-time-data-from-python-code/73838)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 6\
**Last updated:** [January 5, 2022, 4:01pm UTC](https://discourse.julialang.org/t/can-pluto-handle-real-time-data-from-python-code/73838 "2022-01-05T16:01:08Z")

</div>

I am working on my first julia program and using an existing python script I wrote to give me a data stream. To develop I am using Pluto and PyCall and trying to implement a asynch callback that returns a stream of data…

---

## [Embedding Julia in C++: DLL procedure entry point errors](https://discourse.julialang.org/t/embedding-julia-in-c-dll-procedure-entry-point-errors/73792)

<div class="topic-metadata">

**Author:** [@Thorgrif](https://discourse.julialang.org/u/Thorgrif)\
**Replies:** 4\
**Last updated:** [January 5, 2022, 2:49pm UTC](https://discourse.julialang.org/t/embedding-julia-in-c-dll-procedure-entry-point-errors/73792 "2022-01-05T14:49:30Z")

</div>

Good afternoon, I’ve been trying to follow the basic guide for embedding Julia in C++, and I’m running into a problem when my C++ uses certain standard functions. Here’s a simple bit of test code that causes the prob…

---

## [What makes a worker terminate on a cluster?](https://discourse.julialang.org/t/what-makes-a-worker-terminate-on-a-cluster/61409)

<div class="topic-metadata">

**Author:** [@WouterJRV](https://discourse.julialang.org/u/WouterJRV)\
**Replies:** 16\
**Last updated:** [January 5, 2022, 2:02pm UTC](https://discourse.julialang.org/t/what-makes-a-worker-terminate-on-a-cluster/61409 "2022-01-05T14:02:12Z")

</div>

Hi, I am using the Julia language for calculations on a cluster. Typically, I define a few sharedarrays in the beginning of a script, and then do a @sync @distributed for over say 32 cores of a node to fill it (mainly u…

---

## [DataFrame grouped by a column; How to access a group by a particular value in that column](https://discourse.julialang.org/t/dataframe-grouped-by-a-column-how-to-access-a-group-by-a-particular-value-in-that-column/74084)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 1\
**Last updated:** [January 5, 2022, 12:41pm UTC](https://discourse.julialang.org/t/dataframe-grouped-by-a-column-how-to-access-a-group-by-a-particular-value-in-that-column/74084 "2022-01-05T12:41:59Z")

</div>

It’s the first time when I’m working with groupby a DataFrame. Let us say I have a DataFrame, grouped by city name: df=DataFrame(city=\["Paris", "London", "Paris", "Berlin", "London", "Berlin", "Berlin"\], …

---

## [Pkg error: identity of github.com could not be verified](https://discourse.julialang.org/t/pkg-error-identity-of-github-com-could-not-be-verified/74079)

<div class="topic-metadata">

**Author:** [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Replies:** 4\
**Last updated:** [January 5, 2022, 12:28pm UTC](https://discourse.julialang.org/t/pkg-error-identity-of-github-com-could-not-be-verified/74079 "2022-01-05T12:28:04Z")

</div>

I am having an issue after installing julia 1.7.1 on Ubuntu using Jill.py that Pkg updates result in an error: (@v1.7) pkg\> update Updating registry at \`~/.julia/registries/General\` Updating git-repo \`https://gi…

---

## [Is this the maximum perf i can obtain?](https://discourse.julialang.org/t/is-this-the-maximum-perf-i-can-obtain/74022)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 10\
**Last updated:** [January 5, 2022, 9:55am UTC](https://discourse.julialang.org/t/is-this-the-maximum-perf-i-can-obtain/74022 "2022-01-05T09:55:25Z")

</div>

Hi, I have a simple operation to make, which represents 80% of my runtime. I am trying to make it as fast as possible… Here is the sketch of the problem : using Statistics, BenchmarkTools function exp\_and\_mean!(slack,D…

---

## [Convert symbol to expression](https://discourse.julialang.org/t/convert-symbol-to-expression/74016)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 5\
**Last updated:** [January 5, 2022, 6:52am UTC](https://discourse.julialang.org/t/convert-symbol-to-expression/74016 "2022-01-05T06:52:15Z")

</div>

I’m trying to complete a DataFrame that omits some years with the average of adjacent years. For example: using DataFrames df = DataFrame(year = \[1995, 1996, 1997, 1999, 2001\], x = float(1:5)) From that, I am trying t…

---

## [Precompilation error for CSV package - PosLen not defined](https://discourse.julialang.org/t/precompilation-error-for-csv-package-poslen-not-defined/68480)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 7\
**Last updated:** [January 5, 2022, 2:08am UTC](https://discourse.julialang.org/t/precompilation-error-for-csv-package-poslen-not-defined/68480 "2022-01-05T02:08:58Z")

</div>

I have spent about an hour trying to fix a precompilation error related to the CSV package (full stacktrace at bottom). As far as I can tell: Deleting the compiled folder doesn’t help. Neither does starting a new envi…

---

## [Root finding package with array of polynomials?](https://discourse.julialang.org/t/root-finding-package-with-array-of-polynomials/74061)

<div class="topic-metadata">

**Author:** [@DeepQ](https://discourse.julialang.org/u/DeepQ)\
**Replies:** 1\
**Last updated:** [January 4, 2022, 9:37pm UTC](https://discourse.julialang.org/t/root-finding-package-with-array-of-polynomials/74061 "2022-01-04T21:37:37Z")

</div>

I have a function defined like: f(x) = a\_1x^2+a\_2x+a\_3 I know that I can find its roots using Roots.jl package. How can I find its roots if its coefficients are a (3,n) matrix instead of just 3 numbers? The matrix is d…

---

## [Telethon like library for Julia](https://discourse.julialang.org/t/telethon-like-library-for-julia/74055)

<div class="topic-metadata">

**Author:** [@serhii](https://discourse.julialang.org/u/serhii)\
**Replies:** 4\
**Last updated:** [January 4, 2022, 8:59pm UTC](https://discourse.julialang.org/t/telethon-like-library-for-julia/74055 "2022-01-04T20:59:18Z")

</div>

Hi! I am looking for a library similar to python’s telethon. A quick google search has not led to anything, so I would appreciate your suggestions. I want to emphasize that I am not looking for Telegram Bot API impleme…

---

## [Best way to locate and load a font?](https://discourse.julialang.org/t/best-way-to-locate-and-load-a-font/73996)

<div class="topic-metadata">

**Author:** [@ederag](https://discourse.julialang.org/u/ederag)\
**Replies:** 7\
**Last updated:** [January 4, 2022, 8:27pm UTC](https://discourse.julialang.org/t/best-way-to-locate-and-load-a-font/73996 "2022-01-04T20:27:02Z")

</div>

After filing https://github.com/JuliaGraphics/FreeTypeAbstraction.jl/issues/67 I have been looking for the best way to locate and load a font. (initially for DynamicGrids.jl, which is otherwise super fast, so it matte…

---

## [Need Help in embeding julia in c/c++](https://discourse.julialang.org/t/need-help-in-embeding-julia-in-c-c/33690)

<div class="topic-metadata">

**Author:** [@Fringe](https://discourse.julialang.org/u/Fringe)\
**Replies:** 16\
**Last updated:** [January 4, 2022, 8:01pm UTC](https://discourse.julialang.org/t/need-help-in-embeding-julia-in-c-c/33690 "2022-01-04T20:01:39Z")

</div>

greeting, i would really appreciate if some one let me know why my code in not working: currently i am on gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) and my julia version is 1.3.1 i was trying to embed the julia…

---

## [Can Julia's macros recurse?](https://discourse.julialang.org/t/can-julias-macros-recurse/74024)

<div class="topic-metadata">

**Author:** [@danielsoutar](https://discourse.julialang.org/u/danielsoutar)\
**Replies:** 2\
**Last updated:** [January 4, 2022, 12:52pm UTC](https://discourse.julialang.org/t/can-julias-macros-recurse/74024 "2022-01-04T12:52:06Z")

</div>

Hi there, stoked to be finally be using Julia. I had a question regarding how powerful Julia’s macros can be. I already asked on Stack Overflow, but figured worth pinging here as well. Basically, I was wondering if it w…

---

## [Why @doc does not work inside a function?](https://discourse.julialang.org/t/why-doc-does-not-work-inside-a-function/17358)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 6\
**Last updated:** [January 4, 2022, 5:39pm UTC](https://discourse.julialang.org/t/why-doc-does-not-work-inside-a-function/17358 "2022-01-04T17:39:11Z")

</div>

using Markdown function doc(fun) @show(html(@doc(fun))) end @doc(sin) sin(x) Compute sine of x, where x is in radians. sin(A::AbstractMatrix) ... julia\> doc(sin) html(#= REPL\[2\]:2 =# @doc(fun)) = "\<p\>No …

---

## [Makie: text rotation in data coordinates](https://discourse.julialang.org/t/makie-text-rotation-in-data-coordinates/74031)

<div class="topic-metadata">

**Author:** [@JonasIsensee](https://discourse.julialang.org/u/JonasIsensee)\
**Replies:** 2\
**Last updated:** [January 4, 2022, 3:24pm UTC](https://discourse.julialang.org/t/makie-text-rotation-in-data-coordinates/74031 "2022-01-04T15:24:25Z")

</div>

Hi, I’m trying to plot text “along a curve”. I’ve managed to put it in the correct place (using data space coordinates) but the orientation is wrong since data space angle is not the same as screen space angle. Is the…

---

## [Does BinaryBuilder have an option to build only for the current platform?](https://discourse.julialang.org/t/does-binarybuilder-have-an-option-to-build-only-for-the-current-platform/74033)

<div class="topic-metadata">

**Author:** [@melonedo](https://discourse.julialang.org/u/melonedo)\
**Replies:** 1\
**Last updated:** [January 4, 2022, 2:34pm UTC](https://discourse.julialang.org/t/does-binarybuilder-have-an-option-to-build-only-for-the-current-platform/74033 "2022-01-04T14:34:34Z")

</div>

BinaryBuilder has a very nice cross-platform toolchain, but if I want to use it to build locally for execution, i.e. ship source code and a build script because this is more flexible, in which case building for platforms…

---

## [Does Books.jl work on Julia version 1.7?](https://discourse.julialang.org/t/does-books-jl-work-on-julia-version-1-7/73878)

<div class="topic-metadata">

**Author:** [@Boadzie](https://discourse.julialang.org/u/Boadzie)\
**Replies:** 4\
**Last updated:** [January 4, 2022, 2:30pm UTC](https://discourse.julialang.org/t/does-books-jl-work-on-julia-version-1-7/73878 "2022-01-04T14:30:24Z")

</div>

does Books.jl work with Julia v.1.7 because I I’m getting an error with the font using Juliav1.7?

---

## [New dispatch for isless() does not work](https://discourse.julialang.org/t/new-dispatch-for-isless-does-not-work/74025)

<div class="topic-metadata">

**Author:** [@jafar.isbarov](https://discourse.julialang.org/u/jafar.isbarov)\
**Replies:** 2\
**Last updated:** [January 4, 2022, 11:23am UTC](https://discourse.julialang.org/t/new-dispatch-for-isless-does-not-work/74025 "2022-01-04T11:23:31Z")

</div>

I need to be able to compare instances of a struct named Hijri, so I have defined a new method for the isless() function as follows: function isless(a::Hijri, b::Hijri) tuple\_a = datetuple(a) tuple\_b = datetuple(b) …

---

## [Could this kernel go faster?](https://discourse.julialang.org/t/could-this-kernel-go-faster/73986)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 3\
**Last updated:** [January 4, 2022, 9:50am UTC](https://discourse.julialang.org/t/could-this-kernel-go-faster/73986 "2022-01-04T09:50:46Z")

</div>

Hi, I have the follwing problem : using Statistics, BenchmarkTools, ProfileView function compute\_exp\_moments!(mu,D,e,slack,data) data .= D'e # most expensive line according to profileview. slack .= exp.(.-dat…

---

## [Text display or indicator in Makie.jl](https://discourse.julialang.org/t/text-display-or-indicator-in-makie-jl/73957)

<div class="topic-metadata">

**Author:** [@itchy00](https://discourse.julialang.org/u/itchy00)\
**Replies:** 8\
**Last updated:** [January 4, 2022, 8:42am UTC](https://discourse.julialang.org/t/text-display-or-indicator-in-makie-jl/73957 "2022-01-04T08:42:00Z")

</div>

Hi Just wondering if I am missing a very basic element here… but is there a way to have a nice and simple text display on a Makie.jl scene? I’m trying to use Makie to build a very simple user GUI with some buttons to s…

---

## [Help with Revise](https://discourse.julialang.org/t/help-with-revise/73777)

<div class="topic-metadata">

**Author:** [@adannenberg](https://discourse.julialang.org/u/adannenberg)\
**Replies:** 10\
**Last updated:** [January 4, 2022, 7:45am UTC](https://discourse.julialang.org/t/help-with-revise/73777 "2022-01-04T07:45:28Z")

</div>

Revise is not working for me. I have a package in development called CaRs here: The source code is the usual “Hello World” test: Which works fine, before making changes: And yet the output of greet() is the …

---

## [Question about MLJ’s model](https://discourse.julialang.org/t/question-about-mlj-s-model/73891)

<div class="topic-metadata">

**Author:** [@abcde](https://discourse.julialang.org/u/abcde)\
**Replies:** 8\
**Last updated:** [January 4, 2022, 6:02am UTC](https://discourse.julialang.org/t/question-about-mlj-s-model/73891 "2022-01-04T06:02:04Z")

</div>

Why do I only have 14 models in my MJL. But there are 55 models on the MJL website?

---

## [Custom keyword arguments with metaprogramming](https://discourse.julialang.org/t/custom-keyword-arguments-with-metaprogramming/74009)

<div class="topic-metadata">

**Author:** [@MarcBerliner](https://discourse.julialang.org/u/MarcBerliner)\
**Replies:** 1\
**Last updated:** [January 4, 2022, 4:29am UTC](https://discourse.julialang.org/t/custom-keyword-arguments-with-metaprogramming/74009 "2022-01-04T04:29:37Z")

</div>

I am trying to recreate the function fun1 using metaprogramming, and fun2 is my attempt but I’m running into errors. How can I do this (or is there a better way to get this done)? # Arbitrary struct struct ABC A …

---

## [Can one capture what a command prints on the REPL in a variable of type String?](https://discourse.julialang.org/t/can-one-capture-what-a-command-prints-on-the-repl-in-a-variable-of-type-string/73999)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 3\
**Last updated:** [January 4, 2022, 3:36am UTC](https://discourse.julialang.org/t/can-one-capture-what-a-command-prints-on-the-repl-in-a-variable-of-type-string/73999 "2022-01-04T03:36:10Z")

</div>

I want to display on a list of the packages I am using or importing. I know this command Pkg.status() wll print the list on the screen, but with other items I am not interested in. So I would like to capture what is pr…

---

## [Static Vectors with Named Fields?](https://discourse.julialang.org/t/static-vectors-with-named-fields/74005)

<div class="topic-metadata">

**Author:** [@ccoffrin](https://discourse.julialang.org/u/ccoffrin)\
**Replies:** 4\
**Last updated:** [January 4, 2022, 1:04am UTC](https://discourse.julialang.org/t/static-vectors-with-named-fields/74005 "2022-01-04T01:04:04Z")

</div>

Say for example that I would like to represent a three dimensional point and I would like it to be easy to look up the values with the names x, y, z. I could use a named tuple like, t = (x=0.0, y=0.0, z=0.0) This all …

---

## [DefaultDict{String, DataType}(SomeType)](https://discourse.julialang.org/t/defaultdict-string-datatype-sometype/73967)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 2\
**Last updated:** [January 3, 2022, 11:11pm UTC](https://discourse.julialang.org/t/defaultdict-string-datatype-sometype/73967 "2022-01-03T23:11:37Z")

</div>

using DataStructures dd = DefaultDict{String, DataType}(Int32) dd\["i"\] = Int32 Now, that’s OK: julia\> dd\["i"\] Int32 And here I’d expect exactly the same value, just as default - however I get an error. Why? julia\> d…

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

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