Become a Creator today!Start creating today - Share your story with the world!
Start for free
00:00:00
00:00:01
#40 - Nikita Prokopov aka @tonsky image

#40 - Nikita Prokopov aka @tonsky

defn
Avatar
63 Plays7 years ago
Links of Interest: Tonsky's Website: http://tonsky.me Flutter https://flutter.io FiraCode Font: https://github.com/tonsky/FiraCode Nikita's blog post : http://tonsky.me/blog/disenchantment/ DataScript: https://github.com/tonsky/datascript Rum: https://github.com/tonsky/rum
Transcript

Introduction and Guest Welcome

00:00:15
Speaker
So, welcome to Deaf and episode number 40 with me, Vijay. That's narcissistic. I'm going to start with myself. This is me, Vijay, and Ray from Belgium. And we have special guest all the way from Russia, Mr. Nikita Pokov.
00:00:38
Speaker
Okay, I'm just going to call you. It was okay. Nice try. Sorry. Actually, people in Russia asked me as well how to pronounce this, so don't worry. Even Russians can do the trying.
00:00:53
Speaker
No, that's really not a good idea because, you know, we're Indians. We are pretty close to Russians for some time. I mean, I'm not sure now, but at least in the 70s or so, like super culturally very close. I guess. Yeah. I'm sorry for that. Anyway, welcome to Defined. And this is episode number 40, 4-0. So, Ray was just talking about
00:01:15
Speaker
middle-aged crisis. I'm not sure if that applies to Ray. Definitely applies to me. Yeah. No, not really. I think it's for me and Nikita. You've already passed the pension crisis. Fair point. Yeah.
00:01:34
Speaker
Nikita, so welcome to DeafN. Let's just please give us some introduction

Nikita's Programming Journey

00:01:40
Speaker
about yourself. What do you do? How did you get into Clojure? We'll get on to the internet questions later. Okay, sure. So I'm a Clojure programmer from Russia. Well, I've been coding for
00:01:54
Speaker
around 15 years, I guess. I started with Java, then got into the crisis after five years of Java, switched to Erlang, and I enjoyed it for quite a while, sometime, I guess, one or two years.
00:02:12
Speaker
And then switch to the closure. Yeah, that was time when, I guess, Rishiki started advertising the closure. All these talks, like Hamadryuan development and stuff like that. So I got inspired by him, and I just decided to take a look at what he's doing. Actually, yeah, I just enjoyed the talks, and I didn't know he's also made the language. And when I learned this, I was like, okay, I have to check.
00:02:41
Speaker
That's how we got the enclosure. What were you doing with Erlen? We were building a command system. The company was called Echo. It's kind of like Discos. It was like a San Francisco startup. They actually started before Discos.
00:03:04
Speaker
But when Discourse saw an opportunity, like this was viable business, we moved into like wide-level projects for media companies selling to business, and Discourse was for users. So that was our split.
00:03:26
Speaker
Because Erlang is meant to be very good for the chat systems, isn't it? And for like the, I'm just trying to think about like the comparisons of the languages, you know, about what was it just like a professional interest, you were doing that because, you know, you were interested in concurrent programming or the chat service didn't take much resources or what were the things that like made those people choose Erlang?

Functional Programming with Erlang and Clojure

00:03:50
Speaker
Well, for me, it was like the company that was just enjoying the people. But usually, it also was introduction to the functional programming for me. So before that, I only knew Java and Python, and they are not very functional. So it was like that moment when my mind
00:04:11
Speaker
turns into this mindset. So closure came easier. So I already knew functional programming, I already knew GVM. So closure was like supernatural fit. But but yeah, in general, Erlang is is like for very reliable systems, networking systems, stuff like that. It's basically, it was supposed to do what Go language is good right now. But for some reasons, Erlang wasn't as popular.
00:04:41
Speaker
But it's basically the same issue, I guess.

The Story Behind the Photo

