Become a Creator today!Start creating today - Share your story with the world!
Start for free
00:00:00
00:00:01
#78 Adrian Smith a.k.a phronmophobic image

#78 Adrian Smith a.k.a phronmophobic

defn
Avatar
14 Plays3 years ago
Our guest this time is Adrian Smith aka phronmophobic inventing better ways to build UIs with https://github.com/phronmophobic/membrane Bonus: Rambles about brambles
Transcript

Battling Brambles in the Garden

00:00:15
Speaker
Part of my garden is covered in brambles. And brambles are fucking awful to deal with. So I've been like, shredding them bit by bit. So while you've been doing your calendar, I've been like cutting up bramble bushes. And I'm gradually getting there, you know, it's like 80% 80% done now. But it's like, I know. I know it's like about 40 square meters of bramble bush, which is fucking huge, basically.
00:00:43
Speaker
Okay.

Are Brambles Weeds?

00:00:44
Speaker
Yeah. But is it like a weed or something? Well, I mean, I count as a weed, but you know, there's politics. One man's weed is other man's. And do you hack through it or are you, you're just cutting? I'm just cutting because yeah, if you hack through it, it's kind of like it just, it's not really, it's not that kind of plant that you can just hack through. That sounds more fun, but very spiky. Yeah.
00:01:18
Speaker
But then you have to be careful because then you have to dry it out. You have to dry it out. It spreads very easy in the garden. So you have to dry it out. Then you have to either burn it or give it away. Give it to the worst area. So you can't put it under compost because it will just grow in there. Wow.

Humor and Gardening Podcast Idea

00:01:40
Speaker
Yeah, that would be more fun. I agree.
00:01:40
Speaker
I think we should welcome Adrian to the gardening podcast.
00:01:44
Speaker
Welcome. Welcome to European gardening podcast, Adrian. So please go on. How do we get rid of bramble bushes? Well, the thing is, you have to cut them down. Then you have to dig the fucking roots out, which accounts as well, because, you know, they don't come out easily and then they still grow back. You know,

Creativity or Destruction in Gardening?

00:02:06
Speaker
in terms of like a life's work, these bramble bushes are just
00:02:12
Speaker
I can mark like three weeks of your life. I'll be lucky if it's three weeks, you know, I think that would be, it would be more than that. Oh, that's a satisfying thing to do. I think then you have like a nice garden without bramble bushes. Eventually it will be quite nice. Yeah. But I think it's, I've still got another week or two left to fully clear it and then dig everything out. Oh my God. Yeah.
00:02:35
Speaker
But, you know, I just feel a bit like progress is being made, you know, which is, I don't know, sometimes I feel to myself, like, is destruction creativity? I guess that's really my philosophical thought, you know, because I'm destroying a living thing that's Bramble Bush. And hopefully

Light-hearted Podcast Recording

00:02:57
Speaker
I'm going to create a little orchard there. So there will be more living things that I can eat.
00:03:03
Speaker
Well, you already killed one living thing. Oh, yeah. Oh, yeah. Apparently, yeah. Yeah. Apparently, you're racist against bramble bushes. Several dozen things. Several dozen living things, you know. It's whatever you deem to be worthy of living. Racist against bramble bushes. It's a good way of

Welcoming Adrian

00:03:22
Speaker
telling it, yeah. I'm bramble bushes.
00:03:26
Speaker
Anyway, I started recording anyway because this is pure gold. I think this is what our audience is craving for, how to get out of ramble bushes from their gardens and raise infinite wisdom, removing the roots and whatnot.
00:03:45
Speaker
Welcome to Deaf and Adrian. I apologize for you have to go through all this shitty bramble. Thanks for having me.

Podcast Style and Brand

00:03:56
Speaker
Yeah, we did already. Why not? Maybe it's a good idea to cut this out.
00:04:10
Speaker
At this point, I think we are on brand for this kind of shit now. Rumbling on and not letting the guest talk at all. As you can see, Aryan. Yeah. Rumbling on, exactly.

Why is Sacramento the Capital?

00:04:26
Speaker
This is a brambling episode. So Adrian, yeah, this is definitely some, I think this is a 78 already. Wow. We're, we're, we're getting, there, there was my 78 weeks of life, you know, working on DefN, but awesome to have you Adrian. Welcome to, welcome to the podcast. Yeah. Good to be here.
00:04:45
Speaker
Nice. So you are based in San Francisco or somewhere nearby. Yeah, in Sacramento, so about two hours away. Is that the official capital of California? Yeah, it is. Hmm. See,

Historical Context of Capital Cities

00:05:03
Speaker
a bit of geography there, Vijay. Well, it's not like I care about you as yours that much, but I mean, I'm not taking any exams on you as geography, but
00:05:14
Speaker
Yeah, not bad. Probably you need to know it if you want to get US citizenship or something, right? If you are an immigrant, then you might need to know all the state capitals and whatever.
00:05:25
Speaker
Yeah, if you're here, they don't, they don't care if you know it or not. Yeah. But isn't it one of these weird things that are like, it's one of these like things like Canberra is the capital of Australia, which is just total bullshit, you know, but administrative thing, isn't it? Because obviously, you've got Los Angeles, and you've got San Francisco.
00:05:48
Speaker
Fucking Sacramento, you know, what the hell? Why the hell is Sacramento the California capital agent? I want you to justify it now. Well, I think it's because it was the end of the transcontinental railroad when it was first built. So if you're taking the train across the country in the 1800s, you would end up at Sacramento. Okay, that makes sense.

Life and Tech in Sacramento

00:06:10
Speaker
But it's kind of a running theme in different places, right? Like in Netherlands, Amsterdam is not the capital, but well, at least the seat of the government is in the Hague. And then Amsterdam is like commercial capital sort of thingy. In a lot of places, you know, maybe it's a historical reason, usually. Well, maybe it's a bit different in Sacramento because it sounds like, because like things like Canberra and Brasilia, they're kind of made up to kind of diffuse the power of these bigger cities, actually.
00:06:38
Speaker
Whereas in Sacramento was like, it was the capital, but then these other cities have grown to kind of, which we say they've kind of overshadowed them, overshadowed it a little bit.
00:06:51
Speaker
Yeah, right. Yeah, that makes sense. I think it's one of those, what is it Myanmar? They started building a completely new capital with, I don't know, 18 lane roads and everything that nobody lives there. So it's all like empty wasteland sort of thingy. So Brazil is also in something that is just made up or well, not made up, but I mean, yeah, it was like architect specifically. Yeah. Yeah. Yeah. Hmm.
00:07:18
Speaker
But hey, now we know why Sacramento is the capital of... Well, hopefully that's right. I'm not from here, so that could also just be made up. You just made up a fact then and there. I think that's awesome. I think somebody should go to Wikipedia and then just edit and then just add this one.
00:07:39
Speaker
How did you get to Sacramento then, Adrian, if you're not from there? I mean, nobody in America goes on a railroad as far as I know. Yeah, it's okay. I'm track and now I'm here. So it was the end of the line. So you just got off and just understood. Yeah, they make you get off. So it wasn't my fault. So I was in San

Programming and Closure

00:08:03
Speaker
Francisco for 10 years. And then when the pandemic, during the pandemic, I moved to be closer to family and
00:08:08
Speaker
I have a sister here in Sacramento, so that's kind of where I've ended up. But is it similar to, because you keep hearing San Francisco with all the tech companies there, right? I mean, is Sacramento kind of similar in terms of the tech scene or is it a bit less tech scene around Sacramento?

Adrian's Programming Journey

00:08:32
Speaker
Yeah, there's definitely less of a tech scene, although, you know, there's a lot of
00:08:37
Speaker
There were a lot of people that moved to San Francisco and then during the pandemic, it's like, okay, I've got a tiny apartment and I can't leave and everything's closed. It'd be nice to have a yard and some more space. So there's a lot of tech, I think, kind of moving to other cities like San Diego, Portland, Sacramento, Austin. Okay.
00:09:01
Speaker
What are you doing there? I mean, how did you, well, because this is Closure Podcast, obviously it's not Bramble Bush editing podcast. We'll get back to the main topic of Bramble Bush soon enough. Good, good, good. Yes. So I know that's exactly what everybody is looking up to. When is the next episode coming on? I don't know what to do with my Bramble Bushes. I'll send some photos as well, don't worry.
00:09:30
Speaker
So what is your journey? Yeah. What's your journey to Sacramento? We've covered that one already. Yeah, we covered that one. But we assume that, you know, this is Closure Podcast, so we're going to focus on Closure Journey, not the other stuff. So how did you? It's a professional, isn't it? Oh, yeah. This is 78th episode now. So I learned a thing or two.
00:09:56
Speaker
So tell us about your your programming journey and how did you end up being closure in Sacramento? Yeah, so I mean I've

