WEBVTT

00:00.000 --> 00:10.000
Hi, so I'm here to present valence.

00:10.000 --> 00:14.000
It's a programming language that borrows from natural language to expand the expressive

00:14.000 --> 00:16.000
power of code.

00:16.000 --> 00:20.000
Specifically, it addresses two glaring emissions in the existing language landscape.

00:20.000 --> 00:24.000
A structural ambiguity and homonomy, which together are very, very powerful.

00:24.000 --> 00:27.000
And these are things that we take for granted in spoken language.

00:27.000 --> 00:31.000
So, basically what I mean by structural ambiguity is sentences like

00:31.000 --> 00:33.000
Billy saw the group with a telescope.

00:33.000 --> 00:37.000
So, the ambiguity lies in the grammatical construction.

00:37.000 --> 00:41.000
When we say this, is Billy peering at the group through a telescope or did he happen to walk

00:41.000 --> 00:43.000
by, as the group was doing some stargazing.

00:43.000 --> 00:47.000
We can leave this ambiguous in spoken code, is spoken language.

00:47.000 --> 00:51.000
But in code, you know, there's some order of operations that will select one interpretation.

00:51.000 --> 00:53.000
That's supposedly more correct than the other.

00:53.000 --> 00:55.000
But what if we want it to be both ways?

00:55.000 --> 01:01.000
And then homonyms, the ability of a single word to have multiple meanings,

01:01.000 --> 01:04.000
which is used very powerfully in poetry.

01:04.000 --> 01:09.000
I like the example of Yoko Ono's fly piece, where fly has a accumulation of meanings

01:09.000 --> 01:15.000
over time between the physical, the metaphorical, an actual fly, and her film.

01:15.000 --> 01:19.000
And this is basically a short program for human beings to carry out.

01:19.000 --> 01:24.000
Which tells us to fly, it means a whole bunch of different things.

01:24.000 --> 01:29.000
So, what if we want to make poetic use of these double meanings and code?

01:29.000 --> 01:33.000
This is what I aim to solve with the valence programming language.

01:33.000 --> 01:36.000
So, naturally, to build a Vaxicon for this,

01:36.000 --> 01:39.000
I decided to use ancient Greek measuring signs.

01:39.000 --> 01:42.000
So, this is the alphabet that we're working with.

01:42.000 --> 01:47.000
It's eight symbols, and each one has a whole bunch of different meanings.

01:47.000 --> 01:49.000
So, I'll get to the moment.

01:49.000 --> 01:52.000
These are the only signs that it recognizes apart from square brackets,

01:52.000 --> 01:55.000
which you can use to disambiguate when needed.

01:55.000 --> 02:00.000
And so, each one of these can be used in different ways, either with no parameters, one parameter, or two parameters.

02:00.000 --> 02:04.000
If it has one, then it's a prefix, so the next thing.

02:04.000 --> 02:07.000
Or if it has two parameters, then it's in-fix.

02:07.000 --> 02:09.000
So, it's what comes before, and what comes after.

02:09.000 --> 02:12.000
So, you can see here's one line of code over there to the right,

02:12.000 --> 02:15.000
and two different interpretations broken out with the brackets.

02:16.000 --> 02:19.000
Except that I lied, there's actually not two, there's four,

02:19.000 --> 02:23.000
because each of these symbols is both a variable,

02:23.000 --> 02:25.000
and it's also a literal value.

02:25.000 --> 02:29.000
And of course, it's in octobes since there's eight signs.

02:29.000 --> 02:31.000
This isn't highly accidental.

02:31.000 --> 02:33.000
If it had turned out that it would have been,

02:33.000 --> 02:36.000
I could have fit all the functionality that I wanted in seven signs,

02:36.000 --> 02:40.000
this would have been all in base seven instead.

02:40.000 --> 02:43.000
So, I'll show you how this breaks down.

02:43.000 --> 02:50.000
So, in this example here, basically, if what it's a prefix,

02:50.000 --> 02:55.000
the first one is the commands, the first symbol, and that's an if statement,

02:55.000 --> 02:59.000
it's converting it to an integer, the next, that's what the middle sign is doing,

02:59.000 --> 03:03.000
and then it's taken as either the variable reading or the integer reading,

03:03.000 --> 03:07.000
which the integer reading is just the octol digit.

03:07.000 --> 03:11.000
And for the other reading, the middle symbol is the commands,

03:11.000 --> 03:15.000
and so it's assignments, and it will sign either the octol digit,