00:04:45
Speaker
So before we get into all the computing stuff, can you please explain your about page photograph? I mean, you have some sort of a string instrument and you're sitting in snow and you're wearing oven mittens and a laptop. I don't know how exactly are you.
00:05:00
Speaker
using these things in those own methods. Yeah, sure. It was actually a shooting video for my friends. It was supposed to be like all this old stylized Russian tradition. So they have some of the musical instruments. Some of it is the thing where you make hot water, boiling water.
00:05:24
Speaker
The string instrument is Pololika. It's basically also like Russian theme. And yeah, but because we were shooting, I had my laptop and we decided, and I was one of the actors, so we had like all this green, all this makeup. Yeah, and costumes. But yeah, I have my laptop, so we decided to take the photo and it turned out to be like super cool photos. So why not?
00:05:49
Speaker
Yeah, it's super cool though. I mean both both in literal sense and also you know in general colloquial sense like a lot of Let's let's let's get back to the computing stuff so you're talking more deadline so why why did you
00:06:06
Speaker
choose or how did you enter closure then? Was it because just Rich Hickey's talks or was there something else in your mind? Because you had some experience in Java as well. I guess it was Rich Hickey's talks and it made sense. So when you listen to something and when you read about closure, it just makes sense. Like you see, well, yeah, this is smart. Like this might work and stuff like that. So it was just a charm, I guess.
00:06:37
Speaker
Yeah, we were actually in the same company, so I didn't leave the company. Eventually, they led me to start a closure project there. This was my first experience with closure, so we started the project then. I guess a year later, we had eight people working full-time on a closure project. It was one of our company's product.
00:06:59
Speaker
Have you seen a lisp before, Nikita? Because that's kind of a thing which is, I mean, I guess Erlang has definitely got some odd syntax. So you're kind of used to weird syntaxes, is that? Or did you find lisp quite natural? No, it did. Yeah, it was fine. It was fine, I'm sure. Maybe strange a little at first, but you're right that Erlang has strange syntax as well.
00:07:24
Speaker
But kind of like, you know, in Erlang, it's very pedantic about where you put commas and dots that actually require you to have exact number of commas. Like in JavaScript, you can have hanging commas, I guess.
00:07:39
Speaker
And so it's like makes copy paste easier. In Erlang, you can do that. It's very strict. And you have to have a dot at the end of the file. It's just required. So when I enter closure and it says like, we don't need commas. So just put a space in between. It's like, wow, it's cool. Freedom! Commas everywhere.
00:08:08
Speaker
Yeah, I actually find maybe it's just me looking back in the sort of rearview mirror now, but I don't think so. But I thought lisp was quite a natural syntax, actually. Seems so easy. It just seems almost too easy. Yeah, absolutely. You start to think in something might be wrong, it can't be that easy. But
00:08:28
Speaker
But it is, yeah, it is. Actually, I don't agree that there is no syntax, like, it's just the syntax is in the standard library, like how you write ifs and whens and loops, it's the syntax, just a convention that you have to know. You have to know how to write for a loop, for example. I guess it's kind of syntax.
00:08:54
Speaker
But from the language feature-wise, what is the fundamental things that you think Closure was doing better? Well, this is easier. So, Erlang is a great language in terms of building systems. So, they have really strong ideas how to handle errors and how to control processes and restarts.
00:09:23
Speaker
make stuff that will last long, like that will survive unexpected conditions, like something that you didn't envision happens and part of the system dies, but it can recover. It's really easy to write such system in Erlang.
00:09:40
Speaker
But language-wise, it's very small, bare bones or something like that. It doesn't have much features. It doesn't have a good standard library. At the time when I was working with it, it didn't have hash maps. It has now, but it didn't back then. So it basically has lists and
00:10:05
Speaker
and records, I guess. So what we did for hash maps, we basically, there's a thing called prop list. It's basically a list with even number of elements where like first and third and fifth element are keys and second, fourth and sixth are values and so on. So that's what we used to use for hash maps.
00:10:31
Speaker
And it's like, it doesn't have strings as well. So instead of strings, it just has a list of integers, basically. And it's a weird language. So it's not very convenient to write, I don't know, algorithms, anything, basically. But Elixir wasn't there at that time. I guess Elixir fixes at least part of that.
00:10:55
Speaker
I hope, yeah. But yeah, on the other hand, Closure, it's basically, it's very nice language in terms of data processing. It's like, have all the tools and it's so natural to write such things like processing collections and stuff like that. So, it was, yeah. The only thing I missed is like this green processes from Maryland when you can just,
00:11:20
Speaker
to have stuff running concurrently. And in Airline, for example, you can spawn processes for each user in your system, for example, or for each incoming connection, stuff like that. In Closure, it's a little bit trickier. But how do you compare, for example, of course, Airline has process-based concurrency and then Closure

Creating Fira Code Font

