Last active
December 5, 2025 09:26
-
-
Save bmorphism/4b4d623f925641da5a95a7eb7b2e9790 to your computer and use it in GitHub Desktop.
using Gay
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (_) | (_) (_) | | |
| _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help. | |
| | | | | | | |/ _` | | | |
| | | |_| | | | (_| | | Version 1.10.10 (2025-06-27) | |
| _/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release | |
| |__/ | | |
| julia> using Gay | |
| ERROR: ArgumentError: Package Gay not found in current path. | |
| - Run `import Pkg; Pkg.add("Gay")` to install the Gay package. | |
| Stacktrace: | |
| [1] macro expansion | |
| @ ./loading.jl:1842 [inlined] | |
| [2] macro expansion | |
| @ ./lock.jl:267 [inlined] | |
| [3] __require(into::Module, mod::Symbol) | |
| @ Base ./loading.jl:1823 | |
| [4] #invoke_in_world#3 | |
| @ ./essentials.jl:926 [inlined] | |
| [5] invoke_in_world | |
| @ ./essentials.jl:923 [inlined] | |
| [6] require(into::Module, mod::Symbol) | |
| @ Base ./loading.jl:1816 | |
| julia> using Pkg | |
| julia> Pkg.add(url="https://github.com/bmorphism/Gay.jl") | |
| Cloning git-repo `https://github.com/bmorphism/Gay.jl` | |
| Updating git-repo `https://github.com/bmorphism/Gay.jl` | |
| Resolving package versions... | |
| Installed ADTypes ─── v1.20.0 | |
| Installed Pigeons ─── v0.4.9 | |
| Installed Hwloc_jll ─ v2.12.1+0 | |
| Downloaded artifact: Hwloc | |
| Updating `~/.julia/environments/v1.10/Project.toml` | |
| [f3dee6b2] + Gay v0.1.0 `https://github.com/bmorphism/Gay.jl#master` | |
| Updating `~/.julia/environments/v1.10/Manifest.toml` | |
| [47edcb42] + ADTypes v1.20.0 | |
| [7d9f7c33] + Accessors v0.1.43 | |
| [79e6a3ab] + Adapt v4.4.0 | |
| [dce04be8] + ArgCheck v2.5.0 | |
| [15f4f7f2] + AutoHashEquals v2.2.0 | |
| [13072b0f] + AxisAlgorithms v1.1.0 | |
| ⌅ [3da002f7] ↓ ColorTypes v0.12.1 ⇒ v0.11.5 | |
| ⌃ [5ae59095] ↓ Colors v0.13.1 ⇒ v0.12.11 | |
| [38540f10] + CommonSolve v0.2.4 | |
| [a33af91c] + CompositionsBase v0.1.2 | |
| [187b0558] + ConstructionBase v1.6.0 | |
| [a93c6f00] + DataFrames v1.8.1 | |
| [31c24e10] + Distributions v0.25.122 | |
| [6a31a4e8] + Expect v0.3.1 | |
| [f3dee6b2] + Gay v0.1.0 `https://github.com/bmorphism/Gay.jl#master` | |
| [34004b35] + HypergeometricFunctions v0.3.28 | |
| [842dd82b] + InlineStrings v1.4.5 | |
| ⌅ [a98d9a8b] + Interpolations v0.15.1 | |
| [3587e190] + InverseFunctions v0.1.17 | |
| [41ab1584] + InvertedIndices v1.3.1 | |
| [51c06dcf] + LispSyntax v0.2.1 | |
| [6fdf6af0] + LogDensityProblems v2.2.0 | |
| [996a588d] + LogDensityProblemsAD v1.13.1 | |
| [da04e1cc] + MPI v0.20.23 | |
| [3da0fdf6] + MPIPreferences v0.1.11 | |
| [6fe1bfb0] + OffsetArrays v1.17.0 | |
| [925886fa] + OnlineStatsBase v1.7.1 | |
| [90014a1f] + PDMats v0.11.36 | |
| [fae87a5f] + ParserCombinator v2.2.1 | |
| [0eb8d820] + Pigeons v0.4.9 | |
| [eebad327] + PkgVersion v0.3.3 | |
| [2dfb63ee] + PooledArrays v1.4.3 | |
| [1fd47b50] + QuadGK v2.11.2 | |
| [c84ed2f1] + Ratios v0.4.5 | |
| [3cdcf5f2] + RecipesBase v1.3.4 | |
| [b873ce64] + ReplMaker v0.2.7 | |
| [79098fc4] + Rmath v0.9.0 | |
| [f2b01f46] + Roots v2.2.10 | |
| [91c51154] + SentinelArrays v1.4.8 | |
| [276daf66] + SpecialFunctions v2.6.1 | |
| [8efc31e9] + SplittableRandoms v0.1.2 | |
| [4c63d2b9] + StatsFuns v1.5.2 | |
| [efce3f68] + WoodburyMatrices v1.0.0 | |
| [a5390f91] + ZipFile v0.10.1 | |
| ⌃ [e33a78d0] + Hwloc_jll v2.12.1+0 | |
| [7cb0a576] + MPICH_jll v4.3.2+0 | |
| [f1f71cc9] + MPItrampoline_jll v5.5.4+0 | |
| [9237b28f] + MicrosoftMPI_jll v10.1.4+3 | |
| [fe0851c0] + OpenMPI_jll v5.0.9+0 | |
| [efe28fd5] + OpenSpecFun_jll v0.5.6+0 | |
| [f50d1b31] + Rmath_jll v0.5.1+0 | |
| [9fa8497b] + Future | |
| [4af54fe1] + LazyArtifacts | |
| [4607b0f0] + SuiteSparse | |
| [05823500] + OpenLibm_jll v0.8.5+0 | |
| Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated -m` | |
| Precompiling packages finished. | |
| 78 dependencies successfully precompiled in 35 seconds. 106 already precompiled. | |
| julia> using Gay | |
| julia> REPL mode Gay initialized. Press ` to enter and backspace to exit. | |
| ╔═══════════════════════════════════════╗ | |
| ║ Gay.jl REPL Initialized 🏳️🌈 ║ | |
| ╚═══════════════════════════════════════╝ | |
| Press ` to enter Gay mode. Type !help for commands. | |
| julia> !help | |
| ERROR: UndefVarError: `help` not defined | |
| Welcome to Julia 1.10.10. The full manual is available at | |
| https://docs.julialang.org | |
| as well as many great tutorials and learning resources: | |
| https://julialang.org/learning/ | |
| For help on a specific function or macro, type ? followed by its name, e.g. ?cos, or ?@time, and press enter. Type ; to enter shell mode, ] to enter package | |
| mode. | |
| To exit the interactive session, type CTRL-D (press the control key together with the d key), or type exit(). | |
| Stacktrace: | |
| [1] top-level scope | |
| @ REPL[5]:1 | |
| julia> using Gay | |
| julia> using Gay | |
| julia> gay_seed!(1069) | |
| 1069 | |
| julia> c1 = next_color() | |
| RGB{Float64}(0.0,0.11588782458403311,0.028631971587251167) | |
| julia> c2 = next_color() | |
| RGB{Float64}(0.27320664506769704,0.10965094225954956,0.13243744708537153) | |
| julia> gay_seed!(42) # Reset | |
| 42 | |
| julia> @assert next_color() == c1 | |
| ERROR: AssertionError: next_color() == c1 | |
| Stacktrace: | |
| [1] top-level scope | |
| @ REPL[11]:1 | |
| julia> using Gay | |
| julia> gay_seed!(42) | |
| 42 | |
| julia> c1 = next_color() | |
| RGB{Float64}(0.0,0.7327246286990455,0.0) | |
| julia> c2 = next_color() | |
| RGB{Float64}(1.0,0.0,0.13508147896216222) | |
| julia> gay_seed!(42) # Reset | |
| 42 | |
| julia> @assert next_color() == c1 # Identical! | |
| julia> rainbow(SRGB()) # Standard | |
| 6-element Array{RGB{Float64},1} with eltype ColorTypes.RGB{Float64}: | |
| RGB{Float64}(0.894,0.012,0.012) | |
| RGB{Float64}(1.0,0.549,0.0) | |
| RGB{Float64}(1.0,0.929,0.0) | |
| RGB{Float64}(0.0,0.502,0.149) | |
| RGB{Float64}(0.0,0.298,0.686) | |
| RGB{Float64}(0.459,0.027,0.529) | |
| julia> rainbow(DisplayP3()) # Apple devices | |
| 6-element Array{RGB{Float64},1} with eltype ColorTypes.RGB{Float64}: | |
| RGB{Float64}(0.894,0.012,0.012) | |
| RGB{Float64}(1.0,0.549,0.0) | |
| RGB{Float64}(1.0,0.929,0.0) | |
| RGB{Float64}(0.0,0.502,0.149) | |
| RGB{Float64}(0.0,0.298,0.686) | |
| RGB{Float64}(0.459,0.027,0.529) | |
| julia> rainbow(Rec2020()) # HDR/UHDTVcolor_at(1) # First color | |
| 6-element Array{RGB{Float64},1} with eltype ColorTypes.RGB{Float64}: | |
| RGB{Float64}(0.894,0.012,0.012) | |
| RGB{Float64}(1.0,0.549,0.0) | |
| RGB{Float64}(1.0,0.929,0.0) | |
| RGB{Float64}(0.0,0.502,0.149) | |
| RGB{Float64}(0.0,0.298,0.686) | |
| RGB{Float64}(0.459,0.027,0.529) | |
| julia> color_at(1000) # 1000th color (no iteration needed) | |
| RGB{Float64}(0.6120199003546725,0.384430633301217,0.0) | |
| julia> rainbow() | |
| 6-element Array{RGB{Float64},1} with eltype ColorTypes.RGB{Float64}: | |
| RGB{Float64}(0.894,0.012,0.012) | |
| RGB{Float64}(1.0,0.549,0.0) | |
| RGB{Float64}(1.0,0.929,0.0) | |
| RGB{Float64}(0.0,0.502,0.149) | |
| RGB{Float64}(0.0,0.298,0.686) | |
| RGB{Float64}(0.459,0.027,0.529) | |
| julia> transgender() | |
| 5-element Array{RGB{Float64},1} with eltype ColorTypes.RGB{Float64}: | |
| RGB{Float64}(0.357,0.808,0.98) | |
| RGB{Float64}(0.961,0.659,0.718) | |
| RGB{Float64}(1.0,1.0,1.0) | |
| RGB{Float64}(0.961,0.659,0.718) | |
| RGB{Float64}(0.357,0.808,0.98) | |
| julia> bisexual() | |
| 3-element Array{RGB{Float64},1} with eltype ColorTypes.RGB{Float64}: | |
| RGB{Float64}(0.843,0.008,0.439) | |
| RGB{Float64}(0.612,0.349,0.541) | |
| RGB{Float64}(0.0,0.22,0.655) | |
| julia> pride_flag(:progress) | |
| 11-element Array{RGB{Float64},1} with eltype ColorTypes.RGB{Float64}: | |
| RGB{Float64}(1.0,1.0,1.0) | |
| RGB{Float64}(0.961,0.659,0.718) | |
| RGB{Float64}(0.357,0.808,0.98) | |
| RGB{Float64}(0.384,0.227,0.133) | |
| RGB{Float64}(0.0,0.0,0.0) | |
| RGB{Float64}(0.894,0.012,0.012) | |
| RGB{Float64}(1.0,0.549,0.0) | |
| RGB{Float64}(1.0,0.929,0.0) | |
| RGB{Float64}(0.0,0.502,0.149) | |
| RGB{Float64}(0.0,0.298,0.686) | |
| RGB{Float64}(0.459,0.027,0.529) | |
| julia> gay_seed!(2017) | |
| 2017 | |
| julia> model = sky_add( | |
| comrade_ring(1.0, 0.3), | |
| comrade_gaussian(0.5) | |
| ) | |
| SkyModel(Tuple{SkyPrimitive, NamedTuple}[(Ring(1.0, 0.3, RGB{Float64}(0.8987265781159566,0.9567537986610289,1.0)), (flux = 1.0, stretch = (1.0, 1.0), rotate = 0.0, shift = (0.0, 0.0))), (Gaussian(0.5, 0.5, RGB{Float64}(0.5170790701795467,0.44792636874572234,1.0)), (flux = 1.0, stretch = (1.0, 1.0), rotate = 0.0, shift = (0.0, 0.0)))], 1.0) | |
| julia> comrade_show(model) | |
| Colored S-Expression (parentheses colored by component): | |
| (ring 1.0 0.3) + (gaussian 0.5 0.5) | |
| Intensity Map: | |
| SkyModel(Tuple{SkyPrimitive, NamedTuple}[(Ring(1.0, 0.3, RGB{Float64}(0.8987265781159566,0.9567537986610289,1.0)), (flux = 1.0, stretch = (1.0, 1.0), rotate = 0.0, shift = (0.0, 0.0))), (Gaussian(0.5, 0.5, RGB{Float64}(0.5170790701795467,0.44792636874572234,1.0)), (flux = 1.0, stretch = (1.0, 1.0), rotate = 0.0, shift = (0.0, 0.0)))], 1.0) | |
| julia> gay_seed!(2017) | |
| 2017 | |
| julia> model = sky_add( | |
| comrade_ring(1.0, 0.3), | |
| comrade_gaussian(0.5) | |
| ) | |
| SkyModel(Tuple{SkyPrimitive, NamedTuple}[(Ring(1.0, 0.3, RGB{Float64}(0.8987265781159566,0.9567537986610289,1.0)), (flux = 1.0, stretch = (1.0, 1.0), rotate = 0.0, shift = (0.0, 0.0))), (Gaussian(0.5, 0.5, RGB{Float64}(0.5170790701795467,0.44792636874572234,1.0)), (flux = 1.0, stretch = (1.0, 1.0), rotate = 0.0, shift = (0.0, 0.0)))], 1.0) | |
| julia> comrade_show(model) | |
| Colored S-Expression (parentheses colored by component): | |
| (ring 1.0 0.3) + (gaussian 0.5 0.5) | |
| Intensity Map: | |
| SkyModel(Tuple{SkyPrimitive, NamedTuple}[(Ring(1.0, 0.3, RGB{Float64}(0.8987265781159566,0.9567537986610289,1.0)), (flux = 1.0, stretch = (1.0, 1.0), rotate = 0.0, shift = (0.0, 0.0))), (Gaussian(0.5, 0.5, RGB{Float64}(0.5170790701795467,0.44792636874572234,1.0)), (flux = 1.0, stretch = (1.0, 1.0), rotate = 0.0, shift = (0.0, 0.0)))], 1.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment