# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=117

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

**Page:** 118

---

## [The One Billion Row Challenge](https://discourse.julialang.org/t/the-one-billion-row-challenge/109534)

<div class="topic-metadata">

**Author:** [@3j5a](https://discourse.julialang.org/u/3j5a)\
**Replies:** 29\
**Last updated:** [October 30, 2024, 12:58pm UTC](https://discourse.julialang.org/t/the-one-billion-row-challenge/109534 "2024-10-30T12:58:21Z")

</div>

There’s been a challenge in Java community that generated a considerable amount of interest I’d say: The One Billion Row Challenge “A fun exploration of how quickly 1B rows from a text file can be aggregated with Java”. …

---

## [What are "Verbosity logging macros?"](https://discourse.julialang.org/t/what-are-verbosity-logging-macros/121791)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 15\
**Last updated:** [October 30, 2024, 12:32pm UTC](https://discourse.julialang.org/t/what-are-verbosity-logging-macros/121791 "2024-10-30T12:32:56Z")

</div>

I am getting this warning: ┌ KiteUtils │ ┌ Warning: Verbosity logging macros are deprecated as they are not compatible with juliac-compiled programs │ │ caller = ip:0x0 │ └ @ Core :-1 └ But what are “Verbosity l…

---

## [GLMakie with github CI](https://discourse.julialang.org/t/glmakie-with-github-ci/106440)

<div class="topic-metadata">

**Author:** [@rwillcox](https://discourse.julialang.org/u/rwillcox)\
**Replies:** 4\
**Last updated:** [October 30, 2024, 10:42am UTC](https://discourse.julialang.org/t/glmakie-with-github-ci/106440 "2024-10-30T10:42:15Z")

</div>

Hi new Julia user here, hoping this is the right community to help answer my question. I’m having issues with GLMakie and my github CI yaml. I’m aware there’s a bit of discussion about this elsewhere online, but haven’t…

---

## [How to convert a cup array to a gpu array](https://discourse.julialang.org/t/how-to-convert-a-cup-array-to-a-gpu-array/121983)

<div class="topic-metadata">

**Author:** [@Yaozhong\_Liu](https://discourse.julialang.org/u/Yaozhong_Liu)\
**Replies:** 3\
**Last updated:** [October 30, 2024, 8:10am UTC](https://discourse.julialang.org/t/how-to-convert-a-cup-array-to-a-gpu-array/121983 "2024-10-30T08:10:20Z")

</div>

Hi. I know how to create a gpu array, but has no clue how to convert an initialized array to a gpu array in a julia file rather than the julia prompt. I tried code like this: # In a julia file A = \[1.0, 2.0, 3.0\] |\> g…

---

## [Compiled binary hangs on Windows when receiving SIGABRT](https://discourse.julialang.org/t/compiled-binary-hangs-on-windows-when-receiving-sigabrt/121982)

<div class="topic-metadata">

**Author:** [@jsjie](https://discourse.julialang.org/u/jsjie)\
**Replies:** 0\
**Last updated:** [October 30, 2024, 7:34am UTC](https://discourse.julialang.org/t/compiled-binary-hangs-on-windows-when-receiving-sigabrt/121982 "2024-10-30T07:34:09Z")

</div>

The binary is compiled with julia 1.9.4. The following two problems both lead to hanging: Cannot protect page @0000000000000000 of size 1048576 to 0x4 (err 0x1e7) \[12024\] signal (22): SIGABRT in expression starting at …

---

## [Implementation of AND with the if statement](https://discourse.julialang.org/t/implementation-of-and-with-the-if-statement/121777)

<div class="topic-metadata">

**Author:** [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)\
**Replies:** 5\
**Last updated:** [October 30, 2024, 6:22am UTC](https://discourse.julialang.org/t/implementation-of-and-with-the-if-statement/121777 "2024-10-30T06:22:41Z")

</div>

Hello, I want to implement (h \>= 1) && (h \<= 99) with an if statement. Is it possible? Thank you.

---

## [Juliaup failing with time out](https://discourse.julialang.org/t/juliaup-failing-with-time-out/121970)

<div class="topic-metadata">

**Author:** [@screw\_dog](https://discourse.julialang.org/u/screw_dog)\
**Replies:** 1\
**Last updated:** [October 30, 2024, 3:47am UTC](https://discourse.julialang.org/t/juliaup-failing-with-time-out/121970 "2024-10-30T03:47:46Z")

</div>

I’m attempting to update to 1.11.1 on Linux but juliaup keeps timing out when trying to contact https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.1-linux-x86\_64.tar.gz Just checking if there is maintenanc…

---

## [Optimizing a puzzle from the Balatro game: discarding part of a poker hand to get a pair](https://discourse.julialang.org/t/optimizing-a-puzzle-from-the-balatro-game-discarding-part-of-a-poker-hand-to-get-a-pair/121912)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 14\
**Last updated:** [October 30, 2024, 12:55am UTC](https://discourse.julialang.org/t/optimizing-a-puzzle-from-the-balatro-game-discarding-part-of-a-poker-hand-to-get-a-pair/121912 "2024-10-30T00:55:22Z")

</div>

Interesting problem from Balatro, from a hand of 8 without any pairs, if you discard n and draw n from the remaining deck of 44 cards. What’s the optimum n to maximize your chance of obtaining at least a pair? I am sure…

---

## [10x faster sortperm()](https://discourse.julialang.org/t/10x-faster-sortperm/93026)

<div class="topic-metadata">

**Author:** [@LSchwerdt](https://discourse.julialang.org/u/LSchwerdt)\
**Replies:** 10\
**Last updated:** [October 29, 2024, 8:59pm UTC](https://discourse.julialang.org/t/10x-faster-sortperm/93026 "2024-10-29T20:59:31Z")

</div>

Motivated by LilithHafner s work to add radix sorting to Julia 1.9 and the resulting performance improvements of sort(), I did some tests to see if sortperm() could be sped up as well. To test this, I implemented diffe…

---

## [Can callable structs subtype Function? Should they?](https://discourse.julialang.org/t/can-callable-structs-subtype-function-should-they/121909)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 10\
**Last updated:** [October 29, 2024, 8:36pm UTC](https://discourse.julialang.org/t/can-callable-structs-subtype-function-should-they/121909 "2024-10-29T20:36:02Z")

</div>

The docstring of Function doesn’t specify any constraints on subtypes, so I’m wondering whether it makes sense to define callable structs (functors) as \<: Function.

---

## [Argmax over columns of a large matrix](https://discourse.julialang.org/t/argmax-over-columns-of-a-large-matrix/121924)

<div class="topic-metadata">

**Author:** [@miguelborrero](https://discourse.julialang.org/u/miguelborrero)\
**Replies:** 2\
**Last updated:** [October 29, 2024, 6:50pm UTC](https://discourse.julialang.org/t/argmax-over-columns-of-a-large-matrix/121924 "2024-10-29T18:50:52Z")

</div>

Hi there, I have a large matrix for e.g (7x10000) and I want to iterate over each of the columns and compute the index of the maximum element. There are naive ways I can think of but since this part of my code is perfor…

---

## [Relocatable Makie app](https://discourse.julialang.org/t/relocatable-makie-app/119742)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 11\
**Last updated:** [October 29, 2024, 3:44pm UTC](https://discourse.julialang.org/t/relocatable-makie-app/119742 "2024-10-29T15:44:16Z")

</div>

I want to share some results with a college so that he can have a look at the data himself. Plotly can export an HTML which is interactive, but WGLMakie can not (as far as I known). It is mainly time series charts where…

---

## [Convolutions - Computational Thinking](https://discourse.julialang.org/t/convolutions-computational-thinking/121922)

<div class="topic-metadata">

**Author:** [@elwwan](https://discourse.julialang.org/u/elwwan)\
**Replies:** 0\
**Last updated:** [October 29, 2024, 3:14pm UTC](https://discourse.julialang.org/t/convolutions-computational-thinking/121922 "2024-10-29T15:14:36Z")

</div>

Hello, I’m trying to follow the computational thinking course to learn Julia unfortunately I am stuck at question 2.2 in homework 2. This is the exercise is this : Implement a new method convolve(M, K) that applies …

---

## [Treating NaN as error: Helping debugging](https://discourse.julialang.org/t/treating-nan-as-error-helping-debugging/36933)

<div class="topic-metadata">

**Author:** [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Replies:** 19\
**Last updated:** [October 29, 2024, 3:08pm UTC](https://discourse.julialang.org/t/treating-nan-as-error-helping-debugging/36933 "2024-10-29T15:08:49Z")

</div>

I am writing a large hydrological model, and for some sets of parameters I get a NaN value, but I do not know which first function is giving me NaN. Therefore, I would like to stop my program at the first NaN. A dirty …

---

## [Problems relating to "gradient is nothing"](https://discourse.julialang.org/t/problems-relating-to-gradient-is-nothing/121879)

<div class="topic-metadata">

**Author:** [@Yaozhong\_Liu](https://discourse.julialang.org/u/Yaozhong_Liu)\
**Replies:** 11\
**Last updated:** [October 29, 2024, 2:48pm UTC](https://discourse.julialang.org/t/problems-relating-to-gradient-is-nothing/121879 "2024-10-29T14:48:31Z")

</div>

Hi, I am doing a machine learning using gradient descend # I have a set of data, called samples # I have two models: model1 and model2 global par = Flux.params(model1, model2) #wrap them in params gs = gradient(par) do …

---

## [Print vector](https://discourse.julialang.org/t/print-vector/121917)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 5\
**Last updated:** [October 29, 2024, 2:47pm UTC](https://discourse.julialang.org/t/print-vector/121917 "2024-10-29T14:47:22Z")

</div>

How does one get @show to print the vector as it is shown in the REPL, that is vertically?

---

## [Implement saturation of DAEs output using a combination of continuous and discrete callbacks](https://discourse.julialang.org/t/implement-saturation-of-daes-output-using-a-combination-of-continuous-and-discrete-callbacks/121238)

<div class="topic-metadata">

**Author:** [@Mouhamed](https://discourse.julialang.org/u/Mouhamed)\
**Replies:** 6\
**Last updated:** [October 29, 2024, 1:05pm UTC](https://discourse.julialang.org/t/implement-saturation-of-daes-output-using-a-combination-of-continuous-and-discrete-callbacks/121238 "2024-10-29T13:05:15Z")

</div>

Hello, In a nutshell what I do is the following : 1- First I monitor the evolution of one output through a continuous callback and when it hits a limit value I saturate the derivative output by multiplying it by a bool…

---

## [Conflict between Proj and GeoStats in a package](https://discourse.julialang.org/t/conflict-between-proj-and-geostats-in-a-package/121862)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 8\
**Last updated:** [October 29, 2024, 12:25pm UTC](https://discourse.julialang.org/t/conflict-between-proj-and-geostats-in-a-package/121862 "2024-10-29T12:25:45Z")

</div>

I am new to creating packages and usually just run scripts. This script runs fine: using CSV using DataFrames using Dates using GeoIO using GeoStats using Proj using ZipArchives include("mweNLHFmethod.jl") #using Revi…

---

## [Problem relating to use gradient descends two models using GPU](https://discourse.julialang.org/t/problem-relating-to-use-gradient-descends-two-models-using-gpu/121911)

<div class="topic-metadata">

**Author:** [@Yaozhong\_Liu](https://discourse.julialang.org/u/Yaozhong_Liu)\
**Replies:** 2\
**Last updated:** [October 29, 2024, 11:54am UTC](https://discourse.julialang.org/t/problem-relating-to-use-gradient-descends-two-models-using-gpu/121911 "2024-10-29T11:54:17Z")

</div>

Hi. I am using GPU and Flux to train 2 models. Example code: using CUDA using Flux using Random Random.seed!(333) model1 = Chain( Dense(3, 3) |\> gpu ) model2 = Chain( model1, Dense(ones(3,3),true,relu) |\> g…

---

## [Avoid allocations in retrieving array parts](https://discourse.julialang.org/t/avoid-allocations-in-retrieving-array-parts/121908)

<div class="topic-metadata">

**Author:** [@JTHesse](https://discourse.julialang.org/u/JTHesse)\
**Replies:** 2\
**Last updated:** [October 29, 2024, 9:32am UTC](https://discourse.julialang.org/t/avoid-allocations-in-retrieving-array-parts/121908 "2024-10-29T09:32:11Z")

</div>

Hello, I’m trying to reduce memory allocations and increase efficiency of our software. Most of the allocations will occur while retrieving part of an array. As you can see below, the retrieval is allocating much more…

---

## [@ccall and pointer to structure](https://discourse.julialang.org/t/ccall-and-pointer-to-structure/121884)

<div class="topic-metadata">

**Author:** [@yjr](https://discourse.julialang.org/u/yjr)\
**Replies:** 5\
**Last updated:** [October 29, 2024, 7:58am UTC](https://discourse.julialang.org/t/ccall-and-pointer-to-structure/121884 "2024-10-29T07:58:38Z")

</div>

Hello, I’ve a c function that updates (pass by parameter) a pointer to a structure. so in @ccall I should use Ptr{my\_struct} types . But I cannot create the structure pointer as method pointer(whatever::MyStruct) does n…

---

## [JumpProcesses.jl solvers](https://discourse.julialang.org/t/jumpprocesses-jl-solvers/121883)

<div class="topic-metadata">

**Author:** [@hhindley](https://discourse.julialang.org/u/hhindley)\
**Replies:** 4\
**Last updated:** [October 28, 2024, 7:05pm UTC](https://discourse.julialang.org/t/jumpprocesses-jl-solvers/121883 "2024-10-28T19:05:29Z")

</div>

I’m modelling a biochemical system using JumpProcesses.jl. I am coupling a continuous ODE to a jumpset which includes MassActionJumps, ConstantRateJumps and unbounded VariableRateJumps. When I increase my tspan, or in c…

---

## [What was Zygote's main weakness?](https://discourse.julialang.org/t/what-was-zygotes-main-weakness/121827)

<div class="topic-metadata">

**Author:** [@Bizzi](https://discourse.julialang.org/u/Bizzi)\
**Replies:** 2\
**Last updated:** [October 28, 2024, 5:32pm UTC](https://discourse.julialang.org/t/what-was-zygotes-main-weakness/121827 "2024-10-28T17:32:20Z")

</div>

Zygote is a remarkable tool. The fact that it’s able to perform source-to-source automatic differentiation on almost all of Julia (!) already makes it, I think, one of the most powerful AD backends around. It’s performan…

---

## [How to slice a NamedTuple?](https://discourse.julialang.org/t/how-to-slice-a-namedtuple/121767)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 6\
**Last updated:** [October 28, 2024, 5:14pm UTC](https://discourse.julialang.org/t/how-to-slice-a-namedtuple/121767 "2024-10-28T17:14:38Z")

</div>

How to? julia\> (;a=10, b=20, c=30)\[2:end\] ERROR: MethodError: no method matching getindex(::@NamedTuple{a::Int64, b::Int64, c::Int64}, ::UnitRange{Int64}) # Desired: (;b=20, c=30)

---

## [How to filter dataframe rows with a boolean mask?](https://discourse.julialang.org/t/how-to-filter-dataframe-rows-with-a-boolean-mask/121873)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 2\
**Last updated:** [October 28, 2024, 3:28pm UTC](https://discourse.julialang.org/t/how-to-filter-dataframe-rows-with-a-boolean-mask/121873 "2024-10-28T15:28:45Z")

</div>

Hi, I would like to the same thing as this python code: import pandas as pd array = \[1,2,3\] df = pd.DataFrame(array) mask = \[True, False, True\] new\_df = df\[mask\] \>\>\> print(new\_df) 0 0 1 2 3 Looked around, but …

---

## [\`ifelse(x\<y, x, y)\` much faster than \`min()\`](https://discourse.julialang.org/t/ifelse-x-y-x-y-much-faster-than-min/121826)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 16\
**Last updated:** [October 28, 2024, 3:01pm UTC](https://discourse.julialang.org/t/ifelse-x-y-x-y-much-faster-than-min/121826 "2024-10-28T15:01:18Z")

</div>

julia\> using Chairmarks julia\> function g(dij) vmin = Inf for x in dij vmin = min(x, vmin) end return vmin end julia\> function f(dij) vmin = Inf for x in dij vmin = ifelse(x \< vm…

---

## [Can't convert from Irish to British grid using CoordRefSystems](https://discourse.julialang.org/t/cant-convert-from-irish-to-british-grid-using-coordrefsystems/121857)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 1\
**Last updated:** [October 28, 2024, 11:06am UTC](https://discourse.julialang.org/t/cant-convert-from-irish-to-british-grid-using-coordrefsystems/121857 "2024-10-28T11:06:28Z")

</div>

I’m trying to convert coordinates from Irish to British national grid. I can do this in Proj, but am encountering some compatibility issues. I thought the easiest solution might be to remove any direct dependence on Proj…

---

## [DimensionalData question](https://discourse.julialang.org/t/dimensionaldata-question/121846)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 6\
**Last updated:** [October 28, 2024, 7:08am UTC](https://discourse.julialang.org/t/dimensionaldata-question/121846 "2024-10-28T07:08:27Z")

</div>

How do I specify a DimArray over a subset of a dimension? I thought this would work but it gives an error. Ddim = Dim{:Ddim}(\['a','b','c'\]) DimArray( 1:2, Ddim(\['a','b'\]) )

---

## [Parsing of multiple \`..\`](https://discourse.julialang.org/t/parsing-of-multiple/121843)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 6\
**Last updated:** [October 27, 2024, 11:43pm UTC](https://discourse.julialang.org/t/parsing-of-multiple/121843 "2024-10-27T23:43:21Z")

</div>

Why does this parse, julia\> :(a .. b) :(a .. b) but this does not, julia\> :(a .. b .. c) ERROR: ParseError: # Error @ REPL\[31\]:1:10 :(a .. b .. c) # └──┘ ── Expected \`)\` ?

---

## [Julia in VSCode not working properly on WSL](https://discourse.julialang.org/t/julia-in-vscode-not-working-properly-on-wsl/121607)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 7\
**Last updated:** [October 27, 2024, 8:43pm UTC](https://discourse.julialang.org/t/julia-in-vscode-not-working-properly-on-wsl/121607 "2024-10-27T20:43:37Z")

</div>

I have been using Julia with wsl and vscode. I didn’t have much problems, though it was a little bit slow when running. After I had several issues with errors with the LS and others, I finally made it work, but it still …

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=116)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=118)
