- Please contribute as this is an open source project! It’s very hard to find free prompts online currently and that’s because everyone is out for themselves. Please support open source. Thank you.
This is a demonstration of an imaginary programming environment. There may be nothing else like it in the world today.
The world needs to get ready for the next
generations of Large LMs, such as
Indeed, they will be able to dream up the
entire experience of a textual user interface
by inferring how it changes based on keyboard
input. That is because a
tty is simple text
A current generation GPT trained on
recordings would most certainly probably be
able to do this already, but with
future LMs comes convenience in the form of
An imaginary programming environment is one of the supported features of
What does it mean to be imaginary?
Several of the components of a normal programming environment are replaced by functions that infer rather than evaluate.
These components are replaced by GPT-3 and Codex prompts.
- linter, (https://mullikine.github.io/posts/an-imaginary-linter-with-codex/)
- indenter/reformatter (https://mullikine.github.io/posts/a-syntax-corrector-with-codex/)
- code completion (https://mullikine.github.io/posts/how-to-use-pen-el-to-autocomplete-your-code/)
- interpreter (https://mullikine.github.io/posts/an-emacs-imaginary-interpreter-with-history-completion-and-evaluation/)
- function lookup (https://mullikine.github.io/posts/select-function-with-signature-help-from-nl-using-codex/)
- commit message generator (https://mullikine.github.io/posts/a-git-commit-message-generator-with-codex/)
- refactoring (codex playground style) (https://mullikine.github.io/posts/transforming-prose-and-code-in-a-generic-way/)
- recommendation (https://mullikine.github.io/posts/imaginary-real-codex-complex/)
- code generation
- functions by NL (https://mullikine.github.io/posts/language-agnostic-code-generator-in-pen-el/)
- purposeful one liner generation (https://mullikine.github.io/posts/generating-perl-one-liners-using-gpt-3-and-pen-el/)
Imaginary seems to be a good word because:
- GPT-3 is imagining the environment, the code and the output.
- the languages are kinda like imaginary numbers. They are all understood within the same language model, kinda like a coordinate space.
- It lets you be very imaginative!
- There are no interpreters or compilers being used but you can still generate code using words and evaluate code by inference.
- All requests take the same amount of time to run.
- All languages have equally facilitated environments.
- You may program in any language.
- It runs broken code.
- One day you may design new languages within the latent space of GPT-3, without doing any programming.
- You may have an interpreter for languages with no interpreter, such as C++.
- You may have code completion for scripting languages without a completion engine.
- You may use it for languages which are dead and an interpreter is not available.
- It’s great for thought experiments.
According to Wikipedia, literate programming is a programming paradigm introduced by Donald Knuth in which a computer program is given an explanation of its logic in a NL, such as English, interspersed with snippets of macros and traditional source code, from which compilable source code can be generated.
The approach is used in scientific computing and in data science routinely for reproducible research and open access purposes.
Literate programming tools are used by millions of programmers today.
- Literate programming
Imaginary programming (IP) seems to be orthogonal to literate programming. Imaginary programming is a programming paradigm in which a computer program’s behaviour exists in relativity to LMs. To make an analogy, imaginary programming is a type of programming, where much like pure- functional, the code who’s behaviour depends on the output of a LM, either pending or precomputed, stands apart from the part that has no such association.
What is deemed imaginary is code that uses or is waiting on output from a LM and its behaviour is so altered by it. What is deemed ordinary is code which is not imaginary.
A distinction is made between grounded and non-grounded imaginary programming. Non-grounded imaginary programming may also be called pure imaginary programming.
If a function has a LM as a parameter affecting its behaviour and besides from that has no other imaginary inputs then it is considered grounded. If a function has a LM as a parameter affecting its behaviour and contains other imaginary inputs then it is considered tethered'.
If an imaginary function relies on the output of functions that have in the past used a LM as a parameter, but does not contain a reference to specific LM used then it is considered non-grounded or pure imaginary.
A function can be both tethered and pure imaginary.
Pure imaginary code is still code in a similar way to how pure functional code is considered code and may be used to create useful datastructures and algorithms.
Ordinary programming is programming with functions that do not have an imaginary dimension (they do not take a LM as a parameter and the result of ordinary code is not polluted by a LM).
Holographic programming is like imaginary
programming but where the LMs are trained on
software. Holographic code, therefore, may
employ associations made between elements of
the original code, how that code is used and
how it is described, to build applications.
Holographic programming lets you use the
latent space of a LM as a kind of hyperspace
to enable things like:
- bridge the usage of an application with the application’s code
- imaginary reflection
- inference in place of computation
Some of the plumbing, including the
interpreter and the autocompletion system are
Latest GPT-3 Demonstration (Aug 25, 2021)
Original Demonstration (April 2, 2021)
Prompts and demonstrations
Linter (Update: Sep 1, 2021)
Reformatter and Syntax corrector (Update: Sep 1, 2021)
This prompt initiates the imaginary interpreter / REPL.
This prompt is part of the interpreter conjugator, and enables the imaginary interpreter to continue the “conversation” more optimally than the kickstarter prompt.
Conjugation is comprised of melding and a sliding window.
iλ, a family of imaginary programming libraries
- Interop with language models in your code.
Examplary (a example-oriented programming language)
- Generate prompts.
If this article appears incomplete then it may be intentional. Try prompting for a continuation.