# Latest

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

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

**Page:** 1627

---

## [How to make if in the objective function](https://discourse.julialang.org/t/how-to-make-if-in-the-objective-function/46859)

<div class="topic-metadata">

**Author:** [@sogrbilja](https://discourse.julialang.org/u/sogrbilja)\
**Replies:** 14\
**Last updated:** [September 19, 2020, 10:53am UTC](https://discourse.julialang.org/t/how-to-make-if-in-the-objective-function/46859 "2020-09-19T10:53:22Z")

</div>

Here is the function @objective( prmx, Min, sum( sum( UNITS\[u\_k\]\["cap"\] - sum( PRODAMOUNT\[op\_k, u\_k, t\] \* \_PRODUCTs…

---

## [How keyword arguments kwfuncs work](https://discourse.julialang.org/t/how-keyword-arguments-kwfuncs-work/46840)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 1\
**Last updated:** [September 19, 2020, 7:52am UTC](https://discourse.julialang.org/t/how-keyword-arguments-kwfuncs-work/46840 "2020-09-19T07:52:10Z")

</div>

A collegue who was contributing to the internals of Zygote wanted to understand what was going on with https://github.com/FluxML/Zygote.jl/blob/ed366f32c0f520567526040d9f8acaf0d83613c3/src/compiler/chainrules.jl#L33 an…

---

## [\[VegaLite\] How to convert a string to VL spec?](https://discourse.julialang.org/t/vegalite-how-to-convert-a-string-to-vl-spec/46767)

<div class="topic-metadata">

**Author:** [@peters](https://discourse.julialang.org/u/peters)\
**Replies:** 6\
**Last updated:** [September 19, 2020, 7:45am UTC](https://discourse.julialang.org/t/vegalite-how-to-convert-a-string-to-vl-spec/46767 "2020-09-19T07:45:15Z")

</div>

I have a string variable specifying a VL plot. How can I use the string variable with @vl\_str in order to plot a graph? e.g. julia\> s “{"$schema":"\[https://vega.github.io/schema/vega-lite/v5.json\\\](https://vega.github.…

---

## [Towards improving community diversity](https://discourse.julialang.org/t/towards-improving-community-diversity/46717)

<div class="topic-metadata">

**Author:** [@joaoui1](https://discourse.julialang.org/u/joaoui1)\
**Replies:** 72\
**Last updated:** [September 19, 2020, 5:10am UTC](https://discourse.julialang.org/t/towards-improving-community-diversity/46717 "2020-09-19T05:10:23Z")

</div>

I think Julia needs to focus a little more on diversity and to that end encouraging women to create Julia Ladies/JLadies/not sure which name groups would be great!

---

## [Vscode visual component](https://discourse.julialang.org/t/vscode-visual-component/46893)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 0\
**Last updated:** [September 19, 2020, 4:23am UTC](https://discourse.julialang.org/t/vscode-visual-component/46893 "2020-09-19T04:23:07Z")

</div>

Wonder if this will benefit the vscode extension

---

## [Recommended Database connection pool pkg to pair with LibPQ?](https://discourse.julialang.org/t/recommended-database-connection-pool-pkg-to-pair-with-libpq/46890)

<div class="topic-metadata">

**Author:** [@andre1sk](https://discourse.julialang.org/u/andre1sk)\
**Replies:** 0\
**Last updated:** [September 19, 2020, 3:00am UTC](https://discourse.julialang.org/t/recommended-database-connection-pool-pkg-to-pair-with-libpq/46890 "2020-09-19T03:00:49Z")

</div>

What would be the recommended db connection pool pkg to pair with LibPQ?

---

## [How do I export strings to CSV file？](https://discourse.julialang.org/t/how-do-i-export-strings-to-csv-file/46833)

<div class="topic-metadata">

**Author:** [@zlq178](https://discourse.julialang.org/u/zlq178)\
**Replies:** 8\
**Last updated:** [September 19, 2020, 1:41am UTC](https://discourse.julialang.org/t/how-do-i-export-strings-to-csv-file/46833 "2020-09-19T01:41:08Z")

</div>

using CSV,DataFrames data1=DataFrame(CSV.File(“D:\\\\documemt\\\\julia\\\\aaa.csv”)) a=\[1,1,2,2,1,2\] index=findall(in(1),a) Data=data1.colum1\[index\] CSV.write(“BBBB.csv”,Data) The contents of the aaa. CSV file are as follows …

---

## [Avoid allocations in the naive discrete Fourier transform](https://discourse.julialang.org/t/avoid-allocations-in-the-naive-discrete-fourier-transform/46847)

<div class="topic-metadata">

**Author:** [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Replies:** 12\
**Last updated:** [September 19, 2020, 12:23am UTC](https://discourse.julialang.org/t/avoid-allocations-in-the-naive-discrete-fourier-transform/46847 "2020-09-19T00:23:38Z")

</div>

Hello, I try to implemente a straight forwared discrete Fourier transform abut I do not see what variables are allocated in the intermediate steps. For my undertanding it is a generator expression and should get the resu…

---

## [Determine the log level](https://discourse.julialang.org/t/determine-the-log-level/46718)

<div class="topic-metadata">

**Author:** [@lyonsquark](https://discourse.julialang.org/u/lyonsquark)\
**Replies:** 6\
**Last updated:** [September 18, 2020, 11:25pm UTC](https://discourse.julialang.org/t/determine-the-log-level/46718 "2020-09-18T23:25:46Z")

</div>

Hi - Is there a way to determine the current logging level in code? For example, I would like to do extra work (e.g. maybe record timing information) only if @debug logging is turned on for that module/file. E.g… if log…

---

## [PlotlyJS: Blink connection trouble on WSL2](https://discourse.julialang.org/t/plotlyjs-blink-connection-trouble-on-wsl2/46881)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 1\
**Last updated:** [September 18, 2020, 9:52pm UTC](https://discourse.julialang.org/t/plotlyjs-blink-connection-trouble-on-wsl2/46881 "2020-09-18T21:52:04Z")

</div>

Running this on WSL2. Graphics works (for instance, Firefox comes up no problem). Trying to use PlotlyJS I get this error message: julia\> include("klein\_gordon\_var.jl") …

---

## [Model updating: Using previously computed posterior as prior after new data acquisition](https://discourse.julialang.org/t/model-updating-using-previously-computed-posterior-as-prior-after-new-data-acquisition/46869)

<div class="topic-metadata">

**Author:** [@Camilo1704](https://discourse.julialang.org/u/Camilo1704)\
**Replies:** 3\
**Last updated:** [September 18, 2020, 8:38pm UTC](https://discourse.julialang.org/t/model-updating-using-previously-computed-posterior-as-prior-after-new-data-acquisition/46869 "2020-09-18T20:38:51Z")

</div>

Hi guys! I’m working with some models using a bayesian framework (Soss and Turing). I was wondering, once I have already contrasted my prior with the data and obtained the posterior distribution, how to add more data and…

---

## [Why the results of my model remain the same even if the objective value changes?](https://discourse.julialang.org/t/why-the-results-of-my-model-remain-the-same-even-if-the-objective-value-changes/46817)

<div class="topic-metadata">

**Author:** [@sogrbilja](https://discourse.julialang.org/u/sogrbilja)\
**Replies:** 5\
**Last updated:** [September 18, 2020, 7:56pm UTC](https://discourse.julialang.org/t/why-the-results-of-my-model-remain-the-same-even-if-the-objective-value-changes/46817 "2020-09-18T19:56:22Z")

</div>

I am struggling with modeling so much, for me what is logical is not so in the model. The next thing is how to force the system to change results by changing the objective value, so let me explain. I see we can only hav…

---

## [MLJ confusion\_matrix() - MethodError](https://discourse.julialang.org/t/mlj-confusion-matrix-methoderror/46856)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 5\
**Last updated:** [September 18, 2020, 7:39pm UTC](https://discourse.julialang.org/t/mlj-confusion-matrix-methoderror/46856 "2020-09-18T19:39:33Z")

</div>

I am trying to make a RF predictor of a categorical variable (3 levels), and then look at how well the model works. I mostly followed the steps in the Getting Started section of the docs - here’s a MWE: using DataFrames…

---

## [SharedMATLABEngine.jl - Connect the Julia REPL to an open MATLAB session](https://discourse.julialang.org/t/sharedmatlabengine-jl-connect-the-julia-repl-to-an-open-matlab-session/46865)

<div class="topic-metadata">

**Author:** [@jonniedie](https://discourse.julialang.org/u/jonniedie)\
**Replies:** 0\
**Last updated:** [September 18, 2020, 7:15pm UTC](https://discourse.julialang.org/t/sharedmatlabengine-jl-connect-the-julia-repl-to-an-open-matlab-session/46865 "2020-09-18T19:15:57Z")

</div>

SharedMATLABEngine.jl MATLAB.jl is a great tool for interoperability between MATLAB and Julia, but it has one problem: the C MATLAB Engine API it uses doesn’t expose the ability to connect to open MATLAB sessions the wa…

---

## [Subtyping parametric composite types](https://discourse.julialang.org/t/subtyping-parametric-composite-types/9944)

<div class="topic-metadata">

**Author:** [@cdacosta](https://discourse.julialang.org/u/cdacosta)\
**Replies:** 12\
**Last updated:** [September 18, 2020, 7:35pm UTC](https://discourse.julialang.org/t/subtyping-parametric-composite-types/9944 "2020-09-18T19:35:00Z")

</div>

I am struggling to understand how I can reuse methods which have been defined as composite parametric types. I am working with the LinearMaps.jl package which defines a FunctionMap as struct FunctionMap{T,F1,F2} \<: Line…

---

## [Struct Parametric struct with type constrains in Union](https://discourse.julialang.org/t/struct-parametric-struct-with-type-constrains-in-union/46854)

<div class="topic-metadata">

**Author:** [@efokken](https://discourse.julialang.org/u/efokken)\
**Replies:** 4\
**Last updated:** [September 18, 2020, 7:20pm UTC](https://discourse.julialang.org/t/struct-parametric-struct-with-type-constrains-in-union/46854 "2020-09-18T19:20:20Z")

</div>

Hi there! I would like to use a struct of the following form: struct thing{T\<:Function} p::Union{Float64,T} someother\_member end When I create an instance like this: thing(x-\>2,"other") it works well. But …

---

## [Failed to precompile LibSndFile](https://discourse.julialang.org/t/failed-to-precompile-libsndfile/46830)

<div class="topic-metadata">

**Author:** [@kogad](https://discourse.julialang.org/u/kogad)\
**Replies:** 7\
**Last updated:** [September 18, 2020, 7:13pm UTC](https://discourse.julialang.org/t/failed-to-precompile-libsndfile/46830 "2020-09-18T19:13:28Z")

</div>

I’m trying to use LibSndFile.jl, but I get a following error: julia\> using LibSndFile \[ Info: Precompiling LibSndFile \[b13ce0c6-77b0-50c6-a2db-140568b8d1a5\] ERROR: LoadError: LibSndFile not properly installed. Please ru…

---

## [Half Vectorization](https://discourse.julialang.org/t/half-vectorization/7399)

<div class="topic-metadata">

**Author:** [@slakeon](https://discourse.julialang.org/u/slakeon)\
**Replies:** 10\
**Last updated:** [September 18, 2020, 7:07pm UTC](https://discourse.julialang.org/t/half-vectorization/7399 "2020-09-18T19:07:50Z")

</div>

Is there an algorithm that can do half vectorization, the vech (here) or generates elimination of duplication matrices (here)? I’m trying to recover only the unique elements of a covariance matrix in vector form.

---

## [Is there a way to manually override highlighting in Atom/Juno?](https://discourse.julialang.org/t/is-there-a-way-to-manually-override-highlighting-in-atom-juno/46863)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 0\
**Last updated:** [September 18, 2020, 6:59pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-manually-override-highlighting-in-atom-juno/46863 "2020-09-18T18:59:57Z")

</div>

Sometimes it would be nice to give highlighting rules to things like comments to facilitate: code review minimal presentation Regarding comments, is there a way to achieve the following affect:

---

## [Non-friendly documentation](https://discourse.julialang.org/t/non-friendly-documentation/38109)

<div class="topic-metadata">

**Author:** [@Veenty](https://discourse.julialang.org/u/Veenty)\
**Replies:** 136\
**Last updated:** [September 18, 2020, 6:10pm UTC](https://discourse.julialang.org/t/non-friendly-documentation/38109 "2020-09-18T18:10:46Z")

</div>

Is it my idea or many libraries assume a huge amount of pre-knowledge in their documentation. For what I have seen until now, many libraries that are wrappers or reimplementation of other libraries in other languages th…

---

## [Broadcasting and function composition (circ)](https://discourse.julialang.org/t/broadcasting-and-function-composition-circ/46748)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 10\
**Last updated:** [September 18, 2020, 5:13pm UTC](https://discourse.julialang.org/t/broadcasting-and-function-composition-circ/46748 "2020-09-18T17:13:28Z")

</div>

How does one easily compose and broadcast? For example, x = randn(100,10) mapslices(cumprod ∘ exp, x; dims=1) fails because we need to broadcast exp. One workaround is to do the following x = randn(100,10) expdot(v)…

---

## [Delay in processing](https://discourse.julialang.org/t/delay-in-processing/46853)

<div class="topic-metadata">

**Author:** [@rjmoses](https://discourse.julialang.org/u/rjmoses)\
**Replies:** 7\
**Last updated:** [September 18, 2020, 4:55pm UTC](https://discourse.julialang.org/t/delay-in-processing/46853 "2020-09-18T16:55:41Z")

</div>

I have a routine that has about a 3 second delay in it for some reason. Essentially, the code goes: Do some initialization stuff, create three arrays of 1920 elements each (two Char, 1 structure) and initialize them …

---

## [Fading two images together](https://discourse.julialang.org/t/fading-two-images-together/46843)

<div class="topic-metadata">

**Author:** [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Replies:** 7\
**Last updated:** [September 18, 2020, 4:28pm UTC](https://discourse.julialang.org/t/fading-two-images-together/46843 "2020-09-18T16:28:48Z")

</div>

I’m trying make a video that includes a transition where one image fades into a different image. I would like to do this programmatically (as opposed to using GIMP or video software) so that the result is repeatable and …

---

## [How to handle dependencies?](https://discourse.julialang.org/t/how-to-handle-dependencies/46849)

<div class="topic-metadata">

**Author:** [@pascal-mueller](https://discourse.julialang.org/u/pascal-mueller)\
**Replies:** 2\
**Last updated:** [September 18, 2020, 4:09pm UTC](https://discourse.julialang.org/t/how-to-handle-dependencies/46849 "2020-09-18T16:09:23Z")

</div>

Hi, so imagen I have a file at /home/pascal/projects/foo/main.jl and in that file I want to create code that plots some kind of histogram. For that, I want to use histogram() from the DistPlots package. I have a REPL se…

---

## [Permissions for Registrator in JuliaHub](https://discourse.julialang.org/t/permissions-for-registrator-in-juliahub/46852)

<div class="topic-metadata">

**Author:** [@NicholasWMRitchie](https://discourse.julialang.org/u/NicholasWMRitchie)\
**Replies:** 0\
**Last updated:** [September 18, 2020, 3:08pm UTC](https://discourse.julialang.org/t/permissions-for-registrator-in-juliahub/46852 "2020-09-18T15:08:19Z")

</div>

Why does the Registrator need to have write access to every repository in my organization? I can understand read access for the stated purpose “to determine whether you are a contributor of this package.” I can’t im…

---

## [Scope behaviors in Atom (Juno)](https://discourse.julialang.org/t/scope-behaviors-in-atom-juno/46706)

<div class="topic-metadata">

**Author:** [@goodluck](https://discourse.julialang.org/u/goodluck)\
**Replies:** 20\
**Last updated:** [September 18, 2020, 2:43pm UTC](https://discourse.julialang.org/t/scope-behaviors-in-atom-juno/46706 "2020-09-18T14:43:55Z")

</div>

in Scope of Variables · The Julia Language it says What does this code do? Hint: it’s a trick question. The answer is “it depends.” If this code is entered interactively, it behaves the same way it does in a function bod…

---

## [MeshIO, BasicGeometry, AbstractPlotting -- type mismatchs and incompatibility](https://discourse.julialang.org/t/meshio-basicgeometry-abstractplotting-type-mismatchs-and-incompatibility/46850)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 0\
**Last updated:** [September 18, 2020, 2:24pm UTC](https://discourse.julialang.org/t/meshio-basicgeometry-abstractplotting-type-mismatchs-and-incompatibility/46850 "2020-09-18T14:24:28Z")

</div>

I had some Julia code that loaded in OBJ format files into Meshes and then plotted them with mesh! or wireframe! using Makie, etc. I stored the obj after loading in a struct where the obj mesh type had to be set to: Geo…

---

## [Is there a CLI tool?](https://discourse.julialang.org/t/is-there-a-cli-tool/46828)

<div class="topic-metadata">

**Author:** [@pascal-mueller](https://discourse.julialang.org/u/pascal-mueller)\
**Replies:** 17\
**Last updated:** [September 18, 2020, 1:57pm UTC](https://discourse.julialang.org/t/is-there-a-cli-tool/46828 "2020-09-18T13:57:46Z")

</div>

Hi, so I’m trying to figure out a proper workflow for Julia. Apparently, a lot of people use Juypter Notebooks or the Julia REPL directly in the terminal to code. I have no idea how either one of those options is a vali…

---

## [Julian implementation of FFT with arbitrary precision](https://discourse.julialang.org/t/julian-implementation-of-fft-with-arbitrary-precision/46842)

<div class="topic-metadata">

**Author:** [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Replies:** 3\
**Last updated:** [September 18, 2020, 1:35pm UTC](https://discourse.julialang.org/t/julian-implementation-of-fft-with-arbitrary-precision/46842 "2020-09-18T13:35:33Z")

</div>

Hello, I wonder if anyone knows a package which implements a fft in multiple dimensions for arbitrary precision number (BigFloats). I have not found any but I could imagine it exists.

---

## [Running Julia in the Cloud](https://discourse.julialang.org/t/running-julia-in-the-cloud/46839)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 1\
**Last updated:** [September 18, 2020, 12:42pm UTC](https://discourse.julialang.org/t/running-julia-in-the-cloud/46839 "2020-09-18T12:42:35Z")

</div>

Hey everyone, I wanted to ask if you know any sites on which I can easily run Julia code on any machine that is faster than my 5 year old Laptop? I need to run something a little bit more computationally intensive and I…

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

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