WEBVTT

00:00.000 --> 00:10.000
Pretty much full.

00:10.000 --> 00:16.000
Okay, welcome everyone.

00:16.000 --> 00:18.000
Reality.

00:18.000 --> 00:21.000
Reality of small-headed programming.

00:21.000 --> 00:24.000
We've been organizing this death room seven times now.

00:24.000 --> 00:25.000
Yeah?

00:25.000 --> 00:26.000
Yeah.

00:26.000 --> 00:29.000
So it's obviously getting popular.

00:29.000 --> 00:31.000
We've always had a full house.

00:31.000 --> 00:34.000
But what is a small-headed programming?

00:34.000 --> 00:37.000
It's a language that fits the brain, right?

00:37.000 --> 00:43.000
And I think most, you know, reality of programming today is that most language is not fit.

00:43.000 --> 00:45.000
That's definition.

00:45.000 --> 00:47.000
Python doesn't fit the brain.

00:47.000 --> 00:49.000
I have to programming Python.

00:49.000 --> 00:52.000
I'm keeping, I'm being forced to look things up all the time.

00:52.000 --> 00:53.000
I don't know about you.

00:53.000 --> 00:57.000
But maybe open AI will help.

00:57.000 --> 01:00.000
Rust definitely doesn't fit my brain.

01:00.000 --> 01:04.000
C++, I've written hundreds of thousands of lines of code in C++.

01:04.000 --> 01:06.000
It still doesn't fit my brain.

01:06.000 --> 01:11.000
So, in contrast, the list in general, I find pretty accessible.

01:11.000 --> 01:14.000
See, it's also a pretty nice fit.

01:14.000 --> 01:19.000
As they go, it's a pretty nice fit when it comes to that.

01:19.000 --> 01:22.000
So what do you want to have a language, right?

01:23.000 --> 01:25.000
I want to be fast, really.

01:25.000 --> 01:30.000
And I don't mean runtime, but I mean compile time.

01:30.000 --> 01:33.000
So, dropping a repo, debug, that kind of thing.

01:33.000 --> 01:37.000
I also want my code to be reasonably readable after a few years.

01:37.000 --> 01:41.000
There's always that question.

01:41.000 --> 01:43.000
And I don't like compile time-tracking.

01:43.000 --> 01:44.000
You know, not really.

01:44.000 --> 01:47.000
The strict typing and a letter, it's not for me.

01:47.000 --> 01:49.000
But I sometimes I need it, right?

01:49.000 --> 01:51.000
If you want to refactor something, it can be quite useful.

01:52.000 --> 01:54.000
And I want few dependencies.

01:54.000 --> 01:57.000
Well, they've had a pretty good sketch of that.

01:57.000 --> 01:59.000
Another thing is that, you know, today's world,

01:59.000 --> 02:02.000
people think that garbage collectors are evil.

02:02.000 --> 02:05.000
I think garbage collectors are a great invention.

02:05.000 --> 02:10.000
The time before garbage collectors was much harder.

02:10.000 --> 02:13.000
But they also have, you know, they have, they have a few problems.

02:13.000 --> 02:14.000
Stop the world issues.

02:14.000 --> 02:17.000
So, you know, real-time programming is a problem.

02:17.000 --> 02:18.000
Or the challenge.

02:18.000 --> 02:20.000
You know, and there can be other things.

02:20.000 --> 02:24.000
I think a Google estimated that the Python spends about half its time

02:24.000 --> 02:26.000
in the garbage collector.

02:26.000 --> 02:30.000
And so there's a lot of, you know, it's called death by object creation.

02:30.000 --> 02:33.000
And death by object destruction.

02:33.000 --> 02:37.000
It's not trivial, as Andy can tell you.

02:37.000 --> 02:39.000
And rest does not have a garbage collector.

02:39.000 --> 02:40.000
So, everybody thinks, oh, great.

02:40.000 --> 02:41.000
I have to write everything in rust.

02:41.000 --> 02:42.000
Right?

02:42.000 --> 02:43.000
It's beautiful language.

02:43.000 --> 02:45.000
But it does mean that you have to always think

02:45.000 --> 02:48.000
in terms of how we deal with the memory.

02:49.000 --> 02:51.000
So, three years ago, I gave a talk here.

02:51.000 --> 02:52.000
I'm Gael and Zik.

02:53.000 --> 02:55.000
It was a matter in fused talk.

02:58.000 --> 03:00.000
You know, and it was an exploration.

03:00.000 --> 03:02.000
You can look it up if you want.

03:04.000 --> 03:06.000
And Zik is a minimalistic new language.

03:06.000 --> 03:07.000
It's focused on performance.

03:07.000 --> 03:08.000
I said three years ago.

03:08.000 --> 03:11.000
It's blazingly fast, which is really nice, as a compiler.

03:14.000 --> 03:16.000
I think the last line is also kind of important.

03:16.000 --> 03:17.000
You know, why say me columns?

03:17.000 --> 03:19.000
You know, it's cancer of the same colon.

03:19.000 --> 03:22.000
We have language today, and they offer them from same columns.

03:22.000 --> 03:23.000
I don't know why.

03:23.000 --> 03:27.000
But what really happened is, you know, I wrote a piece of code in Zik.

03:27.000 --> 03:33.000
In a sort of general purpose piece of software that is used by a lot of people.

03:33.000 --> 03:38.000
And, you know, once I've written a Sik, you think, okay, I can deploy it.

03:38.000 --> 03:39.000
And people can use it.

03:39.000 --> 03:43.000
But Debian didn't accept Zik into the distribution.

03:43.000 --> 03:45.000
And it still hasn't happened.

03:45.000 --> 03:46.000
Right?

03:46.000 --> 03:47.000
And the problem is the bootstrap.

03:47.000 --> 03:51.000
And so what happens is that people initially write a program language and see

03:51.000 --> 03:53.000
or something or see++, which is fine.

03:53.000 --> 03:55.000
You can compile it at any time.

03:55.000 --> 03:57.000
But then they go to self hosting.

03:57.000 --> 03:58.000
So it's a Zik compiler.

03:58.000 --> 03:59.000
They wrote Zik.

03:59.000 --> 04:00.000
Because Zik compiler in Zik.

04:00.000 --> 04:01.000
Right?

04:01.000 --> 04:02.000
And the same happened with the Julia.

04:02.000 --> 04:04.000
They wrote the Julia compiler in Julia.

04:04.000 --> 04:06.000
Or most of it.

04:06.000 --> 04:10.000
And Zik and it's an incredible wisdom created the bootstrap in

04:10.000 --> 04:11.000
Repassembly.

04:11.000 --> 04:14.000
And so basically, they say, okay, you know, here, here's our

04:14.000 --> 04:15.000
Repassembly blob.

04:15.000 --> 04:17.000
This is your bootstrap.

04:17.000 --> 04:20.000
And we don't really know what's in the blob.

04:20.000 --> 04:21.000
Right?

04:21.000 --> 04:24.000
So for Debian, that's not acceptable.

04:24.000 --> 04:26.000
They want to be able to build that blob.

04:26.000 --> 04:28.000
And Zik is a small language.

04:28.000 --> 04:29.000
It's a small community.

04:29.000 --> 04:30.000
So nobody paid attention to it.

04:30.000 --> 04:32.000
And it never got into Debian.

04:32.000 --> 04:38.000
But recently, Giggs managed to get the

04:39.000 --> 04:40.000
You know, Giggs bootstrap.

04:40.000 --> 04:44.000
So they basically built the web assembly blob from C.

04:44.000 --> 04:46.000
And it's a path for Debian now too.

04:46.000 --> 04:48.000
So it will come soon, I think.

04:48.000 --> 04:49.000
Yeah?

04:49.000 --> 04:51.000
But what really happened is when I started programming in Zik and

04:51.000 --> 04:54.000
Rodi's general purpose tools, people said,

04:54.000 --> 04:55.000
Why Zik?

04:55.000 --> 04:56.000
You know, this is a new language.

04:56.000 --> 04:57.000
It's not going to be supported.

04:57.000 --> 04:59.000
It may die in a few years.

04:59.000 --> 05:00.000
Right?

05:00.000 --> 05:03.000
So, you know, all types of reasons for doubt.

05:03.000 --> 05:07.000
And you know, and then it didn't get accepted in Debian.

05:07.000 --> 05:09.000
And I had no story to tell.

05:09.000 --> 05:10.000
So I complained a lot.

05:10.000 --> 05:11.000
You know, it's on MasterDone.

05:11.000 --> 05:13.000
You can track it.

05:13.000 --> 05:15.000
And now we have it.

05:15.000 --> 05:16.000
Okay? So we're good.

05:16.000 --> 05:18.000
Yeah?

05:18.000 --> 05:20.000
Ten minutes.

05:20.000 --> 05:22.000
You mean ten minutes for the full talk?

05:22.000 --> 05:24.000
No, for a quick question.

05:24.000 --> 05:26.000
Okay.

05:26.000 --> 05:27.000
Okay.

05:27.000 --> 05:29.000
But time moves on, you know.

05:29.000 --> 05:33.000
And our target is actually a high performance computing.

05:33.000 --> 05:36.000
And the same can be argued for low-end computing

05:36.000 --> 05:38.000
for embedded systems.

05:38.000 --> 05:39.000
Right?

05:39.000 --> 05:42.000
These allow Zik at the moment target is the LVM.

05:42.000 --> 05:45.000
And, you know, it's a, it's a large tool chain.

05:45.000 --> 05:48.000
And you don't even get it on HPC.

05:48.000 --> 05:51.000
Right? HPC tends to have all the distributions on there.

05:51.000 --> 05:53.000
You know, like CentOS from four years ago.

05:53.000 --> 05:55.000
And they cannot upgrade because then, you know,

05:55.000 --> 05:57.000
the whole cluster will have to be upgraded.

05:57.000 --> 05:59.000
And people get confused and all that.

05:59.000 --> 06:03.000
So, and you cannot just install software on these HPC systems.

06:04.000 --> 06:06.000
So, Zik is hard for that.

06:06.000 --> 06:08.000
You know, this language is, and I started to move slow

06:08.000 --> 06:10.000
towards thinking about transpiler.

06:10.000 --> 06:14.000
So, if you have a C transpiler, you can always have a C compiler.

06:14.000 --> 06:17.000
Yeah? On any system, practically, today.

06:17.000 --> 06:21.000
So, let's look at those options.

06:21.000 --> 06:24.000
And C, C, on transpiler,

06:24.000 --> 06:26.000
that have, don't have garbage collectors.

06:26.000 --> 06:28.000
For example, a Nim.

06:28.000 --> 06:31.000
And we have a talk of that, of Nim later today.

06:32.000 --> 06:36.000
Pre-skim and chicken lately.

06:36.000 --> 06:39.000
Why don't we, you know, in this particular case,

06:39.000 --> 06:43.000
once, why don't we avoid the garbage collector, right?

06:43.000 --> 06:46.000
It's because mostly because we want to link against other languages.

06:46.000 --> 06:48.000
And so, if you want to link against garlic,

06:48.000 --> 06:50.000
if you have two systems with two different garbage collectors,

06:50.000 --> 06:52.000
it can get quite upbeat.

06:56.000 --> 06:58.000
The other things that nice output matters.

06:58.000 --> 07:00.000
So, let's have a quick example.

07:01.000 --> 07:03.000
This is pre-skim.

07:04.000 --> 07:07.000
So, if you want to call a C function, right?

07:07.000 --> 07:11.000
So, for example, to convert the flow to a string,

07:11.000 --> 07:13.000
right? This is a typical C function.

07:13.000 --> 07:17.000
Yeah, where the output buffer is as fast as a parameter.

07:17.000 --> 07:20.000
And we write it in a pre-skim.

07:20.000 --> 07:21.000
It looks like this.

07:21.000 --> 07:25.000
And so, it's essentially a mapping.

07:25.000 --> 07:28.000
And you can call that function, right?

07:28.000 --> 07:33.000
It's a function that says, okay, transform this number.

07:33.000 --> 07:34.000
Yeah.

07:34.000 --> 07:36.000
And what it does, it translates to C.

07:36.000 --> 07:41.000
And the C code is actually shorter than the list code, right?

07:41.000 --> 07:44.000
And it's completely readable.

07:47.000 --> 07:49.000
Yeah, so, that was a start.

07:49.000 --> 07:51.000
And then I started looking at CnD,

07:51.000 --> 07:53.000
because we want to have a vector type of optimization.

07:53.000 --> 07:57.000
So, modern CPUs, they support AVX and

07:57.000 --> 07:59.000
SSE in a lab.

07:59.000 --> 08:02.000
This is a library here, which is essentially a whole bunch of

08:02.000 --> 08:04.000
complex C macros.

08:04.000 --> 08:05.000
Right?

08:05.000 --> 08:09.000
And it also allows you to run AVX instructions on a non- AVX CPU.

08:09.000 --> 08:12.000
Yeah, so, it's kind of interesting.

08:12.000 --> 08:13.000
What does it look like?

08:13.000 --> 08:15.000
Right? So, you have an instruction here.

08:15.000 --> 08:16.000
So, you map to it.

08:16.000 --> 08:19.000
So, it's the CnD instruction here, right?

08:19.000 --> 08:22.000
And here, I make a vector, which is pre-allocated,

08:22.000 --> 08:24.000
and I'm pushing the numbers in.

08:24.000 --> 08:26.000
Of course, you can do it in a nicer way,

08:26.000 --> 08:28.000
but this is just for the demonstration.

08:28.000 --> 08:31.000
And then, I call actually the CnD functions, right?

08:31.000 --> 08:34.000
In Lisp and pre-skim.

08:34.000 --> 08:38.000
Yeah, so, it looks all very, very, very doable.

08:38.000 --> 08:41.000
And this is the code, it generates, again,

08:41.000 --> 08:44.000
it's shorter than the list code.

08:44.000 --> 08:45.000
Yeah, so, these are macros.

08:45.000 --> 08:47.000
So, pre-skim doesn't really care, you know,

08:47.000 --> 08:50.000
whether you're calling a real C function or a macro.

08:50.000 --> 08:55.000
Yeah, it will expand the C compiler, we'll do that for you.

08:55.000 --> 09:00.000
Yeah, so, it writes beautiful C.

09:00.000 --> 09:05.000
You can write, it has support for both scheme macros

09:05.000 --> 09:07.000
and C macros.

09:07.000 --> 09:11.000
And the strings and vectors, they actually use Malacone free, right?

09:11.000 --> 09:18.000
So, let's look at another language that does this.

09:18.000 --> 09:24.000
Name is a Python type language, at least the syntax is Python type.

09:24.000 --> 09:27.000
And it also transpires to C, and, you know,

09:27.000 --> 09:30.000
alternatively it can transpires to JavaScript, so people like that.

09:30.000 --> 09:32.000
And this is what it looks in NIM, you know?

09:32.000 --> 09:38.000
So, it's a closer, actually, to how you would do it in C.

09:38.000 --> 09:42.000
But when you look at the transpile code, it's actually, you know,

09:42.000 --> 09:45.000
there's a lot of, I mean, I'm just showing the best of, you know,

09:45.000 --> 09:52.000
this is the central part, but it actually has a lot of additional.

09:52.000 --> 09:56.000
Yeah, so, I would argue that the C that's written by NIM is actually

09:56.000 --> 09:58.000
not for human consumption, though you could, you know?

09:58.000 --> 10:00.000
And it's its competitors, you know, you can actually read it,

10:00.000 --> 10:03.000
and you can grab through it and all that, so you can see what is happening.

10:03.000 --> 10:07.000
But it's not really accessible.

10:07.000 --> 10:11.000
It does the same thing with the C macros.

10:11.000 --> 10:15.000
And unlike a priest scheme, which you have to use Malacone free,

10:15.000 --> 10:21.000
it uses a form of reference counting, which is also five minutes for questions.

10:22.000 --> 10:25.000
I'm almost done.

10:25.000 --> 10:30.000
What an nasty thing about NIM is that it actually writes the C code

10:30.000 --> 10:32.000
into a cache in home.

10:32.000 --> 10:35.000
So, it doesn't, it's a pre scheme, it's sort of a direct mapping,

10:35.000 --> 10:39.000
you have a list code, and it will generate the C code just as a file,

10:39.000 --> 10:41.000
and then you can compile it.

10:41.000 --> 10:46.000
With NIM, it's sort of hidden away from the user, though you can still find it.

10:47.000 --> 10:51.000
Chicken came up, I mean, after NIM has funded the work

10:51.000 --> 10:56.000
to modernized pre scheme, which is happening.

