WEBVTT

00:00.000 --> 00:16.080
Hello, my name means, I don't know, we'll see, my name is Victor, hello, hello, so my name is Victor, I'm

00:16.080 --> 00:22.560
20 years old, I was born in Bulgaria, where I lived for most of my life, now after that I lived

00:22.560 --> 00:30.400
for theories in Dublin, Ireland, and now I'm a secondary student at TU Delft, today I wanted

00:30.400 --> 00:39.040
to tell you something about my recent last year's Google Summer of Code Project, where the

00:39.040 --> 00:46.160
goal was to migrate the Lua package manager from the dynamically typed Lua to statically

00:46.160 --> 00:55.040
typed dialect of Lua called Deal, and basically go over the benefits of that, as well

00:55.040 --> 01:04.240
as how planning happened and how the reality of everything worked, as you're going to see

01:04.240 --> 01:11.440
that it was not as straightforward as a dimension, then how I tackle different problems during that,

01:11.440 --> 01:19.440
and at the end what my work flow was, and then what happened at the end, so without

01:19.440 --> 01:24.560
certain, I wanted to start with what Google Summer of Code is, so Google Summer of Code does probably

01:24.560 --> 01:37.840
know it's a platform where big open source organizations can put projects with their contributors,

01:38.160 --> 01:47.840
so that people who are new to open source development can get a feel what is like to work

01:47.840 --> 01:54.560
on open source, and not only on small projects, but large and active projects, so my

01:57.920 --> 02:03.360
so the idea is that it's a kind of like a windman situation where the person gets experience

02:03.360 --> 02:10.480
while the organization gets a new feature, or a new implementation, or a new basically a new

02:10.480 --> 02:16.560
feature, so my thing on that is that if you haven't tried it and contributing to open source

02:16.560 --> 02:23.520
to something you are passionate about, definitely give it a go, it was really once in a lifetime

02:23.520 --> 02:33.920
opportunity for me, now without any more blubbing, let's go to the actual benefit of the migration,

02:33.920 --> 02:43.680
so the main benefit was obviously to introduce types to the lower works codebase,

02:44.800 --> 02:50.800
to hopefully make it clearer, more understandable, and more maintainable for the future,

02:51.360 --> 02:58.080
the second benefit, which was also a really nice other benefit, was a new improved to the

02:58.080 --> 03:14.160
teal language, which was a good idea for this project as it was a large project, large scale project,

03:14.240 --> 03:22.320
and allowed for encompassed edge cases, which teal, we saw that did not know how to handle,

03:22.880 --> 03:31.200
but now it can, so without let me show you an example, so here on the left we have a code,

03:31.280 --> 03:44.320
which I took from the manifest writer, manifest fire writer, yes, and it's an example

03:44.320 --> 03:48.800
I picked, because first of all I want you to think about what the type of storage is,

03:49.600 --> 03:54.480
and it's not written there, it's underlined there, and you can probably figure out from the code,

03:54.480 --> 03:59.680
like that's why I picked this example, it was not the most difficult one, or the most simplest one,

03:59.680 --> 04:05.360
but I believe that it's manageable to be figured out just from the code itself,

04:06.560 --> 04:12.240
so I hope you guessed it, it's actually a map from a string to an array of strings,

04:12.240 --> 04:17.760
where here you can see the string, it works, oh this works, okay, so here you can see that

04:19.760 --> 04:25.440
the storage takes an item name, the name of the item that you want to insert, and

04:26.400 --> 04:33.440
are an array of combinations between names and versions, so as you can hopefully see now,

04:33.440 --> 04:39.840
the second example, if someone were to try to make an improvement on that specific method now,

04:39.840 --> 04:44.240
they can just look at the types and easier go through the code, not spending their time

04:44.240 --> 04:52.160
trying to decode what exactly the code does, now I don't know how many times, so let's move on with

04:52.160 --> 04:58.480
what planning was, so this was my initial proposal back in April last year, it's small,

04:58.480 --> 05:04.080
I know the idea is not to read it, it's there if you want to read it, but that's not the go,

05:04.080 --> 05:14.160
I want to just point some places where planning, planning magic happened, anyway, so

05:14.480 --> 05:24.880
first I wanted to see that here, I forgot that I had exams, so this was not a week, I was

05:24.880 --> 05:32.000
able to work on, and so that's low the project, then my plan pre-planned vacation was actually

05:32.000 --> 05:38.560
not this week, but actually this one, which may seem not important, however, I what I figured is

05:38.560 --> 05:43.600
that it's really important for those changes to be, or for your schedule and for when you're

05:43.600 --> 05:52.320
available, it was really important to communicate that with your mentor, as for me or for our case,

05:52.880 --> 06:00.560
it almost caused the project to not be finished, so don't undermine that, now another thing is,

06:00.560 --> 06:06.640
I want to mention is the last week, I put a buffer week, which in turn is the thing that saved