00:11:40
Speaker
I mean, more or less, we can use all the stuff in Java, but channel-based concurrency stuff. So you think that it's not really solving the same kind of use cases, or you can't use this one. Which one do you think is more suited for what kind of concurrency things?
00:11:59
Speaker
Well, so I think, like, a rank model is more natural, but I guess it's hard to implement or something like that, and, like, what the closure has, it has core, I think, but it's kind of a hack.
00:12:15
Speaker
And yeah, so it's like you have to do more things with your hands, basically. When it gets down to the processor, basically, Erlang runtime does that for you, because you have to do it yourself, or we have this very smart macros and core sync, but it's like... I don't know. I guess it's fine for typical web usage, I guess.
00:12:46
Speaker
most of them are fine. Yeah, I think so. Yeah. So let's talk about all your open source stuff. I think most popular one is, I mean, interestingly enough, not programming one. I'm not sure if there is any programming involved in that one. So Fira code that the one, so why did you, why did you work here?
00:13:04
Speaker
I just get inspired by design stuff, actually. So I was like, so three months, actually, maybe four months ago, I took a vacation from working as programmer. And I was like, rethinking my
00:13:23
Speaker
profession, what they want to do in life and so on. And I noticed that I like, I pay a lot of attention to design and visual stuff and stuff like that. So maybe this is also a viable part for me. So yeah, and I got inspired by this font called HasClick.
00:13:40
Speaker
It was a phone for Haskell with literature. So I was like, okay, great idea. I like this idea. It's what they should do. But I didn't, I didn't like the phones they used. So I made my own and it turned out not to be that hard. So yeah.
00:13:55
Speaker
How did you make this one? Because this is something that maybe, I'm not sure, many people might not be familiar with. Because if I go to the repository, it says it's a closure repository. So what is the magic involved there to get all those things? No, it's closure because there is like the one file. Well, now it's three files with closure. Yeah.
00:14:15
Speaker
But so I use it to generate some code in font. So basically, the font files, they have a little scripting language, maybe scripting might be not screaming declarative language, I would say, that basically defines transformations.
00:14:31
Speaker
And you can do very crazy things with it. But basically, you can say if there is a symbol followed by this symbol, or this might be a set of symbols and then something else, we can replace this subset with this subset. And then you can generate rules like that.
00:14:53
Speaker
Yeah, and you can basically do ligatures, you can do kerning with it when some combinations of letters should be closer together, like A and V, they should be closer than they usually are in the string.
00:15:08
Speaker
and stuff like that. So basically you do that, you basically declare like if you see a dash and followed by a greater sign, then it should be an arrow. And you draw an arrow, give it a name and basically write this rule into the font.
00:15:27
Speaker
Why I use Closure is because it has, I guess, 150 or something like that ligatures, and basically they are all drawn in a font file, and my Closure script just basically extracts the names and generates the code for these substitutions. That's what it does.
00:15:49
Speaker
That's really nice. Actually, I mean, I did use it for some time. But now these days, I use some other font. I'm also fascinated by the Monospace fonts a lot. Which one are you using? Keep trying different things.
00:16:03
Speaker
I use Operator from John Heffler. Yeah, those guys. It's a bit of an expensive font, but I'd really like that one. I love it. It's a beautiful font. But it doesn't have the ligatures, though. And I rarely think about ligatures that much, but I think there are a couple of other nice fonts in open source as well. But really beautiful work, by the way. Thanks a lot for releasing it on open source, too.
00:16:32
Speaker
Can you do like, if you see, I've used fear of font and I see the arrows and the greater thans and for equals and stuff like this. Does the font allow you to do like lambdas for FN? Or is that not one of those? You can do that. I just don't do that in the fear code, but you totally can do that as well.
00:16:54
Speaker
The reason I'm not doing that is because I decided that if you replace some combination, the thing you replace it with should be of the same width, so you don't mess up the intonation. So basically, if we replace def one with lambda, it will be like four letters for one letter, and it will, the line will become shorter. So I don't do that. I was just thinking of anonymous functions, but okay, yeah.
00:17:24
Speaker
Yeah, yeah, yeah. There was, remember the overtone thing that, I forgot his name, Sonic Pi creator. Sam Aaron. Sam, yeah, yeah, exactly, Sam Aaron. So when he released his Emacs configuration, I think he was the first person to do that. Like, set has the set notation when I type it in Emacs. But if you have Emacs, then, you know, it's a kind of natural thing. So, no, for you, Ray. But for a long time, yes.
00:17:54
Speaker
No, people. If you dig in my GitHub, I also have a project called Closure Unicode and it basically bins like all, not all, but some offset operations, the Unicode symbols, it basically like copies the definition. So you can use that and use like mathematical notation, but it's...
00:18:16
Speaker
Not. Yeah, sweet. That brings us to the question of the hour. P-Max or some other shit? Some other shit, yeah. No. You're from Russia, man. I have a reason. The lookatures don't work in P-Max. You're not a fucking moron, yeah.
00:18:41
Speaker
Hey, they work in my emacs, so I don't care. Well, it's not moronic, actually. It's more kind of like sadomasochism, isn't it? It's like autoerotica or, you know, people who want to like jerk off with an M in their mouth, you know, also like emacs.
00:18:59
Speaker
Anyway, what's your reason, Nikita? What's wrong with self-pleasure? What the fuck? I mean, just because you're a Catholic white guy and then suddenly people enjoy something by themselves is a problem for you now. Anyway, so... Just to put it out there, I'm not a Catholic, okay? I'm just stereotyping. I mean, you stereotyped the entire Emacs community. So you deserve this. Yeah, but I've got knowledge on my side, you know?
00:19:31
Speaker
I've met half of them. But they do. But they do work, by the way. But only in the Japanese fork of emacs, emacs-relvacat thing. That one, you can actually enable the Mac operators, and then LEGO just work automatically. That was very, very nice. They release patches for emacs every time, and then it's Mac compatible if you want to follow that branch. But anyway, LEGO just weren't a big deal for me.
00:19:59
Speaker
So, I suppose you use WIM then, or something else? No, I used to use WIM when I was working on Echo, but then, because everybody was using WIM and I kind of got into that thing, but then I left it. When I switched to Closure, I tried Lighttable.
00:20:20
Speaker
and it was kind of fine. Even for some time while it worked, then they stopped updated and unfortunately I have to switch. So right now I'm using Visual Studio Code. Yeah, with the cloud. Yeah, yeah, actually there's two plugins.
00:20:45
Speaker
Sorry, there are two plugins. One is from Russian guy Andrei Lisin. And it's like most popular still, even with Kawa. And I actually met with him here in Moscow. He's in Moscow as well. So yeah, it's not very nice. There are a couple of things left to be desired, unfortunately, but it works. Yeah.
00:21:07
Speaker
Why do you like visual studio code, by the way, rather than Atom or something like that? It seems pretty similar. Yeah. So, well, I guess Atom, it has this vibe of like a lot of good people came together and did something, but they weren't really coordinated or very good at what they were doing.
00:21:32
Speaker
So it's not quite polished. It's like... So essentially it's a shitty software. And it's slow. It's like electron up. Yeah. And on the other hand, Visual Studio Code is very polished and they take these things very seriously. So it's nice looking.
00:21:56
Speaker
It works nice. It works reliably, I guess. They care about extensions and compatibility and stuff like that. They publish documentation. I guess Atom has that too. I don't know. I just tried. I didn't like the feeling of it. It was slow and I switched. It's a bit slow, yeah. That's for sure.
00:22:22
Speaker
So because you wrote so many, when you participated or you are part of so many Closure projects and so much amount of Closure code, what is

Tools for Clojure Development

