Pen.el (Prompt Engineering in Emacs)
Introducing Pen.el
The pen of imagination - |:ϝ∷¦ϝ.

- See most recent tutorial
- https://semiosis.github.io/posts/pen-el-tutorial/
Pen.el
integrates LMs (Language Models) such as OpenAI’s
GPT-3
or EleutherAI’s GPT-J
into emacs by
generating functions from prompts that map
emacs’s corners loosely onto LMs. These
functions can be used interactively or non-
interactively and in a variety of configurable
ways. Pen.el
also facilitates the creation,
development, discovery and usage of prompts.
It’s completely free, libre and open-source.
Pen.el on GitHub | https://github.com/semiosis/pen.el/ |
Project timeline and objectives | https://github.com/semiosis/pen.el/tree/master/docs |
Prompts on GitHub | http://github.com/semiosis/prompts/ |
Tutorial | https://semiosis.github.io/posts/pen-el-tutorial/ |
Demo video | Augment Minds 2021: Demo of Loom and Pen.el - YouTube |
Discord channel invite | https://discord.gg/JwKGbAdNHR |
Thesis | https://github.com/semiosis/imaginary-programming-thesis/blob/master/thesis.org |
Glossary of imaginary programming | http://github.com/semiosis/glossaries-gh/blob/master/imaginary-programming.txt |
Further introduction
Pen.el
is Google search, stackoverflow,
Grammarly, Copilot, conversion.ai
, mind
mapping software (based on GPT-3) etc. all
rolled into one package and allows you to
extend emacs with GPT wherever your mind takes
you. It’s a LM (Language Model) that can generate
multiversal continuations of text according to
probability from the data that it was trained
on.
Pen.el's
domain specific language examplary
also helps
you to generate your own prompts using known
design patterns and minimal inputs and
description. It does this by weaving prompt
functions into each other.
Vision
At its heart, emacs is an operating system
based on a tty, which is a text stream. emacs
supports a text-only mode. This makes it
ideally suited for training a LM such as a GPT
(Generative Pre-trained Transformer). emacs
lisp provides a skeleton on which NLP
functions can built around. Ultimately, emacs
will become a fractal in the latent space of a
future LM (Language Model). A graphical editor would not
benefit from this effect until much later on.
emacs
could, if supported, become the
vehicle for controllable text generation, or
has the potential to become that, only
actually surpassed when the imaginary
programming environment is normal and other
interfaces can be prompted into existence.
Between here and now we can write prompt
functions to help preserve emacs.
Backstory
Pen.el was imagined contemporaneously between myself and Laria.
- Creating a playground for GPT-3 in emacs
::
- Pen
::
Moire (Laria’s blog)
Here is a story by prompt researcher Laria, written in collaboration with GPT-3
.
|
|
This article was written by my amazing
dopplegänger, |:ϝ∷¦ϝ
(Laria), in advance and
in collaboration with GPT-3 using
Loom.
- Pen and Loom:
I credit |:ϝ∷¦ϝ
for writing Pen.el into
existence, but also for her encouragement and help!
The Tower of Babel

|
|
Documentation
Journal
07.07.21
The project has been excised from my main emacs.d
.
Now the plan is to incorporate the backend of
loom
so the completions are faster and there
is less reliance on shell scripts.
08.07.21
A zone plate has been chosen as the minor-mode lighter.
This is because |:ϝ∷¦ϝ
likes zone plates and also used it as the logo to loom
.
12.07.21
First successful docker run.
14.07.21
Released a new version of pen.
Hopefully get some more views.
https://news.ycombinator.com/item?id=27818854
Getting haircut today.
03.08.21
GPT-J Support via AIx.
If this article appears incomplete, it may be intentional. Try prompting for a continuation.