# Latest

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

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

**Page:** 1504

---

## [How do I forcefully import all functions/macros from my Package into my testing en](https://discourse.julialang.org/t/how-do-i-forcefully-import-all-functions-macros-from-my-package-into-my-testing-en/54529)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 3, 2021, 2:08pm UTC](https://discourse.julialang.org/t/how-do-i-forcefully-import-all-functions-macros-from-my-package-into-my-testing-en/54529 "2021-02-03T14:08:58Z")

</div>

How do I forcefully import all functions/macros from my Package into my testing environment. I currently have this monstrosity at the top of my runtests.jl import AutoActuary: add\_namespace, add\_t\_index, has\_symbol, is\_…

---

## [MLJ Results display error](https://discourse.julialang.org/t/mlj-results-display-error/54532)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 1:49pm UTC](https://discourse.julialang.org/t/mlj-results-display-error/54532 "2021-02-03T13:49:48Z")

</div>

Hi. I have run the first intro example in MLJ (in Jupyter), and it seems to have run OK, but the display of the results seems garbled: evaluate(my\_tree\_model, X, y, resampling=CV(shuffle=true), measure=c…

---

## [Turing model not optimising; unstable ODE solutions](https://discourse.julialang.org/t/turing-model-not-optimising-unstable-ode-solutions/54526)

<div class="topic-metadata">

**Author:** [@PavanChaggar](https://discourse.julialang.org/u/PavanChaggar)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 1:16pm UTC](https://discourse.julialang.org/t/turing-model-not-optimising-unstable-ode-solutions/54526 "2021-02-03T13:16:47Z")

</div>

Hi, I am getting an integration error with my Turing model. I have searched around but haven’t seen anything similar on discourse. The ODE model is set up as follows: using DifferentialEquations, LightGraphs, Random, …

---

## [Markdown extra spaces in Pluto.jl](https://discourse.julialang.org/t/markdown-extra-spaces-in-pluto-jl/54436)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 11:21am UTC](https://discourse.julialang.org/t/markdown-extra-spaces-in-pluto-jl/54436 "2021-02-03T11:21:35Z")

</div>

I want to create a space like the one you just passed. This is done using &nbsp; in markdown. However, when I put &nbsp; inside a md"" string macro or the Markdown.parse("") function in a pluto notebook, I g…

---

## [Registrator complains about \[compat\]. Fixed it. What's next?](https://discourse.julialang.org/t/registrator-complains-about-compat-fixed-it-whats-next/50996)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 25\
**Last updated:** [February 3, 2021, 10:12am UTC](https://discourse.julialang.org/t/registrator-complains-about-compat-fixed-it-whats-next/50996 "2021-02-03T10:12:03Z")

</div>

I’m trying to register a package for the first time. I have never done this before. As you can see, I am very confused. Registrator says The following dependencies do not have a \`\[compat\]\` entry. I fixed that in the P…

---

## [Inconsistance between @NLobjective and @objective](https://discourse.julialang.org/t/inconsistance-between-nlobjective-and-objective/54520)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 9:39am UTC](https://discourse.julialang.org/t/inconsistance-between-nlobjective-and-objective/54520 "2021-02-03T09:39:21Z")

</div>

Let’s consider the following model: model = Model(with\_optimizer(Ipopt.Optimizer)) @variable(model, x \>= 0) @variable(model, y \>= 1) Then the macro @objective can be used both as: @objective(model, Min, x+2\*y) or @o…

---

## [Customize a floating type to display different precisions](https://discourse.julialang.org/t/customize-a-floating-type-to-display-different-precisions/54510)

<div class="topic-metadata">

**Author:** [@Zq\_F](https://discourse.julialang.org/u/Zq_F)\
**Replies:** 3\
**Last updated:** [February 3, 2021, 8:15am UTC](https://discourse.julialang.org/t/customize-a-floating-type-to-display-different-precisions/54510 "2021-02-03T08:15:19Z")

</div>

Customize a floating type to display different precisions Hello, everyone I want to customize a floating type to display three decimal places, such as displaying 3.141 I have used the following sentence before show(i…

---

## [What are the steps to create your own package in Julia?](https://discourse.julialang.org/t/what-are-the-steps-to-create-your-own-package-in-julia/40877)

<div class="topic-metadata">

**Author:** [@rop11](https://discourse.julialang.org/u/rop11)\
**Replies:** 19\
**Last updated:** [February 3, 2021, 7:04am UTC](https://discourse.julialang.org/t/what-are-the-steps-to-create-your-own-package-in-julia/40877 "2021-02-03T07:04:16Z")

</div>

New question on Julia related forum: What are the steps to create your own package in Julia? https://www.stemiac.com/forum/julia-programming/what-are-the-steps-to-create-your-own-package-in-julia/

---

## [Is it normal for \`include\` to take a long time? I have a file, say \`model.jl\` that](https://discourse.julialang.org/t/is-it-normal-for-include-to-take-a-long-time-i-have-a-file-say-model-jl-that/54513)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 3, 2021, 5:12am UTC](https://discourse.julialang.org/t/is-it-normal-for-include-to-take-a-long-time-i-have-a-file-say-model-jl-that/54513 "2021-02-03T05:12:12Z")

</div>

Is it normal for include to take a long time? I have a file, say model.jl that includes only functions and the following header: using DifferentialEquations using Parameters using Gnuplot using CSV using DataFrames usin…

---

## [When designing a macro, what is the best error type to throw for what could be see](https://discourse.julialang.org/t/when-designing-a-macro-what-is-the-best-error-type-to-throw-for-what-could-be-see/54451)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 3\
**Last updated:** [February 3, 2021, 5:09am UTC](https://discourse.julialang.org/t/when-designing-a-macro-what-is-the-best-error-type-to-throw-for-what-could-be-see/54451 "2021-02-03T05:09:19Z")

</div>

When designing a macro, what is the best error type to throw for what could be seen as a “syntax error”? Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appro…

---

## [Keeping track of processes with \`wait=false\`](https://discourse.julialang.org/t/keeping-track-of-processes-with-wait-false/54504)

<div class="topic-metadata">

**Author:** [@cgeoga](https://discourse.julialang.org/u/cgeoga)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 3:06am UTC](https://discourse.julialang.org/t/keeping-track-of-processes-with-wait-false/54504 "2021-02-03T03:06:41Z")

</div>

Hi all— I have a little piece of code that that opens up a file using run(xdg-open $file, wait=false) (removing the inner back ticks for better rendering). I’d really like to work out some way to keep track of these pro…

---

## [Adding my module to path](https://discourse.julialang.org/t/adding-my-module-to-path/54502)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 1:42am UTC](https://discourse.julialang.org/t/adding-my-module-to-path/54502 "2021-02-03T01:42:38Z")

</div>

I created a module MyModule and I am working on developing the test files for it. At the top of the test file, I wrote using MyModule and got an error saying Package MyModule not found in current path. I was able to rect…

---

## [Ugly stacktraces in IJulia in 1.6](https://discourse.julialang.org/t/ugly-stacktraces-in-ijulia-in-1-6/54507)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 0\
**Last updated:** [February 3, 2021, 2:26am UTC](https://discourse.julialang.org/t/ugly-stacktraces-in-ijulia-in-1-6/54507 "2021-02-03T02:26:59Z")

</div>

I wasn’t sure if this is better an IJulia or a Julia (or even Jupyter) issue, so posting here for comments / ideas. The new 1.6 stack traces are beautiful and so much easier to read (thanks!), but because in IJulia they…

---

## [Plotting a decision tree and extracting the split criteria](https://discourse.julialang.org/t/plotting-a-decision-tree-and-extracting-the-split-criteria/54503)

<div class="topic-metadata">

**Author:** [@dataopt](https://discourse.julialang.org/u/dataopt)\
**Replies:** 0\
**Last updated:** [February 3, 2021, 12:46am UTC](https://discourse.julialang.org/t/plotting-a-decision-tree-and-extracting-the-split-criteria/54503 "2021-02-03T00:46:35Z")

</div>

I am new to MLJ coming from R for statistical learning. I have two newbie questions: Is there a way to plot a decision tree? Is there a way to extract the structure of the tree with the split criteria?

---

## [CUDA sum kernels, threads and blocks, complex values](https://discourse.julialang.org/t/cuda-sum-kernels-threads-and-blocks-complex-values/54490)

<div class="topic-metadata">

**Author:** [@ozmaden](https://discourse.julialang.org/u/ozmaden)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 12:32am UTC](https://discourse.julialang.org/t/cuda-sum-kernels-threads-and-blocks-complex-values/54490 "2021-02-03T00:32:43Z")

</div>

Hi there, I was trying to implement a custom sum-dot-product-thingy using CUDA.jl kernels when I stumbled upon this documentation PR. It stems from a discussion had not too long ago here. I probably do not understand so…

---

## [ERROR: ArgumentError: Package ... is required but does not seem to be installed: - Run \`Pkg.instantiate()\` to install all recorded dependencies](https://discourse.julialang.org/t/error-argumenterror-package-is-required-but-does-not-seem-to-be-installed-run-pkg-instantiate-to-install-all-recorded-dependencies/54351)

<div class="topic-metadata">

**Author:** [@hei06j](https://discourse.julialang.org/u/hei06j)\
**Replies:** 9\
**Last updated:** [February 3, 2021, 12:06am UTC](https://discourse.julialang.org/t/error-argumenterror-package-is-required-but-does-not-seem-to-be-installed-run-pkg-instantiate-to-install-all-recorded-dependencies/54351 "2021-02-03T00:06:55Z")

</div>

Hi all, I am struggling to add/use my own package that I was using only a few days ago. so far I have tried a few options and even nuked .julia folder and strated from scratch, but no luck. Another message I get when I …

---

## [How to efficiently find the breaking dependency](https://discourse.julialang.org/t/how-to-efficiently-find-the-breaking-dependency/54497)

<div class="topic-metadata">

**Author:** [@mannydepresso](https://discourse.julialang.org/u/mannydepresso)\
**Replies:** 0\
**Last updated:** [February 2, 2021, 11:38pm UTC](https://discourse.julialang.org/t/how-to-efficiently-find-the-breaking-dependency/54497 "2021-02-02T23:38:18Z")

</div>

Hi! Suppose I have a package A that I wrote myself, and I add it to a separate project environment B. I test A in A by running using Pkg Pkg.activate("A/") Pkg.test("A") and the tests fail. However, if I do the same t…

---

## [I made examples of wrapping jl code from Fortran & C; how generalize?](https://discourse.julialang.org/t/i-made-examples-of-wrapping-jl-code-from-fortran-c-how-generalize/52622)

<div class="topic-metadata">

**Author:** [@barnett567](https://discourse.julialang.org/u/barnett567)\
**Replies:** 6\
**Last updated:** [February 2, 2021, 11:01pm UTC](https://discourse.julialang.org/t/i-made-examples-of-wrapping-jl-code-from-fortran-c-how-generalize/52622 "2021-02-02T23:01:03Z")

</div>

I am interested in calling Julia from Fortran (eg F90), and since I couldn’t find any, I built an example of that which goes through a C wrapper layer; see here: https://github.com/ahbarnett/multilingual-julia It adapt…

---

## [How can I write a neural network using ForwardDiff.jl package?](https://discourse.julialang.org/t/how-can-i-write-a-neural-network-using-forwarddiff-jl-package/54408)

<div class="topic-metadata">

**Author:** [@DeepQ](https://discourse.julialang.org/u/DeepQ)\
**Replies:** 7\
**Last updated:** [February 2, 2021, 9:47pm UTC](https://discourse.julialang.org/t/how-can-i-write-a-neural-network-using-forwarddiff-jl-package/54408 "2021-02-02T21:47:30Z")

</div>

I want to write a neural network using ForwardDiff.jl package but I can’t find any example.

---

## [Say I have an array of symbols \`\[:w, :z, :c\]\` , how can I use it as a sorting ord](https://discourse.julialang.org/t/say-i-have-an-array-of-symbols-w-z-c-how-can-i-use-it-as-a-sorting-ord/54492)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 1\
**Last updated:** [February 2, 2021, 9:30pm UTC](https://discourse.julialang.org/t/say-i-have-an-array-of-symbols-w-z-c-how-can-i-use-it-as-a-sorting-ord/54492 "2021-02-02T21:30:39Z")

</div>

Say that I have an array of Tuples \[(:c, 2), (:z, 2), (:w, 2)\] and I want to sort it such that I get \[(:w, 2), (:z, 2), (:c, 2)\] , i.e. that the symbols are in the same order as in \[:w, :z, :c\] Note that the original po…

---

## [Error broadcasting a function for a custom type](https://discourse.julialang.org/t/error-broadcasting-a-function-for-a-custom-type/54488)

<div class="topic-metadata">

**Author:** [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Replies:** 2\
**Last updated:** [February 2, 2021, 9:14pm UTC](https://discourse.julialang.org/t/error-broadcasting-a-function-for-a-custom-type/54488 "2021-02-02T21:14:37Z")

</div>

In the DaysCount package there is the following function: abstract type DayCount end struct Actual365Fixed \<: DayCount end function yearfrac(startdate, enddate, ::Actual365Fixed) return Dates.value(enddate - st…

---

## [Using \`\<:\`(subtype evaluate-operator) in the Conditional Evaluation (if-else)](https://discourse.julialang.org/t/using-subtype-evaluate-operator-in-the-conditional-evaluation-if-else/54309)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 5\
**Last updated:** [February 2, 2021, 7:07pm UTC](https://discourse.julialang.org/t/using-subtype-evaluate-operator-in-the-conditional-evaluation-if-else/54309 "2021-02-02T19:07:54Z")

</div>

MWE: julia\> a = \[1,2\] 2-element Array{Int64,1}: 1 2 julia\> typeof(a) \<: Array{\<:AbstractArray, 1} false julia\> if typeof(a) \<: Array{\<:AbstractArray, 1} == false println("False!") end julia\> if typeof…

---

## [Precompile errors Makie (AbstractPlotting)](https://discourse.julialang.org/t/precompile-errors-makie-abstractplotting/53810)

<div class="topic-metadata">

**Author:** [@fyzycyst](https://discourse.julialang.org/u/fyzycyst)\
**Replies:** 2\
**Last updated:** [February 2, 2021, 5:48pm UTC](https://discourse.julialang.org/t/precompile-errors-makie-abstractplotting/53810 "2021-02-02T17:48:42Z")

</div>

Attempted to try out Makie, but the precompile fails. I’m including a sample for the AbstractPlotting precompile, but it’s the same for CairoMakie, etc. I know similar problems are reported from time to time, but none of…

---

## [Trying to understand what LoopVectorization does/doesn’t like.If I broadcast-add](https://discourse.julialang.org/t/trying-to-understand-what-loopvectorization-does-doesn-t-like-if-i-broadcast-add/54468)

<div class="topic-metadata">

**Author:** [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Replies:** 3\
**Last updated:** [February 2, 2021, 5:32pm UTC](https://discourse.julialang.org/t/trying-to-understand-what-loopvectorization-does-doesn-t-like-if-i-broadcast-add/54468 "2021-02-02T17:32:18Z")

</div>

Trying to understand what LoopVectorization does/doesn’t like. If I broadcast-add elements of tuples function bcast\_add(x::NTuple{N,T},y::NTuple{N,T}) where {N,T} @avx for i = 1:length(first(x)) x\_i = getin…

---

## [Passing a C struct into Julia](https://discourse.julialang.org/t/passing-a-c-struct-into-julia/43965)

<div class="topic-metadata">

**Author:** [@Vangelis](https://discourse.julialang.org/u/Vangelis)\
**Replies:** 20\
**Last updated:** [February 2, 2021, 5:19pm UTC](https://discourse.julialang.org/t/passing-a-c-struct-into-julia/43965 "2021-02-02T17:19:54Z")

</div>

Dear experts, I am trying to find a way to pass a C struct into a Julia model. Please note that the C struct has at least one array. For example: on the C side: typedef struct { int\* the\_integers; int\* the\_inte…

---

## [How to print human readable byte counts](https://discourse.julialang.org/t/how-to-print-human-readable-byte-counts/31877)

<div class="topic-metadata">

**Author:** [@mleisher](https://discourse.julialang.org/u/mleisher)\
**Replies:** 2\
**Last updated:** [February 2, 2021, 5:19pm UTC](https://discourse.julialang.org/t/how-to-print-human-readable-byte-counts/31877 "2021-02-02T17:19:37Z")

</div>

I came across Java: Formatting byte size to human readable format | Programming.Guide this morning, and having a few minutes, adapted the Java code to Julia: https://www.cs.nmsu.edu/~mleisher/julia/hrbc.jl Being relati…

---

## [Opportunities to get involved with MIT's Intro to Comp. Thinking course in Julia!](https://discourse.julialang.org/t/opportunities-to-get-involved-with-mits-intro-to-comp-thinking-course-in-julia/53992)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [January 26, 2021, 4:14pm UTC](https://discourse.julialang.org/t/opportunities-to-get-involved-with-mits-intro-to-comp-thinking-course-in-julia/53992 "2021-01-26T16:14:52Z")

</div>

Hey folks, as many of you are likely aware, MIT has an Intro to Computational Thinking course taught by @dpsanders and Alan Edelman which ran in the Fall and uses Julia. The course featured folks like Grant Sanderson, Ja…

---

## [Julia SVD results differing from MATLAB](https://discourse.julialang.org/t/julia-svd-results-differing-from-matlab/54151)

<div class="topic-metadata">

**Author:** [@djov5](https://discourse.julialang.org/u/djov5)\
**Replies:** 5\
**Last updated:** [February 2, 2021, 4:34pm UTC](https://discourse.julialang.org/t/julia-svd-results-differing-from-matlab/54151 "2021-02-02T16:34:11Z")

</div>

I’ve been scratching my head about this for some time now and thought of asking to see if anyone has a fix for this. I am converting a code from MATLAB into Julia and it requires the use of svd and eig multiple times. I …

---

## [Why is iterating over an Iterators.drop slower than iterating over the parent?](https://discourse.julialang.org/t/why-is-iterating-over-an-iterators-drop-slower-than-iterating-over-the-parent/54315)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [February 2, 2021, 4:31pm UTC](https://discourse.julialang.org/t/why-is-iterating-over-an-iterators-drop-slower-than-iterating-over-the-parent/54315 "2021-02-02T16:31:21Z")

</div>

Two ways to compute the last element of an iterator itr are: foldl((\_, y) -\> y, itr) first(Iterators.drop(itr, length(itr) - 1)) however, the second seems much slower than the first. I wonder why this is the case? Fo…

---

## [Writing a fast nlp tokenizer in Julia](https://discourse.julialang.org/t/writing-a-fast-nlp-tokenizer-in-julia/54176)

<div class="topic-metadata">

**Author:** [@merckxiaan](https://discourse.julialang.org/u/merckxiaan)\
**Replies:** 12\
**Last updated:** [February 2, 2021, 4:23pm UTC](https://discourse.julialang.org/t/writing-a-fast-nlp-tokenizer-in-julia/54176 "2021-02-02T16:23:46Z")

</div>

Hello everyone, As a learning exercise, I’m interested in writing a byte-pair-encoding (BPE) tokenizer in Julia. The meat of this tokenizer would be to find the most occuring pairs of tokens (initially these are just t…

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

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