# Latest

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

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

**Page:** 1332

---

## [Ploints not appearing in 3D scatter](https://discourse.julialang.org/t/ploints-not-appearing-in-3d-scatter/64622)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 2\
**Last updated:** [July 14, 2021, 10:31am UTC](https://discourse.julialang.org/t/ploints-not-appearing-in-3d-scatter/64622 "2021-07-14T10:31:00Z")

</div>

Hi, Here is a little MNWE (non-working…) using GLMakie r = randn(3,10) fig = Figure() axe = Axis3(fig\[1,1\]) scatter!(axe,r,markersize=20) display(fig) #scatter(r,markersize=20) Running this (Julia 1.6) I get a win…

---

## [Structural subtyping](https://discourse.julialang.org/t/structural-subtyping/64354)

<div class="topic-metadata">

**Author:** [@marvinvanaalst](https://discourse.julialang.org/u/marvinvanaalst)\
**Replies:** 36\
**Last updated:** [July 14, 2021, 9:54am UTC](https://discourse.julialang.org/t/structural-subtyping/64354 "2021-07-14T09:54:29Z")

</div>

Hey guys, I just ran into a problem where I had a runtime issue where some code tried to iterate over a non-iterable type and then I ran into the definition in the standard library. struct Enumerate{I} itr::I end …

---

## [Code\_llvm and and code\_native should return their output](https://discourse.julialang.org/t/code-llvm-and-and-code-native-should-return-their-output/64581)

<div class="topic-metadata">

**Author:** [@Luapulu](https://discourse.julialang.org/u/Luapulu)\
**Replies:** 9\
**Last updated:** [July 14, 2021, 9:46am UTC](https://discourse.julialang.org/t/code-llvm-and-and-code-native-should-return-their-output/64581 "2021-07-14T09:46:07Z")

</div>

As it stands code\_typed returns its output, but code\_llvm and code\_native return Nothing and instead print their output to an io stream. I would like to propose that all three have no side effects and return some kind of…

---

## [Makie - Makie crashes](https://discourse.julialang.org/t/makie-makie-crashes/64569)

<div class="topic-metadata">

**Author:** [@stroebel](https://discourse.julialang.org/u/stroebel)\
**Replies:** 4\
**Last updated:** [July 14, 2021, 9:27am UTC](https://discourse.julialang.org/t/makie-makie-crashes/64569 "2021-07-14T09:27:54Z")

</div>

I am trying to explore using Makie for some interactive applications and I have a hurdle that I am not sure how to get over. When following the tutorial for Schelling’s Segregation model on the Agents.jl page, Makie just…

---

## [How to evaluate a JuMP model given a candidate solution?](https://discourse.julialang.org/t/how-to-evaluate-a-jump-model-given-a-candidate-solution/64555)

<div class="topic-metadata">

**Author:** [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Replies:** 5\
**Last updated:** [July 14, 2021, 8:58am UTC](https://discourse.julialang.org/t/how-to-evaluate-a-jump-model-given-a-candidate-solution/64555 "2021-07-14T08:58:04Z")

</div>

Supposing I have built an optimization model in JuMP, how can I evaluate its objective with a candidate solution? This solution may be obtained manually or from other tools. That is, how to get objective(x) if I have a t…

---

## [Passing arguments to julia functions](https://discourse.julialang.org/t/passing-arguments-to-julia-functions/64335)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 16\
**Last updated:** [July 14, 2021, 8:17am UTC](https://discourse.julialang.org/t/passing-arguments-to-julia-functions/64335 "2021-07-14T08:17:15Z")

</div>

Former Matlab user here, still discovering new things about type stability and multiple dispatch… Currently working on a private package involving mostly linear algebra, I tried to follow the philosophy of julia’s multi…

---

## [How to add a constraint with neural network in a JuMP (PowerModels) model](https://discourse.julialang.org/t/how-to-add-a-constraint-with-neural-network-in-a-jump-powermodels-model/64593)

<div class="topic-metadata">

**Author:** [@oli1119](https://discourse.julialang.org/u/oli1119)\
**Replies:** 4\
**Last updated:** [July 14, 2021, 8:14am UTC](https://discourse.julialang.org/t/how-to-add-a-constraint-with-neural-network-in-a-jump-powermodels-model/64593 "2021-07-14T08:14:16Z")

</div>

Hello, I want to create a constraint: a variable var1 is equal to the output of a torch artificial neural network whose input is another variable var2. ------- This following function is my ann prediction (the ANN has …

---

## [Choose random numbers according to certain math rule](https://discourse.julialang.org/t/choose-random-numbers-according-to-certain-math-rule/64611)

<div class="topic-metadata">

**Author:** [@maoc](https://discourse.julialang.org/u/maoc)\
**Replies:** 4\
**Last updated:** [July 14, 2021, 7:02am UTC](https://discourse.julialang.org/t/choose-random-numbers-according-to-certain-math-rule/64611 "2021-07-14T07:02:01Z")

</div>

How do I choose certain numbers that fulfill a certain relationship between them? The simplest case, for example: choose a and b positive real numbers such that a+b = 20. Something more complicated, for example: how to c…

---

## [Optimization and Modelingtoolkit](https://discourse.julialang.org/t/optimization-and-modelingtoolkit/64483)

<div class="topic-metadata">

**Author:** [@juliascrub](https://discourse.julialang.org/u/juliascrub)\
**Replies:** 7\
**Last updated:** [July 14, 2021, 3:02am UTC](https://discourse.julialang.org/t/optimization-and-modelingtoolkit/64483 "2021-07-14T03:02:51Z")

</div>

Note: I am brand new to Julia and system modeling in general so I dont really have any idea of what I am doing haha. Ive got a simple voltage divider system (my intended model is more complex but I figured Id start smal…

---

## [Create hard links in Julia - Is there another way than via external command run()?](https://discourse.julialang.org/t/create-hard-links-in-julia-is-there-another-way-than-via-external-command-run/12908)

<div class="topic-metadata">

**Author:** [@oniter](https://discourse.julialang.org/u/oniter)\
**Replies:** 1\
**Last updated:** [July 14, 2021, 1:46am UTC](https://discourse.julialang.org/t/create-hard-links-in-julia-is-there-another-way-than-via-external-command-run/12908 "2021-07-14T01:46:50Z")

</div>

Hi all! Is there a Julia function/way to create a hard link to a file like the ln command under linux? In the moment I only can do that via the run() cmd. I didn’t find anything in the Docs besides symlink(). As alwa…

---

## [Methods for deploying documentation](https://discourse.julialang.org/t/methods-for-deploying-documentation/64607)

<div class="topic-metadata">

**Author:** [@orome](https://discourse.julialang.org/u/orome)\
**Replies:** 3\
**Last updated:** [July 13, 2021, 11:37pm UTC](https://discourse.julialang.org/t/methods-for-deploying-documentation/64607 "2021-07-13T23:37:47Z")

</div>

I’m confused about the necessary steps to deploy documentation. The documentation seems to describe two (overlapping?) methods: Run Documenter.deploydocs() locally to push docs to a specified remote repo. Use CI to tri…

---

## [Backing up or Syncing the artifact directory](https://discourse.julialang.org/t/backing-up-or-syncing-the-artifact-directory/64457)

<div class="topic-metadata">

**Author:** [@mbee](https://discourse.julialang.org/u/mbee)\
**Replies:** 4\
**Last updated:** [July 13, 2021, 10:21pm UTC](https://discourse.julialang.org/t/backing-up-or-syncing-the-artifact-directory/64457 "2021-07-13T22:21:52Z")

</div>

From a use case point of view this is a beginner question, but I think it is better answered here: I have a portable Windows ‘installation’ of Julia at v:/bin/julia, including v:/bin/julia/.julia/artifacts. I am synchro…

---

## [Documenter.makedocs not tracking changes to code](https://discourse.julialang.org/t/documenter-makedocs-not-tracking-changes-to-code/64606)

<div class="topic-metadata">

**Author:** [@orome](https://discourse.julialang.org/u/orome)\
**Replies:** 1\
**Last updated:** [July 13, 2021, 10:00pm UTC](https://discourse.julialang.org/t/documenter-makedocs-not-tracking-changes-to-code/64606 "2021-07-13T22:00:48Z")

</div>

:blush: See below, I forgot Revise! I don’t understand what’s happening hen I use Documenter.makedocs() to create documentation for my package. I’ve performed the following steps: Initialize a template for document ge…

---

## [Does the GC respond based on memory pressure?](https://discourse.julialang.org/t/does-the-gc-respond-based-on-memory-pressure/64592)

<div class="topic-metadata">

**Author:** [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Replies:** 3\
**Last updated:** [July 13, 2021, 8:52pm UTC](https://discourse.julialang.org/t/does-the-gc-respond-based-on-memory-pressure/64592 "2021-07-13T20:52:50Z")

</div>

I.e. is it more or less aggressive depending on what the OS tells it about available memory? Or does it do the same things regardless of the memory pressure. I’m asking because I’m not sure how to communicate that memory…

---

## [How do I get the current Pkg.status() on a project under development?](https://discourse.julialang.org/t/how-do-i-get-the-current-pkg-status-on-a-project-under-development/64602)

<div class="topic-metadata">

**Author:** [@orome](https://discourse.julialang.org/u/orome)\
**Replies:** 0\
**Last updated:** [July 13, 2021, 8:38pm UTC](https://discourse.julialang.org/t/how-do-i-get-the-current-pkg-status-on-a-project-under-development/64602 "2021-07-13T20:38:51Z")

</div>

If I dev ..path/to/MyProject and then using Revise and using MyProject my REPL session tracks any changes I make to the code, and test MyProject does too. But status does not report the latest version (and perhaps more) …

---

## [What packages exist for creating CLIs?](https://discourse.julialang.org/t/what-packages-exist-for-creating-clis/64577)

<div class="topic-metadata">

**Author:** [@orome](https://discourse.julialang.org/u/orome)\
**Replies:** 6\
**Last updated:** [July 13, 2021, 8:11pm UTC](https://discourse.julialang.org/t/what-packages-exist-for-creating-clis/64577 "2021-07-13T20:11:59Z")

</div>

I’m looking for a package to implement a CLI in Julia but all I can find is ArgParse, which takes a pretty complicated and old fished approach (based, I assume on the antiquated Python’s argparse). Is there something mo…

---

## [Memory allocation with function passed as arguments](https://discourse.julialang.org/t/memory-allocation-with-function-passed-as-arguments/64575)

<div class="topic-metadata">

**Author:** [@aaraujo71](https://discourse.julialang.org/u/aaraujo71)\
**Replies:** 4\
**Last updated:** [July 13, 2021, 7:15pm UTC](https://discourse.julialang.org/t/memory-allocation-with-function-passed-as-arguments/64575 "2021-07-13T19:15:00Z")

</div>

When I call test() twice after compiling code fn = (x -\> 2\*exp(x), x -\> 2\*sin(x)) function test\_calc(x, fn1, fn2) @. x = x + fn1(x) + fn2(x) end function test() A = Float64.(collect(1:10)) @time test\_calc(…

---

## [Zygote: Mutating arrays is not supported (small example)](https://discourse.julialang.org/t/zygote-mutating-arrays-is-not-supported-small-example/64595)

<div class="topic-metadata">

**Author:** [@gianmariomanca](https://discourse.julialang.org/u/gianmariomanca)\
**Replies:** 3\
**Last updated:** [July 13, 2021, 6:57pm UTC](https://discourse.julialang.org/t/zygote-mutating-arrays-is-not-supported-small-example/64595 "2021-07-13T18:57:33Z")

</div>

A small educational example: using Zygote using ForwardDiff Let’s define a simple gaussian (sampled at integer coordinates) x = -20:1.0:20 f2(xf) = 1000.0 .\* exp.(-1.25 .\* (x .- xf).^2) And a simple center of mass co…

---

## [Wait for whichever task is first](https://discourse.julialang.org/t/wait-for-whichever-task-is-first/64588)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 4\
**Last updated:** [July 13, 2021, 4:55pm UTC](https://discourse.julialang.org/t/wait-for-whichever-task-is-first/64588 "2021-07-13T16:55:52Z")

</div>

Hi all, does someone know a function which takes two Tasks (or Futures) and waits until one of them becomes available, cancels the other and returns the result? best, Stephan

---

## [Memory allocation inconsistency (again...)](https://discourse.julialang.org/t/memory-allocation-inconsistency-again/64538)

<div class="topic-metadata">

**Author:** [@aaraujo71](https://discourse.julialang.org/u/aaraujo71)\
**Replies:** 14\
**Last updated:** [July 13, 2021, 3:02pm UTC](https://discourse.julialang.org/t/memory-allocation-inconsistency-again/64538 "2021-07-13T15:02:25Z")

</div>

When I run the following struct Test x :: Array{Float64, 1} y :: Array{Float64, 1} end function test() var = Test(\[1, 2\], \[1, 2\]) @time @. var.x = var.y - var.x/var.y^2 @time @. var.x = var.y - var…

---

## [Available fonts in Luxor.jl](https://discourse.julialang.org/t/available-fonts-in-luxor-jl/64576)

<div class="topic-metadata">

**Author:** [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)\
**Replies:** 1\
**Last updated:** [July 13, 2021, 2:58pm UTC](https://discourse.julialang.org/t/available-fonts-in-luxor-jl/64576 "2021-07-13T14:58:16Z")

</div>

What are the available fonts in Luxor that can be used cross-platform? How can I make a package using Luxor that provides the same text results on different platforms? Any help is appreciated.

---

## [Using eval and a macro with \`$\`](https://discourse.julialang.org/t/using-eval-and-a-macro-with/64570)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 2\
**Last updated:** [July 13, 2021, 1:47pm UTC](https://discourse.julialang.org/t/using-eval-and-a-macro-with/64570 "2021-07-13T13:47:55Z")

</div>

I’ve been working on a macro which uses $ in a special way. But for certain tests, I need to use @eval or eval. Here is a very stupid MWE showin the problem, roughly julia\> macro with\_dollar(x) if x isa Expr &…

---

## [Deactivate logging message locally](https://discourse.julialang.org/t/deactivate-logging-message-locally/64493)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 3\
**Last updated:** [July 13, 2021, 1:39pm UTC](https://discourse.julialang.org/t/deactivate-logging-message-locally/64493 "2021-07-13T13:39:07Z")

</div>

I currently have a struct whose constructor logs some messages when called, using @info and potentially @warn. This is useful to me when I need to check in the log what parameters I actually used in some of my computatio…

---

## [Precompilation, environments, and \`Distributed\` computing](https://discourse.julialang.org/t/precompilation-environments-and-distributed-computing/22431)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 1\
**Last updated:** [July 13, 2021, 1:02pm UTC](https://discourse.julialang.org/t/precompilation-environments-and-distributed-computing/22431 "2021-07-13T13:02:38Z")

</div>

I’m using Distributed.jl to run simulations in parallel from a Jupyter Notebook, and my simulations are performed using a local repo SimModels (I have not yet made it a module) which pmaps various models/simulations to e…

---

## [Boost the performance of partition 1:n into equivalence classes](https://discourse.julialang.org/t/boost-the-performance-of-partition-1-n-into-equivalence-classes/64564)

<div class="topic-metadata">

**Author:** [@Thomas](https://discourse.julialang.org/u/Thomas)\
**Replies:** 0\
**Last updated:** [July 13, 2021, 12:55pm UTC](https://discourse.julialang.org/t/boost-the-performance-of-partition-1-n-into-equivalence-classes/64564 "2021-07-13T12:55:13Z")

</div>

I am trying to speed up the function that make partition of 1:n into equivalence classes according to boolfn. I need the partition to be sorted, so using SimplePartition.jl or DataStructures.jl may not be optimized (sinc…

---

## [Website via Franklin.jl from Pluto.jl notebooks](https://discourse.julialang.org/t/website-via-franklin-jl-from-pluto-jl-notebooks/55703)

<div class="topic-metadata">

**Author:** [@Stefan\_Bringuier](https://discourse.julialang.org/u/Stefan_Bringuier)\
**Replies:** 6\
**Last updated:** [July 13, 2021, 12:25pm UTC](https://discourse.julialang.org/t/website-via-franklin-jl-from-pluto-jl-notebooks/55703 "2021-07-13T12:25:08Z")

</div>

I have a collection of Pluto.jl notebooks that I’ve been putting together for solving science problems using SymPy.jl. The collection of notebooks is a git repo with a Project.toml and Manifest.toml. I want to turn these…

---

## [Enso language and IDE](https://discourse.julialang.org/t/enso-language-and-ide/64522)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 6\
**Last updated:** [July 13, 2021, 10:27am UTC](https://discourse.julialang.org/t/enso-language-and-ide/64522 "2021-07-13T10:27:35Z")

</div>

Stumbled onto this: https://enso.org/ Seeing the website I was pretty impressed – only for my enthusiasm to be curbed upon watching the teaser video at Introducing Enso | Build your data workflows in minutes, not weeks.…

---

## [SymPy coeff() different behavior depending on how it is called](https://discourse.julialang.org/t/sympy-coeff-different-behavior-depending-on-how-it-is-called/64549)

<div class="topic-metadata">

**Author:** [@hsgg](https://discourse.julialang.org/u/hsgg)\
**Replies:** 2\
**Last updated:** [July 13, 2021, 10:25am UTC](https://discourse.julialang.org/t/sympy-coeff-different-behavior-depending-on-how-it-is-called/64549 "2021-07-13T10:25:15Z")

</div>

I am trying to get the coefficients from several SymPy expressions. Since there are a lot of different combinations, I’d like to loop over them with a variable n. However that fails when n=-1. Here is an example, where t…

---

## [Iterable type signature?](https://discourse.julialang.org/t/iterable-type-signature/64550)

<div class="topic-metadata">

**Author:** [@robsmith11](https://discourse.julialang.org/u/robsmith11)\
**Replies:** 8\
**Last updated:** [July 13, 2021, 9:52am UTC](https://discourse.julialang.org/t/iterable-type-signature/64550 "2021-07-13T09:52:18Z")

</div>

Say I have a function that iterates over some values (e.g., vector, range, iterator): function f(xs) for x in xs println(x) end end Can I give it a type signature that indicates the function requires xs to be i…

---

## [Is it possible to unnormalise data in Flux.jl?](https://discourse.julialang.org/t/is-it-possible-to-unnormalise-data-in-flux-jl/64404)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 6\
**Last updated:** [July 13, 2021, 9:25am UTC](https://discourse.julialang.org/t/is-it-possible-to-unnormalise-data-in-flux-jl/64404 "2021-07-13T09:25:26Z")

</div>

Hi, I’ve seen a convenient normalisation function in Flux.jl, Flux.normalise. However, what if I want to unnormalise data (recover the original data)? Is there such functionality in Flux.jl? Thanks.

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

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