061: As a Gopher I'm excited about Gleam, maybe you'll too

Dominic:

Hello there. I'm Dominic Saint Pierre. You're listening to Go podcast. I'm a, you know, decent and I I would dare say good software engineer. I've been writing Go for the last decade or so, maybe a little bit more.

Dominic:

I started back in February. So this episode is all about me discovering something new that I'm very excited about, the Gleam programming language. So basically, I I started looking at Gleam back in the days when it was still a ML kind of syntax. I even posted them in the GitHub repo back then. It was oh, why?

Dominic:

Well, long a super long time ago. I was very excited about this. So yes. I mean, in this episode, I will I will try to convince you to to look at it. Let's see.

Dominic:

Before we dive into anything, I started a Patreon page as well. So if you ever want to support the show because you are, I don't know, you know, liking the show, you are getting some value out of it, you want to support me in doing this. I mean, doing a podcast is not easy. It involves a lot of times and efforts and things like that, money even. There's also the Slack channel on the go time.

Dominic:

I'm not on the go time. On the go on the go for Slack, the go Slack. There's a link in the in the podcast website. So gopodcast.dev. I'm not even sure.

Dominic:

I mean, there there's not much people that that have joined. I'm very very bad at maintaining a community myself. So I'm not even sure I will continue the channel. So I'm debating that at the moment. So before we dive into anything, I'd like to reiterate a little bit about why I show I chose Go back in 2015 or whatever 2014.

Dominic:

Back then, I've I've told the story multiple times. I will I will I will not be be very long here. So I I was building a a SaaS in Node. Js back then and one day I I woke up and I I was just tired about all those callback L. It was it was still the pre promises era and things like that.

Dominic:

So I woke up and I just decided, you know what, I will I will try try this new this new language that I I've heard about and I was I was already starting to write a couple of things and I was already kind of excited about it. So basically for me, it's all about the ergonomic of how it will allow me to maintain long lived software. So I I tend to to brand myself as someone that have maintained software for a long time. So the oldest production system that I've maintained was, 23 years old when when another, basically it was Equifax that acquire my one of my client. I started there as an employee.

Dominic:

So basically, I I think I qualify for someone that can say, you know, I'm used to maintain the long lived software. And I've I've also, you know, built some software as a service and things like that that, you know, reach, you know, five, six years. And that this is this is not long at all in in comparison but still I mean especially in a startup environment and things like that things are moving very fast and you know six six years is still, is still very great in the in the startup world. So when I evaluate languages that I want to try myself and I want to see myself being productive and having some kind of excitement because for me it's all about having fun and it never really was a job. I was lucky enough, you know, lucky quote unquote lucky enough to be able to create projects that I wanted to build for letting go of of more money.

Dominic:

So let me rephrase that a little bit. If I had worked at bigger organization all my careers, I think I would have made more money than what I've I've done so far. But for me, it was always about freedom and, you know, purpose in life and things like that. So I never really was tempted to try the enterprise you know, life, software engineer life and things like that. So what it made me is that I have created a lot of software in the last twenty five years and a lot of open source project and a lot of a lot of things basically because it it was basically my my my hobby if you if you will in a sense.

Dominic:

So when I evaluate something I immediately think about the things that I've I've lived myself and it's it's all about making sure that a software can live long, making sure that I will have fun maintaining an application because there's nothing, you know, there's nothing worse than, you know, just feeling miserable miserable when you are maintaining a software and things like that. So Gleam is appears in my in my radar, lately and to be frank since they have reached the v one, I've I've been you know how it is. You you see that on on somewhere on the internet and you say, oh, I will I will look at that later. And like two, three weeks or one month later, you you continue to see that and now it's it's it's increasing in your internal priority saying that, oh, that that is, you know, that that seems to be nice. I need to check it out and things like that.

Dominic:

So after multiple months, I would say, years, I finally I finally, you know, took some time and and check it out. So I want to contrast that with a couple of couple of languages that I've I've tried in the last, let's say whatever since the beginning of my careers and I think I think I think there's a lot to say about about Gleam already. So my my initial experiences with professional programming was in the Microsoft ecosystem back in, you know, back in February. Basically, I started with v b six and after that moved to dot net for almost a decade, maybe fifteen years if you count when I was doing other other thing on the side. But at that the first of my career, well, it was basically on the Microsoft stack.

Dominic:

I was, you know, fairly appreciative about the .net ecosystem back then at first, especially moving from v b six. So v b six was a totally different story for me because the first experience I had with with this tech was we we I joined a company at at they were at the end of this project, this four years project. It it was crazy back then. But I I joined and I I was there for the last year or so of development and the the deployment or so so it was going to change a production system. So employees training and what not, and and it was brutal.

Dominic:

I know I've I've told that story, but, you know, long story short, we had to install the the visual visual was it? Visual Studio back then? I I don't recall. Visual Basic was installed on all the employees' PCs to run. So we at first, the the first month of the production, you know, stage for this, there were an icon of the on the desktop and of of the employees and basically they were compiling the application in the v six and it was starting.

Dominic:

It was crazy. When I moved to .net, well, things were a little bit better, you know, from a junior developer point of view where it was starting to make a little bit more sense to me the way that especially the web was because after after that I was doing v b six on the desktop and classic ASP on the server. And when I started .net well it was the the good old days with the view state and the the the run out server component and things like that. So it was it was not bad from my point of view but soon soon enough it was it was pretty pretty brutal. Again, I won't rehearse what I've said already on this podcast.

Dominic:

I'm pretty vocal on on on Reddit as well when when I I talk about .net. So I you know, we were bitten a lot. Let's just say Silverlight or what it was called? Link to SQL. Not Link to SQL, but the yeah.

Dominic:

The the the well, yeah. I think it was Link to SQL. Just before the Entity Framework library just before that, Microsoft released something one you know, almost two years, before that and they discontinued that. So basically, they were releasing some libraries and some things and, you know, it it from what I I have been told it's not like that anymore but it's pretty hard to continue to put your confidence into into a language or a stack that keeps how can I say that? I mean, it it keeps preventing you from advancing and you are basically always rewriting your application because the the update path to the next dot net version was not always easy.

Dominic:

Sometimes it involves changing the entire version of the operating system. I mean, it it was a a fifteen years of brutally repeating yourself because and and, you know, often often the joke about the dot net ecosystem is is it's made it's made for a consultant basically because companies back then were always rehiring the consultant because when Microsoft was doing an update then, well, yes, it means, oh, cool. You know, I will be able to charge, you know, to redo this the same exact project in a in a new .net version, for example. I I was not a consultant back then, but that was that was the joke that was running. So at some point, I decided to stop being an employee and just discover, you know, more like a Linux environment and things like that.

Dominic:

So I really jumped into Node. Js for some reason. I I was I was already at the stage where I I wrote this this application for this SaaS. I I was already building SaaS back then. I started writing SaaS in 02/2008, but believe it or not, I was doing that in dot net at first with SQL Server as my main database.

Dominic:

It was working, you know, decently correct. So basically dot net was was very hard to love, I would say, at some point because it was constantly backstabbing you in the back. Node. Js for me was kind of meh, I would say. That was that was in the same time that on the front end I started to do more and more React.

Dominic:

So, you know, 02/2012, three you know, thirteen, fourteen on the back end node. So I don't really have much to say about that other than I, you know, I I live the dependencies problem of of JavaScript and node and things like that. And it it was my issue with dot net was so recent that I could not really put my trust into into some something that was at at least at that time going to backstab me a little bit like the dot net environment was was doing so and and it was all already popular in the ecosystem, you know, the the dependencies was a problem. It was it was the pre promises time. I wanted to return to statically type language so, you know, I was used to, you know, v v six, visual basic was was, you know, statically type when you think about that.

Dominic:

So and after that I was doing c sharp so that's about that in that time that I I jumped into go and immediately I I I was right at home with with go The tooling, the the fact that it was statically typed, the asp, you know, there's not much to learn as it was a small language. I was able to rewrite a couple of things. So, you know, you you know you are listening to this podcast. You know exactly what Go is is is all about and why you probably also love it yourself. And and that was great.

Dominic:

So I've done that for multiple years. And at some point, you know, I just wanted to discover something else. So one of my one of my friend was was doing some Python and Django. So I kind of bifurcated a little bit and enjoyed I I will I will say that I kind of enjoyed the Django mentality of everything is included and things like that but but, wow, you know, Python is dangerous to me and and the dependencies aspect as well, the the deployment. That was that was all preventing me from seeing myself continuing investing into this this language for the long term.

Dominic:

Because if we return to my personal criteria to choose a language, then I need to see myself building a long lived software. I need to see myself and still enjoying doing that in five years in the same project. And, oh, boy, you know, if you have done some Python, you you you already know what I mean. I mean, even yourself quitting a project and and doing something else for two months, returning to that project, especially in Django, I think, and you are like, woah, man. What's going on in here?

Dominic:

I I I don't recall, you know, it's it's like yeah. It's it's it's it's a it's a fun thing. So basically, that that that's my that's my experience so far and I've tried Rust a little bit but for us I have such a learning curve that I don't that this is what I was telling to do at John Arundel the other day, you know, I not the last episode that I did with with him, but previous the episode before that. I'm not doing low level enough development myself to need to use the performance of of Rust that would justify, you know, climbing this learning curve if that makes sense. You know, I'm I'm a I'm I'm a product builder builder.

Dominic:

I build software system that are deployed on on web servers and I I I, you know, I do most most of the fun that I have is trying to come up with something that people will like and and things like that. I mean, I'm I'm not I'm not building OSs and and drivers and whatnot. And I I would I would still love to do that, but the embedded aspect for me is is also complicated. Anyways, Russ is is on the table for me at some point in my life. I don't know when exactly.

Dominic:

I think it will be probably when I I'm near the end of my career or or or stop doing development professionally that maybe that that will be the right time for me. For now, I jumped on this web back end, front end development a long time ago just being able to build a software systems from scratch. The entirety of it, putting that into production, this this is who I am. I am, you know, been mainly building software as a service, but but yeah. And here comes, you know, Gleam.

Dominic:

So this is this this is something something interesting that I think some go go software engineers might might want to check it out to be frank. So Gleam is a language that sit on top of the beam OTP. So Erlang created this this virtual machine a long time ago and it's the same it's the same thing as you know we can compare that to elixir so if you have seen or tried elixir so far so yes those those languages kind of, know, compiled down to to to machine code that this virtual machine is able to execute. This thing is extremely performant and and you know done for you know high tolerance webs you know web application and things like that. So compared to go I mean in go the the the thing that is interesting, is that you can you can build a a binary and you can distribute that and and there's no virtual machine that needs needs to run the this byte code.

Dominic:

It's not byte code. It's basically just machine code that your processor can interpret at some point and and be able to to run and execute. So that that is that is a major difference right away. And a little bit of a of a downside if I if I'm honest because usually I like I I like to, to be able to, you know, to build my binary and just just ship them. So that this is one fantastic aspect of Go.

Dominic:

But again, if you are not building a CLI then there there's not much use to that. If you're building a web application then at at the end of the day, you know, your your your back end, your your web server will will run directly on on on on the host machine or might be running on the docker container which which would have the virtual machine to run the the the Beam application. That doesn't not really make a huge difference a sense. And you can also install the virtual machine actively on your host. That that is not that is not a problem.

Dominic:

So from there, I mean, what they have done with Gleam because let me contrast that with Elixir. So I've been playing around with Elixir for a long time again. I think I think I started near 2016 or so 2016. Yeah. '16.

Dominic:

So something something around those lines. This is also when I started with Elm and truly discover the functional programming. So I I, you know, arguably you can you can think, you know, of some aspect of c sharp trying to be a little bit functional but it it has nothing to do with trying the real thing, trying to remove your, you know, your imperative at and trying to put this fully functional at. So Elm for me was a crazy revelation that my I love functional programming. The This kind of things that allow me to create function and systems that that are easy to return to.