03:15.000 --> 03:20.000
or the, you know, deraff of saying that is from the variable.

03:20.000 --> 03:24.000
So, this is all the different signs, and their values right now,

03:24.000 --> 03:25.000
commands are in green.

03:25.000 --> 03:28.000
There's one command per line, expressions are in blue.

03:28.000 --> 03:31.000
The color before the sign is how it's read,

03:31.000 --> 03:33.000
and after the parameter sent it requires.

03:33.000 --> 03:37.000
Orange is variable, yellow is an octol in white for type.

03:38.000 --> 03:44.000
One of the nice things about this is that you can sort of calculate all of these things,

03:44.000 --> 03:48.000
so that if it's expecting a type, you can actually have that as an expression

03:48.000 --> 03:50.000
that resolves to a number.

03:50.000 --> 03:54.000
That number is then converted, it's forced into an integer,

03:54.000 --> 03:58.000
and then we go mod 8, and it resolves about these signs,

03:58.000 --> 04:01.000
and then that is the type that it gets assigned.

04:01.000 --> 04:05.000
So, in terms of what this looks like in the interpreter,

04:06.000 --> 04:07.000
it looks like this.

04:07.000 --> 04:11.000
I realize that not everybody has ancient Greek measuring signs on their keyboard.

04:11.000 --> 04:15.000
So, you can actually type with these taken from the Quarty keyboard.

04:15.000 --> 04:18.000
It's all with the left hand, or if you want to do it in your phone,

04:18.000 --> 04:23.000
you have buttons to the upper right, and this is what it actually looks like

04:23.000 --> 04:25.000
to type in what I just shown.

04:25.000 --> 04:28.000
As you type, it's sort of generating in different readings,

04:28.000 --> 04:31.000
and it will run the ones that are resolvable.

04:32.000 --> 04:37.000
They turn red like that, if it opens a block that never closes,

04:37.000 --> 04:40.000
and you can hide the non-runable ones if you don't want to see those,

04:40.000 --> 04:43.000
the ones that are not complete.

04:43.000 --> 04:48.000
Now, not everyone might like the idea that you need a single,

04:48.000 --> 04:51.000
that this line of code with a single symbol,

04:51.000 --> 04:53.000
only has one resolution.

04:53.000 --> 04:56.000
So, you can sort of get around that by using

04:56.000 --> 04:58.000
a job and go to instead.

04:58.000 --> 05:01.000
And, you know, there's some people who just don't like structured programming,

05:01.000 --> 05:03.000
and I'm not here to judge.

05:03.000 --> 05:07.000
So, you can sort of just jump a certain number of lines away,

05:07.000 --> 05:09.000
or you can go to a label.

05:09.000 --> 05:13.000
And, of course, that also can take an expression

05:13.000 --> 05:15.000
so that you can de-reference a variable,

05:15.000 --> 05:20.000
and go to the number that is the integer equivalent of whatever

05:20.000 --> 05:24.000
the expression results to mod 8.

05:24.000 --> 05:27.000
So, let's see what this looks like in sort of a go-to situation.

05:27.000 --> 05:30.000
Now, we have two different versions of the program

05:30.000 --> 05:32.000
that end up with different results

05:32.000 --> 05:34.000
because they go to different labels.

05:38.000 --> 05:41.000
So, this is how we sort of create these alternate flows.

05:41.000 --> 05:45.000
And, I have this QR code, which is a little cutoff maybe,

05:45.000 --> 05:47.000
for the repo, but it's also on the site.

05:47.000 --> 05:52.000
So, you might not always want a reading as both a literal

05:52.000 --> 05:55.000
and a variable, luckily, we have a sign for the referencing

05:55.000 --> 05:58.000
and one for forcing the literal reading.

05:58.000 --> 06:00.000
It's seen kind of see both here.

06:02.000 --> 06:06.000
And, we use this all the time in valence, those two signs.

06:06.000 --> 06:08.000
So, one of the inspirations for this, of course,

06:08.000 --> 06:10.000
is the classic polyglot program,

06:10.000 --> 06:14.000
the program that runs in multiple languages.

06:14.000 --> 06:17.000
This is sort of like writing a polyglot for one language,

06:17.000 --> 06:19.000
where you get different results.

06:19.000 --> 06:22.000
Another inspiration is the Conlang Uo.

06:23.000 --> 06:27.000
It was created by Sonio Lang, that are known for her work

06:27.000 --> 06:29.000
creating the Toki Pono language.

06:29.000 --> 06:32.000
But I really believe that Uo is her masterpiece.

06:32.000 --> 06:34.000
It's a language written with all vowels,

06:34.000 --> 06:36.000
where every word is a hominin.

06:36.000 --> 06:38.000
So, you can have a whole conversation with someone else

06:38.000 --> 06:41.000
and not realize that the two of you are talking about completely different things.

06:41.000 --> 06:46.000
So, I love you as said the same way as I flatten myself.

06:46.000 --> 06:51.000
So, like Uo, it's valence as a language of chance associations.

06:51.000 --> 06:55.000
And it's also often a language of accidental algorithms.

06:55.000 --> 06:57.000
Here's how the type system works.

06:57.000 --> 07:01.000
If you divide two by four, as we'll see, you get one.

07:01.000 --> 07:06.000
This is because every operation resolves to the type of it's not parameter.

07:06.000 --> 07:09.000
In this case, it's the integer two.

07:09.000 --> 07:13.000
Now, dividing two by four and getting one, that's pretty good.

07:13.000 --> 07:17.000
But if you want to be, if you're really like a stickler for detail,

07:17.000 --> 07:21.000
we can force to enter a ratio and then you get one half.

07:21.000 --> 07:24.000
So, I know that went a little bit fast, but we ended up with one half down here.

07:24.000 --> 07:26.000
Not sure how well people can see this.

07:26.000 --> 07:30.000
But basically, sort of at the bottom of this,

07:30.000 --> 07:35.000
at the bottom of this here, it gives you what the status of all the variables.

07:35.000 --> 07:36.000
There's always eight variables.

07:36.000 --> 07:39.000
They start off numbered zero to eight, zero to seven,

07:39.000 --> 07:43.000
rather, and then at first one came one at the end.

07:44.000 --> 07:50.000
So, this whole thing about forcing values.

07:50.000 --> 07:53.000
So, here's an example of sort of a more complex line of code.

07:53.000 --> 07:56.000
And you can see how some of the interpretations look a little strange.

07:56.000 --> 08:02.000
What does it mean to say, for example, like a six minus zero equals one minus seven?

08:02.000 --> 08:07.000
This is actually an assignment, the left side of this resolved to six,

08:07.000 --> 08:11.000
and then that translates to the six variable.

08:12.000 --> 08:16.000
And this is how we de-reference things, how this works.

08:16.000 --> 08:20.000
But for you this, we're assigning over and over again to this number,

08:20.000 --> 08:22.000
which we write with a D.

08:22.000 --> 08:25.000
But then we do the D reference thing, and now what D holds,

08:25.000 --> 08:28.000
which is six, is the one that we type with a Z,

08:28.000 --> 08:30.000
and it gets assigned to that instead.

08:30.000 --> 08:33.000
This is the way we can sort of use these things in concert

08:33.000 --> 08:36.000
to create kind of a delightful ambiguity.

08:36.000 --> 08:40.000
Now, one of the great choice of valence is that you don't need to start a program

08:40.000 --> 08:42.000
with a particular purpose of minds.

08:42.000 --> 08:46.000
You can just sort of key match with your left hands and see what comes out.

08:46.000 --> 08:49.000
And then maybe a lock it down with brackets if you want.

08:49.000 --> 08:53.000
Here, I'm creating something that creates like 400 interpretations,

08:53.000 --> 08:58.000
and then we can run them all, and they will all run depending on how fast your browser is.

08:58.000 --> 09:03.000
You'll notice that there's a few programs that are doing similar things.

09:03.000 --> 09:06.000
Oh, there's a few that have some undefineds, I saw there.

09:06.000 --> 09:11.000
This project still has some things I'm still developing in the interpreter,

09:11.000 --> 09:15.000
mostly support for Qs, which is not 100%.

09:15.000 --> 09:20.000
So, basically, if you're going to use this language to write your production code for banking software,

09:20.000 --> 09:23.000
or whatever, you probably need to wait like a couple of months,

09:23.000 --> 09:26.000
and then we should be there.

09:26.000 --> 09:30.000
This is what, this is my major sort of to do this.

09:30.000 --> 09:32.000
The interpreter is 80%.

09:33.000 --> 09:36.000
And I'm thinking of adding sort of a trade operation,

09:36.000 --> 09:41.000
where two signs can trade a subset of their interpretations within that program,

09:41.000 --> 09:48.000
so that you can kind of create like more meaningful ambiguity where you want.

09:48.000 --> 09:51.000
This has gone through many iterations.

09:51.000 --> 09:56.000
This project already, the first version of this, had a grammar that led to a single line of code

09:56.000 --> 09:59.000
that would, you know, have like 10,000 interpretations.

09:59.000 --> 10:04.000
So, I had to sort of really lock it down and be much more precise with the way that I created this.

10:04.000 --> 10:10.000
At this point, the grammar is complete, and it's mostly sort of interpretive things that I'm working on.

10:10.000 --> 10:12.000
And we saw a few minutes left.

10:12.000 --> 10:16.000
I should mention, well, I never would be upset if I did not mention that.

10:16.000 --> 10:19.000
I do have a book coming out in the fall, which has this language,

10:19.000 --> 10:24.000
and 43 other programming languages of mine, to be called 44 SLA,

10:24.000 --> 10:26.000
the Art of S. Tart Code.

10:26.000 --> 10:28.000
The QR code to the left is my mailing list,

10:28.000 --> 10:33.000
and the one to the right is for the book itself.

10:33.000 --> 10:36.000
And that's all I have. Thank you very much.

10:55.000 --> 11:00.000
Are you planning to write a web framework with this?

11:00.000 --> 11:05.000
Oh, yeah, absolutely. Well, if, you know, if no one else does it before me, then, you know,

11:05.000 --> 11:07.000
I mean, the thing is that when you create a programming language,

11:07.000 --> 11:10.000
you never know how other people are going to use it.

11:10.000 --> 11:14.000
Someone's already written a web server and brain fuck, right?

11:14.000 --> 11:18.000
So, you know, that's totally, that's totally possible.

11:19.000 --> 11:27.000
A popular view in language research is that ambiguity exists,

11:27.000 --> 11:34.000
but is solved in interaction, in clarification, et cetera.

11:34.000 --> 11:41.000
Is it, do you have like a type of, because you have multiple interpretation?

11:42.000 --> 11:48.000
But is it, do you have some form of clarification to be understood,

11:48.000 --> 11:54.000
and to really understand what the language is saying?

11:54.000 --> 11:59.000
Yes. Well, so, like, you know, any, like any programming language,

11:59.000 --> 12:03.000
it'll have formal rules around how these things combine.

12:03.000 --> 12:08.000
So, for instance, you can't do things like open two blocks,

12:08.000 --> 12:12.000
and then close it once and have a version where each one of them opens,

12:12.000 --> 12:16.000
like an F statement and a while statement with and one closing block.

12:16.000 --> 12:22.000
It's not going to work. So, the grammar, you know, kind of defines that that's not really valid.

12:22.000 --> 12:28.000
But in terms of the other combinations, you know, I sort of expect that for most people,

12:28.000 --> 12:32.000
the easiest way to do this is to sort of mess with it until they sort of get

12:32.000 --> 12:37.000
different results and sort of discover all the sort of hidden things about the language.

12:37.000 --> 12:40.000
But of course, it will be, like, fully defines.

12:40.000 --> 12:45.000
So, if people want to see this, this rules, they are all spelled out.

12:45.000 --> 12:49.000
And basically what I'm showing here in the browser, this version of the interpreter,

12:49.000 --> 12:51.000
this is all in the GitHub repo right now.

12:51.000 --> 12:57.000
If people do want to try it.

12:57.000 --> 12:58.000
Is this on?

12:58.000 --> 13:01.000
Are you thinking of implementing to come from statement as well?

13:01.000 --> 13:06.000
Well, I am a big fan of come from, it is very tempting.

13:06.000 --> 13:10.000
So, come from, you know, it's one of the features of Intercal,

13:10.000 --> 13:12.000
but not the original 1970s Intercal.

13:12.000 --> 13:16.000
I think it was the 1991 by ESR.

13:16.000 --> 13:18.000
When he were five to Intercal.

13:18.000 --> 13:22.000
So, so for people who don't know come from, is the opposite of go to.

13:22.000 --> 13:24.000
So, you put it where you want to end up and it says,

13:24.000 --> 13:30.000
what line you should jump to from there.

13:30.000 --> 13:32.000
Do you have any more questions?

13:32.000 --> 13:33.000
Let's speak.

13:33.000 --> 13:35.000
Do you have anything else to talk about?

13:35.000 --> 13:36.000
Oh, no.

13:36.000 --> 13:37.000
That's being mentioned.

13:37.000 --> 13:38.000
Thanks everybody.

13:38.000 --> 13:39.000
Okay.

13:39.000 --> 13:40.000
Thank you.

