# Latest

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

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

**Page:** 1500

---

## [How to make Julia call C/C++ coded function](https://discourse.julialang.org/t/how-to-make-julia-call-c-c-coded-function/54780)

<div class="topic-metadata">

**Author:** [@Valery](https://discourse.julialang.org/u/Valery)\
**Replies:** 6\
**Last updated:** [February 7, 2021, 3:58pm UTC](https://discourse.julialang.org/t/how-to-make-julia-call-c-c-coded-function/54780 "2021-02-07T15:58:22Z")

</div>

Hi all, I am a complete beginner in Julia. My question is: how to make a julia script call C or C++ coded function. If it’s possible, can this enhance the performance in term of speed of execution (if we compare it wit…

---

## [ERROR: LoadError: UndefVarError: int not defined](https://discourse.julialang.org/t/error-loaderror-undefvarerror-int-not-defined/54795)

<div class="topic-metadata">

**Author:** [@Otoliths](https://discourse.julialang.org/u/Otoliths)\
**Replies:** 3\
**Last updated:** [February 7, 2021, 3:48pm UTC](https://discourse.julialang.org/t/error-loaderror-undefvarerror-int-not-defined/54795 "2021-02-07T15:48:13Z")

</div>

Hi all, I’m new to programming with Julia, and I’m really stuck. This is the Julia version running julia\> VERSION v"1.4.1" This call\_DPM.jl only works with the Julia 0.2.1, this issue happens also with 1.4.1 version…

---

## [Enum type vs. enum like parameter name](https://discourse.julialang.org/t/enum-type-vs-enum-like-parameter-name/54790)

<div class="topic-metadata">

**Author:** [@xor](https://discourse.julialang.org/u/xor)\
**Replies:** 5\
**Last updated:** [February 7, 2021, 2:42pm UTC](https://discourse.julialang.org/t/enum-type-vs-enum-like-parameter-name/54790 "2021-02-07T14:42:50Z")

</div>

I have the following behavior (contrived example for demo purposes) @enum Fruit apple orange kiwi f(apple::String, fruit::Array{Fruit}) = fruit\[1\] == apple::Fruit f("not apple", \[apple\]) ERROR: TypeError: in typeassert…

---

## [Method Error: Cannot read CSV](https://discourse.julialang.org/t/method-error-cannot-read-csv/54782)

<div class="topic-metadata">

**Author:** [@billingsham](https://discourse.julialang.org/u/billingsham)\
**Replies:** 4\
**Last updated:** [February 7, 2021, 2:18pm UTC](https://discourse.julialang.org/t/method-error-cannot-read-csv/54782 "2021-02-07T14:18:25Z")

</div>

I am very new to Julia and would appreciate some help with the following. I am trying to read a CSV file into my programme. When I open the CSV Excel, its a 199x7 matrix of numbers. I am using the following code to creat…

---

## [Enums with multiple non Integer values](https://discourse.julialang.org/t/enums-with-multiple-non-integer-values/54415)

<div class="topic-metadata">

**Author:** [@xor](https://discourse.julialang.org/u/xor)\
**Replies:** 6\
**Last updated:** [February 7, 2021, 1:17pm UTC](https://discourse.julialang.org/t/enums-with-multiple-non-integer-values/54415 "2021-02-07T13:17:33Z")

</div>

I am looking to reproduce enumerated value type such as available in Java and Kotlin. The values are singletons and play nicely as keys in dictionaries. A text book (Java) example looks like this: public enum Plane…

---

## [How to stop script execution](https://discourse.julialang.org/t/how-to-stop-script-execution/38568)

<div class="topic-metadata">

**Author:** [@hmemy](https://discourse.julialang.org/u/hmemy)\
**Replies:** 9\
**Last updated:** [February 7, 2021, 11:49am UTC](https://discourse.julialang.org/t/how-to-stop-script-execution/38568 "2021-02-07T11:49:39Z")

</div>

Hi, How can I stop script execution if certain condition is not met? exit() does not work here as it exit julia.

---

## [Very simple MPI implementation question](https://discourse.julialang.org/t/very-simple-mpi-implementation-question/53641)

<div class="topic-metadata">

**Author:** [@abader](https://discourse.julialang.org/u/abader)\
**Replies:** 3\
**Last updated:** [February 7, 2021, 11:20am UTC](https://discourse.julialang.org/t/very-simple-mpi-implementation-question/53641 "2021-02-07T11:20:34Z")

</div>

I’m trying to do some simple MPI calculations but have had some difficulty finding good tutorials online. For this implementation we cannot use threading, because of some interface issues with other codes (most advice I…

---

## [NearestNeighbors.jl - Can I formulate this in a way which makes it allocate less?](https://discourse.julialang.org/t/nearestneighbors-jl-can-i-formulate-this-in-a-way-which-makes-it-allocate-less/54778)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 2\
**Last updated:** [February 7, 2021, 9:54am UTC](https://discourse.julialang.org/t/nearestneighbors-jl-can-i-formulate-this-in-a-way-which-makes-it-allocate-less/54778 "2021-02-07T09:54:48Z")

</div>

Hello! I am using a library called NearestNeighbors to calculate neighbouring points. A simple script below shows the general idea of what I want to do: using NearestNeighbors using StaticArrays function help\_me\_allo…

---

## [Share system of equations solution between g(x) and dg(x)dx functions (i.e. constraint and its jacobian) in IPOPT](https://discourse.julialang.org/t/share-system-of-equations-solution-between-g-x-and-dg-x-dx-functions-i-e-constraint-and-its-jacobian-in-ipopt/51608)

<div class="topic-metadata">

**Author:** [@nico](https://discourse.julialang.org/u/nico)\
**Replies:** 6\
**Last updated:** [February 7, 2021, 8:50am UTC](https://discourse.julialang.org/t/share-system-of-equations-solution-between-g-x-and-dg-x-dx-functions-i-e-constraint-and-its-jacobian-in-ipopt/51608 "2021-02-07T08:50:31Z")

</div>

Hi, I planning to use IPOPT in an optimization project. I would like to know if there is a way to share the solution of a system of equations (like Ax=b) between different functions called by IPOPT, say the constraint …

---

## [If I have a length 6 vector, is there a way I can \`reshape\` that into a 3x3 symmet](https://discourse.julialang.org/t/if-i-have-a-length-6-vector-is-there-a-way-i-can-reshape-that-into-a-3x3-symmet/54769)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 7, 2021, 4:52am UTC](https://discourse.julialang.org/t/if-i-have-a-length-6-vector-is-there-a-way-i-can-reshape-that-into-a-3x3-symmet/54769 "2021-02-07T04:52:08Z")

</div>

If I have a length 6 vector, is there a way I can reshape that into a 3x3 symmetric matrix cleanly/efficiently? Currently I just hardcode the element places. Note that the original poster on Slack cannot see your respon…

---

## [Solving ODE system with PINN](https://discourse.julialang.org/t/solving-ode-system-with-pinn/54750)

<div class="topic-metadata">

**Author:** [@Honza9723](https://discourse.julialang.org/u/Honza9723)\
**Replies:** 7\
**Last updated:** [February 7, 2021, 2:27am UTC](https://discourse.julialang.org/t/solving-ode-system-with-pinn/54750 "2021-02-07T02:27:04Z")

</div>

Dear All, I am trying to solve system of two ordinary differential equations. 𝝫’(x) = (λ-1/v(x))f(x) v’(x) = x^3(λf(x)/(λf(x)x-2𝝫(x)))^2 With boundary conditions 𝝫(x\_low) = 0 𝝫(x\_high) = 0 v(x) and 𝝫(x) are unknow…

---

## [Changing the z-scale in plots3d](https://discourse.julialang.org/t/changing-the-z-scale-in-plots3d/54765)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 5\
**Last updated:** [February 7, 2021, 1:42am UTC](https://discourse.julialang.org/t/changing-the-z-scale-in-plots3d/54765 "2021-02-07T01:42:31Z")

</div>

Dear all, I would like to increase the z-scale of z-axis of my figure: plot(size=(600,500)) X(r,theta) = r \* cos(theta) Y(r,theta) = r \* sin(theta) Z(r,theta) = -r \* r my\_cg = cgrad(\[:blue,:red,:yellow\]); thetas = ra…

---

## [Is there an easy way to add environment variables to the choices of downstream tes](https://discourse.julialang.org/t/is-there-an-easy-way-to-add-environment-variables-to-the-choices-of-downstream-tes/54732)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 7, 2021, 1:13am UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-add-environment-variables-to-the-choices-of-downstream-tes/54732 "2021-02-07T01:13:26Z")

</div>

Is there an easy way to add environment variables to the choices of downstream tests in https://github.com/SciML/SciMLBase.jl/blob/master/.github/workflows/Downstream.yml ? Note that the original poster on Slack cannot …

---

## [\[ANN\] Folds.jl: threaded, distributed, and GPU-based high-level data-parallel interface for Julia](https://discourse.julialang.org/t/ann-folds-jl-threaded-distributed-and-gpu-based-high-level-data-parallel-interface-for-julia/54701)

<div class="topic-metadata">

**Author:** [@tkf](https://discourse.julialang.org/u/tkf)\
**Replies:** 11\
**Last updated:** [February 7, 2021, 12:48am UTC](https://discourse.julialang.org/t/ann-folds-jl-threaded-distributed-and-gpu-based-high-level-data-parallel-interface-for-julia/54701 "2021-02-07T00:48:57Z")

</div>

Folds.jl provides a unified interface for various parallelized and sequential folds (sum, maximum, map, unique, etc.) based on Transducers.jl API. If you know ThreadsX.jl,\[1\] it provides a similar interface but with arbi…

---

## [Sum of n array by recursion in Parallel threads using spawn](https://discourse.julialang.org/t/sum-of-n-array-by-recursion-in-parallel-threads-using-spawn/54751)

<div class="topic-metadata">

**Author:** [@naviinkapoor](https://discourse.julialang.org/u/naviinkapoor)\
**Replies:** 12\
**Last updated:** [February 7, 2021, 12:38am UTC](https://discourse.julialang.org/t/sum-of-n-array-by-recursion-in-parallel-threads-using-spawn/54751 "2021-02-07T00:38:11Z")

</div>

I am creating a function that will be call n number of times in recursion to sum the elements of an array in parallel using spawn to divide the array into two parts. For example Recursion(a, lo, hi) a = (1,5,6,7,8,8,8…

---

## [How to build a package?](https://discourse.julialang.org/t/how-to-build-a-package/54755)

<div class="topic-metadata">

**Author:** [@Nova](https://discourse.julialang.org/u/Nova)\
**Replies:** 6\
**Last updated:** [February 7, 2021, 12:18am UTC](https://discourse.julialang.org/t/how-to-build-a-package/54755 "2021-02-07T00:18:28Z")

</div>

I need to use the following package: https://github.com/kahypar/KaHyPar.jl However, it is not compatible with macOS and it requires building it before the installation. Can you please help me to do that? I already dow…

---

## [Range of Date without a defined step (unit step supposed)](https://discourse.julialang.org/t/range-of-date-without-a-defined-step-unit-step-supposed/54734)

<div class="topic-metadata">

**Author:** [@scelles](https://discourse.julialang.org/u/scelles)\
**Replies:** 4\
**Last updated:** [February 6, 2021, 11:38pm UTC](https://discourse.julialang.org/t/range-of-date-without-a-defined-step-unit-step-supposed/54734 "2021-02-06T23:38:18Z")

</div>

Hello, The following code raises an error julia\> Date(2020,1,1):Date(2020,2,1) ERROR: MethodError: Cannot \`convert\` an object of type Int64 to an object of type Day Closest candidates are: convert(::Type{Day}, ::Week…

---

## [LLVM vector casting? bitcast … vector\<4xi64\> to vector\<8xi32\>](https://discourse.julialang.org/t/llvm-vector-casting-bitcast-vector-4xi64-to-vector-8xi32/54757)

<div class="topic-metadata">

**Author:** [@Rana\_Ian](https://discourse.julialang.org/u/Rana_Ian)\
**Replies:** 2\
**Last updated:** [February 6, 2021, 10:21pm UTC](https://discourse.julialang.org/t/llvm-vector-casting-bitcast-vector-4xi64-to-vector-8xi32/54757 "2021-02-06T22:21:52Z")

</div>

Hi, Has anyone seen something like bitcast … vector\<4xi64\> to vector\<8xi32\> There’s an LLVM thread requesting to add those semantics. So, it doesn’t seem to be available in that form. But I thought I would ask here in…

---

## [Type Inference Problem with \`getproperty\`](https://discourse.julialang.org/t/type-inference-problem-with-getproperty/54585)

<div class="topic-metadata">

**Author:** [@drbassett](https://discourse.julialang.org/u/drbassett)\
**Replies:** 6\
**Last updated:** [February 6, 2021, 10:19pm UTC](https://discourse.julialang.org/t/type-inference-problem-with-getproperty/54585 "2021-02-06T22:19:41Z")

</div>

I apologize in advance for the long post, but I did a good deal of my own analysis first to make sure I was understanding the situation correctly. I wanted to post my findings to save others the trouble of going through …

---

## [How to pass a random array of 2^57 as an input to a function?](https://discourse.julialang.org/t/how-to-pass-a-random-array-of-2-57-as-an-input-to-a-function/54578)

<div class="topic-metadata">

**Author:** [@naviinkapoor](https://discourse.julialang.org/u/naviinkapoor)\
**Replies:** 13\
**Last updated:** [February 6, 2021, 7:49pm UTC](https://discourse.julialang.org/t/how-to-pass-a-random-array-of-2-57-as-an-input-to-a-function/54578 "2021-02-06T19:49:01Z")

</div>

I am creating a function that needs a very large size of the array as an input. Please let me know how can I do that.

---

## [Graph algorithm for Lightgraph](https://discourse.julialang.org/t/graph-algorithm-for-lightgraph/53708)

<div class="topic-metadata">

**Author:** [@AlexanderChen](https://discourse.julialang.org/u/AlexanderChen)\
**Replies:** 15\
**Last updated:** [February 6, 2021, 7:02pm UTC](https://discourse.julialang.org/t/graph-algorithm-for-lightgraph/53708 "2021-02-06T19:02:24Z")

</div>

Hi, below is a graphical representation of 3 SQL Tables with their corresponding columns. And their intertable connections. In red circles are four columns of two different tables that are not directly connected with …

---

## [From C to Julia: Notes from a low-level port](https://discourse.julialang.org/t/from-c-to-julia-notes-from-a-low-level-port/54743)

<div class="topic-metadata">

**Author:** [@adolgert](https://discourse.julialang.org/u/adolgert)\
**Replies:** 7\
**Last updated:** [February 6, 2021, 6:49pm UTC](https://discourse.julialang.org/t/from-c-to-julia-notes-from-a-low-level-port/54743 "2021-02-06T18:49:07Z")

</div>

I ported bit-shifting math from C to Julia and thought I would share notes on gotchas. Simple changes in operators Division - The solidus character, /, becomes div in Julia, ÷. The / in Julia is floating-point division…

---

## [Just Added: Post your Julia Community Events here on Discourse](https://discourse.julialang.org/t/just-added-post-your-julia-community-events-here-on-discourse/54747)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [February 6, 2021, 6:08pm UTC](https://discourse.julialang.org/t/just-added-post-your-julia-community-events-here-on-discourse/54747 "2021-02-06T18:08:41Z")

</div>

Hey all, you should now be able to post about and host an event here on Discourse! Create a new post, click the gear icon (Setting icon), and then click “Create Event”. All users with the “Member” trust level should be a…

---

## [Pluto get the size of output pane/field/cell](https://discourse.julialang.org/t/pluto-get-the-size-of-output-pane-field-cell/54741)

<div class="topic-metadata">

**Author:** [@DrChainsaw](https://discourse.julialang.org/u/DrChainsaw)\
**Replies:** 0\
**Last updated:** [February 6, 2021, 4:32pm UTC](https://discourse.julialang.org/t/pluto-get-the-size-of-output-pane-field-cell/54741 "2021-02-06T16:32:52Z")

</div>

Is there some way to programatically get the size of the output panes/field/cell (sorry, dont know the right term, hopefully it is clear from the context below) in Pluto, for example inside a show method? Use case is th…

---

## [Is this plotting time normal?](https://discourse.julialang.org/t/is-this-plotting-time-normal/54736)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 6, 2021, 4:16pm UTC](https://discourse.julialang.org/t/is-this-plotting-time-normal/54736 "2021-02-06T16:16:45Z")

</div>

Been using Julia for \< 1 day, so pardon any dumb questions… I installed the Plots package (using Pkg; pkg.Add("Plots")). (1) Then the first time I did using Plots, I saw "\[ Info: Precompiling Plots \[91a5bcdd-55d7-5caf-…

---

## [ANN: Bayesian Linear Regression](https://discourse.julialang.org/t/ann-bayesian-linear-regression/42695)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 2\
**Last updated:** [February 6, 2021, 1:57pm UTC](https://discourse.julialang.org/t/ann-bayesian-linear-regression/42695 "2021-02-06T13:57:00Z")

</div>

I’m happy to announce the release of BayesianLinearRegression.jl. Initial work on this package began in 2015, but there was some significant bitrot. Thanks to RelationalAI for supporting this development! I’ve started r…

---

## [Juno's return-from-goto function](https://discourse.julialang.org/t/junos-return-from-goto-function/54645)

<div class="topic-metadata">

**Author:** [@marty0801](https://discourse.julialang.org/u/marty0801)\
**Replies:** 1\
**Last updated:** [February 6, 2021, 11:31am UTC](https://discourse.julialang.org/t/junos-return-from-goto-function/54645 "2021-02-06T11:31:18Z")

</div>

A continuation of this question, I rely on the go-to-definition function in Juno (Ctrl-j Ctrl-g), but it’s not functioning optimally for me. (User error I’m sure.) Because I’m forgetful, I often need to alternate quickl…

---

## [Sparse vectors and BigFloat Heisenbug](https://discourse.julialang.org/t/sparse-vectors-and-bigfloat-heisenbug/54707)

<div class="topic-metadata">

**Author:** [@mbesancon](https://discourse.julialang.org/u/mbesancon)\
**Replies:** 4\
**Last updated:** [February 6, 2021, 10:14am UTC](https://discourse.julialang.org/t/sparse-vectors-and-bigfloat-heisenbug/54707 "2021-02-06T10:14:28Z")

</div>

I have in some weird side effect with structs of sparse vectors of BigFloats, where operating on a copy of the sum seems to change the struct itself. In spirit, the structure of the code looks like below. After a copyin…

---

## [Binary heap type problems](https://discourse.julialang.org/t/binary-heap-type-problems/54722)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 1\
**Last updated:** [February 6, 2021, 8:54am UTC](https://discourse.julialang.org/t/binary-heap-type-problems/54722 "2021-02-06T08:54:26Z")

</div>

(A bit of a long post because error messages) i’m trying to generate a binary heap (from DataStructures) where the data item is a pair consisting of an integer and a function. The following works julia\> function f1() …

---

## [Student and Full-time jobs working on scientific modeling in Julia](https://discourse.julialang.org/t/student-and-full-time-jobs-working-on-scientific-modeling-in-julia/16965)

<div class="topic-metadata">

**Author:** [@jpfairbanks](https://discourse.julialang.org/u/jpfairbanks)\
**Replies:** 6\
**Last updated:** [February 6, 2021, 9:16am UTC](https://discourse.julialang.org/t/student-and-full-time-jobs-working-on-scientific-modeling-in-julia/16965 "2021-02-06T09:16:53Z")

</div>

GTRI is hiring Julia researchers At the Georgia Tech Research Institute in Atlanta, GA, USA, I am leading a research project for using Julia to extract scientific knowledge from open source code bases which implement sci…

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

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