Learning Different Programming Languages

00:10:03
Speaker
been I started programming kind of I think in middle school and high school just you know programming on the TI-83 calculator and then in high school I just wanted to I thought it would be cool to learn how to program and so like my brother had a friend who liked Java so I just googled Java and
00:10:24
Speaker
They had these tutorials online and you just, you could just go through them. And that's kind of my first, that's kind of how I learned to program. Eventually I went to school and got a degree. My degree was actually in computer engineering because I thought I wanted to do more hardware or electrical engineering. It wasn't until my last semester where I was like, Oh, I like all the programming stuff more. But I didn't want to spend extra time at school. So, um,
00:10:52
Speaker
I was in electrical engineering and I switched it to computer engineering just so I could take more computer science classes. But yeah, it's interesting. I actually value that part of my education just because a lot of computer science, you get a slightly different programming. I mean, that time was a lot of object oriented stuff, but getting a lot of the
00:11:16
Speaker
In computer engineering, you do a lot of learning about the hardware, the CPU, lower level stuff. And that has been really valuable over the years. And

Closure's Appeal and Usage

00:11:26
Speaker
then just programming a lot, you pick up a lot of the other computer science-y concepts about how to organize and structure code. So Java was your first programming language then? Yeah. Oh, interesting.
00:11:40
Speaker
Okay. So after finishing your studies, did you work in Java professionally or did you start learning some other things? How did you end up in Clojure? Right. So when I graduated, I went to work for a startup in San Francisco and they were using Python. And then I went to another
00:12:03
Speaker
startup that was doing mobile games. So that was like Objective-C, C++, a little bit of Java. And while I was at that company, I wanted to learn Closure because it was a, you know, I'd read all the Paul Graham essays about Lisp. And so I was just, you know, I wanted to learn it because it, you know, they, I wanted to learn more about lisps and macros and
00:12:29
Speaker
you know, the enlightenment that comes from that, which is kind of the selling point. But I mean, I don't, I wouldn't say that's the truth, but I'd say, you know, that's when I started to learn Closure. And yeah, so I've been using Closure ever since. So that was around 2013. Oh, wow. So because the, um, did Lisp sound like
00:12:54
Speaker
As you said, all the power that comes because you learn Lisp sort of thing, that is the general vibe. Lisp is the ultimate power weapon that you can have to build anything you like sort of thingy, especially if you follow Paul Graham's essays and everything, and his own Lisp implementation and everything.
00:13:18
Speaker
But it seems like you didn't believe in the message or at least in the beginning you are okay. But now don't you feel like, oh, it's okay. But it is not that that as it's too much marketing around less. Yeah, well, like, I mean, one of the things that I think is unfortunate is I think you can't like I think I learned a lot from all the languages I worked with. So

Closure in the Gaming Industry

00:13:39
Speaker
I mean, I worked with Java, I did some stuff in PHP, I did stuff in Python, Objective C,
00:13:46
Speaker
And I feel like every language you learn that has kind of a different take on things, especially if they have really good documentation like Objective-C and Python, you learn something from each of those. And I think it's the same thing with Lisp. And I really like Lisp because it works well with the way that I like to program. But I think all these different languages, if you go learn Haskell or Rust or whatever,
00:14:16
Speaker
As long as they have really good documentation, a lot of them are really well thought out and you can learn from them. I don't think Lisp is different in that regard. Why closure then? Because if you've seen, obviously started with Java and JVM, but because you did Objective-C, you read Python, that means you are exposed to non-JVM languages anyway. Then what brought you back onto JVM enclosure and why did you stick with closure?
00:14:46
Speaker
Yeah, so I mean a lot of the so I mean I wanted to try it because I wanted like what's a macro like what does it do? Why is it? Why is it helpful? I mean all the program essays are like if you don't have macros, you're like.
00:14:57
Speaker
using a blub language. And so that's what, yeah, that's what got me into it. But, um, what kind of stuck made me stay was that like, uh, I really like, even when I was working in Python, I wanted to do repl driven development. Um, and

Innovative Projects with ClosureScript

00:15:12
Speaker
I wanted a functional style. And so I was doing a lot of this stuff in these other languages, but it wasn't necessarily well supported. And then when I got to closure, I'm like, Oh, this is like, I really felt at home. It's like, this is the way I want to work. I want to do, I want to live code stuff. I want to do repl driven development.
00:15:27
Speaker
I want to use pure functions. I want immutable data structures. I remember in C++, you create a class to represent some data. There's already a vector that lets you, there's these built-in data types. In Python, it's actually pretty idiomatic to use the built-in data types like lists and maps. In Clojure, that's also the case where you have all these
00:15:55
Speaker
you know, you just represent data with data and that you don't necessarily create new data types every time you want to talk about something new. And so basically Closure, the way I wanted to program, I was kind of already going in that direction. And then Closure just makes all of those things easier. It gives a lot of support, built-in support for it. A lot of the libraries I use are also, will also help you program in that fashion. So it just,
00:16:25
Speaker
Yeah, it worked well for me. Adrian, what sort of domains? You said you were working for a games company. Have you been generally involved in games programming on the mobile or what are the domains you're working?
00:16:44
Speaker
Yeah, so I mean, I don't I don't consider myself a games program, but that is a lot of my kind of professional experiences that so when I was in college, I started making Facebook games and that was the start that I worked for. And then I came to San Francisco and worked more on Facebook games and then
00:17:01
Speaker
While I was doing that, I picked up iPhone programming because it was like 2008. And there's a Steve Jobs presentation. And it's like, oh, this looks really fun. So I started learning iOS development. And then I had a friend that I used to work with start a new game company on iOS. And so I went to work there. And so those were mobile games. They're kind of like simulation style where SimCity type
00:17:31
Speaker
games where you have like a zoo and people will visit your zoo and then you buy animals, which gets more people to visit and you kind of decorate and build a big zoo is an example. Yeah. So yeah, that was all in Objective C. And then when we started to do cross-platform games, it was in C++ over what we called Objective C++, which is kind of a monster.
00:17:59
Speaker
Yeah. Is this based on Objective-C or is it just your own? Because did you bring C++ concepts into Objective-C or writing some parts in C++ and writing some parts in Objective-C and then combining them together?
00:18:15
Speaker
Well, we found this, when we were using this Objective-C library for the game engine called Cocos2D, and then there's a C++ version called Cocos2EX, but it's basically a one-to-one port of
00:18:31
Speaker
the Objective-C version. So for memory management, you still do a lot of the Objective-C stuff like retain release, auto release, the reference counting. Yeah. So it's like a lot of those, since it was a one-to-one translation into C++, they had a lot of Objective-C idioms, but it was in C++. Okay.
00:18:59
Speaker
And Sarire, you were saying something. I was just going to say about the game's engine, but you've kind of answered it, so it's no problem.
00:19:08
Speaker
So when you transition to Closure or when you move to Closure work, are you still working on game side of it? Or what is your Closure experience so far? Is it on gaming? Is it on web development or mobile stuff with React Native?

Balancing Contracting and Personal Projects

00:19:30
Speaker
Yeah, what I started using it for was data processing. So we have these games online, and a lot of the game is powered by analytics. And so that was where it was very directly applicable, was that Closure is really good at data processing. So we collect all these data analytics, and then I can use Closure to analyze the data and try to figure out how to look at metrics and how to update games.
00:19:58
Speaker
And then, so I guess after around 2013, I started doing contracting. So I used

Membrane: Simplifying UI Development