06:06.640 --> 06:12.320
the project, so the mistake was the thing that almost failed it, and then the buffer week was the

06:12.320 --> 06:22.240
thing that saved it, now as to my delusions at the start, you can probably see how I had the image

06:22.240 --> 06:28.320
in my head that by week five I was going to be done with 20% of the project, and by week six I was

06:28.320 --> 06:33.520
going to be done with 80% of the project, and by week seven I was going to be done, which was not what

06:34.240 --> 06:41.040
happened, now let's go with actually how I approach the problem, so my approach to the problem

06:41.040 --> 06:47.920
as there were many files interacting with each other was to create a dependency graph, so a dependency

06:47.920 --> 06:57.440
graph where the root files were the core files of the project, which did not interact with anything

06:57.440 --> 07:03.200
outside of it, so the interactives within each other, but once they were all figured out,

07:05.200 --> 07:10.160
these two dos of foundation have already translated code, then I moved out layer by layer until

07:10.160 --> 07:19.120
the leaves, which were the mostly the files handling the commands of the CLI, so pretty up the

07:21.600 --> 07:26.800
list, then however, of course it was not a straightforward as with most things, and we had a

07:26.800 --> 07:34.240
few exceptions, first of which were the external dependencies, the external dependencies are in

07:34.240 --> 07:39.120
Lua, and so you have to provide some sort of definitions to TIO, so it can handle them,

07:41.120 --> 07:47.760
this however, it's a really nice feature of TIO, which provides definition files, which I used,

07:47.760 --> 07:53.200
however, as we wanted to improve TIO, I was on the development branch of TIO, rather than the

07:53.200 --> 07:59.040
release branch of TIO, which created a few changes which also had to be taken care of.

07:59.040 --> 08:05.520
Now the next thing were also files that after some decisions and considerations, we decided that

08:05.520 --> 08:09.520
were not in the scope of the project, so that they would not be converted, meaning that they would

08:09.520 --> 08:14.800
also need their own definition files. And the third thing are the cyclic dependencies,

08:15.760 --> 08:23.040
cyclic dependencies are handled by Lua, however, they are not a good practice, and we wanted to get

08:23.120 --> 08:30.560
rid of them, so that also happened by refactoring methods from one file to another to hopefully minimize

08:32.560 --> 08:39.520
the cyclic dependencies. Here I also wanted to add a quick note on challenging parts, which I encountered

08:39.520 --> 08:46.000
during my actual conversion, which was when I was stuck and a method that I could not figure out,

08:46.640 --> 08:55.760
instead of stopping, a solution was to continue working to down the file or to a different

08:55.760 --> 09:01.120
file so that I do not get blocked and mark that part where, which I did not understand, is a question.

09:01.120 --> 09:07.600
That led to two huge improvements, one of which was that I could be more efficient with my work,

09:07.600 --> 09:14.880
and the second one was that the meetings with my mentor had more of a agenda to them,

09:14.960 --> 09:22.000
which made them more structured, and we could go over more blockages in them. Now, I want to talk

09:22.000 --> 09:30.160
about the dependency, the development workflow about it, so how I did testing, so after I completed

09:30.160 --> 09:36.480
the file, how I was testing them. In this case, I had to start when I converted the file,

09:36.480 --> 09:42.400
I could run the already existing workflow on GitHub, on GitHub actions, which took about seven minutes,

09:42.400 --> 09:46.960
which was fine because I could continue to the next file, and only go back if it failed.

09:46.960 --> 09:54.000
However, at some point in the project, I managed to magically break up the project,

09:54.000 --> 10:00.160
so seven minutes per iteration was not a good idea. So then, after some filling around, I managed

10:00.160 --> 10:08.160
to set up the built environment locally, which brought down the runtime from minutes to seconds,

10:08.160 --> 10:15.360
which was a huge improvement, and as a note, more of the story is in best more time

10:15.360 --> 10:22.320
in testing, as it is really important for your workflow. Another thing is bunching, branching,

10:22.320 --> 10:32.160
we had two options for it, one of which was one was incremental releases, so every

10:32.160 --> 10:37.280
comment I had would go on to a branch, which then would get merged, which was the straightforward

10:37.280 --> 10:43.680
solution, however, another solution we had was a one big release at the end, which kind of means

10:44.640 --> 10:51.760
after all the code was converted, moving it to a new clean branch, where there were two benefits

10:51.760 --> 10:58.160
to it. One was that each file only had one entry, even if it was edited multiple times throughout the

10:59.120 --> 11:05.040
course, and the second was that Git Blame continued to work, so on the newly generated

11:05.040 --> 11:15.200
Lua code from the Tio code. Okay, so Git Blame, the Git Blame history was saved because of the

11:15.200 --> 11:24.720
new commits that only added the new files one at a time. Hopefully that makes sense. Now, I also wanted

11:24.720 --> 11:29.520
to talk a little bit about how everything was brought together, so after the new clean branch,

