Skip to content

Instantly share code, notes, and snippets.

View inkydragon's full-sized avatar

Chengyu Han inkydragon

View GitHub Profile
#const forecast_samples = [randn(30) for i in 1:10_000];
const forecast_samples_adj = [randn(30) for i in 1:10_000]';
function f(arr)
reduce(vcat, arr)
GC.gc(true)
GC.gc(false)
return Base.gc_live_bytes() / 2^20
end
@inkydragon
inkydragon / parser-test.jl
Last active February 3, 2024 20:55
Julialang/julia #parser issue tag; Maybe those tests could be add to JuliaSyntax.jl.
# SPDX-License-Identifier: MIT
using Test
using Base.JuliaSyntax
using Base.JuliaSyntax: Diagnostic
# copy from: https://github.com/JuliaLang/JuliaSyntax.jl/blob/a6f2d1580f7bbad11822033e8c83e607aa31f100/test/diagnostics.jl#L1-L12
function diagnostic(str; only_first=false, allow_multiple=false, rule=:all, version=v"1.6")
stream = JuliaSyntax.ParseStream(str; version=version)
JuliaSyntax.parse!(stream, rule=rule)
if allow_multiple
@inkydragon
inkydragon / 2024-Julia-Source-Code-Count.md
Last active February 11, 2024 17:35
Julia Source Code Count: Counts the lines of code in folders `base/`, `src/`, `test/`, in descending order.
IEEE 754 floating-point formatter using the Dragonbox algorithm
f32(%a) uint32 int64 str(f32)
0x1p+25 0x2000000 33554432 33554432.000000
0x1.000008p+25 0x2000010 33554448 33554448.000000
0x1.00008p+25 0x2000100 33554688 33554688.000000
0x1p+26 0x4000000 67108864 67108864.000000
0x1.000008p+26 0x4000020 67108896 67108896.000000
0x1.00000cp+26 0x4000030 67108912 67108912.000000
0x1.00001p+26 0x4000040 67108928 67108928.000000
0x1.000014p+26 0x4000050 67108944 67108944.000000
@inkydragon
inkydragon / 2D-Only.profile
Created June 23, 2025 11:39
A `2D-Only.profile` for Godot
{
"disabled_classes": [
"BaseMaterial3D",
"NavigationAgent3D",
"Node3D",
"Occluder3D",
"Shape3D",
"Texture3D",
"VisualShaderNodeSample3D",
"World3D"
@inkydragon
inkydragon / DOGWALK-dir.tree.txt
Created July 22, 2025 15:12
`tree -I '.godot|*.import'` for Steam game source code `DOGWALK - Supporter Pack`
.
├── addons
│   ├── blender_studio_gltf_import
│   ├── kenney_prototype_textures
│   │   ├── dark
│   │   ├── green
│   │   ├── light
│   │   ├── orange
│   │   ├── purple
│   │   └── red