# Latest

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

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

**Page:** 1837

---

## [Does @threads not allow iteration over Dict()?](https://discourse.julialang.org/t/does-threads-not-allow-iteration-over-dict/33912)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 2\
**Last updated:** [January 29, 2020, 5:12am UTC](https://discourse.julialang.org/t/does-threads-not-allow-iteration-over-dict/33912 "2020-01-29T05:12:11Z")

</div>

I have no idea why the following code errors: using Base.Threads A = Dict{Int, Vector{Float64}}() # A = rand(10, 10) # OK foreach(i-\>A\[i\] = rand(10), 1:10) @threads for i in eachindex(A) # ERROR: TaskFailedException…

---

## [How to save additional data in or with a solution when using DifferentialEquations](https://discourse.julialang.org/t/how-to-save-additional-data-in-or-with-a-solution-when-using-differentialequations/33892)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 2\
**Last updated:** [January 29, 2020, 2:41am UTC](https://discourse.julialang.org/t/how-to-save-additional-data-in-or-with-a-solution-when-using-differentialequations/33892 "2020-01-29T02:41:58Z")

</div>

Is there an idiom for saving non-state variables in or with the solution? I would like to be able to list additional variables (either intermediate ones that I calculate anyway or derived ones of interest) and have them…

---

## [What's the difference between CSV.jl and CSVFiles.jl?](https://discourse.julialang.org/t/whats-the-difference-between-csv-jl-and-csvfiles-jl/17950)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 24\
**Last updated:** [January 29, 2020, 1:35am UTC](https://discourse.julialang.org/t/whats-the-difference-between-csv-jl-and-csvfiles-jl/17950 "2020-01-29T01:35:43Z")

</div>

What’s the difference between CSV.jl and CSVFiles.jl? When should I use each of them?

---

## [Reading structs from binary stream](https://discourse.julialang.org/t/reading-structs-from-binary-stream/33854)

<div class="topic-metadata">

**Author:** [@Mikhail\_Kagalenko](https://discourse.julialang.org/u/Mikhail_Kagalenko)\
**Replies:** 1\
**Last updated:** [January 28, 2020, 10:01pm UTC](https://discourse.julialang.org/t/reading-structs-from-binary-stream/33854 "2020-01-28T22:01:07Z")

</div>

What is the up-to-date, idiomatic method of deserializing a stream of un-padded binary values from an external source into Julia struct? StrPack.jl carries a big warning that it is not actively maintained.

---

## [Cumsum behaviour on sparse arrays](https://discourse.julialang.org/t/cumsum-behaviour-on-sparse-arrays/33886)

<div class="topic-metadata">

**Author:** [@mlanghinrichs](https://discourse.julialang.org/u/mlanghinrichs)\
**Replies:** 3\
**Last updated:** [January 28, 2020, 8:15pm UTC](https://discourse.julialang.org/t/cumsum-behaviour-on-sparse-arrays/33886 "2020-01-28T20:15:11Z")

</div>

Hi there, I’m rather new to Julia (and already enjoying it a lot), so please don’t be too hard on me if my topic doesn’t make that much sense. However I think I noticed a somewhat surprising behaviour when cumsum (cumul…

---

## [Computer freezes with parallel](https://discourse.julialang.org/t/computer-freezes-with-parallel/33903)

<div class="topic-metadata">

**Author:** [@squirrel](https://discourse.julialang.org/u/squirrel)\
**Replies:** 0\
**Last updated:** [January 28, 2020, 8:13pm UTC](https://discourse.julialang.org/t/computer-freezes-with-parallel/33903 "2020-01-28T20:13:18Z")

</div>

Hi. I need to use parallel programming and I’ve been trying to play around with some basic parts. When I try to benchmark a simple threaded function, my laptop freezes for over five minutes and I resort to doing a hard s…

---

## [PDF Manual](https://discourse.julialang.org/t/pdf-manual/32961)

<div class="topic-metadata">

**Author:** [@Usor](https://discourse.julialang.org/u/Usor)\
**Replies:** 2\
**Last updated:** [January 28, 2020, 7:59pm UTC](https://discourse.julialang.org/t/pdf-manual/32961 "2020-01-28T19:59:27Z")

</div>

It looks as though the Julia PDF manual hasn’t been available for a while (since v. 1.3), or is it something on my end? The file doesn’t load at all online, and when downloaded, is too small in file size.

---

## [How to create a regex from a string with metacharacters?](https://discourse.julialang.org/t/how-to-create-a-regex-from-a-string-with-metacharacters/33898)

<div class="topic-metadata">

**Author:** [@Dictino](https://discourse.julialang.org/u/Dictino)\
**Replies:** 2\
**Last updated:** [January 28, 2020, 7:22pm UTC](https://discourse.julialang.org/t/how-to-create-a-regex-from-a-string-with-metacharacters/33898 "2020-01-28T19:22:13Z")

</div>

Hi I need to look for a set of sub-strings in a long text and there are two obvious options at hand: regex and findfirst. findfirst is nice and does exactly the thing I want, but it is a bit slow (10 times slower that …

---

## [CSV.jl's CSV write seems slow](https://discourse.julialang.org/t/csv-jls-csv-write-seems-slow/7643)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 32\
**Last updated:** [January 28, 2020, 7:09pm UTC](https://discourse.julialang.org/t/csv-jls-csv-write-seems-slow/7643 "2020-01-28T19:09:04Z")

</div>

updated code with suggestions by ScottPJones The below took about 100~200 seconds but in R’s data.table’s fwrite the same is done in 2 seconds. It is quite a big discrepancy. I am curious as to what need to change befo…

---

## [Trouble creating a real-valued vector out of elements of multiple complex arrays](https://discourse.julialang.org/t/trouble-creating-a-real-valued-vector-out-of-elements-of-multiple-complex-arrays/33790)

<div class="topic-metadata">

**Author:** [@CPPhysics](https://discourse.julialang.org/u/CPPhysics)\
**Replies:** 22\
**Last updated:** [January 28, 2020, 6:55pm UTC](https://discourse.julialang.org/t/trouble-creating-a-real-valued-vector-out-of-elements-of-multiple-complex-arrays/33790 "2020-01-28T18:55:56Z")

</div>

Hello, I am doing an optimization problem and want to extend a minimizing vector to become an initial guess for the same problem in a larger parameter space (one can think of it as being in a larger dimension), with all …

---

## [Start Julia via SLURM batch script on remote node](https://discourse.julialang.org/t/start-julia-via-slurm-batch-script-on-remote-node/33885)

<div class="topic-metadata">

**Author:** [@LysandrosAn](https://discourse.julialang.org/u/LysandrosAn)\
**Replies:** 6\
**Last updated:** [January 28, 2020, 6:50pm UTC](https://discourse.julialang.org/t/start-julia-via-slurm-batch-script-on-remote-node/33885 "2020-01-28T18:50:10Z")

</div>

Hello together, for numerical integration of ODEs I am intending to use an external high-performance-computing centre, where one can deploy code. Although the admins installed julia there, I can’t seem to kick it off vi…

---

## [Collection of objects with a trait](https://discourse.julialang.org/t/collection-of-objects-with-a-trait/33863)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 6\
**Last updated:** [January 28, 2020, 6:12pm UTC](https://discourse.julialang.org/t/collection-of-objects-with-a-trait/33863 "2020-01-28T18:12:56Z")

</div>

Has anyone given some thought how to work with collections of objects that have a (set of) trait(s)? How to create, maintain, iterate… What would a Base.iterate extension look like?

---

## [\[ANN\] ProfileVega.jl](https://discourse.julialang.org/t/ann-profilevega-jl/33880)

<div class="topic-metadata">

**Author:** [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Replies:** 4\
**Last updated:** [January 28, 2020, 6:12pm UTC](https://discourse.julialang.org/t/ann-profilevega-jl/33880 "2020-01-28T18:12:12Z")

</div>

ProfileVega.jl is a small package that visualizes profile results with VegaLite.jl. The API is almost identical to ProfileSVG.jl. This works especially well for JupyterLab and nteract, where this package gives you nice …

---

## [Question about Functors](https://discourse.julialang.org/t/question-about-functors/33876)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 7\
**Last updated:** [January 28, 2020, 4:41pm UTC](https://discourse.julialang.org/t/question-about-functors/33876 "2020-01-28T16:41:44Z")

</div>

I am trying to solve an economic model. The algorithm involves an iterative two-step procedure, like a back-and-forth optimization. There are lots of inputs and moving parts. I created a struct to keep track of it all. W…

---

## [Unexpected behaviour while benchmarking](https://discourse.julialang.org/t/unexpected-behaviour-while-benchmarking/33890)

<div class="topic-metadata">

**Author:** [@Kruxigt](https://discourse.julialang.org/u/Kruxigt)\
**Replies:** 1\
**Last updated:** [January 28, 2020, 4:31pm UTC](https://discourse.julialang.org/t/unexpected-behaviour-while-benchmarking/33890 "2020-01-28T16:31:16Z")

</div>

Hi fine folks! While investigating improvements for another topic i just posted about here I ran into some unexpected behaviour while benchmarking the code with BenchmarkTools. I have a function rolling\_optima which I …

---

## [How for loops, map and comprehensions act on variables?](https://discourse.julialang.org/t/how-for-loops-map-and-comprehensions-act-on-variables/33849)

<div class="topic-metadata">

**Author:** [@Marco-Congedo](https://discourse.julialang.org/u/Marco-Congedo)\
**Replies:** 10\
**Last updated:** [January 28, 2020, 4:28pm UTC](https://discourse.julialang.org/t/how-for-loops-map-and-comprehensions-act-on-variables/33849 "2020-01-28T16:28:03Z")

</div>

I am writing an iterative algorithm. The function here below is part of the main function and performs a line search dividing by two the step size until the loss function is decreased. All variables are appropriately ini…

---

## [Question: Why \`for n in 10 @show n end\` is valid rather than getting error](https://discourse.julialang.org/t/question-why-for-n-in-10-show-n-end-is-valid-rather-than-getting-error/33895)

<div class="topic-metadata">

**Author:** [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Replies:** 2\
**Last updated:** [January 28, 2020, 4:14pm UTC](https://discourse.julialang.org/t/question-why-for-n-in-10-show-n-end-is-valid-rather-than-getting-error/33895 "2020-01-28T16:14:52Z")

</div>

When I study Julia with respect to for loop syntax as an exercise, some wired things happen. Consider this julia code: for i in 1:10 @show i end Of course it will output with i=1, i=2, …, i=10 as a result. More p…

---

## [Renaming IDs in a GFF3](https://discourse.julialang.org/t/renaming-ids-in-a-gff3/33687)

<div class="topic-metadata">

**Author:** [@mictadlo](https://discourse.julialang.org/u/mictadlo)\
**Replies:** 42\
**Last updated:** [January 28, 2020, 3:51pm UTC](https://discourse.julialang.org/t/renaming-ids-in-a-gff3/33687 "2020-01-28T15:51:28Z")

</div>

Hi, are there any examples of renaming IDs in a GFF3 file? Thank you in advance,

---

## [Transparent gif](https://discourse.julialang.org/t/transparent-gif/33883)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 2\
**Last updated:** [January 28, 2020, 11:07am UTC](https://discourse.julialang.org/t/transparent-gif/33883 "2020-01-28T11:07:11Z")

</div>

Is there a way to prepare a gif with transparent background? When I am trying it now using background\_color=:transparent I get that the gif does not reset the image between frames.

---

## [Avoid SSL verification?](https://discourse.julialang.org/t/avoid-ssl-verification/33872)

<div class="topic-metadata">

**Author:** [@rvignolo](https://discourse.julialang.org/u/rvignolo)\
**Replies:** 2\
**Last updated:** [January 28, 2020, 3:20pm UTC](https://discourse.julialang.org/t/avoid-ssl-verification/33872 "2020-01-28T15:20:07Z")

</div>

Hi! How can I avoid SSL verification in this case: (@v1.4) pkg\> add WinRPM Updating registry at \`C:\\Users\\ramirov\\.julia\\registries\\General\` Updating git-repo \`https://github.com/JuliaRegistries/General.git\` Re…

---

## [LinearMaps: Transpose function not working the same as forward function](https://discourse.julialang.org/t/linearmaps-transpose-function-not-working-the-same-as-forward-function/33759)

<div class="topic-metadata">

**Author:** [@lineycroc](https://discourse.julialang.org/u/lineycroc)\
**Replies:** 13\
**Last updated:** [January 28, 2020, 3:18pm UTC](https://discourse.julialang.org/t/linearmaps-transpose-function-not-working-the-same-as-forward-function/33759 "2020-01-28T15:18:41Z")

</div>

I am running into an error while trying to create a LinearMap where if I put the same function in both the forward and transpose operator arguments, the forward map works but the transpose does not. My eventual goal is t…

---

## [Problem with savefig from Plots package](https://discourse.julialang.org/t/problem-with-savefig-from-plots-package/33877)

<div class="topic-metadata">

**Author:** [@sergevic](https://discourse.julialang.org/u/sergevic)\
**Replies:** 2\
**Last updated:** [January 28, 2020, 3:11pm UTC](https://discourse.julialang.org/t/problem-with-savefig-from-plots-package/33877 "2020-01-28T15:11:28Z")

</div>

I had the following code that worked well until today. I didn’t change anything, only Julia version. using Plots using Printf function plotrand(t) plot(rand(10),rand(10)) sav=@sprintf("%d",t) savefi…

---

## [2 problems with Flux](https://discourse.julialang.org/t/2-problems-with-flux/33887)

<div class="topic-metadata">

**Author:** [@Andrea\_Pagnani](https://discourse.julialang.org/u/Andrea_Pagnani)\
**Replies:** 4\
**Last updated:** [January 28, 2020, 1:19pm UTC](https://discourse.julialang.org/t/2-problems-with-flux/33887 "2020-01-28T13:19:53Z")

</div>

Dearests I am encountering some problems with Flux. I am working on Julia 1.3.1 Zygote v0.4.6, Flux v0.10.1, CuArrays v1.6.0. No gpus for the time being. The (not-so) minimal partially working example is the followin…

---

## [Indexing AxisArrays by integer values (which don't start at 1...)](https://discourse.julialang.org/t/indexing-axisarrays-by-integer-values-which-dont-start-at-1/33749)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 9\
**Last updated:** [January 28, 2020, 1:08pm UTC](https://discourse.julialang.org/t/indexing-axisarrays-by-integer-values-which-dont-start-at-1/33749 "2020-01-28T13:08:56Z")

</div>

I use Axis Arrays for my modelling, but I’ve stumbled onto an annoying problem: using AxisArrays Y = \[2019,2020\] # years x = \[1, 2\] A = AxisArray(x, Y) A\[2019\] # ERROR: BoundsError: attempt to access 2-element Array{…

---

## [What exactly are the arguments of \`Base.require\`?](https://discourse.julialang.org/t/what-exactly-are-the-arguments-of-base-require/33373)

<div class="topic-metadata">

**Author:** [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Replies:** 12\
**Last updated:** [January 28, 2020, 6:41am UTC](https://discourse.julialang.org/t/what-exactly-are-the-arguments-of-base-require/33373 "2020-01-28T06:41:52Z")

</div>

It may be my stupidity, but I do not seem to find exactly what I should pass to Base.require. The docs are not very clear on what I should pass as first parameter (is it the current module? is it Main?). And the only me…

---

## [Indexing Array](https://discourse.julialang.org/t/indexing-array/33866)

<div class="topic-metadata">

**Author:** [@Arega\_Getaneh](https://discourse.julialang.org/u/Arega_Getaneh)\
**Replies:** 10\
**Last updated:** [January 28, 2020, 1:09am UTC](https://discourse.julialang.org/t/indexing-array/33866 "2020-01-28T01:09:05Z")

</div>

Use square brackets \[\] for indexing an Array. Stacktrace: \[1\] mapreduce\_first(::Array{Float64,2}, ::Function, ::Int64) at .\\reduce.jl:301 \[2\] mapreduce(::Array{Float64,2}, ::Function, ::Int64) at .\\reduce.jl:328 \[3\] …

---

## [How to plot in for loop (or map)](https://discourse.julialang.org/t/how-to-plot-in-for-loop-or-map/33881)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 4\
**Last updated:** [January 28, 2020, 12:38am UTC](https://discourse.julialang.org/t/how-to-plot-in-for-loop-or-map/33881 "2020-01-28T00:38:09Z")

</div>

would somebody help to plot plots in for loop? here is a simple not working example: x=0:0.1:1 plot(x,x) for i=2:3 plot!(x,i.\*x) end

---

## [Extract relevant lines from large file using IDs from other file](https://discourse.julialang.org/t/extract-relevant-lines-from-large-file-using-ids-from-other-file/33859)

<div class="topic-metadata">

**Author:** [@swuyts](https://discourse.julialang.org/u/swuyts)\
**Replies:** 10\
**Last updated:** [January 27, 2020, 11:35pm UTC](https://discourse.julialang.org/t/extract-relevant-lines-from-large-file-using-ids-from-other-file/33859 "2020-01-27T23:35:02Z")

</div>

Hi there, I am new to Julia but interested to learn. I would like to extract lines from a large file (32gb; File B) based on an ID (File A) that is stored in another file. \> FileA ID01 ID02 ID03 ... IDXX \> FileB ID05…

---

## [Macro that generates additional methods of the same function](https://discourse.julialang.org/t/macro-that-generates-additional-methods-of-the-same-function/33873)

<div class="topic-metadata">

**Author:** [@lewis](https://discourse.julialang.org/u/lewis)\
**Replies:** 2\
**Last updated:** [January 27, 2020, 8:58pm UTC](https://discourse.julialang.org/t/macro-that-generates-additional-methods-of-the-same-function/33873 "2020-01-27T20:58:43Z")

</div>

Here is a macro that works almost as intended: macro gen\_argfilt(func, tpl) return quote function arg\_filt(dat::Union{Model\_data, Batch\_view},nnw::Wgts, hp::Hyper\_parameters…

---

## [\\circ and parantheses](https://discourse.julialang.org/t/circ-and-parantheses/18196)

<div class="topic-metadata">

**Author:** [@BeastyBlacksmith](https://discourse.julialang.org/u/BeastyBlacksmith)\
**Replies:** 9\
**Last updated:** [January 27, 2020, 8:17pm UTC](https://discourse.julialang.org/t/circ-and-parantheses/18196 "2020-01-27T20:17:14Z")

</div>

The main thing that causes me to not use the \\circ operator in julia as much as i do the mathematica equivalent (they use @) is, that I need to wrap everything in parantheses. I can see that this relates nicely to mathe…

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

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