# Latest

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

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

**Page:** 894

---

## [Cannot warmstart same HiGHS model without rebuilding](https://discourse.julialang.org/t/cannot-warmstart-same-highs-model-without-rebuilding/88816)

<div class="topic-metadata">

**Author:** [@obar](https://discourse.julialang.org/u/obar)\
**Replies:** 2\
**Last updated:** [October 17, 2022, 3:56am UTC](https://discourse.julialang.org/t/cannot-warmstart-same-highs-model-without-rebuilding/88816 "2022-10-17T03:56:00Z")

</div>

Hi, Ran into a bit of a weird issue with trying to use the HiGHS solver for sequential objective optimisation. When trying to use set\_start\_value for warmstarting, it works perfectly fine if the second objective model …

---

## [Running multiple Julia sessions simultaneously](https://discourse.julialang.org/t/running-multiple-julia-sessions-simultaneously/88762)

<div class="topic-metadata">

**Author:** [@mengxiaoliu](https://discourse.julialang.org/u/mengxiaoliu)\
**Replies:** 4\
**Last updated:** [October 17, 2022, 3:06am UTC](https://discourse.julialang.org/t/running-multiple-julia-sessions-simultaneously/88762 "2022-10-17T03:06:21Z")

</div>

Hello, I did a little research online and did not find the answer I was looking for. I would like to run two Julia sessions on my mac and am not sure if this is feasible. My friend suggested that I run one session on …

---

## [Implement a REST server in Julia?](https://discourse.julialang.org/t/implement-a-rest-server-in-julia/9117)

<div class="topic-metadata">

**Author:** [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)\
**Replies:** 19\
**Last updated:** [October 17, 2022, 2:20am UTC](https://discourse.julialang.org/t/implement-a-rest-server-in-julia/9117 "2022-10-17T02:20:48Z")

</div>

I would like to build a REST API for a Julia code. I am currently evaluating whether I use also Julia to implement the REST server or if I use another language (e.g. Python) for the server part. These are the package th…

---

## [Makie - Optimal way of drawing milions of data points](https://discourse.julialang.org/t/makie-optimal-way-of-drawing-milions-of-data-points/78748)

<div class="topic-metadata">

**Author:** [@mkoculak](https://discourse.julialang.org/u/mkoculak)\
**Replies:** 13\
**Last updated:** [October 17, 2022, 1:42am UTC](https://discourse.julialang.org/t/makie-optimal-way-of-drawing-milions-of-data-points/78748 "2022-10-17T01:42:13Z")

</div>

Hi, first of all, big thanks to authors and contributors of Makie! This is the package that dragged me into Julia and it works so well for my use cases, that it feels illegal. :slight\_smile: I am working with long tim…

---

## [DataType and Type{DataType}](https://discourse.julialang.org/t/datatype-and-type-datatype/88815)

<div class="topic-metadata">

**Author:** [@HashBrown](https://discourse.julialang.org/u/HashBrown)\
**Replies:** 1\
**Last updated:** [October 17, 2022, 12:36am UTC](https://discourse.julialang.org/t/datatype-and-type-datatype/88815 "2022-10-17T00:36:58Z")

</div>

I have a confusing question so I will try to be as precise as possible in my wording. As far as I understand every value in Julia is of a single concrete type. Types themselves are also values. For example DataType is …

---

## [Surprise with Rational](https://discourse.julialang.org/t/surprise-with-rational/88694)

<div class="topic-metadata">

**Author:** [@thattommyhall](https://discourse.julialang.org/u/thattommyhall)\
**Replies:** 28\
**Last updated:** [October 17, 2022, 12:28am UTC](https://discourse.julialang.org/t/surprise-with-rational/88694 "2022-10-17T00:28:31Z")

</div>

I dont understand why 0 \* 1//0 blows up julia\> 1//0 \* 2 1//0 julia\> 1//0 \* 1 1//0 julia\> 1//0 \* 0 ERROR: DivideError: integer division error Stacktrace: \[1\] div @ ./int.jl:288 \[inlined\] \[2\] divgcd(x::Int64, y::I…

---

## [A family of function and its arguments as argument of other custom function](https://discourse.julialang.org/t/a-family-of-function-and-its-arguments-as-argument-of-other-custom-function/88792)

<div class="topic-metadata">

**Author:** [@maoc](https://discourse.julialang.org/u/maoc)\
**Replies:** 8\
**Last updated:** [October 16, 2022, 10:49pm UTC](https://discourse.julialang.org/t/a-family-of-function-and-its-arguments-as-argument-of-other-custom-function/88792 "2022-10-16T22:49:14Z")

</div>

I am trying to define a function which one of its arguments is a class of other functions, with diverse parameters (for example, distribution functions). So, I don’t know how to pass these parameters because the paramete…

---

## [Artifact-specific packages](https://discourse.julialang.org/t/artifact-specific-packages/88803)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 3\
**Last updated:** [October 16, 2022, 9:02pm UTC](https://discourse.julialang.org/t/artifact-specific-packages/88803 "2022-10-16T21:02:55Z")

</div>

I want to bundle together with my package a “.jld2” file with a DataFrame. This DataFrame is provided as an alternative option: it is not loaded by default, however, I am going to supplement the package with a function,…

---

## [Cannot convert despite convert method being defined](https://discourse.julialang.org/t/cannot-convert-despite-convert-method-being-defined/88813)

<div class="topic-metadata">

**Author:** [@HashBrown](https://discourse.julialang.org/u/HashBrown)\
**Replies:** 1\
**Last updated:** [October 16, 2022, 8:17pm UTC](https://discourse.julialang.org/t/cannot-convert-despite-convert-method-being-defined/88813 "2022-10-16T20:17:27Z")

</div>

I have the following sample code: struct Bar b:: Int64 end convert(::Type{Bar}, x::Int64) = Bar(x) struct Foo b::Bar end I execute it in the REPL. I then write f = Foo(1) I expect it to work because I have…

---

## [Tutorials for Modeling Toolkit look a little messed up](https://discourse.julialang.org/t/tutorials-for-modeling-toolkit-look-a-little-messed-up/88199)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 3\
**Last updated:** [October 16, 2022, 6:33pm UTC](https://discourse.julialang.org/t/tutorials-for-modeling-toolkit-look-a-little-messed-up/88199 "2022-10-16T18:33:28Z")

</div>

https://tutorials.sciml.ai/stable/ode\_extras/01-ModelingToolkit/ This is probably not the place to report this, but I wanted to mark it down before I forget. Looks like some errors and screen dumps are happening in the…

---

## [Plots saved to file loose colour](https://discourse.julialang.org/t/plots-saved-to-file-loose-colour/88612)

<div class="topic-metadata">

**Author:** [@evan-wehi](https://discourse.julialang.org/u/evan-wehi)\
**Replies:** 6\
**Last updated:** [October 16, 2022, 5:51pm UTC](https://discourse.julialang.org/t/plots-saved-to-file-loose-colour/88612 "2022-10-16T17:51:19Z")

</div>

I’m saving Gadfly plots as PNG but the colour is stripped from them, making them useless. The code looks like: using DataFrames, Gadfly, Cairo layers = Plot\[\] for protein in proteins l = plot(f4p, x=protein, color=:do…

---

## [Can't get a transparent backgound in PlotlyJs](https://discourse.julialang.org/t/cant-get-a-transparent-backgound-in-plotlyjs/88757)

<div class="topic-metadata">

**Author:** [@1153dent](https://discourse.julialang.org/u/1153dent)\
**Replies:** 10\
**Last updated:** [October 16, 2022, 5:27pm UTC](https://discourse.julialang.org/t/cant-get-a-transparent-backgound-in-plotlyjs/88757 "2022-10-16T17:27:56Z")

</div>

trying to plot on a transparent background using PlotlyJs not having any luck. Can someone point me in the right direction please? using PlotlyJS make\_plot() = plot(scatter(x=1:10, y=rand(10)), …

---

## [Is there a macro to make Ctrl+C work in REPL?](https://discourse.julialang.org/t/is-there-a-macro-to-make-ctrl-c-work-in-repl/88794)

<div class="topic-metadata">

**Author:** [@HugoTrentesaux](https://discourse.julialang.org/u/HugoTrentesaux)\
**Replies:** 6\
**Last updated:** [October 16, 2022, 4:58pm UTC](https://discourse.julialang.org/t/is-there-a-macro-to-make-ctrl-c-work-in-repl/88794 "2022-10-16T16:58:47Z")

</div>

This topic shows that Julia REPL can not be interrupted : How to interrupt (not kill) julia from the REPL? Is there a decorator to make a loop able to be interrupted from Ctrl+C in the REPL?

---

## [Flux Get Forward Pass Results when Taking Gradient](https://discourse.julialang.org/t/flux-get-forward-pass-results-when-taking-gradient/88805)

<div class="topic-metadata">

**Author:** [@tawheeler](https://discourse.julialang.org/u/tawheeler)\
**Replies:** 3\
**Last updated:** [October 16, 2022, 4:41pm UTC](https://discourse.julialang.org/t/flux-get-forward-pass-results-when-taking-gradient/88805 "2022-10-16T16:41:14Z")

</div>

I was hoping to keep track of loss values while running training with Flux.jl. However, so far I have been unable to both evaluate my loss gradient and evaluate my loss at the same time. I have to run them separately: ℓ…

---

## [Fun One Liners](https://discourse.julialang.org/t/fun-one-liners/28352)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 142\
**Last updated:** [October 16, 2022, 2:16pm UTC](https://discourse.julialang.org/t/fun-one-liners/28352 "2022-10-16T14:16:20Z")

</div>

Would it be fun to have a thread where people share really fancy one liners? I think so - I think it’d be a great way to show off some of Julia to newcomers but also share some cool code. I’ll kick the thread off with 2-…

---

## [Clarification on Setrdcache in Turing?](https://discourse.julialang.org/t/clarification-on-setrdcache-in-turing/88767)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 7\
**Last updated:** [October 16, 2022, 2:20pm UTC](https://discourse.julialang.org/t/clarification-on-setrdcache-in-turing/88767 "2022-10-16T14:20:53Z")

</div>

So, https://turing.ml/dev/docs/using-turing/autodiff says: However, note that the use of caching in certain types of models can lead to incorrect results and/or errors. Models for which the compiled tape can be safely …

---

## [Check Structural Identifiability with some fixed parameters](https://discourse.julialang.org/t/check-structural-identifiability-with-some-fixed-parameters/88782)

<div class="topic-metadata">

**Author:** [@mehdi\_lotfi](https://discourse.julialang.org/u/mehdi_lotfi)\
**Replies:** 3\
**Last updated:** [October 16, 2022, 11:49am UTC](https://discourse.julialang.org/t/check-structural-identifiability-with-some-fixed-parameters/88782 "2022-10-16T11:49:35Z")

</div>

I am using StructuralIdentifiability.jl package to check the Identifiability of ODE by fixing some model parameters. The model includes 7 variable states and 22 parameters of which 12 of those are fixed. (I defined fixed…

---

## [Free last part of a vector](https://discourse.julialang.org/t/free-last-part-of-a-vector/88793)

<div class="topic-metadata">

**Author:** [@tfiers](https://discourse.julialang.org/u/tfiers)\
**Replies:** 1\
**Last updated:** [October 16, 2022, 5:48am UTC](https://discourse.julialang.org/t/free-last-part-of-a-vector/88793 "2022-10-16T05:48:13Z")

</div>

I have allocated a long vector, and filled it to nearly the end. I don’t need the last few, remaining elements. That memory can be freed. Is there a way to ‘chop off’ the last part of the vector – without creating a vi…

---

## [What's behind the scenes of the view (...) function?](https://discourse.julialang.org/t/whats-behind-the-scenes-of-the-view-function/88780)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 4\
**Last updated:** [October 16, 2022, 5:38am UTC](https://discourse.julialang.org/t/whats-behind-the-scenes-of-the-view-function/88780 "2022-10-16T05:38:55Z")

</div>

Since to (almost. Which not?) All the effects the following two assignments are equivalent, why, since view is faster and cheaper, is not \[ \] (ie getindex) defined in the same way? a=\[1,2,3\] b=a\[1:2\] b=view(a, 1:2) If …

---

## [Import same module as two independent identities](https://discourse.julialang.org/t/import-same-module-as-two-independent-identities/88132)

<div class="topic-metadata">

**Author:** [@DerongXu](https://discourse.julialang.org/u/DerongXu)\
**Replies:** 4\
**Last updated:** [October 16, 2022, 2:16am UTC](https://discourse.julialang.org/t/import-same-module-as-two-independent-identities/88132 "2022-10-16T02:16:31Z")

</div>

Suppose I have a module module A x=1 function set(y) global x x=y end end Is there a way to import A twice, so that I have two different variables A.x as following import A as A1 #A1.x=41 A1.set(41) import …

---

## [Not sure how to get this LsqFit working](https://discourse.julialang.org/t/not-sure-how-to-get-this-lsqfit-working/88769)

<div class="topic-metadata">

**Author:** [@Mervyn\_Larrier](https://discourse.julialang.org/u/Mervyn_Larrier)\
**Replies:** 10\
**Last updated:** [October 16, 2022, 12:57am UTC](https://discourse.julialang.org/t/not-sure-how-to-get-this-lsqfit-working/88769 "2022-10-16T00:57:36Z")

</div>

I have some data that I need to fit. All the other functions work, I’m just trying to minimize the cost function model in my code. Assuming you have all the same packages as me (the only errant one may be Underscores.jl)…

---

## [How to define a function with more than one optional arguments in Julia?](https://discourse.julialang.org/t/how-to-define-a-function-with-more-than-one-optional-arguments-in-julia/88784)

<div class="topic-metadata">

**Author:** [@maoc](https://discourse.julialang.org/u/maoc)\
**Replies:** 13\
**Last updated:** [October 15, 2022, 11:41pm UTC](https://discourse.julialang.org/t/how-to-define-a-function-with-more-than-one-optional-arguments-in-julia/88784 "2022-10-15T23:41:30Z")

</div>

I am trying to understand the mechanism to define functions in Julia. For example function xyzpos(x, y, z=0) println("$x, $y, $z") end Note that xyzpos(1,2) \> 1, 2, 0 and xyzpos(1,2,z=3) \> 1, 2, 3 Up to here, …

---

## [Getting a specific item from a Set](https://discourse.julialang.org/t/getting-a-specific-item-from-a-set/88786)

<div class="topic-metadata">

**Author:** [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)\
**Replies:** 7\
**Last updated:** [October 15, 2022, 11:06pm UTC](https://discourse.julialang.org/t/getting-a-specific-item-from-a-set/88786 "2022-10-15T23:06:55Z")

</div>

Hi, I have a set filled with custom objects. How can I get a specific item from the set equal to another object? For example, I have a set of points. Then, I add a new point pp1. If pp1 already exists in the set, I wa…

---

## [Random math function](https://discourse.julialang.org/t/random-math-function/88689)

<div class="topic-metadata">

**Author:** [@qwerty](https://discourse.julialang.org/u/qwerty)\
**Replies:** 5\
**Last updated:** [October 15, 2022, 10:32pm UTC](https://discourse.julialang.org/t/random-math-function/88689 "2022-10-15T22:32:36Z")

</div>

Is there a Pkg that allows generating random mathematical functions from operators and constants or Symbols?

---

## [Is it possible to prefetch memory in Julia?](https://discourse.julialang.org/t/is-it-possible-to-prefetch-memory-in-julia/65566)

<div class="topic-metadata">

**Author:** [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Replies:** 13\
**Last updated:** [October 15, 2022, 9:54pm UTC](https://discourse.julialang.org/t/is-it-possible-to-prefetch-memory-in-julia/65566 "2022-10-15T21:54:14Z")

</div>

The title says it all! The only references I can find online are 5 years old and don’t work on Julia v1

---

## [How can you constraint parameters to be positive in SciML?](https://discourse.julialang.org/t/how-can-you-constraint-parameters-to-be-positive-in-sciml/88777)

<div class="topic-metadata">

**Author:** [@ak47](https://discourse.julialang.org/u/ak47)\
**Replies:** 7\
**Last updated:** [October 15, 2022, 8:53pm UTC](https://discourse.julialang.org/t/how-can-you-constraint-parameters-to-be-positive-in-sciml/88777 "2022-10-15T20:53:21Z")

</div>

How do you constraint parameters results in this setup to be strictly positive? Here is my code: using Flux, DiffEqFlux, DifferentialEquations, Plots function f(du,u,p,t) S,I,R = u du\[1\] = -p\[1\]\*u\[1\]\*u\[2\] du\[2\] = p\[1\]…

---

## [Getting issue in chain\_sde while doing MCMC inference solution for SDEs](https://discourse.julialang.org/t/getting-issue-in-chain-sde-while-doing-mcmc-inference-solution-for-sdes/88613)

<div class="topic-metadata">

**Author:** [@Virendra\_Sheoran](https://discourse.julialang.org/u/Virendra_Sheoran)\
**Replies:** 32\
**Last updated:** [October 15, 2022, 8:20pm UTC](https://discourse.julialang.org/t/getting-issue-in-chain-sde-while-doing-mcmc-inference-solution-for-sdes/88613 "2022-10-15T20:20:40Z")

</div>

using Turing using DifferentialEquations Load StatsPlots for visualizations and diagnostics. using StatsPlots using LinearAlgebra Set a seed for reproducibility. using Random Random.seed!(14); u0 = \[1.0, 1.0\] tspa…

---

## [Does a \`filterfirst\` or \`filtersingle\` function exist? Similar to c# Single()?](https://discourse.julialang.org/t/does-a-filterfirst-or-filtersingle-function-exist-similar-to-c-single/88690)

<div class="topic-metadata">

**Author:** [@Brad\_Carman](https://discourse.julialang.org/u/Brad_Carman)\
**Replies:** 16\
**Last updated:** [October 15, 2022, 8:09pm UTC](https://discourse.julialang.org/t/does-a-filterfirst-or-filtersingle-function-exist-similar-to-c-single/88690 "2022-10-15T20:09:25Z")

</div>

I’m wondering if the following functions already exist in Julia with another name? I’m often trying to grab a single element, so I find myself writing filter(...) -\> first a lot, but this is not safe because if the filt…

---

## [Hash of Dict with custom type as keys](https://discourse.julialang.org/t/hash-of-dict-with-custom-type-as-keys/68400)

<div class="topic-metadata">

**Author:** [@Adrien](https://discourse.julialang.org/u/Adrien)\
**Replies:** 4\
**Last updated:** [September 20, 2021, 2:36am UTC](https://discourse.julialang.org/t/hash-of-dict-with-custom-type-as-keys/68400 "2021-09-20T02:36:09Z")

</div>

I’m having an issue when trying to use hashes of Dict with custom type as keys. Here’s a minimal example that shows my problem: struct My x::Vector{Int} end Base.hash(m::My)=Base.hash(m.x) Base.:(==)(m::My,n::My)=m.x=…

---

## [Gridap.jl field-circuit coupling for magnetostatics](https://discourse.julialang.org/t/gridap-jl-field-circuit-coupling-for-magnetostatics/83069)

<div class="topic-metadata">

**Author:** [@gwlagerweij](https://discourse.julialang.org/u/gwlagerweij)\
**Replies:** 7\
**Last updated:** [October 15, 2022, 3:07pm UTC](https://discourse.julialang.org/t/gridap-jl-field-circuit-coupling-for-magnetostatics/83069 "2022-10-15T15:07:17Z")

</div>

Hi all, I am trying to solve a field-circuit coupled problem using the Gridap.jl package. I want to simulate the current distribution inside a high-voltage cable, as well as the associated magnetic field. This means I…

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

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