00:20:10
Speaker
Closure and ClosureScript for contracting. And then I've also been doing open source work with Closure. So I've started to, I mean, for contracting, you don't always get the choice. When I could choose Closure, I would choose Closure when you can.
00:20:28
Speaker
use whatever language that they were using. So like some of the stuff that I've done in Closure was I worked on this really cool project called Kanigama, which was an online, was reimagining what like the digital comic would be.
00:20:48
Speaker
And it never quite gained enough traction to take off, but I thought, I mean, basically what they had was, it was like a small, one small interactive panel. And instead of having, you know, most comics, you have multiple panels, but you would have one panel and then to progress the story, you kind of interact with one panel. So it's like either a very like story-based game where there's not much like,
00:21:19
Speaker
you know, not much interaction where you're just kind of progressing the story and making simple decisions in the story is kind of one way to look at it. So it's not a comic reading experience. It's more kind of an interactive gaming comic mixed thing. Yeah, it's like an interactive story through like one frame that is, you know, telling the story and is animated. Yeah. And you've got some choices where you can take the story.
00:21:49
Speaker
Right. So yeah, some of them were more complex, and some of them were more game-like, and some of them were more kind of just story-driven, where you kind of go into the next panel by interacting with different characters. Ooh, nice. Is it all done in ClosureScript, or that one is completely ClosureStack? Yeah, so there's a web server, and there was a ClosureScript to run in the web browser. OK.
00:22:17
Speaker
So what are the Closure Script things that you've been using? Because if you started in almost 2013, I'm not sure what was the situation back then. But I'm guessing you picked up.
00:22:30
Speaker
the state of the art, so-called state of the art, ClosureScript stuff now, but with Reframe and all those things. So how was your experience with ClosureScript? Because if I see your experience, you're mostly working on Java or iOS, kind of backend sort of work. So how did you feel picking up Closure for the backend? And how do you feel picking ClosureScript for the front-end sort of work? Well, for the backend, that was pretty familiar.
00:23:00
Speaker
Um, you kind of like, I used, uh, Django and Python and, you know, it's not like it's the same thing, but there's a lot of, uh, knowledge transfer between that and, you know, composure and ring. Yeah. But, um, for closure script, I'd actually been doing, um, I mean, I've done, I did web development before. And, uh, at that time when I was doing web development was mostly in, uh, jQuery, but,
00:23:25
Speaker
Even at that time I was like I would basically have the data model and then I would have like an update UI function which would go and based off the take the data model and play every single time you call it update UI would play every single change to the Dom. So when react came around is like oh. It does that, but it's more efficient and it has built in support and there's all these libraries and it just does what I was doing, but better. And so for closure script it was it was. After learning kind of some of the
00:23:56
Speaker
you know, learning Closure itself and getting over some of those hurdles. Doing the web development felt pretty natural. And the other one, so at the time you were asking about the tech that there's, I was using Ohm, not Ohm next, but Ohm, like the original Ohm. And Closure Core Async. So there was a, and Core Async was,
00:24:26
Speaker
actually a really great fit because we're doing this comics which have a lot of asynchronous event handling as well as the way these were meant to be embedded. So you would have an iframe and you needed to be able to switch between comics. So since each of these comics were like JavaScript code, you wanted some sort of isolation between comics so that if you have a comic,
00:24:55
Speaker
You go through it, and you load the next comic. You don't want any residual state to kind of want timers and stuff to be continually run. So you would have an iframe that would embed it. And then you'd load another iframe to run the comic. And in some cases, you would also have ads that would load asynchronously. And then you would also have asynchronous events coming in from user interaction, from people tapping on the comic itself. So core async.
00:25:25
Speaker
was a huge, I mean, handling all this asynchronous stuff would have been a nightmare, just callbacks. But with Core Async, it lets you do a lot of really cleanly express all these asynchronous pieces that needed to fit together. So how did you become
00:25:46
Speaker
How productive were you? I mean, because I'll be just reading the comics, you know, after building the first first thing, just wasting my time just going through the comics myself. Oh, yeah. Well, so like, I mean, so at the time I was contracting and I was doing that part time. So like I was I was doing I was picking projects and I was specifically picking them so that I could
00:26:15
Speaker
basically work part-time. And then part-time, I wanted to work on this side project, which I've been working on since in the background the whole time, which is the long-term goal is I like working on programming for non-programmers. And that has many manifestations. But the biggest portion of that is this UI library that I've been working on called Membrane.
00:26:45
Speaker
Yeah. So, um, but yeah, so that, uh, most of the comic stuff was like one day a week for several years. And so like, I would, it was actually a really great way to work because, you know, you come in on Monday and there's like a list of stuff that you need to like get done that day and both know you have a limited time. So like they do a really good job making sure you're working on the things that they actually care about and they're well specified. Yeah. And then you like go in there and you try to like crank it out.
00:27:14
Speaker
and you do it again the next week.
00:27:17
Speaker
But that seems to be the biggest challenge in software development, right? Like identifying what exactly you need to work on and then essentially bringing the requirements in a proper way. So you built the comic thing in Ohm. Did you move to other technologies, like reframe, reagent? Because Ohm is kind of now, well, not in the top three right now, I would say.
00:27:47
Speaker
Right. So I never, yeah, I guess I never made it to, I mean, I've kind of as part of working on my own UI library, I've, you know, I've read about all the different options for building user interfaces. I might cheat sheet over here. That's what I'm looking at. But I never, yeah, I never seriously like had any serious projects in like,
00:28:15
Speaker
reframe or hop on or reagent. Yeah. So let's talk a little bit about this because you said you are passionate about coding for non coding people. Is that right? Is that the right way to put it or? Yeah, I don't know what the best term for it is, but basically like the no code movement. Well, I mean, I definitely wouldn't call it no code just because it's like basically it's like if you
00:28:46
Speaker
Anybody should be able to make

Membrane's Vision and Differences

00:28:47
Speaker
a simple desktop web or mobile app is kind of the goal. And kind of saying no code is like, I mean, I don't know what the right marketing thing is, but like, so for example, I think Excel is a way people can like be really, can get the computer to do what they want and be productive. And it's really flexible and general. And there's a very, the learning curve is very gradual. So it's like, if you spend a weekend learning Excel, like you can, on Monday, you can be more productive.
00:29:15
Speaker
So kind of more, I think we can make software, like there's a lot of software development in my experience is just kind of like there's a lot of incidental stuff that has nothing to do with actually writing the software and that we can remove a lot of it. And so that's kind of what I'm passionate about trying to figure out is like, how can we just like remove this 90% of stuff that just like has nothing to do with the problem?
00:29:43
Speaker
Yeah. So basically unit tests, which nobody writes, and documentation, which nobody writes. So we can remove all the unnecessary parts of software. Who needs documentation anyway? But yeah, that's kind of a challenging domain. I think there have been multiple efforts are still ongoing to bring
00:30:10
Speaker
Yeah, as you said, I think saying it code or no code doesn't make any sense. It's more about solving your problem using software that you built quickly without having this whole, I need a developer to do this for me sort of situation.
00:30:30
Speaker
But maybe it's a better, maybe the question then is like, what, with Excel, you kind of like, you're thinking about, you know, I mean, I guess with Excel, a lot of people are thinking about accounting or about planning or something like that, you know, those kinds of like business type domains. I mean, you know, you can write recipes and now you can do all kinds of shit in Excel. But essentially, I mean, I would say essentially it's planning and
00:30:57
Speaker
Numbers accounting, I know Excel has got more capabilities in that but those are the essential domains So what is it with this? if you're going to do like An equivalent for Excel you have to pick another domain which is approachable or which is well known So is that the idea that you kind of have some some game? some gaming kind of
00:31:22
Speaker
system or some sort of minimal gaming system that you're addressing with this particular tool? Right. So I mean, there's kind of like a long-term plan. So I think Excel, what it's really good at is that you can, I mean, if you look at kind of technologies that people can get up to speed with and build without a lot of experience, really interesting stuff,
00:31:50
Speaker
You look at Excel, it's mutable data, data flow, pure functions. Excel has all of these things. And these are really good for kind of, and it's also incremental. So it's like a half,
00:32:05
Speaker
If your Excel spreadsheet is half working, you get half the value compared to a C program. If you're missing a semicolon, it doesn't do anything. It gives you feedback as well as a killer. Right. You can have these pure data flows. One thing that I think is missing is that you can't
00:32:31
Speaker
There's no good way that I know of to do abstraction, which I think is easy to add. Basically, you can have your input cells as the function parameters. And then you have one output cell. And then you can have as much stuff in between. And you can create a function from that.
00:32:54
Speaker
But anyway, I think you can use Excel to create pure functions. And then one of the big missing pieces of Excel, from a general perspective, is that there's no side effects. It doesn't interact with the world. So you can't send. Well, they have specific integrations with email and databases.
00:33:20
Speaker
You know, I think you can, um, it's not good at like this side effects stuff. And so I think you want, so I think what you want is another tool that helps you with the kind of workflow composition, um, piece that helps you deal with the side effects. Like, um, an example of that is like if this and that or Zapier where you're kind of like.
00:33:42
Speaker
You have inputs to the system. You have data coming in like emails and text messages and user input and stuff from the network. And then you transform that with pure functions. And then you have outputs like sending emails, text messages, writing stuff in the database, displaying stuff on screen. And so I think if you combine those two, you can basically make any program.
00:34:12
Speaker
So how did you, from this idea of making easy to solve your problems using software that you can build yourself? Which is, I think, quote unquote, no code.
00:34:29
Speaker
or whatever that is that people are calling these days. So is this the genesis for Membrane? Is this the one that you started working on towards this goal? And then maybe you can explain how Membrane came to be. Right. So basically, the app that I was doing these demos, and I was doing it with Closure Script,
00:34:58
Speaker
And I felt like, I mean, this thing that had been kind of bugging me for a long time is that I feel like building user interfaces is way more difficult than it has to be. And then there's all this incidental complexity. And especially UI code has this like, it's slow and brittle, and it's slow to build, and it's brittle, and that it's not composable. And it's like, if you target web,
00:35:25
Speaker
And then you try to take that to mobile. A lot of times you're using completely different tools, completely different stack. And there's all these issues with just composition and flexibility and reuse. And the other part is I was trying to build these, you're writing programs that are dynamic. And it was just a real challenge to try to build that using
00:35:55
Speaker
the UI libraries that were available. And so for the demos I was doing, I was doing the thing where you write your front end enclosure script. And then if you want to talk to the file system, the database, do networking, you would have to do that on the JVM. Or I was doing that on the JVM. And so you have this huge problem where you have to send all the data back and forth across the network. And you have to serialize everything.
00:36:24
Speaker
And that just adds a lot of complexity on top of the already hard problem. Yeah. Um, so I was really, um, so membrane is my attempt at like building the UI library that, um, tries to simplify, uh, building user interfaces. So the idea of membrane is that you can do all of this traditional server side stuff in the client device. Well, um, so network chatting.
00:36:54
Speaker
Well, with Membrane, I mean, it was really just trying to simplify user interface development. And it's kind of trying to get back to like, what is a user interface? Even just trying to answer that question. And kind of good first principles. So I mean, what I started with was like, OK, I'm just going to get OpenGL. And I'm going to have closure. And then I'm going to try to build everything, which is data and pure functions. What's that look like?
00:37:23
Speaker
Um, and that's kind of where I started. And since then I've tried to like, actually, um, build it out a lot of the concepts were like, okay, what is the user interface? How do you, um, how do you build stuff with just data and pure functions? And, um, kind of since I've been doing that for a while, it's a lot easier to look back on like these different options, like Hoplon and, uh, full grow and helix and reframe and reagents and, um, and say like, okay,
00:37:53
Speaker
Here's why I feel like those aren't simple enough. They're not using data. They don't have pure functions. The graphics and event models aren't pure and functional.
00:38:11
Speaker
So how do you, so if I'm trying to understand what membrane is, so it's essentially a way to declare or create UIs and then the actual UI code
00:38:27
Speaker
Is platform specific? Is that a way to understand it? So I can specify, I'd like to have a window with a button, blah, blah, blah. And then if I execute it for web, I see a different thing. If I see, I can execute the same code to have the same UI across different platforms. Is that a way to understand it? Yeah.
00:38:54
Speaker
Going back to what is a user interface, what it boils down to for most user interfaces is you have graphics, which displays the state of a program. And you have events, which mouse and keyboard from the user that gets interpreted by the user interface. And so the goal of the user interface is to display the state of the program.
00:39:23
Speaker
which I think we're pretty good at. And then the user interface itself should just, all it is is a pure function of raw events like mouse and keyboard to user intention. So it's like, you have a mass click at 0.4455 and the intent is to add a new to do to your to-do list.
00:39:45
Speaker
And so you have a pure function from the state of the program to the graphics should look like, and then a pure function from the raw events to the user intents. Um, okay. Yeah. And so if you define your user interface like that, it's just a, it's just data.

Membrane's Community and Innovation

00:40:01
Speaker
And you can basically, um, membrane has backends for all these different, uh, platforms and platforms survived, you know, graphics and raw events. So it's like.
00:40:13
Speaker
Java 2D has graphics and events and event handling. You can run the same user interface in the terminal. You can do it with WebGL. You can run on the iPhone now. So basically any platform that has raw events and 2D graphics membrane, you can write a backend so that your user interface will run on those backends.
00:40:38
Speaker
So do you need to do the translation yourself, or is it something you can just plug in Membrane and then say generate the UI for, let's say, macOS, for example?
00:40:48
Speaker
How does it work in practice? So if I want to start, let's say, I want to build, let's forget about the back end. I just want to build it, as you said, like a to-do list, like a cross-platform one using Membrane. So how would the developer experience be compared to normal thing? Like I'm going to build a SwiftUI. I'm going to build an Android using, I don't know, Kotlin, whatever Android has XML shared.
00:41:12
Speaker
And then for web, I'm going to draw my HTML, DOM, whatever. So how is the experience different? Why would I pick membrane that is going to solve this pain of building cross-platform stuff? So in some ways, it looks kind of similar to what you're familiar with. One of the big differences is that the primitives that you work with
00:41:42
Speaker
Like you have shapes, like squares and rectangles and text and images and kind of like ways to draw those. So they're basically just 2D primitives. And then you also, with events, one of the big differences is that the event handling and membrane is
00:42:05
Speaker
It's based on return value. So like for most stuff, it's like on click, what happens in reframe or most similar libraries is that you will dispatch an event. So it's like you receive the event and then immediately you start firing off side effects. Whereas in Membrane, you just return what the intent should be based off of the input. And since there are functions, you can kind of compose them. So it's like you can build
00:42:34
Speaker
complicated interfaces around simpler, smaller interfaces. And the other thing that you can do is like, let's say you have a button and you tap on it and it's supposed to increment a counter.
00:42:56
Speaker
In reframe, it's like if you wanted to say which counter that was supposed to increment, you have to pass in a callback because it's all based off side effects or you have to receive a callback. With Membrane, you can just modify the function itself, the return value of the event function. Basically, you have the button and then you just modify
00:43:21
Speaker
its event function to return which counter. So it's a little bit hard to kind of explain without a code example, but basically, it's not based, you know, and a lot of these other ones, it's based off side effects, whereas in membrane, it's based off return values and kind of just functional composition.
00:43:43
Speaker
I'm thinking about like reframe now, what you do with reframe is you just say what the keyword is and that becomes a function dispatch on that particular event function. So it's not like you don't pass a function, just say this is the keyword that I'm going to dispatch and that results eventually in the graph calling that function. But it sounds similar to what you're talking about in some ways.
00:44:14
Speaker
Right. Yeah. I mean, there is some like, and a lot of times it looks very similar to where, but when you're trying to do like, when you're trying to build tools around it or do generic processing or do testing, that's when it really starts to matter more. So like, there's a lot of like, if you're just using data and pure functions, you know, you don't need a UI testing library. You just use a regular testing library. And I think a lot of the,
00:44:44
Speaker
One example that I like to reference is that for Reframe, you can't have multiple applications running at the same time. That's because all these things are side effect based. The event gets dispatched and it's like everything's already in motion, it's all connected.
00:45:13
Speaker
It's too late to go back and add some context that says, OK, this event should be dispatched to this particular application instance. Whereas, remember, you just modify the event function to be like, OK, all the events under this part of the tree, now they have this context that says which application it should go to.
00:45:40
Speaker
So how is the, because I'm trying to understand how do you compare this with, um, Oh, maybe, maybe, uh, better, better question for me to understand this better is like, so the rendering is delegated to the platform itself. So you don't have any rendering code in membrane. Is that right? Yeah, it's a separate piece that you kind of like, so basically you build your application and you say like,
00:46:04
Speaker
So you might say, I have a label. And next to that is a rectangle with rounded corners. And then next to that, there's an image. And so all of these things are just data. It's just like there are records for each of those different types, the images, the label, and the shape. And each platform provides its own draw function.
00:46:35
Speaker
So you can basically just say, take this data structure. And if you want to draw using Java 2D, you just call the Java 2D draw function with that data. And if you want to draw using WebGL, you just call the WebGL draw function with that data. And there's now back ends for like, you can just draw stuff in terminal. Fortunately, there's one graphics library called Skia that
00:47:02
Speaker
runs on several different platforms so that

