# Latest

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

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

**Page:** 1184

---

## [Allocations in advent of code](https://discourse.julialang.org/t/allocations-in-advent-of-code/72759)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 9\
**Last updated:** [December 9, 2021, 5:24pm UTC](https://discourse.julialang.org/t/allocations-in-advent-of-code/72759 "2021-12-09T17:24:44Z")

</div>

I was fiddling around with the super fun advent of code this year and got surprised by an allocation in the day 5 puzzle. input = \[3,4,3,1,2\] histogram = \[count(==(i),input) for i in 0:8\] phase(day) = mod(day-1,9)+1 @al…

---

## [Linking to MKL 2019 with AMD CPUs?](https://discourse.julialang.org/t/linking-to-mkl-2019-with-amd-cpus/71508)

<div class="topic-metadata">

**Author:** [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Replies:** 17\
**Last updated:** [December 9, 2021, 5:20pm UTC](https://discourse.julialang.org/t/linking-to-mkl-2019-with-amd-cpus/71508 "2021-12-09T17:20:12Z")

</div>

Question Does BinaryBuilder allow Ryzen/Threadripper owners to choose MKL 2019 as the binary to use for MKL.jl and MKLSparse.jl? Context Back in 2019 the MKL libraries had a “loophole” that allowed AMD CPUs to take adva…

---

## [Using Julia Logo and SCIML Logo on a cover of an e-book?](https://discourse.julialang.org/t/using-julia-logo-and-sciml-logo-on-a-cover-of-an-e-book/72215)

<div class="topic-metadata">

**Author:** [@joeganiomego](https://discourse.julialang.org/u/joeganiomego)\
**Replies:** 8\
**Last updated:** [December 9, 2021, 4:46pm UTC](https://discourse.julialang.org/t/using-julia-logo-and-sciml-logo-on-a-cover-of-an-e-book/72215 "2021-12-09T16:46:38Z")

</div>

I am getting ready to publish on Kindle Direct Publishing a quite long explanation of the Julia models that I have done during the last several years. I would like to use the Julia and SCIML logo on the cover and on one…

---

## [Interpolate LaTeX and function call in markdown](https://discourse.julialang.org/t/interpolate-latex-and-function-call-in-markdown/72833)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 3\
**Last updated:** [December 9, 2021, 4:02pm UTC](https://discourse.julialang.org/t/interpolate-latex-and-function-call-in-markdown/72833 "2021-12-09T16:02:06Z")

</div>

Hi all, I was wondering how I can interpolate LaTeX and a function call in Pluto’s markdown. Suppose I have one cell θ = 1/3 And a markdown cell: md" $\\theta =$ = $round(θ, digits=2) " I tried adding \\ in several p…

---

## [Pair iteration specification](https://discourse.julialang.org/t/pair-iteration-specification/72794)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 9\
**Last updated:** [December 9, 2021, 4:00pm UTC](https://discourse.julialang.org/t/pair-iteration-specification/72794 "2021-12-09T16:00:42Z")

</div>

What is going on here? Why is this not allowed, and given that it is not allowed, why is there not an error? julia\> a,b = 1,2 (1, 2) julia\> \[a+b for (a=\>b) in \[3=\>4, 5=\>6\]\] 2-element Vector{Int64}: 3 3

---

## [Set function name](https://discourse.julialang.org/t/set-function-name/72810)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 3\
**Last updated:** [December 9, 2021, 3:56pm UTC](https://discourse.julialang.org/t/set-function-name/72810 "2021-12-09T15:56:34Z")

</div>

How can I define a function with a given name? let fname = :myfunction @eval quote function $(fname)() 42 end end end UndefVarError: fname not defined

---

## [Threads.@threads scheduling puzzle](https://discourse.julialang.org/t/threads-threads-scheduling-puzzle/72831)

<div class="topic-metadata">

**Author:** [@pitsianis](https://discourse.julialang.org/u/pitsianis)\
**Replies:** 2\
**Last updated:** [December 9, 2021, 3:56pm UTC](https://discourse.julialang.org/t/threads-threads-scheduling-puzzle/72831 "2021-12-09T15:56:27Z")

</div>

Consider this function test(duration) Threads.@threads for i=1:length(duration) sleep(duration\[i\]) end end In my 2 core computer, 4 total threads with hyperthreading, running the above with julia\> @time test(\[…

---

## [DataFrame isin operation](https://discourse.julialang.org/t/dataframe-isin-operation/72825)

<div class="topic-metadata">

**Author:** [@gjh](https://discourse.julialang.org/u/gjh)\
**Replies:** 4\
**Last updated:** [December 9, 2021, 3:55pm UTC](https://discourse.julialang.org/t/dataframe-isin-operation/72825 "2021-12-09T15:55:31Z")

</div>

Is there a function that would allow selecting rows/columns with isin? df = DataFrame(Column1 = \[“a”, "b, “c”, “d”, “e”, “f”\], Column2 = \[1, 2, 3, 1, 2, 3\], ) keep = \[“a”, “c”, “e”\] df\[isin(df.Column1, keep), :\]

---

## [Plots.jl: PGFPlotsX not defined](https://discourse.julialang.org/t/plots-jl-pgfplotsx-not-defined/72826)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 0\
**Last updated:** [December 9, 2021, 1:31pm UTC](https://discourse.julialang.org/t/plots-jl-pgfplotsx-not-defined/72826 "2021-12-09T13:31:09Z")

</div>

Since today I receive the following error message whenever I try to plot something using PGFPlotsX: ERROR: LoadError: UndefVarError: PGFPlotsX not defined Stacktrace: \[1\] top-level scope @ util.jl:500 Revise evaluat…

---

## [How to change the entire command line](https://discourse.julialang.org/t/how-to-change-the-entire-command-line/72824)

<div class="topic-metadata">

**Author:** [@Renan\_Rabelo](https://discourse.julialang.org/u/Renan_Rabelo)\
**Replies:** 2\
**Last updated:** [December 9, 2021, 1:45pm UTC](https://discourse.julialang.org/t/how-to-change-the-entire-command-line/72824 "2021-12-09T13:45:46Z")

</div>

Hello everyone, This might be a weird question, and I don’t know how to ask it properly, but I really would like to know how to change the text of a command line without using print(). A good example is in this video, …

---

## [Julia training opportunities](https://discourse.julialang.org/t/julia-training-opportunities/72783)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 3\
**Last updated:** [December 9, 2021, 1:04pm UTC](https://discourse.julialang.org/t/julia-training-opportunities/72783 "2021-12-09T13:04:34Z")

</div>

Are there any upcoming interactive training courses for Julia, Data Science, and high performance programming? Thanks!

---

## [Issues running Genie apps on JuliaHub](https://discourse.julialang.org/t/issues-running-genie-apps-on-juliahub/72809)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 3\
**Last updated:** [December 9, 2021, 12:51pm UTC](https://discourse.julialang.org/t/issues-running-genie-apps-on-juliahub/72809 "2021-12-09T12:51:07Z")

</div>

Apologies if this is not the right place to post - I’m following up on a Slack thread in the #juliahub-usage channel Slack Working on adding out-of-the-box support for Genie apps on JuliaHub but there seem to be issues …

---

## [Get function with macro](https://discourse.julialang.org/t/get-function-with-macro/72819)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [December 9, 2021, 12:34pm UTC](https://discourse.julialang.org/t/get-function-with-macro/72819 "2021-12-09T12:34:22Z")

</div>

How can I get the function object with a macro? module C macro getfunc(sig) name = sig.args\[1\] end export @method, @getfunc end module D using Main.C function foo() 1 end using Test @test (@getfunc foo()) ==…

---

## [Create and use local module](https://discourse.julialang.org/t/create-and-use-local-module/46989)

<div class="topic-metadata">

**Author:** [@pascal-mueller](https://discourse.julialang.org/u/pascal-mueller)\
**Replies:** 12\
**Last updated:** [December 9, 2021, 12:11pm UTC](https://discourse.julialang.org/t/create-and-use-local-module/46989 "2021-12-09T12:11:54Z")

</div>

Hi, I want to make an application. So I do cd ; julia and then switch to Pkg mode and use generate to generate my application. I then have a src/app.jl. Now I want to add a few files that do some fancy stuff. Apparentl…

---

## [C++ with pattern matching (and as a dynamic alnguage)](https://discourse.julialang.org/t/c-with-pattern-matching-and-as-a-dynamic-alnguage/72820)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [December 9, 2021, 11:36am UTC](https://discourse.julialang.org/t/c-with-pattern-matching-and-as-a-dynamic-alnguage/72820 "2021-12-09T11:36:30Z")

</div>

With Python recently introducing pattern matching and with it on the radar for C++, maybe Julia should also adopt it (not just through a package)? Anyway, for people to see how it will be done in C++: C++ …

---

## [JuMP variable container with repeated index](https://discourse.julialang.org/t/jump-variable-container-with-repeated-index/72782)

<div class="topic-metadata">

**Author:** [@Thomas](https://discourse.julialang.org/u/Thomas)\
**Replies:** 2\
**Last updated:** [December 9, 2021, 10:58am UTC](https://discourse.julialang.org/t/jump-variable-container-with-repeated-index/72782 "2021-12-09T10:58:44Z")

</div>

I wonder how JuMP experts would create an SDP variable over some index matrix constrained during creation. From the docs, it is recommended to constraint variable upon creation if possible. Can the following be improved …

---

## [Parsing Julia code with a large array is very slow or results in \`StackOverflowError\`](https://discourse.julialang.org/t/parsing-julia-code-with-a-large-array-is-very-slow-or-results-in-stackoverflowerror/72720)

<div class="topic-metadata">

**Author:** [@fingolfin](https://discourse.julialang.org/u/fingolfin)\
**Replies:** 24\
**Last updated:** [December 9, 2021, 10:04am UTC](https://discourse.julialang.org/t/parsing-julia-code-with-a-large-array-is-very-slow-or-results-in-stackoverflowerror/72720 "2021-12-09T10:04:43Z")

</div>

The following is based on a real world case, where I got a huge file with univariate polynomials in them, but I’ve tried to simplify it for easier reproduction. Note that in my original test case, I actually got a ReadOn…

---

## [ANN: julia\_project, for managing a Julia project inside a Python package](https://discourse.julialang.org/t/ann-julia-project-for-managing-a-julia-project-inside-a-python-package/72802)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 1\
**Last updated:** [December 9, 2021, 9:54am UTC](https://discourse.julialang.org/t/ann-julia-project-for-managing-a-julia-project-inside-a-python-package/72802 "2021-12-09T09:54:07Z")

</div>

I made julia\_project available. This package provides the class JuliaProject for managing a Julia project that lives inside a Python package and is accessed via pyjulia (the Python module “julia”). It is not much mor…

---

## [Convert VariableRef to String](https://discourse.julialang.org/t/convert-variableref-to-string/72803)

<div class="topic-metadata">

**Author:** [@gopal2017](https://discourse.julialang.org/u/gopal2017)\
**Replies:** 2\
**Last updated:** [December 9, 2021, 9:40am UTC](https://discourse.julialang.org/t/convert-variableref-to-string/72803 "2021-12-09T09:40:07Z")

</div>

We can use string(variable) to convert integer variable to string. Can we convert VariableRef to string? VariableRef we are getting from math model. I tried with parse(AbstractString,VariableRef) or string(VariableRef)…

---

## [Named argument variant of \`new\` or some other way to initialize a \`mutable struct\` efficiently \*and\* "readable"?](https://discourse.julialang.org/t/named-argument-variant-of-new-or-some-other-way-to-initialize-a-mutable-struct-efficiently-and-readable/72764)

<div class="topic-metadata">

**Author:** [@fingolfin](https://discourse.julialang.org/u/fingolfin)\
**Replies:** 14\
**Last updated:** [December 9, 2021, 9:20am UTC](https://discourse.julialang.org/t/named-argument-variant-of-new-or-some-other-way-to-initialize-a-mutable-struct-efficiently-and-readable/72764 "2021-12-09T09:20:43Z")

</div>

Consider a (mutable) struct with a bunch of members, and a constructor: mutable struct Foo x::Vector{Int} y::Vector{Int} z::Vector{Int} # ... here more members might come Foo() = new(\[1\], \[2\], \[3\]) end Now, a…

---

## [Gurobi not running the right version?](https://discourse.julialang.org/t/gurobi-not-running-the-right-version/72808)

<div class="topic-metadata">

**Author:** [@Marc\_Sevaux](https://discourse.julialang.org/u/Marc_Sevaux)\
**Replies:** 4\
**Last updated:** [December 9, 2021, 9:20am UTC](https://discourse.julialang.org/t/gurobi-not-running-the-right-version/72808 "2021-12-09T09:20:31Z")

</div>

Hi, I’ve installed the latest version of gurobi solver (9.5.0) and reinstalled the Gurobi package. When I try to solve a ILP model, it seems that the gurobi solver is still using a previous version (9.1.2). Did I miss…

---

## [\[ANN\] FlexibleFunctors.jl: Functors with Per-Instance Parameters](https://discourse.julialang.org/t/ann-flexiblefunctors-jl-functors-with-per-instance-parameters/64935)

<div class="topic-metadata">

**Author:** [@sbuercklin](https://discourse.julialang.org/u/sbuercklin)\
**Replies:** 3\
**Last updated:** [December 9, 2021, 7:08am UTC](https://discourse.julialang.org/t/ann-flexiblefunctors-jl-functors-with-per-instance-parameters/64935 "2021-12-09T07:08:05Z")

</div>

FlexibleFunctors.jl provides a utility for destructuring, restructuring, and mapping operations over a flexible set of parameters for any type. Parameter tagging is flexible in its implementation, permitting either glob…

---

## [Is there anybody know why this kind of simple code cannot be run?](https://discourse.julialang.org/t/is-there-anybody-know-why-this-kind-of-simple-code-cannot-be-run/72795)

<div class="topic-metadata">

**Author:** [@Lyupinpin](https://discourse.julialang.org/u/Lyupinpin)\
**Replies:** 5\
**Last updated:** [December 9, 2021, 6:24am UTC](https://discourse.julialang.org/t/is-there-anybody-know-why-this-kind-of-simple-code-cannot-be-run/72795 "2021-12-09T06:24:43Z")

</div>

function test\_reason() for i = 1:10 if i == 1 x = 1 else x = x+1 end end end test\_reason() It seems that it has some scope problem but it’s strange that I have …

---

## [Unable to get the bandwith of a matrix](https://discourse.julialang.org/t/unable-to-get-the-bandwith-of-a-matrix/72806)

<div class="topic-metadata">

**Author:** [@Rajesh\_Nakka](https://discourse.julialang.org/u/Rajesh_Nakka)\
**Replies:** 1\
**Last updated:** [December 9, 2021, 6:18am UTC](https://discourse.julialang.org/t/unable-to-get-the-bandwith-of-a-matrix/72806 "2021-12-09T06:18:29Z")

</div>

I am trying to get the bandwidth of a matrix using BandedMatrices.jl in the following manner. using BandedMatrices A = \[ 2.0 5.0 5.0 0.0 0.0 0.0 2.0 5.0 5.0 0.0 0.0 0.0 2.0 5.0 5.0 0.0 0.0 0.0 0.0 0.0 …

---

## [\[ANN\] SparkSQL.jl release 1.3.0](https://discourse.julialang.org/t/ann-sparksql-jl-release-1-3-0/72804)

<div class="topic-metadata">

**Author:** [@propelledanalytics](https://discourse.julialang.org/u/propelledanalytics)\
**Replies:** 0\
**Last updated:** [December 9, 2021, 5:15am UTC](https://discourse.julialang.org/t/ann-sparksql-jl-release-1-3-0/72804 "2021-12-09T05:15:34Z")

</div>

This post is announcing the release of SparkSQL.jl version 1.3.0. SparkSQL.jl is software that enables developers to use the Julia programming language with the Apache Spark data processing engine. Apache Spark is one o…

---

## [RESTful api with mTLS](https://discourse.julialang.org/t/restful-api-with-mtls/72797)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 0\
**Last updated:** [December 8, 2021, 11:51pm UTC](https://discourse.julialang.org/t/restful-api-with-mtls/72797 "2021-12-08T23:51:32Z")

</div>

I need to create a client/server system using RESTful api over mTLS. Is there a recommended Julia package (or packages) that support this functionality? Better yet, is there a code example? btw, my colleagues are expe…

---

## [Request for comments on approach to multithreaded work](https://discourse.julialang.org/t/request-for-comments-on-approach-to-multithreaded-work/72728)

<div class="topic-metadata">

**Author:** [@miguelbiron](https://discourse.julialang.org/u/miguelbiron)\
**Replies:** 2\
**Last updated:** [December 8, 2021, 11:00pm UTC](https://discourse.julialang.org/t/request-for-comments-on-approach-to-multithreaded-work/72728 "2021-12-08T23:00:35Z")

</div>

Hi, I’m developing a multithreaded version of a piece of software and already have a working solution. I just want to check if there is a simpler way of doing it. Basically, the problem can be reduced to this: suppose …

---

## [Splitting the PATH variable](https://discourse.julialang.org/t/splitting-the-path-variable/72735)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 6\
**Last updated:** [December 8, 2021, 10:46pm UTC](https://discourse.julialang.org/t/splitting-the-path-variable/72735 "2021-12-08T22:46:51Z")

</div>

I want to re-order path entries. On unix, ENV\["PATH"\] = "/usr/local/bin:/usr/bin:/bin" or some such. On windows, ENV\["PATH"\] = "c:\\\\usr\\\\local\\\\bin;c:\\\\usr\\\\bin;c:\\\\bin" But it could be ENV\["PATH"\] = "c:\\\\usr\\\\local\\…

---

## [Pluto and packages under development](https://discourse.julialang.org/t/pluto-and-packages-under-development/72768)

<div class="topic-metadata">

**Author:** [@threadedblue](https://discourse.julialang.org/u/threadedblue)\
**Replies:** 6\
**Last updated:** [December 8, 2021, 10:30pm UTC](https://discourse.julialang.org/t/pluto-and-packages-under-development/72768 "2021-12-08T22:30:16Z")

</div>

As I see it, a primary concern of Pluto is ensuring the shareability of notebooks. (There, I just invented a word.) And for this reason, Pluto requires packages to be registered. Am I not correct? However, sometimes an…

---

## [Intl' Workshop on Applied Verification of Continuous and Hybrid Systems Proceedings (2021)](https://discourse.julialang.org/t/intl-workshop-on-applied-verification-of-continuous-and-hybrid-systems-proceedings-2021/72789)

<div class="topic-metadata">

**Author:** [@mforets](https://discourse.julialang.org/u/mforets)\
**Replies:** 0\
**Last updated:** [December 8, 2021, 8:47pm UTC](https://discourse.julialang.org/t/intl-workshop-on-applied-verification-of-continuous-and-hybrid-systems-proceedings-2021/72789 "2021-12-08T20:47:23Z")

</div>

Communities Held on July (2021) in Brussels, Belgium, this year’s ARCH-COMP workshop was part of the 7th IFAC Conference on Analysis and Design of Hybrid Systems. For those who are interested on these topics, the proceed…

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

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