00:22:30
Speaker
your opinion about Closure tooling in general? Because of course there is an IntelliJ with cursive and everything. That's very beginner friendly and probably good for beginners and rest of the people, you know, will use Emacs anyway.
00:22:46
Speaker
So what is your state-of-the-art about closure tooling? I don't know about it. I tried to use cursive, but it didn't, it was like, I hate idea because it's also like very heavy weight and I didn't understood how this like cursive, where to put windows, where do I look for output and stuff like that.
00:23:08
Speaker
So the perfect thing for me was light table. It has inline display of result when you delete something, it displays right there. Displayed errors, it let you watch variables inside your functions as they execute. It was a very nice feature. So I miss it and I hope one day something like that will be possible in Visual Studio Code somewhere else.
00:23:36
Speaker
So yeah, my opinion on tooling is basically I think I hope everybody is using grapple. I think everybody should be using grapple, but I wasn't very
00:23:53
Speaker
Something was wrong about the way an REPL is implemented. I don't remember what, but I hope the P REPL that Rishki is doing, it was, like, I was, for a long time, I was worried. Well, okay, first of all, I never managed to get a closure script REPL working, since I can pass it all. And so I just used to reload the page and then I used fig wheel to like reload it for me.
00:24:19
Speaker
But it's really, really hard. I hope this will become easier at some point. And second one, I was really disappointed in a way how REPL was implemented, especially this network REPL. It was like we have a standard input and standard output, and all REPLs are designed to work nice with that.
00:24:44
Speaker
And then we tried, on top of that, we tried to make this network compatible and split it into messages, which I think is another way around. We should have something that clearly defines inputs, outputs, and stream of prints, I guess, listed out, and then we can
00:25:06
Speaker
combine all that to have terminal REPL, such as that command line REPL. So it was kind of implemented as a way around. But what I see in Rishiki's work, I guess P-REPL is exactly that. It's like a REPL defined in terms of input output and standard output. Something like that.
00:25:29
Speaker
Yeah, I think there was because I'm using the P REPL for a little project I'm doing and yeah, it has. It has. You know, you have the inputs and then it has like some outputs that you can understand standard outputs, standard fields and easy data to manipulate. And you also have this this tap function, which I'm not quite familiar with yet, but.
00:25:54
Speaker
needs to be worked on, which means you can sort of tap into the functions as they run to do transformations if you want to. I saw that it was supposed so that if you have like
00:26:12
Speaker
If you run your process in some console, so you can join from other process via REPL and get the same output like multiplexed to you and to that console or something like that. Is it it? No? The stuff that I'm doing or the stuff that... The REPL with tab function. So tab is like join and listen for the copy of the messages now.
00:26:41
Speaker
Uh, yeah, but not necessarily from other processes. It's not, I mean, obviously closure hasn't got that level of abstraction on it. You know, it's just different, um, with, with, with the, with the P REPL, you have a tap. It's, there is, there's two different things that you've got taps, which is like the thing enclosure 110. And then you have this tap function, which is something that you can give to the P REPL.
00:27:10
Speaker
And that's just one thing that you give to the PRAPL to listen to its output.
00:27:19
Speaker
I think something like that, like good REPL, especially networking REPL, should be part of the closure from the start. Yeah. Yeah. Yeah. I agree. Yeah. I know that it was kind of like a new thing. It's going to be interesting to see how the two guys react to it, to see whether people move their end REPL middleware or something like that. I think it's going to be an interesting thing.
00:27:47
Speaker
Because the thing I find weird about NREPL actually is that you don't know the stacking order isn't obvious all the time.
00:27:57
Speaker
Yeah, middleware is also kind of weird concept for me, especially like all the plugins for Visual Studio Code and I guess for not for light table, they all require you to put some stuff in the middleware or they refuse to work. Visual Studio Code, for example, requires you to have CIDR middlewares.
00:28:19
Speaker
Otherwise, you can see exceptions and you can see the commutation and stuff like that. And I don't really understand this concept. I thought that if you have a running closure process somewhere, you should be able to join and do everything here.
00:28:37
Speaker
Instead, you have to think about that beforehand and put CIDR in, and only after that, and everybody should be using CIDR otherwise, everybody has to agree, and I don't understand this concept. When I was working with Lighttable, Lighttable has different middlewares, and it was kind of a conflict I wanted to put in a project like Lighttable middleware, so other guys who was using UMAX wanted CIDR there, and I don't need that, and it was
00:29:07
Speaker
Very strange architecture. So let's talk about your project. So because we have two super popular projects of yours, one is ROM and the other one is Datascript. So let's talk about ROM. I mean, why one more React JLC? Why did you create? So the idea of ROM actually came from the need to use Datascript for React programming. So I enjoyed React when it had
00:29:36
Speaker
I never actually tried Ohm, but I enjoyed Quizchant, I guess, by Luke Winterhart. Yeah, it was great, but it didn't support like Datascript very well. It's like super simple, super minimal, and it was cool, but you can't do machine visit.
00:29:56
Speaker
So, and I wanted to use Datascript and neither on nor reagent supported Datascript. Say like, we have atoms, put everything in atoms. But it wasn't like how I envisioned applications. So yeah, I had to do something and like I had some patterns I already used. So basically I wrapped this in a library. I guess RAM is,
00:30:22
Speaker
Well, ROM is reactive. I don't know. Close. It was some pun on OM, I guess. Oh, yeah, I remember. So there was OM. So I made like reactive OM, which is ROM. And ROM is a Russian word. You say it ROM, it translates to English as ROM. So yeah, I got it.
00:30:52
Speaker
That makes perfect sense. Totally, totally. So you're having a lot of ROM when you're like, fuck this thing. I'm going to make my own React.js stuff. Super cool. So when you compare with right now, we have, of course, ROM. And I'm not sure if quescient. And I don't know how it is pronounced. Is it quescent? Quiescent.
00:31:15
Speaker
Quiescent, yeah, we have a native English speaker. So Quiescent, and of course, we have the big one, or at least the most popular one, in my opinion, from blog posts and everything, reframe and reagent combination. So where do you see RUM going in this sense?
00:31:37
Speaker
Yes, I don't know. I mean, I think it has a place in ecosystem as a super thin wrapper, but it's not very good for beginners, I guess, because it's very unopinionated. So it basically says do what you want. I don't care. It doesn't provide you like solution for storage. It doesn't teach you how to organize your application. It's very flexible. So it can be whatever you want it to be.
00:32:06
Speaker
But it makes it hard to start. If you don't know what you want, it makes it hard to start. Do you think this is because you've got an Erlang background?
00:32:17
Speaker
No, no, no, no. I just I don't know. I just don't. I'm just teasing you. Okay. I like like flexible things. And well, it's it's kind of an evolution of, of skill, I guess. At first, you need things very unflexible, which like teach you how to do things and guide you. Don't do that. This is impossible. So you better don't do that and stuff like that. And at the end, you want something flexible, super
00:32:46
Speaker
with no restrictions, like closure basically. Closure lets you do anything, like you can redefine syntax, you can, I don't know, implement your own classes or hierarchy or whatever, polymorphism, right? And write your macros and macros can do crazy things. But if you don't know what you're doing, it will be dangerous.
00:33:10
Speaker
So I think I have around because I have closer background. Not the other way around. What I was going to say was, because I think one of the things that's interesting about React is the fact that it's going on to the devices, to the mobile devices. Does run work on the React native side now?
00:33:36
Speaker
Not officially, but it can be made to run zero. I have a couple of projects that are using it with React Native. Yes, it's possible. But in general, you ask about the future of ROM, and my current thinking is I'm very disenchanted, disappointed with the replica system and web frameworks and stuff like that, and I just want to get as far away as possible.
00:34:07
Speaker
from it for some time. That's a nice segue. So let's talk about that now. Just before we go there, though, I mean, before we go into the sort of bigger rant, I mean, I'm interested. React to me was kind of an interesting, like, jumping off point away from the complexity of web frameworks, actually. It did
00:34:31
Speaker
bring a simplification to the table. So it struck me as something which is like, you can stay with it because it's like, yeah, this is really simple, you know, we've got, we've got now, it's just got like a nice way of saying, okay,
00:34:50
Speaker
We declare our data. We declare our functions. And now we just have to have this functional transformation from the data onto virtual DOM. And everything else can be taken care of by the smarts of the diffing algorithms. So it seems like a quite a, from my perspective at least, it seems like quite a nice way of doing web programming and not very complicated.
00:35:17
Speaker
No, it's great. The appearance of React and virtual DOM idea was a huge step forward. I mean, very huge. And basically, it happened somewhere when I started to do
00:35:32
Speaker
front-end programming in browser. I actually really felt this difference between writing programming in jQuery, for example, when you have to remember which state you are in and change this versus doing everything from scratch every time.
00:35:54
Speaker
Yeah, yeah, it's great. But again, I kind of like just kind of tired of... Well, the first web itself, the DOM, it's like it's very unpleasant environment to work with. It's like have so many limitations that can be fast and stuff like that. You basically like spend an proportional amount of effort to get like trivial things done.
00:36:20
Speaker
And yeah, on the other hand, I think React and RAM as well, they're good as they are. They're perfectly fine frameworks and you can do great things. I don't think there is like mushroom for improvement or something is missing.
00:36:38
Speaker
And that's why I find it hard to, for example, update RAM for new versions of React. For me, they're all the same. Basically, the big idea was virtual DOM. Everything that comes from after that is just small improvements. Basically, they change things for the change sake.
00:36:57
Speaker
Like we think JavaScript programmers will enjoy this more. I'm like, okay, maybe, but we are like in ClosureScript, we don't care how JavaScript programmers program React. We already have wrappers, right? So I got what I needed from React and it's fine, I guess.
00:37:14
Speaker
Yeah, totally agree. Yeah. The thing I was thinking about actually going beyond that to a more simple world would be to be able to have something like React or sort of like implement something simpler than the DOM on a canvas. Because that's a very open programming model. Yeah, it might be. I don't know. Actually, it's very interesting, especially in the web, how
00:37:40
Speaker
how web might become something faster than like basically overcome current limitations. Yeah, it's not clear right now, but basically Canvas is one of the solutions. You know about this flipboard, right? When they
00:38:00
Speaker
implemented mobile application canvas, and it was like 60, 60 of us easily. Yeah, if we put something like accessibility on top of that, like screen reader support, I don't know, we can we can get something nicer, I guess. But it will be like Wild West, like back to Adobe Flash and Silverlight times, because everybody will be implementing their own widgets. Yeah.

