Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 source realm

Package sievedemo is a small gnoweb demo of the Sieve of Eratosthenes provided by the [p/moul/x/daily/sieve](/p/moul/...

Readme View source

gno.land/r/moul/x/daily/sievedemo/v0

Interactive gnoweb demo of the p/moul/x/daily/sieve Sieve of Eratosthenes library — it renders the count of primes up to MaxN, the first 100 primes, and a "primes up to n" grid. It has no sieve logic of its own.

Append a number to the path to sieve up to any n (max 10000), e.g. /r/moul/x/daily/sievedemo/v0:1000.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

Dependency graph:

gno.land/r/moul/x/daily/sievedemo/v0 dependency graph

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.

Overview

Package sievedemo is a small gnoweb demo of the Sieve of Eratosthenes provided by the p/moul/x/daily/sieve(/p/moul/x/daily/sieve/v0) library: it renders the primes up to MaxN, the first 100 primes, and an interactive "primes up to n" grid.

It contains no sieve logic of its own — everything comes from `sieve.PrimesUpTo` and `sieve.MaxN`.

Functions 1

func Render

1func Render(path string) string
source

Render renders the sieve for gnoweb.

Example
1Render("")      / Render("/") -> first 100 primes + total count up to MaxN
2Render("/<n>")               -> every prime <= n, laid out as a grid

Imports 3

Source Files 3