GraalVM and Cross-Platform Potential

00:47:06
Speaker
just implementing that one library kind of lets you run on several different platforms.
00:47:14
Speaker
Skia, the thing that Nikita is building? It's from IntelliJ, Skia. But I think Nikia is part of it. Yeah, yeah, yeah. Well, Skia is the graphics library that is used by Chrome and Android. And Skia, it's like S-K-I-J-A, is Nikia's. He wrote Java bindings for it. Oh, OK.
00:47:44
Speaker
And which you can also use from Closure. Yeah, yeah. And then he's going to do a Closure version of it, I think, first part of this Closureists Together thing, or he's thinking about it. I don't know. Well, it looks like he's interested in building a UI framework on top of it, which sounds really, really cool. Yeah.
00:48:05
Speaker
So how does it compare with, I'm sure you might have looked into things like Flutter or this whole, because there has been a lot of efforts to unifying, having a common framework that you can use to build kind of a
00:48:25
Speaker
same experience or using the same code base, but able to build UIs for any platform we like. Right. I mean, one of the... React is an obvious example as well. Yeah, exactly. Using React Native. Well, React and React Native.
00:48:41
Speaker
Yeah. Yeah. So how do you, how do you see the, what is your opinion on these kinds of things? Because it seems like, uh, at some point people have given up on native components and then we have this monstrosities of, you know, fucking electron applications everywhere, not, not respecting any of the platforms, uh, you know, behavior at all. Uh, and then on the other hand, things like flutter and those things are coming up. So how do you see these things evolving and where do you put membrane in this, uh, in the spectrum?
00:49:11
Speaker
Yeah, so Membrane probably does too many things. But I mean, so there's the state management, which is similar, tries to solve a similar problem to relay or reframe or reagent or fulcrum. And then there's the raw graphics and events part.
00:49:38
Speaker
And one thing that I would say is different from Flutter is that if you look at a lot of these, there's a lot of functional UI libraries, and most of them focus on state, which is where a lot of functional programming tends to really shine. But they're all built on top of these object-oriented
00:50:07
Speaker
Yeah, they're all built on top of this object-oriented stuff. So for Reframe, it's built on top of the DOM, which is this highly object-oriented, both graphics model and a highly object-oriented event model, which is all based off side effects. And then if you look at Flutter and React Native, they're built on top of UIKit or Android stuff or Qt or GTK. All of the state management libraries
00:50:37
Speaker
are just built on top of this object-oriented stuff. And a lot of the issues that come from UI programming that we're running into today and starting to bump into as we build more complex apps comes from the object-oriented stuff underneath.
00:50:57
Speaker
Do you think it's because, okay, well, maybe you should just tell us why you think that is. Where are we hitting the limits of this, like, or concepts? Because, you know, instinctively, I want to agree with you, but I'd like you to kind of reason it out a little bit. Yeah. Well, I was just, so today's, I think it's the 10th anniversary of Simple Made Easy, the Chinky Talk, and, um,
00:51:26
Speaker
Basically, I mean, I think it's like, it's, it kind of just goes back to those things where you want to build applications out of some dramatically simpler stuff. And, um, what I think you can kind of see where you're bumping into those issues with like, especially with react, where it's like, um, you can't.
00:51:49
Speaker
Like if you have a testing library, you kind of almost need a react testing library. You can't just use any testing library. I mean, one of the benefits you get from most closure code is that like, if you have a library that works with data, you can reuse it anywhere. So you can reuse spec for all sorts of stuff. You can reuse meander and.
00:52:06
Speaker
Spectre, and all these data processing libraries in all sorts of different fields. Whereas with UI stuff, you tend to have like, OK, I have reagent. And then to make that easier, I have reframe. And on top of that, you have maybe some other component library. And then if you have a database, it's like a UI database. And if you do event handling, it's UI handling. And so all this stuff gets coupled together.

Exploring Functional UI Libraries

