# Latest

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

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

**Page:** 1307

---

## [Named Capture Group to create new columns](https://discourse.julialang.org/t/named-capture-group-to-create-new-columns/65997)

<div class="topic-metadata">

**Author:** [@magrathean](https://discourse.julialang.org/u/magrathean)\
**Replies:** 4\
**Last updated:** [August 8, 2021, 2:50am UTC](https://discourse.julialang.org/t/named-capture-group-to-create-new-columns/65997 "2021-08-08T02:50:52Z")

</div>

How do I create new columns from matches from a named capture group? df = DataFrame(time = \["twelve:nine", "one:five"\]) rx = r"(?\<hour\>\[a-z\]\*):(?\<minute\>\[a-z\]\*)" 2×1 DataFrame Row │ time │ String ─…

---

## [StatsModels R-like formula for a general quadratic model](https://discourse.julialang.org/t/statsmodels-r-like-formula-for-a-general-quadratic-model/64441)

<div class="topic-metadata">

**Author:** [@joergbuchwald](https://discourse.julialang.org/u/joergbuchwald)\
**Replies:** 7\
**Last updated:** [August 7, 2021, 10:46pm UTC](https://discourse.julialang.org/t/statsmodels-r-like-formula-for-a-general-quadratic-model/64441 "2021-08-07T22:46:22Z")

</div>

Hi! I want to construct a regression formula for a general quadratic model without writing out each interaction term separately. I remember that for the python Statsmodels package I could do something like: y~np.power(…

---

## [Unable to construct \`Union\` of \`Vararg\`](https://discourse.julialang.org/t/unable-to-construct-union-of-vararg/65995)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 6\
**Last updated:** [August 7, 2021, 8:34pm UTC](https://discourse.julialang.org/t/unable-to-construct-union-of-vararg/65995 "2021-08-07T20:34:52Z")

</div>

When I tried to construct Union of Vararg like julia\> Union{Vararg{Any, 1}, Vararg{Any, 2}} I got ERROR: TypeError: in Union, expected Type, got Vararg{Any, 1} but clearly julia\> Vararg{Any, 1} isa Type true julia\> …

---

## [Latest Julia binaries: A static URL](https://discourse.julialang.org/t/latest-julia-binaries-a-static-url/65932)

<div class="topic-metadata">

**Author:** [@fedario](https://discourse.julialang.org/u/fedario)\
**Replies:** 15\
**Last updated:** [August 7, 2021, 6:26pm UTC](https://discourse.julialang.org/t/latest-julia-binaries-a-static-url/65932 "2021-08-07T18:26:21Z")

</div>

Hi all, I prefer to setup my Linux system as automatically as possible using a setup script. Currently, I’m downloading the latest Julia binary manually since with each version the URL changes. For example: https://j…

---

## [OMJulia simulate command returns error](https://discourse.julialang.org/t/omjulia-simulate-command-returns-error/65612)

<div class="topic-metadata">

**Author:** [@cubakija](https://discourse.julialang.org/u/cubakija)\
**Replies:** 18\
**Last updated:** [August 7, 2021, 6:10pm UTC](https://discourse.julialang.org/t/omjulia-simulate-command-returns-error/65612 "2021-08-07T18:10:38Z")

</div>

Hi everyone, Someone can help me to fix below error, when trying to simulate model: ERROR: failed process: Process(C:/Users/USUARIO/AppData/Local/Temp/jl\_gGQfHg/RLC.exe, ProcessExited(3221225785)) \[3221225785\] Stacktr…

---

## [Julia performance for pointer based data structures?](https://discourse.julialang.org/t/julia-performance-for-pointer-based-data-structures/65992)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 2\
**Last updated:** [August 7, 2021, 4:53pm UTC](https://discourse.julialang.org/t/julia-performance-for-pointer-based-data-structures/65992 "2021-08-07T16:53:11Z")

</div>

Ignoring GC costs, does the lack of raw pointers cause possible performance issues (compared to C) if you want to implement pointer-based data structures like linked lists and trees? Julia exposes some pointers for C int…

---

## [BoundsError when trying to index certain dimensions of an array with a vector containing indices](https://discourse.julialang.org/t/boundserror-when-trying-to-index-certain-dimensions-of-an-array-with-a-vector-containing-indices/65983)

<div class="topic-metadata">

**Author:** [@Valery](https://discourse.julialang.org/u/Valery)\
**Replies:** 3\
**Last updated:** [August 7, 2021, 4:32pm UTC](https://discourse.julialang.org/t/boundserror-when-trying-to-index-certain-dimensions-of-an-array-with-a-vector-containing-indices/65983 "2021-08-07T16:32:52Z")

</div>

A = rand(3,3) b = findall(vec(A).\>0.5) # contains indices c = rand(2,length(b)) # some values that we want to have at the corresponding indexes stored in b, in array B. B = rand(2,3,3) B\[:,b\] = c # this line returns an e…

---

## [Where can I find some high performance Julia code?](https://discourse.julialang.org/t/where-can-i-find-some-high-performance-julia-code/65794)

<div class="topic-metadata">

**Author:** [@CRquantum](https://discourse.julialang.org/u/CRquantum)\
**Replies:** 12\
**Last updated:** [August 7, 2021, 3:59pm UTC](https://discourse.julialang.org/t/where-can-i-find-some-high-performance-julia-code/65794 "2021-08-07T15:59:12Z")

</div>

Sorry for this stupid and general question. I am a Fortran guy and new to Julia. I am translating my Fortran code to Julia, and to make a direct comparison between the speed of modern Fortran and Julia. But I want to m…

---

## [Question about broadcasting](https://discourse.julialang.org/t/question-about-broadcasting/65989)

<div class="topic-metadata">

**Author:** [@RJDennis](https://discourse.julialang.org/u/RJDennis)\
**Replies:** 2\
**Last updated:** [August 7, 2021, 2:47pm UTC](https://discourse.julialang.org/t/question-about-broadcasting/65989 "2021-08-07T14:47:26Z")

</div>

Suppose I run the following w = fill(zeros(3,3),3) w\[1\] .= rand(3,3) I expected the result would have the first matrix in w given random numbers with the remaining two matrices remaining zeros, but this is not the case…

---

## [Why does rand() report no allocations, but zeros() does when measured with --track-allocation=user?](https://discourse.julialang.org/t/why-does-rand-report-no-allocations-but-zeros-does-when-measured-with-track-allocation-user/65974)

<div class="topic-metadata">

**Author:** [@mdtisdall](https://discourse.julialang.org/u/mdtisdall)\
**Replies:** 3\
**Last updated:** [August 7, 2021, 2:43pm UTC](https://discourse.julialang.org/t/why-does-rand-report-no-allocations-but-zeros-does-when-measured-with-track-allocation-user/65974 "2021-08-07T14:43:01Z")

</div>

Very basic question: I’m trying to understand why the instantiation of A in the following small example doesn’t appear to produce any allocations in the profiling output: - function testfunc() 0 A = …

---

## [\[Symbolics.jl\] How to select between simplifier backends?](https://discourse.julialang.org/t/symbolics-jl-how-to-select-between-simplifier-backends/65973)

<div class="topic-metadata">

**Author:** [@Samuel\_Ainsworth](https://discourse.julialang.org/u/Samuel_Ainsworth)\
**Replies:** 1\
**Last updated:** [August 7, 2021, 1:58pm UTC](https://discourse.julialang.org/t/symbolics-jl-how-to-select-between-simplifier-backends/65973 "2021-08-07T13:58:13Z")

</div>

My understanding is that Symbolics.jl has multiple different simplifier backends (ref Symbolics.jl - High performance symbolic numerics via multiple dispatch, Julia Computer Algebra - YouTube). But I haven’t been able to…

---

## [PyPlot.jl \`show()\` method is miss-judged as possible method error with julia-vscode](https://discourse.julialang.org/t/pyplot-jl-show-method-is-miss-judged-as-possible-method-error-with-julia-vscode/65985)

<div class="topic-metadata">

**Author:** [@AtsushiSakai](https://discourse.julialang.org/u/AtsushiSakai)\
**Replies:** 0\
**Last updated:** [August 7, 2021, 1:32pm UTC](https://discourse.julialang.org/t/pyplot-jl-show-method-is-miss-judged-as-possible-method-error-with-julia-vscode/65985 "2021-08-07T13:32:25Z")

</div>

My code is using PyPlot.jl show() in some places, and this code works correctly. However, VSCode with julia-vscode plugin is miss-judging these show() as possible method errors. Is there any workaround for it?

---

## [How to do multiple cameras in subplots with plot3d()](https://discourse.julialang.org/t/how-to-do-multiple-cameras-in-subplots-with-plot3d/65940)

<div class="topic-metadata">

**Author:** [@DoctorDalek1963](https://discourse.julialang.org/u/DoctorDalek1963)\
**Replies:** 1\
**Last updated:** [August 6, 2021, 4:16pm UTC](https://discourse.julialang.org/t/how-to-do-multiple-cameras-in-subplots-with-plot3d/65940 "2021-08-06T16:16:51Z")

</div>

I’m using the Plots library to visualise some randomly generated gravitational motion in a gif. I generate a Vector{Vector{Vector{Float64}}}, which can be thought of as a list of frames, where each frame has a list of bo…

---

## [Base.runtests("math") failures on chips older than haswell](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954)

<div class="topic-metadata">

**Author:** [@Evan\_Dodge](https://discourse.julialang.org/u/Evan_Dodge)\
**Replies:** 12\
**Last updated:** [August 7, 2021, 7:42am UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954 "2021-08-07T07:42:51Z")

</div>

Hello all, I’ve just started playing with Julia. At this point, I’m just downloading the binaries and running tests. So far anything haswell and newer runs the tests just fine, but when I run: Base.runtests(“math”) on…

---

## [Use CMake generate a shared library .so which is to be used in Julia](https://discourse.julialang.org/t/use-cmake-generate-a-shared-library-so-which-is-to-be-used-in-julia/32197)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 0\
**Last updated:** [December 12, 2019, 1:51pm UTC](https://discourse.julialang.org/t/use-cmake-generate-a-shared-library-so-which-is-to-be-used-in-julia/32197 "2019-12-12T13:51:40Z")

</div>

Following the example 3 this link, Introduction to CMake by Example | derekmolloy.ie, I successfully generate a shared library with name listestStudent.so. Then, following the example 8 of this link: GitHub - JuliaInte…

---

## [Help wanted to create Julia binding for the MGIS project using CxxWrap and testing](https://discourse.julialang.org/t/help-wanted-to-create-julia-binding-for-the-mgis-project-using-cxxwrap-and-testing/24244)

<div class="topic-metadata">

**Author:** [@thelfer](https://discourse.julialang.org/u/thelfer)\
**Replies:** 0\
**Last updated:** [May 15, 2019, 4:09pm UTC](https://discourse.julialang.org/t/help-wanted-to-create-julia-binding-for-the-mgis-project-using-cxxwrap-and-testing/24244 "2019-05-15T16:09:14Z")

</div>

Hi, I hope that this request is not off-topic. I am the main developper of a project called MGIS (https://github.com/thelfer/MFrontGenericInterfaceSupport) which aims at providing tools to interact with the mechanical …

---

## [Using Cxx malloc error: pointer being freed was not allocated](https://discourse.julialang.org/t/using-cxx-malloc-error-pointer-being-freed-was-not-allocated/12198)

<div class="topic-metadata">

**Author:** [@Avary\_Kolasinski](https://discourse.julialang.org/u/Avary_Kolasinski)\
**Replies:** 0\
**Last updated:** [July 5, 2018, 10:40pm UTC](https://discourse.julialang.org/t/using-cxx-malloc-error-pointer-being-freed-was-not-allocated/12198 "2018-07-05T22:40:15Z")

</div>

Hello, I am calling a C++ function in my Julia function using Cxx. Within the C++ function I use: buffer = malloc(size) … free(buffer); so the buffer is not passing into the Julia function however, when running the …

---

## [Cxx and complex values](https://discourse.julialang.org/t/cxx-and-complex-values/28129)

<div class="topic-metadata">

**Author:** [@Josiah\_Slack](https://discourse.julialang.org/u/Josiah_Slack)\
**Replies:** 0\
**Last updated:** [August 28, 2019, 5:44pm UTC](https://discourse.julialang.org/t/cxx-and-complex-values/28129 "2019-08-28T17:44:04Z")

</div>

Is there currently machinery in Cxx.jl to convert between Julia’s Complex type and c++'s std::complex? If not, is there a common workaround?

---

## [Embedding C++ code inside a Julia function using Cxx package](https://discourse.julialang.org/t/embedding-c-code-inside-a-julia-function-using-cxx-package/30659)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 0\
**Last updated:** [November 3, 2019, 4:50pm UTC](https://discourse.julialang.org/t/embedding-c-code-inside-a-julia-function-using-cxx-package/30659 "2019-11-03T16:50:45Z")

</div>

Hey, I was playing with the Cxx package and tried the following code and got confused. :wink: julia\> function playing() for i=1:5 icxx""" int tellme; std:…

---

## [How to make CxxWrap bindings to a std::vector\<std::tuple...?](https://discourse.julialang.org/t/how-to-make-cxxwrap-bindings-to-a-std-vector-std-tuple/37976)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 0\
**Last updated:** [April 21, 2020, 5:24pm UTC](https://discourse.julialang.org/t/how-to-make-cxxwrap-bindings-to-a-std-vector-std-tuple/37976 "2020-04-21T17:24:59Z")

</div>

I’m continuing on my CxxWrap.jl journey… I would like to wrap a function that returns the complex type: std::vector\<std::tuple\<int, int\> \>. A function that returns simply a tuple or a vector works fine. I can also get …

---

## [Compiling CUDA code with Cxx.jl](https://discourse.julialang.org/t/compiling-cuda-code-with-cxx-jl/28382)

<div class="topic-metadata">

**Author:** [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Replies:** 0\
**Last updated:** [September 4, 2019, 5:57pm UTC](https://discourse.julialang.org/t/compiling-cuda-code-with-cxx-jl/28382 "2019-09-04T17:57:45Z")

</div>

Hi, I was wondering whether there is an example where they compile a CUDA code with Cxx.jl with specific compiler flags. So my question is actually two fold: how to pass specific compiler flags? how to compile cuda c…

---

## [Help needed for packaging a C++ wrapper with CxxWrap](https://discourse.julialang.org/t/help-needed-for-packaging-a-c-wrapper-with-cxxwrap/41591)

<div class="topic-metadata">

**Author:** [@cstich](https://discourse.julialang.org/u/cstich)\
**Replies:** 0\
**Last updated:** [June 17, 2020, 1:01pm UTC](https://discourse.julialang.org/t/help-needed-for-packaging-a-c-wrapper-with-cxxwrap/41591 "2020-06-17T13:01:37Z")

</div>

I have written a Julia wrapper for a C++ library using CxxWrapper . I don’t have much experience with C++ but I managed to compile everything with cmake into a shared library and I can call the function I want from withi…

---

## [How to use @code\_native with Cxx.jl](https://discourse.julialang.org/t/how-to-use-code-native-with-cxx-jl/34556)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 0\
**Last updated:** [February 13, 2020, 5:26am UTC](https://discourse.julialang.org/t/how-to-use-code-native-with-cxx-jl/34556 "2020-02-13T05:26:18Z")

</div>

Hi, If I do something like using Cxx cxx""" double f(double x) { return 2.0\*pow(x,4)-3.0\*pow(x,3)+2.0\*pow(x,2)-x; } """ jf(x) = @cxx f(x) and then do @code\_native jf(2.0) the code appears to be the code that call…

---

## [Segfault with CxxWrap on Raspberry Pi](https://discourse.julialang.org/t/segfault-with-cxxwrap-on-raspberry-pi/37498)

<div class="topic-metadata">

**Author:** [@Ilay101](https://discourse.julialang.org/u/Ilay101)\
**Replies:** 0\
**Last updated:** [April 13, 2020, 10:40am UTC](https://discourse.julialang.org/t/segfault-with-cxxwrap-on-raspberry-pi/37498 "2020-04-13T10:40:42Z")

</div>

Hi, I experiencing a segfault when trying to use the hello demo with CxxWrap. I am using julia 1.4 and CxxWrap 0.10.0 (and libcxxwrap\_julia\_jll 0.7 installed by CxxWrap) on a Raspberry Pi (armv7l) with raspbian buster …

---

## [Call C++ dll used Cxx.jl on windows](https://discourse.julialang.org/t/call-c-dll-used-cxx-jl-on-windows/60766)

<div class="topic-metadata">

**Author:** [@wgst1024](https://discourse.julialang.org/u/wgst1024)\
**Replies:** 0\
**Last updated:** [May 8, 2021, 8:46am UTC](https://discourse.julialang.org/t/call-c-dll-used-cxx-jl-on-windows/60766 "2021-05-08T08:46:41Z")

</div>

Refer to official documents Example 8: Using C++ with shared libraries，the example is on linux，but I want to test on windows. https://github.com/JuliaInterop/Cxx.jl JuliaDll.h #ifndef ARRAYMAKER\_H #define ARRAYMAKER…

---

## [Reviving concrete package depending on Cxx.jl](https://discourse.julialang.org/t/reviving-concrete-package-depending-on-cxx-jl/51734)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 0\
**Last updated:** [December 12, 2020, 6:34pm UTC](https://discourse.julialang.org/t/reviving-concrete-package-depending-on-cxx-jl/51734 "2020-12-12T18:34:48Z")

</div>

Case and point. Last Friday, 11 December, there was a meeting of Julia users from Discours working in high energy physics (topic for another discusion). At the top of priorities emerges reviving of ROOT.jl package, which…

---

## [Problem with unsafe\_wrap() and Cxx.jl](https://discourse.julialang.org/t/problem-with-unsafe-wrap-and-cxx-jl/39228)

<div class="topic-metadata">

**Author:** [@Josiah\_Slack](https://discourse.julialang.org/u/Josiah_Slack)\
**Replies:** 0\
**Last updated:** [May 10, 2020, 1:54pm UTC](https://discourse.julialang.org/t/problem-with-unsafe-wrap-and-cxx-jl/39228 "2020-05-10T13:54:14Z")

</div>

As the title suggests, I’ve run into very puzzling behavior with Cxx and unsafe\_wrap(). I’ve got some c++ code that returns vector\<vector\<uint8\_t\>\>& which I’m viewing in Julia. I can perform the same operation twice in a…

---

## [Julian way of expressing a buffer swap](https://discourse.julialang.org/t/julian-way-of-expressing-a-buffer-swap/65977)

<div class="topic-metadata">

**Author:** [@mdtisdall](https://discourse.julialang.org/u/mdtisdall)\
**Replies:** 17\
**Last updated:** [August 7, 2021, 6:50am UTC](https://discourse.julialang.org/t/julian-way-of-expressing-a-buffer-swap/65977 "2021-08-07T06:50:05Z")

</div>

Coming from C++, I’m used to writing something like class workspace { public: int\* frontBuffer; int\* backBuffer; workspace() { ... allocate front and back buffers here ...} void swap\_buffers() { …

---

## [Handling of single object vs. 1-element array of object](https://discourse.julialang.org/t/handling-of-single-object-vs-1-element-array-of-object/65949)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 13\
**Last updated:** [August 7, 2021, 6:22am UTC](https://discourse.julialang.org/t/handling-of-single-object-vs-1-element-array-of-object/65949 "2021-08-07T06:22:36Z")

</div>

See for example mutable struct Coords x::Float64 y::Float64 z::Float64 end Coords() = Coords(rand(), rand(), rand()) c5 = \[Coords() for i in 1:5\] c1a = \[Coords() for i in 1:1\] c1b = Coords() fieldnames(type…

---

## [Minimum of a column of a matrix](https://discourse.julialang.org/t/minimum-of-a-column-of-a-matrix/65958)

<div class="topic-metadata">

**Author:** [@stephenll](https://discourse.julialang.org/u/stephenll)\
**Replies:** 10\
**Last updated:** [August 7, 2021, 3:30am UTC](https://discourse.julialang.org/t/minimum-of-a-column-of-a-matrix/65958 "2021-08-07T03:30:42Z")

</div>

Is the following the best (minimize allocations and speed) way to get the minimum of the second column of a matrix? minimum(@view x\[:,2\]) Seems reasonable but checking to see if I am missing something.

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

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