Dominic:

And now, again, this this is this is quote unquote because you can also write some fancy one liner in in, you know, some functional programming language that that yes, you know, you might return to that at some point and says, oh, wow. What are we doing in here? We are folding, mapping, reducing, filtering, whatever. I mean, so, you know, it's it's not Go, you know. Go is is extremely verbose.

Dominic:

It's extremely, there there's not much that one Go programmer cannot tell about the program if if they are reading a program. So you you you might you might open a file at some point, a Go file, and you you know, even if you have never been been in that program before, you will be able to to tell exactly what's going on in here. In the functional programming world, well, even if you are the one that wrote sometimes and and I yes. Sometimes you kind of go a little bit too clever if I can say that. But nonetheless, so Elixir, what what was what was happening?

Dominic:

So I I created a couple of things. So Elixir to me is great, but again if we return to what I was saying at first, I'm I'm someone that build web application. So inevitably I had to go with Phoenix and Phoenix is is excellent. It's great. But again, the amount of things that needs to be learned before you do anything is is you know it's a lot and it's it is dynamically type as well so even even though they seems to call compiling the elixir code into the beam code and and now that there there's probably some static analysis.

Dominic:

I don't know. There there's probably some compilation check that are done during this process that that will warn you some error and things like that. It's not as a, you know, a sound type type checking or or, you know, it's not really, completely typed, I would say. So for me, it was it was difficult to jump into that. And don't get me wrong, I've I've built a couple of of production at the small application in in Elixir Phoenix and whatnot.

Dominic:

Very great, very nice, but for some reason I I tend to always return to a statically typed language. And these days I think that Elixir already started to introduce, you know, some some aesthetically, you know, some some typed optional format or at least way of declaring your things. A little bit like TypeScript is doing with JavaScript, I think. I I would I would dare say. And please take that with a grain of salt.

Dominic:

I haven't done Elixir in a couple of years now. But it seems that they are doing that. But one you know, when I discovered Gleam the other day, I was like, okay. Okay. Okay.

Dominic:

Okay. So we are in a in a in a, you know, type safe environment, statically type. The tooling is excellent. The tooling of of Erlang was was a very very turning turn off point for me because I I also tried Erlang at some point. A lot of people was saying that they were not really enjoying the the syntax and whatnot.

Dominic:

Personally, I I was I was finding finding that okay. But for me, the the tooling killed that. Elixir was was great. The tooling is is all fine and and whatnot. Again, I I haven't I don't really have anything, you know, majorly negative to say about Elixir because I I haven't ran a a long time, you know, software with with that.

Dominic:

And that's the same for Gleam. Don't get me wrong. I I I'm just starting. It's just that now the excitement that I have and the feeling that I have was almost similar to what I what I had when I started doing Go. When I finally liberated myself from this node application.

Dominic:

And I'm not saying that I'm liberating myself from GoCo. This is not what I'm saying. It's just that at some point, you are researching some excitement in your programming life and have been doing Go for eleven years ish at the moment. I'm looking for something different. And the tooling of Gleam is great.

Dominic:

So basically, they they built the compiler in Rust and there's, you know, there's a language server already there. You can run your test. Yeah. You you know, there's already a for a code formatter and whatnot and editor editor the editors are handling properly all the the connectivity with the language server and whatnot. I mean, it's it's what you are expecting these days I would I would say from a a new programming language.

Dominic:

So the the those those are there. This is great. The fact that it's very simple. So they they seems to have adopted the the Go mentality of trying to keep it simple even though, you know, there's there's there's not as much things in in the standard library as Go. For example, there there's a couple of external things regarding database connectivity and, you know, running a web server or building a web application and things like that.

Dominic:

So those are those are fine to me at least at the moment even though I really really enjoy go, you know, the HTTP HTTP package and go is is just crazy. When you think about that, it's almost to the point where it can be compared to a very very lightweight framework at this at this days where where we are at the moment. It's crazy that you have this guarantee that your web application will will probably never have some kind of compilation error in in the future and whatnot. So that's a little bit on the on the on the the downside for Gleam. But the yes.

Dominic:

The functional programming aspect is extremely extremely refreshing. They seems to have took their times to build the the proper the proper language resemblance to c and still trying to keep some kind of functional syntax or things like that because at first the you were writing Gleam like you were writing, for example, Ascal or Elm. Basically, it's it's a it's a an ML, family, language. I personally really really enjoyed that that syntax. I think there's a lot of people that that are using Gleam at the moment that do love this syntax but like the other of the language says, once they decided to change to be more like a c style language, this is this is mostly where this thing exploded and things like that.

Dominic:

And it's interesting because we are seeing Richard Feldman with his rock, the language called rock that seems to now want to add up also the a little bit like the c style, for some aspect and things like that. So it's interesting. So if you don't know, rock is like a it's a functional programming that that wants to to be a little bit like general purpose. I've been I've been following Richard for for a long time now because again I was a huge huge huge fan of Elm, you know. Elm for me was hands down the best programming language, the best experience with the programming language I have had so far.

Dominic:

And with the limited time that I had with Gleam it's already clear in my mind that found something. I think I found something that I will really enjoy for the next decade. And being deployed on the Beam and UTP give give me now access to to a couple of very very interesting building blocks that yes, you you can you can have that all the the real time and concurrency aspect of Go, But there is so much built in in OTP and Beam that you cannot really you cannot really compare those two. I always liked a little bit more the monolith aspect of an application being, again, being used to be on smaller team and things like that. So to me, this is a very great fit compared to having 1,000 microservices that at the end of the day could have been way way less than that.

Dominic:

But that to be feel a little bit refreshing the the actor model as well. So the concurrency if you don't know how it works, you know, each processes so you can you can think of a process as a little bit like a goroutine but it's not really that. It's completely isolated but, you know, those things can communicate with with each other and there is this supervision supervision tree that ensure that the system stay alive and and whatnot. So it's it's what they call default tolerant aspect and stuff like that. There's there's a lot of things that a lot of things that you need in a typical you know decently sized web application that they are handling out of the out of the box due to the excellent design of of the the beam and the OTP.

Dominic:

So they were really onto something and this is this is what I already I always liked about Elixir and always wanted to discover this world but this yeah. The the syntax but it's it was it was really the the the framework and I haven't done any web development yet with with Gleam. It's just that this seems to be aligned a little bit like we are in the Go ecosystem where privileging a little bit more of a sequel, you know, raw sequel aspects versus or or I'm privileging simplicity versus, having, you know, too much into, into framework and things like that. So, I mean, it it just just seems to be to be nice to discover. Having a lot of fun, I would say.

Dominic:

It's not that I'm not having fun with Go these days, but again, I mean, Go is like my old oh, I don't I don't have the word in in English, you know, the the things that you put on your on your on your feet when it when it's cold. It's it's comfortable. It's it's re comfortable. I I am but at some point, I need a little bit of excitement and Gleam is is providing that at the moment because for me at least there's a very very good fit regarding the type of application, the type of system that I'm building, the fit seems to be there. If you, you know, I would encourage you to to check it out.

Dominic:

I know I know it's a go podcast. I I will, of course, continue to to do some some Go content and whatnot. It's it's not it's not it's not that. It's it's just that it's really a nice a nice piece of of programming language and we are we are inundated of of programming language these days and it's pretty hard to to decide, you know, which of those deserved your attention and things like that. So for me at least Gleam seems to be a pretty pretty decent decent choice and I'm going to to continue.

Dominic:

So on that, happy coding.

Creators and Guests

Dominic St-Pierre
Host
Dominic St-Pierre
Go system builder - entrepreneur. I've been writing software systems since 2001. I love SaaS, building since 2008.
061: As a Gopher I'm excited about Gleam, maybe you'll too
Broadcast by