# Latest

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

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

**Page:** 1165

---

## [Enforcing function signatures by both argument & return types](https://discourse.julialang.org/t/enforcing-function-signatures-by-both-argument-return-types/8174)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 30\
**Last updated:** [December 31, 2021, 7:49am UTC](https://discourse.julialang.org/t/enforcing-function-signatures-by-both-argument-return-types/8174 "2021-12-31T07:49:44Z")

</div>

I’d like to pass a function (f) to another function (g) but g expects f to take some specific types of arguments and return a specific type. Is it possible to enforce that statically? For example, g() expects f to take…

---

## [Loop over the variable name inside of function](https://discourse.julialang.org/t/loop-over-the-variable-name-inside-of-function/73868)

<div class="topic-metadata">

**Author:** [@Eungik\_Lee](https://discourse.julialang.org/u/Eungik_Lee)\
**Replies:** 2\
**Last updated:** [December 31, 2021, 7:53pm UTC](https://discourse.julialang.org/t/loop-over-the-variable-name-inside-of-function/73868 "2021-12-31T19:53:49Z")

</div>

Hi, I want to make a simple function with colnames x1, x2, … So I made a below function and realized that “df” should be outside of the function. Why the loop does not work if “df” is inside of the function? I want to…

---

## [Problems with splice!/deleteat!](https://discourse.julialang.org/t/problems-with-splice-deleteat/73874)

<div class="topic-metadata">

**Author:** [@fbal091](https://discourse.julialang.org/u/fbal091)\
**Replies:** 1\
**Last updated:** [December 31, 2021, 7:49pm UTC](https://discourse.julialang.org/t/problems-with-splice-deleteat/73874 "2021-12-31T19:49:08Z")

</div>

hi there, i wrote a code that take a text and return the same text without the whitespaces and the punctuation. I can’t understand why i’m getting errors about the index of splice!: “attempt to access 7-element Vector{C…

---

## [Can a type be declared as a subtype of my abstract type and Tuple?](https://discourse.julialang.org/t/can-a-type-be-declared-as-a-subtype-of-my-abstract-type-and-tuple/73867)

<div class="topic-metadata">

**Author:** [@Thomas](https://discourse.julialang.org/u/Thomas)\
**Replies:** 1\
**Last updated:** [December 31, 2021, 7:19pm UTC](https://discourse.julialang.org/t/can-a-type-be-declared-as-a-subtype-of-my-abstract-type-and-tuple/73867 "2021-12-31T19:19:06Z")

</div>

Say I have abstract type Custom end, how can I declare a tuple-like type that is both \<:Tuple and \<:Custom so that methods of Tuple works on Custom. Note that I would like vararg-tuple if possible. Thanks!

---

## [Run as administrator to install system wide](https://discourse.julialang.org/t/run-as-administrator-to-install-system-wide/44465)

<div class="topic-metadata">

**Author:** [@Ixoni](https://discourse.julialang.org/u/Ixoni)\
**Replies:** 3\
**Last updated:** [December 31, 2021, 7:15pm UTC](https://discourse.julialang.org/t/run-as-administrator-to-install-system-wide/44465 "2021-12-31T19:15:37Z")

</div>

Hello, I am trying to install Juila system wide on a windows master image. I have tried to right click and “Run as administrator” and I have tried to run it from an administrator cmd line, but the installer always says …

---

## [ODBC Firebird: Dynamic SQL Error](https://discourse.julialang.org/t/odbc-firebird-dynamic-sql-error/73869)

<div class="topic-metadata">

**Author:** [@Fabio\_Sodre](https://discourse.julialang.org/u/Fabio_Sodre)\
**Replies:** 0\
**Last updated:** [December 31, 2021, 4:49pm UTC](https://discourse.julialang.org/t/odbc-firebird-dynamic-sql-error/73869 "2021-12-31T16:49:09Z")

</div>

ODBC.jl v1.0.4 I try to do a simple query to a Firebird database but an error is coming: ERROR: HY000: \[ODBC Firebird Driver\]\[Firebird\]Dynamic SQL Error SQL error code = -104 Unexpected end of command - line 1, colum…

---

## [Using OrdinaryDiffEq.jl solving 1d Wave Equation](https://discourse.julialang.org/t/using-ordinarydiffeq-jl-solving-1d-wave-equation/73782)

<div class="topic-metadata">

**Author:** [@CollinsPeriodLee](https://discourse.julialang.org/u/CollinsPeriodLee)\
**Replies:** 16\
**Last updated:** [December 31, 2021, 4:32pm UTC](https://discourse.julialang.org/t/using-ordinarydiffeq-jl-solving-1d-wave-equation/73782 "2021-12-31T16:32:15Z")

</div>

Hi, I’m using OrdinaryDiffEq.jl to solve the wave Equation, but there is Instability detected. Attached is my code using OrdinaryDiffEq, Sundials using LinearAlgebra using Plots; gr() function vright(N,ϵ, xs,dx) d…

---

## [Pluto: printing multiple statements in a for loop](https://discourse.julialang.org/t/pluto-printing-multiple-statements-in-a-for-loop/73858)

<div class="topic-metadata">

**Author:** [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Replies:** 2\
**Last updated:** [December 31, 2021, 4:15pm UTC](https://discourse.julialang.org/t/pluto-printing-multiple-statements-in-a-for-loop/73858 "2021-12-31T16:15:08Z")

</div>

Hi, I have a simple for loop that involves printing multiple statements. This material is for teaching, so I want to keep it intuitive and straightforward. The code below works in VSCode and Jupyter, but I do not know h…

---

## [How to use .png files with Documenter.jl](https://discourse.julialang.org/t/how-to-use-png-files-with-documenter-jl/73863)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [December 31, 2021, 3:56pm UTC](https://discourse.julialang.org/t/how-to-use-png-files-with-documenter-jl/73863 "2021-12-31T15:56:43Z")

</div>

I wrote a package and added documentation using Documenter.jl , see: Home · KitePodSimulator.jl This works all fine, but the .png image that I embedded in the index.md file does not show up on the internet, it does show…

---

## [Using arbitrary polygons as markers in Makie.jl](https://discourse.julialang.org/t/using-arbitrary-polygons-as-markers-in-makie-jl/53690)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 15\
**Last updated:** [December 31, 2021, 2:50pm UTC](https://discourse.julialang.org/t/using-arbitrary-polygons-as-markers-in-makie-jl/53690 "2021-12-31T14:50:34Z")

</div>

Hi, I know I can make any polygon as a vector of Point2f0 and plot it with poly!. However what I’d like to do is use this polygon as a marker for a scatter plot. is this possible? how? I couldn’t find something in the …

---

## [BinaryBuilder.jl mingw problem](https://discourse.julialang.org/t/binarybuilder-jl-mingw-problem/73815)

<div class="topic-metadata">

**Author:** [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Replies:** 7\
**Last updated:** [December 31, 2021, 12:51pm UTC](https://discourse.julialang.org/t/binarybuilder-jl-mingw-problem/73815 "2021-12-31T12:51:17Z")

</div>

I know the solution when using make: FLAGS=() if \[\[ "${target}" == \*-mingw\* \]\]; then # This is needed in order to build the shared library on Windows when we get # libtool: warning: undefined symbols not allow…

---

## [Database tools?](https://discourse.julialang.org/t/database-tools/73860)

<div class="topic-metadata">

**Author:** [@skypuppy](https://discourse.julialang.org/u/skypuppy)\
**Replies:** 0\
**Last updated:** [December 31, 2021, 12:07pm UTC](https://discourse.julialang.org/t/database-tools/73860 "2021-12-31T12:07:23Z")

</div>

Do we have a library that includes database type functions? Add record, delete record, create index, that sort of thing? If nothing else, maybe even SQL (which I hate?) :slight\_smile: I don’t really know how to searc…

---

## [Stack trace](https://discourse.julialang.org/t/stack-trace/73439)

<div class="topic-metadata">

**Author:** [@Laco\_Kovac](https://discourse.julialang.org/u/Laco_Kovac)\
**Replies:** 1\
**Last updated:** [December 31, 2021, 11:29am UTC](https://discourse.julialang.org/t/stack-trace/73439 "2021-12-31T11:29:41Z")

</div>

I am using 2 functions related to stack to help me with debugging. getExcInfo function getExcInfo(someText=nothing)::String msg::String = "" for (exc, bt) in Base.catch\_stack() # for now, we process on…

---

## [Concrete typing for Type{T} struct fields](https://discourse.julialang.org/t/concrete-typing-for-type-t-struct-fields/73825)

<div class="topic-metadata">

**Author:** [@mrVeng](https://discourse.julialang.org/u/mrVeng)\
**Replies:** 4\
**Last updated:** [December 31, 2021, 10:03am UTC](https://discourse.julialang.org/t/concrete-typing-for-type-t-struct-fields/73825 "2021-12-31T10:03:16Z")

</div>

Dear all, I would like to create a struct that holds a subtype of Real, which I want to use later on to create buffer arrays. I managed to do that in the MWE below, but it seems like the corresponding struct is not a co…

---

## [Outer constructor with default parameters](https://discourse.julialang.org/t/outer-constructor-with-default-parameters/73853)

<div class="topic-metadata">

**Author:** [@jafar.isbarov](https://discourse.julialang.org/u/jafar.isbarov)\
**Replies:** 1\
**Last updated:** [December 31, 2021, 9:01am UTC](https://discourse.julialang.org/t/outer-constructor-with-default-parameters/73853 "2021-12-31T09:01:28Z")

</div>

I am trying to define an outer constructor for this struct: @with\_kw struct Hijri year::Int64 month::Int64 day::Int64 validate::Bool #TODO: should be able to initialize a Hijri with giving this parameter end Here i…

---

## [Useful Regex's for Julia code bases](https://discourse.julialang.org/t/useful-regexs-for-julia-code-bases/24272)

<div class="topic-metadata">

**Author:** [@alexmorley](https://discourse.julialang.org/u/alexmorley)\
**Replies:** 0\
**Last updated:** [May 16, 2019, 9:39am UTC](https://discourse.julialang.org/t/useful-regexs-for-julia-code-bases/24272 "2019-05-16T09:39:48Z")

</div>

I know there are deprecation specific tools but I quite often still find myself spending a little time writing regex’s to update a whole bunch of code with a new/updated syntax, or just when I decide I want to use a diff…

---

## [Issues with Regex support in Julia (threading, handling of abstract strings)](https://discourse.julialang.org/t/issues-with-regex-support-in-julia-threading-handling-of-abstract-strings/10541)

<div class="topic-metadata">

**Author:** [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Replies:** 0\
**Last updated:** [April 25, 2018, 5:08pm UTC](https://discourse.julialang.org/t/issues-with-regex-support-in-julia-threading-handling-of-abstract-strings/10541 "2018-04-25T17:08:47Z")

</div>

The current regex support in Julia is not thread safe, for a few reasons. The first reason is that the underlying pcre.jl code creates a single MATCH\_CONTEXT and a single JIT\_STACK. As per PCRE2 documentation, those ne…

---

## [What is the correct way to regex route parameters in Genie.jl?](https://discourse.julialang.org/t/what-is-the-correct-way-to-regex-route-parameters-in-genie-jl/68064)

<div class="topic-metadata">

**Author:** [@Matrsz](https://discourse.julialang.org/u/Matrsz)\
**Replies:** 0\
**Last updated:** [September 12, 2021, 11:22pm UTC](https://discourse.julialang.org/t/what-is-the-correct-way-to-regex-route-parameters-in-genie-jl/68064 "2021-09-12T23:22:58Z")

</div>

I’m trying to use a regex for one of the fields in a web app’s route. The route requires a lot of dynamic routing. My issue resides in the fact that the regex field is not the last field in my route, and I realized that …

---

## [Transducer Filtering with Regex?](https://discourse.julialang.org/t/transducer-filtering-with-regex/52441)

<div class="topic-metadata">

**Author:** [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Replies:** 0\
**Last updated:** [December 27, 2020, 4:26am UTC](https://discourse.julialang.org/t/transducer-filtering-with-regex/52441 "2020-12-27T04:26:39Z")

</div>

Hi, I have several cases where I need just the first few elements that match a condition. With transducers, I can do something like big\_array |\> Filter(expensive\_filter) |\> Map(expensive\_transformation) |\> Take(5) |\> c…

---

## [Remove unmatched parts via regular expression](https://discourse.julialang.org/t/remove-unmatched-parts-via-regular-expression/73850)

<div class="topic-metadata">

**Author:** [@Xiao](https://discourse.julialang.org/u/Xiao)\
**Replies:** 6\
**Last updated:** [December 31, 2021, 5:30am UTC](https://discourse.julialang.org/t/remove-unmatched-parts-via-regular-expression/73850 "2021-12-31T05:30:37Z")

</div>

Hi, For example as below, how can I get the result “123” without “abc, space, …etc.”, using regular expression? julia\> replace("abc12 3abc ", r"\\d+" =\> "") "abc abc " Technically, I can meet the aim via filter as bel…

---

## [Animations on the blog on inference convergence are lost](https://discourse.julialang.org/t/animations-on-the-blog-on-inference-convergence-are-lost/73848)

<div class="topic-metadata">

**Author:** [@melonedo](https://discourse.julialang.org/u/melonedo)\
**Replies:** 0\
**Last updated:** [December 31, 2021, 3:40am UTC](https://discourse.julialang.org/t/animations-on-the-blog-on-inference-convergence-are-lost/73848 "2021-12-31T03:40:47Z")

</div>

The blog Inference Convergence Algorithm in Julia seems to have had some nice animations, but no JavaScript code is attached to these buttons, and the code block below these buttons have attribute style="display:none" (…

---

## [Julia language server, return type declarations, type stability](https://discourse.julialang.org/t/julia-language-server-return-type-declarations-type-stability/73827)

<div class="topic-metadata">

**Author:** [@guidorice](https://discourse.julialang.org/u/guidorice)\
**Replies:** 4\
**Last updated:** [December 30, 2021, 11:57pm UTC](https://discourse.julialang.org/t/julia-language-server-return-type-declarations-type-stability/73827 "2021-12-30T23:57:51Z")

</div>

:wave: I’m totally new to Julia, but have some Rust, Zig and Python background. I am using the Julia Language Server with VSCode. Even for type-stable functions, vscode does not show the return type of functions. And v…

---

## [St PKG\_NAME does not show version for some packages](https://discourse.julialang.org/t/st-pkg-name-does-not-show-version-for-some-packages/73841)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 1\
**Last updated:** [December 30, 2021, 10:59pm UTC](https://discourse.julialang.org/t/st-pkg-name-does-not-show-version-for-some-packages/73841 "2021-12-30T22:59:48Z")

</div>

To check the version of an installed package, I do pkg\> st PKG\_NAME. For example, (@v1.7) pkg\> st BenchmarkTools Status \`~/.julia/environments/v1.7/Project.toml\` \[6e4b80f9\] BenchmarkTools v1.2.0 shows that the…

---

## [Random crashes with Julia 1.7](https://discourse.julialang.org/t/random-crashes-with-julia-1-7/73821)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [December 30, 2021, 10:05pm UTC](https://discourse.julialang.org/t/random-crashes-with-julia-1-7/73821 "2021-12-30T22:05:41Z")

</div>

I have an application (https://github.com/ufechner7/KiteViewer), which works fine with Julia 1.6.5, but sometimes crashes when using Julia 1.7.0 or 1.7.1. When I click on the “PLAY” button I get crash reports like: ufec…

---

## [Julia 1.7 even got a special version for M1, does that mean it is a hypertime to buy a Macbook pro?](https://discourse.julialang.org/t/julia-1-7-even-got-a-special-version-for-m1-does-that-mean-it-is-a-hypertime-to-buy-a-macbook-pro/72636)

<div class="topic-metadata">

**Author:** [@LarkyJulia](https://discourse.julialang.org/u/LarkyJulia)\
**Replies:** 6\
**Last updated:** [December 30, 2021, 9:25pm UTC](https://discourse.julialang.org/t/julia-1-7-even-got-a-special-version-for-m1-does-that-mean-it-is-a-hypertime-to-buy-a-macbook-pro/72636 "2021-12-30T21:25:44Z")

</div>

Any body got experience on coding Julia on M1? doing deep learning and anything else? Welcome to share with us, thanks.

---

## [Is this @sprintf (annoying) behaviour intended?](https://discourse.julialang.org/t/is-this-sprintf-annoying-behaviour-intended/68483)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 8\
**Last updated:** [December 30, 2021, 10:02pm UTC](https://discourse.julialang.org/t/is-this-sprintf-annoying-behaviour-intended/68483 "2021-12-30T22:02:12Z")

</div>

The crux is that I want to build a string programmatically with a variable number of elements and can’t find a way to do it with @sprintf julia\> bnds = \[1,2,3\]; julia\> @sprintf("%d,%d,%d,",bnds...) "1,2,3," julia\> repe…

---

## [Inversion and multiplication of sparse matrices](https://discourse.julialang.org/t/inversion-and-multiplication-of-sparse-matrices/73819)

<div class="topic-metadata">

**Author:** [@Rajesh\_Nakka](https://discourse.julialang.org/u/Rajesh_Nakka)\
**Replies:** 7\
**Last updated:** [December 30, 2021, 9:52pm UTC](https://discourse.julialang.org/t/inversion-and-multiplication-of-sparse-matrices/73819 "2021-12-30T21:52:21Z")

</div>

I have encountered a problem of the following kind. C = A^-1 \* B where A is a very large nxn sparse banded symmetric matrix (of SparseMatrixCSC type) and B is nx5 matrix. I have read on this forum and somewhere else…

---

## [Prime numbers between given two numbers in Julia and Python](https://discourse.julialang.org/t/prime-numbers-between-given-two-numbers-in-julia-and-python/73626)

<div class="topic-metadata">

**Author:** [@apoorvvyas52](https://discourse.julialang.org/u/apoorvvyas52)\
**Replies:** 11\
**Last updated:** [December 30, 2021, 9:26pm UTC](https://discourse.julialang.org/t/prime-numbers-between-given-two-numbers-in-julia-and-python/73626 "2021-12-30T21:26:55Z")

</div>

See the Python code for finding prime numbers between given two numbers lower and upper ‘’'lower = 3 upper = 15 print(“Prime numbers between”, lower, “and”, upper, “are:”) for num in range(lower, upper + 1): for …

---

## [Efficient iterated discrete dynamics in Flux](https://discourse.julialang.org/t/efficient-iterated-discrete-dynamics-in-flux/73837)

<div class="topic-metadata">

**Author:** [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Replies:** 0\
**Last updated:** [December 30, 2021, 9:16pm UTC](https://discourse.julialang.org/t/efficient-iterated-discrete-dynamics-in-flux/73837 "2021-12-30T21:16:04Z")

</div>

I’m trying to implement a Koopman operator layer in Flux. This is the operation of starting with a vector, x, and iteratively multiplying it by a dynamics matrix, K, for n steps, e.g. x1 = x x2 = K \* x1 x3 = K \* x2 e…

---

## [How to add emojis in jupyter notebook as done here?](https://discourse.julialang.org/t/how-to-add-emojis-in-jupyter-notebook-as-done-here/72756)

<div class="topic-metadata">

**Author:** [@apoorvvyas52](https://discourse.julialang.org/u/apoorvvyas52)\
**Replies:** 8\
**Last updated:** [December 30, 2021, 8:25pm UTC](https://discourse.julialang.org/t/how-to-add-emojis-in-jupyter-notebook-as-done-here/72756 "2021-12-30T20:25:53Z")

</div>

How to add emojis in jupyter notebook as done here?Variables and Printing | JuliaAcademy at 6 :00 time stamp . emoji of cat is inserted but not taught how it was done. I am new to programming and jupyter. Can someone p…

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

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