# Latest

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

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

**Page:** 1104

---

## [Force specialization on kwargs](https://discourse.julialang.org/t/force-specialization-on-kwargs/34789)

<div class="topic-metadata">

**Author:** [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Replies:** 15\
**Last updated:** [March 7, 2022, 1:46pm UTC](https://discourse.julialang.org/t/force-specialization-on-kwargs/34789 "2022-03-07T13:46:53Z")

</div>

If I have a function like this: f\_vararg(varargs::Int...) = tuple(varargs...) I can force specialization on varargs with either of the following: g\_vararg(varargs::Vararg{Int, N}) where {N} = tuple(varargs...) h\_vara…

---

## [Accessing a column value from DataFrameRow allocates](https://discourse.julialang.org/t/accessing-a-column-value-from-dataframerow-allocates/77481)

<div class="topic-metadata">

**Author:** [@Hawkes](https://discourse.julialang.org/u/Hawkes)\
**Replies:** 10\
**Last updated:** [March 7, 2022, 1:44pm UTC](https://discourse.julialang.org/t/accessing-a-column-value-from-dataframerow-allocates/77481 "2022-03-07T13:44:54Z")

</div>

Hi, I am a bit puzzled that the following code allocates. According to the docs, a DataFrameRow should be a view and this type of field setting in a Dict should not allocate IMHO. Am I using DataFrames wrong? NamedTuple…

---

## [Another Type Problem with ForwardDiff : TypeError: in typeassert, expected Float64, got a value of type ForwardDiff.Dual{Nothing, Float64, 1}](https://discourse.julialang.org/t/another-type-problem-with-forwarddiff-typeerror-in-typeassert-expected-float64-got-a-value-of-type-forwarddiff-dual-nothing-float64-1/77363)

<div class="topic-metadata">

**Author:** [@Michael](https://discourse.julialang.org/u/Michael)\
**Replies:** 2\
**Last updated:** [March 7, 2022, 1:43pm UTC](https://discourse.julialang.org/t/another-type-problem-with-forwarddiff-typeerror-in-typeassert-expected-float64-got-a-value-of-type-forwarddiff-dual-nothing-float64-1/77363 "2022-03-07T13:43:14Z")

</div>

Hi everyone! I have a small question concerning the Forwarddiff package. I coded basically the flow function of a differential equation, and I can differentiate it with respect to the initial condition, but cannot take…

---

## [Zygote and TimerOutputs, derivative of timed function](https://discourse.julialang.org/t/zygote-and-timeroutputs-derivative-of-timed-function/44234)

<div class="topic-metadata">

**Author:** [@racinmat](https://discourse.julialang.org/u/racinmat)\
**Replies:** 3\
**Last updated:** [March 7, 2022, 12:45pm UTC](https://discourse.julialang.org/t/zygote-and-timeroutputs-derivative-of-timed-function/44234 "2022-03-07T12:45:00Z")

</div>

Hi, sometimes I want to benchmark my code on my neural networks, especially their forward pass, using TimerOutputs.jl, but I don’t want to comment out all this when calculating gradients. Currently it’s crashing, not b…

---

## [Is there any R , python api available for flux.jl?](https://discourse.julialang.org/t/is-there-any-r-python-api-available-for-flux-jl/51236)

<div class="topic-metadata">

**Author:** [@Ravinder\_Ram](https://discourse.julialang.org/u/Ravinder_Ram)\
**Replies:** 3\
**Last updated:** [March 7, 2022, 12:41pm UTC](https://discourse.julialang.org/t/is-there-any-r-python-api-available-for-flux-jl/51236 "2022-03-07T12:41:18Z")

</div>

like dash, tensorflow, xgboost, lightgbm… have interface with R, python why R, python interface not available for flux.jl?

---

## [Make this more efficient?](https://discourse.julialang.org/t/make-this-more-efficient/77104)

<div class="topic-metadata">

**Author:** [@r0b0ty](https://discourse.julialang.org/u/r0b0ty)\
**Replies:** 11\
**Last updated:** [March 7, 2022, 12:37pm UTC](https://discourse.julialang.org/t/make-this-more-efficient/77104 "2022-03-07T12:37:52Z")

</div>

Hello, all. I have a DataFrame column, df.polygons, with strings of ten numbers separated by commas as shown below julia\> df.polygons 400000-element Vector{String}: “79,8,79.09999999999999,8,79.09999999999999,7.9,79…

---

## [Easiest way to convert between integer and hex](https://discourse.julialang.org/t/easiest-way-to-convert-between-integer-and-hex/20473)

<div class="topic-metadata">

**Author:** [@srikar\_sastry](https://discourse.julialang.org/u/srikar_sastry)\
**Replies:** 7\
**Last updated:** [March 7, 2022, 10:09am UTC](https://discourse.julialang.org/t/easiest-way-to-convert-between-integer-and-hex/20473 "2022-03-07T10:09:44Z")

</div>

Hello, MATLAB provides dec2hex, hex2dec and other such functions to go between different number representations. After searching on the web and Julia documentation, I couldn’t easily get hits on these type of questions …

---

## [Include all files from folder](https://discourse.julialang.org/t/include-all-files-from-folder/77475)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 3\
**Last updated:** [March 7, 2022, 11:21am UTC](https://discourse.julialang.org/t/include-all-files-from-folder/77475 "2022-03-07T11:21:41Z")

</div>

Hello, I can import a file into the Julia environment with include("path/file.jl"). Is it possible to include all the files present in “path”? include("path/\*.jl") does not work… Thanks

---

## [Ensure solution stays at zero](https://discourse.julialang.org/t/ensure-solution-stays-at-zero/77482)

<div class="topic-metadata">

**Author:** [@colebrookson](https://discourse.julialang.org/u/colebrookson)\
**Replies:** 0\
**Last updated:** [March 6, 2022, 9:57pm UTC](https://discourse.julialang.org/t/ensure-solution-stays-at-zero/77482 "2022-03-06T21:57:50Z")

</div>

I’m using a VectorContinuousCallback to perform an “extinction event”, where for my large 50-equation system, if the values of one species (i’m modeling a bunch of interacting species) goes below 10e-30 then the value of…

---

## [JuMP Hessian sparcity issues. Registered function's Hessians. atan2 issue](https://discourse.julialang.org/t/jump-hessian-sparcity-issues-registered-functions-hessians-atan2-issue/76342)

<div class="topic-metadata">

**Author:** [@a6a3uh](https://discourse.julialang.org/u/a6a3uh)\
**Replies:** 6\
**Last updated:** [March 7, 2022, 5:43am UTC](https://discourse.julialang.org/t/jump-hessian-sparcity-issues-registered-functions-hessians-atan2-issue/76342 "2022-03-07T05:43:28Z")

</div>

So there are a bunch of observations so far which I want to get some insights into. I’m describing issues with nonlinear solver btw. As soon as I’m using atan with 2 arguments JuMP seems registers this function for me (…

---

## [Julia on Google Colab: Free GPU-Accelerated Shareable Notebooks](https://discourse.julialang.org/t/julia-on-google-colab-free-gpu-accelerated-shareable-notebooks/15319)

<div class="topic-metadata">

**Author:** [@jekbradbury](https://discourse.julialang.org/u/jekbradbury)\
**Replies:** 58\
**Last updated:** [March 7, 2022, 4:26am UTC](https://discourse.julialang.org/t/julia-on-google-colab-free-gpu-accelerated-shareable-notebooks/15319 "2022-03-07T04:26:21Z")

</div>

(Disclosure: While I work for Google, this is not an official Google product or announcement.) tl;dr: For Julia on Colab with GPUs, first open this notebook and run the cell (takes ~15-20 minutes), then open this one to…

---

## [Julia shoudn't silently activate a project associated to a previous Julia version](https://discourse.julialang.org/t/julia-shoudnt-silently-activate-a-project-associated-to-a-previous-julia-version/77480)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 3\
**Last updated:** [March 7, 2022, 3:17am UTC](https://discourse.julialang.org/t/julia-shoudnt-silently-activate-a-project-associated-to-a-previous-julia-version/77480 "2022-03-07T03:17:51Z")

</div>

I have just tested Julia1.8, the first minor version after the changes in Manifest.toml of 1.7 and got a bit surprised that it activated my 1.7-made project without even a warning. I admit I didn’t follow the discussion…

---

## [Convert DataFrameRow to Vector](https://discourse.julialang.org/t/convert-dataframerow-to-vector/77390)

<div class="topic-metadata">

**Author:** [@Frankiewaang](https://discourse.julialang.org/u/Frankiewaang)\
**Replies:** 6\
**Last updated:** [March 6, 2022, 8:55pm UTC](https://discourse.julialang.org/t/convert-dataframerow-to-vector/77390 "2022-03-06T20:55:49Z")

</div>

Hi Guys, I got a super easy question: when I want to convert a DataFrameRow with the same type to a Vector, I saw from some thread to use: Vector(data\[1,:\]) #or convert(Vector, data\[1,:\]) but some times I got the er…

---

## [Why is julia slowest here?](https://discourse.julialang.org/t/why-is-julia-slowest-here/77479)

<div class="topic-metadata">

**Author:** [@matic\_lauko](https://discourse.julialang.org/u/matic_lauko)\
**Replies:** 4\
**Last updated:** [March 6, 2022, 7:47pm UTC](https://discourse.julialang.org/t/why-is-julia-slowest-here/77479 "2022-03-06T19:47:20Z")

</div>

https://github.com/niklas-heer/speed-comparison I tried to convince my friend that Julia is faster than python, he googled it and found this(above), why is it that python is faster than Julia, and even JS. Is it somethi…

---

## [Confusing julia behavior. @everywhere macro changes the scope of local variables to global](https://discourse.julialang.org/t/confusing-julia-behavior-everywhere-macro-changes-the-scope-of-local-variables-to-global/77436)

<div class="topic-metadata">

**Author:** [@singularity](https://discourse.julialang.org/u/singularity)\
**Replies:** 5\
**Last updated:** [March 6, 2022, 7:18pm UTC](https://discourse.julialang.org/t/confusing-julia-behavior-everywhere-macro-changes-the-scope-of-local-variables-to-global/77436 "2022-03-06T19:18:03Z")

</div>

I just encountered a very confusing julia behavior. I always thought that variables defined inside a function remain local to that function. But in the following example, the scope changes. I define a simple function as…

---

## [For loop in Julia](https://discourse.julialang.org/t/for-loop-in-julia/77468)

<div class="topic-metadata">

**Author:** [@Eric.O](https://discourse.julialang.org/u/Eric.O)\
**Replies:** 2\
**Last updated:** [March 6, 2022, 5:27pm UTC](https://discourse.julialang.org/t/for-loop-in-julia/77468 "2022-03-06T17:27:47Z")

</div>

Kindly help me out. Rewrite using a for loop @constraint(model, X^2 + y^2 - d\[1\]-2X-2y \<= -2) @constraint(model, X^2 + y^2 - d\[2\]-2X-8y \<= -17) @constraint(model, X^2 + y^2 - d\[3\]-8X-8y \<= -32)

---

## [Create named array in Julia](https://discourse.julialang.org/t/create-named-array-in-julia/77476)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 3\
**Last updated:** [March 6, 2022, 4:15pm UTC](https://discourse.julialang.org/t/create-named-array-in-julia/77476 "2022-03-06T16:15:29Z")

</div>

Hello, I am generating an array with some numeric parameters that then I pass to a function as: parms = \[1,2,3,4,5\] function x!(pt) μ, κ, δ, ω, η = p return( ((μ+κ)\*(δ+ω))^(1/η) ) end x(parms) It would be usef…

---

## [Reinforcement learning and e.g. deep kernel learning, and status of Julia for such AI](https://discourse.julialang.org/t/reinforcement-learning-and-e-g-deep-kernel-learning-and-status-of-julia-for-such-ai/63343)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 3\
**Last updated:** [March 5, 2022, 9:44am UTC](https://discourse.julialang.org/t/reinforcement-learning-and-e-g-deep-kernel-learning-and-status-of-julia-for-such-ai/63343 "2022-03-05T09:44:35Z")

</div>

I was scanning the paper, i.e. https://www.sciencedirect.com/science/article/pii/S0004370221000862 Reward is enough 3.3. Reward is enough for social intelligence 3.4. Reward is enough for language 3.5. Reward is …

---

## [Associate professor position in TCS (deadline: April 1, 2022)](https://discourse.julialang.org/t/associate-professor-position-in-tcs-deadline-april-1-2022/77461)

<div class="topic-metadata">

**Author:** [@DOT](https://discourse.julialang.org/u/DOT)\
**Replies:** 0\
**Last updated:** [March 6, 2022, 7:39am UTC](https://discourse.julialang.org/t/associate-professor-position-in-tcs-deadline-april-1-2022/77461 "2022-03-06T07:39:24Z")

</div>

The Computer Science Institute of the University of Tartu, Estonia, is looking to hire an associate professor. https://ut.ee/en/job-offer/associate-professor-theoretical-computer-science The position is in Theoretical …

---

## [Measuring time of only a part of a for-loop](https://discourse.julialang.org/t/measuring-time-of-only-a-part-of-a-for-loop/77445)

<div class="topic-metadata">

**Author:** [@Handam](https://discourse.julialang.org/u/Handam)\
**Replies:** 4\
**Last updated:** [March 6, 2022, 7:07am UTC](https://discourse.julialang.org/t/measuring-time-of-only-a-part-of-a-for-loop/77445 "2022-03-06T07:07:13Z")

</div>

Hi, is there a way to the following: for i in 1:100 if i == 2 @time begin elseif i == 88 end end end Obviously this code does not work, but I think it makes it clear what I want to achieve: measuring the time t…

---

## [Optimizing using objective with an integral in it](https://discourse.julialang.org/t/optimizing-using-objective-with-an-integral-in-it/77162)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 5\
**Last updated:** [March 5, 2022, 11:05pm UTC](https://discourse.julialang.org/t/optimizing-using-objective-with-an-integral-in-it/77162 "2022-03-05T23:05:41Z")

</div>

I’m new to JuMP and I’d like to minimize a function that has an integral in it. Here’s an example f(y) = \\int\_0^y y dy - y. Of course, this is just f(y)=(1/2)y^2-y which is minimized at y=1, but this is just a minimal ex…

---

## [How to check if field in a structure has defined default value?](https://discourse.julialang.org/t/how-to-check-if-field-in-a-structure-has-defined-default-value/77449)

<div class="topic-metadata">

**Author:** [@sz1992](https://discourse.julialang.org/u/sz1992)\
**Replies:** 3\
**Last updated:** [March 6, 2022, 12:23am UTC](https://discourse.julialang.org/t/how-to-check-if-field-in-a-structure-has-defined-default-value/77449 "2022-03-06T00:23:24Z")

</div>

Hi, let’s take this structure Base.@kwdef mutable struct js1 name::String id::Int32 = 16 end Is there a way to check and find out that field id has default value? As an folow up question, is there a way to f…

---

## [Help with excessive, unpredictable GC time from string allocations](https://discourse.julialang.org/t/help-with-excessive-unpredictable-gc-time-from-string-allocations/77334)

<div class="topic-metadata">

**Author:** [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Replies:** 12\
**Last updated:** [March 5, 2022, 10:49pm UTC](https://discourse.julialang.org/t/help-with-excessive-unpredictable-gc-time-from-string-allocations/77334 "2022-03-05T22:49:24Z")

</div>

I’ve been having a hell of a time with some performance disasters when loading a large number of strings from a file. I am hitting this in my rewrite of a parquet reader and was caught rather by surprise, because despit…

---

## [What kind of distribution should I use for binary variable and others](https://discourse.julialang.org/t/what-kind-of-distribution-should-i-use-for-binary-variable-and-others/77446)

<div class="topic-metadata">

**Author:** [@RickandMortyforever](https://discourse.julialang.org/u/RickandMortyforever)\
**Replies:** 1\
**Last updated:** [March 5, 2022, 9:40pm UTC](https://discourse.julialang.org/t/what-kind-of-distribution-should-i-use-for-binary-variable-and-others/77446 "2022-03-05T21:40:24Z")

</div>

Hi, Guys. I have a question about building linear model I’ve read some examples about linear model with continuos predictors. But I don’t know how to set prior distributions on the binary(boolean) or categorcal or ord…

---

## [Problem with the Tuple type](https://discourse.julialang.org/t/problem-with-the-tuple-type/77458)

<div class="topic-metadata">

**Author:** [@david16correa](https://discourse.julialang.org/u/david16correa)\
**Replies:** 4\
**Last updated:** [March 5, 2022, 9:31pm UTC](https://discourse.julialang.org/t/problem-with-the-tuple-type/77458 "2022-03-05T21:31:57Z")

</div>

Hi! I’m new to this forum, though not to Julia. I have a question. Recently I tried to build a function meant to accept as input only vectors of n-tuples (without specifying n). For example, consider the following: X …

---

## [Too late for Makie name change?](https://discourse.julialang.org/t/too-late-for-makie-name-change/76979)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 9\
**Last updated:** [March 5, 2022, 8:59pm UTC](https://discourse.julialang.org/t/too-late-for-makie-name-change/76979 "2022-03-05T20:59:01Z")

</div>

I think most new Julia users start plotting with Plots.jl because the name makes sense. Any chance of reviving this old plea?

---

## [How to print the values of constraints](https://discourse.julialang.org/t/how-to-print-the-values-of-constraints/40040)

<div class="topic-metadata">

**Author:** [@Vondoe79](https://discourse.julialang.org/u/Vondoe79)\
**Replies:** 12\
**Last updated:** [July 19, 2020, 5:16am UTC](https://discourse.julialang.org/t/how-to-print-the-values-of-constraints/40040 "2020-07-19T05:16:50Z")

</div>

Hello team, I would like to print the values of the constraints(disT, cosT, & deaTH) of my model below. I used the following immediate commands, but it is not working. I am using Julia v0.6.4. I shall be grateful for yo…

---

## [Surface plots not respecting \`axis\` options in multiple plots](https://discourse.julialang.org/t/surface-plots-not-respecting-axis-options-in-multiple-plots/77448)

<div class="topic-metadata">

**Author:** [@amit1](https://discourse.julialang.org/u/amit1)\
**Replies:** 0\
**Last updated:** [March 5, 2022, 6:47pm UTC](https://discourse.julialang.org/t/surface-plots-not-respecting-axis-options-in-multiple-plots/77448 "2022-03-05T18:47:27Z")

</div>

Giving axis=(\[\], false) during multiple surface plots does not turn off the axis, as opposed to simple line plots, where it does. using Plots plotlyjs() xt = collect(-50:50) yt = collect(-50:50) p1t = surface(@. x^2 + …

---

## [Any guides on designing an interface?](https://discourse.julialang.org/t/any-guides-on-designing-an-interface/77173)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 3\
**Last updated:** [March 5, 2022, 7:37pm UTC](https://discourse.julialang.org/t/any-guides-on-designing-an-interface/77173 "2022-03-05T19:37:36Z")

</div>

I sometimes read things like how the Pkg.jl developers have thought long about how the API/Interface should look. The problem seems clear: “Make a useful interface”, but I don’t have any clue on how it can be approached.…

---

## [Logging: symbol evaluation under the hood](https://discourse.julialang.org/t/logging-symbol-evaluation-under-the-hood/77399)

<div class="topic-metadata">

**Author:** [@FedeClaudi](https://discourse.julialang.org/u/FedeClaudi)\
**Replies:** 4\
**Last updated:** [March 5, 2022, 6:56pm UTC](https://discourse.julialang.org/t/logging-symbol-evaluation-under-the-hood/77399 "2022-03-05T18:56:38Z")

</div>

Hey everyone, As mentioned in other posts, I’m working on a package called Term.jl that does a bunch of pretty terminal stuff like printing formatted error messages: One of the features I’d like to add is formatted …

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

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