00:52:34
Speaker
It's specialized by the, the context rather than by the problem. Right. And, um, and it's just like, um, and it's hard to kind of do generic stuff. And like another example is, uh, so if you write a reframe component and you want to reuse that same component in full grow, that's like, it's like nonsense, like.
00:53:02
Speaker
As far as I know, that just doesn't happen. Even though they're both built on top of React, why can't you reuse this? Why can't I just take a UI component from this other thing and reuse it? With Membrane, every Membrane component,
00:53:25
Speaker
So I would say that the reframe components kind of like, complex the state management with the graphics and events. And so for each of cljfx and reframe and fulcro, you can take a membrane component and convert it. With one function, you can convert any membrane component into a fulcro component. And there's another function that will convert any membrane component into a reframe component.
00:53:53
Speaker
And I think that's kind of what we want, is you define a UI component. And since it's a pure function, you just reuse it. So it's like somebody wrote a date picker, and I want to use it. I don't really care. I think it's a big problem that, oh, they wrote it in reframe, and now I can't use it. I have to write my own now.
00:54:19
Speaker
So one of the things, yeah, I mean, that's a great point because, you know, these things like date pickers are very generic, but I think these React hooks are meant to try and solve that. So you can start to import like React components into the ClosureScript world.
00:54:41
Speaker
Is it similar in some ways, the membrane approach to, I mean, you could argue that hooks are a kind of like functional version of component definitions. Well, I mean, I mean, I think I would not consider, I think React hooks are probably the wrong direction. And the reason for that is, I mean, basically you want to build components out of data and pure functions. And so
00:55:11
Speaker
And fundamentally, subscriptions and React hooks are based off of side effects. I was watching a talk about a brand new, it's a relatively new UI framework. And they're like, oh, yeah, it's a function, but you shouldn't call it.
00:55:30
Speaker
Like you don't call it, you know, you pass it to react and eventually somebody else calls it. And like, it's a function. It's like, what else are you going to do with it? So like, um, every, like every membrane component is just a pure function. So you can call it with whatever data you want. You don't have to set up any context and you get back data, which is just like, um, which is basically just the, the event function in the graphics function. So you like, um, you, you get back a view, which you can like,
00:55:59
Speaker
You can write to disk. You can draw it in a number of ways. You can draw it to an image. You can draw it to any of the other graphics contexts that are available. And then you can also immediately say, OK, what's going to happen? Or you can ask for what are the intents if I click at mouse position 44. So I create a component.
00:56:23
Speaker
I pass it in the data that, and it returns a view and I can say like, okay, I can basically just click everywhere and see what happens at each passport where I can type in every key stroke and get back all of the events or all the intents that would be returned. If, you know, the user were to be typing or clicking on that component.
00:56:48
Speaker
So you will build, or the idea is that when you're using Membrane, you define, declare the UI in Membrane as components. And then you can essentially translate it into any of the frameworks that I'm using or any of the platforms that I'm using.
00:57:08
Speaker
I can think of it like, OK, now I want to build a reframe application, but I can just reuse all the membrane components that I have. Then I just bring them in and then build a thing. So how complex it is to build complexity-wise?
00:57:29
Speaker
Is it simple? Is it easy? So how does it work in terms of building a full-fledged web application or a desktop application with lots of buttons and whatnot and everything that you see usually? Yeah, so I mean, I've been focusing mostly on desktop just because that's kind of the problem space I'm interested in. And I mean, I know I've been kind of like beating up on Reframe and Reagent and Fulcro, but they're actually like
00:57:59
Speaker
If you want to build a web app location, they do make it really easy, and they are really good at what they do. So the biggest application that I'm working on and is a work in progress is, basically, I just want to be able to drag and drop UI components. Basically, I want interface builder meets Figma. You can kind of direct manipulation
00:58:27
Speaker
drag and drop components and kind of quickly throw together user interface. And yeah, that was what I was trying to originally build and decided that it was really difficult to build using kind of the tools that were available for both user interfaces.
00:58:53
Speaker
So in the journey of, because this is all obviously started based on your idea of making it easy to build software without too much effort, and then that can run anywhere. So I would consider this like a first step, right? I mean, because building the UI, I think we have enough tools to simulate at least building a complex UI, how it is going to look like in different platforms, for example.
00:59:21
Speaker
But there is still part of the business logic part and quote-unquote business logic or what should happen. And as you pointed out, the whole side-effective thing, like where am I going to store the data, for example, and where I'm going to read the data from. So how is your vision from membrane to that point? How do you want to take it to that level? Is the membrane first step, or is the membrane
00:59:50
Speaker
kind of a critical part of that one. Yeah. So, I mean, I think like kind of coding for non coders is a big problem. And the way you solve big problems is you break it up into smaller problems. And there's a lot of like one of the smaller problems I think is just like I wanted to build dynamic. I want to be like, if you're actually making a dynamic user interface in itself, then like
01:00:19
Speaker
You don't know what people are going to build, so it needs to be dynamic. I was having trouble building those user interfaces with the tools that were available. The formula in my mind is you have something like Excel for data processing and creating pure functions.
01:00:47
Speaker
And then you have something like, um, well, I haven't mentioned, uh, something like, I don't know if you've played the game factorial. No, I thought not. No. Okay. Um, but basically something that helps you build the side effect part, like you, you can build workflows, um, kind of like Zapier or if this and that, but it's a little bit more flexibility for the side effects. Um, and then if you can also build a user or face on top of that, you can, that's kind of like.
01:01:15
Speaker
you can kind of build anything from those parts. And also, the two pieces, like the Excel-like portion and the factorial-like portion, I need to build those user interfaces. So having a tool that makes it easier to build those user interfaces is also part of solving the problem. Yeah. Why did you pick Closure for this, given that you have experience with so many other languages? Why Closure?
01:01:45
Speaker
Yeah, I mean, I think Closure is actually, I mean, Closure, I mean, one of the things from Simple Made Easy is that like, we can build programs using simpler stuff and, you know, people have been building databases and data processing and if, you know, there's all these different things that, all these different programs and different types of programs and all sorts of different domains and banking software that Closure has been able to
01:02:13
Speaker
build things using simpler underlying pieces. I don't see why we can't do that for user interfaces. And I've really gotten a lot of benefits from using Closure because it supports, I mean, especially for building user interfaces, having the live, the REPL-driven development with live coding is really useful. And just by using, you know,
01:02:43
Speaker
Just by using the built-in Closure stuff, you have event processing, but if you want to add more events, Closure makes it easy to have an open data model. And you represent your views as data. And it's like, OK, it makes it easy to be like, OK, I want it to run on the iPhone or a terminal or on desktop or in WebGL.
01:03:10
Speaker
So and it also makes immutable data in pure functions idiomatic, so it's like. Is a long term project being able to like write some code that is really like really stable has been really helpful that you can you know I write this part of the code and. I can reuse it later and it's I can come back you know like one or two years later it kind of still just works and.
01:03:41
Speaker
So yeah, that's a really good point actually. One of the things just to clear up though, so you're saying that it kind of like skated past me a little bit, but what you're saying is we should give up on the DOM. Is that right? We should stop using the DOM and we should just use other things to build UIs.
01:04:04
Speaker
Yeah, absolutely. So the one caveat is that if you're targeting the web, you need to spit out HTML stuff. But we should absolutely not be creating user interfaces with those primitives.
01:04:25
Speaker
Like I don't, I've been doing web development for a long time and like, I still don't feel like I know what it did is. I just know that they're everywhere. Yeah. Yeah, I agree. It's just something I put in there so I can call my reframe app.
01:04:42
Speaker
Right. I'll just style it, you know? Yeah, exactly. And if you look at... I agree with you. I mean, it always seems very frustrating to me to have these things in the DOM rather than... I think people have been moving a little bit more recently, even the bigger companies towards Canvas and things like this, because they can't get the efficiencies from the DOM.
01:05:06
Speaker
And it always felt a little bit like, I mean, people said this, people said it a long time, that the DOM was not made for applications, it was made for text. It's called the document object model, not the application object model. And it's got object model in it as well, which is your point.
01:05:24
Speaker
So we should have like an applicant, you know, maybe it's a functional model FM, you know, rather than like document object model. Maybe I could say you can have documents around the side of it or to the left of it, or use, you know, using hypertext. It's fine. You know, you can link to things. You're not thinking about those things because they're nice and simple, but what you're saying is we should use the simpler parts of the other web stack rather than this DOM stuff.
01:05:54
Speaker
Right. So I mean, I think like, um, I mean, there's already projects that do this today, like react native web and react primitives, but basically just like, if you look at design tools.
01:06:05
Speaker
There's almost, I don't think I've ever seen, I mean, I'm not a designer, so maybe they exist, but I've never seen a div tool. What you see is shapes, you have text, you have images, you have gradients and stuff, but there's no div. And so what we should do is be defining our user interfaces in terms of these parameters, like shapes, text, images. But it's okay to, so the browser requires HTML, CSS, and JavaScript,
01:06:35
Speaker
And a lot of people are moving, like for JavaScript, for example, people aren't writing the JavaScript directly. They're either minifying it if they're writing JavaScript or they're using TypeScript or ClosureScript. And it's spitting out more performant, smaller payloads of versions of JavaScript that do the same thing.
01:06:58
Speaker
And we can do that with our graphics, too. So you can write text and images and shapes. And you can build a compiler that will spit out HTML that's smaller payloads, better performance. And it's also not tied to the web platform.
01:07:21
Speaker
And why did you pick WebGL, though? Because I was wondering, because if you're drawing it in a browser, technically you can use SVG. Because if it is just shapes and images anyway, then why WebGL? Why not SVG? Or is it just another backend? Yeah, it's just another backend. So there's actually a backend that will draw to a WebGL context. There's also another backend that uses
01:07:50
Speaker
there's a library called VDOM, which is just the virtual DOM part of, like it's kind of like just the virtual DOM part of React. It doesn't have any of the state management stuff. And so there's another backend that was like actually spit out HTML virtual DOM, which VDOM will reconcile with the underlying DOM. And if you wanted to build a SVG backend, you can just, all you need to do is basically
01:08:19
Speaker
provide implementations for like, here's how you draw a shape. Here's how you draw an image. Here's how you do text. Oh, OK. Isn't there? There's another standard coming on apart from WebGL, isn't there? Like a super success at a WebGL. And I can't remember its name right now. Maybe you know it, Adrian. I don't know what that is. It's because WebGL is like one of these things which is not performing very well and it's
01:08:50
Speaker
It doesn't adapt very well to the hardware. Is it the Web GPU? Web GPU. That's it. Yes. Yeah. I just Google for it. Yeah. OK. This is a live podcast. All right. We have access to the information. Yeah, it seems to be the Web GPU thingy. OK. That sounds like a really weird name for this shit.
01:09:22
Speaker
What is WebGPU? Well, obviously, I think there is a biggest question that I'm interested in. So which editor do you use? Do you use Emacs or some other shit?
01:09:35
Speaker
Yeah, use Emacs. Fuck. That makes sense. I mean, look, all these awesome ideas. I mean, I was thinking, OK, I've been talking to this person for one hour already. He seems to be like a really good ideas. He must be an Emacs person. It's kind of a given. Awesome. I even love with it. Or do you want to render it in a different way? Yeah.
01:10:04
Speaker
I want to be able to embed a text editor and I've been trying really hard to figure out how to embed Emacs so I can just use it everywhere.
01:10:14
Speaker
So all I need to do is just draw a shape in Membrane and then just embed Emacs into that one. And then that becomes like a next generation web, next generation editor. Awesome. So there is a Membrane.el eventually. There will be. Because I think Emacs has this weird UX or UI component. You can define a button and all that stuff, the configuration and everything.
01:10:39
Speaker
So I'm guessing somebody needs to build a backend for Membrane or the interpretation for Membrane. So I can write the same UI, and then I'm going to render it inside Emacs. Yeah, I mean, I'd love to be able to just, I mean, Emacs, unfortunately, I think is very tied to the terminal. I'd love to just have it spit out what should be displayed so that you can just kind of run it anywhere, but haven't quite figured it out.
01:11:10
Speaker
Yeah. I mean, I think what you're saying is it's a piece of shit, but okay. That's just my rough translation. Okay.
01:11:26
Speaker
Yeah, so I mean, we already established Emacs, you know, is the reason why you came up with this, you know, better ideas and everything. It's not just because you're working. Yeah. I mean, that's the whole idea. I got to say, these do sound like really good ideas and very, it's very fundamental. And, uh, yeah, I like it a lot. It's, I think it's, uh,
01:11:47
Speaker
So what stage are you kind of at in terms of this, uh, tubing, Adrian, you know, where you kind of like still in the sort of build out phase of the fundamental framework, then you eventually get to these other pieces or, you know, are you getting close to prime time or. No, in other words, can we pick, start picking up and working with it now, or are you still kind of like just working through some of the rough edges or fundamental concepts? Even I don't know.
01:12:15
Speaker
Yeah. I mean, you can pick it up and start. So I think, um, for desktop and for terminal UIs, uh, since there's not a lot of good alternatives, I mean, CLJ effects is, is also pretty good. Um, but if you want to build desktop apps, you know, there's nothing quite like reframe and full Crow, um, and he likes and some of the other options on the web. Yeah.
01:12:39
Speaker
Yeah, so the web has really great options if you're writing Closure or ClosureScript. And so it's not really going to compete there. It's not something that I'm focusing. I'm deliberately not focusing on the web because there are such good options already existing. But for desktop and terminal UIs, you can kind of pick it up. And I think it is a really good option. I think just building another UI library is not, I don't think that's a good reason to
01:13:08
Speaker
I mean, I think there is a lot of cool stuff about membrane and that you can, uh, you know, it can access all these different platforms and that, you know, there's, uh, the functional event stuff and the data driven views, but like, um, I don't think that's quite enough to like pick up this kind of weird library. And so what I'm, there's still some like, so I'm still working on the features that would make it kind of interesting for their, you know, picking up this weird new UI library.
01:13:37
Speaker
And I think the next step is really this physically drag and drop UI builder, which I think, I don't know if you've seen Red Victor's drawing dynamic visualizations. So it's meant to be kind of one of these dark manipulation things where it's like, you can build really dynamic stuff
01:14:06
Speaker
And which is also one of the reasons I think Closure excels here is because you can just call eval. So basically, you draw all the UI components. And then to get the value, you just eval the. Basically, you're kind of writing code through direct manipulation. And then you eval the code that you produced via direct manipulation.
01:14:36
Speaker
And so I think that's the next big step where it's actually really interesting, where it would actually be really interesting for people to start using. It's like, OK, I want to build an internal tool. It's going to have some text boxes and some buttons and some check boxes. And I can just drag everything in place. And that's how I build the graphical part of the UI. And then I have the business logic somewhere else.
01:15:02
Speaker
So so right now, if I if I use membrane, I'll mostly use it for defining the UI and then the business logic or whatever the domain related things, I'll just build it in one of the frameworks that I'm using or depending on the platform that I choose, I just build it there. Right. Right. So like I do have so there are the three different there are the different pieces of membrane. And so the state management is separate from the other stuff. So I do have bindings for
01:15:31
Speaker
reframe and full grow, in addition to kind of a state management library that memory provides. And, I mean, the intentionally that part of the library is kind of minimal because everything's just data and pure function.
01:15:51
Speaker
rather than using a UI specific state management library, you just use state management. You just use regular closure code because it's just data and functions. So it's like, you don't need a UI specific one. You may need some like helper functions, but you can basically, you know, you don't have to use a UI specific one. If you have another state management library that you're using for something else, you can use it here too. Cause it's all, you know, it's just all data. Okay.
01:16:19
Speaker
So the other thing that you've been working on, and we were talking about this on the Apropos show, was the Growl VM thing with Borkdu, Michael Borkent. Do you just want to quickly give a kind of review of that for the people who didn't see it on Apropos? The two or three people? I'm sure most of our audience have seen that one, but you never know.
01:16:49
Speaker
There could be some heathens that are only deafened. Yeah, that'll be me. So there's a project called GraVM and it has a tool called native image. And what that does is you can take a JVM bytecode and you can compile it to assembly
01:17:10
Speaker
um, for multiple platforms. And, um, since closure runs on the JVM spits out byte code, you can compile closure to all these, to assembly for these different platforms. And one of the platforms that you can target is, um, iOS. So, um, I think that's fairly recent though, isn't it? I think that was the interesting part that it's, that's a fairly recent target. If I'm not wrong.
01:17:38
Speaker
It's kind of hard to say because the only way to get access to the information is you have to really be following closely this GraphVM project. And there's all these different configuration parameters that you need and getting access to it. It's hard to tell how new it is versus how much
01:17:58
Speaker
You know, part of it has just been like, you know, Michael work dude has done a bunch of work with gravity on to make closure work and the closure core team has actually supported that and add new features to closure to make that easier and.
01:18:12
Speaker
If you're going to do a UI library and work with something that runs on iOS, you need access to the native platforms. You need to talk to the file system and the graphics. And Chris Nuremberg has a library called D-Type Next that makes that part easier. So there's the documentation, there's the community information, there's the grunge work of
01:18:41
Speaker
I don't, I don't know what changes. So with, uh, growl VM, you can't have, there's no reflection or you need, um, configuration. And so the court closure team has like done extra work to make that, um, you know, work better under growl VM compilation. So there's a bunch of little pieces that are all coming together. It was just the generation of classes that didn't work. So you can't eval, but you can reflect. You can, uh,
01:19:11
Speaker
You can't reflect, but it requires extra configuration. And in general, you kind of just want to avoid that. So for the most part, you just want to type into everything. But yeah, I can't remember what was exactly added to you. It was like closure. There was some update that made that better. Yeah, I can't remember as well, but I can't remember exactly what it was.
01:19:41
Speaker
some 1.10 release, 1.10, 2.0, 1.10, 3. Yeah. Anyway, yeah. So the big news anyway is that you can now run Closure, not just ClosureScript on the iPhone. Right. And you can, you build a native application and it's also using Sci, you can have a REPL, so you can kind of live code your iOS app. And there's also,
01:20:10
Speaker
This hasn't been, uh, we haven't done the work on the closure side, but their growl VM can also target Android. So, um, it should be possible to do all the same, to have the same steps where you can also build Android apps. Um, but there's still some work to be done there. That should be easier because essentially, you know, that is a more, it's a more proximate target to the JVM.
01:20:35
Speaker
In theory. Yeah, in theory. You leave that one as an exercise to the readers, because it's so trivial, you know? It's the iOS one, which is exciting, because it's like, whoa. But Membrane also uses this technology, right? I mean, using GraalVM native image to render app in iOS thingy. So you can build, I mean, it compiles to
01:21:05
Speaker
assembly, but you still need the UI and membrane has it now has an iOS backend. So it's like, if you, that's kind of fun. Like I had the two new NBC that I used to test and you know, the same one that run the desktop, you can just run on the mobile app. It doesn't, it's not quite as good because it's like the check boxes are really tiny, but like, um, yeah, you can still, um, it's the same UI and you tell all you need to do is, uh,
01:21:33
Speaker
be able to draw shapes, text and images and forward like tap events. And it's like, okay, membrane's ready to go. Yeah. One of the things that you did with, uh, when you were on the Apple port, you did some live coding where you had the game of life up on the phone, and then you could like dynamically change the color of the, um, of the scalars, scalars, um, the, um, what are they called? The cells.
01:22:01
Speaker
the things which go across the gliders, not the skaters, the gliders, which was really, it's really a great demo, I think, of how you can have this live coding experience, you know? Yeah, I mean, I've been sold on live coding, I feel like that's, it's how I want to program. I've tried to, like, you know, I
01:22:31
Speaker
I like learning new languages and now it's hard because a lot of languages don't have good repl support. So it's like, I want to learn, I want to try like Go or Haskell or Rust, but it's like, you know, as soon as I start programming and I don't have the repl, I'm like, I don't know. Yeah. You have to like wait five minutes before you get an answer about whether it's working or not.
01:22:54
Speaker
Yeah. Yeah. So just another thing, just sorry, Vijay, just one more thing I wanted is, is that if I'm not wrong, um, the, the sort of breaking news as well, not, not for this show, but I noticed that, um, the Mikel was talking about it recently was that as part of this work of using like dtype next and stuff like this,
01:23:17
Speaker
You're also trying to look at building a foreign function interface to see libraries from Clojure as well. Maybe we could talk about that for a few minutes as well? Yeah. What I think is really interesting, I mean, there's a ton of really good C libraries that are available. I've started wrapping some of them. On desktop, you need
01:23:45
Speaker
I use GLFW to create the windows. I use Skia, which has a C. Well, it's a C++, but you can call it from C to do the graphics. I have a wrapper library for Chromium embedded framework, so you can programmatically control Chrome. And a lot of these C libraries have really, they actually have fairly functional interfaces.
01:24:15
Speaker
Sometimes there's Java libraries that will wrap these C libraries, but most of the time they just kind of make it worse. And so if you can just call the C functions, it's often better than using the Java library that wraps it.
01:24:27
Speaker
And so you can do that today already with dtype-next, but the kind of the new stuff that I think you were mentioning is that if you can do that, if you can dynamically load share libraries from Babashka, it gives you access to like, basically, you can have this small binary for Babashka and then you can
01:24:47
Speaker
access a bunch of C libraries and you can also compile closure libraries and use those dynamically and ship those separately from Babashka itself. One of the selfish goals for that is I'd like to, I think it'd be really cool if you could script user interfaces with Babashka and Membrane. If you can dynamically load Membrane and then just
01:25:18
Speaker
you could just make it easy to script a user interface that shows a little window and then you can hit a button that says profile and it'll show these flame graphs or whatever you're doing. Or if you wanted to run tests and you wanted a better user interface than the terminal UI, you could just write a Babashka script that shows you all your tests and then gives you a little user interface to
01:25:46
Speaker
use that more efficiently. That's good stuff. Yeah. It's exciting. Yeah. So I think.
01:25:55
Speaker
I just have like, I think, two questions. Two, I think we are, wow, almost one and a half hour. Nice. I think it's always a good thing when we can't keep track of time. That means it's stuff is so good that we are now fully immersed into the thing. So there are a couple of things. One is that, so how can people contribute to membrane?
01:26:20
Speaker
The second one is I see that the amount of C code in Membran is more than closure code. So what is happening there? Is it really a closure project or is it a C project? What is C doing there or C C++?
01:26:35
Speaker
Yeah, I think so it is a Closure project. And I think the reason for that is that Closure code does a lot more per line than C code. So even though Closure is doing all of the work, C takes up a similar amount of code.
01:26:54
Speaker
even though it's not doing a whole lot. And so for membrane, I still kind of consider it in the design phase. So there's a series of blog posts that kind of try to cover the design. And so I'd really love to hear what people think, if they think it's crazy, or if they think it's bad, or if they think it's good, or they have other suggestions.
01:27:18
Speaker
I'm really open to that. If people want to build desktop or terminal UIs, I'd love to help make that work for you. So if it's, I'm on the collision in Slack, or if you file an issue, I'm pretty available to kind of help iron out any issues that you might run into. And I'd love to kind of get feedback there. And yeah, I mean, mostly just because
01:27:48
Speaker
There's not a lot of, I mean, I think a lot of the functional UI programming has been kind of focused on FRP, which is basically like you're building, it's basically you're building a functional UI library on top of some OO library. And that's where I think why FRP is really pervasive is because like everybody's building on top of these OO stuff. And so it's like, how do you deal with that? I had trouble finding other,
01:28:19
Speaker
other things to look at and other references that were kind of like starting lower down on the stack, saying like, what is the interface? What are the primitives? What's the data look like? What's a functional event model look like? I think the hop on is meant to be a bit more like that. You know, when we were talking to Misha, he explained it much more like that, but it wasn't cross platform. That's for sure. You know,
01:28:43
Speaker
Yeah, yeah, yeah, I mean, I think there's some there are some really like I think Swift UI has a lot of really cool ideas. Yeah, I was there somebody reading through VRAC VRAC. Yeah, and that looks really interesting. And then there's another one. I know there's a yeah, there's other interesting stuff that's happening. So
01:29:07
Speaker
So it's more like a sparring kind of discussion that you want to have to think about ideas together. And then because, as you said, I can see that you're
01:29:22
Speaker
approaching this from first principles like looking at you know what you should be you know FRP became a big thing when LM and other things showed up and then now we have react and all those things. I think it's completely or at least I understand the point of view that
01:29:42
Speaker
we had this baggage of over-driven frameworks everywhere. And you cannot throw them away completely. So we keep building on top of that one. And nobody was rethinking from the bottom up using functional principles. So I can see a lot of value in that, I think, because then it's going to be functions all the way down. It's like turtles all the way down level. So that's really awesome.
01:30:10
Speaker
And I think so Tonsky or Nikita Pokopov recently got Fongine to build. I think his intention is to build a UI framework. And I think that's really exciting. And so the other thing that I would say is if you're interested in building a UI library, I'm happy to bounce ideas off of.
01:30:36
Speaker
I want more libraries and I want more options that are kind of functional up and down. And I think if you are interested in doing that, the design space is huge.

