So, hello, and welcome to Lispus Clay, a talk where we do things inside of a list-based buffer
editor that I cannot get working correctly at the moment.
All right, that's close enough, close enough to reality, okay, so, and this was not totally
put together at the last minute already, and so, it's guaranteed to be a great talk.
You can see I anticipated myself screwing up, but not in this particular way.
Hi, I'm the Executive Director of the Sprayly Institute.
We do great things, and most of the time it's not as ridiculous as this.
So, I did some things involving decentralized social networks.
It's probably what I'm most well known for.
I'm the Executive Director at the Sprayly Institute, and I am a Lisp lady.
So, what is the Sprayly Institute?
We're a decentralized networking research non-profit, maybe I can just look at, yeah, I can
just edit it like this.
This is great, this is a work.
We're a decentralized networking research non-profit.
We designed some damn cool tech, so we have a distributed programming environment called
Goblins.
We have a distributed programming protocol that is used by Goblins, and called O'Cappen,
and we have a scheme to Web Assembly Compiler, which will show up several times in the
talks in this room, which Dave and Andy both work on, and we're not a game dev shop, but
you might think so.
We get this question a lot, which is, why are using Lisp Slash Scheme, because a lot of people
seem to think that this is a mistake, actually, if you're trying to develop the future,
you should use something that people actually use, and nobody would use a Lisp Slash
Scheme.
This is the one audience I probably don't need to convince, and yet I'm going to try to convince
you anyway, but some specific things that I actually think this is one of the best decisions
we actually made, and I'm making this argument that Lisp is clay, and so what the heck does
that mean?
Well, I mean, so, you know, it's been around a long time, it's very moldable, and can
make all sorts of things with it, like so many different kinds of things, but what kind
of things can you make with clay?
Well, you can make house, you can make a clay-mation movie, you can make bricks, you can make
a pottery, you can make a sculpture, and those are pretty interesting things, but one of
the interesting things is that you can combine them, so you don't have to choose sculpture
versus pottery, you don't have to pick between those worlds.
You can sculpt, and then you can make your pottery, and then you can sculpt and adorn features
to it, right?
You can compose those things together, but one of the other cool things about clay is that
you can use clay things to make more clay things, right?
You can take, you can make bricks, and then you can put those bricks together, and you can
make a kiln, in which you can make more bricks, right?
And so that's pretty cool, right?
And we like that type of thing, and this is starting to sound a little bit familiar, right?
What is Lisp?
It's an ancient medium, right?
Relative to our field, it's a very versatile, it's timeless in a way, right?
You know, it keeps being useful, or so we are you.
It's very composable, and it's flexible and expressive, and you can make more of it things
with itself, right?
You can use Lisp to make more Lisp things, right?
And that's Andy just talked about doing that type of thing, including, you know, and so
like, I think that's one of the things that's really, like, those are the characteristics,
I think, generally, but what makes it so flexible and powerful?
And I think the general assumption people is that it's because of macros, right?
You know, homoicinicity, right?
You know, like, the fact that, you know, it's editing this structure that itself, and I
think that that's true, but I actually think it kind of gets it backwards, and macros
actually come out of the other property that I think is really essential.
So, is it because of the parenthesis, this, I made this fog too big, and now my examples
don't work.
I'm going to do another e-max thing, I'm going to switch the slide size, I didn't
this.
All right, this is a little bit better.
So, I'm going to do it on my topic.
So, actually, if you, I don't think the parenthesis are actually particularly essential
to Lisp.
So, for example, Arnie's made this nice representation called, with, which is a weight space
to Lisp, right?
And this is still Lisp.
It's literally the same thing in that it's an S expression-based environment, but it's
using indentation to be able to determine, and so, the things on the left translate to
the things on the right, and this is pretty cool.
So, the parenthesis, which, you know, obviously is the most, the biggest selling feature
of Lisp when you're, like, you know, like, would you like to learn Lisp, and people
are like, I don't know, and you're, like, look at all these parenthesis, and they're, like,
I'm in, right?
You know, so, but it turns out that's not the reason.
So, actually, but it does have to do with the structure, but I think actually even more
so it has to do with the uniformity.
So, you get, get yourself a syntax that can do everything, actually, right?
You know, and, you know, the, the, in a certain sense, Lisp is actually really powerful
because it has a syntax that doesn't matter at all, right?
And that makes it matter a lot, which is kind of the paradox of things.
So, let's pull up some examples of, of power here.
So, um, metacircular evaluators, right?
So, um, this is kind of like this, you go, you go through this phase where you're learning
scheme, and we wrote, or, or, unless, then, right, say, who here's read the scheme primer
for this, right?
Instantively, put up.
Okay, you know, a number of people.
So, we wrote this, we put this document out that's, like, a intro to scheme.
Gile, thankfully, has it, like, on the front, you know, if you click docs, it's like the
first recommended thing now.
And, um, and it's, you know, 30 pages that basically goes you from, I don't know anything
about programming, um, to, you write this version of scheme inside of scheme in 30 pages,
right?
And this is, like, a thing that's very, like, that, like, it's kind of an old trick, right?
Like, it's, it basically, that whole, that whole paper is just, like, let me just take
all the parts that I thought were good about, you know, little scheme or instruction interpretation
computer programs, and then just like, like, ran you through it, right?
And, and what's, it's amazing is that, um, the implementation of scheme in scheme, well,
it's not really all of scheme, but it's like close enough that you can, you can technically,
it's, it's, it's, you can do all of the computational power of scheme, right?
And, um, and it's really just 30 lines of code, right?
That's it.
Just wrote our, like, scheme in scheme.
Now, you know, is it really a scheme in scheme?
Nobody's going to actually completely use this thing.
Um, there's a wonderful talk by William Bird, who, who did, uh, many, worked on many
can-run, um, where he, called, uh, the most beautiful program ever written, uh, if you
want to see a, a good list of talk, as opposed to this, help your sculpture, I'm barely
getting e-maxed to work talk.
Um, I really recommend watching that one, and the, what's really interesting is he says,
you know, like, if you take a look at this thing, you know, like, and, and you, you have
this, the cool thing is that you can just change a little piece of it, and then you get
a completely different language, right?
So, okay, cool, we're, you're implemented scheme in scheme line, is that matter, but
we can just change, like, one or two things, and suddenly we get a logic programming language,
where, right, you know, like, you're, you can ask a question and get the answer, as opposed
to, like, saying what to do, right, which is pretty cool, right?
Um, and, um, and, and getting to this part where you get the heart of the program, right,
the heart of the concept of computation, um, it, it's really great.
And the thing is, is that you, you can do this in other languages.
There was a, there was a, there was a port of, um, structure and interpretation of computer
programs, the old scheme wizard book classic, right, um, to, to Python, and, um, the goal
of this was to try to be able to make its ideas more accessible.
I read through it, and I think the problem is, is that it didn't, when you get to the
part, which I think was a really strong part about the book, you know, as I see P, introduces
the, you know, at one point assessment said, you know, I gave some, like, we spent half an hour
teaching people of the language, and then we spend the rest of the course teaching people
about the ideas of programming, right, um, and the, um, when you get to the part where
you're writing this interpreter, it looks like you're trying to force a list into something
that doesn't look like it anymore, right?
So this is where the home identity thing, I think is, is true, it looks like you're writing
the thing that, that's actually the thing that you're, you're dealing with, right?
And I think that this is the thing that, um, the fact that it's kind of a syntax that kind of
doesn't matter, right, because it, it's just, it's just this very simple thing, it's actually
really powerful here, and it'll let's us be able to get very meta about things, right?
And of course, you can do smarter things, you can not just write an interpreter, you could write
an actual compiler and stuff like that. But, um, I still think that this, this kind of magic trick
of the not a circular evaluator is, is reflective of the aspects of computation that, that, like,
that we're able to kind of see and hold in our hands. Um, I, I, I didn't pull up a bunch of
many canoran, uh, examples here, um, but I, I actually would really recommend looking at some of,
um, uh, William Bird's stuff, partly because when I was, I was, I, when I was trying to pull
it up, um, I, I feel like I'm not very good at, like, pulling up, um, examples that are,
are easy to, to understand in a couple of lines. But what's interesting is that many
canoran's, it's like, prologue, basically, that you can do in scheme. But what's interesting
is that if you go to the, the many canoran website, they have a ported to a bunch of other languages,
and it kind of doesn't really, like, look good in, like, a lot of other languages. Like,
it doesn't, it doesn't look good, and, and I, and it's kind of like, well, well, why doesn't
it look good? And part of the reason is that, um, because this has so few opinions about how
things should look when you embed a different programming paradigm inside of it, it still looks like the
same, you know, bunch of mud, right? You know, like, we'd effectively, that's what clay is. It's mud
that you can do cool things with, right? Um, and, and this whole line of Lispus clay is actually a riff
off of a popular old phrase, which is in the Lisp community, which is, um, which is that, you know,
Lispus a ball of mud, and this goes all the way back to, like, MIT, where they're like,
there's this debate about algal, right? You know, the number one language today, right? Which,
like, this beautiful language with these very specific syntax in it and stuff like that,
and they're like, well, it's like, it's like a diamond. It's a beautiful language, but, like,
if you try to add a diamond to another diamond, you can't, right? Um, but you can always add more mud
on top of a ball of mud. So Lispus is a ball of mud, right? So we have this, we have this, but
I feel like mud is really, it's really, it's really kind of like, you know, devaluing things here.
And one of the really thing, the cool things I think about Lispus, is, you know, we have quasi-quote,
right, which is a templating system. And, you know, here is, um, so if you saw, uh, the talk of Jessica
and I gave yesterday about, um, about, you may have heard that there was a first implementation
of activity pub to be able to pass a test suite with written in, in Gile, actually, in scheme.
I wrote it, you know, to be able to make sure that, like, the idea's work. And, uh,
it had some cool ideas. Like, for example, right here, it says define AS method. That means
activity streams method. Now, this is the macro that's specific, because I wrote a, um,
generic method system that understood the activity streams type hierarchy, which is the vocabulary
that activity pub talks to each other. And it would basically, like, look at the type hierarchy,
kind of, like, if you've used Goops or Clost or something else like that, how it, um,
knows about the type hierarchy and, and you can write these generic methods. And so it's basically
like that, so that I could write these functions to that, you know, you can process incoming
activities. So if somebody favorite something, you can run the right logic. If somebody telling you
that they created something, you can run the right logic. And this one's saying, um, you know,
like, this is, this is a template for the HTML representation. And, and so it's saying,
okay, well, here, this is coming up in your feed. And it says, you created something. So this
person created something. They're telling you that they created it. Well, what you should do is you
should create this div. And this is, you know, HTML effectively. But it's HTML that just looks
like the same mud we make everything else out of in less, right? And we have this template,
where we backquote. And, um, the, the commons are where you move out of the data mode and you move
and you move into, like, execution mode. So, you know, it can pull things out of the activity
streams thing. And I think there's a couple of cool things about this. One of them is that, you know,
it wasn't difficult for me to extend the language to add a generic, like, a generic method
system that was specific to activity pop, right? I could do that really easy. It didn't take
me along at all, right? Um, and the other cool thing is that I'm writing HTML. I didn't need to
use, like, Ginger II or Django's templating language or something. I'll select that. I didn't
have to leave scheme. And that's one of the things that I thought was really nice about it, right?
And it was, it was really fun to work on this project. And like, this, this would get more complicated.
If you're, if you're creating a method for, um, you have to create on the outside, but you want
to render something like a video thing on the inside. Well, you know, then I define an activity
streams method for a video thing. And this opens up with a lot of expression that does a lot
more complicated things as in terms of pulling out, you know, like this list and everything. And then
okay, I want to get these source lists and it walks through the information from the activity
stream structure. And then, um, at the end, you know, kind of composes it together and it does
this back quote and it builds up some XML again. But there's FXML up here too and it can just kind
of compose these things together. So we hear we don't have to be, like, in Python, if I'm wanting
to move between this world where I have, um, the HTML templating area and the Python logic, right?
I have to kind of, like, step into one world and then step out and then step in and step out because
they're two different languages. So don't really talk at the perimeter very well, right? I don't
have to do that here. And like, um, and this quasi-quote thing, which Elizabeth has, for effectively
ever, um, turns out to be good enough to be able to do this type of thing. So FXML, since I didn't
explain what it is, it's an XML templating system for, um, as expressions, symbol of the
parenthetical expressions. And, and, and it's great, right? By the way, just, this is just a fun
side note. Um, you can have these tombstone objects. These things are deleted. I thought that
Pubstrate had the funniest version of this because they had an ask your, um, uh, a thing where it
would put a grave that said two of the unknown activity streams object. But it would also use the
templating thing to be actually grab out the ear and then dump it right in there when the thing
died. But you don't know when it was created. Effectively, all you care about is that it's death,
right? Um, this object has been deleted, right? And so that type of thing's pretty cool. All right,
now to, um, piss off anybody who's a fan of Nick's in the room because I'm going to talk about
why Geeks is better. Um, so, so Nick has this whole template, it has this whole, uh, a special
language for writing package definitions, right? And, um, and it's, like, a lot of other worlds
when you're not in this, the first thing people say when they're like, okay, I'm going to solve
a problem. I'm going to create a domain specific language. The first thing I want to do is I really
want to think about what's the syntax looks like, right? And I'm like, I hate that. I don't want to
do that. I want to just the same garbage I use for everything else. And so this, there's a special
syntax. I have to learn a new syntax. Now, I don't want to do that. I'm way too lazy. Um, but, but one of
other really, the thing that I really do not like about Nick's is that it combines multiple
domain specific languages into the same file. It's kind of like, if you have, if you, like,
HTML did this too, right? And now, nobody does it anymore, almost. But you can have an HTML page
that has JavaScript and CSS embedded in the same places. And it's gross. You like, move into this
place where it's doing one language and moves out, move back in and move back out, right? And you
do, I don't like it. And so, here we have the same thing where we're defining things as a
declarative way. And then suddenly we're doing writing bash, right? You know, like, we're running
born shell. And it's like, I don't like this. So, like, here's the delicious thing that
happens in geeks is like, um, instead, um, I go over here and I hit tab, expand this out. And it's like,
oh, okay, here's, here's some package. And then when we get to the part where it's going to, like,
do some logic. Ah, it's the same frickin thing. I do everywhere else. It's just the parentheses.
But it also composes together. And this is one of the big things, I think, composition between
languages is essential. Um, uh, I'm actually going to jump out of order in my presentation.
And then jump down to, um, the rest of this talk is a choose during an adventure. Um, so we're
going to, I'm choosing to have part of the adventure in a, ahead of time. But I spent a, you may,
I spent, uh, five minutes left. Okay, I spent a while in racket lane at land. And they have this
hash-lang thing. And it's pretty interesting because you can make a new language with its special
syntax. And people are like, oh, I can't wait to create my special syntax and, and everything.
And, um, and then you've got effectively. But what, what they really most end up being is a library
with a special syntax attached to it in a default set of imports. But you can't combine hash-langs
together very well, right? You have to do the same, remove into one world and move out and move into the
other world and move in and move out. And that's not, that's not great to me. This is where I think
that, um, and so I'm going to give a couple more examples. Hoots compiler actually does this. So,
so Andy was mentioning that, you know, like, like, effectively, web assemblies, a kind of list.
And so when we're compiling to web assembly, we can use quasi-quote. And we just actually write web
assembly right inside of the code that's compiling to web assembly. And then we've got our own
assembly and it writes it out and everything. And so whoets compiler, we don't have to leave the
world of scheme to be able to construct this type of thing. And I think this is great. This is really
good. Um, and, um, in goblins itself, the, you know, probably the main thing that we, we use here.
Here's where I said, I don't think it's macros mostly. And goblins, people are like, oh,
so you chose list and it's because you wanted to write a lot of macros. Goblins, we have a
policy at the Spritly Institute. Macros are never required. You always have to have a
programmatic procedure, like, procedure, oriented API first. And the macros are sugar for convenience,
right? You have to always be able to do the things that you can do without macros. Um, you know,
and at least one of my co-workers doesn't even, didn't even like macros for a long time. Just come
around to it. But, um, but, like, but, you know, like, here, here is something where, you know,
I can, I can have this cell, and I can use methods, which is a macro, but it's not essential.
I could write the same thing with a case lambda, um, or I could actually pattern match against this.
It's not that hard. Having the mac, the methods thing is a convenience. But, but, so why do I
care so much about, um, it being in scheme? And the actual reason is, it's actually this. When we,
we have a number of things for, like, spawning a new object, invoking an object, sending a message
to an object, or doing things like sending asynchronous messages and setting up the callback.
And when, when I was a Python Easter in my daily life, there were, um, at one point I used high,
which was this list that compiled the Python. And one of the things that really blew my mind was that,
like, I would sit there and pray to the programming language gods that they would add a new feature in the next release,
including when, um, when a, when Python ended up getting this version of co-retains with a weight,
like this, and really nice syntax for it. And high managed to, when we were working on high,
they, uh, the, uh, the Paul Tigly Monty managed to backport a weight to Python too, which didn't even
have this feature inside of the, so that the same code could run on top of the list,
that actually, uh, for Python 2 and Python 3, Python 2 didn't have a weight. We didn't have
to pray to the programming gods for it to show up. Um, and it looked just as good.
One of the things that happens in most languages is that when you have, um, when you try,
you try to create the special syntax thing there, you're like, this is a new feature to language,
we're going to decide how it looks, right? You know, we're going to frame it, we're going to say,
this is, you know, like, this is what it feels like. But instead of doing that, we just use the same
crap that we use everywhere else, right? And so it just looks just as good as anything else in
scheme, because it's just the same thing, right? It's uniformity. Um, I think there's a number of
other clay-like things. One of the nice things about clay is it's a medium in which you can take
something, and you can discover it as you kind of build with it, right? It's a, it's a beautiful
medium where you don't have to have pre-planned everything. It's not like a sculpt, it's not like
building is sculpting out a rock, right? If you're sculpting out marble, you have to have a good plan.
If you're building something with clay, you can be like, oh, I actually feel like I should add this
thing to it. I should move it around. I should bend it like this. And the emphasis on live hacking
on repels and everything like that, which is actually not, it's sort of related to the syntax,
but it's also a cultural aspect, the care of exploratory programming. That's, I think, one of the
things that's really essential. So why was it essential to sprite the institute used list?
Because we're trying to develop the future of the internet. And in many ways, we were
all the ones circles even around some of our colleagues at other organizations who are in JavaScript,
et cetera, and because we could just implement features very easily that we're taking them years
to get the, the essential syntax and design that's set up through committee, and we could just
do it with a team of very few people, because we have the freedom to sculpt the right answers.
If you look at, I think there's a reason that we keep drawing on the history of like MIT and the
Stanford AI labs and stuff like that for a long time computer science is continue to to mind those
spaces. And I think that that's, in my opinion, that's because if you want to discover the future,
you want to have an expressive medium in which you could discover the answers through exploration.
And I'm going to say that's the enemy at my, my talking. We have time for Q&A?
Yeah, of course, and they think they're going forward.
Any questions?
Now.
Okay.
Why? Why?
My eyes.
Why giles specifically?
I was in Gile Land for quite a while with Geeks and, et cetera, before starting Sprayley.
And actually, we moved to Racket, or when I started Sprayley, I actually started in Racket.
And one of the reasons was, is that I kind of perceived it as being kind of like the Python
of list as much more accessible. And actually, for the reasons Jessica is very talked about being
concerned about about having editor support with Dr. Racket made it a lot easier for people to pick up.
And actually, one of the reasons we moved back to Gile was because it became a little bit
less clear whether or not the focus in Racket was going to be on keeping the same support for
us expressions to the same as a first class citizen in the same way. And to me, that's really important.
There are a number of other reasons also. But anyway, we wanted to be close to the Geeks community
and other things like that too, which I think have been really important. I think Gile has a
wonderful ecosystem around it. And it's great that we're very well connected to many people in this
room who are very friendly and receptive to us talking about things. And so, yeah, that's why.
Here we go there. Oh, no, it's my resolution. Oh, messed up. It's going to screw everything up.
Oh, you've been here for a minute.
you