# Latest

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

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

**Page:** 1118

---

## [Writing (C) code for Windows: "C on Windows better than Windows does" - bestline, GNU readline replacement](https://discourse.julialang.org/t/writing-c-code-for-windows-c-on-windows-better-than-windows-does-bestline-gnu-readline-replacement/76706)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 0\
**Last updated:** [February 18, 2022, 4:14pm UTC](https://discourse.julialang.org/t/writing-c-code-for-windows-c-on-windows-better-than-windows-does-bestline-gnu-readline-replacement/76706 "2022-02-18T16:14:42Z")

</div>

I thought people might be interested in this “permissively-licensed command prompt w/ a 38kb footprint that’s nearly as good as gnu readline.” But my main interest are some of the claims, not just applying to it: Pl…

---

## [Optim: loading Information from previous runs](https://discourse.julialang.org/t/optim-loading-information-from-previous-runs/76620)

<div class="topic-metadata">

**Author:** [@Shmuley95](https://discourse.julialang.org/u/Shmuley95)\
**Replies:** 13\
**Last updated:** [February 18, 2022, 3:57pm UTC](https://discourse.julialang.org/t/optim-loading-information-from-previous-runs/76620 "2022-02-18T15:57:37Z")

</div>

I am trying to run a large nonlinear optimization problem on a HPC cluster, where I can only get 10 consecutive days of computing before my code is aborted due to the time limit in the cluster. As my problem involves 19 …

---

## [Define iterator](https://discourse.julialang.org/t/define-iterator/76630)

<div class="topic-metadata">

**Author:** [@rukh79](https://discourse.julialang.org/u/rukh79)\
**Replies:** 11\
**Last updated:** [February 18, 2022, 2:10pm UTC](https://discourse.julialang.org/t/define-iterator/76630 "2022-02-18T14:10:10Z")

</div>

Hi all, I am following the manual to learn to define a customized iterator, but couldn’t figure out what I did wrong. If I use for loop, it gave error “MethodError: no method matching length”. If I use while loop, it …

---

## [Limitation in Union types with CUDA.jl?](https://discourse.julialang.org/t/limitation-in-union-types-with-cuda-jl/76494)

<div class="topic-metadata">

**Author:** [@peremato](https://discourse.julialang.org/u/peremato)\
**Replies:** 12\
**Last updated:** [February 18, 2022, 12:40pm UTC](https://discourse.julialang.org/t/limitation-in-union-types-with-cuda-jl/76494 "2022-02-18T12:40:02Z")

</div>

I am trying to pass to a kernel a vector of Union type. It seems to work if I limit the number of types in the Union to 3, but using 4 it fails with unsupported call to an unknown function (call to gpu\_gc\_pool\_alloc). Th…

---

## [How to create static Matrix from a normal Matrix](https://discourse.julialang.org/t/how-to-create-static-matrix-from-a-normal-matrix/76688)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 5\
**Last updated:** [February 18, 2022, 12:31pm UTC](https://discourse.julialang.org/t/how-to-create-static-matrix-from-a-normal-matrix/76688 "2022-02-18T12:31:04Z")

</div>

I find this behaviour very confusing: The following works, but I am certain that there must be better ways to do it: SMatrix{size(tester)...}(tester) How should I construct a static vector?

---

## [Call julia operator function \* from python](https://discourse.julialang.org/t/call-julia-operator-function-from-python/76691)

<div class="topic-metadata">

**Author:** [@kerim](https://discourse.julialang.org/u/kerim)\
**Replies:** 0\
**Last updated:** [February 18, 2022, 12:06pm UTC](https://discourse.julialang.org/t/call-julia-operator-function-from-python/76691 "2022-02-18T12:06:20Z")

</div>

Hi, If in julia I have a function: module MyModule function \*(a, b) a - b end end # module Is there a way to call that function from python using pyjulia?

---

## [Bug in LinearAlgebra pinv()](https://discourse.julialang.org/t/bug-in-linearalgebra-pinv/76663)

<div class="topic-metadata">

**Author:** [@rwyoung7](https://discourse.julialang.org/u/rwyoung7)\
**Replies:** 9\
**Last updated:** [February 18, 2022, 12:06pm UTC](https://discourse.julialang.org/t/bug-in-linearalgebra-pinv/76663 "2022-02-18T12:06:13Z")

</div>

A = \[1.0 0.0;0.0 1.0;0.0 0.0\] A1 = pinv(A): \[1.0 0.0 1.0;0.0 0.0 0.0\] wrong A1\*A \[1.0 0.0;0.0 0.0\] wrong A2 = inv(A’\*A)A’: \[1.0 0.0 0.0;0.0 1.0 0.0\] correct A2A \[1.0 0.0;0.0 1.0\] correct

---

## [Type inference for return types?](https://discourse.julialang.org/t/type-inference-for-return-types/76674)

<div class="topic-metadata">

**Author:** [@rogerkeays](https://discourse.julialang.org/u/rogerkeays)\
**Replies:** 5\
**Last updated:** [February 18, 2022, 11:53am UTC](https://discourse.julialang.org/t/type-inference-for-return-types/76674 "2022-02-18T11:53:23Z")

</div>

The Julia compiler/dispatcher rightfully complains about the following code because of the type annotations: julia\> foo\_typed(f::Number)=f+1 foo\_typed (generic function with 1 method) julia\> @code\_llvm foo\_typed("bar")…

---

## [Recommendations for flexible time series data?](https://discourse.julialang.org/t/recommendations-for-flexible-time-series-data/75776)

<div class="topic-metadata">

**Author:** [@dfarmer](https://discourse.julialang.org/u/dfarmer)\
**Replies:** 3\
**Last updated:** [February 18, 2022, 10:43am UTC](https://discourse.julialang.org/t/recommendations-for-flexible-time-series-data/75776 "2022-02-18T10:43:18Z")

</div>

Much like this person on Stackoverflow I’ve got data that are time series data but where the time indices are not DateTime (they are just processor ticks converted to microseconds). I looked at TimeSeries.jl and TS but t…

---

## [Mysterious error message when terminating a HTTP.jl server](https://discourse.julialang.org/t/mysterious-error-message-when-terminating-a-http-jl-server/76687)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 0\
**Last updated:** [February 18, 2022, 10:13am UTC](https://discourse.julialang.org/t/mysterious-error-message-when-terminating-a-http-jl-server/76687 "2022-02-18T10:13:35Z")

</div>

Julia 1.7.2 HTTP.jl 0.9.17 I’m using HTTP.jl to write a microservice running on GCP Cloud Run. I noticed in the logs that when the process is terminated an error message shows up, apart from the “Terminated” message: s…

---

## [Order Flow Imbalance - A High Frequency Trading Signal in Julia](https://discourse.julialang.org/t/order-flow-imbalance-a-high-frequency-trading-signal-in-julia/76656)

<div class="topic-metadata">

**Author:** [@dm13450](https://discourse.julialang.org/u/dm13450)\
**Replies:** 1\
**Last updated:** [February 18, 2022, 9:16am UTC](https://discourse.julialang.org/t/order-flow-imbalance-a-high-frequency-trading-signal-in-julia/76656 "2022-02-18T09:16:27Z")

</div>

I’ve written a blog post on a high frequency trading signal and how I use Julia to easily calculate it and see if it is profitable.

---

## [How to import a module I created to Pluto?](https://discourse.julialang.org/t/how-to-import-a-module-i-created-to-pluto/76670)

<div class="topic-metadata">

**Author:** [@the\_dude](https://discourse.julialang.org/u/the_dude)\
**Replies:** 3\
**Last updated:** [February 18, 2022, 6:39am UTC](https://discourse.julialang.org/t/how-to-import-a-module-i-created-to-pluto/76670 "2022-02-18T06:39:06Z")

</div>

I have this code: And I’m trying to import it to Pluto.jl like this: But it does not work! Could someone help me, please?

---

## [Dispatch on return types for a higher order function](https://discourse.julialang.org/t/dispatch-on-return-types-for-a-higher-order-function/76608)

<div class="topic-metadata">

**Author:** [@jwkvam](https://discourse.julialang.org/u/jwkvam)\
**Replies:** 2\
**Last updated:** [February 18, 2022, 6:23am UTC](https://discourse.julialang.org/t/dispatch-on-return-types-for-a-higher-order-function/76608 "2022-02-18T06:23:02Z")

</div>

The motivational problem I have is I’m trying to make a data pipeline to calculate features from observations. I’m gonna jump into an example, let’s say I’m working with real estate data. Observations look like this: s…

---

## [Getting ERROR: LoadError: UndefVarError: Environment not defined when I try to use the modules I created](https://discourse.julialang.org/t/getting-error-loaderror-undefvarerror-environment-not-defined-when-i-try-to-use-the-modules-i-created/75559)

<div class="topic-metadata">

**Author:** [@the\_dude](https://discourse.julialang.org/u/the_dude)\
**Replies:** 3\
**Last updated:** [February 18, 2022, 6:17am UTC](https://discourse.julialang.org/t/getting-error-loaderror-undefvarerror-environment-not-defined-when-i-try-to-use-the-modules-i-created/75559 "2022-02-18T06:17:46Z")

</div>

I am creating a module (Cows) that calls another module I created in another file (Environment), but everytime I try to use it get this message: WARNING: replacing module Envs. WARNING: replacing module Cows. \*\*ERROR:\*\*…

---

## [Making my own abstract model](https://discourse.julialang.org/t/making-my-own-abstract-model/76659)

<div class="topic-metadata">

**Author:** [@mirror63](https://discourse.julialang.org/u/mirror63)\
**Replies:** 4\
**Last updated:** [February 18, 2022, 5:17am UTC](https://discourse.julialang.org/t/making-my-own-abstract-model/76659 "2022-02-18T05:17:02Z")

</div>

I want to define my own abstract model. Say I have a probability distribution with p(x) = 7 \*exp(-x/4) + 4\* exp(-x/6) - 7\*exp(-(x-4)^2/64) and I do not know if they are independent or not, therefore, I cannot compute th…

---

## [Subtypes (apparently) not defined within module](https://discourse.julialang.org/t/subtypes-apparently-not-defined-within-module/76669)

<div class="topic-metadata">

**Author:** [@aerdely](https://discourse.julialang.org/u/aerdely)\
**Replies:** 1\
**Last updated:** [February 18, 2022, 3:16am UTC](https://discourse.julialang.org/t/subtypes-apparently-not-defined-within-module/76669 "2022-02-18T03:16:15Z")

</div>

I don’t understand why my function s1type works as expected but the same code coming from MyType module throws a subtypes not defined error. Any thoughts? function s1type(T::DataType) println("type:\\t\\t", T) pri…

---

## [How can I use strings containing whitespace in VegaLite?](https://discourse.julialang.org/t/how-can-i-use-strings-containing-whitespace-in-vegalite/76648)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 2\
**Last updated:** [February 18, 2022, 2:48am UTC](https://discourse.julialang.org/t/how-can-i-use-strings-containing-whitespace-in-vegalite/76648 "2022-02-18T02:48:33Z")

</div>

I want to create a heatmap using VegaLite. That is not hard to do if the name of the column containing the numeric data is well-behaved. This chart looks good: using DataFrames, VegaLite df = DataFrame( "AA" =\> rand(…

---

## [Simple formatting problem](https://discourse.julialang.org/t/simple-formatting-problem/76667)

<div class="topic-metadata">

**Author:** [@Bob\_Bass](https://discourse.julialang.org/u/Bob_Bass)\
**Replies:** 2\
**Last updated:** [February 18, 2022, 2:34am UTC](https://discourse.julialang.org/t/simple-formatting-problem/76667 "2022-02-18T02:34:54Z")

</div>

Hi. I’m working through “Julia Bit-By-Bit” and following is an exercise from chapter 2: You are required to print the values of the integer variables b , h and n . Write a statement which prints b with its rightmost d…

---

## [Help with Jacobian vector product to get natural gradient](https://discourse.julialang.org/t/help-with-jacobian-vector-product-to-get-natural-gradient/51115)

<div class="topic-metadata">

**Author:** [@theogf](https://discourse.julialang.org/u/theogf)\
**Replies:** 16\
**Last updated:** [February 18, 2022, 12:15am UTC](https://discourse.julialang.org/t/help-with-jacobian-vector-product-to-get-natural-gradient/51115 "2022-02-18T00:15:53Z")

</div>

Hi I am trying to reproduce an algorithm based on Natural gradient computations (Natural Gradients in Practice - Salimbeni et al 2018). The key computation is that you can get rid of the inverse Fisher Information matr…

---

## [nVidia A100 vs RTX A6000 (what to choose)](https://discourse.julialang.org/t/nvidia-a100-vs-rtx-a6000-what-to-choose/76660)

<div class="topic-metadata">

**Author:** [@anon28281882](https://discourse.julialang.org/u/anon28281882)\
**Replies:** 0\
**Last updated:** [February 17, 2022, 11:55pm UTC](https://discourse.julialang.org/t/nvidia-a100-vs-rtx-a6000-what-to-choose/76660 "2022-02-17T23:55:11Z")

</div>

Hi, I have to make a choice for a VM (Virtual Machine). One is equipped with nVidia A100, the other with RTX A6000. I’d like to ask for an advice. Most of my planned use is Julia AI training on Linux (RHEL 8 / Ubuntu Fo…

---

## [Project.toml specification for packages used via Requires](https://discourse.julialang.org/t/project-toml-specification-for-packages-used-via-requires/14806)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 5\
**Last updated:** [February 17, 2022, 10:47pm UTC](https://discourse.julialang.org/t/project-toml-specification-for-packages-used-via-requires/14806 "2022-02-17T22:47:50Z")

</div>

Hi all, I have a package that uses Requires to lazy-load other packages depending on the type of dataset the user is using. As per the Requires docs for v1.0, all uses of @require are contained in my packages \_\_init\_\_() …

---

## [Global Sensitivity Analysis for an ODE model where not all parameter sets give a result](https://discourse.julialang.org/t/global-sensitivity-analysis-for-an-ode-model-where-not-all-parameter-sets-give-a-result/76654)

<div class="topic-metadata">

**Author:** [@TS-CUBED](https://discourse.julialang.org/u/TS-CUBED)\
**Replies:** 3\
**Last updated:** [February 17, 2022, 10:28pm UTC](https://discourse.julialang.org/t/global-sensitivity-analysis-for-an-ode-model-where-not-all-parameter-sets-give-a-result/76654 "2022-02-17T22:28:49Z")

</div>

We are trying to do a global sensitivity analysis on a model that is described as ODEs (acausal model with MTK 7). The Sobol analysis works fine if the parameter space is benign, i.e. all the parameter sets allow the OD…

---

## [Export Ampl format from jump model](https://discourse.julialang.org/t/export-ampl-format-from-jump-model/76584)

<div class="topic-metadata">

**Author:** [@thiagonovaesb](https://discourse.julialang.org/u/thiagonovaesb)\
**Replies:** 5\
**Last updated:** [February 17, 2022, 9:50pm UTC](https://discourse.julialang.org/t/export-ampl-format-from-jump-model/76584 "2022-02-17T21:50:05Z")

</div>

Using AmplNLWriter.jl I can export a jump model as .NL format (.nl and .opt). There is a simple way to export the model in AMPL format? (.mod, .dat, .run)?

---

## [Weird environmental issue with ModelingToolkit](https://discourse.julialang.org/t/weird-environmental-issue-with-modelingtoolkit/76531)

<div class="topic-metadata">

**Author:** [@anandpathak31](https://discourse.julialang.org/u/anandpathak31)\
**Replies:** 6\
**Last updated:** [February 17, 2022, 9:49pm UTC](https://discourse.julialang.org/t/weird-environmental-issue-with-modelingtoolkit/76531 "2022-02-17T21:49:03Z")

</div>

I am facing a weird environmental issue in solving an SDESystem using modelingtoolkit in Pluto. It was working fine untill today and it started giving this UndefVarError shown below. It started when I accidentally interr…

---

## [Avoiding Vectors of Abstract Types](https://discourse.julialang.org/t/avoiding-vectors-of-abstract-types/61883)

<div class="topic-metadata">

**Author:** [@RobertGregg](https://discourse.julialang.org/u/RobertGregg)\
**Replies:** 22\
**Last updated:** [February 17, 2022, 9:46pm UTC](https://discourse.julialang.org/t/avoiding-vectors-of-abstract-types/61883 "2022-02-17T21:46:36Z")

</div>

I’ve come across a few instances (see 1, 2, 3) where it would be intuitive to create a vector of structs that all fall under the same abstract type (maybe this comes from an OO style of thinking?). Unfortunately, this le…

---

## [How do I retrigger registrator?](https://discourse.julialang.org/t/how-do-i-retrigger-registrator/76635)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 3\
**Last updated:** [February 17, 2022, 7:26pm UTC](https://discourse.julialang.org/t/how-do-i-retrigger-registrator/76635 "2022-02-17T19:26:19Z")

</div>

I left a compat entry out of a Project.toml and got instructions to simple retrigger Registrator, after I fixed it. How do I do that? I tried putting @JuliaRegistrator register in the comments and that failed with thi…

---

## [Pluto - hide LHS of assignment (\`@latexrun\`)](https://discourse.julialang.org/t/pluto-hide-lhs-of-assignment-latexrun/76638)

<div class="topic-metadata">

**Author:** [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Replies:** 7\
**Last updated:** [February 17, 2022, 6:23pm UTC](https://discourse.julialang.org/t/pluto-hide-lhs-of-assignment-latexrun/76638 "2022-02-17T18:23:20Z")

</div>

I’m using Latexify in Pluto and running @latexrun x = something, which assigns something to x and returns a LaTeXString – which looks great. The problem is, Pluto identifies this as an assignment, and prints an extra @la…

---

## [\[ANN\] Request for review and beta-testing 'Calendars.jl'](https://discourse.julialang.org/t/ann-request-for-review-and-beta-testing-calendars-jl/76641)

<div class="topic-metadata">

**Author:** [@seq](https://discourse.julialang.org/u/seq)\
**Replies:** 0\
**Last updated:** [February 17, 2022, 6:13pm UTC](https://discourse.julialang.org/t/ann-request-for-review-and-beta-testing-calendars-jl/76641 "2022-02-17T18:13:21Z")

</div>

So maybe it should be called a pre-announcement… The package Calendars.jl provides an implementation of the Common (CE), Julian (JD), Hebrew (AM) and Islamic (AH) and ISO 8601 (ID) calendars. The Common calendar is the …

---

## [Comments on "Transducers & Effects – Mike Innes"](https://discourse.julialang.org/t/comments-on-transducers-effects-mike-innes/41353)

<div class="topic-metadata">

**Author:** [@tkf](https://discourse.julialang.org/u/tkf)\
**Replies:** 4\
**Last updated:** [February 17, 2022, 6:03pm UTC](https://discourse.julialang.org/t/comments-on-transducers-effects-mike-innes/41353 "2022-02-17T18:03:52Z")

</div>

In a slack channel, Ari Katz notified me about @MikeInnes’s blog post Transducers & Effects – Mike Innes. It’s nice that there are more attentions to transducers! So, I wanted to write some comments somewhere but I did…

---

## [How to free space in .julia](https://discourse.julialang.org/t/how-to-free-space-in-julia/76621)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 14\
**Last updated:** [February 17, 2022, 5:36pm UTC](https://discourse.julialang.org/t/how-to-free-space-in-julia/76621 "2022-02-17T17:36:58Z")

</div>

I have 28.6 Gb in .julia. What is the best way to free some space?

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

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