10:56.000 --> 11:00.000
Chicken scheme, which is also a transpiler, to see,

11:00.000 --> 11:05.000
also came up with a garbage collection, a version that's free of garbage collection.

11:05.000 --> 11:09.000
I haven't looked at it yet, but I think it's very nice that people said

11:09.000 --> 11:12.000
to think this way.

11:13.000 --> 11:16.000
NIM and ZIG itself can also transpile to C apparently, it's very ugly,

11:16.000 --> 11:19.000
but if you're still inclined, you can do that,

11:19.000 --> 11:22.000
and you can compile it on your FPC.

11:25.000 --> 11:28.000
So, the conclusion, for me, NIM is going through his exercises,

11:28.000 --> 11:32.000
that the pre scheme is light, hackable, and generates light weight,

11:32.000 --> 11:36.000
see output, and it's mapping to low level, it's really good.

11:36.000 --> 11:40.000
NIM is cool, chicken is cool, so you can look at these things,

11:41.000 --> 11:44.000
and I want to thank Andrew Watson, who is Australia-based,

11:44.000 --> 11:47.000
to work on this, and the NIM for working on this project too,

11:47.000 --> 11:49.000
so I have a funding it.

11:52.000 --> 11:55.000
I can just show you quickly the actual code.

11:55.000 --> 11:57.000
Let me see where I'm going.

11:57.000 --> 12:12.000
So, if I take a full program, it does the float conversion,

12:12.000 --> 12:15.000
and then it calls it Cindy stuff, right?

12:15.000 --> 12:18.000
And then it creates a generous output for you, right?

12:18.000 --> 12:21.000
It's a really neat little program.

12:21.000 --> 12:26.000
And when you call this pre scheme compiler, it will generate this C code,

12:26.000 --> 12:27.000
right?

12:27.000 --> 12:30.000
So, it loops a little bit less accessible, but it's still digestible, right?

12:30.000 --> 12:34.000
So, you can see this Cindy instruction in here.

12:34.000 --> 12:38.000
You can see the printing of the string here.

12:38.000 --> 12:43.000
And I'll show this works, but let's try.

12:43.000 --> 12:47.000
So, I build the scheme to see translation,

12:47.000 --> 12:49.000
and then I compile the C, and then I execute the code,

12:49.000 --> 12:51.000
and these little scripts, right?

12:51.000 --> 12:53.000
And this is what it does.

12:54.000 --> 12:58.000
So, and we are going to push these into production types,

12:58.000 --> 13:00.000
that's for sure.

13:00.000 --> 13:01.000
Thank you.

13:01.000 --> 13:02.000
Any questions?

13:13.000 --> 13:14.000
No?

13:14.000 --> 13:15.000
Yes?

13:18.000 --> 13:19.000
Was that the question?

13:19.000 --> 13:20.000
It's not a question.

13:20.000 --> 13:22.000
Okay, it's awesome since Dave.

13:22.000 --> 13:23.000
Thank you.

13:23.000 --> 13:24.000
Yeah?

13:24.000 --> 13:27.000
I think that regarding the end of the conference project.

13:27.000 --> 13:30.000
So, in the past, it's probably some both code,

13:30.000 --> 13:35.000
non-models, perhaps, so to which one are you referring to or which one.

13:35.000 --> 13:37.000
I don't know.

13:37.000 --> 13:39.000
Yeah, so the question is which, I mean,

13:39.000 --> 13:42.000
name has different models for dealing with memory, right?

13:42.000 --> 13:43.000
Yeah.

13:43.000 --> 13:46.000
So, you can actually select whether you want to reference control or not.

13:46.000 --> 13:49.000
So, I haven't tried it, but what you really doing,

13:49.000 --> 13:53.000
when you're transpiring to see is that we'll use the reference control model.

13:53.000 --> 13:56.000
Well, well, those are my other things.

13:56.000 --> 13:58.000
They're separate from each other.

13:58.000 --> 14:03.000
Like, the preference that memory model name uses is a separate decision.

14:03.000 --> 14:06.000
So, you can choose, right?

14:06.000 --> 14:07.000
Yeah.

14:07.000 --> 14:08.000
Yeah.

14:08.000 --> 14:10.000
It's not an answer, but yeah, you can choose.