Datascript and State Management

00:38:30
Speaker
Let's talk a bit about Datascript. What is the central idea behind Datascript? The idea was to try to bring Datomic into the browser. Basically, it started because I was interested in how hard it would be to implement what Datomic does. It turned out to be not that hard, at least basic functionality.
00:38:54
Speaker
And then, yeah, it turned out to be a nice idea. Again, I'm not saying I can use it in advance, but it turned out to be very, very nice. So the idea is that you have to manage your state using some library, basically, some storage. Like we use databases on a server, right?
00:39:17
Speaker
are right to files. We use database when basically you can query your data and get the parts that you're interested in in any shape you're interested in. So basically that's what Datascript does. It keeps you state and you let you query it in whatever way you need to. I was just going to wonder whether you were inspired by systems like Meteor and stuff like that or Firebase. I'm not sure. Yeah, I guess
00:39:47
Speaker
No, I don't remember actually. And I know about them now, but I can say I knew a big deal about them before. But what they provide, well, basically, they provide a little bit more, right? They let you synchronize your state to the server. And this is like a huge, huge feature, which I want at some point to have a data script as well. But it's not there yet.
00:40:14
Speaker
But even without it, just keeping state on the client in a managed way is a huge win for just the organization's sake. It's just so much simpler and so much nicer to use when you have a database and you know that your entities are all flat. They all have IDs. You can go from, I don't know, from post to comments, from comments to post, from authors to post to comments, whichever way you like.
00:40:43
Speaker
So do you support local storage or is it just in memory? It's just in memory but it has a serialization format so it's trivial to save to local storage or send it over the network.
00:40:58
Speaker
Basically, when I worked in technician, we used that. It also works both in closure and the closure script. And we utilize that as well. So basically, we build database on the server, then serialize it and send it to the client. The client deserializes and start working with it. And how it worked.
00:41:23
Speaker
But did you know about the Mozilla's project because I just I'm just looking it up now and apparently it's now unmaintained you know mentat or something that was They tried to do the same exact thing in Rust. I thought this was a live project I'm just checking it again and it says unmaintained
00:41:39
Speaker
It was reported to Rust at some point, inspired by the script. Yeah, I remember somebody contacted me and we spoke about it, but I don't remember much details. But I remember it was at the list, yeah. OK, because I was following it for some time. I think probably a month ago or so, it was still active. And then now I see it is in an unbaintained state, suddenly. OK, interesting. Anyway, so that's what you do to projects, is it, Preeti?
00:42:07
Speaker
As soon as you're following. The thing is, if every month if I don't refresh, they're going from the Indian state for some reason. That's why I have a pingdom towards all the Nikitas projects.
00:42:22
Speaker
Oh, the shit that I'm using that is written in the 1980s or something. It still works. So just a quick question. Just before we go into that, a quick question on the serialization part, Nikita. You were saying you were using it with cognition. So how does that work? Because I think they're at the atomic shop, aren't they? Yeah. Because we talked to Robert.
00:42:50
Speaker
A long time ago, a friend of the show, Robert. We had in the middle ages of the prop. Yeah, we were kids, you know, we spoke to Robert. And yeah, he was, he was, he was telling us he was at various atomic shops. So I guess that was a bit of an easier transition, the atomic to data script.
00:43:11
Speaker
So we basically have like, we had custom codes that basically, yeah, we start the state in O. Actually, the way it worked, we used event sourcing. So we had events stored in Datomic, then when user accesses the page, we know which events to like,
00:43:33
Speaker
pull from Datomic, it pulls them in, transfers them, like apply all them to empty Datascript database, so like one by one, and you get the latest state basically by that, like event sourcing, and then you send the state to the client, and client continues to do the same basically. It was mainly done for speed up because applying events on Closure site, on GVM site was way faster than doing it in the browser.
00:44:01
Speaker
After that, just client generates events, they got applied to the local data script database, and they got sent to the atomic for each system. Has anyone used it apart from for the atomic backend, for a SQL backend or for a document database?
00:44:23
Speaker
Something else or is it only ever being? I don't know. I mean, not in cognition, but many projects using data script. Maybe somebody did. I don't know.
00:44:35
Speaker
Okay, now I was just wondering what the hooks were really. Well, the hooks are, it's like, it's, for example, in SQL database, you have to, you have separate IDs for different tables, different IDs for different, well, different tables can have the same IDs, right? So you can't use that in Datascript because Datascript expects unique IDs for everything.
00:45:00
Speaker
So this is one of the hiccups. I guess we did some project with this way on ClosureCup. I remember we were struggling with IDs and basically you have to write this code that translates tables to data script. It's much simpler with Datomic because they're essentially the same model.
00:45:20
Speaker
Yeah, I guess you could just store a client ID and just store everything with a blob. That's another way of doing it. Yeah. And no power of the database at all then. Yes. So let's move on to much more depressing stuff.

