Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AI Resources for LFE

One of the problems users of AI tools face when coding in LFE is the tendency to slip and use Clojure or Common Lisp styles and functions, sometimes even Scheme. Sometimes the slip goes the other direction and the tools attempt to use Erlang syntax mixed in with LFE. This really slows down development and has the effect of spoiling an otherwise good experience.

This section aims to fix those problems with "single page" documents that cover the following:

  • LFE style and best practices
  • LFE syntax
  • LFE functions and macros
  • Erlang functions

The manner in which this information is presented in these documents is structured per the advice of the AI tools themselves as being the most easily digested with the information presented in the most efficacious order. This is the advice we received:

  1. Lead with syntax conventions (what code should look like)
  2. Follow with semantic patterns (how to structure code)
  3. End with architectural guidance (how to organize systems)

Additionally, the documents should be:

  • Scannable - Clear headers and sections, all in a single document
  • Example-heavy - Show don't tell
  • Prescriptive - Clear "Do this, not that"
  • Context-minimal - Assume the reader needs quick reference, not philosophy
  • Quick checklist - Provide a pre-commit verification list