14:10.000 --> 14:11.000
Yeah.

14:11.000 --> 14:14.000
The question is, when you say, when you transpile the C,

14:14.000 --> 14:15.000
it is reference.

14:15.000 --> 14:18.000
Yeah.

14:18.000 --> 14:19.000
Yeah.

14:19.000 --> 14:21.000
So, the original version of name was the garbage collected.

14:21.000 --> 14:22.000
Yeah.

14:22.000 --> 14:24.000
So, they transpile to C, and then it was garbage collected.

14:24.000 --> 14:27.000
And then later they switched completely to a reference model, right?

14:27.000 --> 14:28.000
So, that's what you get.

14:28.000 --> 14:31.000
But you can select either.

14:31.000 --> 14:32.000
Yes?

14:32.000 --> 14:36.000
How do you get the program that you want to see?

14:36.000 --> 14:39.000
How do you debug a program that what?

14:39.000 --> 14:41.000
It's transpile to C.

14:41.000 --> 14:42.000
You get C.

14:43.000 --> 14:44.000
Yeah.

14:44.000 --> 14:46.000
So, that's why it's important that you get, you know,

14:46.000 --> 14:48.000
so this is one-to-one mapping from one language to the other.

14:48.000 --> 14:49.000
Right?

14:49.000 --> 14:50.000
So, you can easily, that.

14:50.000 --> 14:52.000
I mean, if you know the C program is going to be hard,

14:52.000 --> 14:54.000
but if you can do C, then you can debug.

14:54.000 --> 14:55.000
Yeah.

14:55.000 --> 14:58.000
For example, the output of Priske, it's a label,

14:58.000 --> 14:59.000
and verbal text.

14:59.000 --> 15:01.000
It's not so bad, if when you get into it.

15:01.000 --> 15:06.000
It's mostly naming, right?

15:06.000 --> 15:08.000
I mean, it's a...

15:08.000 --> 15:09.000
Yeah.

15:10.000 --> 15:13.000
So, I had a variable named B, right?

15:13.000 --> 15:17.000
And it's as if for X, you know, to have the...

15:17.000 --> 15:18.000
You know, it's...

15:18.000 --> 15:21.000
Do you see not get confused, essentially?

15:21.000 --> 15:25.000
Priske has a one-to-one mapping of the language.

15:25.000 --> 15:26.000
Yeah.

15:26.000 --> 15:27.000
Pretty much.

15:29.000 --> 15:30.000
Yeah.

15:30.000 --> 15:31.000
Yeah.

15:31.000 --> 15:33.000
One more question.

15:35.000 --> 15:37.000
There's one, what?

15:37.000 --> 15:38.000
Yeah.

15:38.000 --> 15:39.000
Okay, yeah.

15:39.000 --> 15:40.000
This also, that's...

15:40.000 --> 15:41.000
First question.

15:41.000 --> 15:44.000
Is it just to acquire a scheme for you?

15:44.000 --> 15:46.000
Yes, at this point it does.

15:46.000 --> 15:47.000
Yeah.

15:47.000 --> 15:51.000
So, the NLNet project is actually to transform a two-guile,

15:51.000 --> 15:55.000
which is a more modern implementation of scheme.

15:55.000 --> 15:56.000
Yeah.

15:56.000 --> 15:57.000
Question?

15:57.000 --> 16:02.000
What if your program in runtime wants to compile, say, a lambda?

16:02.000 --> 16:05.000
So, lambda is actually supported in Priske.

16:05.000 --> 16:06.000
Yeah.

16:06.000 --> 16:08.000
So, I don't know how to do it, but...

16:08.000 --> 16:09.000
Yeah.

16:09.000 --> 16:11.000
So, have a look.

16:11.000 --> 16:13.000
Well, yours.

16:36.000 --> 16:37.000
Okay, here's one.

16:39.000 --> 16:40.000
You have to repeat the questions.

16:40.000 --> 16:41.000
Yeah.

16:41.000 --> 16:42.000
I don't like this one.

16:44.000 --> 16:45.000
Oh, you were next video.

16:45.000 --> 16:46.000
Yes.

16:46.000 --> 16:47.000
I'm next.

16:47.000 --> 16:48.000
That's why I was...

