# Latest

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

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

**Page:** 1663

---

## [Explain scoping confusion to a programming beginner](https://discourse.julialang.org/t/explain-scoping-confusion-to-a-programming-beginner/43206)

<div class="topic-metadata">

**Author:** [@kapple](https://discourse.julialang.org/u/kapple)\
**Replies:** 26\
**Last updated:** [August 11, 2020, 8:05pm UTC](https://discourse.julialang.org/t/explain-scoping-confusion-to-a-programming-beginner/43206 "2020-08-11T20:05:09Z")

</div>

The scoping rules feel unintuitive, and I feel more confused after reading numerous Discourse and StackExchange responses, such as Stefan’s explanation. I come from MATLAB which has really straightforward and intuitive …

---

## [Gradient and update of custom struct with Flux](https://discourse.julialang.org/t/gradient-and-update-of-custom-struct-with-flux/44742)

<div class="topic-metadata">

**Author:** [@Avec](https://discourse.julialang.org/u/Avec)\
**Replies:** 2\
**Last updated:** [August 11, 2020, 7:56pm UTC](https://discourse.julialang.org/t/gradient-and-update-of-custom-struct-with-flux/44742 "2020-08-11T19:56:12Z")

</div>

Hi everyone, I have created struct that I need to optimise with SGD. My struct is using SparseArrays struct tdmat d dv dh s end function tdmat(d::AbstractVector, dv::AbstractVector, dh::AbstractVector…

---

## [DataFrame array subset](https://discourse.julialang.org/t/dataframe-array-subset/44722)

<div class="topic-metadata">

**Author:** [@sriharitn](https://discourse.julialang.org/u/sriharitn)\
**Replies:** 18\
**Last updated:** [August 11, 2020, 5:05pm UTC](https://discourse.julialang.org/t/dataframe-array-subset/44722 "2020-08-11T17:05:54Z")

</div>

I have a DataFrame dfy = DataFrame(a = \[\[1,2,3\],\[4,5,6\],\[7,8,9\]\], b = \[“M”,“F”,“F”\]) 3×2 DataFrame │ Row │ a │ b │ │ │ Array… │ String │ ├─────┼───────────┼────────┤ │ 1 │ \[1, 2, 3\] │ M …

---

## [Compiling a library from a custom module](https://discourse.julialang.org/t/compiling-a-library-from-a-custom-module/44691)

<div class="topic-metadata">

**Author:** [@maximilianpreisinger](https://discourse.julialang.org/u/maximilianpreisinger)\
**Replies:** 2\
**Last updated:** [August 11, 2020, 4:48pm UTC](https://discourse.julialang.org/t/compiling-a-library-from-a-custom-module/44691 "2020-08-11T16:48:44Z")

</div>

Hi there! I hope this is the right place to ask this question. I wrote a custom module “MOD”, and eventually I want to compile this module and its functions into a DLL, which functions I can call from a LabView program…

---

## [Expose multiple modules from a single package](https://discourse.julialang.org/t/expose-multiple-modules-from-a-single-package/44745)

<div class="topic-metadata">

**Author:** [@benninkrs](https://discourse.julialang.org/u/benninkrs)\
**Replies:** 8\
**Last updated:** [August 11, 2020, 4:09pm UTC](https://discourse.julialang.org/t/expose-multiple-modules-from-a-single-package/44745 "2020-08-11T16:09:23Z")

</div>

I have a question that was discussed a few years ago here and here, but those discussions seem to be outdated as none of the solutions given there work for me. Say I have a package MyPackage with a module MyPackage.jl t…

---

## [Chain multiple Chains in Flux](https://discourse.julialang.org/t/chain-multiple-chains-in-flux/44743)

<div class="topic-metadata">

**Author:** [@SubhadityaMukherjee](https://discourse.julialang.org/u/SubhadityaMukherjee)\
**Replies:** 2\
**Last updated:** [August 11, 2020, 3:03pm UTC](https://discourse.julialang.org/t/chain-multiple-chains-in-flux/44743 "2020-08-11T15:03:58Z")

</div>

Hello! Is there any way to Chain multiple chains in Flux? Say for example I want to reformat my model from multiple uses of the same layers with different parameters as follows. function conv\_block(in\_channels, out\_ch…

---

## [Discourse site interaction changed / not working](https://discourse.julialang.org/t/discourse-site-interaction-changed-not-working/44441)

<div class="topic-metadata">

**Author:** [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Replies:** 8\
**Last updated:** [August 11, 2020, 1:20pm UTC](https://discourse.julialang.org/t/discourse-site-interaction-changed-not-working/44441 "2020-08-11T13:20:35Z")

</div>

In the past 2-3 weeks, the user interaction of the Discourse site in my web browser has changed and does not seem to work as expected. Previously I could click on the New topics to get the list, then sort by number of r…

---

## [Best and fastest sources for function information](https://discourse.julialang.org/t/best-and-fastest-sources-for-function-information/44705)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 12\
**Last updated:** [August 11, 2020, 11:20am UTC](https://discourse.julialang.org/t/best-and-fastest-sources-for-function-information/44705 "2020-08-11T11:20:27Z")

</div>

Below are a list of questions I am constantly searching for answers to on Google when coding in Julia. What is the best and fastest way to answer each? What is the syntax for this function? What output should I expect …

---

## [Tables.jl, UpROOT.jl and the speed](https://discourse.julialang.org/t/tables-jl-uproot-jl-and-the-speed/44737)

<div class="topic-metadata">

**Author:** [@misha\_mikhasenko](https://discourse.julialang.org/u/misha_mikhasenko)\
**Replies:** 5\
**Last updated:** [August 11, 2020, 10:26am UTC](https://discourse.julialang.org/t/tables-jl-uproot-jl-and-the-speed/44737 "2020-08-11T10:26:54Z")

</div>

EDITED: the post below shows the problem more clear. it takes 0.16 s to read 4 branches (colunms) and 2400 s when 16 branches (columns) are read Would anyone guess of the origin of such behavior I should be able…

---

## [Splitting Juno Workspace and editor windows](https://discourse.julialang.org/t/splitting-juno-workspace-and-editor-windows/44731)

<div class="topic-metadata">

**Author:** [@musman](https://discourse.julialang.org/u/musman)\
**Replies:** 1\
**Last updated:** [August 11, 2020, 9:51am UTC](https://discourse.julialang.org/t/splitting-juno-workspace-and-editor-windows/44731 "2020-08-11T09:51:30Z")

</div>

Hi, I have been looking is there a way to split Juno screen into two? meaning I want the workspace and REPL to put on 1 screen and text editor on another screen. So for, I have not found any option which can do this for…

---

## [2D array filled with consecutive integers](https://discourse.julialang.org/t/2d-array-filled-with-consecutive-integers/44738)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 1\
**Last updated:** [August 11, 2020, 9:48am UTC](https://discourse.julialang.org/t/2d-array-filled-with-consecutive-integers/44738 "2020-08-11T09:48:43Z")

</div>

I’m trying to learn my way around array API and I need a 2D array filled with consecutive integers for quick sanity tests. I used this array like object: w, h = 4, 3 a = reshape(1:w\*h, w, h) but it doesn’t work in case…

---

## [Converting an expression to a function](https://discourse.julialang.org/t/converting-an-expression-to-a-function/44736)

<div class="topic-metadata">

**Author:** [@benoitseron](https://discourse.julialang.org/u/benoitseron)\
**Replies:** 2\
**Last updated:** [August 11, 2020, 9:24am UTC](https://discourse.julialang.org/t/converting-an-expression-to-a-function/44736 "2020-08-11T09:24:56Z")

</div>

I want to convert mathematica “expressions” into usable functions, for instance, go from the text “Abs\[omega\]” to a function f(omega) = abs(omega). I’ve seen this topic, which is helpful as it gives me a Julia expression…

---

## [CPLEX install in Julia](https://discourse.julialang.org/t/cplex-install-in-julia/44724)

<div class="topic-metadata">

**Author:** [@dty](https://discourse.julialang.org/u/dty)\
**Replies:** 2\
**Last updated:** [August 11, 2020, 8:39am UTC](https://discourse.julialang.org/t/cplex-install-in-julia/44724 "2020-08-11T08:39:50Z")

</div>

First of all, I’ll follow Julia’s instructions CPLEX.jl Add environment statement in ENV\["CPLEX\_STUDIO\_BINARIES"\] = "C:/IBM/CPLEX\_Studio128/cplex/bin/x64\_win64" The error report is as follows ERROR: Failed to precompi…

---

## [Julich - Alpha Numerics Zero](https://discourse.julialang.org/t/julich-alpha-numerics-zero/44730)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 1\
**Last updated:** [August 11, 2020, 7:48am UTC](https://discourse.julialang.org/t/julich-alpha-numerics-zero/44730 "2020-08-11T07:48:31Z")

</div>

Cool project title. Someone tell them to code it in Julia? The objective of this project is to rethink numerical methods on high-performance computers. Traditionally, a lot of effort goes into the design, implementatio…

---

## [Does Julia have something like #ifdef in C++ for conditional compile](https://discourse.julialang.org/t/does-julia-have-something-like-ifdef-in-c-for-conditional-compile/44721)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 3\
**Last updated:** [August 11, 2020, 6:53am UTC](https://discourse.julialang.org/t/does-julia-have-something-like-ifdef-in-c-for-conditional-compile/44721 "2020-08-11T06:53:18Z")

</div>

Is there anything like #ifndef or #if in C++ to ignore some code according to the constant definition. I want to ignore some code for the testing purpose.

---

## [What should one expect from the VSCode linter, now and in the future?](https://discourse.julialang.org/t/what-should-one-expect-from-the-vscode-linter-now-and-in-the-future/44630)

<div class="topic-metadata">

**Author:** [@jonathan-laurent](https://discourse.julialang.org/u/jonathan-laurent)\
**Replies:** 5\
**Last updated:** [August 11, 2020, 6:29am UTC](https://discourse.julialang.org/t/what-should-one-expect-from-the-vscode-linter-now-and-in-the-future/44630 "2020-08-11T06:29:33Z")

</div>

I have been very excited to see the recent progress on the Julia VSCode plugin and I want to thank the people behind it for their great work. I am particularly interested in the linter, which I think could really boost …

---

## [Open file with system's default program](https://discourse.julialang.org/t/open-file-with-systems-default-program/3019)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 4\
**Last updated:** [August 11, 2020, 6:19am UTC](https://discourse.julialang.org/t/open-file-with-systems-default-program/3019 "2020-08-11T06:19:06Z")

</div>

Is there a cross platform way to open a file with the system’s default program, basically simulating a double click on the file’s icon? More specifically, the type of files that will get opened this way is a video file.…

---

## [Error Precompiling SymEngine](https://discourse.julialang.org/t/error-precompiling-symengine/44717)

<div class="topic-metadata">

**Author:** [@Ryan\_Stoner](https://discourse.julialang.org/u/Ryan_Stoner)\
**Replies:** 0\
**Last updated:** [August 11, 2020, 12:10am UTC](https://discourse.julialang.org/t/error-precompiling-symengine/44717 "2020-08-11T00:10:12Z")

</div>

When I try to run SymEngine I get the following error message. Using a mac at the moment. Perhaps related to: https://github.com/symengine/SymEngine.jl/issues/214 ? \[ Info: Precompiling SymEngine \[123dc426-2d89-5057-bba…

---

## [Problem with importing a module after include](https://discourse.julialang.org/t/problem-with-importing-a-module-after-include/44719)

<div class="topic-metadata">

**Author:** [@Stranglet\_A](https://discourse.julialang.org/u/Stranglet_A)\
**Replies:** 5\
**Last updated:** [August 11, 2020, 1:39am UTC](https://discourse.julialang.org/t/problem-with-importing-a-module-after-include/44719 "2020-08-11T01:39:20Z")

</div>

Hi, I am getting this warning after I run include and then import my module So I created a folder with two julia scripts Mymod.jl and test.jl : MyMod.jl contains: module MyMod x=1 end And in test.jl : include("MyMo…

---

## [Static array Julia for Optim.jl](https://discourse.julialang.org/t/static-array-julia-for-optim-jl/44711)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 3\
**Last updated:** [August 11, 2020, 1:07am UTC](https://discourse.julialang.org/t/static-array-julia-for-optim-jl/44711 "2020-08-11T01:07:02Z")

</div>

Hello, I am using Optim.jl for the nonlinear optimization of a set of coefficients (dim \<30). Can I expect some speed-up if I use StaticArrays to compute the gradients, store the coefficients?

---

## [How to concatenate a 2d array to a 3d array](https://discourse.julialang.org/t/how-to-concatenate-a-2d-array-to-a-3d-array/44713)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 2\
**Last updated:** [August 11, 2020, 12:52am UTC](https://discourse.julialang.org/t/how-to-concatenate-a-2d-array-to-a-3d-array/44713 "2020-08-11T00:52:52Z")

</div>

Just trying to add an extra column to check1 (which has 4 rows) for both layers of dim 3, so I figured I could just concatenate it with the 4x2 matrix check2. MWE: Random.seed!(1) check1 = rand(4,3,2) \[:, :, 1\] = 0.236…

---

## [Load error using JLD](https://discourse.julialang.org/t/load-error-using-jld/44704)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 4\
**Last updated:** [August 10, 2020, 11:29pm UTC](https://discourse.julialang.org/t/load-error-using-jld/44704 "2020-08-10T23:29:39Z")

</div>

I have encountered the same problem as the OP at this Stackoverflow link: https://stackoverflow.com/questions/50817008/error-using-load-with-jld. Like for that OP, the load command works for an earlier dataset with the s…

---

## [DifferentialEquations; how to simulate limit stops](https://discourse.julialang.org/t/differentialequations-how-to-simulate-limit-stops/44376)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 10\
**Last updated:** [August 10, 2020, 10:22pm UTC](https://discourse.julialang.org/t/differentialequations-how-to-simulate-limit-stops/44376 "2020-08-10T22:22:17Z")

</div>

I’m trying to simulate a spring mass system in which the mass is constrained by limits stops or walls. There’s a driving force which, if it pushes the mass to one wall or the other, essentially halts the system until th…

---

## [Matrix Formatting in JSON.print()](https://discourse.julialang.org/t/matrix-formatting-in-json-print/44714)

<div class="topic-metadata">

**Author:** [@bdoolittle](https://discourse.julialang.org/u/bdoolittle)\
**Replies:** 0\
**Last updated:** [August 10, 2020, 10:15pm UTC](https://discourse.julialang.org/t/matrix-formatting-in-json-print/44714 "2020-08-10T22:15:15Z")

</div>

I would like to print a JSON structure which includes nicely formed matrices. The goal is for data to be human-readable. Ideally, the dictionary Dict("matrix" =\> \[1 2 3;4 5 6;7 8 9\]) would be printed like, { "mat…

---

## [Adding large matrix, why .+ is not the default?](https://discourse.julialang.org/t/adding-large-matrix-why-is-not-the-default/44708)

<div class="topic-metadata">

**Author:** [@raphaelchinchilla](https://discourse.julialang.org/u/raphaelchinchilla)\
**Replies:** 3\
**Last updated:** [August 10, 2020, 9:10pm UTC](https://discourse.julialang.org/t/adding-large-matrix-why-is-not-the-default/44708 "2020-08-10T21:10:40Z")

</div>

Take three large matrix A, B, C each with 1000x1000 elements. Here is the result for two benchmarks: using broadcasted operator “.+” @benchmark A.=A.+B.+C BenchmarkTools.Trial: memory estimate: 96 bytes allocs e…

---

## [Experience with Baron](https://discourse.julialang.org/t/experience-with-baron/44707)

<div class="topic-metadata">

**Author:** [@mayar](https://discourse.julialang.org/u/mayar)\
**Replies:** 0\
**Last updated:** [August 10, 2020, 8:38pm UTC](https://discourse.julialang.org/t/experience-with-baron/44707 "2020-08-10T20:38:30Z")

</div>

“Baron from the optimization firm” Hello, Since this is a commercial solver that I am considering these days to buy,I would like to know more on the experience with Baron from the optimization firm, especially with jum…

---

## [Meta.parse supports interpolation?](https://discourse.julialang.org/t/meta-parse-supports-interpolation/44677)

<div class="topic-metadata">

**Author:** [@Hawk](https://discourse.julialang.org/u/Hawk)\
**Replies:** 5\
**Last updated:** [August 10, 2020, 4:35pm UTC](https://discourse.julialang.org/t/meta-parse-supports-interpolation/44677 "2020-08-10T16:35:03Z")

</div>

It is confusing for me when I use Meta.parse() function as: Julia\> x = 2 Julia\> Meta.parse(":(:(v = $x))") :($(Expr(:quote,:($(Expr(quote,:(v = 2))))))) In general, an interpolation with single $ in :(:($x)) should not…

---

## [FixYourWorkaround.jl -- Remind yourself to fix your workarounds](https://discourse.julialang.org/t/fixyourworkaround-jl-remind-yourself-to-fix-your-workarounds/44694)

<div class="topic-metadata">

**Author:** [@mattBrzezinski](https://discourse.julialang.org/u/mattBrzezinski)\
**Replies:** 0\
**Last updated:** [August 10, 2020, 3:32pm UTC](https://discourse.julialang.org/t/fixyourworkaround-jl-remind-yourself-to-fix-your-workarounds/44694 "2020-08-10T15:32:10Z")

</div>

Introducing FixYourWorkaround.jl, a small testing utility package to remind you to fix your package dependency workarounds. Motivation behind this package comes from having to support multiple versions of a dependency a…

---

## [Should scalar calculation in Broadcast be "lazy"?](https://discourse.julialang.org/t/should-scalar-calculation-in-broadcast-be-lazy/44664)

<div class="topic-metadata">

**Author:** [@N5N3](https://discourse.julialang.org/u/N5N3)\
**Replies:** 12\
**Last updated:** [August 10, 2020, 3:22pm UTC](https://discourse.julialang.org/t/should-scalar-calculation-in-broadcast-be-lazy/44664 "2020-08-10T15:22:14Z")

</div>

At present, the broadcast in julia is always lazy, no matter the inputs’ axes. I think, at least for numeric calcution, if both the input(s) and output are scalar, we could perform the calculation immediately, as the st…

---

## [Passing too long tuples into CUDA kernel causes an error](https://discourse.julialang.org/t/passing-too-long-tuples-into-cuda-kernel-causes-an-error/44239)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 3\
**Last updated:** [August 10, 2020, 3:02pm UTC](https://discourse.julialang.org/t/passing-too-long-tuples-into-cuda-kernel-causes-an-error/44239 "2020-08-10T15:02:55Z")

</div>

Consider the following code where I create a tuple of structures and pass it into the GPU kernel: import CUDA struct Foo{T} a :: T b :: T end function func(u, foos) N = length(u) function get\_config…

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

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