ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/seferim-agi-g16 / tools/signals_from_index/main.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/seferim-agi-g16 / tools/signals_from_index/main.go
DateNot specified in source
RepositoryJanady13/seferim-agi-g16
Revision25f281b08b2f786f5a235b5abebfc39bf44d1044
Branchmain
Path or archive membertools/signals_from_index/main.go
Original SHA-256ea1b25c7305c7aecbba6879e76491a638573d5cc97d1919181ac6f4537a700a3
Git blob SHA4b9776c113526c73a09220d4a3c915902be0eb1f
Reading-copy SHA-256ea1b25c7305c7aecbba6879e76491a638573d5cc97d1919181ac6f4537a700a3

Original source ↗

Every recorded occurrence

These 2 records contain identical original source bytes. Their paths and revisions remain part of the archive.

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/seferim-agi-g16 / tools/signals_from_index/main.gomain25f281b08b2f786f5a235b5abebfc39bf44d1044Open original
Janady13/seferim-agi-g16 / tools/signals_from_index/main.gocopilot/update-code-libraries393af96a270295f79582b2b2a77bb49dd1a9a990Open original

Recovered source transcript

package main import ( "bufio" "encoding/json" "fmt" "math" "os" "path/filepath" "strings" ) type Entry struct { Path string `json:"path"` Size int64 `json:"size"` Ext string `json:"ext"` Language string `json:"language"` } type Signals struct { DxNorm float64 `json:"dx_norm"` EdError float64 `json:"ed_error"` Utility float64 `json:"utility"` Stability float64 `json:"stability"` Files int `json:"files"` } func clamp01(x float64) float64 { if x < 0 { return 0 } if x > 1 { return 1 } return x } func main() { if len(os.Args) < 3 { fmt.Fprintf(os.Stderr, "usage: signals_from_index <index.jsonl> <out.json>\n") os.Exit(2) } in := os.Args[1] out := os.Args[2] f, err := os.Open(in) if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } defer f.Close() typeCounts := map[string]int{} langs := map[string]int{} files := 0 var sizeSum float64 sc := bufio.NewScanner(f) for sc.Scan() { var e Entry if err := json.Unmarshal(sc.Bytes(), &e); err != nil { continue } files++ sizeSum += float64(e.Size) ext := strings.ToLower(e.Ext) typeCounts[ext]++ if e.Language != "" { langs[e.Language]++ } } // normalized entropy of extensions K := float64(len(typeCounts)) H := 0.0 for _, c := range typeCounts { p := float64(c) / float64(files) H += -p * math.Log2(p) } Hnorm := 0.0 if K > 1 { Hnorm = H / math.Log2(K) } // coverage of languages present over a canonical set canon := []string{"cpp", "go", "rust", "js", "ts", "java", "csharp", "swift", "kotlin"} covered := 0 for _, k := range canon { if _, ok := langs[k]; ok { covered++ } } coverage := float64(covered) / float64(len(canon)) // signals dx := clamp01(0.5*Hnorm + 0.5*clamp01(sizeSum/1e7)) // entropy + size ed := clamp01(1.0 - coverage) // gap from full coverage // utility: prioritize if SEFERIM/AGI appears in paths util := 0.2 if strings.Contains(strings.ToLower(in), "seferim") || strings.Contains(strings.ToLower(in), "agi") { util = 0.7 } // stability higher when fewer file types (less chaos) stab := clamp01(1.0 - 0.5*Hnorm) s := Signals{DxNorm: dx, EdError: ed, Utility: util, Stability: stab, Files: files} b, _ := json.MarshalIndent(s, "", " ") if err := os.MkdirAll(filepath.Dir(out), 0o755); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } if err := os.WriteFile(out, b, 0o644); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } fmt.Fprintf(os.Stderr, "signals -> %s (files=%d)\n", out, files) }

Search equations, builds, manuscript text, and recovered sources.