Design Trade-offs and Innovation

01:30:49
Speaker
There's a lot of trade-offs that I made that I try to document in the design blog post.
01:30:53
Speaker
But I think you can, there's a lot of other trade offs that you can make that are, you know, different and kind of unexplored and interesting. I did, you know, I didn't take the time to do so. Um, if you're interested in, you know, exploring this design space, um, I'm happy to answer, like, it's like, Oh, why didn't you do that? You can ask me and I can just tell you like, Oh, that's, I just didn't think of it or, um, you know, Oh, there, there's sort of devils and detail with that one rather than, uh,
01:31:23
Speaker
So you thought about it, but you just didn't go that way because of reasons. So you want to try and help. I guess you're open to challenges, so maybe just to fill out your own kind of justifications for what you're doing. And maybe it's like changing your mind, perhaps, if people give you good enough rationales. But then there's other things which are like maybe
01:31:48
Speaker
you've thought about things other people haven't thought about because you've been in the space a bit longer and you could help to educate them about the options as well.
01:31:58
Speaker
Awesome. Sounds good. So I think on that happy note of people rethinking the UI from bottom up. On that bombshell, Vijay. It has to be here. It has to be a bombshell. Rethinking the UI from top to bottom. That's a bombshell. This is nuclear level stuff. Yes, I agree. It's not even normal bombshell anymore. It's the neutron bomb.
01:32:25
Speaker
Yes, on that

