# Latest

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

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

**Page:** 1269

---

## [Strange autoformatting with vscode](https://discourse.julialang.org/t/strange-autoformatting-with-vscode/67976)

<div class="topic-metadata">

**Author:** [@stroebel](https://discourse.julialang.org/u/stroebel)\
**Replies:** 5\
**Last updated:** [September 13, 2021, 8:54am UTC](https://discourse.julialang.org/t/strange-autoformatting-with-vscode/67976 "2021-09-13T08:54:25Z")

</div>

This might be me being an idiot, but why would the the vscode extention insist on formatting this code block as it is? The structs defined above and below are formatted correctly.

---

## [Julia is Overwriting output of a Function](https://discourse.julialang.org/t/julia-is-overwriting-output-of-a-function/68061)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 2\
**Last updated:** [September 13, 2021, 5:13am UTC](https://discourse.julialang.org/t/julia-is-overwriting-output-of-a-function/68061 "2021-09-13T05:13:09Z")

</div>

Hello, I am having a very weird behavior in Julia, however, I am having a hard time reproducing it in a MWE. Let me try to describe it, with an example which does not reproduce the error function test(x,y) res…

---

## [Gurobi Error 10005: Unable to retrieve attribute 'Slack'](https://discourse.julialang.org/t/gurobi-error-10005-unable-to-retrieve-attribute-slack/68067)

<div class="topic-metadata">

**Author:** [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Replies:** 3\
**Last updated:** [September 13, 2021, 3:35am UTC](https://discourse.julialang.org/t/gurobi-error-10005-unable-to-retrieve-attribute-slack/68067 "2021-09-13T03:35:24Z")

</div>

Hi, I’m getting the above error when using Gurobi to solve an LP and then querying the value of a constraint. The LP has been solved such that @assert(termination\_status(𝓜) == MOI.OPTIMAL) passes. Unfortunately, I hav…

---

## [Fastest way to swap bytes order in-place (ntoh)](https://discourse.julialang.org/t/fastest-way-to-swap-bytes-order-in-place-ntoh/68053)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 1\
**Last updated:** [September 13, 2021, 12:56am UTC](https://discourse.julialang.org/t/fastest-way-to-swap-bytes-order-in-place-ntoh/68053 "2021-09-13T00:56:47Z")

</div>

Originally we had real\_data = ntoh.(reinterpret(T, rawdata)) where T is some element type such as Float64, rawdata is always a UIn8 vector. After some help from Slack, we’ve moved to: real\_data = GC.@preserve rawdata…

---

## [Type hierarchy of reinterpreted arrays](https://discourse.julialang.org/t/type-hierarchy-of-reinterpreted-arrays/68066)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 0\
**Last updated:** [September 12, 2021, 11:42pm UTC](https://discourse.julialang.org/t/type-hierarchy-of-reinterpreted-arrays/68066 "2021-09-12T23:42:22Z")

</div>

Is it correct to say that a reinterpreted array belongs to the same place in the type hierarchy of the original array? Meaning: julia\> x = rand(3,3) 3×3 Matrix{Float64}: 0.147486 0.663168 0.631236 0.133914 0.63211…

---

## [Running an external program with non-zero return values](https://discourse.julialang.org/t/running-an-external-program-with-non-zero-return-values/68057)

<div class="topic-metadata">

**Author:** [@pfarndt](https://discourse.julialang.org/u/pfarndt)\
**Replies:** 2\
**Last updated:** [September 12, 2021, 10:20pm UTC](https://discourse.julialang.org/t/running-an-external-program-with-non-zero-return-values/68057 "2021-09-12T22:20:52Z")

</div>

I want to parse a diff from two versions of a file. Thought to do this by running diff as an external program and reading its output into a String: read(\`diff version1.txt version2.txt\`, String) This works fine and ret…

---

## [JuAFEM read meshes created with gmsh](https://discourse.julialang.org/t/juafem-read-meshes-created-with-gmsh/40117)

<div class="topic-metadata">

**Author:** [@FrootLoops](https://discourse.julialang.org/u/FrootLoops)\
**Replies:** 0\
**Last updated:** [May 25, 2020, 11:06am UTC](https://discourse.julialang.org/t/juafem-read-meshes-created-with-gmsh/40117 "2020-05-25T11:06:29Z")

</div>

Hi everybody, is it possible to read gmsh meshes into JuAFEM? I just found a package for JuliaFEM and now I am wondering if there is a way to load/read meshes created with gmesh into JuaFEM. Edit: I would also be happy…

---

## [How to use a Quasar form in StippleUI?](https://discourse.julialang.org/t/how-to-use-a-quasar-form-in-stippleui/62930)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 11\
**Last updated:** [September 12, 2021, 8:55pm UTC](https://discourse.julialang.org/t/how-to-use-a-quasar-form-in-stippleui/62930 "2021-09-12T20:55:12Z")

</div>

Typically, in a Quasar form the client-side validations, defined as rules in each of the child elements (like QInput, QSelect or your QField wrapped components), get checked when a type=submit button gets pressed with th…

---

## [Where can I find the packages mentioned in error messages?](https://discourse.julialang.org/t/where-can-i-find-the-packages-mentioned-in-error-messages/68056)

<div class="topic-metadata">

**Author:** [@cybervigilante](https://discourse.julialang.org/u/cybervigilante)\
**Replies:** 3\
**Last updated:** [September 12, 2021, 8:46pm UTC](https://discourse.julialang.org/t/where-can-i-find-the-packages-mentioned-in-error-messages/68056 "2021-09-12T20:46:27Z")

</div>

I got an error message that said @ Base .\\loading.jl:1116 and thought I’d look at loading.jl to learn something. So I searched the .julia directory in Windows but it didn’t turn up. How or where do I find packages men…

---

## [Type instability of pdf of MixtureModel](https://discourse.julialang.org/t/type-instability-of-pdf-of-mixturemodel/68058)

<div class="topic-metadata">

**Author:** [@sgaure](https://discourse.julialang.org/u/sgaure)\
**Replies:** 2\
**Last updated:** [September 12, 2021, 7:12pm UTC](https://discourse.julialang.org/t/type-instability-of-pdf-of-mixturemodel/68058 "2021-09-12T19:12:36Z")

</div>

When I create a Normal one-dimensional mixture as, d = MixtureModel(\[Normal(-1,1), Normal(1, 1)\], \[0.5,0.5\]) it turns out that the pdf is not type stable: julia\> @code\_warntype pdf(d,0.3) MethodInstance for Distrib…

---

## [Help understanding an error on Windows](https://discourse.julialang.org/t/help-understanding-an-error-on-windows/68059)

<div class="topic-metadata">

**Author:** [@contradict](https://discourse.julialang.org/u/contradict)\
**Replies:** 0\
**Last updated:** [September 12, 2021, 6:43pm UTC](https://discourse.julialang.org/t/help-understanding-an-error-on-windows/68059 "2021-09-12T18:43:34Z")

</div>

In this PR I attempted to fix a few things in YAML.jl. I succeeded in fixing them for Linux, but it looks like I broke something for Windows in the process. It looks to me like eof behaves differently on Windows, but I d…

---

## [No OpenCascade or FLTK on GMSH](https://discourse.julialang.org/t/no-opencascade-or-fltk-on-gmsh/30655)

<div class="topic-metadata">

**Author:** [@Gig](https://discourse.julialang.org/u/Gig)\
**Replies:** 0\
**Last updated:** [November 3, 2019, 4:00pm UTC](https://discourse.julialang.org/t/no-opencascade-or-fltk-on-gmsh/30655 "2019-11-03T16:00:37Z")

</div>

I was interesting in using GMSH with Julia. I’ve installe the api and everything works fine until I don’t try to use fltk or the functions in ooc that uses opencascade, if I try to run for example: gmsh.model.ooc.addBox…

---

## [Gmsh package Windows incompatibility](https://discourse.julialang.org/t/gmsh-package-windows-incompatibility/47460)

<div class="topic-metadata">

**Author:** [@NickLucido](https://discourse.julialang.org/u/NickLucido)\
**Replies:** 0\
**Last updated:** [September 29, 2020, 3:01am UTC](https://discourse.julialang.org/t/gmsh-package-windows-incompatibility/47460 "2020-09-29T03:01:19Z")

</div>

I’m considering using Julia to make a few small tools for my colleagues and I, but I’ve run into an issue. The Gmsh package isn’t compatible with windows, however there is a work around given in this old thread: Downl…

---

## [Julia 1.6.3 testing period](https://discourse.julialang.org/t/julia-1-6-3-testing-period/67961)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 5\
**Last updated:** [September 12, 2021, 6:29pm UTC](https://discourse.julialang.org/t/julia-1-6-3-testing-period/67961 "2021-09-12T18:29:31Z")

</div>

The release-1.6 branch on the Julia repository now contains the set of commits we’re planning to tag as v1.6.3, the third patch release in the 1.6 series. The list of commits included since v1.6.2 is available here. As a…

---

## [Help defining setindex! with a custom structure](https://discourse.julialang.org/t/help-defining-setindex-with-a-custom-structure/68055)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 9\
**Last updated:** [September 12, 2021, 5:57pm UTC](https://discourse.julialang.org/t/help-defining-setindex-with-a-custom-structure/68055 "2021-09-12T17:57:29Z")

</div>

Hi! I have a struct called Quaternion (which has 4 elements) and I want to make the following code work: julia\> v = zeros(10); julia\> q = Quaternion(1.0, 2.0, 3.0, 4.0); julia\> v\[4:7\] = q It fails with the following…

---

## [How would you write this in Index notation?](https://discourse.julialang.org/t/how-would-you-write-this-in-index-notation/68032)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 1\
**Last updated:** [September 12, 2021, 3:28pm UTC](https://discourse.julialang.org/t/how-would-you-write-this-in-index-notation/68032 "2021-09-12T15:28:22Z")

</div>

Hi! So a bit of an off-topic question, but I think a lot of you here have an interest in math. If you had an expression you wanted to put in index notation given for one value of i as: Where x is a vector with i = 1 …

---

## [Fastest way to permute Array, given some permutation](https://discourse.julialang.org/t/fastest-way-to-permute-array-given-some-permutation/49687)

<div class="topic-metadata">

**Author:** [@DavidBerghaus](https://discourse.julialang.org/u/DavidBerghaus)\
**Replies:** 13\
**Last updated:** [September 12, 2021, 1:06pm UTC](https://discourse.julialang.org/t/fastest-way-to-permute-array-given-some-permutation/49687 "2021-09-12T13:06:19Z")

</div>

I wonder what the fastest way is to apply a permutation to an array. Three approaches that I checked are: julia\> A = rand(10000); julia\> permutation = sortperm(A); julia\> @btime $A\[$permutation\]; 11.700 μs (3 alloca…

---

## [Using \`\`\`set\_state\`\`\`?](https://discourse.julialang.org/t/using-set-state/68045)

<div class="topic-metadata">

**Author:** [@pafloxy](https://discourse.julialang.org/u/pafloxy)\
**Replies:** 9\
**Last updated:** [September 12, 2021, 12:58pm UTC](https://discourse.julialang.org/t/using-set-state/68045 "2021-09-12T12:58:29Z")

</div>

Can someone elaborate on how to use set\_state while using parallel\_integrator .Specifically how exactly to specify the index of the state to be set.? I couldn’t interpret tht documentation provided on their website!

---

## [How to call an imported (predefined) macro as a function on expressions?](https://discourse.julialang.org/t/how-to-call-an-imported-predefined-macro-as-a-function-on-expressions/68015)

<div class="topic-metadata">

**Author:** [@thisismygitrepo](https://discourse.julialang.org/u/thisismygitrepo)\
**Replies:** 6\
**Last updated:** [September 12, 2021, 12:52pm UTC](https://discourse.julialang.org/t/how-to-call-an-imported-predefined-macro-as-a-function-on-expressions/68015 "2021-09-12T12:52:16Z")

</div>

Say that I installed a package that provides the macro @pipe, and I am making my own macro that uses that one. My question is, how can I call that macro as a function. somehow / ideally: modified\_expression = pipe(expre…

---

## [Change width of cell and table of contents in Pluto](https://discourse.julialang.org/t/change-width-of-cell-and-table-of-contents-in-pluto/68047)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 0\
**Last updated:** [September 12, 2021, 10:57am UTC](https://discourse.julialang.org/t/change-width-of-cell-and-table-of-contents-in-pluto/68047 "2021-09-12T10:57:02Z")

</div>

I would like to expand the width of cells in Pluto and modify the width of the table of contents to prevent it from displaying on top of the cells. How can this be done?

---

## [Constraints in Catalyst.jl for weak acids and pH equilibrium](https://discourse.julialang.org/t/constraints-in-catalyst-jl-for-weak-acids-and-ph-equilibrium/68037)

<div class="topic-metadata">

**Author:** [@gagnonaa10](https://discourse.julialang.org/u/gagnonaa10)\
**Replies:** 2\
**Last updated:** [September 12, 2021, 12:09pm UTC](https://discourse.julialang.org/t/constraints-in-catalyst-jl-for-weak-acids-and-ph-equilibrium/68037 "2021-09-12T12:09:27Z")

</div>

Hello Everyone, I was hoping for some guidance on how to incorporate constraints for pH equilibriums constants into a disinfection model I am building in Julia. A simplified version of the reaction network is here: us…

---

## [Can't figure out how to Get Data from Azure Blob](https://discourse.julialang.org/t/cant-figure-out-how-to-get-data-from-azure-blob/68024)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 1\
**Last updated:** [September 12, 2021, 11:00am UTC](https://discourse.julialang.org/t/cant-figure-out-how-to-get-data-from-azure-blob/68024 "2021-09-12T11:00:56Z")

</div>

Hi All. I have been asked to download data from an Azure account someone has given me details for. This is apparently easily done the using get\_blob() command from AzureBlob.jl. I managed to install the latter and run…

---

## [How to fix the rotated label position in this plot?](https://discourse.julialang.org/t/how-to-fix-the-rotated-label-position-in-this-plot/68025)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 7\
**Last updated:** [September 12, 2021, 9:54am UTC](https://discourse.julialang.org/t/how-to-fix-the-rotated-label-position-in-this-plot/68025 "2021-09-12T09:54:12Z")

</div>

Hi, I cannot figure how to correct the position of the rotated xticks label in the following plot: using Plots a=\["absmax\_global", "absmax\_global\_ref", "absmax\_local"\] b=\[0.03953348557784052, 1.0667377825188347, 1.9650…

---

## [Julia crashes when doing parameter estimation for a system of differential equations in VScode](https://discourse.julialang.org/t/julia-crashes-when-doing-parameter-estimation-for-a-system-of-differential-equations-in-vscode/67859)

<div class="topic-metadata">

**Author:** [@shwetank\_verma](https://discourse.julialang.org/u/shwetank_verma)\
**Replies:** 9\
**Last updated:** [September 12, 2021, 8:48am UTC](https://discourse.julialang.org/t/julia-crashes-when-doing-parameter-estimation-for-a-system-of-differential-equations-in-vscode/67859 "2021-09-12T08:48:18Z")

</div>

I have written a battery model in Julia. This model already runs without any issues. I want to now do parameter estimation w.r.t to testing data using DiffEqFlux.jl . However, whenever I run the diffeqflux.scimltrain co…

---

## [Numbers on axis not displayed correctly with Makie and Plots.jl](https://discourse.julialang.org/t/numbers-on-axis-not-displayed-correctly-with-makie-and-plots-jl/62291)

<div class="topic-metadata">

**Author:** [@halejulia](https://discourse.julialang.org/u/halejulia)\
**Replies:** 2\
**Last updated:** [September 11, 2021, 10:37am UTC](https://discourse.julialang.org/t/numbers-on-axis-not-displayed-correctly-with-makie-and-plots-jl/62291 "2021-09-11T10:37:10Z")

</div>

I have the following problem: When I try to Plot something the it looks like this using Plots plot(sin,0,6) similarly with Makie: using GLMakie lines(0..6,sin) Maybe I accendentally changed some parameter that …

---

## [Transfer a Sparse Matrix to a C Function](https://discourse.julialang.org/t/transfer-a-sparse-matrix-to-a-c-function/67883)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 13\
**Last updated:** [September 11, 2021, 7:48pm UTC](https://discourse.julialang.org/t/transfer-a-sparse-matrix-to-a-c-function/67883 "2021-09-11T19:48:26Z")

</div>

I have a C function (See IncompleteCholeskyDecomposition.c) which accepts a Sparse Matrix in CSC format (Actually 2 matrices). I wonder, how do I extract the data, row index and column pointer from a given Julia Sparse …

---

## [Symbolics.jl & @syms?](https://discourse.julialang.org/t/symbolics-jl-syms/67994)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 3\
**Last updated:** [September 11, 2021, 8:34pm UTC](https://discourse.julialang.org/t/symbolics-jl-syms/67994 "2021-09-11T20:34:48Z")

</div>

Just curious… I noticed that the SymbolicUtils.jl documentation (now) uses @syms to create new symbolic variables. The same seems to work in Symbolics.jl and ModelingToolkit.jl. Is this a change from using @variables, o…

---

## [Can I get this syntax to work using zip?](https://discourse.julialang.org/t/can-i-get-this-syntax-to-work-using-zip/68009)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 14\
**Last updated:** [September 11, 2021, 5:27pm UTC](https://discourse.julialang.org/t/can-i-get-this-syntax-to-work-using-zip/68009 "2021-09-11T17:27:24Z")

</div>

Hello! Suppose I have two points defined as: p1 = (1.0,1.0) p2 = (1.0,1.025) Then I want to calculate the pair-wise distance between the two as such: for (i,j) in zip(p1,p2) diff = i - j end And I want the outpu…

---

## [Writing Data to JSON Files on HPC Cluster](https://discourse.julialang.org/t/writing-data-to-json-files-on-hpc-cluster/67943)

<div class="topic-metadata">

**Author:** [@Noah\_Guzman](https://discourse.julialang.org/u/Noah_Guzman)\
**Replies:** 4\
**Last updated:** [September 11, 2021, 4:53pm UTC](https://discourse.julialang.org/t/writing-data-to-json-files-on-hpc-cluster/67943 "2021-09-11T16:53:54Z")

</div>

Having some issues saving the output of Julia simulations (stochastic differential equations) in a SLURM cluster to JSON files. The cluster manager and I have not been able to figure this out. My original program runs ma…

---

## [Solving a Petersen Matrix with Julia](https://discourse.julialang.org/t/solving-a-petersen-matrix-with-julia/67674)

<div class="topic-metadata">

**Author:** [@Kester](https://discourse.julialang.org/u/Kester)\
**Replies:** 10\
**Last updated:** [September 11, 2021, 4:29pm UTC](https://discourse.julialang.org/t/solving-a-petersen-matrix-with-julia/67674 "2021-09-11T16:29:54Z")

</div>

Julia has been great so far for my work in environmental engineering and modeling. I have only used it for simple systems thus far, but it is very performant. Maybe I am missing something simple, but I have not found a …

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

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