Build.schema_hash(): FNV-1a 64 of the program's own schema (the bytes ludic schema prints), worked out only when a program names it, 0 under ludicc --release, which ludic bundle now passes (Mac and Windows); reseeded
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b5bffe99fa
commit
dacc0f7280
14 changed files with 75837 additions and 75090 deletions
14
examples/lang/schema_hash.ludic
Normal file
14
examples/lang/schema_hash.ludic
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# schema_hash.ludic — Build.schema_hash(): FNV-1a 64 of the program's own schema (what `ludic schema`
|
||||
# prints), so a tool can tell which data a running build was compiled from; 0 in a release build
|
||||
# (`ludicc --release`, which ludic bundle passes).
|
||||
#
|
||||
# Running it prints: true
|
||||
program SchemaHash {
|
||||
property Tool {
|
||||
key: string = ""
|
||||
weight: float = 1.0
|
||||
}
|
||||
registry Tools of Tool as TL
|
||||
def Tools axe { weight: 2.5 }
|
||||
entry { print(`{Build.schema_hash() != long(0)}`) }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue