Introduction and Guests
00:00:18
Speaker
Yeah, hello. Episode number 18. The Age of Majority. And we're going to introduce our good friend from Holland. But first of all, I want you, Vijay, to introduce yourself in your full glory. Yeah, okay. This is me, the glorious Vijay from Holland. The Netherlands. I don't think so.
00:00:44
Speaker
I was attending a training and someone was asking me, OK, introduce yourself. Where are you from? And I said, OK, I'm from Netherlands. And everybody was like, OK, that's that's decent enough because you need to zoom into that, then telling which city I'm from. So it doesn't matter for Netherlands, I think. Oh, they're going to kick me out now. Fuck. OK. But it's just me. But you're not really from the Netherlands, are you? No, no, no, no. You're living in your broadcasting from the Netherlands. Yeah, yeah. But currently residing.
00:01:11
Speaker
Yeah, currently residing in Den Haag, actually, I think 200 meters away from the sea. Really? Yeah. Watch out. It was beautiful, by the way, today. We had lots of snow here today in the Hague. It was a white beach, beautiful, very rare occurrence. I think in six years ago, we had lots of snow. I thought it would usually be a white beach there, though. Well, sandy. Sorry, I thought I meant the people, but OK.
00:01:42
Speaker
Yeah, that's true. That's sometimes quite red, I would think. Probably. If it is too hot. I'm not going to say anything. They're going to kick me out, man. I don't think they're listening. Okay, so yeah, I'm Ray MacDermot from Belgium and we've got our special guest on Mr. Hiss from Netherlands. Introduce yourself, Hiss.
00:02:07
Speaker
Yes, I am Gijs. I'm also in the Netherlands. I'll specify that I'm in Amsterdam, where I live. And it's also been a white day here too, due to the snow and cold as well. Right. So you're another one of these guys who nobody can pronounce their names apart from yourself, yeah? Yeah. You call yourself the Geezer, the Geezer. So from now on we can just call you Geezer or the Geezer, is that right?
00:02:35
Speaker
Well, you have to keep trying to say cheis correctly and then... Right. But are you going to judge me if I say cheis and... Well, that's close enough. Is that good? Yeah. Okay. Because I live in Belgium. We have like a weak version of Dutch called Flemish, obviously. And they don't really have the strong... That the Dutch do. So I don't get used to that.
00:02:58
Speaker
Well, I don't even have the Ge in most of the Netherlands. Like half of it doesn't have it either. Oh really? Even for the Netherlands, my name is only known by half of the people. I have run into this before. I have a very internationally unfriendly first name and then the last name as well. Because it has like a W in it, but it's not a W. It's like a U and then another U. So that's also convenient. So, Geist it is then.
00:03:28
Speaker
Yes. Yeah, perfect.
00:03:32
Speaker
Out of chat, what are you going to give him, Gijs? Well, my name I always go for good enough. This one qualifies as good enough. It's so hard to please Dutch people, damn it. Okay. So, Gijs, can you give us some idea about your closure experience? Of course, I know you from Amsterdam Closure Meetup, and also you gave a couple of talks at the meetup as well as the last Dutch closure day, so you're involved in the closure community in general.
00:04:01
Speaker
So can you give us about your experience? Where do you work? How did you get into closure? Your shared biography essentially.
Gijs' Journey into Clojure
00:04:09
Speaker
All right, well then we have to go back. I was... Hold on, hold on, hold on. I'm not that far back, okay? You're quite young, aren't you? You're quite young, so, okay, screw it. Well, I think I'm the youngest here today, but I'm 32. Okay, well, give it every three or four years. Give us in those chunks.
00:04:33
Speaker
But we're limited by the history of Clojure itself, I guess, for it to be relevant. I was a student studying computer science and then I did a class on functional programming and I really quite liked that and it was a nice contrast to all the other courses I took. And from there I started to look online for other functional programming languages and eventually also stumbled on Clojure.
00:04:58
Speaker
And yeah, that's really how I got started, the first thing I did. What did they use for FP in your university? Did they use Scheme or did they use something called Slispy or was it something? No, it was something called Miranda.
00:05:11
Speaker
which is like a Haskell syntax. The coolest thing it had is that it was a really simple program where you could run your Miranda programs, but it also had a very simple GUI language, like a little stack-based draw this, then that, then that, then that, then that. So you could make very nice little UIs with it as well. It was a very nice contrast to all the Java things we did and aspect-oriented programming and all sorts of more convoluted stuff.
00:05:41
Speaker
Okay, which university was that? This was in 20, in the east of the Netherlands. Okay, cool. We are going east now, that's cool. Anyway, so you started with closure then, after your university?
00:05:57
Speaker
Well, during. So one big thing I did, I had to do my master thesis and build a little tool for that as well. And I started using Scala, because this wasn't a plugin for Eclipse, the editor. I used Scala, but that went nowhere. And then I used Closure instead, and that went quite well. And at my university, you learned Java already. So then Closure is a good fit as well. So that was the first thing I did.
00:06:26
Speaker
Okay, so how did your experience with Closure progress then after that? Well, then I was, after my master's, I was of course done and then I had to look for a job. So I was like, I'd like to work with Closure, but that failed, or at least I could not find a Closure job at that time. So instead I went to work at a Ruby on Rails, well, website made with Ruby on Rails, at a little startup. Okay, yeah.
00:06:51
Speaker
Well, it was quite nice. I was there for a year and I learned a lot about just keeping websites online. It was quite nice. And I was able to sneak in some closure code on the back end to something that every week had to import some CSV files. So we did that with closure at some point. So it was quite nice. And then after that job, I did only closure work. Okay. So right now you're working for a closure company or you're doing freelancing or what are you working on these days?
00:07:21
Speaker
Well, last year I was freelancing. I had a gig, but it ended a bit abruptly at the end of last year. So for the last month and a half, I have not been working at all. So people can hit you up when they hear this show, or are you just about to start a new gig? Oh, I should have been looking, but I have not yet been doing that. So if you need a closer programmer in Amsterdam or remote, then do get in contact.
00:07:51
Speaker
Cool. So you heard here first. Yeah. Okay. So, um, during, during the closure work, what, what kind of, um, applications that you're working on when you're working on closure?
00:08:03
Speaker
Well, they're all in at least some sort of a web-based backend thing. So there's one that was advertisements on mobile phones. There was a medical database system. Sort of like a, almost like a datomic-esque structure for medical data. Okay.
00:08:22
Speaker
an educational startup to teach kids math. That was quite nice. And then a, like a ClosureScript front-end dashboard for a bit of a, what do you call it now, sort of trading application. Okay. Well, that's pretty diverse domains. Yeah, but all web-based. Sorry? They were all web-based mostly.
00:08:49
Speaker
So you were doing mostly the back-end stuff here,
Diverse Clojure Projects
00:08:52
Speaker
so were you doing the front-end ClosureScript stuff as well? Usually both. You're a full stack guy. Full stack. Yeah, I suppose. But I'm not an expert in databases, so I cannot do... Of course, I can put up a database, but I wouldn't call myself an SQL expert or something. I was always quite happy to have a...
00:09:18
Speaker
Sorry, go ahead. I would prefer it to be like a dedicated DevOps guy or something there. I know my way around that, but to be responsible for 100% uptime, that's... That's a myth. There is no 100% uptime. Well, I think these days anyway, you just need to plug into some back end as a service and you're all good. Don't worry about those guys. Just buy the DevOps. Isn't that the way to do it these days?
00:09:48
Speaker
I think you can, but it's very expensive and a bit opaque, perhaps. If it does go wrong, then who do you call? Amazon. Just blame Amazon. I mean, it's nice, right? Because if you're hosting it on Amazon, like if your site is down, then essentially like 90% of the internet is down anyway. Yeah, you're all screwed.
00:10:11
Speaker
Can you send the link to the status board and everything is green check marks? Exactly. And then you say, okay, everything is done. But yeah, I think the database thing is interesting because remember recently the GitLab guys had some unfortunate situation that they deleted production data from Postgres. I saw that.
00:10:30
Speaker
Yeah, but I love that. I think that the guy was also on Hacker News. So they're posting the post-mortem of the situation. And then somebody commented that, oh my God, the guy who deleted the database must be devastated or something. And then he just commented, it's me and I'm still here. And if you click on his profile, he just changed his description. It used to be database expert. And then he has now database in the parentheses removal expert.
00:10:57
Speaker
Yeah, I saw that too, that's amazing. I love the way that they are treating it. That's how it should be, you know, shit happens. Exactly, exactly. I like this, there's a nice Twitter I kind of follow from Erica Joy and she said, hug ops to the guys. So I thought, yeah, hug ops is nice. Yeah. But just reading that story was a lot of like sweating.
00:11:25
Speaker
reading that story you're like sweating like oh my god I know where this is going and then like oh no that's that gut feeling like oh my god crap yeah you can you can put some background music to the story while you're reading it I had this at my first job too actually
00:11:46
Speaker
I had a little side job at the university. It was like a little company that made these websites for the local other companies. And the first day I got to put on some projects in the database, please add these people or something. And the first thing I did was accidentally remove the wrong row.
00:12:05
Speaker
So then I had to go back to the boss, like, oh, I deleted something, I think. And then he's like, oh, it's all right. I made a backup before he started. So then I was like, oh, yes, great. But I do wonder, does he always do that? Or was he like, I don't trust you that much. So I'm just going to put one in.
00:12:25
Speaker
Or maybe he gives you the connection details to like playing database. Yeah, it wasn't even real to begin with. Exactly. It might have well been. It was a good lesson to learn on day one. Yeah, yeah, yeah. Exactly. But anyway, let's get back to closure then. So, I think obviously the first question is EMACs or... Oh my god. Some other shit. Oh my god. Oh, that's easy. EMACs.
00:12:52
Speaker
there you go that's it yeah i think i think we're done i think he's the he's he's my favorite guest again so that's that's that's pretty much what we wanted to ask him there in the podcast like yeah he says he max he just done anyway so you don't you don't want to be productive then because you don't want to join your life i don't think i have to be here for this part i suppose just the two of you
00:13:21
Speaker
It's okay. I think, Gaius, you need to humor the people with lesser power tools. I think they have just tools. They don't have power tools. So that's okay. That's fine. Anyway, so close your stuff. So most
Pedestal Framework Benefits
00:13:39
Speaker
of the stuff that you worked on, you said those are web applications. Can you give us some idea about what kind of libraries that you used or what kind of stack it was?
00:13:52
Speaker
Well, it's almost always then on the front end, some closure script, on the back end closure. And whenever that was for an actual company, then it was usually some sort of a ring composure at the back end, usually to like a post has database. In the front end closure script, I used Ohm, like the original Ohm, not the Ohm Next. Ohm previous, yeah. Yeah, Ohm before or something.
00:14:22
Speaker
Yeah, that's mostly it. I think OM previous is the right way. You have previous and next. Yeah, that works. I'll cut that. Okay.
00:14:41
Speaker
Yeah, it's next, next, next. Yeah, it's windows then, isn't it? Should be windows because you just have to keep on clicking next, next, next. And then finally cancel. Anyway, but then you get the blue screen of death. Yeah. Uninstall. This has become like bashing everything episode. Don't worry. We're not started yet.
00:15:10
Speaker
So, Ohm for any of the commercial projects or just your site project or something? No, this was for a commercial project. Okay. So how was your experience with that one? Because I think right now you said you recently built a tool called Serapel and I saw that you built it using reframe and reagent, I think. So can you contrast this experience with Ohm? Oh, yeah.
00:15:37
Speaker
Well, of course reframe and it has a very nice guide and that all came after Ohm. So we used Ohm when it was very new at that time. So in Ohm it was a lot of getting used to the curses in particular. But we didn't manage to get up the thing from nothing to working in a month. So that worked quite well. But Ohm looked, it was very...
00:16:04
Speaker
At one point it got a bit messy in the home thing. It could also have been us, but just this whole cursor thing and how to structure the whole application, that was not really apparent to us. And then, like you said, I used Reframe, and there it's quite easy to see how to structure the program because they have a long guide where for each piece of what you might want to do, call out to an external server, have a state somewhere, they all tell you where to put it. Then you can just follow along, I guess.
00:16:35
Speaker
Okay, so you also had some last time you were talking a bit about how to build applications using Pedestal, right? Yes. You have used it, I think on side projects or on commercial projects, Pedestal framework? Pedestal, I've used only on side projects. Like I said, all the commercial projects would always be a ring and then composure. Okay, so what is the fundamental advantage of Pedestal then, or at least from your point of view?
00:17:05
Speaker
Having used Ring and Composer a lot, Pedestar has a lot of stuff in it already, which I always start to look for when you use Ring and Composer for a while. The basics is the two-way route definition, so you can give every route a name, and if you make a link to any path you have yourself, you can just call that by name.
00:17:26
Speaker
It's a pretty default thing you would want. BD has that as well, for instance. And also, whenever I get started on a web project, particularly if it's just Ring, you need a bunch of default stuff in there. Like maybe you just have like a Hello World Index page, but then the content type is not even set up properly to serve HTML or what have you, or the CSS file comes in with a MIME type, I don't know. And in Pedestal, a lot of that stuff is already like
00:17:55
Speaker
The basics are already in there, secure headers and what have you. So yeah, I'm just thinking like maybe pedestal will be like the common thing that we'll always use as a basis for web apps. So that's why I started to look into that. Okay.
00:18:13
Speaker
So it's more like an out of the box experience is better than composing different libraries together, something like that. Yes, because I mean, the promise is always like enclosure, we don't have frameworks, you just combine libraries. But I always find that you need to combine a lot of libraries and how to combine those is not always that apparent to me. So what do you think about the new framework called Arachne or something?
00:18:40
Speaker
Well, it is still in the going, right? The crowd-sourced one called Arachne or Web.
Discussion on Arachne Framework
00:18:45
Speaker
Yeah, I think you pronounce it Arachne, yeah. Yeah, I've looked into the first, there was like a little bit of pre-alpha release of that. Yeah, yeah.
00:18:57
Speaker
What it seems to do or what are the focuses? I'm not sure if I use the same language that they use, but it's all about having components and having them be replaceable and how to configure those. But that's not really a problem I run into a lot. What I'm always hoping for, if anything gets announced, like a new web thing for Closure, I always hope it's some sort of ORM standard solution. Okay, to connect to the database.
00:19:26
Speaker
Something like, well perhaps not active record, but something like that. Acto in Elixir is quite nice. You think that you've been infected by Ruby on Rails? Well, you know, in Ruby on Rails you could build like a blog in 15 minutes, whatever the promise was.
00:19:44
Speaker
And I think in Closure it's, well, I always need like at least a day to set all the basics up before I can even get started with like a safer comment for a blog post. What I do now is just get an old project and rename everything and start from that, but there's not really a standard start from scratch solution there.
00:20:10
Speaker
Yeah, but compared to the Ruby experience, because if you have done Ruby on Rails recently, then obviously now you have better tooling and all that stuff, because I did some Ruby on Rails applications sometime in 2008, I think, but that was a horrible experience for me, because I had to deploy on IIS with the Windows, with fast CGI and everything, so it was hilarious. And it was Ruby on Rails,
00:20:37
Speaker
I think 1.9 or just transitioning into 2. So, of course, even at that point, they have all these generators and everything that was pretty useful. But what is your experience between comparing Rails development versus the different types of closure web application development? Yeah, what I used it, it was in 2010, 2011, I think, so I don't even know what Rails version we were. Probably 3, I think. 3 just started, yeah.
00:21:07
Speaker
But it's mostly like, I know some people that use like PHP and then I'm like, wow, PHP. But then they show me their website and it has an automatic admin toolbar at the bottom with debugging slow queries and all sorts of things. Then I'm like, well, I can use Closure on the front end and the back end, but I don't have a lot of tools readily available that you would like to have.
00:21:33
Speaker
I think there's a basis for, or maybe an expectation for a basis of web application development that is not really available in Clojure yet, that you would get in other languages, either Django in Python or Elixir or Ruby on Rails or something like that. Okay. And of course, that brings us to the latest thingy that's based on Pedestal that I think Ray was mentioning before. Was it Waze or Woz or whatever?
00:22:03
Speaker
What's your intro to that one, right? I mean, you were trying that out or you've heard about it? No, no, I haven't tried it out, no. Unlike his, I'm not a huge... I don't know much about pedestal. I only know that it's kind of like you say, it's a framework, batteries included.
00:22:25
Speaker
Whenever I've looked at it, I've found it a bit awkward. I think the documentation is a little lacking. So I've never really picked up on it, and I haven't seen much out in a while with pedestal either. But I know the Cognitech guys are very keen on it. So they're not idiots, so there must be something there. But I'm just not feeling it myself yet.
00:22:48
Speaker
Um, but I know that this, uh, thing that came up through the week was, uh, vase or vase. I say vase, so screw it. That's what we'll go with. You can go with what you want. I'm going with vase. Um, and vase is, um, like a declarative, um, data description style thing to, to make databases visible on the internet, which I think is this ORM thing you're talking about, I guess, Chris.
00:23:17
Speaker
Well, sort of. Whenever something like that is announced, I always hope it's a little bit like Ecto from Elixir, but then Foreclosure. But then it always turns out to be not that. So Ecto is like the active record for Elixir and it seems to look quite nice. I've played around with it a very little bit, but then Vase is something slightly different. Like you say, it's mostly like exposing the atomic easily in web routes on pedestal, I suppose.
00:23:45
Speaker
And even with Arachne, as Vijay mentioned earlier, they have something called chimera or something that might be in like this next version, which also perhaps is something like that. We have to wait and see, but I'm always looking for hoping that something is like that. And then Vase again turned out to be something else, which is not really, yeah, I haven't used the, or I'm not using the atomic at the moment and I don't have to expose it to the web. So yeah, I don't have no use for it at the moment.
00:24:15
Speaker
So if you're using Postgres or something like that, do you use Honey SQL or do you use some kind of closure thing that sits on top of Postgres or do you just go raw JDBC? Well, the closure.java.jdbc. That works great. But that is just you type in your SQL query strings, right? Right, right. Yeah.
00:24:40
Speaker
Yeah, I think Honey SQL is one of the nicest libraries ever, right? I mean, it's the... It's the, like, post decisor for... I don't know, can you call it post decisor? No. I don't know. It's great. The follow-up? Yeah, the follow-up for SQL. Why SQL, right? Is that the one with SQL in the separate files? Exactly, yeah, yeah.
00:25:07
Speaker
Yeah, that's nice because it's letting you write your SQL queries like SQL queries and it is going to read them and then give you the equivalent closure functions based on the comments that you put in. So that's pretty sweet. Then you don't need to worry about this whole ORM thing or how to get the data back or whatever.
00:25:25
Speaker
you can just use some closure, not closure, but some sort of a tokens in the query and then it will automatically detect that, okay, this is the function name that I'm going to generate for this query. And you know whether there is an insert query or update query and that's a really nice take on interacting with the databases. So that's pretty cool.
00:25:46
Speaker
I think when you're doing all the JDBC by hand, you've got to be quite careful about SQL injection attacks and things like that. Whereas if you use some kind of intermediary framework where you're not generating the where clauses yourself, I think it's a simpler world for you. It's a simpler, more secure place. If you use closure.java.jdbc, you usually use a prepared statement.
00:26:14
Speaker
So you use the question marks in your query strings and then specify the arguments after. So you're not really splicing strings together. That would be not a great idea.
00:26:24
Speaker
Oh, okay, okay. Because normally with these prepared statements, you do have these, you can also have dynamic wear clauses. You sometimes need that. If everything's fixed, then okay, fair enough. You don't need that, you're just putting in parameters. But often for user-style queries, you do want to add additional things at runtime.
00:26:45
Speaker
But not in your experience. Okay fair enough, you know, I would be cautious about using You know the raw JDBC for
Introducing Cripple: A ClojureScript Editor
00:26:53
Speaker
that kind of stuff. You'd want to you know, be a lot more careful there But if everything's fixed, of course, you're right
00:27:03
Speaker
Okay, let's talk about what you're working on these days. So we just saw a tweet or in a blog post, I think a couple of days ago, you were talking about C REPL, or how do you pronounce that one, by the way, when I was just cutting short of myself saying it, craple or so. I call it craple. So, okay. So from the source, it's called craple. Yes. So, so what is it about and how did you build it?
00:27:31
Speaker
Well like I said, I had a freelance gig until the end of last year.
00:27:36
Speaker
And then I had some extra free time. I like things like Firebase. And Firebase has something called Firepad. It's like an etherpad, Google Docs type thing. And then I also ran into something called Gomix. I don't know if you guys have seen that from the Trello and Stack Overflow guys. It's also like a collaborative editor for applications that run continuously and update continuously based on Node.js, I think. And that looked interesting.
00:28:06
Speaker
Then I thought like, well, I also saw that you can self-host ClosureScript, so you can run ClosureScript and compile ClosureScript in your browser. So I thought, well, let's see if we can combine the two. And that's where that's what became Cripple in the end. OK, so for the people who don't know what exactly is Cripple,
00:28:25
Speaker
So Cripple is, well, maybe like it's a Google Docs, but then for ClosureScript. So everybody who's on the same URL sees the same code. And if you type, everybody else's code get updated at the same time. So you can work collaboratively on the same code. And because it's ClosureScript, you can also actually run it in your browser. Oh, sweet. So it's like a Google Wave sort of thing. Like a long time ago, we had Google Wave, which disappeared into internet.
00:28:54
Speaker
Yeah. Well, I've never used that, but I did see it when I was looking into, what's it called, operational transforms or something. Google waves get mentioned a lot. Yeah. So how do you, how do you, go on. Sorry, Vijay, go on. No, no, go ahead. Sorry. I was just going to ask you about that. How do you, what's your logic for, for making sure the sequence of keystrokes from a different users is all kind of respected or how do you do that?
00:29:21
Speaker
Basically using the approach that Firepad uses as well and that is basically a dumb server and then a bit smarter front end. So basically you have like a sequence of operations or like a log.
00:29:35
Speaker
changes to the document so whenever you type something that is a change that you send to the server and then if you are the next edit yours wins and if you send a change to the server and you're somebody else already did something before you then your change loses it gets transformed on the client side into how it can be the next next change and then you try again and then well
00:30:01
Speaker
continuously and the idea is that not everybody will be typing forever so at some point your change will actually be will win let's say get added to the log and then the whole thing starts again so it's a operational transforms the actual transformation if it needs to happen is on the client side and it's not on the server side okay so this is an open source code or
00:30:27
Speaker
Well, I've not open sourced the crapple, but there are other OT limitations available online and tutorials as well. What is your plan for this one? Compared to Clips, so Clips is not multi-user, right? Is that the difference between Clips and this one?
00:30:45
Speaker
I don't think clips is more to use. I think there are a lot of blog posts, so it's like embedded as well. So you can add little code snippets on your blog and people can play around with it already there. Okay. Well, I played with it and it has Emacs command, so I think I'm happy already with this thing. That's pretty cool.
00:31:09
Speaker
So I can do control and control P, you know, perfect. So this is the best editor ever already. So can you give us some insight into how to build it and what are your plans for this one? So what kind of libraries and. Firstly, the idea was like, uh,
00:31:27
Speaker
First, it was just to see if I could get operational transforms to work. Just a nice algorithm, I think, or at least I was curious as to like, okay, how does that work and can I make that work? So it was just fun. And then, I don't know if you know, but operational transforms, you have one version for like rich text. If you have nice annotations, like you can add a link or maybe a highlight or something or a bulleted list.
00:31:51
Speaker
If you want to use operational transform for that, there are a lot of special cases because if you press enter after a booted list, what happens? The easy operational transform is defined just for plain text. It's just characters and perhaps new lines and that's it. That's the easy version and that's the one I use. You can use that for ClosureScript because operational transform doesn't need to know anything about ClosureScript.
00:32:17
Speaker
So then you have ClosureScript code that multiple people can see. And then it's fun, like, okay. And then you can actually compile it and run it in your browser because ClosureScript has self-hosting support now.
00:32:27
Speaker
So then you have those two things, and then it's the question, okay, if two people see the exact same code and they're running it as well, then what happens? Usually, if you run the same code, then you also see the same output. If you do a simple arithmetic thing, 3 plus 4, then both people will say C7 if they both run it. But if you have more advanced or whatever fancy code, perhaps you use reagent or UI or something, then you actually have state in your browser.
00:32:57
Speaker
where not everybody will see the same thing. And then the final piece for Cripple was to also connect those things. You do something in your browser, somebody else as well, how do you make sure that thing is still in sync? And that was the final thing I wanted to tackle to see if you can write the code together, you can run it together, but can you also make sure you're actually looking at the same thing, otherwise it's perhaps not that useful.
00:33:24
Speaker
Yeah, yeah. So what is the stack in this application? What libraries and what is the wire format that you're using to send the data in and out? Well, the wire is just, it's mostly just WebSockets. And then just, first I thought maybe transit over WebSockets or something binary, but in the end it's just a print string and read string EDN over the texture WebSocket version.
00:33:50
Speaker
The editor is CodeMirror, which is... So that's already taken care of, basically. That's a very nice library. And then on the front end, Reframe as well. Well, that's about it for the ingredients, I suppose. Okay. And the backend, do you have Pedestal? Yes. So that's Pedestal. But as I said, the server is quite dumb, let's say. It doesn't do a whole lot, so this whole conflict resolution is only...
00:34:20
Speaker
It's only to see in the database is this next up, the next one in line or not. So it's like a compare and swap type thing. And that's about as smart as it is on the backend. So it doesn't do like the authentication stuff yet? Well, there is authentication, but you can log in with any username and it assumes that you are actually that person. So I could add a password thing there. It's the MongoDB version of authentication.
00:34:52
Speaker
This is like the Lord of the Rings thingy, you know, say your name and enter, you know, like, yeah. Yeah. Say friend and enter and that's it. I'm a friend and then that's it. Okay, please come in. That's fine. Well, for the OT conflict, you do need to know, like, did I send it myself or did somebody else send it? So you need some sort of identity, but I didn't want to build in this whole like password and username thing. So I settled on any username is good.
00:35:16
Speaker
Okay. And all this code is stored on disk or where do you store this one? So if I create a, so I just created a new notebook, whatever you want to call it. And I have it now and I'm using it. So
00:35:33
Speaker
This will be stored in some database, the code that I'm typing in. The database stores these OT type transforms. So that says insert this character or delete that character, then a whole sequence of them. So whenever you go to a URL, something already happened, then the server does go through all these edits and construct the whole file for you.
00:35:59
Speaker
Okay. So it's like a CQRS system then. So you're keeping the log of the whole thing. Yeah. And which database are you using in the backend? Postgres. Cool.
00:36:12
Speaker
Okay, so what are your plans for this one? What do you want to do with this thingy writer? Is it just a fun project or do you want to take it somewhere? Well, the idea was just to do it for fun. So I thought like, well, maybe January I'll spend on this. So I slightly overshot that by a couple of weeks. Yeah. But everything that I wanted to put in there is now in there, particularly the last thing to connect the UI.
00:36:36
Speaker
So you see the same status in there as well. For now, of course, I have an endless list of things that could be better or nice to add, but I really do have to look for a job. That's true. So there's also a chat thing in that one. So everything is going through the same WebSocket.
00:36:55
Speaker
Or how is the WebSocket protocol? How did you define that one? Is it like a command that goes to the back end that says this is a chat message? Or what kind of messages? Well, over the WebSockets, those are vectors with a keyword. And then for chat, it's something like, I don't know, chat slash message, I suppose. And actually, for the chat, I don't save any of that. So I just get sent out immediately to whoever is on the same URL.
00:37:25
Speaker
Okay, so it's Snapchat. It's not actually real chat. Yeah, that's cool. I was also thinking, like, it doesn't even need chat because you're sharing a text file, right? You can actually type it. Exactly. I can type in there. Yeah, yeah. Yeah, I just noticed that. I was like, okay, why would I do that? But I'm sure why not, you know, why not? I thought maybe some side channel to keep your code clear. Who knows? It was also the first thing I built just to check if the web sockets worked. So that's perhaps why it's in there at all.
00:37:52
Speaker
Yeah, perhaps this is something that you mentioned already, right? Is it something similar to the new company by the Joel Spolsky company? Yeah, Gomics. That's what I said. Yes. So that's G-O-M-I-X.
00:38:09
Speaker
Yeah, I think so. So they have similar kind of thing, right? But a bit more like build your entire application in the browser sort of thing. Yeah, what they have is whenever you type something, it gets synced to, they host the code for you as well. So some sort of VM or something. So there's like an actual application running on the web that everybody can go to.
00:38:30
Speaker
and yeah, that's what you're building. I think that's interesting too, but I don't want to host random applications and I don't even know how to make that work. But that was how I got thinking like, oh, this would be cool to do with ClosureScript. And then I sort of thought that just push everything to the client side and not put too much on the back end. So that's how it ended up where it is right now.
Online Editing Platforms Interest
00:38:50
Speaker
But I was really interested in playing it. No, that was it. I do, GoMax looked very interesting.
00:38:58
Speaker
Yeah, because I think Amazon just bought a new bought an online editor as well. The end of last year for their environment. So this whole online editing space is quite hot right now, I think.
00:39:15
Speaker
So maybe you should just go over to Silicon Valley here and just say, look, give me 20 million guys. No, sorry, 200 million and you'll get paid back. No problem. Yeah. When, when Microsoft buying me out in a year's time for a billion, you can have that. You can have that on me. Okay. Okay. Could you maybe do the negotiations?
00:39:39
Speaker
I'll definitely pitch in the second round, yeah. What I do like, the Gomix guys, at one of the announcement blog posts, it actually said, when you got started with building stuff on the web, you could just view source and then
00:39:56
Speaker
and then change a bit, play around and then it would immediately work. And I did the same thing when I was, well, let's say a bit younger as well. There was a website called Dynamic HTML or something that showed all these fancy features of HTML. Yeah, yeah, yeah. Like all sorts of things moving around and stuff.
00:40:16
Speaker
And I did that too. There was like a guy who made some games with JavaScript and you could actually just see the source, play around with it, change some things. And then just run it. Yeah. Cool stuff. So you'll be talking about Cripple at Dutch closure days then. Yeah. Well, I always have this with when conferences come around, like there's stuff I want to talk about, but I'm still actually working on it. So I don't want to commit to like do a talk about it because then there's a deadline.
00:40:44
Speaker
So this was the same thing. This was almost done. And then I saw like a final call for papers or something. So it was like, well, a lightning talk. That's the amount of commitment I can already commit to right now. So I sent that in last minute, like, oh, I want to at least show this. And you got selected. So I'll do a 15 minutes. I think it is maybe 10. Yeah, I think 15 minutes talk. Yeah. So of course, I mean, I was also part of the DCD organization.
00:41:10
Speaker
thingies. So it's nice to see you again at the event. So the next thing that I wanted to ask you is, so what are you looking at these days in closure? I mean, is there something exciting or did you look at the specs or these kind of things?
00:41:33
Speaker
Well, one thing I wanted to do with Grapple, I thought like, well, this will be the one, I'll use spec for everything, right? Because I can just try and see, particularly for the operational transform thing, I thought, well, I'll just spec all these ops, right? And then the algorithm, everything will be valid, and then it should be fine. And I can even generate test cases, that would be quite good.
00:41:53
Speaker
But that was a plan, and then also perhaps to spec everything that would go over the WebSocket. That was also a plan, but I have not done that yet. What I did end up using a lot is test.check.
00:42:07
Speaker
Oh, okay. Like generative testing. Cool. Yeah, because I was thinking like you just pack an operational transform action or function or whatever, and then you generate 10,000 test cases. But it turns out that all these operations are a little bit dependent on each other, let's say. So there's a property for operational transforms which says
00:42:31
Speaker
If you have a text, and then you have an operation A, and then you apply that, and then you have an operation B, which comes after, you apply that, that should be the same if you apply the composition of A and B to the text immediately. That's like a property that holds always. And then to, if you were to have a generator for just an operation, that would not necessarily be a valid operation A or a valid operation B, because in operational transforms, I'm just gonna say OT from now on.
00:43:01
Speaker
You need to make sure that the operation is always specified over the whole length of the text. So you have a meta parameter that you have to adhere to.
00:43:10
Speaker
So you have maybe a text of 10 characters, then your operation A needs to be an operation from 10 characters to another number, and then B needs to be from that number to another number. So I have these test cases that first generate the basis text, then an operation that conforms to these is at least that long to some other length, and then an operation B from that length to another length.
00:43:32
Speaker
and then this property you can test. So these actual, if I were to spec just an operation or a transform by itself, that would not immediately be useful to use in this test because you need like this meta parameter of the change size or the original size of the text to build these operations. So in the end, I used test.check a lot, but spec less than I thought it would.
00:43:56
Speaker
Okay. And, um, so last time, uh, we were discussing with Malcolm Sparks from, um, from Jext, uh, at some point, and he was describing the Yada framework.
Yada Framework and Wiki Building
00:44:08
Speaker
And I know that you, you played with it as well. Um, you build a Wiki or something on using Yada. Yes. So, so what, what was your impression of Yada?
00:44:19
Speaker
Yeah, so both Malcolm Sparks and the guy who wrote Liberator, they also did like a little talk at Euroclosure. So I was like, oh, I have to look into that again, because I have used Liberator, but I did not use Yada yet. And then the wiki was just, well, I needed at least a project, something to build. And they told my client it was released in the same time, so I put all that together and used it at the same time. Yeah.
00:44:48
Speaker
Well, I like the idea of a particular web machine, which is like the origin from both Liberator and Yara. And then Yara had async support. And I was like, up to now I hadn't really needed that, but because I used Datomic Client, then for every request, I also have to do another request to Datomic Client.
00:45:11
Speaker
Every request that comes in that you want to handle also is perhaps blocking or you need to do other requests and wait for the result to come back. So that was a good fit to try this async stuff. So that's why I just tried to use it. But what I have with Yada and Liberator as well is that in all the closure work I've done,
00:45:32
Speaker
Rarely did people care that all the particulars of HTTP handling were there, like language negotiations and the more esoteric features of HTTP. I mean, it's always you need proper content types and what have you. And if you want e-tags, it's nice if there's a default way to do this. But perhaps if you make some APIs, that's very useful. But I've never run into a use case where that was a very strict requirement.
00:46:02
Speaker
So the YADA project was also just for fun and to look around to see what's possible in closure. But I think probably again, Malcolm's goal is to have a kind of batteries included framework, whether you need the batteries or not, I guess. Well, what I always find, I've tried this a couple of times as well, is where you have like Liberator and YADA are both like, let's say API oriented.
00:46:30
Speaker
back end things. But I usually build HTML pages that humans use. So if you post a form, that is something different than doing a post from a curl thing or something. Because if you submit a form, most users would expect the form to come back and then the fields that are not correct
00:46:51
Speaker
in red or something, and if it succeeds, you want to land at the page of the thing you just created, or maybe the index paste with an update message or something like that. Whereas
Challenges in Web UI and API Development
00:47:00
Speaker
if you follow like maybe like a REST form API type structure, then you return it to a one that nobody knows what to do with, or maybe you return like a 400 that yeah, users don't care. So I always find it a bit of a mismatch, the building like user-facing websites on top of like API frameworks, let's say.
00:47:22
Speaker
Yeah. I think that the trouble with HTTP is that every player in HTTP world is so lenient about standards and stuff. So the browsers really don't care. I mean, they're like, sure, I'm going to render everything. Throw anything to me. I'm fine. I'm just going to deal with it. And there is a lot of craft built up on that one. So it's very difficult to get into like a structured way of everybody agreeing to the same standard. So I think that's a tricky part.
00:47:49
Speaker
Is that true though, really? I mean, because isn't, doesn't, doesn't Ruby on Rails actually do all that kind of stuff? You know, there's all these 400s and 401s. No, no, it's not just the... 201s. So I'm not quite sure what you're getting at there. No, it's not just the... Oh, sorry, Fijia, but, but I often need to build this...
00:48:08
Speaker
Well, a lot of people, if you build like a website that users use, the thing I need is like a form with data in it, and I need to submit the form, I need to validate it. Perhaps the form gets shown again with fields that are invalid. You go through this whole cycle until it's allowed, and then you store it somewhere, and then you redirect somebody to somewhere. That is like a basic flow, but all these API libraries don't have that included, I don't think so.
00:48:35
Speaker
Yeah, anyway, well, I think I think he would argue that he does, but OK, fair enough. Let him maybe pick this one up in the chat. But I think you're right. What's interesting about it is that is that people argue the history people always argue about the fact that, for instance,
00:48:55
Speaker
You know, web forms, web forms themselves are kind of a weird API because all you can do with those web forms is like you can post, but you can't delete, for instance. They haven't got a full. The web forms are not very good semantically.
00:49:14
Speaker
That seems to be the bit of the web which is still in its infancy. Like you say, its importance in e-commerce can't be overstated, but it's actually very immature, the web form itself.
00:49:29
Speaker
I usually just use a get and post. I don't even use like a puts and deletes and things because usually you just have to add like a hidden field for that to match the method or something. You can't do all of the HTTP things you'd like to do with the standard web forms. That's what I mean. Also, often in Rails projects or
00:49:51
Speaker
I see that in Elixir projects as well that they have paths that get handled for browser access and paths for API. So those things are actually two different things because the flow, I think, for APIs is just a little bit different than it would be for a web form or something. And putting those together is just, I think you can, but it's perhaps a bit tedious or inconvenient.
00:50:19
Speaker
Okay. Um, I think I'm done with my questions. I think, right. Do you have any questions or comments? Um, well, now I think it's all, I mean, the Cripple stuff is awesome.
Acknowledgments and Contributions
00:50:30
Speaker
Um, I think that's really good stuff. And, uh, you know, I think, I think, uh, anyone that employs you to do the web sort of stuff has will be, um, we'll be very happy that they've got an expert on board. That's for sure. Um, you know, no, I think, I think you're doing great work there. So.
00:50:49
Speaker
Yeah, thanks very much for coming around, coming in, coming on and telling us a bit about what you've done. It's nice actually to talk to someone in the neighborhood in Europe who's done something which has got a bit of global attention in the closure community. So congratulations on that. And I hear you've got more than like three retweets now, so that's doubly awesome.
00:51:16
Speaker
I'm pretty sure what was from Almir, which is like 20 kilometers from here, so I'm not sure about the global reach of it yet. We'll just pretend you went through the 20 servers, so we'll call that global, you know. Exactly. And also the thing is, you know, it's the internet currency. So, you know, three tweets. Wow, awesome. But yeah, as Ray was saying, thanks a lot for coming on. And I know that in a couple of days you are going to talk about Kripal at Amsterdam Closure Meetup.
00:51:43
Speaker
I think by the time we put out the episode, it'll be in the past, but still. And yeah, I will see you at the Dutch closure day, which is going to happen on 20th of March. And we just published the agenda. And of course, Ray will be there as well. I somehow lobbied into annoying people that Ray will be doing the same deaf joke thing that we did at Euroclosure. I saw the first one. So I expecting all new material.
00:52:14
Speaker
Okay. The world has moved on since then, so there's plenty of material around. Don't worry. I'm working on it. There will definitely be updates.
00:52:30
Speaker
So, yeah, I mean, I'm part of the organization for Dutch Closure Day, and we are almost, I think, ran out of the places and well, the tickets, quote, unquote tickets. So I think by a couple of hours ago, I think we are left with 18 spots and now 12. So,
00:52:52
Speaker
Hopefully, I think I'll see some of the people who are listening to this podcast there as well, because as we keep on saying, Dutch Closure Day is the, what do you call the place?
Dutch Clojure Day Highlights
00:53:05
Speaker
The Genesis. The source, the brawn. Yes, the brawn. The brawn of
00:53:13
Speaker
So it would be nice to see, you know, familiar faces again there. And we have a great schedule. James Reeves is coming there to talk about transparency to data and the rest of the talks are pretty amazing. Of course, our special guest tonight, Hays is going to talk about Cripple.
00:53:31
Speaker
I don't know by the time, I think you might want to show some code, but we'll just keep it under the wraps and then we'll see there. So that's pretty much it from us, I think, for this episode. Yeah. All right, brilliant. Yeah, thanks a lot, guys, and thank you, Vijay, and thank you, everybody. See you. Yeah. Bye. Thanks, guys. Bye-bye. Bye, guys.
00:53:55
Speaker
Okay, it wouldn't be nice for us to end without saying thanks to all the people that help us. So thanks very much to Kasari for the music. Thanks very much to Luboff for the design. And also to Wawata for all the mixing and fixing all the glitches. Cheers mate. And cheers peeps.
00:54:48
Speaker
Now I have to remember to save the audio recording.