# Latest

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

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

**Page:** 936

---

## [Can MTK validate dimensions when using "connect" function?](https://discourse.julialang.org/t/can-mtk-validate-dimensions-when-using-connect-function/86699)

<div class="topic-metadata">

**Author:** [@TS-CUBED](https://discourse.julialang.org/u/TS-CUBED)\
**Replies:** 2\
**Last updated:** [September 2, 2022, 10:49pm UTC](https://discourse.julialang.org/t/can-mtk-validate-dimensions-when-using-connect-function/86699 "2022-09-02T22:49:02Z")

</div>

I’m trying to set up a circulation model with units. Or at least allow consistency checks. So I was playing around with Model Validation and Units · ModelingToolkit.jl and set up the following: using ModelingToolkit, Un…

---

## [Packages and workers](https://discourse.julialang.org/t/packages-and-workers/14072)

<div class="topic-metadata">

**Author:** [@teored90](https://discourse.julialang.org/u/teored90)\
**Replies:** 15\
**Last updated:** [September 2, 2022, 10:07pm UTC](https://discourse.julialang.org/t/packages-and-workers/14072 "2022-09-02T22:07:25Z")

</div>

I don’t understand how to import a package that I generated on multiple workers on Julia v1.0. Steps to reproduce: Follow the documentation to create the HelloWorld package. Start Julia with -p 2. Activate the environ…

---

## [Comments please on a series of talks](https://discourse.julialang.org/t/comments-please-on-a-series-of-talks/84400)

<div class="topic-metadata">

**Author:** [@Henri\_Laurie](https://discourse.julialang.org/u/Henri_Laurie)\
**Replies:** 5\
**Last updated:** [September 2, 2022, 9:17pm UTC](https://discourse.julialang.org/t/comments-please-on-a-series-of-talks/84400 "2022-09-02T21:17:30Z")

</div>

Hi all – I would love to hear comments on a set of talks I am presenting to NITheCS. Here’s brief description of the audience: they are an online community of South African scientists (see https://nithecs.ac.za/). So I …

---

## [How to avoid allocations when reading arbitrary keys from a NamedTuple?](https://discourse.julialang.org/t/how-to-avoid-allocations-when-reading-arbitrary-keys-from-a-namedtuple/71806)

<div class="topic-metadata">

**Author:** [@mattwigway](https://discourse.julialang.org/u/mattwigway)\
**Replies:** 8\
**Last updated:** [September 2, 2022, 9:00pm UTC](https://discourse.julialang.org/t/how-to-avoid-allocations-when-reading-arbitrary-keys-from-a-namedtuple/71806 "2022-09-02T21:00:01Z")

</div>

I have a situation where I’m processing rowwise data from a JuliaDB table in a reducer. I’m having trouble with type stability, because my function looks like: function (row, col) value = row\[col\] ...do things wit…

---

## [Setting up Flux with IJulia - possibly env problems](https://discourse.julialang.org/t/setting-up-flux-with-ijulia-possibly-env-problems/86706)

<div class="topic-metadata">

**Author:** [@davide445](https://discourse.julialang.org/u/davide445)\
**Replies:** 0\
**Last updated:** [September 2, 2022, 8:53pm UTC](https://discourse.julialang.org/t/setting-up-flux-with-ijulia-possibly-env-problems/86706 "2022-09-02T20:53:28Z")

</div>

Trying to setup Flux and IJulia and I got some strange errors like ERROR: LoadError: Failed to precompile Zygote I think might come from some env troubles. So far following a few courses I never paid attention to envi…

---

## [Any small example of a queue like system, where a function is automatically executed when a new item pops in the queue?](https://discourse.julialang.org/t/any-small-example-of-a-queue-like-system-where-a-function-is-automatically-executed-when-a-new-item-pops-in-the-queue/86616)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 12\
**Last updated:** [September 2, 2022, 8:31pm UTC](https://discourse.julialang.org/t/any-small-example-of-a-queue-like-system-where-a-function-is-automatically-executed-when-a-new-item-pops-in-the-queue/86616 "2022-09-02T20:31:38Z")

</div>

Hello! I have some Julia code which detects when new files are made in a folder. The name of these files are then passed to a vector. Whenever a new item enters the vector, I wish to have a function detect this and run …

---

## [How do I insert a specific string into a BioSequences DNA string?](https://discourse.julialang.org/t/how-do-i-insert-a-specific-string-into-a-biosequences-dna-string/86694)

<div class="topic-metadata">

**Author:** [@zhangchunyong](https://discourse.julialang.org/u/zhangchunyong)\
**Replies:** 1\
**Last updated:** [September 2, 2022, 4:40pm UTC](https://discourse.julialang.org/t/how-do-i-insert-a-specific-string-into-a-biosequences-dna-string/86694 "2022-09-02T16:40:51Z")

</div>

using BioSequences julia\> a=dna"ATCG" 4nt DNA Sequence: ATCG julia\> insert!(a,2,'C') 5nt DNA Sequence: ACTCG But if I inserted more than one chars,it will fail. julia\> insert!(a,2,"CG") ERROR: MethodError: Cannot \`conv…

---

## [Error calling \`similar(Array{ComplexF32}, Float32)\`](https://discourse.julialang.org/t/error-calling-similar-array-complexf32-float32/86248)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 11\
**Last updated:** [August 30, 2022, 10:18am UTC](https://discourse.julialang.org/t/error-calling-similar-array-complexf32-float32/86248 "2022-08-30T10:18:12Z")

</div>

writing code that is agnostic about the array type but can still change the element\_type, one wants to keep the array type but change the element-type for example to real(eltype(ArrayType)) for efficiency reasons. The f…

---

## [Change SCS solver options](https://discourse.julialang.org/t/change-scs-solver-options/86676)

<div class="topic-metadata">

**Author:** [@mosby](https://discourse.julialang.org/u/mosby)\
**Replies:** 2\
**Last updated:** [September 2, 2022, 2:56pm UTC](https://discourse.julialang.org/t/change-scs-solver-options/86676 "2022-09-02T14:56:34Z")

</div>

Hi, I am new to Julia, while I am trying to use SCS.Optimizer to get the solution of projection problem, I see SCS has default eps = 1e-4, what if I want to be more accurate, like 1e-6, how could I change it? I found s…

---

## [How to make custom REPL completion?](https://discourse.julialang.org/t/how-to-make-custom-repl-completion/86673)

<div class="topic-metadata">

**Author:** [@GHTaarn](https://discourse.julialang.org/u/GHTaarn)\
**Replies:** 5\
**Last updated:** [September 2, 2022, 2:51pm UTC](https://discourse.julialang.org/t/how-to-make-custom-repl-completion/86673 "2022-09-02T14:51:22Z")

</div>

I would like to create a REPL with customised completion behaviour. Is there a tutorial, API documentations or similar about this somewhere?

---

## [Help to set a penalty](https://discourse.julialang.org/t/help-to-set-a-penalty/86642)

<div class="topic-metadata">

**Author:** [@Zizilabg](https://discourse.julialang.org/u/Zizilabg)\
**Replies:** 8\
**Last updated:** [September 2, 2022, 2:34pm UTC](https://discourse.julialang.org/t/help-to-set-a-penalty/86642 "2022-09-02T14:34:09Z")

</div>

Hello, I’m stuck with my code. I want to assign a student i to a course j. Each student has chosen their 4 favorite choices. I have 158 i and 34 j. Based on the students’ preferences, I would like to impose a penalty…

---

## [Is there any package / method / function to determine and Solve Limits Problem in Julia?](https://discourse.julialang.org/t/is-there-any-package-method-function-to-determine-and-solve-limits-problem-in-julia/86678)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 8\
**Last updated:** [September 2, 2022, 2:26pm UTC](https://discourse.julialang.org/t/is-there-any-package-method-function-to-determine-and-solve-limits-problem-in-julia/86678 "2022-09-02T14:26:20Z")

</div>

Hi all, I was thinking plotting the graph is a nice solution to know a limit of a function, I have this problem from Calculus book: \\lim\_{\\theta \\rightarrow 0} \\frac{\\sin^{2} \\theta}{\\theta^{2}} (I think by hand we ca…

---

## [How to convert a csv column into a vector](https://discourse.julialang.org/t/how-to-convert-a-csv-column-into-a-vector/86651)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 4\
**Last updated:** [September 2, 2022, 1:24pm UTC](https://discourse.julialang.org/t/how-to-convert-a-csv-column-into-a-vector/86651 "2022-09-02T13:24:33Z")

</div>

How to convert the first column of “test.csv” file into a vector (array)? test.csv is: a;b;c 1;2;3 4;5;6 9;8;7 using CSV test = CSV.File("test.csv"; select=\[1\]) I want test to be a vector.

---

## [Survival analysis in Turing: vectorized version leads to strange errors](https://discourse.julialang.org/t/survival-analysis-in-turing-vectorized-version-leads-to-strange-errors/86301)

<div class="topic-metadata">

**Author:** [@vfonov](https://discourse.julialang.org/u/vfonov)\
**Replies:** 5\
**Last updated:** [September 2, 2022, 1:03pm UTC](https://discourse.julialang.org/t/survival-analysis-in-turing-vectorized-version-leads-to-strange-errors/86301 "2022-09-02T13:03:31Z")

</div>

I have an example for a simple survival analysis in Turing that works fine when using loop but produces strange errors when I attempt to convert it to vectorized form: # Import Turing and Distributions. using Turing, Di…

---

## [Looping in Julia](https://discourse.julialang.org/t/looping-in-julia/86674)

<div class="topic-metadata">

**Author:** [@Eric.O](https://discourse.julialang.org/u/Eric.O)\
**Replies:** 6\
**Last updated:** [September 2, 2022, 11:54am UTC](https://discourse.julialang.org/t/looping-in-julia/86674 "2022-09-02T11:54:25Z")

</div>

I have written the code displayed below to calculate the maximum distance which is working perfectly. I want to modify the code for another task but facing some challenges. I will be grateful for any help and guidance pl…

---

## [FLoops causing deep copy error with log message in loop](https://discourse.julialang.org/t/floops-causing-deep-copy-error-with-log-message-in-loop/86683)

<div class="topic-metadata">

**Author:** [@this\_josh](https://discourse.julialang.org/u/this_josh)\
**Replies:** 0\
**Last updated:** [September 2, 2022, 10:52am UTC](https://discourse.julialang.org/t/floops-causing-deep-copy-error-with-log-message-in-loop/86683 "2022-09-02T10:52:46Z")

</div>

Having a log message inside an @floop gives a deep copy error. Is this expected behaviour? julia\> using FLoops julia\> @floop for \_ in 1:24 @info Threads.threadid() sleep(1) end ERROR: LoadEr…

---

## [ArrayInterfaceStaticArraysCore vs ArrayInterfaceStaticArrays](https://discourse.julialang.org/t/arrayinterfacestaticarrayscore-vs-arrayinterfacestaticarrays/86595)

<div class="topic-metadata">

**Author:** [@DanDoe](https://discourse.julialang.org/u/DanDoe)\
**Replies:** 2\
**Last updated:** [September 2, 2022, 10:09am UTC](https://discourse.julialang.org/t/arrayinterfacestaticarrayscore-vs-arrayinterfacestaticarrays/86595 "2022-09-02T10:09:22Z")

</div>

I get a bunch of warnings that ArrayInterfaceStaticArrays overwrites methods from ArrayInterfaceStaticArraysCore, e.g., WARNING: Method definition adapt\_storage(Type{var"#s4"} where var"#s4"\<:(StaticArraysCore.SArray{S…

---

## [DimensionMismatch for a Raster](https://discourse.julialang.org/t/dimensionmismatch-for-a-raster/86677)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 1\
**Last updated:** [September 2, 2022, 9:33am UTC](https://discourse.julialang.org/t/dimensionmismatch-for-a-raster/86677 "2022-09-02T09:33:45Z")

</div>

A Raster behaves just like an Array in suitable contexts, but I found the following difference in broadcast behavior. Is it 1) an intended behavior, 2) an unavoidable inconsistency, or 3) a bug? Basically, avr = sum(v…

---

## [ERROR: Unsatisfiable requirements detected and has no known versions!](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-and-has-no-known-versions/73289)

<div class="topic-metadata">

**Author:** [@vyush\_agarwal](https://discourse.julialang.org/u/vyush_agarwal)\
**Replies:** 6\
**Last updated:** [September 2, 2022, 9:04am UTC](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-and-has-no-known-versions/73289 "2022-09-02T09:04:50Z")

</div>

I am getting the same error in my case Xnumber is a dependency of SHbundle and both of them are unregistered. ERROR: Unsatisfiable requirements detected for package Xnumber \[fdc6275c\]: Xnumber \[fdc6275c\] log: ├─Xnumbe…

---

## [Two index-summation loop](https://discourse.julialang.org/t/two-index-summation-loop/86664)

<div class="topic-metadata">

**Author:** [@Longblackcoffee](https://discourse.julialang.org/u/Longblackcoffee)\
**Replies:** 2\
**Last updated:** [September 2, 2022, 8:40am UTC](https://discourse.julialang.org/t/two-index-summation-loop/86664 "2022-09-02T08:40:21Z")

</div>

Hi everyone. I am trying to program the following summation into Julia: y\_i = c\_i + \\sum\_{r=1}^{i-1} b\_r\*y\_{i-r} So for example, in the following toy numerical example: using DataFrames test = DataFrame(months = 0:3…

---

## [Range step cannot be zero](https://discourse.julialang.org/t/range-step-cannot-be-zero/66948)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 10\
**Last updated:** [September 2, 2022, 8:18am UTC](https://discourse.julialang.org/t/range-step-cannot-be-zero/66948 "2022-09-02T08:18:37Z")

</div>

I don’t know how to make a minimal reproducer of this but I can’t make it work either. Here’s the error I can share. Any ideas would be helpful. I’m trying to make a Band plot but all the high values are equal and all th…

---

## [TLS Support Questions](https://discourse.julialang.org/t/tls-support-questions/84004)

<div class="topic-metadata">

**Author:** [@quinnj](https://discourse.julialang.org/u/quinnj)\
**Replies:** 5\
**Last updated:** [September 2, 2022, 6:24am UTC](https://discourse.julialang.org/t/tls-support-questions/84004 "2022-09-02T06:24:20Z")

</div>

Currently HTTP.jl hard-codes a dependency on MbedTLS.jl for TLS support; it has served us decently over the years, but there have always been a lingering set of errors that crop up that are very difficult to debug; eithe…

---

## [Dataframe that includes the first trading day of each financial quarter only](https://discourse.julialang.org/t/dataframe-that-includes-the-first-trading-day-of-each-financial-quarter-only/86654)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 2\
**Last updated:** [September 2, 2022, 6:06am UTC](https://discourse.julialang.org/t/dataframe-that-includes-the-first-trading-day-of-each-financial-quarter-only/86654 "2022-09-02T06:06:42Z")

</div>

I have a dataframe that contains stock symbols, stock prices, dates, and also financial quarters (obtained from the date column using the package PeriodicalDates). I have sorted the dataframe by symbol and date, and her…

---

## [Delete missing values after the last non missing value in each id](https://discourse.julialang.org/t/delete-missing-values-after-the-last-non-missing-value-in-each-id/76291)

<div class="topic-metadata">

**Author:** [@sai\_matcha](https://discourse.julialang.org/u/sai_matcha)\
**Replies:** 7\
**Last updated:** [September 1, 2022, 9:51pm UTC](https://discourse.julialang.org/t/delete-missing-values-after-the-last-non-missing-value-in-each-id/76291 "2022-09-01T21:51:44Z")

</div>

Hi , i have a dataframe which concatins missing values . i want to filter missing values after the last non missing value in the each id data frame i have is df1 = DataFrame(id = \[1,1,1,1,1,1\] ,b = \[1,2,missing,3,miss…

---

## [ubuntu deployment of up to date version](https://discourse.julialang.org/t/ubuntu-deployment-of-up-to-date-version/86496)

<div class="topic-metadata">

**Author:** [@eoli3n](https://discourse.julialang.org/u/eoli3n)\
**Replies:** 6\
**Last updated:** [September 1, 2022, 9:40pm UTC](https://discourse.julialang.org/t/ubuntu-deployment-of-up-to-date-version/86496 "2022-09-01T21:40:11Z")

</div>

I need to automate deployment of julia for 800 hosts for a University. On latest Ubuntu LTS, when I apt install julia it tells me to snap install julia. On snapcraft, julia package seems to be official but it is in a 2…

---

## [How to create an IOBuffer backed by a String](https://discourse.julialang.org/t/how-to-create-an-iobuffer-backed-by-a-string/86657)

<div class="topic-metadata">

**Author:** [@Ben\_Little](https://discourse.julialang.org/u/Ben_Little)\
**Replies:** 2\
**Last updated:** [September 1, 2022, 8:10pm UTC](https://discourse.julialang.org/t/how-to-create-an-iobuffer-backed-by-a-string/86657 "2022-09-01T20:10:12Z")

</div>

Probably unnecessary backstory: I need to read a bunch of files from a zip archive and then pass them to a Threads.@threads for loop. Unfortunately this doesn’t work. My guess is that the datatype created by ZipFile is n…

---

## [Priority queue choice](https://discourse.julialang.org/t/priority-queue-choice/42783)

<div class="topic-metadata">

**Author:** [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Replies:** 24\
**Last updated:** [September 1, 2022, 6:49pm UTC](https://discourse.julialang.org/t/priority-queue-choice/42783 "2022-09-01T18:49:44Z")

</div>

I need a performant implementation of a PriorityQueue{Int,Float64}. For Int you can think pixels and for Float64 think random times. Is this PriorityQueue from DataStructures.jl the right thing or are there maybe other …

---

## [Struct default value in constructor](https://discourse.julialang.org/t/struct-default-value-in-constructor/86648)

<div class="topic-metadata">

**Author:** [@Renan\_Rabelo](https://discourse.julialang.org/u/Renan_Rabelo)\
**Replies:** 6\
**Last updated:** [September 1, 2022, 7:08pm UTC](https://discourse.julialang.org/t/struct-default-value-in-constructor/86648 "2022-09-01T19:08:49Z")

</div>

I need the following struct: struct Foo bar baz qux = bar + baz The problem is that in constructor I need to set the value of “qux”, and I want the value only depend on “bar” and “baz”. How can instantiate…

---

## [\`read!\` and scalar variables](https://discourse.julialang.org/t/read-and-scalar-variables/86619)

<div class="topic-metadata">

**Author:** [@ChauhanT](https://discourse.julialang.org/u/ChauhanT)\
**Replies:** 4\
**Last updated:** [September 1, 2022, 7:03pm UTC](https://discourse.julialang.org/t/read-and-scalar-variables/86619 "2022-09-01T19:03:22Z")

</div>

Hi, Is there a specific reason why read! does not accept scalars ? The signature allows for the AbstractArray type, but not scalars. So essentially, this works: ios = open("./proprietary.format") ver = Array{UInt32}(u…

---

## [Fast(er) priority queues?](https://discourse.julialang.org/t/fast-er-priority-queues/81269)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 20\
**Last updated:** [September 1, 2022, 6:47pm UTC](https://discourse.julialang.org/t/fast-er-priority-queues/81269 "2022-09-01T18:47:11Z")

</div>

Hi there! Recently I wanted to accelerate Dijkstra’s algorithm, and I ended up implementing a really dumb priority queue based on two sorted vectors. Surprisingly, in some settings, it significantly speeds up the algori…

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

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