Richard Feldman, "Millions of Users, Purely Functional Code"

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Claude Rubinson: Okay, I think I think we're there now so um let me go ahead i'm sure people keep trickling in. Claude Rubinson: I want to welcome welcome everybody to our August Houston functional programming group we are back fully online we had. Claude Rubinson: thought it was safe to go back into hybrid and we did that a couple of months, and now with delta and a bunch of us having unvaccinated children at home we've decided to move completely back virtually. Claude Rubinson: for the foreseeable future. Claude Rubinson: I don't think we have any other business is there anything people want to bring up before I introduce our speaker for today. Claude Rubinson: Okay, all right so i'd like to introduce Richard feldman who works for know reading is a well known LM evangelist if you haven't had a chance to see his talks or listening to interviews on podcasts I highly recommend it he's really, really good and dynamic and very enthusiastic speaker. Claude Rubinson: lots of good energy he's also the author of element in action from manning manny was supposed to send us some. Claude Rubinson: difficult. Claude Rubinson: And they didn't tell him, remembering that, right now, so it might contact them about that, but. Claude Rubinson: And today, he wants to talk about. Claude Rubinson: transitioning from. Claude Rubinson: Their conventional code base to essentially fully functional only purely functional haskell and elm he also asked if. Claude Rubinson: he's working on a new programming language called rock I believe it is. Claude Rubinson: which he describes as a work in progress in progress, pure functional language descended from LM which compiles to binaries it's easy to it's designed to be easy to introduce to existing systems and to ship with an ambitious ID. Claude Rubinson: And so i'm hoping he'll talk a little bit more about that, because that sounds great, but I actually have no idea still. Claude Rubinson: From that description what it actually is. Claude Rubinson: So i'm going to turn it over to Richard. Claude Rubinson: Thank you very much. Richard Feldman: Sir, Paul you raise your hand. Paul McWhorter: To ask what is the rock web page. Richard Feldman: Oh it's our oC dash Lang I was put in the chat. Richard Feldman: Because I mean this is not a conference dogs to meet up, so we can be kind of casual. Claude Rubinson: But there's nothing there, I went and looked at it. Richard Feldman: And I mean there are links to videos explaining more about it, which might be hard to watch In parallel with this one check them out afterwards. Richard Feldman: I actually works on the compiler. Claude Rubinson: So. Richard Feldman: He can also. Richard Feldman: You know, potentially. Richard Feldman: Okay cool yeah let's let's dive into it, let me share my screen. Richard Feldman: Oh, you know what I got any to share the whole screen, because otherwise, as soon as I full screen it's gonna go away. Richard Feldman: Alright let's see can everybody see okay. Richard Feldman: Yes. Good to go. Richard Feldman: awesome alright, so this is millions of users purely functional code i'm Richard bellman so as previously mentioned, I work for a company called know reading and basically we help teachers teach writing through software. Richard Feldman: I joined back in 2013 this was the team there's also one person who was remote but, at the time we were all in an office, although now we're fully remote and this is true before Kobe you're very remote company. Richard Feldman: We have people in the US and Canada and Argentina, Brazil, various places in Europe we're quite a distributed team nowadays, but back then very small company. Richard Feldman: But it's been you know quite some time since 2013 and a lot has changed so comparing some things that have changed between 2013 and now. Richard Feldman: We had five employees, then probably by the end of the year we will be over 100 employees of that about a quarter will be engineering, the rest of like sales and you know curriculum and stuff like that. Richard Feldman: At the time I actually did a check out on the day that I started it was almost 60,000 lines of code in the whole code base and now it's all over like 1.2 million also back then, we have thousands of users, now we have millions of users. Richard Feldman: And back then, when I joined, we had no money we except for what investors had given us, because when I interviewed that was actually one of the questions that I sort of grilled the CEO on I was like now, is this not this isn't gonna be one of the Silicon Valley companies that just. Richard Feldman: Never sell anything and just. Richard Feldman: To keep taking investor money until it all runs out, he was like, no, no, we haven't planned and Sure enough, he was right and actually last year was the first year that we turn a profit. Richard Feldman: As in like between the end of the beginning of the year, the end we had more money in the bank account than. Richard Feldman: The beginning, and that was not because we took out any investment or anything which we didn't but just from money from customers. Richard Feldman: I should note that that probably will not be true again in 2021 2020 was a weird year for lots of companies already concluded. Richard Feldman: And that was somewhat of an unusual circumstance, but it did at least demonstrate like hey this can be a profitable business certainly. Richard Feldman: And we're you know read it, that line, even though we our preference would be to sort of like grow and rather than aiming for profitability or maximizing profitability. Richard Feldman: Of course, when I joined the company we didn't do any functional programming at all, it was just a stock sort of Ruby on rails we use coffee script which back in 2013 was a. Richard Feldman: lot more common choice that it didn't it is today, and today we're sort of all in on functional. Richard Feldman: Programming like pure functional programming hell on the front end haskell on the back end next for some of our operational stuff we really like sort of all about pure functional programming. Richard Feldman: So I want to talk about how we got there and how like what functional programming has done for our business, because I know that a lot of talks are about sort of like the theoretical nice things about FP about like you know it's conceptually nice it's elegant. Richard Feldman: But this is about a business, this is about like you know we built up a company on the back of FP and how we did it. Richard Feldman: So let's start with rails, because this is where we were when I joined the company. Richard Feldman: If you're not familiar with Ruby on rails it's basically rate Ruby is a dynamically typed programming language rails is a framework that deals from with everything from. Richard Feldman: Did how you build a database through an rm to like how you render your front end it's very opinionated sort of famously so and it's got a lot of sort of a. Richard Feldman: sort of web specific stuff going on there real sort of like what's on your whole stack and and generally that's how people use it sort of like a one big monolithic rails application. Richard Feldman: Also in 2013 out slightly shortly after I joined the company. Richard Feldman: I found out about this talk that was sort of making the rounds. Richard Feldman: This is called js Apps at Facebook, but really you might think of this now is the react talk, because this was where they introduced react to the world and open source that previously had just been used internally at Facebook. Richard Feldman: react today is probably the most popular actually I said, probably it's definitely the most popular way to do front end applications but, at the time, this was kind of a new thing we were actually early adopters of react. Richard Feldman: So, back then, back in 2013 it was like the appeal of it to someone like me was this functional style of rendering I had a Co worker in a previous job would really. Richard Feldman: encouraged me to to try out functional programming and i've sort of done some like functional style stuff and previous jobs but. Richard Feldman: react really seemed like it was like going more in that intentionally in that direction than any of the javascript libraries i'd use before. Richard Feldman: seemed like a pretty nice API to me seemed like a good way to like deal with state that had kind of a good story around that relative to other tools that i've been using like angular js and stuff like that. Richard Feldman: That also seemed pretty well supported. Richard Feldman: It didn't seem like something like flash in the pan, you know kind of like someone's weekend project, this was like they've been using it at Facebook for quite a while, and they were you know open sourcing what they were already using in production so. Richard Feldman: seemed like it was a relatively safe thing to try out and seemed like they could bring some benefits, so what we did was a controlled experiment, we basically. Richard Feldman: said okay let's let's try to figure out how we can find a low risk project that's like a good fit for this technology we're trying to evaluate this is kind of a recipe for how we have tried new things out of an orange. Richard Feldman: So do you like get it all the way into production like just get this small low risk product into production so don't try to pick something like big that's going to take a long time. Richard Feldman: Just something small and you know get it all the way to production in such a way that you know if it turns out the the project doesn't pan out well it's Okay, we picked a low risk one anyway. Richard Feldman: And we can always you know roll it back if we end up being unhappy with it. Richard Feldman: Of course, if we are happy with it, then we can just sort of expand incrementally from there, such that each individual step we take is low risk and then eventually if it looks like okay. Richard Feldman: we've got a sizable thing going here like react actually seems like what we want to do for our whole front end let's adopt it and that's exactly what we did so we ended up basically deciding. Richard Feldman: let's go ahead and adopt react Now I want to take a moment to talk about typescript because typescript existed when actually before we act was open source, this was a talk from go to 2012. Richard Feldman: Like introducing typescript to the world. Richard Feldman: But maybe it's hard to remember now because typescript is now in typescript and react is is probably the most popular way to do new front end projects these days in the Web world. Richard Feldman: But back then typescript was not taken very seriously. Richard Feldman: I mean, to be fair, react had a lot of detractors when it first came out but but I mean you gotta remember that at the time. Richard Feldman: typescript was coming from Microsoft and in the Web world Microsoft was far and away known for one thing, which was not vs code, yet it was. Richard Feldman: Internet explorer not exactly a good brand to have if you're a web developer like you're the. Richard Feldman: Microsoft is the source of all of our pain, I remember when I joined already, we were supporting Internet explorer eight, and that was not a fun experience so for Microsoft to come out and say hey web developers we've made this amazing tool for you it's like uh huh really you don't say. Richard Feldman: But obviously you know, over time, typescript got more and more adoption and now it's quite popular now I bring up typescript because in 2013 the idea of using react with typescript. Richard Feldman: was completely outlandish this was not something that was it was it was as far from mainstream as you could get. Richard Feldman: But I bring this up because we actually had a problem which ended up leading us to l. Richard Feldman: Now, before we get to the airport, I just want to take take a second to talk about like basically why didn't we end up using typescript to solve this particular problem. Richard Feldman: The problem that we had was essentially that we were using. Richard Feldman: react and plain javascript Okay, it was actually coffee script but same basic idea, so no type checking, which was the sort of the root of the problem that we ended up having. Richard Feldman: The problem that we had was we were building this feature, and we really care about advocacy and already we really want our features to not just work in the traditional sense, but like to actually have an impact on the students. Richard Feldman: And, as it happened this feature was for teaching active voice and passive voice, which is a pretty tricky thing to teach, especially the middle schoolers. Richard Feldman: And what we found was that the design, we came up with once we would take out to a classroom and try it out, we find that the students just weren't getting it it wasn't effective. Richard Feldman: So we go back to the drawing board and revise it and go bring out another version so like an mvp that we can we can try out on on. Richard Feldman: The next group of students and that will also fail, we go back to the drawing board and we kept iterating on this. Richard Feldman: But what I noticed was that in between these iterations it was taking a really long time to get something working again that was able to actually you know. Richard Feldman: be usable in a in a classroom I mean it couldn't just be smoke and mirrors they had to actually be able to use it well enough to see whether or not it was going to be effective, with them. Richard Feldman: and important that was because you know back in the javascript era i'm pretty much the only tool we had to help us like make substantial changes, you know, like almost on the level of rewrite but not quite. Richard Feldman: Were tests and as it happened, these changes were so big that we basically have a throw out all the tests, every time we made a. Richard Feldman: substantial changes so times would have helped out a lot, but you know, the idea of using typescript is like yeah that that's not that's not really on anyone's radar. Richard Feldman: But no one was on our radar by coincidence, because I had personally as for some side projects been using elm outside of work, and I really liked it, I thought that it was an amazing language, it was really ergonomic. Richard Feldman: You know the the friend who had been recommending functional programming to me. Richard Feldman: Had basically talked about haskell and element felt to me like I could get any sort of haskell like experience, not having actually used hospital in the browser which was where I wanted to work, I was sort of a front end ui specialist at the time. Richard Feldman: And so i've been using elm and I was thinking wow when I use elm and I need to make big changes like this, I don't. Richard Feldman: have to have any tests helping me out, I have the compiler helping me out and that's largely because of type checking rather than functional programming. Richard Feldman: And I want to go is this to make the point that, to be perfectly honest, if we have been exactly the same position, except today, instead of back then. Richard Feldman: We probably would not have adopted Al we probably would have gone with what everybody else did, namely typescript because that was just the obvious low risk thing to do if you're having trouble with with types, you probably go typescript in this day and age. Richard Feldman: And we really would have missed out on a lot, so I feel pretty fortunate. Richard Feldman: That typescript was not as popular as it is today, because I know a lot of people who are using elm on the front end and typescript on the back end. Richard Feldman: or who use typescript at work for their front end and L in their personal time, let me tell you it is not the same thing it's not just the types. Richard Feldman: it's it's a very big gap, and in fact we still get a lot, a lot of applicants who are coming from typescript jobs because they want to use l more on that later. Richard Feldman: Okay, but if you're not familiar with me um, let me just give you a quick breakdown on what it is so almost a pure functional programming language it compiled to javascript but other than compiling to it, it really has no relation to javascript. Richard Feldman: has its own language, designed from scratch, it has no javascript semantics, except by coincidence. Richard Feldman: it's really just its own completely separate language and it basically treats javascript is like byte code that's compiling to that's the only it's only relationship, it does have javascript interrupt if you want, but that would be true, regardless of what it was compiling to. Richard Feldman: So what do I mean by pure functional What I mean is that all functions are pure so no side effects everything's immutable Ellen has full type inference like hundred percent never gets it wrong. Richard Feldman: it's also completely sound type inference so it, unlike typescript which famously has an intentionally unsound type system, the only type system actually is sound. Richard Feldman: there's, no, no, or undefined either ELENA has the best package manager and when I say the best package manager, I want to clarify, because you might think that i'm saying Ellen has the best package manager any programming language I use, which it does by far. Richard Feldman: I I also spent a lot of time with rust and I went to a meetup where someone was giving a presentation on rest and they were like rust has the best best package manager i've ever used and I thought this is a person who has and you tell me. Richard Feldman: Just for the record, I had the second best package manager overused but yeah if you haven't used elves. Richard Feldman: Just a quick taste it enforces semantic burgeoning and what I mean by that is. Richard Feldman: If I try to publish a package which makes a breaking API change like I change the type or I delete a function, or something like that. Richard Feldman: That would be a breaking change that would break compilation it actually will not let me publish the package, unless I bumped the major version number. Richard Feldman: So the experience of upgrading packages and LM is unlike what i've experienced in any other language. Richard Feldman: Because it just works like I go to upgrade things and then it's just a very nice pleasant experience and even if there is a breaking change which does happen from time to time, the compiler helps me through it, because. Richard Feldman: It has the nicest error messages of any programming language I use again i'll draw a comparison to us because it's another language i'm familiar with. Richard Feldman: i've also seen people say wow russ has the best error messages i've ever seen. Richard Feldman: If you've had that feeling I would encourage you to go read the blog posts, where they announced they're they're sort of. Richard Feldman: effort to revamp for us error message and improve them because you'll see in that blog posts they talk about what we're aiming for is to make our error messages like elm. Richard Feldman: And I would say they did a pretty good job of it rests error messages are quite Nice. Richard Feldman: But this is still the gold standard in my book, and I still have not seen a rust or any other language like come close to that so if you're not giving them a try, please give it a shot, because this is a great experience we pull these things together. Richard Feldman: i'm a quick taste of that, so this is an example, one of these error messages I just pulled this out of some random file in our code base this is like our. Richard Feldman: file that like reports errors to bug snag, which is what we use for error tracking So this is the type mismatch so this books that config record does not have a release stage field. Richard Feldman: And it's highlighting this thing that's underlines like okay why why doesn't have released age field, and the answer is because I made a typo. Richard Feldman: there's this is usually a typo here are the books that config fields that are most similar. Richard Feldman: And you might notice that I have misspelled release stage as released a big just not quite right, and then it says just suggest say so maybe release stage to be released steak or vice versa. Richard Feldman: Which is exactly the type of that I made um, this is a pretty representative error message like it's similar with like other like types of tightness pastors or other types of errors. Richard Feldman: The compiler just really gives you as much contextual help, as you can, and I have not seen other language that does it, as well as hell does. Richard Feldman: So, having had a good experience with elm with my side projects and knowing that we had this problem with react and typescript not really being. Richard Feldman: reasonable option to consider back in at the time wasn't 2030 I think this is 2015 actually maybe 2014. Richard Feldman: We decided to do another controlled experiment to see about adopting hell so again find a low risk project that's a good fit get all the way to production, then either expand and potentially or back out. Richard Feldman: So that's what we did we introduced it on just like one part one page as it happened, it was this the same oh sorry, this is not, this is not the active voice passive voice, this is a different thing, where we had. Richard Feldman: Lots of it's basically a drag and drop interface, where there was a lot of complicated rules around this because you can actually pick up sort of like chunks of a sentence at once, and the rapping rules got pretty complicated because we wanted these to look like. Richard Feldman: Real sentences, so if you dropped to this, you know in between berries and new, for example. Richard Feldman: We would want to wrap in the middle of this chunk so that it wouldn't you know, like jump all the way to the next line and have a really awkward break right there. Richard Feldman: But at the same time we also wanted that when you picked it up, it would sort of snap back into being sort of one contiguous block like this, so there were a lot of tricky things to get right about this from. Richard Feldman: The perspective of business logic, but thing like great complicated business logic elements awesome at that you know I mean it's awesome and rendering as well, but. Richard Feldman: We knew that this would help us out here and, of course, if we didn't like it well, it was all you know behind the scenes it wasn't even doing any rendering. Richard Feldman: So it'd be pretty easy to just back it out throw it out and just rewrite just that one small chunk of stuff and you know javascript or coffee script or whatever. Richard Feldman: So we didn't and we liked it and we started using it more and more so, such that you know in 2013 we adopt a little bit of react 2014 we sort of solidified our use of react and then 2015. Richard Feldman: was when we introduced that that first experiment develops and then 2016 it pretty quickly grew and grew and grew just as react had before, until it. Richard Feldman: Basically, took over our code base and today, essentially everything except for really old legacy code that we haven't bothered to touch in years. Richard Feldman: Literally years is all an l except for a tiny bit of javascript interrupt for some like. Richard Feldman: there's like a busy wig rich text editing thing that we use of javascript, for example, there's a couple of really small things that we do js interrupt with but 99 point something percent of our code bases l. Richard Feldman: For our front end so it really took off from those sort of small humble origins of a small controlled experiment. Richard Feldman: Okay, so this is a talk about our business, so let me just sort of the new rate the top three benefits to our business that i've seen you know retrospective over the past. Richard Feldman: Six years now, of having used element production i'm going to go in reverse order, because the first one might surprise you so number three. Richard Feldman: more reliable software so we've had basically zero production crashes, there was a blip in 2018 where we finally got our first runtime exception, the aforementioned the book snag blogs. Richard Feldman: That actually originated from LM Code as opposed to from javascript code that we were doing interrupt with. Richard Feldman: Basically, what happened was we we use a language feature that was potentially capable of crashing that feature is actually no longer in the language so if we've been using the version of. Richard Feldman: Using today even that wouldn't have happened we still have a spotless record but, alas, we did use it, we did have a crash and. Richard Feldman: Ironically, I used to tell me, we had no runtime exceptions, and I think a lot of people wouldn't, believe me, and then, once I said we finally had one everyone believed me like oh you're reporting is working, it just it just actually wasn't crashing. Richard Feldman: And it was designed to be that way, I mean it's it's not impossible to crash l map, I mean we did it but also like you can still get stack overflows there's still a couple of ways is like I think there's seven of them, that you can. Richard Feldman: seven different ways, you could possibly crash and help map, but the point is that it's so hard to do accidentally that in practice it's. Richard Feldman: very rare like when I go to speaker dinner is back in the before time, so we had in person, conferences and stuff it Ellen conferences, I. Richard Feldman: was like a fun game I would do I. Richard Feldman: asked the speakers like hey how many of you using elman production at work, you know, several hands go up. Richard Feldman: I asked them how many have you ever gotten run runtime exception at work in production and all the hands go down, I think one time somebody told me that they had a. Richard Feldman: runtime exception, there was some very unusual case um, but this is only the the third most beneficial thing that I think we've gotten out of hell if i'm if i'm being honest. Richard Feldman: Second, one is actually just making changes be faster and cheaper um So when I see making changes What I mean is like changes to the software. Richard Feldman: So you know, this is a company that's been around for about eight years, like you know it was there was some people working on it before I joined, of course. Richard Feldman: And the amount of time that it takes us to modify like existing code that we've had and like get it to a point where we're confident shipping it again is just great it's really, really fast. Richard Feldman: I don't think elm is quite as fast like even even now like being being an expert in L I would be able to ship something new and L faceted react because it's been so long since authentic react. Richard Feldman: But I remember like what it was like back then, if i'm being honest, I do think it was a little bit faster to ship something if i'm if i'm just like like a prototype or something like that. Richard Feldman: My rule of thumb was sort of like if it's going to take a month or longer I think elm will be will more than pay for itself and end up being faster within that time period, but any project that's like less than a month and duration. Richard Feldman: Maybe will not pay for itself in terms of like turnaround time but. Richard Feldman: Over time, I mean we end up spending much more time going back and making modifications to existing things, building on top of what we built before all of that stuff is definitely much faster than it was before. Richard Feldman: I can't personally compare them to typescript because we sort of like jumped over that straight from you know untitled javascript to em. Richard Feldman: But From what I hear other people like comparing their experiences with typescript and their experiences Well, this is still true just not to the same degree as it would be comparing all the javascript. Richard Feldman: But again, this is our story about our business and the number one benefit to our business and like I said, I think this will come as a surprise to people. Richard Feldman: And I think this is uncontroversial if you ask the leadership engineering department already is hiring it is so much easier to hire people because we use l. Richard Feldman: And I mentioned this might be a surprise because there's this meme and I understand where it comes from, I assume the same thing, before we actually started using l. Richard Feldman: Which is that Oh, if you use like an you know sort of a nice functional programming language like elmer haskell you won't be able to hire anyone it's the opposite. Richard Feldman: it's so the opposite I can't even express to you how far the opposite, it is I don't know how we ever hired anyone before we know. Richard Feldman: We used to struggle to find front end engineers like after me like I was hired with the title of like front end engineer, it was two years before we found someone who we liked and who was willing to join our company. Richard Feldman: Because we didn't have anything to make a stand out it's like hey we're using react it's like yeah you and everybody else you know. Richard Feldman: Tell me what's actually special about you, but when we say we're using l there's a lot of people out there who would love to use element work but they can't because most companies are afraid of it, ironically, because they're afraid they won't be able to hire you. Richard Feldman: So it's it's such an amazing benefit that like I can even just talk openly about it, and I know that most companies are not going to bother or maybe they won't believe but. Richard Feldman: It continues to be our secret sauce it's even though it's not really a secret we shouted from the rooftops and then I mentioned, like, I will right now we're hiring. Richard Feldman: And that's that's kind of how it works and i've heard the same thing from other companies like I know we're within the Community right particularly prominent like i'm organization. Richard Feldman: Evan ship like you create an l words here for like three years, and you know we have a lot of like prominent members that helped community and conference organizer stuff working here. Richard Feldman: But even for companies with that's not the case, like what i've heard from them is that they've had an easier time finding good programs. Richard Feldman: I don't know what it's like if you're you know kind of like just trying to hire in bulk like just just going for sheer numbers, rather than trying to find really strong programmers. Richard Feldman: But most companies that I seem to find interested in elmer so kind of looking for more of like strong programmers so anyway so. Richard Feldman: i'm not kidding when I say that's like the number one benefit and to give an example is literally earlier today we just hired a new recruiter and she was talking to me and just you know kind of like getting to know your stuff. Richard Feldman: And she was like yeah like i've been i've been sitting on a couple of interviews with people, and it seems like everybody wants to work here because of this Ellen thing like what's. Richard Feldman: what's that all about you know, like she doesn't even need to know what it is like you can't you can't not know that if you're a recruiter for a company that uses out like it's just it's going to come up because that's that's just a drop. Richard Feldman: So That to me is if i'm being honest I mean I know it's a non technical benefit, but like the benefits of the business is really difficult to overstate how how great it's been. Richard Feldman: Okay yeah that's something like a magnet for strong programmers. Richard Feldman: Okay, but not everything has benefits, everything has cost us let's talk about the top three cost of the business. Richard Feldman: Number three this is comes as no surprise, the package ecosystem for LM is smaller than mpm a lot smaller I mean mpm is like the biggest package ecosystem in existence. Richard Feldman: Mostly that doesn't matter in the sense that, like mpm has I think it's last count was like a gazillion packages. Richard Feldman: 99.99 amen and amen amen amen and 9% of those packages you never use and every one of us there's you know there's it's just like there's a finite set of packages that you actually. Richard Feldman: want you know, in the world as a someone making software and there's just these like small set of them that are important to you, but it definitely does come up that you know, sometimes there's something wherever like I really want a. Richard Feldman: Calendar picker that has these particular characteristics and the calendar pickers in the. Richard Feldman: package ecosystem like none of them happened to have that particular combination of things that we need for our particular calendar paper literally out example came up once and we ended up using javascript interrupt witches you know it didn't feel great, but what can you do. Richard Feldman: Number two, and this is kind of a variation of the third one, but it is different in kind of an important way, which is fewer off the shelf SAS integrations so I showed you some bugs in that code earlier. Richard Feldman: When we first adopted bug snag as our production era tracking system. Richard Feldman: You know they have off the shelf it just like hey here's if you want to integrate with books now here's javascript books now got js just go ahead and use that. Richard Feldman: But if you want to use LM doesn't really exist, and unless you've gotten lucky and found that you know some other company happens to be using exactly bug snag. Richard Feldman: Community you know you basically need to write your own integration or use the job search one through interrupt, and so we ended up writing our own like you know bug snag l package, and you know open sourcing it. Richard Feldman: But I found that this one comes up a lot more often than the number three version like General if we're looking for a package like something that's a really common use case. Richard Feldman: Usually, we can find it like more often than not, but when it comes to some particular third party company tool that we're using. Richard Feldman: it's like the opposite i'm more often than not, we were just like prepared that like if we're integrating with a new system we're probably going to have to write our own integration against their like right. Richard Feldman: Now I know that some people consider this to be like the end of the world like this, the actual apocalypse and you have to do this. Richard Feldman: We it's such a drop in the bucket like we just don't care, I mean like like yes, we had to write our own blog stack elm maybe took us like a week like. Richard Feldman: Define like who else has so astronomically more than paid for itself, like compared to the number of times we've had to do that, which has been like two or three. Richard Feldman: it's just not even close so like we don't consider that a significant drawback, but I mentioned it, because all people do, and if i'm honest, even though it's not very significant drawback, I mean, obviously we consider the benefits. Richard Feldman: far outweigh the costs here, you know it is the number two number one actually was just a 2018 version upgrade took a long time for us, this was. Richard Feldman: And the specific reason it took us a long time was well, I mean there was a couple of reasons, but basically there were a number of breaking changes that happen to. Richard Feldman: be pretty pervasive across our code base, we liked all the upgrades like it was definitely like once we finish the upgrade we were very, very happy with, with all the improvements, but it did take a long time. Richard Feldman: Since then, though, the language has been quite stable there's there's been one release since then, and it was a like minor release that you just upgrade to you didn't have to like do anything. Richard Feldman: And it looks like the next one after that is also going to be most likely a minor release with like no breaking changes. Richard Feldman: But you know if you're if you're on like pre one language you know part of the reason for having me. Richard Feldman: not say is one, even though it's you know, been quite a few years now is to communicate that like a breaking change is going to happen and fair enough, this was a significant cost that we had to pay to make that upgrade. Richard Feldman: And although we considered it worth it, it was the number one costs that I think our businesses paid to use them, but I mean I guess if you're coming in, today you won't have to go through that because you probably be building on the the current release anyway. Richard Feldman: Okay, so um so that was element like 2015 so in 2016 comes around and we're sort of reevaluating rails. Richard Feldman: we've been using it for our back end since beginning and we're getting kind of unhappy with it because of something that I will talk about later called the database apocalypse, among other things. Richard Feldman: But like I said more on that later, but basically we come to the realization that we'd like functional programming and we want to do it on the back end to. Richard Feldman: On rails is not hospitable to that there are some languages, where you can sort of do a functional style like i've heard of people doing functional style Python functional style javascript is actually quite popular functional style Ruby is not a thing. Richard Feldman: And so we started looking around and ask ourselves, like Okay, what can we move to instead um basically anything was fair game. Richard Feldman: We didn't have any you know preconceived notions around like well it's got to be like this or that or the other thing or like oh let's roll this out a rule that out, we were just like. Richard Feldman: yeah open any ideas any language you can think of, will consider it as a potential target for our back end so i'm here, we got. Richard Feldman: from left to right that's F sharp elixir Java scala closure O camel interest typescript because by 2016 typescript was like becoming more of a thing rust and of course haskell, which is what we ultimately said, someone. Richard Feldman: But. Richard Feldman: We didn't actually start with with haskell so remember talking about elders of pure functional language that house javascript all functions or if you're full type inference best package manager nicest error messages. Richard Feldman: Well, although elixir is not these things, it was what we actually ended up trying first. Richard Feldman: So it looks there's a functional language that doesn't compile the javascript rather it compiles the airline's being vm byte code. Richard Feldman: And it has a great concurrency and fault tolerance story doesn't actually have a type system, but it does have a static analyzer which we had hoped would give us some of the same benefits as a type system. Richard Feldman: spoiler alert didn't didn't really work out that way it has a nice package manager like not as Nice as elms but it's it's totally reasonable. Richard Feldman: And if, especially if you're coming from Ruby it has a nice learning curve because elixirs like syntax and sort of style is very Ruby inspired. Richard Feldman: So our hope was that this would be kind of a nice natural transition from Ruby to elixir just because a lot of the Ruby Community was going from Ruby to elixir at the time and. Richard Feldman: And, and that we would end up seeing some of the same sort of benefits that we've gotten from El. Richard Feldman: Unfortunately, it just didn't work out it looks was a fine language it's not like it was you know bad we actually you know. Richard Feldman: We did our usual control experiment and we actually still have two services from that control experiment running in production today they're still running define. Richard Feldman: But, but you know it just didn't end up meeting what we were we didn't have getting out of it, what we had gotten out of elm and it didn't feel like it was worth it to transition to something that was improvement, but not as much of an improvement, as we were hoping to see. Richard Feldman: which led us to haskell so haskell is a pure functional language which compiles the binary executable so it looks or did allow side effects. Richard Feldman: haskell is not much like l so all functions are pure again full type inference sound types of sound type inference a bigger community that no I cannot say that it has the nicest package manager around because. Richard Feldman: rust is number two my the nicest package manager ever used haskell is not number three. Richard Feldman: But it does have also a bigger ecosystem than l. Richard Feldman: And I have this in the slot where it without my head the nicest error messages and let's just say that haskell is not in contention for nicest error messages at least among languages i've used i've used other languages. Richard Feldman: So we did a controlled experiment with hospitals well so find a low risk project that's a good fit get it all the way to production and then expand and translate or back out. Richard Feldman: So we did, and this is an example of one of the cool things that sort of came out of that experiment, this is a screenshot from. Richard Feldman: Part of our code in the postgresql type library and basically what you're seeing here is a function call to APP dot modify exactly one passing in don't worry about what log in db do. Richard Feldman: But basically, what we have here is an inline sequel query and what's cool about this is that it's actually validated, not just syntactically. Richard Feldman: But against our database schema and our haskell types, so when I say insert into this tutorials table, and I want to insert the name and description. Richard Feldman: This string interpolation syntax right here is going to actually do not only syntax checking but type checking against the local name variable and the local description variable to make sure that these match the types of those columns. Richard Feldman: And because we have not only this which gives us compile time errors if we're trying to do stuff with our database that's you know mistyped or mismatched. Richard Feldman: And we also have this integration called servants LM which basically lets us define types in haskell and then automatically generates serialization destabilization code. Richard Feldman: In l so it can go across the wire from server the client without having to you know do that manually. Richard Feldman: we've actually had it happen that we changed a column in our database and had one of our front end tests fail because we have that completely integrated all the way across really nice, especially compared to what we were doing before. Richard Feldman: So we started off on rails and I mentioned earlier that we had this thing called the database apocalypse and basically that. Richard Feldman: i'm going to give you the short version of the story there's a blog post that a link to in a second that that tells the full story. Richard Feldman: But essentially what happened was that we'd run into something of a scaling problem. Richard Feldman: which is to say that you know millions of users great awesome right well millions of users on a site that's all about students answering questions and stuff had translated into billions of questions which again great. Richard Feldman: We did have an embarrassing incident where we, we ran out of primary keys, because the 32 bit integer only goes up to 2 billion oops. Richard Feldman: I was a fun one to fix. Richard Feldman: But basically we we started doing some math and figuring out, you know if we keep growing at this rate we're actually in jeopardy of running out of space on the biggest individual single server that Amazon will rent us. Richard Feldman: That wouldn't be good, because that's basically like well we just can't have a database anymore, we can't put new stuff in the database. Richard Feldman: which then, hence the name of the database Apocalypse Now this doesn't sound that bad you might be like well why don't you just shard, why not just you know add some more databases and just like you know balance between them. Richard Feldman: Well, the problem that we were finding was that. Richard Feldman: Our rails code was so brittle that whenever we tried to make incremental progress on this like we would we would say like let's just do a little like two months, you know little two month project. Richard Feldman: To try and like incrementally move us towards something that's actually you know closer to horizontally scalable we did this more than once, and every single time it just broke so many things within rails that we ended up having to completely roll it back. Richard Feldman: So for us every time we did this really like this is more and more concerning how do we solve this problem and I don't want to completely spoil all the details of blog posts, but the short answer was what we found was. Richard Feldman: Take the rails code rewrite a chunk of it in haskell so it doesn't do anything different it's just in haskell now, and because we didn't change how anything works in the entire rail system there's no like threads to pull on, and you know things to. Richard Feldman: Get out of whack with are out of sync with one another, it was doing exactly the same thing as before, just doing an over here and haskell instead of in rails. Richard Feldman: were able to incrementally sort of brick by brick move all the pieces over until we had enough of it in haskell the now we can just make changes on the hospital side. Richard Feldman: And by doing that long story short we're able to convert the Apocalypse and get a new system setup. Richard Feldman: And the result of this is that now actually today, most of our traffic goes through haskell like this is our highest traffic like part of our system. Richard Feldman: By lines of code, we still have more Ruby code in haskell because it's just had many year head start on haskell. Richard Feldman: But we are you know, partly as a consequence of this, but also, you know because of for several of the reasons basically. Richard Feldman: haskell is now you know, on the back end is for us what elements on the front end like that's what we want to do all of our new projects and that's what we want to move existing projects over to you know, whenever possible. Richard Feldman: it's just a it's it's it's sort of like night and day what we were able to accomplish in terms of this basically the number one scariest technical problem like biggest threat to the business that we had haskell was the way that we solve that problem. Richard Feldman: As you know, business cases go it doesn't really get much better than that for for demonstrating the value of a technology to a company. Richard Feldman: going to get the full story of that here's a link i'll share the slides afterwards, you know, like a screenshot that or anything but you know that also also work. Richard Feldman: Okay, so top three benefits to our business for haskell i'm pretty different than for LM. Richard Feldman: Number one here was just making changes faster and easier, I mean literally, we were unable to successfully make the change we needed to make with rails, but with haskell we actually were able to do it, and you know avert the Apocalypse. Richard Feldman: And we're to hiring again like we are let's see I think our three most recent hires um well one of them Okay, one of them has actually signed the offer yet so I shouldn't count my chickens, but. Richard Feldman: have actually were people who came to the company interested in at least haskell and, in some cases hassle and didn't even know about. Richard Feldman: So again, like this is something that attracts people to come in, if you're if you're looking to hire strong programmers. Richard Feldman: I think, using haskell is a good way to do that, and if anyone tells you you won't be able to hire anyone. Richard Feldman: As companies who actually use haskell if that's been their experience, because I bet their experience is going to be more like ours, then like what you might assume not given that information. Richard Feldman: And then, of course, faster, more reliable software felt when I say faster, so we did have a pretty a relatively direct comparison of like what our haskell code was doing in production. Richard Feldman: Compared to our Ruby code now in fairness Ruby is not known to be a particularly fast language haskell actually is known to compile a relatively fast code, especially if you're using strictness everywhere, which we are. Richard Feldman: And so, although it's not quite apples to apples, in the sense that the haskell code is doing slightly less because part of the whole reason, we need to change things, was to offload some work elsewhere but. Richard Feldman: it's pretty comparable in terms of like what the haskell code was doing compared to the old Ruby code that it replaced and it's about 10 X faster like, as in the throughput is about 1010 times higher, meaning that. Richard Feldman: are theoretically, you know our costs for dealing with that traffic, or at least that that that part of the logic are like one 10th of what they were before in terms of. Richard Feldman: Number of servers needed etc so that's also a benefit to the business, although if i'm honest like that's not the main benefit here, the main benefit is that we were able to like actually make changes to stuff. Richard Feldman: That was too brittle to change before and if anyone would like to come up with like Oh well, you just didn't tdd hard enough on the real side. Richard Feldman: I don't want to tell you that wasn't the problem. Richard Feldman: Okay i'm toffee costs, these are somewhat somewhat somewhat different from l so again viewers off off the shelf SAS integrations we didn't have to write our own new relic integration for like some server side monitoring for haskell. Richard Feldman: This is different from home, so the learning curve for haskell is definitely you know I mean you could argue that it's like the number one cost of the business, which is that I mean it's just. Richard Feldman: Elements very easy to learn and hospitals very hard to learn that's been my experience. Richard Feldman: We have in the past, multiple times hired like fresh bootcamp grads like they've never had a programming job before they pick up their first week. Richard Feldman: We have not, since we adopted haskell we have not been hiring a boot camps. Richard Feldman: But if we had if that's a conversation we would have is like okay how how we're going to have them learn haskell and honestly probably what we would do the strategy would most likely do is. Richard Feldman: have them learn first and just only give them front end projects when they're starting out and then after they've been using them for a couple of months, then. Richard Feldman: incrementally move to hospital because honestly I think if you're like one person we hired actually never done javascript either she'd only done Python she went to a Python boot camp and in her first week she actually thought having never used Ruby or. Richard Feldman: This is before we haskell she actually commented, I was like hey you know. Richard Feldman: you're more interested in learning more like doing more Ellen projects and more Ruby projects, she said i'm interested in doing more projects because it feels easier. Richard Feldman: Like LM for her was like easier to learn them Ruby, which is an object oriented language like Python dynamically typed and Ellen felt easier, I learned, because the compiler self, I think. Richard Feldman: hassle again just it's just not the case so. Richard Feldman: I think we would probably just try some strategy where people wouldn't have spent learn them first and then transition to hospital. Richard Feldman: But the number one cost is honestly just not unique to ask at all it's just transitioning away from the status quo. Richard Feldman: We have a ton of legacy rails code and you know, like I said a lot of it's like pretty brutal change, unfortunately, we have a ton of tests, but. Richard Feldman: it's not enough, and so this is not specific to haskell because, if we were moving to a list or we would have the same number one cost here, which is you know transitioning away from the. Richard Feldman: The status quo I don't know what. Richard Feldman: To what extent that would would have been true if we'd had like a bigger react code base, when we were transitioning to Ellen but my sense is that it's actually I think easier to incrementally adopt things on the front end and on the back end. Richard Feldman: Especially if you have a model if, like like we did with rails because that's kind of what rails encourages the majestic model if they call it. Richard Feldman: If we'd had like microservices maybe this easier I probably would be easier, but microservices have their own whole set of downsides so I don't want to pretend like that's a free lunch either um. Richard Feldman: But yeah I mean it definitely is like you know, the main the main issue that we have you know faced in transition to haskell is just like, how do we do this incrementally it's just harder to do in our experience, and it was on the front end with him. Richard Feldman: Okay, we have had some other like more recent experiments next is one that's been very successful we use next for like all of our development dependencies for us next ios for our ci runners. Richard Feldman: may end up using it for a production servers essentially Cuban 80s, also has gone well I know there's like a big team of like oh you don't need Cuban 80s, I don't tell you, we need a Cuban 80s. Richard Feldman: We had a lot of very specific pain points and we looked at what was out there and it was either Cooper daddy's or like patchy grub nomad or something like that, but. Richard Feldman: As it happened we had somebody who had communities experience, so we ended up going with that, but like. Richard Feldman: We tried the route of like you know gagne you're not getting any going to need it and we found that no we actually didn't. Richard Feldman: Post referral we tried out, but ultimately was not a successful experience, but fortunately we did on a pretty small controlled way as as we do, and we're able to sort of back it out okay So to sum up back in 2013 you know very small company no money no revenue no functional programming. Richard Feldman: And then you know basically a between then and now like we introduced react react grew from react we transitioned to LM l groups or took over our front end then haskell and next came out of that. Richard Feldman: We did you know control experiments at one after another, the latest of which has been haskell there will certainly be others after that. Richard Feldman: And this is our formula find a low risk project that's a good fit get it all the way to production, expand incrementally or if it doesn't work out the back out. Richard Feldman: And essentially that's how we got from 2013 where we are today, you know five employees to going to be over 100 by the end of the year. Richard Feldman: 60 K lines of code to 1.2 million thousands of users to millions of users, but no revenues actually literally turn your profit and we didn't thanks to you a functional programming so that's how we got to billions of users and truly functional code thanks very much. Claude Rubinson: Thank you so much that was really good that was really fun. Claude Rubinson: i'm going to open. Claude Rubinson: The floor up to questions so. Claude Rubinson: Okay. Doug Smith: i'm not familiar with elm and learning closure, did you consider closure script when you were evaluating this language. Richard Feldman: Oh, of course, yeah even though it's actually a friend of mine, we hang out at conferences all. Richard Feldman: I actually was um before I tried him I was actually. Richard Feldman: an advocate for closure script having I haven't actually tried closure script I tried closure, but like we were talking about it at work. Richard Feldman: And I my advocacy was was kind of minor because I was like Well, first of all I haven't actually used like try to closure, but I haven't I haven't actually tried closure script I was like i'm considering it. Richard Feldman: And I ultimately I think that, based on our elixir experience, and I know that, like closure is quite different from elixir so there's something on an apples to apples comparison, but. Richard Feldman: For the things that we ended up wanting to get out of it and the style that we work which is like we've seen a lot of benefits of static typing I know like chickie is famously not a fan of static types. Richard Feldman: I don't know that it would have worked out for us, but having said that it works out for lots of companies, and I would certainly encourage you to keep trying closure and like. Richard Feldman: I a controversial thing that I believe is that programmers have preferences and that's Okay, and like normal. Richard Feldman: And like some people really like just the way the closure is designed, just like really speaks to them and really works well for them. Richard Feldman: and others it doesn't I also know, some people who like trying closure and we're into it for a while and then switch to something else. Richard Feldman: Like more sad type, I also know people have gone the other direction, who really likes static types and then end up on closure, so I would encourage you to find out for yourself like what your what your preferences are. Doug Smith: Does he have a rebel. Richard Feldman: Yes, you can just say own space rebel and. Richard Feldman: yeah it's it's rebel. proctor: hey Richard hmm question for you. proctor: Because you met just on the on the closure and stuff so I know we've talked in the past stuff but, and again I did after your stuff I got a side gig where I did some element evening on a ui to do essentially a. proctor: drink bulk import so wrote a table grade that free filled and did a bunch of validation of the user data before it's like hey before we send this back to rails. proctor: So that stuff almost fantastic for the like, because I was like I made some of the changes that we went from to unfold, I went from true and false to be like oh here's a like a validation thing with the error message. proctor: So you validate the input you pop that up and you show it on the ui was like I was able to knock that out in an hour and a half that whole change to the code base it's not huge but it's enough bj like falling compiler boom boom boom. proctor: yeah also do closure, which is the which is like hey if I got an experiment, I can knock it out easy elm I found, you have to wait and get a whole bunch of stuff constructed. proctor: Did you find anything with Pascal about like taking advantage attack typos or anything where you're able to kind of like i've got part of this stuff that I know, but I don't want to build everything out, is there any way to find that a little happy balance between like small chunks. proctor: That you get at the closure in the dynamic stuff versus the. proctor: Once it's built out, we know that this is an aesthetic have you found any trade offs there even from the elixir and stuff that you were doing. Richard Feldman: So you're absolutely right, I mean that, that is, that is a trade off and it's one that now that i'm working on a programming language frustrates me because I know it doesn't have to be that way. Richard Feldman: josh is not because he knows what i'm about to talk about. Richard Feldman: So haskell has a feature compiler flag called deferred type errors which lets you basically if you were going to get a type mismatch it will instead. Richard Feldman: pretend it's Okay, and just like generate a runtime error, instead, if you like, actually get to that code path, which is essentially what you get in a dynamic language, which is to say, like it doesn't block you at compile time. Richard Feldman: But if you if you do actually encounter the problem and then eventually, you know that type mismatch will have a consequence it's just it will only happen if you get to that code path when you're writing a program right. Richard Feldman: Like you know let's say you have like type error at runtime you know undefined is not a function is maybe the most famous one. Richard Feldman: So you can do that in haskell for type errors, but, honestly, we haven't really used that much at work it's only for type areas it's not for like naming this matches So if you like, you are in the process of like renaming something or changing some other things around that. Richard Feldman: Type check or have problems like earlier than type checking it doesn't really help but. Richard Feldman: I also like I think culturally we're just all so used to it that, like. Richard Feldman: We just sort of like do it now, but what I mean by that doesn't have to be that way is that there's no reason that a compiler can't just. Richard Feldman: Have the best of both worlds, as far as i'm concerned and, just like if there is a type error tell you about it. Richard Feldman: But also just not stop there just keep going and actually generate the code and let you run the application, if you want to and then. Richard Feldman: If it encounters that type mismatch at whatever you know branch of the code, then you know crash, then, but just do both just tell you about it at compile time but just as an fyi and not as a blocking thing so that's a rocks compiler does it just it just does both so. Richard Feldman: They haven't been enough big rock projects done yet in existence to know like how. Richard Feldman: beneficial, that is, in practice, but the reason that I designed the compiler that ways for exactly the reason you were just talking about like I. Richard Feldman: it's a it's a trade off that exists in every type Czech language I know of, but I don't think there's a technical reason that it has to be, and now we know there's for sure, not because you already do it. Richard Feldman: was a good point. Doug Smith: question. yeah. Doug Smith: If you were to do this application. Doug Smith: all over again from scratch money no object, would you even be using react at all. Richard Feldman: Oh no, no, we wouldn't we wouldn't have bothered yeah and like we don't. Richard Feldman: The version of react that we're using is like 12 or something because that's the last time anyone wrote any new react code. Richard Feldman: The only javascript Code, the only new javascript code we ever used is like if we pull some library off the shelf like that rich text editing thing it's never like we write react code. Richard Feldman: So yeah we're definitely not bother with your act at this point. Doug Smith: And what's the status of ID he support. Richard Feldman: there's like a language server plugin for home. Richard Feldman: I personally use them and I don't know i'm kind of cranky about language servers and speed and stuff but. Richard Feldman: I don't personally use it, but I I know people who usually like it, I just use them with like the standard like them integration like when I save it gives me an error and like you know red squiggly underline and stuff like that. Richard Feldman: So i'm kind of the wrong person to ask, but I also like aware that, like people lots of people in the Community, like us down like we're server and like it. Doug Smith: i'm going to give you the award for the most information in the shortest amount of time, but my question is how many cups of coffee, did you have before you start. Richard Feldman: Well you're not I actually told drink caffeine. Richard Feldman: I I used to, but I had a hard thing and. Richard Feldman: long story short, I I tried lots of things to get rid of it, and then I stopped drinking caffeine, and it went away immediately. Richard Feldman: So I have not had caffeine in a couple years now. proctor: i'll just get some this excited. Richard Feldman: I just love programming that's all there is to it. Richard Feldman: I mean, I guess you kind of have to like try and make a programming language, because it's it's it's extremely time consuming it also extremely rewarding. Richard Feldman: But yeah I think you gotta love it to truly want to do something like that. Richard Feldman: Other questions. Adam DiCarlo: yeah I have a question yeah i'm wondering like with with haskell like I haven't used it all that much, and you know i've used on a bit just on you know personal projects big big fan of course but. Adam DiCarlo: With it with haskell do you run into any do you have any like special coding standards or anything just to keep the code like simple because I from what i've seen real world haskell code is X dreamily I guess abstract isn't story. Richard Feldman: I I know where you're coming from on that, so we basically right haskell Code as much like elm Code as possible. Richard Feldman: We, the job name, we use that internally as l flavored haskell so the point where we actually ported and have open source elms standard library, as well as some of the other libraries like http and stuff. Richard Feldman: Just because I also think like I didn't talk about it just now, but they really underrated aspect of elements like how excellent the API design is, in my opinion. Richard Feldman: I think like beyond just the language itself like Evan did a really great job with the standard library and with supporting libraries like http and like random and. Richard Feldman: json decoding and stuff like that. Richard Feldman: And so we just not only do we ported over those libraries, we actually also weren't happy with any of the test runners we can find so we ported over Ellen test to haskell it has the same like. Richard Feldman: error formatting output and like API for defining your tests and stuff like that I think we also open source that if anyone can find that, let me know and we'll open source that too, I think we did, though. proctor: you're writing something new, you said rock or something for new language you're playing with. Richard Feldman: yeah i'm happy to talk about that, I do we want to transition, I guess, I before we switch topics I mean because it's meetup right, we can wear whatever. Richard Feldman: I figured I figured I just you know, giving anyone chance to ask any other questions about the talk, but happy to switch topics to rock as well. georgesboris: yeah. Robert Bertram: I have a question yeah so yeah I work as a reactive helper but love them and it started functional programming every time. Robert Bertram: You know what what patterns, maybe that if you think it's. Robert Bertram: What what what ways could element form the way right react to write more reliable code is that even like a like a valid way to think about. Robert Bertram: Like drawing patterns from from LM like what would be your suggestion there. Richard Feldman: I will send the wrong person to ask because I like I said it's been years since i've touched react, I like I don't even I read about hooks but I don't actually know what they are, I know it's like a like a newish thing, I just wanted, with it, I remember looking at it and. Richard Feldman: Not being a fan because it's like render is not a pure function anymore, or like and someone's trying to explain to me how it actually is, even though it can be side effects and I not buying it. Richard Feldman: But, so I don't I just think i'm too far removed from having done react to have good advice there sorry. georgesboris: I have a question. georgesboris: So, you said that it's very easy to hire and already because, like everyone knows no like everyone in the world knows already reading yeah so I was wondering like. georgesboris: What do you think about how important is a vigil isn't or being part of the Community, when you are acting like more niche language system. georgesboris: yeah. Richard Feldman: that's a good question, I guess, I don't know because I only have my own experience, which is you know, at no reading. Richard Feldman: I do like I have heard from other companies that they've had a similar thing where like Ellen was a big part of the reason that, like people apply to their jobs and they like, since they started using them they've gotten like a higher quality like applicants than they used to before. Richard Feldman: But what I can say is that there's there's an innate benefit to just like if you go in the helm slack, which is where everybody hangs out. Richard Feldman: there's a job channel and there's like pin jobs in there and it's not that many I mean it's like you know, a dozen initially give or take depending on like what day or what month is. Richard Feldman: it's like a pretty small number so you're not competing with a lot of other companies for real estate, you know at any given moment, I know that there's like. Richard Feldman: You know, based on like past like state of LM surveys there's like thousands of companies using l. Richard Feldman: But it's not like they're all hiring at the same time, like a lot of them are like pretty small and you know, not necessarily hiring or they don't post their jobs and like on slack or something like that. Richard Feldman: And so I think. Richard Feldman: I don't think it's like necessary, but I do think you do need to make people at least aware that you're using elven hiring so partly that can be on slack but also just like writing a blog post about how like I just saw on hacker news today. Richard Feldman: I don't know how to pronounce that's like a Japanese company. Richard Feldman: They blog about how they were you know, using Oh, I know why they're doing that they want to advertise the using Elsa people apply their jobs. Richard Feldman: We do that too, or you know give talks at meetups. Richard Feldman: As long as people are aware, like you know, like we've already heard from a couple people in the audience here to like us as a hobby project, and you know. Richard Feldman: that's that's like the story, we hear from a lot of people who apply to our jobs is like I was using it as a hobby project i'm using typescript and reactive work. Richard Feldman: I like so much better, I want to use it all day instead of only on the weekends, and so they apply so as long as people know that you're using it, I think that's, the main thing, and it can just be a blog post really. georgesboris: And just follow. georgesboris: As you are very exciting to to have these be more public about using the hospital as well. georgesboris: Do you feel like the same need to to be part of those communities as well, like the hospital money, or are you see like kind of like using the same pool of resources because of your your knowing now. Richard Feldman: See that's a great question yeah i'm actually know that you mentioned, I never thought about it until you until you just said it, but um. Richard Feldman: I guess like we haven't done nearly as much in terms of like you know haskell like publicity wise as elm I mean really it's just like. Richard Feldman: Usually if we mentioned haskell it's like along with elm it's like oh man haskell right like I just did you know, a second ago. Richard Feldman: We don't we haven't really done any like dedicated haskell events like we've like sponsored Ellen conferences we, I mean I guess we've done some haskell specific stuff but. Richard Feldman: I think part of the answer there, though, is that haskell is just like a lot bigger it's not like you know. Richard Feldman: People need to know about haskell it's like it's among functional programming languages like. Richard Feldman: it's pretty hard to find somebody who's like familiar with functional programming it hasn't already heard of haskell whereas I don't think the same is true of L. Richard Feldman: So I don't think there's like as much of a gap there in terms of like awareness, so I don't know if there's like I don't know what role we would even play that, to be honest. Richard Feldman: But I mean we certainly do want to make a name for ourselves, then the House, we can be because we like we do do haskell differently than a lot of other countries, a lot of companies. Richard Feldman: I know that, like there's like kind of a movement for like simple haskell and. Richard Feldman: we're not like perfectly aligned with that, but like in spirit yeah like we're we want to use haskell as an LM like language you know, like simple. Richard Feldman: don't you know don't overcomplicate it don't don't use, you know all the language extensions, you know, etc don't even do some of the basic ones, and I know there's like a large subset of haskell those who are interested in doing that right. Richard Feldman: So, think about what you will. David: Other there any features of other mlm style languages that that you feel that. David: That could benefit for with her from. Richard Feldman: Oh that's interesting question um. Richard Feldman: Yes, uh but uh huh. Richard Feldman: So the one that comes to mind is actually. Richard Feldman: Probably morphic variants from a camel which rock uses, but I don't know how much it would benefit from it, because. Richard Feldman: The main way to work well, no, it would be nice it would be nice, because I was actually doing a project and L like last weekend and I missed it, so I guess it does come up, but really not that much it's I think it'd be a nice benefit, but not that necessary. Richard Feldman: The main reason that we're using it to rock is actually for like chain defects error handling like accumulating errors. Richard Feldman: I can't really explain it concisely, without going on, like a 15 minute tangent which I don't think it's a good idea in the middle of a Q amp a but. Richard Feldman: If you watch some of the toxin like how it actually don't think any of the talks up there, explain that the next time i'm going to be probably will go into it, maybe we say. David: like an arrow that sort of thing. Richard Feldman: I mean, I mean can serve the same purpose, but like okay so basically i'll give you the super brief version let's say that i'm i'm like I want to do and. Richard Feldman: Read read data from a file so rock is for like not for like web front end stuff like i'm like oh it's like filling a niche that I want to exist. Richard Feldman: So let's I want to read from a file take the data they got from from the file us based on that, like maybe it gives me a URL make an http requests and then after that right, the results of http request to a file. Richard Feldman: All three of those operations are going to have different error types and so, how do you like chain them together and, like in haskell is like yeah like you said, like Arizona and type something to do. Richard Feldman: Or you can always just like map all like define a custom error type that's just like all three of those different possibilities like read error right error or http error. Richard Feldman: And then, like do a map over each of those tasks, so that they all get translated into type that works, but it's like kind of report for most annoying. Richard Feldman: With a pilot work variance or, as we call them in rock. Richard Feldman: tag unions. Richard Feldman: You don't have to do any work it just it just works like you just you just say. Richard Feldman: I want to do the file open the file read for the file do the http requests, right to the file and then the type of the resulting task will just have the error, be the Union of all three of those possible errors and that's it. Richard Feldman: And then you can just like do one pattern match on and be like what if it was a reader What if it was a writer, what if it's http error that's it there's no extra work. Richard Feldman: So that's why it's in the language and that doesn't really come up that often at home because, like the browser you don't have a file operations like usually it's just like it literally just an http request and that's it. Richard Feldman: But it does come up in other domains so yeah I think it's a it's a nice feature. Richard Feldman: And we definitely stole it from a camel, although we do it a little bit differently than they did but yeah that's that's the one that comes to mind. Adam DiCarlo: So when you mentioned just how many companies are using elm. Adam DiCarlo: Could you give us source for this, because I can't find anything about that online and every time I try to find that it's like outdated lists and github repo that is also updated and yeah. Richard Feldman: So that was from state of LM whatever the last time, like Brian did say to them for a couple of years and then was like I don't want to spend time doing this i'm not sure what value it is. Richard Feldman: This is an example of what value is, but I understand that it was like I think it was just a disproportionate amount of hours that he had to put into like. Richard Feldman: scrubbing the data and like getting the collecting all the results and stuff relative to what he thought people were getting out of it, so he stopped doing it. Richard Feldman: And I don't think anyone else picked it up, which maybe he was right he feels didn't become a set of lateral but there was one state of L where. Richard Feldman: It was this an inference based on like number of thousands of respondents who said they're using element work and being like well, even if. Richard Feldman: Even if, like half of them work at the same company like that still means there's definitely multiple thousands of companies using l I don't remember what year that was, though. Richard Feldman: But I think all the state of albums have had the raw data, so if you go back to the most recent one, I would assume that if you downloaded like a spreadsheet of that it would probably you can do the same inference that we did we're looking at it. Adam DiCarlo: cool thanks yeah no probably actually do that well. Brandon Huber: i'm curious, what was the process like when you were transitioning to these languages. Brandon Huber: In terms of like getting the team on board with it because i'm sure there were some that were like Oh, but it looks are really was good, or you know they had some other language they were holding out for. Richard Feldman: A very different between element haskell so when we when we first ucl we were still a pretty small team um it was like so I was on the front end. Richard Feldman: There was one of the person was on the front end, but he was straight out of boot camp higher and then everybody else is working on the back end which is only a handful of people. Richard Feldman: So there was some element of just like well, of course, the new boot camp brad isn't going to push back against the only other like senior finance person. Richard Feldman: And everybody else's sort of like well, you made a good call with react so you know we sort of trust your judgment and like your reasoning makes sense, so yeah let's give it a try. Richard Feldman: And I think there was a little bit of an implicit like well if it's actually not good, you know it's like it's all be taking responsibility for that. Richard Feldman: Whereas with haskell it's like we actually now we have like you know a lot of people on the team compared to before and and it was just like a much. Richard Feldman: higher learning curve, it was a totally different scenario so with the links, for, in particular, so we had two different people at the company, who are really like gung Ho about it, like certainly. Richard Feldman: Really really championing it like driving it forward, we also had some people who were like really excited about haskell but. Richard Feldman: You know they're aware of, like the learning curve consideration and the light, you know it looks like really close to Ruby it really seemed like elixir was the natural thing to transition from rails to. Richard Feldman: So, by coincidence, after we got those services in production we're kind of like no this isn't like. Richard Feldman: Exactly what we want, not for this reason, but for unrelated reasons, both of them ended up leaving the company. Richard Feldman: One of them actually went to go work on a dedicated like full time elixir startup where like they were already completely transition. Richard Feldman: Which understandable, you were like elixir and the other person for totally unrelated unrelated to any technology stuff reason that i'm taking a different job so. Richard Feldman: So that point we have like no release or champions left and still had several hospital champions so. Richard Feldman: It wasn't that it wasn't like we had anyone being like, no, no, I really want to stay with elixir it was like everybody else was like it sort of ambivalent one way, the other, having said that. Richard Feldman: I think there could be like a I don't know like a longer talk about just that whole process. Richard Feldman: Partly because of server side also just because, like the hospital tooling, at least in the state that we found that like I mentioned earlier, like we ended up for emails and the library they'll test runner it like. Richard Feldman: it's not just the error messages from the compiler where the ergonomics are not what we were used to. Richard Feldman: And so you know a lot of people that there's an inevitable comparison when you're like Oh, I want to run my tests you like. Richard Feldman: Why is this not as Nice as Ellen tests and you're like I want to do something standard library, why is this not as Nice, the core elbow you know and it wasn't like it was slightly less nice it was like. Richard Feldman: Enough that like I said we ended up putting a lot of that stuff from L and so it was definitely a rocket your transition and and we so we did it more slowly. Richard Feldman: Like in 2017 we had like I mentioned that was like when we did our first little experiment like. Richard Feldman: It was like a full year before we actually started like doing a second phase of that we're like we're like okay. Richard Feldman: This experiment worked, and I mean a part of adopting haskell is just like picking from the very large menu of different ways to do things it's like what http server do you want what. Richard Feldman: What like persistence library, do you want to use there's just a lot of like what standard library is the only consensus on that is don't use the one that ships with the language. Richard Feldman: So there's there's just a lot of choices to make, and you know we we tried out different things, and it for matters is like four different for matters and, like what one does like a variation of one of the other for. Richard Feldman: So, so we we ended up like just try out a lot of different things and trying to sort of like figure out how can we get the you know the. Richard Feldman: ergonomics as good as we can, you know before we like rolling this out to everybody, because we were kind of worried about honestly like. Richard Feldman: Over committing to the wrong thing and having like too many sharp edges, so we didn't figure it out, eventually, but I mean it took a lot longer than the transition to l. Richard Feldman: in large part because i'll just sort of like there's one way to do it and it's really nice here you go, you know if you don't like it Okay, but like this is how it is and we didn't really like it, whereas haskell it was just a lot, a lot more decisions to make. Richard Feldman: separately, that was not also not helped by the fact that we still to this day, have not found a book, I thought we had this we've had a haskell book club for several years, where we just like read a new haskell book like together and like talk about it. Richard Feldman: You haven't found one that we think is really good for like teaching professional programmers like here's how you use haskell to build stuff at a company. Richard Feldman: There is a relatively small number of them that, like purport to do this, but least the ones that we read we didn't think were great. Richard Feldman: Some are better than others, but I recently asked, I was like surely by now there's a book that I can like when I specifically like when i'm going to go to the speed up thing is there a book that this book club can recommend and everyone's like still know. Richard Feldman: So of course i'm on that didn't really help you because, like Ellen has really great documentation also like Evan road, and you know, like I suddenly wrote a book about it, but I mean. Richard Feldman: Even before Al and action was a thing like there, there were plenty of resources if that's you know my contribution, but like there's there wasn't a shortage before. Richard Feldman: But with haskell it's like yeah there's a lot of stuff if you want to get into haskell from an academic side there's lots of material. Richard Feldman: If you want to learn about you know, like Lambda calculus and Chapter one you know that's that's there for you like, if you want to. Richard Feldman: get to Hello world Chapter seven that's also available, but like, if you want to be like, I want to build a thing you know I want to build a web server like how do I do that. Richard Feldman: it's surprisingly hard to find that in the format that's like well written and accessible and, like all these things, or at least it seems to be. Richard Feldman: So i'm not going to mention the books by names that I know how much work it is to write a book I don't want to throw shade on anyone but. Richard Feldman: So far, we haven't found one that we thought was really good and that was a contributing factor to why it took us longer to get transition over to ask all one of our hopes, is that by sort of like building an ecosystem and stuff like that. Richard Feldman: That we can at least contribute to like if others want to go down the same kind of path that we do where it's like trying to write haskell in a simple way that's like very like hopefully the materials can be better but that's sort of a work in progress of our contribution. Richard Feldman: Other questions. Elaine and Michael: You know the meaning of the logo for. Richard Feldman: Yes, it's a 10 grams so 10 grams of this puzzle where you have a puzzle the wrong word. Richard Feldman: it's a set of like very small primitive shapes that come in a box and then you can add you can arrange them into like lots of different like pictures like there's one where you can do like a bird or like a person or. Richard Feldman: sailboat or various things like that, and the reason that Evan chose that was basically. Richard Feldman: Like elm a tan Graham is something where you have a small set of simple primitives from which you can build surprisingly complex and interesting things and that's sort of like the design philosophy I don't. Elaine and Michael: Well, thanks. Richard Feldman: yeah great question I I always like talking about some of the like like etymologies like origins are some of these things. Claude Rubinson: Okay, so along the same lines, because we've had this discussion in our group at least, years ago, we had it. Claude Rubinson: Does MC itself is a derivative of haskell or from the ml wine. Richard Feldman: From an mlm I mean it's certainly like like I think what Evan said it was the things that has forgot the syntax right, aside from. Richard Feldman: The type operator, which they changed from ml to from single column to double colon apparently the story behind that is that. Richard Feldman: Because they were doing, they were making haskell to do research into laziness they were actually weren't that concerned about types and so they figured that you're going to be using cons all the time. Richard Feldman: You know, for like like lazy list and stuff but how often are you going to write type signatures so let's just make cons, you know, be the more concise one in the type deal when be the more verbose double column. Richard Feldman: that's not how it turned out in practice. Richard Feldman: Which is why haskell like haskell and then like pure script The thing is the only other language that followed that convention, based on the whole rest of the family it's single going. Richard Feldman: Like so yeah he did it i'm in college, he did a lot of like standard ml type stuff and I think he would say that, like there were haskell influences into l like with the module system which is select closer to haskel's than like ml modules. Richard Feldman: But, but I think you would say that it's it's more a descendant of the ml family then like haskell in particular. Richard Feldman: If you were here because I say. georgesboris: Do you have any. georgesboris: Ideas or wishes for the future film in some way like if it would change in some way what way would that be. Richard Feldman: Ah, interesting um I have some minor ones, one would be I wish that more types were considered comparable so they could go in dictionaries that would be nice and sets well i'm blurry I haven't. Richard Feldman: Ever figured out. Richard Feldman: I also think it'd be really cool film compile the Web assembly, but, honestly it's like already really fast relative to other virtual Dom system so that's like. Richard Feldman: I don't know I just kind of like the idea of it, I don't I don't think it's actually probably worth the amount of time and effort it would take in reality, but I think it'd be it'd be cool. Richard Feldman: What else. Richard Feldman: I don't know not that many. Richard Feldman: Those are the main ones that come to mind. Richard Feldman: This is like minor bug fixes here and there, that would be cool but I actually came I think what they off top my head because they're so few and far between that actually like seem to make a big difference. Richard Feldman: I guess like a first class web sockets thing would be cool, but not for me just because a lot of people ask about that, but. Richard Feldman: I don't know I have never actually used web sockets. Richard Feldman: Not not a personal thing yeah my wishlist rail was like pretty short. proctor: So I got a I got a question for a wish list for you. proctor: Because i've heard some people in the Community want it on node the same way, you can get like pure script and stuff on node are you where do you fall on the elm on node versus just hellman the browser's since you're looking at like haskell and other things like that. Richard Feldman: So i've done one note because I wrote own test and it runs on one node. Richard Feldman: But. Richard Feldman: I mean, I guess, maybe the. Richard Feldman: most emphatic way I can answer, whether I think it should be on notice i'm making a programming language that's very alike and works on those types of use cases. Richard Feldman: So I mean I know what Evans feelings are on that, which is that he has a vision for what. Richard Feldman: People would call like elmo on the server and it's not what most people would think of and it's more ambitious and higher upside and really awesome but he's not ready to talk about it at this point, so I don't want to. Richard Feldman: get into that but. Richard Feldman: I think he's intuition, that we can do a lot better than just elmo notice correct and worth pursuing. Richard Feldman: So one of the reasons that i'm making rock is that it's for like sort of the long tail of use cases that are not but usually people say Oh, I know what they mean is like hell on the server. Richard Feldman: That is a thing you can do with rock but it's not the main thing it's like. Richard Feldman: A lot more flexible than that are designed to be like targeting a lot more use cases than that. Richard Feldman: Like plugins database extensions command line tools desktop you eyes all sorts of different stuff. Richard Feldman: So I think if elmo node sounds appealing I would hope that rock would also sound appealing. Richard Feldman: For those types of use cases and also kind of hope that that can like take some of the pressure off him so people, maybe not feel as much that wouldn't be as much of a request like you said i've definitely heard that too, but. yeah. it's a. Richard Feldman: Vision for l. proctor: And, and there was a little bit of LM is known for the elm architecture So what does that mean for a like a note APP when you're running in Lambda or something like that, where people do pure script. proctor: So that's what I was kind of curious to what your take on, it was with like the tooling of tests and stuff where you're like. proctor: The purity the purity meets like again a lot of what people love about LM is the architecture right. proctor: As the simplest and the simplicity of brings to thinking about the way it brings purity. Richard Feldman: yeah I mean you can use the old architecture, for you know any Like you, I am I don't know that it's. Richard Feldman: An amazing fixed for arbitrary back end applications, I mean, in general, the idea of like message passing and like an update function for state. Richard Feldman: is like a pretty reasonable model for concurrency but that's like kind of a pure function way of expressing like what erling does with like mailbox and stuff kind of sort of if you squint. Richard Feldman: Like actually in the rock compiler we have a section where we're like. Richard Feldman: Loading lots of different files in parallel and we actually use something that looks a lot, like the architecture for like how the. Richard Feldman: messages are flowing through when you get like oh this file finished this stage, so now it's ready to move on to the next stage, like. Richard Feldman: sends a message back and there's like a coordinator threat that deals with all the other threads that's all written and rust. Richard Feldman: So, certainly, you can do that, you know as a pattern like wherever you want nine also like in your eyes people use film architecture and. Richard Feldman: You know javascript applications and stuff. Richard Feldman: But as far as like you know, a language, putting the two together. Richard Feldman: What I think about Elvis sort of like the elm experience it really has to do with the like being a complete package it's like everything is designed to work together to solve a particular like domain, really, really well. Richard Feldman: So I think that's that's what I love about elm in the browser and if there were going to be an elven back end that's what I want it to be is like this is a complete solution, and not just like oh it's it's like l but its own node yeah you know because that's like. Richard Feldman: I don't think that's the best way to solve that problem in hell like way and I don't think of it as either. Elaine and Michael: How do you thoughts on that script. Richard Feldman: restrict um, so this is a. Richard Feldman: Okay, so it started out as. Richard Feldman: Trying to remember the lineage here reason ml and reasonable is a syntax for O camel and also a compiler tool chain via buckle script for compiling O camel to javascript in the browser. Richard Feldman: And if you wanted to use that stack it was reason ml for the syntax and the bubble scripts compiler compiling okay well through the O camel compiler to javascript. Richard Feldman: I know, whenever people in that Community talks to people who use it. Richard Feldman: It I honestly. Richard Feldman: As an old programmer it doesn't there's really no pitch for me like it's like I don't know what like there's no upside like i'm happy with like the pure functional like front end tool that I have that sort of like all in one. Richard Feldman: I don't see a lot of upside to being like do I want mpm back in my life I absolutely don't that's a big downside, for me. Richard Feldman: I I like the pitch of like you can use react on like I like better than react I, why would I want that that's a step in the wrong direction for me. Richard Feldman: O camel allows side effects and mutation again that don't want them back. Richard Feldman: But I appreciate that other people feel differently, I know at least one person who switched from La to OK, I will because they actually prefer to like react style. Richard Feldman: And you know the like more object oriented way you know I mean it's like functional but also you know, has elements of object orientation. Richard Feldman: At least compared to like the way that Ellen does it and there's nothing wrong with that, like I said, you know people have preferences and that's cool but for me is like somebody who's happy with. Richard Feldman: That I just it's not for me. Elaine and Michael: In terms of like hiring, for example, or the Community. Elaine and Michael: Cross covered you see much. Richard Feldman: I actually don't I don't know much about that aspect um. Richard Feldman: I mean the reason that the hiring piece works out for me is that and for haskell is that there's a lot more people who want to use those languages, and there are companies who are willing to add a lot more strong programmers who want to use those languages, then. Richard Feldman: Then companies that are hiring for them, so we like usually it's the other way around, where there's like. Richard Feldman: You know most companies like, how do we find people like like we were you know fire down or it's like there's there's more companies trying to hire than there are you know, like strong programmers available to fill those positions, but for us it's seems to be the opposite i'm. Richard Feldman: A big um but I actually don't know what it's like there, so I mean it's predicated on there being enough interest and I don't know how much interest there isn't restrict, to be honest. Richard Feldman: i'm not saying it like is or isn't there, I just have no idea I haven't I haven't talked to the people in that Community about that in a while so. Richard Feldman: yeah I mean assuming it's there that I expected to be the same, but I just don't know if it is or not like I like it's not like just by using a. Richard Feldman: You know less popular less common language you automatically get that it has to be to do that in balance of like how many people like didn't want to use it at work to how many companies are hiring I just don't know if it's there there, maybe it is maybe it's not. proctor: yeah so to follow on just with the rescripting reason ml. proctor: One of the things I remember hearing as a selling point was like hey it's like react and react native you can compile down to and essentially Okay, will you compile down to your jvm for your android phone or ios objective C for ios. proctor: Is is there any rumblings in the own community, not as an aside, because I know he's looking at other stuff about like own native. proctor: Like, are there any things that you've heard about people trying to take the helm stuff and move it and be able to do it other than just like rabbit in a web view on ios devices or android devices. Richard Feldman: So there were a couple of projects, a couple years ago that that sort of went in that direction, but they just kind of petered out. Richard Feldman: Honestly didn't seem like there was much interest I think they kind of got started, because it was sort of like a wouldn't it be cool if rather than like we really want this for our business type thing. Richard Feldman: I just think there just wasn't enough like will to like see it all the way through, I think, part of that honestly is just that. Richard Feldman: It seems like in general, trying to target ios and android and, like the web, at the same time as had kind of a spying track record like some companies, whereby. Richard Feldman: react native but also do get a lot of stories of like it did it for a while and they lie and now we're going to hire some ios developers and some android developers and yeah. Richard Feldman: Like doing their like native environment because it's, this is not like famously Facebook did that I heard but anyway, so I don't actually know. Richard Feldman: If that will ever if there will ever be a critical mass of people who like where there's enough demand for that, but I haven't even heard rumblings about that in a while. georgesboris: I don't know if i'm jumping the gun here but. georgesboris: Like using rock I know that there's like this platform instruction I don't know if we're going to talk about that, but is in would it be possible in theory to compile to javascript to a binary so like actually have like hoc compiling to javascript as a web platform. Richard Feldman: So right only compiles the binary so wouldn't go through javascript yeah I mean, so you can compile a rock to essentially a C library so anything that can speak see can use rock so yeah you can totally go straight from rock to ios or android. Richard Feldman: I think I haven't actually done any ios or android programming but i'm pretty sure that they both have like see interrupt, so in that sense yeah you could do that already today with the existing rock compiler you have to build the platform of course there's a lot of work. Richard Feldman: But if you're if you're willing to all the all the pieces are there in theory. Richard Feldman: anybody can do that they don't need to know just. Richard Feldman: build the rock compiler from source, because we don't have any releases yet, but like it's a work in progress, but I mean it is already powerful enough to do that. But this right. David: Sorry guys. georgesboris: Like full on I know that this is completely, not the goal for rock but, in theory, could I like us a platform to compile non binary but like to a file and like essentially do the same as sound does with javascript but using the rock sentence. Richard Feldman: uh oh yeah so sorry somebody it compiles to a binary but that doesn't have to be an executable binary It can also be a library like a C library like. Richard Feldman: You know, you can compile see to like either an executable like Hello world where you can compile it to like live hello, or whatever, and then some other. Richard Feldman: You know program can import that that compiled binary Code as a C library and then you know do whatever with it it's the same thing with rock you can either. Richard Feldman: compile it to an executable or to a library so that's how you can use rock for like building plugins, for example, like database extension so like that, like anything that. Richard Feldman: Anything that can can talk to a see binary can be used with rock. David: rock using the same compiler back end is rust is he is it built on Lol vm or. Richard Feldman: Oh sorry he said back in um yeah so it has to back ends at the moment um one is LV m. Richard Feldman: For optimized builds and the other is incomplete, like featuring complete relatively elegant but all the opium back it's also featuring ugly but. Richard Feldman: We have a development back and they go straight to machine code, which is not at parity feature parity with the lb a backup yeah. Richard Feldman: it's not like caught up there that that's for like speed because LV m is really nice in terms of like the optimized come to the producers, but it's also really slow, as in like literally. Richard Feldman: So if you if you do like a building like a non like a release building like a non trivial file we don't have like a whole bunch of your project, yet we have the best thing ever like you know significantly log like a rock file. Richard Feldman: Half of the time is spent waiting for LV M and the linker to like generate the binary. Richard Feldman: And the other half is everything else put together it's like reading the file from dispersing it canonicalization type checking it model horrifies to get like all of the Rock specific stuff is like half and then the rest is just like lbs plus linker. Richard Feldman: So that's why we want to back at that does so yeah. David: So does this mean eventually web assembly, because I know. Richard Feldman: i'm like nobody's working on that, right now, but like a common thing that will happen is like somebody comes by the rock to look at is like hey What about what assembly like. Richard Feldman: If anyone wants to work on, let me know i'm happy to help, but like we don't have anybody who's like working on rock who knows web Assembly is like familiar with it. Richard Feldman: But it's like yeah I mean all the pieces are there, that it can compile a web assembly like lbs does that web Assembly is also like a binary format like instruction sets very similar. Richard Feldman: it's not like it would be a huge project it's just like it's not trivial, and you know if anyone wants to work on that here, let me know like I said, you know happy to. Richard Feldman: happy to facilitate that so I kind of assume it'll happen eventually I don't personally have any web assembly related use cases that i'm interested in other than just like it would be cool to have like a rebel at the browser off like rockets.org someday. But yeah. Richard Feldman: Definitely definitely assuming that sooner or later, all happens. Richard Feldman: All the questions. Elaine and Michael: So venturing off from rock a bad guy you're coming up to that in a minute. Elaine and Michael: I really appreciated the control experiment, you talked about yeah i'm curious guy so i'm curious. Elaine and Michael: What the experience is or how was the experience differs from one language ecosystem, to the next, and if your successes and some ecosystems, for example with elman haskell affected the way you did feature experiments. Richard Feldman: Oh interesting um yeah certainly I mean I guess like we've had some. Richard Feldman: parallels between them, but also like some differences like obviously like one of the nice things about doing. Richard Feldman: Control experiments in the front end is that there's like very little possibility of like. Richard Feldman: Not a direct sense of like data loss like if you mess something up at the front end like, especially if you can stick stuff it's just like presentational and not like necessarily. Richard Feldman: Recording stuff in the database it's like well if you mess it up like it looks wrong, but like you know you can fix that without having to go back and repair things. Richard Feldman: On the back end it's like riskier because if you get something wrong or like if something is lost in translation, maybe you have to go back and fix the data later, maybe you can't if you get really unlucky secondly. Richard Feldman: there's this nice thing on the front, at least with with element and javascript where like you can have elma javascript coexisting on the same page so it's pretty easy to just like integrate the two and like get them going. Richard Feldman: On the back end if you want to do the same thing you have to get infrastructure involved, you have like set up a separate service and have them talk to one another, or we actually tried at one point. Richard Feldman: Having it run in a different process on the same machine and we even talked about trying to just do. Richard Feldman: FF I would see as the intermediary between Ruby and haskell just having Ruby call haskell functions, we didn't end up going down that road, for various reasons. Richard Feldman: But actually also the in process thing ended up finding that it was just as much work as having a talk over the network, except that like we didn't get as much infrastructure tooling it was it was more annoying so we ended up just doing separate services like. Richard Feldman: Like people typically do. Richard Feldman: So yeah so so a lot of it was just like Well, this is just going to be harder than the elm experiments that we did so let's figure out how they're different and and how to like try to still make the experience as similar as possible, since it went so well that time around. Richard Feldman: yeah. Richard Feldman: Oh you're muted. Tad Doxsee: Sorry hey when you were introducing haskell wondering how long did it take you to sort of settle on favorite libraries and do you have a set of favorite libraries and could I find that list on a blog somewhere on your website. Richard Feldman: yeah I think. Richard Feldman: I think when we're blog posts missions that if it doesn't just like hit me up on Twitter and all all posted somewhere. Richard Feldman: short answer is so where we've ended up is like I said we wrote our own pre lewd which we have open sourced and our own testing framework which we have, I think, open source. Richard Feldman: And http also for persistence, we use postgresql typed which has been really nice we use servant for the http server. Richard Feldman: We started out on scotty but long story short, it was not didn't didn't do enough stuff that we wanted for like a json serialization between the front of the back end we use servant element which automatically serialized the types on both sides. Richard Feldman: And yeah I think those are kinda like the I don't know the biggest ones we don't use, like any like lens or optics libraries. Richard Feldman: uh. Richard Feldman: yeah. Tad Doxsee: It did it take you very long to settle on those were those pretty obvious. Richard Feldman: yeah no I mean, especially in the early days like like when we did the first experiment like we we try several of these I said we started off on scotty to remember with the end for matters, who, I think we try, like all four different like major for matters we ended up on or blue. Richard Feldman: But we consider the formula which is horrible Lou but with for space indentation it's fun to. Richard Feldman: Again, to have it be more like elbow we decided that was like we didn't want to go that far. Richard Feldman: To go pro dilute I think we, I think we started with proto loot and then for the prelude and then we ended up just doing our own flavor one. Richard Feldman: But yeah I mean we definitely tried out a bunch of different stuff early on, and that was a significant part of the like why it took so long to to like get get get like haskell This is like similar level of traction that Ellen got almost right away. Richard Feldman: And I think hopefully we can you know, by publishing like what we found works for us, maybe make that easier for other companies that have similar interests in terms of like how they like to be writing hospital. Tad Doxsee: Right um any comment on something like effects system or versus reo versus. Richard Feldman: On stack yeah so so we use like the handle pattern it's not like an off the shelf effects system, but we, I think we have blogged about that maybe in brief. Richard Feldman: But yeah. yeah so pattern. Richard Feldman: cool other questions. Richard Feldman: Alright um well, I mean we talked about rock and we said, like a while ago we have essentially just the topic baxter I don't know. Richard Feldman: If people have questions about rock or I don't know if I can like just like rattle off, you know exactly what it is everything I guess the short version is it's it's an l like language it compiles to binaries. Richard Feldman: there's this whole concept of platforms and applications but I don't know if I can concisely explain that I just gave a little talk about it, which is on the website. Richard Feldman: is designed to be really fast and so far, it is just like how fast the compiler grunts and also how fast the the compiler output runs. Richard Feldman: I guess, one of the cool things that this group might appreciate is that we're doing something as far as I know, it's novel among. Richard Feldman: functional programming languages that are targeting like production applications as opposed to like academic research. Richard Feldman: Because there are some academic language to do this, but so we don't use persistent data structures, instead, what we do is we do this analysis at compile time to figure out when we can do opportunistic mutation and then use traditional like fast imperative data structures so as an example. Richard Feldman: let's say that i've got a record in L and i'm like this record has like 20 fields, and I want to do a record update, which would mean. Richard Feldman: i'm going to copy this entire record over and accept them in a change like one of the fields, maybe like two other fields, or something like that, so now they're immutable so I have a new new copy that's totally separate from the original one and. Richard Feldman: I can do whatever I want with it, but it's all going to be immutable and so forth. Richard Feldman: So imagine if I say fu equals in my record, and I say bar equals fu you know, but with these fields changed so if food never gets used ever again like after I defined bar. Richard Feldman: We didn't need to make a copy of it like we could have just use the one we had and just mutated it in place, and no one would ever be able to tell the difference because it's just like that memory is never referenced again so who cares just reuse it. Richard Feldman: Rather than making a copy. Richard Feldman: So long story short that's the type of analysis that rocks compiler does and it's sort of like based around that so rather than using like closure does persistent data structures elm does some persistent data structures. Richard Feldman: And that's like another way to they like copying cheaper, but basically rocks compiler tries to just actually not do copying quite often. Richard Feldman: And so, instead of like linked lists, as are fundamentalist, or should we just have like flat rates, with the same API is like elms list API basically. Richard Feldman: Is the array API because you can do like a get in the middle of it if you want by index and it's as fast as a normal rate because that's what it actually is, so the hypothesis is that I basis on my experience of rust where it feels like. Richard Feldman: that's what we end up writing in practice, like most of the time, anyway, it feels like this optimization will kick in way, more often than not, and we actually won't end up doing that much copying and practice. Richard Feldman: will see that ends up panning out there's only one way to find out which is to try it. Richard Feldman: If it doesn't pan out, we can always like fall back on you know persistent data structures and stuff like most languages do, but we have good reason to believe that it will actually end up being faster at runtime and it does enable cool things like. Richard Feldman: So we did a benchmark it's like a really silly benchmark but it's a cool results, which is quick story like we did handwritten quick sort like textbook. Richard Feldman: Just not optimized just written out the way you'd read it out in the textbook in rock and then did benchmarks against same thing written in Java javascript go and c++. Richard Feldman: And all of them, basically, had the same implementation, except the rock one because it's all pure functions had to use like recursion and you know, like ostensibly lots of copying of like a race. Richard Feldman: But in practice, after all, the optimizations ran it was so c++ was the fastest no surprise there. Richard Feldman: back with the last time we ran that benchmark go was in second place rock was in third place, and then Java javascript were behind rock. Richard Feldman: Even though we were doing it on a real quick sorting a million numbers so there's their jets were kicking in and able to like you know help out with that. Richard Feldman: So that was pretty cool because. Richard Feldman: Quick sword is like for a pure function is like. Richard Feldman: Almost pathologically bad like that pure function has like no business being competitive with that it's just like Why would you ever write that and if your functional style, which is why we chose it because it's so like ludicrous that it would be at all competitive. Richard Feldman: We think that, with a round of optimizations that are new style optimization that is currently in progress that will actually be ahead of go, but I can't claim that we've done it yet because it's not in place yet, but it's close we're just like missing one last piece, but. Richard Feldman: yeah it seems like if those optimizations work, the way we expect, they will then will be faster than go with quixotic which is pretty cool always load in c++. Richard Feldman: Anyway, um. Richard Feldman: So yeah. Richard Feldman: that's kind of the I don't know some of the interesting things about Russia as well on the website, if you want to watch the videos on there. Richard Feldman: But like I said it's like very early stage very work in progress, definitely not ready for any like production, you know use or even like sizable hobby project, so this one. Richard Feldman: Any questions about rock or elmer hospital or. Richard Feldman: Any functional programming topics whatever it's a meetup anything's fair game. David: i'm really happy that there is a. David: It seems like the mo line has been growing like seems like the you know, like early on in programming history like sea lion kind of took over right. But. David: It seems like every new language i'm seeing is coming out of the ml line of. David: Languages, which is. David: awesome so as there you know, and obviously there's there's you know other lines, the list line, but is there any. David: Is there anything you've you've you've looked at the sake of the list for the for the CD see type languages that that you you're trying to incorporate into rock. Richard Feldman: i'm in terms of incorporating it into the design of rock the language. Richard Feldman: There is a very minor thing which it's not like any any of these languages like the first to do it, but actually David nolan ended up talking the end of this, but we did add. Richard Feldman: optional record fields so it's like a very sort of niche thing, but like so this this comes up in certain rare circumstances that Ellen but it's like kind of annoying were basically. Richard Feldman: let's say I made like a sortable tables a good example, this like sortable tables, you can configure them in all sorts of different ways, like, how do you want to sort the columns like. Richard Feldman: Which columns are sortable in this way that way you know how do you want, like all sorts of different configuration options. Richard Feldman: In the pattern for doing this for specifying those you make a like a default config record and then whenever you're rendering your table you pass in. Richard Feldman: A record update of default config with whatever things you want to change about it. Richard Feldman: So in rock you don't have to do that, because you can just specify, I have a record with optional fields, and then they have a default, you know set inside the function. Richard Feldman: So you can just pass a record with like fields missing and they'll just get populated and it all works with the type checker and and all that good stuff. Richard Feldman: So it's kind of like a small nice to have and that really actually came from my conversation with David nolan about backwards compatibility and he was pitching me on being the first ml language to have both that and either multi entity functions or. Richard Feldman: optional arguments and functions and we talked about doing that, but did not I i'm not convinced that that's that was worth it, but I think the optional record fields is. David: is worth it okay very it has so many downsides. Richard Feldman: yeah la and so you don't have to go that far, you can you can do. Richard Feldman: Like obsolete elixir has default arguments like optional arguments with defaults. Richard Feldman: could do that I actually think they also have multi year you can think of it, but in the code is like in the documentation is like special syntax for the default and that's. Richard Feldman: What I I took a look at us like Okay, so how would I like change some of these like rock. Richard Feldman: library functions if they had default arguments, and I also looked at elixirs standard library and was like How would I change these functions if they had the balls arguments like nine times out of 10 i'm like API the default argument seems worse. Richard Feldman: I would actually like I think elixir would have a nicer standard library if they didn't have that feature that's probably controversial to elixir folks but as someone who doesn't use it, I can just you know take shots right. Richard Feldman: But yeah I am. Richard Feldman: So i'm not convinced, there are some cases where it's nicer, but it seems like they're outweighed by the number of cases where it's just like an API foot gun were like using it just results in something that's worse, even though it's kind of like appealing, which I don't like. Richard Feldman: But yeah so now that wasn't the question was um things that like i've incorporated into rock the language from non ml. Richard Feldman: Family languages. Richard Feldman: So another one from rust is to from rust. Richard Feldman: insight when your pattern matching um I don't maybe they're the languages that have this but russ is the only one, I know that has it when your pattern matching and russ and also in rock you can do a branch that has multiple patterns, so you can say like. Richard Feldman: Green pipe blue pipe orange which means green or blue or orange all of those match this one branch and run this code if they're in there. Richard Feldman: Also, you can do if guards on them, so you can also say like green pipe blue pipe whatever if X is greater than seven or something like that, and you can use inside that conditional guard. Richard Feldman: The variables that are in the pattern match, so you can say like like if you're doing a pattern is going to results you can say like. Richard Feldman: Okay X if X greater than five or something like that, and then this branch will match only if it was Okay, and what was inside the okay was greater than five. Richard Feldman: Just nice to have like it's just makes the. Richard Feldman: The pattern match like a little bit. Richard Feldman: easier to organize I found, whereas otherwise like if sometimes needs to like nest more conditional is or. Richard Feldman: have multiple grants of the call to a helper function that anyway. David: Look. Richard Feldman: At active Patterson if. Richard Feldman: I haven't heard of them. David: they're pretty neat they're kind of a way to functionally decomposing pattern match so. David: So you can kind of use them and it'll it'll. David: it'll actually kind of enhance the syntax it makes the patterns, a lot simpler for some some use cases. cool. Richard Feldman: Okay, oh I just looked it up and put it in another tab so all i'll check that out later thanks. Claude Rubinson: Can you say more about that David i'm not familiar. David: um it's so it's one of the features, one of the kind of Nice features about about F sharp. David: So if you're if you're pattern matching against properties, for example, so if you have a sense if you have. David: Like a record as one of the things that you're matching against you can you can create an active pattern that makes it simpler to match against the properties on that wreck and or you know. David: You know console or other. David: Other things but they're they're really needed you basically look like another like a like a variation on the standard function but then they're there you can hook them into your pattern. David: To kind of enhance the syntax. Richard Feldman: cool. Richard Feldman: cool. Richard Feldman: Oh yeah other other questions or thoughts or topics. Richard Feldman: Anything is fair game. Claude Rubinson: So we start to lose some people because it's been about two hours. Claude Rubinson: i'm going to turn off the recording now. Claude Rubinson: And then we can you know really talk shit. Elaine and Michael: we're gonna wait for the recording to go off before he said that.
Info
Channel: Houston FPUG
Views: 8,249
Rating: undefined out of 5
Keywords:
Id: gRFjOo-ZgK8
Channel Id: undefined
Length: 108min 34sec (6514 seconds)
Published: Thu Sep 09 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.