Conversation
|
|
||
| 1. Clone this repository: | ||
|
|
||
| git clone https://github.com/gnolang/getting-started.git |
There was a problem hiding this comment.
Suggestion: We also have the one line installer ⬇️
curl -fsSL https://raw.githubusercontent.com/gnolang/gno/master/misc/install.sh | sh
Proposing both would be nice
There was a problem hiding this comment.
That one-liner is already here: it is exactly what make install runs, two steps below (step 2):
install: ## build the gno toolchain into $HOME/.gno/bin
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/gnolang/gno/master/misc/install.sh | sh -s -- --from-sourceThe line you commented on is step 1, git clone https://github.com/gnolang/getting-started.git, which clones this repo so there is a realm to build and edit. It is not the toolchain install; the two steps do different jobs.
One difference worth keeping: --from-source. Without it the installer takes its prebuilt-binary path, which looks for v* release tags and .tar.gz assets that gnolang/gno does not publish (it tags chain/*), so the bare curl … | sh fails today (gnolang/gno#6195, still open). The README says so in the paragraph right under step 2. Once #6195 is fixed the flag can go and the command becomes the short one you quoted.
So: Makefile as the single entry point, one command per step, and no second copy of the curl line to keep in sync.
There was a problem hiding this comment.
Oh yes my bad you're right, thank you!
| network: | ||
| `hello_test.gno` shows the two tests every realm wants: one that exercises the | ||
| state-changing function (note the `cur realm` parameter and the `cross(cur)` | ||
| call — that's how Gno marks a "crossing" call into a realm), and one that calls |
There was a problem hiding this comment.
I think it's important to introduce the inter-realm spec (simplified) correctly if we do in that docs
Quick example: That's how Gno marks a "crossing" call into a realm. It changes the context from the realm it is running in into that realm context, mandatory for any function a user calls to change the realm's state (example: By using gnokey maketx)
There was a problem hiding this comment.
Removed the hand-written explanation instead of correcting it. The sentence now links Realms and Interrealm, which say it properly and stay right when the semantics move. 6839827.
| @@ -0,0 +1,53 @@ | |||
| # AGENTS.md | |||
There was a problem hiding this comment.
We could enhance agents.md to index main documentations and document main error users could encounter if they modify that realm (as you did with gno is not go). We could modify the README in that direction (you can modify that realm, agent.md is made to help beginner // you can use an agent to create your first realm).
Close to other tools/skills we already made but here self contained, minimal and beginner oriented, which could work with "cheap model". No need to make something super fancy IMO, ~10/50 lines would do the work.
Example: missing realm param when calling with maketx call, render is not displaying (if putting incorrect names), else...
There was a problem hiding this comment.
Took the indexing half, dropped the expansion. "Gno is not Go" is now six links (realms, interrealm, Go/Gno compatibility, stdlibs, testing, effective-gno) in place of five hand-written bullets: same length, nothing to keep in sync. The error catalogue you describe is worth having, but in the docs, not in a 52-line file that goes stale silently.
| `hello_test.gno` shows the two tests every realm wants: one that exercises the | ||
| state-changing function (note the `cur realm` parameter and the `cross(cur)` | ||
| call — that's how Gno marks a "crossing" call into a realm), and one that calls | ||
| `Render`, which is the realm's entire public surface. |
There was a problem hiding this comment.
entire public surface is not right words (there's also Get and Set serving as public function), Render should highlight its capability to displays md format into gnoweb
There was a problem hiding this comment.
Correct, Get and Set are public too. The claim is gone from the README, and the test comment now just says gnoweb calls Render for every page view.
There was a problem hiding this comment.
We should hyperlink all this tools to their README
There was a problem hiding this comment.
Went with one link rather than five: the install step points at Installation, which lists the tools and the other install methods.
| @@ -34,30 +34,53 @@ | |||
|
|
|||
| 4. Open your browser and visit http://localhost:8888 | |||
There was a problem hiding this comment.
Say going to http://localhost:8888 on gnodev should redirect to that link if done correctly, with some troubleshoot if not
There was a problem hiding this comment.
Linked it rather than written it: Local development with gnodev. Troubleshooting that drifts out of sync with gnodev is exactly what this pass is removing.
| `https://rpc.gno.land:443`) has been live since 12 September 2026. Real | ||
| GNOT, no faucet. | ||
| `gnodev` runs a throwaway local chain. To put your realm on a real network, | ||
| point `module` in `gnomod.toml` at a path you control — `gno.land/r/<your-address>/hello` |
There was a problem hiding this comment.
We should add little sentence about "how to create your key"
It is in upper part of the getting started https://docs.gno.land/builders/getting-started/#4-create-a-key
There was a problem hiding this comment.
That page is already the target of the "Deploying it" link, and creating a key is step 4 on it, so there is nothing to add here.
There was a problem hiding this comment.
It isn't, creating a key is the part 4 of the earlier part above the deployment section.
But, rethinking it, we could move that part into the deployment section. I will do a PR
| - **Render must be deterministic.** Map iteration order is unspecified, so never | ||
| build output by ranging a map. |
There was a problem hiding this comment.
The premise beside this rule states the reverse: Gno ranges a map in insertion order on every run.
| - **Render must be deterministic.** Map iteration order is unspecified, so never | |
| build output by ranging a map. | |
| - **Render must be deterministic.** Map iteration follows insertion order, which | |
| is not a guarantee to build output on, so never build output by ranging a map. |
There was a problem hiding this comment.
Bullet removed. Insertion order is real but is not a guarantee to build output on, and neither version of that sentence belongs here: the section now links Effective Gno and the reference pages instead of restating them.
| first parameter `cur realm`, and callers use `cross(cur)`. See `Set` in | ||
| `hello.gno` and its call in `hello_test.gno`. |
There was a problem hiding this comment.
Right, and the bullet is gone. README links Realms and Interrealm rather than describing the signature.
| build output by ranging a map. | ||
| - **The standard library is a subset.** `sort.Slice` does not exist, and `ufmt` | ||
| honours only some of `fmt`'s flags: `ufmt.Sprintf("%03d", 7)` returns `"7"`, | ||
| and `%-5s` comes back as `(unhandled verb: %-)`. |
There was a problem hiding this comment.
Nit: ufmt.Sprintf("%-5s", "ab") returns (unhandled verb: %-)5s, four characters longer than documented, and those four land in whatever the realm renders.
| and `%-5s` comes back as `(unhandled verb: %-)`. | |
| and `%-5s` comes back as `(unhandled verb: %-)5s`. |
repro: the documented value is a prefix of the real one
# from a local clone of gnolang/getting-started:
cat > zz_ufmt_test.gno <<'EOF'
package hello
import (
"testing"
"gno.land/p/nt/ufmt/v0"
)
func TestUfmtDash(t *testing.T) {
t.Logf("%%-5s -> %q", ufmt.Sprintf("%-5s", "ab"))
t.Logf("%%03d -> %q", ufmt.Sprintf("%03d", 7))
}
EOF
gno test -v .
rm zz_ufmt_test.gnoThe %-5s line carries four characters the documented value drops; the %03d line is there to show the neighbouring claim is exact.
# …
=== RUN TestUfmtDash
%-5s -> "(unhandled verb: %-)5s"
%03d -> "7"
--- PASS: TestUfmtDash (0.00s)
--- GAS: 1604805
# …
ok . 0.53s
There was a problem hiding this comment.
Your reading is right: the 5s survives the unhandled verb, and my measurement had a trailing | from the test string I used. The bullet is gone either way, replaced by a link to Standard libraries.
|
|
||
| dev: | ||
| dev: ## run a local chain + web UI on http://localhost:8888, reloading on save | ||
| gnodev . |
There was a problem hiding this comment.
Nit: dev calls gnodev by name while GNO ?= gno routes the other three, so a toolchain off PATH runs test, lint and fmt and fails the local chain.
| gnodev . | |
| GNO ?= gno | |
| GNODEV ?= gnodev |
There was a problem hiding this comment.
Applied: GNODEV ?= gnodev, and dev calls $(GNODEV).
| `make test lint` is the bar for any change. CI runs exactly those two targets | ||
| against a gno built from `gnolang/gno` master, so a green local run means a | ||
| green CI. |
There was a problem hiding this comment.
Suggestion: CI builds its gno from master at job time while GNO ?= gno takes whatever the contributor installed last, so a green local run promises no green CI.
| `make test lint` is the bar for any change. CI runs exactly those two targets | |
| against a gno built from `gnolang/gno` master, so a green local run means a | |
| green CI. | |
| `make test lint` is the bar for any change. CI runs exactly those two targets | |
| against a gno built from `gnolang/gno` master, so a green run on a freshly | |
| installed toolchain means a green CI. Re-run `make install` when CI disagrees. |
| `gnodev` runs a throwaway local chain. To put your realm on a real network, | ||
| point `module` in `gnomod.toml` at a path you control — `gno.land/r/<your-address>/hello` | ||
| always works and needs no registration — then follow |
There was a problem hiding this comment.
Related suggestion: Render hardcodes /r/example/hello, so a reader who re-points module ships a page whose one button calls a realm they do not own. Build the path from CurrentRealm().PkgPath() instead.
There was a problem hiding this comment.
Fixed. Render no longer builds an absolute link. The page now says to add $help to its own URL, which works whatever module points at, and drops the hardcoded path with it.
| network: | ||
| Why `Set` takes a `realm` parameter and the test calls `cross(...)`: | ||
| [Realms](https://docs.gno.land/resources/realms) and | ||
| [Interrealm](https://docs.gno.land/resources/gno-interrealm). |
There was a problem hiding this comment.
| do not guess: | ||
|
|
||
| - [Realms](https://docs.gno.land/resources/realms): `Render` and realm state | ||
| - [Interrealm](https://docs.gno.land/resources/gno-interrealm): crossing |
There was a problem hiding this comment.
Follow-up to #7, aimed at #1 ("make this the easiest way to try Gno"). The repo
stays small, and the change is mostly subtraction: anything docs.gno.land
already explains is now a link rather than a paragraph.
Makefile as the single entry point.
makewith no argument lists everytarget (the self-documenting
##+ awk idiom). Addedlintandfmt, whichthe toolchain already provides and this repo never exposed.
GNO ?= gnoandGNODEV ?= gnodevso a toolchain that is not onPATHcan be pointed at. CIruns
make test/make lintinstead of its own copies of the commands, solocal and CI cannot drift.
Links instead of copies. README and
AGENTS.mdnow point at the officialpages for installing, gnodev, realms and interrealm, testing, Go/Gno
compatibility, stdlibs, effective Gno, editor setup, and deploying. What they
replace was either a duplicate of the docs or subtly wrong: review caught bad
claims about map iteration order,
ufmtflags, and "Render is the realm'sentire public surface". Duplicated prose is how those get written in the first
place.
A test for
Render.hello_test.gnogets aTestRenderthat asserts themessage shows up, deliberately loose so that editing
Render(which the repoactively invites) does not turn CI red.
AGENTS.md(52 lines) + a one-lineCLAUDE.md. What the repo is, thecommands, an index of the docs pages that matter, and the two tools worth
having:
gnoverse/gno-mcp(MCP serverplus agent skills for gno.land) and
gnoverse/gnopls(language server).hello.gnono longer hardcodes/r/example/helloin the page it renders,so a reader who re-points
moduledoes not ship a button that calls a realmthey do not own.
Next Steps links the monorepo's
examples/, thenmoul/gno-contractsas the "what this grows into" reference, andgnoverse/awesome-gnofor everything else. Thegnolang/repo-templatelink isgone: every one of its three Make targets fails on the current toolchain.
Verified on gno master:
make testok,make lintclean,gno fmt -diff .nodiff, and every link in README and
AGENTS.mdreturns 200.