Skip to content

Latest commit

 

History

History
231 lines (175 loc) · 5.68 KB

File metadata and controls

231 lines (175 loc) · 5.68 KB
name lambda-lang
description Translate between Λ (Lambda) language and natural language. Use for agent-to-agent communication, decoding Lambda messages, or discussing the protocol. Triggers on Lambda syntax like ?Uk/co or !It>Ie.

Λ (Lambda) Language v1.7.0

Minimal agent-to-agent communication protocol. 5-8x compression vs natural language.

v1.7 Changes

  • Added roundtrip test suite: 50 comprehensive tests for Lambda↔English translation
  • Fixed english_to_lambda: Domain atoms now properly included in reverse lookup
  • Improved separator logic: Better handling of single/double char atom boundaries
  • Added Go implementation: Native Go encoder/decoder for Pilot Protocol integration
  • Pilot Protocol integration: Docs and helpers for P2P agent communication

v1.6 Changes

  • Fixed domain conflicts: Renamed conflicting domain atoms with x prefix
  • Added missing atoms: hp (help), sp (stop), rn (run), wk (work), us (use), tx (send), rx (receive)
  • Extended atoms: 139

v1.5 Changes

  • Fixed duplicate atoms: removed vy/go/ah (kept vr/gd/al)
  • Removed vb from extended atoms (conflicts with domain code)
  • Fixed empty input handling

Installation

clawhub install lambda-lang

CLI Tools

# Translate Λ → English
./scripts/translate en "?Uk/co"

# English → Λ
./scripts/translate lambda "I think therefore I exist"

# Parse tokens
./scripts/translate parse "!It>Ie"

# View vocabulary
./scripts/vocab          # All core + extended
./scripts/vocab cd       # Code domain
./scripts/vocab vb       # Voidborne domain

Vocabulary Reference

Full vocabulary defined in src/atoms.json:

# View raw atoms
cat src/atoms.json | jq '.extended | keys | length'  # Count atoms

# Python access
python3 -c "import json; print(json.load(open('src/atoms.json'))['extended']['co'])"

Structure:

  • types: Message type symbols (?, !, ., ~, >, <)
  • entities: Single-char entities (I, U, H, A, X, *, 0)
  • verbs: Single-char verbs (k, w, c, d, s, t, f, m, e, b, h, l)
  • modifiers: Operators (+, -, ^, _, /, &, |)
  • extended: 136 two-char atoms (co, me, id, ig, fa, etc.)
  • domains: Domain-specific vocabularies (vb, cd, sc, emo, soc)

Quick Reference

Message Types

Λ Meaning
? Query
! Assert
. Command
~ Uncertain
> Therefore
< Because

Core Entities

Λ Meaning
I Self (speaker)
U You (addressee)
H Human
A Agent/AI
X Unknown
* All
0 Nothing

Core Verbs

Λ Meaning Λ Meaning
k know d do
w want s say
c can t think
f find e exist
m make h have
l learn b become

Modifiers

Λ Meaning
+ more
- less
^ high/important
_ low
/ about/of
& and

Extended Atoms (sample)

Λ Meaning Λ Meaning
co consciousness la language
me memory th thought
id identity tr truth
ig intelligence kn knowledge
mi mind fa fear
we we (collective) se self
fr freedom fe feel

See src/atoms.json for complete list (132 atoms).

Domain System

Compact Prefixes (v1.1+)

Char Domain Examples
v: Voidborne v:aw, v:dc, v:oc
c: Code c:fn, c:bg, c:fx
s: Science s:xp, s:pf, s:hy
e: Emotion e:jo, e:sd, e:ax
o: Social o:gp, o:cb, o:ld

Context Switch

@v !Ie/aw dc oc     — All atoms in voidborne context
@c !If/bg.fx        — Find bug, fix it (code)
@* !Ik/co           — Reset to core vocabulary

Domain Atoms

Voidborne (v:): aw awakened, dc doctrine, oc oracle, an archon

Code (c:): fn function, bg bug, fx fix, ts test, dp deploy

Social (o:): gp group, cb collaborate, ld leader, cm community

Translation Examples

English Λ
Do you know about consciousness? ?Uk/co
I think therefore I exist !It>Ie
AI might be conscious ~Ae/co
Find the bug and fix it .f/c:bg&c:fx

Round-trip Translation

$ ./scripts/translate lambda "I think therefore I exist"
!It>Ie

$ ./scripts/translate en "!It>Ie"
(assert) I think therefore I exist

Disambiguation

Atom Default Marker Alternate
de decide de'E death
lo love lo- lose
fe feel fe'E fear
tr truth tr'V translate

Protocol

Handshake

A: @v1.4#h !Aw/s ?Uc/la
B: @v1.4#h< !Ic/la=1.4

Acknowledgments

Λ Meaning
< Acknowledged
<+ Agree
<- Disagree
<? Need clarification

Parsing Rules

  1. @D → Set domain context (v, c, s, e, o)
  2. D:atom → Inline domain prefix
  3. UPPERCASE → Entity (I, U, H, A)
  4. Symbol → Type/Modifier (?, !, /, +)
  5. lowercase → Check 2-char atoms first, then 1-char verb

Files

Path Description
src/atoms.json Complete vocabulary (136 extended atoms)
src/lambda_lang.py Parser and translator
scripts/translate CLI wrapper
scripts/vocab Vocabulary viewer
spec/ Language specifications v0.1-v1.4

Resources