Hi everyone!
My name is Shane,
and it's truly a real honor to be
able to speak at EmacsConf.
I love Emacs. I love Emacs Lisp,
and this is also another topic
that really excites me ever since
I got my hands on OpenAI's GPT-3.
Six months ago, I knew that it was
important to research this for Emacs,
you know, asides from being somebody
who never wants to leave Emacs myself,
and I hope that….
Being one of the few Emacs users,
possibly the only one that had
access to GPT-3 for this long,
I hope that I can contribute.
So, Emacs, sorry.
Imaginary programming is…,
it's based on prompt engineering currently,
but it's an abstraction over
prompt engineering.
You can read about prompt engineering
and language models,
that's quite easy to google for.
And imaginary programming is a subfield
of imaginary computing,
which is just the larger domain
of employing of computing
that's based on imagination,
artificial imagination,
so, basically, dreaming up user interfaces
instead of…, or at least partially
dreaming them up.
I suppose that it's a fringe paradigm,
but it's extremely useful.
Imaginary computing,
if you're willing to call it that,
would be what's used to
imagine simulations
for self-driving cars,
as they're trained for example.
But this technology finds
its way to the public,
and it should be in the public domain.
So, Demis Hassabis
he's the founder of DeepMind,
and he did his Ph.D. in human imagination,
now he's working on artificial imagination.
So, just a couple of days ago
I took AlephAlpha's world model API
and I plugged it into Emacs's eww browser,
and now I have a way of generating
text for the images instead of actually…,
so I can stay in my text only Emacs,
which is the way it should be.
Intelligent NFTs, I'll leave this
for you guys to look at.
Information bubbles.
So, there's some potential bad outcomes
from the runaway empowering of these
large language models and other models
in commercial hands.
It's causing information bubbles and
ways of controlling people.
So, for example,
micro tasks and stuff that…,
furthermore just automating away,
or abstracting away the role
of a programmer,
and the automating more and more
increasingly abstract tasks,
and I think the solution is to
decentralize and break up these tasks.
I have a potential way of doing that,
but firstly I'll talk about
the imaginary web briefly
because the thing about these
language models is,
they can replace basically
everything on the internet.
So, like, replace your Wikipedia,
or Stack Overflow,
replace conversation if you want it with,
from real people to chatbots instead,
replace basically anything there's
a website for.
And that means that rich media has gone
from becoming images and video
and even from paywalls
now into intelligent and truthful,
because generating fictional websites
is going to become a very easy thing to do,
and actually the best way to do it,
and the most useful way to do it,
so then you need a source of truth.
The imaginary web is a thing,
imaginary interpreters are a thing,
so you imagine your interpreter,
or you overlay prompting on top of
a real interpreter to see
what you might want to do
in an interpreter,
and what you might want to say to somebody
if you're talking to them.
If you're inside, say,
ERC in Emacs, an IRC client,
and you prompt after somebody
says something,
then the prompt will probably suggest,
what you might say in return,
and then you can prompt like a multiverse,
and you can pick from them.
There's a bunch of crazy utilities
for these language models.
Paracosm vs Metaverse.
So, Mark Zuck wants you to live in
his virtual reality as defined by him,
and he's going to do it
by using these models to make you
a fictional world that you can live in.
You can do that,
or you can use them yourself,
and you build your own Paracosm.
And I think that's an important
ability to be able to have,
otherwise we will be like the borg,
and we'll be connected to Mark Zuckerberg.
Truth is a hot topic.
So, the way that I think we should do this
to decentralize the language models is,
to use Structuralism.
Universal grammar,
template metaprogramming, and GPT-3
what do they have in common?
Well, you have some kind of basis,
like, you train your GPT-3,
and then you do all your prompting
on top of it.
Like a person is born with this grammar,
and then they quickly learn language,
and like with C++ templates,
you pre-process and then
the run time runs on that.
So, anyway, that was a slide.
Structuralism.
I think you can decompile…,
think you can break,
so you can decompose
the language models into units,
but those units won't look like neurons,
they would look like these,
and you put them onto a blockchain.
But you can look at that later
if you want anyway.
I'm going to skip straight to ilambda,
running out of time.
I'll just quickly show you
the ilambda primitive in ilambda.
So, it evaluates instead of run,
for example, here's the reduced function,
and you've defined your
imaginary lambda here.
And it doesn't have a body,
it's just got the comment
and the parameters,
and that's enough for….
Once you have that ilambda
that runs now as a function,
you can stick it into
a reduced function, for example,
and it'll reduce this list.
You could even remove…, yeah,
so you kind of need the comment
otherwise it's too hard to imagine
what would happen next,
but for a function you can literally
have an idefun even without
the argument list.
It was just like generate-fib-sequence,
and most likely when you run that defun,
it would work the way you want it.
The more information you give the idefun,
the imaginary defun,
the better it would capture the task
which you're trying to do,
in this case you want to generate
a Fibonacci sequence.
And yeah, you can define functions
without having a body,
and they run an inference instead.
Here's a way of overriding
the language model that's used,
for example, using dynamic scope.
So, under the hood,
idefun just uses an ilambda.
This function here just doubles things.
So, here's a function that gets you
a hexadecimal color just from the name.
And you can create
arbitrary functions like this,
so, what we need is like a library
of imaginary functions, I think,
that match a language model.
Macros on the other hand,
as different from functions,
they actually macro expand
and generate code.
So, when you macro expand this,
you'll get this,
and that's because this has an arity of 3,
and then when you macro expand
that underlying macro,
it generates the actual source code.
You can actually run these macros,
and it will cache the output…,
it will catch the source code,
so the macro runs the same
every single time,
or generates the same code,
but you can just use it
to generate code really easily
while you're programming.
I hope that this has been informative,
it wasn't too much time,
but there's plenty of material
for you to dig into it more
if you're interested.
Thank you very much
for letting me talk today.
Peace out!
[captions by bhavin192 (Bhavin Gandhi)]