11:32.320 --> 11:38.560
we had, so after the new clean branch, we wanted to wait a bit for community feedback,

11:39.200 --> 11:44.080
which also gave us time to release the new version of Tio, the development version of Tio,

11:44.080 --> 11:49.680
which was, which the code was dependent on, so at the end it worked out nicely as we could

11:49.680 --> 11:55.760
address feedback from the community as well as have the new version of Tio, and then we merged it,

11:55.760 --> 12:10.960
that's it. So to recap, I hope this presentation, although quick,

12:12.160 --> 12:17.040
helped to gain some valuable insights, which I wanted to share as they really helped me for this

12:17.040 --> 12:22.400
project, and who definitely, I would definitely use in the future and taking to consideration.

12:22.400 --> 12:29.600
So hopefully now, can you do? This slide is for related links, which are on the

12:30.400 --> 12:37.520
first them the presentation page, on below in the resources, as well on the presentation slides,

12:37.520 --> 12:42.640
which are also there, and if you have any further questions, as I don't think we have much time,

12:43.280 --> 12:49.680
maybe, you'll have much time, so you can either talk to me outside after the presentation,

12:49.680 --> 12:56.160
or on one of those two links here. Thank you, Victor, that's awesome.

12:56.160 --> 13:06.160
I think, it's also a really nice, we get students to speak, you know, from the Geeks Summer of Code.

13:06.960 --> 13:14.640
We've also, as a theme of the day, we're going to replace all words with Geeks, so we'll have Geeks Emax.

13:19.840 --> 13:22.080
So let's have questions.

13:36.660 --> 13:42.480
Sorry, repeat, Aydberg.

13:52.020 --> 14:04.800
It was made short, a minute before the last one fight.

14:04.800 --> 14:13.800
So the question was, if I had to change anything about the signature or just add the

14:13.800 --> 14:19.800
types, in most cases, I could get away with just the types, however, with the cyclic

14:19.800 --> 14:26.800
dependencies, for example, I had to refactor code around to deal with those, which men

14:26.800 --> 14:33.800
in this signature sometimes.

14:33.800 --> 14:36.800
In fact, it reminded me of what?

14:36.800 --> 14:40.800
Yes, that was the go.

14:40.800 --> 14:41.800
Any more questions?

14:41.800 --> 14:42.800
I don't think if we have time.

14:42.800 --> 14:44.800
For more questions, but.

14:44.800 --> 14:45.800
Okay, sure.

14:45.800 --> 14:46.800
One more question.

14:46.800 --> 14:47.800
Anyway.

14:47.800 --> 14:48.800
Okay.

14:48.800 --> 14:53.800
What goal is off the cyclic when moving something right from the stack of each

14:53.800 --> 14:54.800
type language?

14:54.800 --> 14:56.800
Is the binding fixed issues?

14:56.800 --> 14:59.800
Did you find any interesting issues in the world?

14:59.800 --> 15:03.800
We actually did, but they're quite lengthy, so we cannot go into much detail.

15:03.800 --> 15:12.800
But one of which was the hash, the hash table was interestingly implemented in

15:13.800 --> 15:16.800
which we then had to change how deal dealt with it.

15:16.800 --> 15:24.800
And another good one was some code that was redundant, which we managed to remove in the process.

15:24.800 --> 15:27.800
So yes, that was something we'd do nice.

15:27.800 --> 15:30.800
Now I'm going to leave it to the next person, so we don't.

15:30.800 --> 15:31.800
Oh, we have time.

15:31.800 --> 15:32.800
Okay.

15:32.800 --> 15:33.800
Sorry.

15:33.800 --> 15:34.800
I cannot.

15:34.800 --> 15:35.800
Yeah.

15:35.800 --> 15:38.800
Did they leave myself in the work?

15:39.800 --> 15:42.800
No, I did not.

15:42.800 --> 15:44.800
I was not smart enough to do that.

15:44.800 --> 15:45.800
No.

15:45.800 --> 15:47.800
Maybe a different project, you know.

15:47.800 --> 15:49.800
Any more questions?

15:49.800 --> 15:52.800
I'm letting you stop me because I don't know.

15:52.800 --> 15:53.800
Okay.

15:53.800 --> 15:54.800
Okay.

15:54.800 --> 15:55.800
Yeah.

15:55.800 --> 15:56.800
Yeah.

15:56.800 --> 15:58.800
Five minutes to complete the talk and then you're five minutes for questions.

15:58.800 --> 15:59.800
Okay.

15:59.800 --> 16:00.800
Good.

16:00.800 --> 16:01.800
So any questions?

16:01.800 --> 16:02.800
Yes.

16:02.800 --> 16:20.800
So the idea, the way to language works is by writing the types and then compiling it back to

16:20.800 --> 16:21.800
Lua.

16:21.800 --> 16:24.800
So everything is still running from Lua.

16:24.800 --> 16:29.800
However, most of it was written from TL.

16:29.800 --> 16:31.800
So compiled from TL.