Challenges in Web Development

00:45:40
Speaker
Okay.
00:45:42
Speaker
I hope your disenchantment is only because of the web-related stuff, or is it about the software in general, or can you give us a bit of a view onto your disenchantment about all the shit going on in general? Yeah, I hope there is like, there must be a reason, right? So something happened which made me like criticize everything around me.
00:46:08
Speaker
It's not that it doesn't deserve to be criticized. I mean, computers are very shitty things. But yeah, so yeah, I guess it's because of the web stuff, because it's so inefficient and because it's so bloated and because there is no clear path to some bright future and I don't see it. It's like going to get worse and worse and worse.
00:46:37
Speaker
And like people working with web, they are interested in wrong things, like not in building something efficient and lean and stuff like that, but just something bloated and getting stuff done no matter what price. But isn't this this dichotomy was, I mean, it was there at every generation, right? I mean, at some point there were all this
00:47:02
Speaker
Windows applications with all the shit coming in and the UI was horrible on all the desktop applications and then you know every every generation has the similar kind of I mean, I'm not saying things are better in the past or anything because We have seen that probably Ray has seen much more Generational turns than I did maybe one more I guess so
00:47:25
Speaker
What is the difference now? Because at the desktop application world, we had the similar kind of shit. I mean, weird-looking UIs and 4GL languages and all the bullshit coming in, drag and drop interfaces, and they're messy. So what is the new shit? Well, I don't know. So somebody said there's like 90% of everything is shit, right?
00:47:53
Speaker
Actually, when I published that, somebody pointed me at the article Nikolas Wirth wrote in 1995. He's basically saying exactly the same stuff.
00:48:07
Speaker
Nobody is writing correct programs and efficient programs, and somebody invented icons and windows, what's the crap, why text isn't enough and stuff like that. And then somebody pointed out that Dijkstra in like 60s or 70s wrote the same stuff, like software crisis, projects going over budget or performance and stuff like that. So yeah, it's been...
00:48:36
Speaker
Isn't it a bit like, you know, like Stone Age man complaining about teenagers? Yeah, kind of, I guess. I don't know. But I think still, if you compare software and websites, websites are way creepier than general software, at least on Mac, on a Mac, right? On Windows, maybe not everything is great, but on the Mac,
00:49:02
Speaker
I guess on Windows you are happy to use web software because it's better than Windows. But you know what? The stuff Apple does, it's kind of nice. It's kind of nice. I mean, at least it starts instantly and it has polished UI.
00:49:26
Speaker
nothing breaks. But yeah, actually, there is super aligning to this, I guess. So I was like on a conference this weekend, giving a talk and I happened to listen a couple of talks on the YouTube about Flutter.
00:49:43
Speaker
It's a framework for Google. I was skeptical first because they re-implemented Kokoa look and feel and material design look and feel. As they claim to the pixel, it's pixel perfect and they made the scrolling feel native and stuff like that.
00:50:06
Speaker
but everything from the scratch. So it's not system stuff, just a copy of everything. And this sounds like a stupid idea on one hand.
00:50:15
Speaker
Yeah. I mean, it has been a stupid idea for at least twice, right? In AWS and swing and Eclipse RCP and maybe, you know, I keep having this, you know, Groundhog Day sort of situation like, oh, this is exactly the thing that I heard some time ago. But I did try Flutter. I was trying to use Flutter, but as I was explaining, I was on beta constantly on Mojave.
00:50:36
Speaker
So I was trying to install Flutter and I couldn't because I was on beta and then that was dependent on some retarded node module called, I don't know, iOS control, whatever library, and they didn't update. And then finally I was able to install, but then the chip needs Dart and I was like, I'm too old for this shit now.
00:50:53
Speaker
I'm not going to learn a new language now, and I gave up. But it sounds like an interesting idea, but the thing is, I don't know, it sounds like same shit, different decades, you know? So I listened to just two talks. One is called Rendering Pipeline Flutter, and the other one, I don't really remember, but I guess they're in my new talk.
00:51:19
Speaker
Flutter slayer design. But yeah, it's basically from the creators of the explain how it works and how it works. It sounds quite legit. I mean, as I care about the right stuff, I care about performance as I did layout. Well, layout is reasonable, right? I don't know how like what the state of the art in layout is, but it's certainly what they describe is better. What web has is better than Apple has. I guess it's better what Android has. I don't know what Android has.
00:51:49
Speaker
But yeah, you have to learn a new language. This is kind of a bummer. But on the other hand, you can look at it, you don't have to touch JavaScript. So it's might be fine. I wish it was in Java, or I could use it from Clojure, but still it might be good. I have to try it though. I plan to try it.
00:52:16
Speaker
But I think the other thing that I think the other thing that people are doing, I mean, in the games world, obviously, people are looking at, you know, raw performance. So, you know, they tend to have more, more focus on that stuff. And, you know, I think you've spoken about Jonathan Blow's stuff before as well. Yeah, yeah. I mean, it's just ideas at the moment, I think a compiler won't be ready until next year, but
00:52:43
Speaker
But that's also kind of interesting from our perspective that he's doing metaprogramming at a low level. But the other thing I was going to talk about was this uni-kernel stuff, because this also strikes me as something which, from a future perspective, strikes me as an interesting way that the industry will eventually move towards for server-side stuff and IoT-type things.
00:53:09
Speaker
because we have the world of IoT of shit at the moment, but eventually people want to, if they're going to use very low powered devices, they want bare metal programming, but with a few more affordances than assembly.
00:53:24
Speaker
Yeah, like uni kernels also inspire me like something like when we're moving in the right direction instead of like making things worse. And I hope you actually can run Ireland in uni kernel, I guess. It's like some somebody like in the crane of Belarus implemented it, I guess.
00:53:47
Speaker
I don't remember exactly. I saw the guy who was like one of the implementer developers. Yeah. OCaml is a sort of a poster child, isn't it? Yeah. Yeah. There's two unique kernels, one for OCaml and another one for Erlang.
00:54:02
Speaker
And I remember also like somebody was talking like it starts in milliseconds. So you basically can boot a new operating system on every web request. So like request comes in and you put in your operating system and it answers the request and shuts down. So yeah, it's kind of like the way things should be. You don't need Linux for a certain web.
00:54:31
Speaker
Linux is like a baggage, you don't need that. That way.
00:54:36
Speaker
Well, their argument as well is that if you use the uni kernels, you have the subset of drivers that you need from the operating system. And then you compile in the drivers that you need. And an interesting thing about that is that from a security perspective, it's very difficult to hack in. Because with Linux, there's a user space that you can actually log into. And next thing about uni kernels is there's nothing to log into at all. You can never log into it.
00:55:04
Speaker
And that's really nice, I think. Like you said, it's really back down to what's actually necessary for the functions. Getting closure started up in that time is still a challenge, I think.
00:55:18
Speaker
Actually, in sum, I was listening for a podcast, I guess, from one of the creative mirage shows, I guess, Okawu One. And he said, like, what do you think is it? Okay, it might sound like a crazy idea right now about things about the future, what future looks like.