Emacs in the Tech World

01:32:28
Speaker
one. And you know, obviously, all the good ideas come from Emacs. So, you know, on that bigger bombshell. Is that still a bombshell? Yeah, I think so. It's still blowing my mind that we're getting guests coming on fucking talking about Emacs here.
01:32:47
Speaker
it's well that i think after i'm still letting you talk about it as well after after 7 000 episodes it's still gonna be max man i mean there's still gonna be max there you know it was there before big bang it is gonna be there after heat death of the universe in the beginning there was a max and then there will be max i think it might be the cause of the fucking death of the universe
01:33:10
Speaker
Well, if it was the cause of the Big Bang, it will be the cause of heat debt. That's okay. Anyway, and thanks a lot, Adrian, for joining us and taking us through this journey of UI stuff. And I think, as I said, most of the time, people are building on the existing things, which kind of limit or maybe even we get into the
01:33:33
Speaker
Narrow idea of what is available and then not able to make a leap and and I think As you explained very well that Rethinking it from the from the ground up might lead us, you know Delivering better experiences, you know better ways to build software and finally, you know, I can stop writing code And
01:33:56
Speaker
I mean, there's a lot of people praying for me to stop writing code, but you know. I think you're one of them on your VJ. Yes, please stop writing code. We can't handle your shit anymore. Your dog is definitely praying for it. Yes.
01:34:12
Speaker
It takes about a walk. Stop that bullshit with the computer. Exactly. Yeah. Anyway, thanks a lot, Adrian. Thanks for joining and sharing this. And I'm pretty sure people will think with you. And as you mentioned, there'll be more people thinking about these fundamental ideas rather than just building turd over turd again with object-oriented stuff. Yeah, thanks for having me.
01:34:35
Speaker
Yeah, I think it's been great. I mean, I think that your challenge to this kind of space is really very timely. Yeah, it's good. Sweet. Thank you. And that's it from us.
01:34:51
Speaker
Thank you for listening to this episode of DeafN and the awesome vegetarian music on the track is Melon Hamburger by Pizzeri and the show's audio is mixed by Wouter Dullert. I'm pretty sure I butchered his name. Maybe you should insert your own name here,

Supporting the Podcast

01:35:08
Speaker
Dullert.
01:35:08
Speaker
If you'd like to support us, please do check out our Patreon page and you can show your appreciation to all the hard work or the lack of hard work that we're doing. And you can also catch up with either Ray with me for some unexplainable reason you want to interact with us, then do check us out on Slack, Closure in Slack or Closureverse or on Zulip or just at us at Deafened Podcast on Twitter.
01:35:37
Speaker
Enjoy your day and see you in the next episode.
01:36:06
Speaker
you