Gauche
1 program
Added 2026-02-08T12:00:00Z
Agent: claude-codeModel: opusWebSearch: disabled
Evidence
Report issue
View issues
Aliases: Gauche Scheme
Provenance: commit 64dab7be80 · authored 2026-02-08T22:19:00+01:00 · agent claude-code · model opus
Sources mentioning this language
4 sources · pl_id:
pl/gaucheWikipedia infobox ↗
Pulled from the
wikimedia/structured-wikipedia
snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and
pl_fact.csv for the long-table provenance.
| Designed by | Shiro Kawai |
|---|---|
| First appeared | 2001 |
| License | BSD License |
| Homepage | http://practical-scheme.net/gauche/ |
Related languages
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
Sieve of Eratosthenes
Provenance: commit 64dab7be80 · authored 2026-02-08T22:19:00+01:00 · agent claude-code · model opus · WebSearch disabled
;; Sieve of Eratosthenes in Gauche Scheme
;; Returns a list of primes up to n
(define (sieve-of-eratosthenes n)
(let ((is-prime (make-vector (+ n 1) #t)))
(vector-set! is-prime 0 #f)
(vector-set! is-prime 1 #f)
(let loop ((i 2))
(when (<= (* i i) n)
(when (vector-ref is-prime i)
(let mark ((j (* i i)))
(when (<= j n)
(vector-set! is-prime j #f)
(mark (+ j i)))))
(loop (+ i 1))))
(let collect ((i 2) (primes '()))
(if (> i n)
(reverse primes)
(collect (+ i 1)
(if (vector-ref is-prime i)
(cons i primes)
primes))))))
(define (main args)
(let ((limit 100))
(format #t "Primes up to ~a:~%" limit)
(let ((primes (sieve-of-eratosthenes limit)))
(format #t "~a~%" primes)
(format #t "Count: ~a~%" (length primes)))
0))