Potential of Uni-kernels

00:55:35
Speaker
It doesn't look like Docker. It looks like unique kernels. Like, it doesn't make sense to put Docker's into Docker suck. Like, it's not the way things are supposed to be. Yeah.
00:55:47
Speaker
I like the fact that the Docker company bought the UniColon company now. So you can put UniColons inside Docker. Yeah, and actually, I don't know if you know of, because if you do watch these people, what they've got on the Mac actually, they're using the UniColon architecture on the Mac to do the native Docker implementation.
00:56:10
Speaker
Um, because so it's a little like mini network in between like the, the, the actual Docker implementations and the Docker native services. And it uses these, uh, unique kernels to do that. Weird stuff. You know, so.
00:56:30
Speaker
So, closure, eh? Yeah, closure. We got back to it. Let's talk about closure, like, what sort of thing. We might as well talk about it, yeah. Exactly. So, what is your favorite library in closure, apart from, of course, the stuff that you have written already, apart from Raman Data Script?
00:56:54
Speaker
Oh, surprise question. Is that a new question, by the way? Is that a new question? You just come up with that one. Yeah, I never thought about spirits. Go on. What kind of question is it? You put him on the spot there. Yeah, come on. I don't know. He isn't one.
00:57:16
Speaker
No, I mean, because we have so many libraries to build your stack with. So what is your go-to stack if you want to start a Closure program, for example, a Closure web application? I keep losing your answer questions.
00:57:34
Speaker
That's because my questions are not that important. Work it out, you know.
00:57:47
Speaker
What is your favorite stack? Not just a library, but what is your go-to stack for closure of web applications? Okay, so I used HTTP kit for some time. Then we found some nasty bug in it when I was in cognition. So we switched to the JBoss one. Immutant, yes, immutable. Immutant. So we're using immutable. Immutant, yeah.
00:58:16
Speaker
And I guess I was using Hiccup. And what else is there? I don't know. And the ring stuff and the libraries that comes with the ring like sessions, cookies and stuff like that. Actually, at some point, I was thinking about writing my own routing library. Oh, yeah, I tried BD. And I was like very confused by the syntax. I like just couldn't make it do what I wanted. Like I tried all the ways and still didn't do what I wanted.
00:58:46
Speaker
Yeah. So at this point, I was thinking, okay, I know how to write like a routing library, but I just didn't. But I still know. So at some point, I will have my own stack, I will have everything like web server, I should write as well, I guess.
00:59:05
Speaker
Yeah. And then if you have uni-kernel, then you write your own operating system, the whole thing, everything. I've never, never published it. So what is next for you? Actually, I guess I want to try different things which are not related to web, I guess. So I wanted to try Rust, and now I'm also inspired by Flutter.
00:59:33
Speaker
like because it's just a new fresh start like there is no not much mess yet so it might be nice I don't know yeah and see where it leads me maybe like mobile applications nicer than web applications I don't know maybe they need data scripts so I would write the data script in Swift
00:59:56
Speaker
What is Tonski? Because I thought Tonski was your last name, unfortunately, when I just started typing. I used to have my last name and Twitter name, but then I removed it and just kept Nikita. After that, everybody started to call me Nikita Tonski. Yeah, not the first one. The story is really simple. Tonski is a short of Nikitaonski.
01:00:22
Speaker
And Nikitonsky is a change of Nikita that we used in universities, so it was like a finer way to say Nikita, so we switched to Nikitonsky, and we changed all the names that way, so everybody gets onsky suffix. And then it was too long, and I shortened it to tonsky, so basically, yeah.
01:00:44
Speaker
No, I know because I typed everywhere like when I was announcing the episode I was like typing Tonski and then I saw Prokopov. I was like, oh, did I make a mistake and I had to correct everywhere. I guess it's fine. I guess people also see Tonski and you know what exactly. Yeah. Yeah.
01:01:02
Speaker
So you're a full-time Patreon now? Are you working for something? No, not really. No? So the Patreon was quite successful, but right now it shows a crazy amount of money, but it was a generous donation from JetBrains for this month, but they're going to pull the plug the next month. It's just a one-time thing.
01:01:27
Speaker
But yeah, I guess it's enough to keep for a week, I guess. Like it was around $600 before that. And I'm going to... I don't know, actually I decide as I go.
01:01:44
Speaker
Last month, it was Fira code mostly. This month, the Martin collapse actually convinced me that I should do doc strings for Datascript because it has no documentation as of now. Like none at all. Everybody who asked about documentation, I just go read Datomic and they tried Datomic. But yeah, I tried, but this doesn't work. Of course it doesn't work because it was different. What's the matter with you?
01:02:13
Speaker
Yeah, and I don't know, actually, I'm surprised that people still use it and use this attitude. Yeah, so I actually probably will support this projects, try something new, I guess, as I say, I want to try new things. And I have like so many ideas, I just, not enough time. Not enough time.
01:02:43
Speaker
Hey, super nice. So is there any other topic that we want to mention? Of course, I mean, you're on Patreon. It's patreon.com slash Tonski. It's not Nikita. It's not Prokopov. It's Tonski. Yeah. It is. OK. So any famous last words for this episode? I don't know. Enjoy your work. Enjoy closure. Don't get depressed.
01:03:13
Speaker
It's all the good in the end, I guess. But are you going to apply for a close risk together funding or something? No, I did. I did. Okay. Results are not in yet, but this one. Yeah, I did. Okay. Let's, let's go. Fingers crossed. Because there's a lot of stuff like Datascript could use. Yeah. Okay. Good luck with the stuff. And yeah.
01:03:38
Speaker
Awesome. Nice talking to you guys. Yeah, great to talk to you. That's really good. Yeah. And, you know, thanks for your, for your web frameworks. I think they're, you know, despite the fact that it's, you know, web is a pile of shit, you know, it's nice to have tools like, like data script to help us out and wrangle it a bit more easily. Yeah. Yeah.
01:04:00
Speaker
Yeah, you're welcome. And also, you know, the feeder code, there is, I think, really, really beautiful font. You made it even better, obviously, with the legages and everything. And great work on Raman Datascript. And I hope, you know, we keep offering this across for you, so you get into closures together. And hopefully, you know, you don't flutter away into Dart. And then you'll continue building awesome stuff for closure for us. Yeah, I just wanted to say that
01:04:28
Speaker
So this thing with Flutter and looking for better stuff, I was just listening. And I'm not like, one part of me, like, OK, I should try it. And the other part, OK, how do I implement this enclosure? So maybe I'll just steal the ideas and do that in JVM. And we'll have cross-platform desktop framework for applications that works 10 times faster than Electron and 10 times lighter and all that thing.
01:04:58
Speaker
That'd be wonderful. You know, you bring Flutter to Closure, call it Clutter, and that's exactly what you need in Closure. That's what we need. Bring Clutter to Closure. Please use it. You know, we only charge when it is successful. So until then, it's free.
01:05:21
Speaker
Hey, it was it was a very nice talking to you and thanks a lot for joining us on this Sunday. And I think we can roll the credits now. So that's episode number four zero. And we are going to have the next episode pretty soon. We are trying to have at least one or two episodes per month coming up. And of course, as long time listeners of this podcast know already, we are on Patreon. So
01:05:49
Speaker
First, go to Tonski's website, Tonski's Patreon, and give some money there. And if you have a spare change, you can come back and then give that money to us so we can loudly complain about closure constantly. So that's it from us for this episode. Bye-bye. Bye. Bye-bye.
01:06:42
Speaker
And I lost you again.