# Latest

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

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

**Page:** 1051

---

## [Why do some functions not output the result directly?](https://discourse.julialang.org/t/why-do-some-functions-not-output-the-result-directly/80449)

<div class="topic-metadata">

**Author:** [@N-Accumbens](https://discourse.julialang.org/u/N-Accumbens)\
**Replies:** 23\
**Last updated:** [May 4, 2022, 9:24pm UTC](https://discourse.julialang.org/t/why-do-some-functions-not-output-the-result-directly/80449 "2022-05-04T21:24:25Z")

</div>

Hello, so for context I’m a R user. I’ve been trying to use this function using IterTools IterTools.product(collect(1:5), collect(1:5)) But I get this output. Base.Iterators.ProductIterator{Tuple{Vector{Int64}, Vecto…

---

## [Pipe not working, unexpectedly](https://discourse.julialang.org/t/pipe-not-working-unexpectedly/80504)

<div class="topic-metadata">

**Author:** [@DorianT](https://discourse.julialang.org/u/DorianT)\
**Replies:** 4\
**Last updated:** [May 4, 2022, 8:38pm UTC](https://discourse.julialang.org/t/pipe-not-working-unexpectedly/80504 "2022-05-04T20:38:35Z")

</div>

\# throws error split("123456789", "") .|\> x -\> parse(Int8,x) |\> x -\> reshape(x, 3, 3) # works as expected A = split("123456789", "") .|\> x -\> parse(Int8,x) reshape(A, 3, 3) Hey guys :wave: Can someone explain me why pi…

---

## [Style Question: How should I write a long error message?](https://discourse.julialang.org/t/style-question-how-should-i-write-a-long-error-message/80502)

<div class="topic-metadata">

**Author:** [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Replies:** 2\
**Last updated:** [May 4, 2022, 8:12pm UTC](https://discourse.julialang.org/t/style-question-how-should-i-write-a-long-error-message/80502 "2022-05-04T20:12:07Z")

</div>

I’m writing a function that includes a long-winded error message. I can write it all on one line like this: error("Lorem interdum nescio ubi sordida iter ducis, interdum nec video cur. Ego coniecto ego servo in ludum p…

---

## [JuliaUserGroupMunich: Share&Code on ReinforcementLearning.jl with Jun Tian](https://discourse.julialang.org/t/juliausergroupmunich-share-code-on-reinforcementlearning-jl-with-jun-tian/79418)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 7\
**Last updated:** [May 4, 2022, 7:49pm UTC](https://discourse.julialang.org/t/juliausergroupmunich-share-code-on-reinforcementlearning-jl-with-jun-tian/79418 "2022-05-04T19:49:46Z")

</div>

Join us :spiral\_calendar: Monday 02. May 2022 :clock630: 16:00 CEST. A Practical Introduction to ReinforcementLearning.jl ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ I am glad to welcome Jun Tian @findmyway as our speaker, who wi…

---

## [Overriding Base.show with multi-line string returns literal "\\n"](https://discourse.julialang.org/t/overriding-base-show-with-multi-line-string-returns-literal-n/80500)

<div class="topic-metadata">

**Author:** [@FireCrumb](https://discourse.julialang.org/u/FireCrumb)\
**Replies:** 1\
**Last updated:** [May 4, 2022, 7:20pm UTC](https://discourse.julialang.org/t/overriding-base-show-with-multi-line-string-returns-literal-n/80500 "2022-05-04T19:20:58Z")

</div>

Hi, I have a composite struct ABC with various fields A,B,C, which I want to display in a clear way on the screen (and later in Jupyter, but starting with REPL/console). Here’s my code: struct ABC A::Vector{Int64}…

---

## [\`eltype\` could be smarter](https://discourse.julialang.org/t/eltype-could-be-smarter/80485)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 8\
**Last updated:** [May 4, 2022, 7:17pm UTC](https://discourse.julialang.org/t/eltype-could-be-smarter/80485 "2022-05-04T19:17:46Z")

</div>

There have been plenty of eltype discussions before, for example Generator - iterators should deliver accurate eltype. I understand that this can sometimes be a hard problem. But then there are cases like this: julia\> …

---

## [ISTA e FISTA](https://discourse.julialang.org/t/ista-e-fista/80498)

<div class="topic-metadata">

**Author:** [@DOUGLAS\_NASCIMENTO\_R](https://discourse.julialang.org/u/DOUGLAS_NASCIMENTO_R)\
**Replies:** 3\
**Last updated:** [May 4, 2022, 7:11pm UTC](https://discourse.julialang.org/t/ista-e-fista/80498 "2022-05-04T19:11:00Z")

</div>

I’m trying to implement ISTA and FISTA methods in Julia. Theoretically, the efficiency of FISTA is superior to that of ISTA. However in the computational results, I am getting that the complexity per iteration of ISTA …

---

## [Solving ODEs with Initial Values u(t0) = u0 for t0 ≠ 0](https://discourse.julialang.org/t/solving-odes-with-initial-values-u-t0-u0-for-t0-0/80456)

<div class="topic-metadata">

**Author:** [@ethan\_wood](https://discourse.julialang.org/u/ethan_wood)\
**Replies:** 2\
**Last updated:** [May 4, 2022, 6:13pm UTC](https://discourse.julialang.org/t/solving-odes-with-initial-values-u-t0-u0-for-t0-0/80456 "2022-05-04T18:13:17Z")

</div>

Hello, I’ve gotten into Julia to solve a number of ODEs (mostly for boundary value problems) and I’ve started to practice solving them in Julia. I’ve checked a lot of threads and the documentation for Differentialequati…

---

## [Recursive definition of zero, one](https://discourse.julialang.org/t/recursive-definition-of-zero-one/80492)

<div class="topic-metadata">

**Author:** [@shiroghost](https://discourse.julialang.org/u/shiroghost)\
**Replies:** 1\
**Last updated:** [May 4, 2022, 4:02pm UTC](https://discourse.julialang.org/t/recursive-definition-of-zero-one/80492 "2022-05-04T16:02:49Z")

</div>

Hi all, Imagine I have a data type like: struct foo{T,N} c::NTuple{N,T} end and I want to define the zero function import Base.zero zero(s::foo{T,N}) where {T,N} = foo{T,N}(ntuple(i -\> zero(T), N)) This allows me …

---

## [Postdoctoral Fellowship in Packing Problems](https://discourse.julialang.org/t/postdoctoral-fellowship-in-packing-problems/80491)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 0\
**Last updated:** [May 4, 2022, 3:47pm UTC](https://discourse.julialang.org/t/postdoctoral-fellowship-in-packing-problems/80491 "2022-05-04T15:47:50Z")

</div>

Postdoctoral Fellowship in Packing Problems We are seeking candidates for two post-doctoral positions to work at the Institute of Computing of the University of Campinas, Brazil. Each position extends for 9 months. G…

---

## [Inconsistent results between Yao and Qiskit](https://discourse.julialang.org/t/inconsistent-results-between-yao-and-qiskit/63363)

<div class="topic-metadata">

**Author:** [@rmedinar](https://discourse.julialang.org/u/rmedinar)\
**Replies:** 4\
**Last updated:** [May 4, 2022, 3:27pm UTC](https://discourse.julialang.org/t/inconsistent-results-between-yao-and-qiskit/63363 "2022-05-04T15:27:56Z")

</div>

Hi everyone. I have been trying to simulate the growth of entanglement entropy in random unitary circuits using Yao for a while now. When comparing with old results from my Qiskit code I found out about some inconsistenc…

---

## [Computing a linear combination of all reduced density matrices of a given pure state](https://discourse.julialang.org/t/computing-a-linear-combination-of-all-reduced-density-matrices-of-a-given-pure-state/72070)

<div class="topic-metadata">

**Author:** [@rmedinar](https://discourse.julialang.org/u/rmedinar)\
**Replies:** 10\
**Last updated:** [May 4, 2022, 3:25pm UTC](https://discourse.julialang.org/t/computing-a-linear-combination-of-all-reduced-density-matrices-of-a-given-pure-state/72070 "2022-05-04T15:25:09Z")

</div>

Hi all! I have been struggling for a while on the following calculation: (For the simulations, I’m using Yao) Imagine you are given a pure state \\psi of N qubits. And you want to compute where A runs over all subreg…

---

## [A Julia DataAnalysis Sysimage from PackageCompiler It's so easy you should do it too!](https://discourse.julialang.org/t/a-julia-dataanalysis-sysimage-from-packagecompiler-its-so-easy-you-should-do-it-too/68127)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 24\
**Last updated:** [May 4, 2022, 3:19pm UTC](https://discourse.julialang.org/t/a-julia-dataanalysis-sysimage-from-packagecompiler-its-so-easy-you-should-do-it-too/68127 "2022-05-04T15:19:57Z")

</div>

If you want to use Julia for the kind of thing where you might fire up R and read a couple CSV files into some DataFrames, maybe grab some data from a SQLite file, manipulate the data a little, make a few plots, and be d…

---

## [Saving LinearModel without data](https://discourse.julialang.org/t/saving-linearmodel-without-data/28889)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 3\
**Last updated:** [May 4, 2022, 2:53pm UTC](https://discourse.julialang.org/t/saving-linearmodel-without-data/28889 "2022-05-04T14:53:52Z")

</div>

My question: How can I save the results of a regression (say a LinearModel from GLM.jl) without the data that are stored inside the object? Context: I run several regressions using GLM.jl. At some point after all the …

---

## [Re-evaluate function in another module](https://discourse.julialang.org/t/re-evaluate-function-in-another-module/80472)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 1\
**Last updated:** [May 4, 2022, 1:30pm UTC](https://discourse.julialang.org/t/re-evaluate-function-in-another-module/80472 "2022-05-04T13:30:56Z")

</div>

Consider the following: module A export foo whoami() = "A" foo() = whoami() end module B using Main.A whoami() = "B" end B.foo() # "A" I understand why that’s the case but is there a way to call A…

---

## [Julia script using zmq works run from cli but NOT from cronjob](https://discourse.julialang.org/t/julia-script-using-zmq-works-run-from-cli-but-not-from-cronjob/80447)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 10\
**Last updated:** [May 4, 2022, 1:02pm UTC](https://discourse.julialang.org/t/julia-script-using-zmq-works-run-from-cli-but-not-from-cronjob/80447 "2022-05-04T13:02:49Z")

</div>

Hi there not sure if this is a linux ( I’m running linux mint 20.3) and have set up 3 cronjobs. the first starts a ZMQ PULL server that gets messages and println’s the messages to stdout which I pipe out to a text f…

---

## [Implicitly loaded modules in the future?](https://discourse.julialang.org/t/implicitly-loaded-modules-in-the-future/62646)

<div class="topic-metadata">

**Author:** [@panos.asproulis](https://discourse.julialang.org/u/panos.asproulis)\
**Replies:** 278\
**Last updated:** [May 4, 2022, 12:47pm UTC](https://discourse.julialang.org/t/implicitly-loaded-modules-in-the-future/62646 "2022-05-04T12:47:28Z")

</div>

I find the modules implementation in Julia the most annoying “feature” of the language. For large projects it makes sense that developers would want to organise their code in separate modules (not packages), each one in…

---

## [Unexpected ambigiuity in subtype constructor](https://discourse.julialang.org/t/unexpected-ambigiuity-in-subtype-constructor/80475)

<div class="topic-metadata">

**Author:** [@sjrodahl](https://discourse.julialang.org/u/sjrodahl)\
**Replies:** 2\
**Last updated:** [May 4, 2022, 12:21pm UTC](https://discourse.julialang.org/t/unexpected-ambigiuity-in-subtype-constructor/80475 "2022-05-04T12:21:00Z")

</div>

Consider this example: julia\> abstract type AbstractT end julia\> struct A \<: AbstractT i::Int end julia\> struct Param myparam::Int end julia\> (::Type{T})(p::Param) where T\<:AbstractT …

---

## [How to sum elements raised to a power](https://discourse.julialang.org/t/how-to-sum-elements-raised-to-a-power/77013)

<div class="topic-metadata">

**Author:** [@ovt](https://discourse.julialang.org/u/ovt)\
**Replies:** 9\
**Last updated:** [May 4, 2022, 11:57am UTC](https://discourse.julialang.org/t/how-to-sum-elements-raised-to-a-power/77013 "2022-05-04T11:57:30Z")

</div>

Let’s assume that X is a matrix. I want to efficiently compute sum(X.^2) but without computing X.^2 which will allocate some memory for nothing. So I’m trying to do something like sum(^(2),X) which throws a method error.…

---

## [Contour\_labels absent when scale=:log10 in GR](https://discourse.julialang.org/t/contour-labels-absent-when-scale-log10-in-gr/80458)

<div class="topic-metadata">

**Author:** [@bcon](https://discourse.julialang.org/u/bcon)\
**Replies:** 2\
**Last updated:** [May 4, 2022, 10:09am UTC](https://discourse.julialang.org/t/contour-labels-absent-when-scale-log10-in-gr/80458 "2022-05-04T10:09:48Z")

</div>

I can’t get GR to draw contour\_labels when axes are log-scaled: using Plots using FileIO x = 1:0.5:20 y = 1:0.5:10 f(x, y) = (3x + y ^ 2) \* abs(sin(x) + cos(y)) pyplot() p1 = contour(x, y, f, fill=false, scale=:…

---

## [Parsing DateTime, what should be the default(s)?](https://discourse.julialang.org/t/parsing-datetime-what-should-be-the-default-s/80428)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 4\
**Last updated:** [May 4, 2022, 9:55am UTC](https://discourse.julialang.org/t/parsing-datetime-what-should-be-the-default-s/80428 "2022-05-04T09:55:00Z")

</div>

I CAN parse without the T, it’s just not the default: julia\> DateTime("2021-08-28 00:00:59", dateformat"yyyy-mm-dd HH:MM:SS.s") 2021-08-28T00:00:59 while: julia\> DateTime("2021-08-28 00:00:59") ERROR: ArgumentError: I…

---

## [\[RFC\] Solving Slack's lack of history](https://discourse.julialang.org/t/rfc-solving-slacks-lack-of-history/33360)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 11\
**Last updated:** [May 4, 2022, 9:39am UTC](https://discourse.julialang.org/t/rfc-solving-slacks-lack-of-history/33360 "2022-05-04T09:39:51Z")

</div>

Problem: With an increasing number of users and messages, the number of days with saved history on Slack is currently 10 (as noted by Makie’s layout creator, Julius Krumbiegel). This means that searching for past solutio…

---

## [Changing size of markers in legend with Plots](https://discourse.julialang.org/t/changing-size-of-markers-in-legend-with-plots/15520)

<div class="topic-metadata">

**Author:** [@akazachk](https://discourse.julialang.org/u/akazachk)\
**Replies:** 1\
**Last updated:** [May 4, 2022, 9:35am UTC](https://discourse.julialang.org/t/changing-size-of-markers-in-legend-with-plots/15520 "2022-05-04T09:35:57Z")

</div>

Hi everyone, I am on v1, plotting with Plots (and the GR backed). I know that I can change the size of markers with markersize in my plot, but I can’t seem to find a way to change the size within the legend. The markers …

---

## [How does the \`camera\` attribute of \`plot\` work?](https://discourse.julialang.org/t/how-does-the-camera-attribute-of-plot-work/22139)

<div class="topic-metadata">

**Author:** [@adityam](https://discourse.julialang.org/u/adityam)\
**Replies:** 1\
**Last updated:** [May 4, 2022, 9:13am UTC](https://discourse.julialang.org/t/how-does-the-camera-attribute-of-plot-work/22139 "2022-05-04T09:13:42Z")

</div>

I am trying to understand how the camera attribute of plots works? The documentation says Sets the view angle (azimuthal, elevation) for 3D plots but I fail to visualize how I can set the view angle by specifying two…

---

## [Allow 3-argument sum in Julia?](https://discourse.julialang.org/t/allow-3-argument-sum-in-julia/80457)

<div class="topic-metadata">

**Author:** [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Replies:** 16\
**Last updated:** [May 4, 2022, 9:10am UTC](https://discourse.julialang.org/t/allow-3-argument-sum-in-julia/80457 "2022-05-04T09:10:52Z")

</div>

Julia’s sum accepts a function as a first argument, like sum(abs, arr). This feature becomes very useful and efficient in many situations when we want to apply the function on the array before sum. However, if the funct…

---

## [Threaded function throws no error](https://discourse.julialang.org/t/threaded-function-throws-no-error/80209)

<div class="topic-metadata">

**Author:** [@f.ij](https://discourse.julialang.org/u/f.ij)\
**Replies:** 1\
**Last updated:** [May 3, 2022, 11:47am UTC](https://discourse.julialang.org/t/threaded-function-throws-no-error/80209 "2022-05-03T11:47:03Z")

</div>

Hi there, I’m trying to build an application using the QML Julia package. I have a QML window open with a while loop in the background that is updating a display. I call this function using Threads.@spawn, because other…

---

## [Mongodb and Julia : how to go from Vector of BSON documents to a dataframe](https://discourse.julialang.org/t/mongodb-and-julia-how-to-go-from-vector-of-bson-documents-to-a-dataframe/80465)

<div class="topic-metadata">

**Author:** [@Julia\_fun\_123](https://discourse.julialang.org/u/Julia_fun_123)\
**Replies:** 0\
**Last updated:** [May 4, 2022, 7:42am UTC](https://discourse.julialang.org/t/mongodb-and-julia-how-to-go-from-vector-of-bson-documents-to-a-dataframe/80465 "2022-05-04T07:42:07Z")

</div>

Hello. I have been looking at the Mongoc.jl documentation on and off for several months, but I haven’t been able to find a way to convert BSON data to a DataFrame. The data I am using is from the yelp dataset, found he…

---

## [Lowering the bar for beginner contributions](https://discourse.julialang.org/t/lowering-the-bar-for-beginner-contributions/80355)

<div class="topic-metadata">

**Author:** [@antoine-levitt](https://discourse.julialang.org/u/antoine-levitt)\
**Replies:** 14\
**Last updated:** [May 4, 2022, 7:32am UTC](https://discourse.julialang.org/t/lowering-the-bar-for-beginner-contributions/80355 "2022-05-04T07:32:30Z")

</div>

(opening a new thread to not distract from the effort in https://discourse.julialang.org/t/coordinating-community-efforts-to-enrich-function-docs/) Looking over the recent discussion about improving docs, it’s clear tha…

---

## [Julia Meetup Copenhagen](https://discourse.julialang.org/t/julia-meetup-copenhagen/79520)

<div class="topic-metadata">

**Author:** [@wc4wc4wc4](https://discourse.julialang.org/u/wc4wc4wc4)\
**Replies:** 16\
**Last updated:** [May 4, 2022, 7:13am UTC](https://discourse.julialang.org/t/julia-meetup-copenhagen/79520 "2022-05-04T07:13:19Z")

</div>

We are now finally ready to announce the details for the first Julia Meetup Copenhagen 2022! This is happening May 2nd. Please remember to sign up here. The program for this first edition will be as follows: 18.30 - 1…

---

## [SimpleChains.jl extension to Graph Neural Networks](https://discourse.julialang.org/t/simplechains-jl-extension-to-graph-neural-networks/80422)

<div class="topic-metadata">

**Author:** [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Replies:** 2\
**Last updated:** [May 4, 2022, 1:25am UTC](https://discourse.julialang.org/t/simplechains-jl-extension-to-graph-neural-networks/80422 "2022-05-04T01:25:47Z")

</div>

So yesterday I attended the Copenhagen julia meetup and saw a new Neural network toolbox called SimpleChains.jl which aims to be fast for small neural networks basically. Often Graph Neural Networks are also quite small …

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

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