PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

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

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
moul / x / daily / piglatindemo
Files
3 (README)(gnomod.toml)
Exported functions
1
Module
gno.land/r/moul/x/daily/piglatindemo/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • piglatindemo.gnogno

Select a file to view its exact on-chain source. Sorted README → gnomod → sources → tests.

Functions

  • Render(path string) string

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

Rendered

RenderedRawgnoweb ↗
# Pig Latin

Demo of the [`p/moul/x/daily/piglatin`](/p/moul/x/daily/piglatin/v0) library — a tiny port of the classic **Pig Latin** translator (the go-to beginner exercise). Pure `strings`/`unicode`, fully deterministic.

## Rules

1. Word starts with a **vowel** → append `way`. `apple` → `appleway`
2. Word starts with **consonant(s)** → move the leading consonant cluster to the end, then add `ay`. `string` → `ingstray`
3. `y` is a consonant only as the first letter (`yellow` → `ellowyay`); otherwise a vowel (`myth` → `ythmay`).
4. **Capitalization** is preserved: `Hello` → `Ellohay`, `NASA` → `ASANAY`.
5. **Punctuation** glued to a word stays put: `Hello,` → `Ellohay,`.

## Try it

Append a sentence to the path — spaces are fine:

- [`/hello world`](/r/moul/x/daily/piglatindemo/v0:/hello world) → `ellohay orldway`
- [`/The quick brown fox`](/r/moul/x/daily/piglatindemo/v0:/The quick brown fox) → `Ethay uickqay ownbray oxfay`
- [`/I love Gno!`](/r/moul/x/daily/piglatindemo/v0:/I love Gno!) → `Iway ovelay Ognay!`

## Examples

| Input | Pig Latin |
|---|---|
| `pig` | `igpay` |
| `banana` | `ananabay` |
| `smile` | `ilesmay` |
| `eat` | `eatway` |
| `yellow` | `ellowyay` |
| `myth` | `ythmay` |
| `Hello,` | `Ellohay,` |
| `GNO` | `OGNAY` |

vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.