Should I turn on/off repeatedly to reflect changes of currently developing...
Hi, I’m developing my own packages. While developing my packages, I have to turn off Julia REPL and turn on again to reflect changes of the packages, which takes too long time. As in docs of...
View ArticleAllocation seem high for such a simple function?
minimumby(f, itr) = itr[argmin(map(f, itr))] @time minimumby(x->x^2, [-2, 1, 2, 3, 4]) I get 0.044858 seconds (48.96 k allocations: 2.505 MiB) This is quite slow and a lot of allocations But if I...
View ArticleRevise.jl and PackageCompiler.jl are not compatible?
This is an extension of the original question about Revise.jl. I found that Revise.jl doesn’t work when using PackageCompiler.jl as reported here. While compiling packages, even Revise.jl was not...
View ArticleVegaLite plot two lines and plot over
I am new with Vega-lite. Would you help me, just plot any two random lines on the one figure? Can I plot figure over another figure? something like @vlplot!() Thank you. 2 posts - 2 participants Read...
View ArticleHelp understanding an anonymous function
I am reviewing someone else’s code and came across this anonymous functions. Could you please help me understand: (1) when it is executed and how it is called, and (2) the syntax why there is...
View ArticleOpenGL/GLFW error building GLMakie
Hello, I wanted to give a try to Makie but I got the following error while trying to install it: (@v1.5) pkg> build GLMakie Building ModernGL → `~/.julia/packages/ModernGL/rVuW2/deps/build.log`...
View ArticleWhat is Ref?
I was trying to do something like this: x = in.([1,2], [1,3,4]) (BTW, what really want is an array of all the items that are in array 1 AND array 2. Is a broadcasted in the best way to do that ? )...
View ArticleProblems when comparing Int16 and Int64
Hello, why did this happen? julia> Int16(200) == 200 true julia> Int16(200) !== 200 true 3 posts - 2 participants Read full topic
View ArticleCapture call environment in Weave.jl?
I have some code that computes a bunch of statistics and I would like to compile all of those statistics into a report. I could manually construct such a report.html file by printing plots and data to...
View ArticleVegaLite, "description" doesn't work
Would you help me? How can I add a title to a figure? I’ve tried “description” - it didn’t work. Thank you in advance. 2 posts - 2 participants Read full topic
View ArticleIntegration of function with discontinuities given as vector elements with...
I want to integrate a function f, which has discontinuities at the positions given as vector elements x[i] (the length of the vector and its values depends on the particular data set). I know the...
View ArticleNo REPL in Atom anymore
Hey guys! I have been using Julia on Atom for a while now. This week I had to run a C shell file, therefore I installed ubuntu and followed a tutorial kinda blind to give it some permissions (I know,...
View ArticleAny way to add outer while loops programmatically?
I have never come across this need before. I think maybe with meta-programming it is possible, but I have never done that before. I have a function which takes an integer input nknots. For every...
View ArticleIs there something equivalent to deparse(substitute(x)) in Julia?
Dear all, coming from R, I used to use deparse(substitute(x)) to get the name of an object x as a string. Is there anything similar in Julia? Thanks in advance! 2 posts - 2 participants Read full topic
View ArticlePkg.juilalang.org unresponsive?
I am attempting to update my packages on Julia 1.5.1 and it tells me that it cannot contact pkg.julialang.org/registries. Messing around with curl pkg.julialang.org/registries, I receive the...
View ArticleRelease next version of registered packages
I recently registered a package via Registrator.jl. However, I don’t know how to update and control the version of releases. I’d like to update version (e.g., v0.2.2 for the newest commit), but it...
View ArticleToo small legend box?
Hello! I have never tried this issue before: Why doesn’t it generate a suitable box around the labels? Using Plots in Julia 1.5 Kind regards 1 post - 1 participant Read full topic
View ArticleChecking if variable is a type of number
If I want to check if a variable is a number what is a succinct way to do this? For example I can do something like: if typeof(x) == Int64 || typeof(x) == Float64 #do something else But the above...
View ArticleHeatmap: Assign colors to discrete values
Hi, I want to plot a 2D array with heatmap. The array consists of 1s, 2s and 3s. Now I want to assign each value a color, e.g. 1: black, 2: green, 3: blue. I just can’t figure out how I can do that. 3...
View ArticleHow to use `@atomic` with CUDA?
I am trying to get atomic to work. I am trying to produce an MWE so the code by itself doesn’t make any sense. I have a buffer which I am trying to add 1.0 for every thread in block that gets run....
View Article