# Latest

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

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

**Page:** 1138

---

## [Finding the right JuMP package to solve a mixed-integer convex program](https://discourse.julialang.org/t/finding-the-right-jump-package-to-solve-a-mixed-integer-convex-program/75350)

<div class="topic-metadata">

**Author:** [@merlion](https://discourse.julialang.org/u/merlion)\
**Replies:** 3\
**Last updated:** [January 30, 2022, 3:29pm UTC](https://discourse.julialang.org/t/finding-the-right-jump-package-to-solve-a-mixed-integer-convex-program/75350 "2022-01-30T15:29:51Z")

</div>

I have a fairly straightforward optimisation problem that looks like this: \\max \\ \\log(a \\cdot x) + b \\cdot x \\\\ s.t. \\ x \\in \\{0,1\\}^n \\text{ and } \\sum\_{i \\in \[n\]}x\_i \\leq 10, for some a, b \\in \\mathbb{R}^n. I’d li…

---

## [Understanding btime](https://discourse.julialang.org/t/understanding-btime/75468)

<div class="topic-metadata">

**Author:** [@iskyd](https://discourse.julialang.org/u/iskyd)\
**Replies:** 1\
**Last updated:** [January 30, 2022, 2:50pm UTC](https://discourse.julialang.org/t/understanding-btime/75468 "2022-01-30T14:50:19Z")

</div>

I’ve implemented insertion sort and merge sort and I’m trying to run a benchmark between the two using @btime from BenchmarkTools input = rand(1:1000, 1000000) println("Insertion sort on random array of size ", length(i…

---

## [SciMLCon 2022 Abstract Extension: Submit by February 7th!](https://discourse.julialang.org/t/scimlcon-2022-abstract-extension-submit-by-february-7th/75469)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 0\
**Last updated:** [January 30, 2022, 2:44pm UTC](https://discourse.julialang.org/t/scimlcon-2022-abstract-extension-submit-by-february-7th/75469 "2022-01-30T14:44:59Z")

</div>

The SciMLCon 2022 abstraction submission deadline has been extended! The new deadline is February 7th at 11:59PM. To submit your application please see:

---

## [Plot points in grid](https://discourse.julialang.org/t/plot-points-in-grid/75463)

<div class="topic-metadata">

**Author:** [@Mahmoud](https://discourse.julialang.org/u/Mahmoud)\
**Replies:** 3\
**Last updated:** [January 30, 2022, 1:38pm UTC](https://discourse.julialang.org/t/plot-points-in-grid/75463 "2022-01-30T13:38:04Z")

</div>

Hi I have a grid of 100 elements that contain only three values 1 or 2 or 3 for each element. MyGrid = fill(1, (10, 10)); MyGrid \[rand(1:100)\] = 2; I want to plot this grid as points. Each point will take different co…

---

## [Color the lines in a contour plot of \`z\` by the values a different matrix \`w\`](https://discourse.julialang.org/t/color-the-lines-in-a-contour-plot-of-z-by-the-values-a-different-matrix-w/51233)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 1\
**Last updated:** [January 30, 2022, 11:43am UTC](https://discourse.julialang.org/t/color-the-lines-in-a-contour-plot-of-z-by-the-values-a-different-matrix-w/51233 "2022-01-30T11:43:51Z")

</div>

Let’s say I have the following MWE using Plots x = y = range(0, stop=π, length=100) z = cos.(x) .+ sin.(y') w = cos.(x).^2 .- sin.(y').^2 contour(x,y,z, levels=1) I would like the lines from the contour plot of z to…

---

## [Plots, DataFrames, composite x-axis](https://discourse.julialang.org/t/plots-dataframes-composite-x-axis/75458)

<div class="topic-metadata">

**Author:** [@maajdl](https://discourse.julialang.org/u/maajdl)\
**Replies:** 3\
**Last updated:** [January 30, 2022, 10:45am UTC](https://discourse.julialang.org/t/plots-dataframes-composite-x-axis/75458 "2022-01-30T10:45:37Z")

</div>

Hello I would like to create a plot similar to this shown below. It would be based on a dataframe and I would like to use Plots. The x axis data would come from two columns. Like a country-code and a date, as shown. …

---

## [Maxwellian Distributions](https://discourse.julialang.org/t/maxwellian-distributions/75443)

<div class="topic-metadata">

**Author:** [@CentraCep](https://discourse.julialang.org/u/CentraCep)\
**Replies:** 1\
**Last updated:** [January 30, 2022, 3:08am UTC](https://discourse.julialang.org/t/maxwellian-distributions/75443 "2022-01-30T03:08:19Z")

</div>

Is there a way in Julia to convenient initialize a variable as a Maxwellian Distribution (with area under the curve = 1)? I took a look at the Distributions.jl but did not see the Maxwellian Distribution (perhaps it is i…

---

## [Overlaying contour plots - colours](https://discourse.julialang.org/t/overlaying-contour-plots-colours/37795)

<div class="topic-metadata">

**Author:** [@chriswaudby](https://discourse.julialang.org/u/chriswaudby)\
**Replies:** 3\
**Last updated:** [January 30, 2022, 12:53am UTC](https://discourse.julialang.org/t/overlaying-contour-plots-colours/37795 "2022-01-30T00:53:50Z")

</div>

I’m working with spectroscopic data where data are visualised as 2D contour plots (just lines, not filled), and it is extremely common to overlay multiple datasets using different colours (e.g. search ‘2D NMR titration’ …

---

## [A question on creating an array](https://discourse.julialang.org/t/a-question-on-creating-an-array/75439)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 2\
**Last updated:** [January 30, 2022, 12:37am UTC](https://discourse.julialang.org/t/a-question-on-creating-an-array/75439 "2022-01-30T00:37:21Z")

</div>

I have a matrix X1 with the size of 360 \* 180. My goal is to create an array X2 with 100 layers, and each layer will have a matrix identical to X1, so that my final array X2 will have a size of 360 \* 180 \* 100. How do …

---

## [Trying to populate a structure inside a for loop but getting "MethodError: Cannot \`convert\` an object of type String to an object of type file\_info"](https://discourse.julialang.org/t/trying-to-populate-a-structure-inside-a-for-loop-but-getting-methoderror-cannot-convert-an-object-of-type-string-to-an-object-of-type-file-info/75437)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 4\
**Last updated:** [January 30, 2022, 12:10am UTC](https://discourse.julialang.org/t/trying-to-populate-a-structure-inside-a-for-loop-but-getting-methoderror-cannot-convert-an-object-of-type-string-to-an-object-of-type-file-info/75437 "2022-01-30T00:10:03Z")

</div>

just starting out and trying to get information about an directory on a linux disk that I pass as an arguement. I thought I’d try out building a structure use it to define an array. Then I would add each file’s informat…

---

## [Big Book of Julia](https://discourse.julialang.org/t/big-book-of-julia/75436)

<div class="topic-metadata">

**Author:** [@AdamWysokinski](https://discourse.julialang.org/u/AdamWysokinski)\
**Replies:** 0\
**Last updated:** [January 29, 2022, 11:11pm UTC](https://discourse.julialang.org/t/big-book-of-julia/75436 "2022-01-29T23:11:13Z")

</div>

Hi, I’ve started a project similar to the Big Book of R: Anyone interested in contributing links is welcome to make a pull request. ATB, Adam

---

## [Why assign high variance for prior in bayesian linear regression?](https://discourse.julialang.org/t/why-assign-high-variance-for-prior-in-bayesian-linear-regression/75429)

<div class="topic-metadata">

**Author:** [@mirror63](https://discourse.julialang.org/u/mirror63)\
**Replies:** 2\
**Last updated:** [January 29, 2022, 10:47pm UTC](https://discourse.julialang.org/t/why-assign-high-variance-for-prior-in-bayesian-linear-regression/75429 "2022-01-29T22:47:45Z")

</div>

I am practicing and implementing Bayesian Linear Regression from Linear Regression . Here, for the linear regression model, they assign a prior variance truncated(Normal(0, 100), 0, Inf) can someone explain, why they hav…

---

## [Providing artifacts/libraries for unsupported platforms (e.g. Apple Silicon)](https://discourse.julialang.org/t/providing-artifacts-libraries-for-unsupported-platforms-e-g-apple-silicon/75411)

<div class="topic-metadata">

**Author:** [@Hawkes](https://discourse.julialang.org/u/Hawkes)\
**Replies:** 5\
**Last updated:** [January 29, 2022, 9:32pm UTC](https://discourse.julialang.org/t/providing-artifacts-libraries-for-unsupported-platforms-e-g-apple-silicon/75411 "2022-01-29T21:32:07Z")

</div>

Hi, as I have recently switched to a MBP with Apple M1 I have experienced some issues with packages relying on Artifacts/JLL packages which do not yet include a wrapper in their JLL package. In particular I have encoun…

---

## [More threads, slower code, even if not spawning them](https://discourse.julialang.org/t/more-threads-slower-code-even-if-not-spawning-them/75242)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 19\
**Last updated:** [January 29, 2022, 9:16pm UTC](https://discourse.julialang.org/t/more-threads-slower-code-even-if-not-spawning-them/75242 "2022-01-29T21:16:37Z")

</div>

Maybe I don’t understand how @spawn works, but here is what I am observing: When executing a parallel task with it, I observe that the performance is significantly worse if I have more threads available (i. e. starting j…

---

## [Counting all same path in a JSON](https://discourse.julialang.org/t/counting-all-same-path-in-a-json/75433)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 0\
**Last updated:** [January 29, 2022, 8:50pm UTC](https://discourse.julialang.org/t/counting-all-same-path-in-a-json/75433 "2022-01-29T20:50:07Z")

</div>

Hi All, I am curios if someone was solving a following problem. In JsonGrinder.jl, I need to store leafs of JSONs of the same type (same path) to the same continuous array, such that when I pass it to Neural Network, B…

---

## [Unkown connection number for ModelingToolkit system](https://discourse.julialang.org/t/unkown-connection-number-for-modelingtoolkit-system/75337)

<div class="topic-metadata">

**Author:** [@Antomek](https://discourse.julialang.org/u/Antomek)\
**Replies:** 6\
**Last updated:** [January 29, 2022, 7:36pm UTC](https://discourse.julialang.org/t/unkown-connection-number-for-modelingtoolkit-system/75337 "2022-01-29T19:36:04Z")

</div>

Hello everyone, I’ve run into a challenge with using ModelingToolkit, where I have a lots of (similar) systems, each with lots of inputs from a number of other systems connected to it. Because of the large number of sy…

---

## [Gtk. How do I create a submenu?](https://discourse.julialang.org/t/gtk-how-do-i-create-a-submenu/75418)

<div class="topic-metadata">

**Author:** [@johntrinder](https://discourse.julialang.org/u/johntrinder)\
**Replies:** 2\
**Last updated:** [January 29, 2022, 7:31pm UTC](https://discourse.julialang.org/t/gtk-how-do-i-create-a-submenu/75418 "2022-01-29T19:31:48Z")

</div>

I’m still a beginner at Gtk GUI interface package. I’ve googled a lot, but I can’t find any code snippets for how to create a submenu in Julia. Could someone please advise.

---

## [Create a user-type set](https://discourse.julialang.org/t/create-a-user-type-set/75420)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 2\
**Last updated:** [January 29, 2022, 6:31pm UTC](https://discourse.julialang.org/t/create-a-user-type-set/75420 "2022-01-29T18:31:41Z")

</div>

hellow, how to create a user type set? # i do mutable struct UserType id::Int end Base.:(==)(a::UserType, b::UserType) = a.id == b.id set = Set((UserType(1), UserType(2),)) UserType(1) == UserType(1) # -\> true # bu…

---

## [Mathematical calculations accelerated by GPU](https://discourse.julialang.org/t/mathematical-calculations-accelerated-by-gpu/74607)

<div class="topic-metadata">

**Author:** [@Minumsand](https://discourse.julialang.org/u/Minumsand)\
**Replies:** 9\
**Last updated:** [January 29, 2022, 4:28pm UTC](https://discourse.julialang.org/t/mathematical-calculations-accelerated-by-gpu/74607 "2022-01-29T16:28:47Z")

</div>

Hello dear GPU-interested Julia members Although I am still far away from being familiar enough with Julia, I am making plans to utilise a GPU for future number crunching. I want to underline: mining with graphic cards …

---

## [\`vscodedisplay\` no longer works after including DataFrame into image](https://discourse.julialang.org/t/vscodedisplay-no-longer-works-after-including-dataframe-into-image/46261)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 0\
**Last updated:** [September 8, 2020, 12:32pm UTC](https://discourse.julialang.org/t/vscodedisplay-no-longer-works-after-including-dataframe-into-image/46261 "2020-09-08T12:32:49Z")

</div>

This is really easy to replicate using PackageCompiler create\_sysimage(:DataFrames, replace\_default=true) \`\` then restart Julia in VSCode using DataFrames a = DataFrame(a=1:3) vscodedisplay(a) Then you will see t…

---

## [How to set a property in the current module](https://discourse.julialang.org/t/how-to-set-a-property-in-the-current-module/75416)

<div class="topic-metadata">

**Author:** [@taotree](https://discourse.julialang.org/u/taotree)\
**Replies:** 2\
**Last updated:** [January 29, 2022, 3:11pm UTC](https://discourse.julialang.org/t/how-to-set-a-property-in-the-current-module/75416 "2022-01-29T15:11:19Z")

</div>

If I call setproperty!(anymodule, sym, val) it gives an error cannot assign variables in other modules. Does that suggest I can assign variables in the current module? But if so, how? This setproperty!(NameOfCurrentModul…

---

## [How to convert a String to a Reaction/ReactionSystem type (Catalyst.jl)?](https://discourse.julialang.org/t/how-to-convert-a-string-to-a-reaction-reactionsystem-type-catalyst-jl/75377)

<div class="topic-metadata">

**Author:** [@Leticia-maria](https://discourse.julialang.org/u/Leticia-maria)\
**Replies:** 1\
**Last updated:** [January 29, 2022, 2:58pm UTC](https://discourse.julialang.org/t/how-to-convert-a-string-to-a-reaction-reactionsystem-type-catalyst-jl/75377 "2022-01-29T14:58:18Z")

</div>

Hey you all, I wanna use Strings to add reactions to a @reaction\_network in Catalyst.jl. For example: julia\> example = @reaction\_network empty julia\> addreaction!(example, "k, A --\> B") or julia\> addreaction!(example,…

---

## [DataFrames version of R's which() function](https://discourse.julialang.org/t/dataframes-version-of-rs-which-function/75401)

<div class="topic-metadata">

**Author:** [@rwalters31](https://discourse.julialang.org/u/rwalters31)\
**Replies:** 6\
**Last updated:** [January 29, 2022, 1:59pm UTC](https://discourse.julialang.org/t/dataframes-version-of-rs-which-function/75401 "2022-01-29T13:59:17Z")

</div>

TLDR; is there a Julia version of R’s which() function? I’m rewriting some code from R to Julia. I’ve gotten comfortable with the DataFrames subset function but in addition to returning rows I occassionally need to acc…

---

## [VS Code table display macro](https://discourse.julialang.org/t/vs-code-table-display-macro/75392)

<div class="topic-metadata">

**Author:** [@rwalters31](https://discourse.julialang.org/u/rwalters31)\
**Replies:** 6\
**Last updated:** [January 29, 2022, 1:48pm UTC](https://discourse.julialang.org/t/vs-code-table-display-macro/75392 "2022-01-29T13:48:52Z")

</div>

I would like to have a macro to quickly view dataframes in VS code. macro table(df) return VSCodeServer.vscodedisplay(df) end When run the macro I do not get an error but the Julia Table tab in VS Code does not app…

---

## [Slow Jupyter with Julia](https://discourse.julialang.org/t/slow-jupyter-with-julia/75391)

<div class="topic-metadata">

**Author:** [@dal233](https://discourse.julialang.org/u/dal233)\
**Replies:** 3\
**Last updated:** [January 29, 2022, 1:36pm UTC](https://discourse.julialang.org/t/slow-jupyter-with-julia/75391 "2022-01-29T13:36:50Z")

</div>

When I run something simple like 1+1 in Jupyter using Julia, it is significantly slower than when I do the same thing with Python. How come? And is there a faster way to use Julia in Jupyter?

---

## [Parse 97 or 97.0 to Integer: clever method?](https://discourse.julialang.org/t/parse-97-or-97-0-to-integer-clever-method/75406)

<div class="topic-metadata">

**Author:** [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Replies:** 7\
**Last updated:** [January 29, 2022, 1:31pm UTC](https://discourse.julialang.org/t/parse-97-or-97-0-to-integer-clever-method/75406 "2022-01-29T13:31:42Z")

</div>

I’m parsing string data from a file written by LabVIEW – numbers written out as strings, which I am parsing to numeric types. In this example, integers. The LabVIEW program is a little inconsistent. The pressure settin…

---

## [Is Julia a good choice for Data Engineering?](https://discourse.julialang.org/t/is-julia-a-good-choice-for-data-engineering/38629)

<div class="topic-metadata">

**Author:** [@rwatts3](https://discourse.julialang.org/u/rwatts3)\
**Replies:** 11\
**Last updated:** [January 29, 2022, 12:41pm UTC](https://discourse.julialang.org/t/is-julia-a-good-choice-for-data-engineering/38629 "2022-01-29T12:41:58Z")

</div>

My apologies for the generic question. Unfortunately after searching around I haven’t been able to find a direct answer. I would like to know the communities opinion on using Julia for Data Engineering tasks. You know…

---

## [Have confusion regarding Linear Regression](https://discourse.julialang.org/t/have-confusion-regarding-linear-regression/75399)

<div class="topic-metadata">

**Author:** [@mirror63](https://discourse.julialang.org/u/mirror63)\
**Replies:** 7\
**Last updated:** [January 29, 2022, 11:59am UTC](https://discourse.julialang.org/t/have-confusion-regarding-linear-regression/75399 "2022-01-29T11:59:37Z")

</div>

Blood pressure is normally measured using cuff based methods. New contactless methods for blood pressure measurements rely on measuring time difference between two biomedical waveforms. This time difference is called pul…

---

## [\[ANN\] jlrs v0.7: write functions in Rust and call them from Julia, execute multiple tasks in parallel, use Julia arrays with ndarray](https://discourse.julialang.org/t/ann-jlrs-v0-7-write-functions-in-rust-and-call-them-from-julia-execute-multiple-tasks-in-parallel-use-julia-arrays-with-ndarray/48287)

<div class="topic-metadata">

**Author:** [@Taaitaaiger](https://discourse.julialang.org/u/Taaitaaiger)\
**Replies:** 0\
**Last updated:** [October 13, 2020, 10:15am UTC](https://discourse.julialang.org/t/ann-jlrs-v0-7-write-functions-in-rust-and-call-them-from-julia-execute-multiple-tasks-in-parallel-use-julia-arrays-with-ndarray/48287 "2020-10-13T10:15:22Z")

</div>

Last Saturday I released jlrs v0.7 which has two major new features. First of all, you can now use functionality from jlrs when writing Rust code that is called from Julia using its ccall interface. This function can ca…

---

## [I wrote Rust bindings for Julia. If you're interested in calling Julia from Rust, please have a look and tell me what you think](https://discourse.julialang.org/t/i-wrote-rust-bindings-for-julia-if-youre-interested-in-calling-julia-from-rust-please-have-a-look-and-tell-me-what-you-think/34481)

<div class="topic-metadata">

**Author:** [@Taaitaaiger](https://discourse.julialang.org/u/Taaitaaiger)\
**Replies:** 0\
**Last updated:** [February 11, 2020, 6:49pm UTC](https://discourse.julialang.org/t/i-wrote-rust-bindings-for-julia-if-youre-interested-in-calling-julia-from-rust-please-have-a-look-and-tell-me-what-you-think/34481 "2020-02-11T18:49:41Z")

</div>

Note: this topic’s contents are a copy of the original post on the Rust subreddit. After quite some effort I’m finally ready to release first version of jlrs, the Julia bindings I’ve been working on for the past few wee…

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

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