Full transcript
0:00shipping to production for Oak Animal
0:01mean people are using your code and
0:04shipping to production for Haskell means
0:05you publish an academic paper all the
0:07Haskell people are just like oh my
0:10goodness side effects don't you just
0:11want your computer to be a big black box
0:13that heats up why would it need to
0:15change anything in the world
0:25[Music]
0:39TJ great to have you with us why don't
0:43you take just a second and explain to me
0:45like why you're such a big deal I see
0:47you everywhere the primogen's obsessed
0:50with you tell us a bit about yourself
0:52sure at the risk I guess of sounding
0:55quite presumptuous I'll explain why I'm
0:57a big deal that's not normally how I
0:59would phrase it but I'll I'll roll with
1:01it yeah so I've been in open source for
1:04a while working on neovim primarily I've
1:07written a lot of stuff for neovim both
1:09in core and in the plug-in landscape I
1:12was one of the first people probably the
1:14first person to push for LSP inside of
1:16neovim you can go dig up some old issues
1:19about that and I wrote our first version
1:22of the implementation which eventually
1:23was like went through a few iterations
1:25and got merged and then did a lot of
1:27work after the merge to
1:30make it so that people can use it and
1:32enjoy it I also spent a lot of time
1:34doing Lua integration so if you like
1:36some of the Lua stuff there I spent a
1:38lot of time trying to polish some edges
1:40there to make it enjoyable to use and
1:42then I'm also the primary author of
1:44telescope and Bim which is a pretty
1:46popular fuzzy finder and a lot of the
1:49stuff that we've done for neova man for
1:50telescope we've done on my twitch stream
1:52which has been really fun so I'm also
1:54somewhat of a notorious memer on Twitter
1:57which maybe that's the other place that
1:59people encounter me I just like to have
2:02fun and hang out with my friends there
2:03yeah
2:04awesome yeah that's how I ran into you
2:06okay so you just used a lot of words
2:08that my guess is a lot of our listeners
2:10won't be familiar with listeners to back
2:12in banter we are figuring out this
2:14back-end thing getting our first
2:15back-end job so let's start with neovim
2:18I am a terrible typist so I've actually
2:20never been cool enough to use Vim I've
2:23tried like 10 times can you explain to
2:26us what Vim is and what neovim is sure
2:29Vim is a pretty old editor that attacks
2:31editor that has evolved and gotten a lot
2:34of really cool ideas and features over
2:36many years and it evolved out of some
2:40really like difficult ways of editing
2:42code you used to not be able to view the
2:44text file that you're editing you used
2:46to have to read the line and then
2:48overwrite a line or things like that
2:50like that's Ed and things before VI and
2:53so over time Vim came along and it
2:56introduced a lot of really cool Concepts
2:58and ideas into this generally it's well
3:01known for being a modal editor uh that's
3:03like where the meme you can't quit you
3:05don't know how to quit the reason that
3:06is is because unlike most like programs
3:10or editing experiences when you type
3:12letters it doesn't just send those
3:14letters right away it has different
3:15modes so the mode that you're normally
3:18in is called normal mode and so when you
3:20type something like j or k you go up or
3:22down instead of j or k appearing in
3:25front of you so that's pretty confusing
3:27at first to people but you get into the
3:29the mindset of it after a while and you
3:31can come to appreciate it and I think
3:33Vim was probably the one that really
3:35popularized that editing Style
3:37there's a lot of benefits to it like
3:40that I like primarily the thing is you
3:42have a lot more buttons and keyboard
3:44shortcuts that you can add to your
3:46workflow without having to do 80
3:48different control combinations sorry
3:50emacs users out there but so then neovim
3:55is a fork of Vim so it's not a rewrite
3:57or anything like that it's a real Fork
3:59we share a lot of the same code and
4:00still to this day contribute patches
4:02back and forth between the two projects
4:04but neovim was focused more on
4:08extensibility than Vim at least at the
4:10start that's somewhat maybe changed in
4:12vim's perspective primarily because
4:15computers have changed a lot so it's now
4:17just like more possible to still have I
4:20think the kinds of things that people
4:22expect from them like instantaneous
4:24feedback when you're typing all this
4:25other stuff that you couldn't do while
4:28running like thousands or millions of
4:31instructions before yeah that used to
4:33not be the case so there's some
4:35trade-offs I think that Bram has changed
4:39his goal for Vim in some ways but
4:41regardless Neil them's goal has been on
4:43extensibility so neovim added things
4:45like a way to control neovium via Leica
4:48remote protocol it has ways to
4:49asynchronously run plugins and most
4:53notably for a lot of people it added Lua
4:55scripting as a primary way of
4:57integrating with the editor a lot of
5:00those features exist in various
5:01different ways inside of him or exist
5:04now but that's like the main you could
5:06say some main differences like for
5:07example an easy one is neofam ships with
5:10LSP support So for those who don't know
5:12LSP is a protocol originally designed by
5:15Microsoft for vs
5:17and it uh
5:19and uh it uh it's basically like a way
5:22to solve or at least minimize the
5:25difficulties of adding language support
5:27to lots of different editors so neovim
5:30supports this protocol which allows you
5:32to do things like go to definition find
5:34references rename autocomplete all those
5:37sorts of things at the same level as
5:39what you'd get in some other editors so
5:42that comes by default with neovim and
5:44it's designed to be very extensible and
5:46changeable and overrideable by the user
5:50yeah the LSP
5:51protocol in general seems amazing to me
5:54I it's correct if I'm wrong the idea is
5:56basically you can write your plugin for
5:57your language or ecosystem once and as
6:00long as you're following this LSP this
6:02language server protocol right yeah then
6:04like any editor that supports the LSP
6:07can use your plugin
6:09yeah basically like instead of call like
6:11instead of calling it a plug-in I'd just
6:13call it a server like you write a server
6:15and that server speaks LSP right and so
6:18then editors that also know how to speak
6:21it then you get support for that
6:22language it's slightly more complicated
6:24than that because there's lots of edge
6:26cases but you can get your like 80 20.
6:28like you can get 80 of the way there
6:29like really quickly in all the editors
6:31without having to do that a bunch of
6:33extra things yep tell me a bit about
6:35like how your career has progressed did
6:38you have full-time programming jobs and
6:40then you did open source do you still
6:41have a full-time programming job like
6:43how has open source fit in with like
6:45your career as a developer
6:47yeah so I do have a full-time
6:50programming job I work for a company
6:52called sourcecraft we we happen to be an
6:54open source company so like you can go
6:56look at my code there or like the code
6:58that other people are working on at the
6:59company
7:00but I didn't always work in open source
7:02I pretty much just
7:04stumbled into some stuff with open
7:05source at first I wanted to change
7:07something inside of neovim when I was in
7:09college and I didn't have I literally
7:12didn't know what I was doing I just was
7:14like copy pasting random stuff to get
7:17the code onto my computer and then some
7:19really nice people helped me in my PR
7:21and then we got it merged and I thought
7:23that was really cool it just wrote some
7:24code to change something that I use
7:26every day I like this I I could do I
7:28could see doing this again and so then I
7:30did and then over time particularly like
7:34relating to the LSP stuff I was trying
7:36to push that to be inside of neovim
7:39directly because I
7:41really believed and still believed
7:44that's a huge win for the editor and
7:46there's a lot of Mind share and a lot of
7:49standardization you can do by putting
7:51that into core that just don't that
7:52doesn't exist if you have to put it into
7:55a separate plugin
7:57so
7:58yeah so then I was working on that a lot
8:00and then I was helping some other people
8:01with projects and basically someone on
8:03the project asked me hey do you want to
8:04be a core maintainer like you're doing a
8:07lot of stuff here you would you like to
8:09do that it would be helpful if you could
8:11do that and review other people's PR
8:13sometimes and merge them when they make
8:15sense so yeah that's how I got on the
8:17neovim gore I tell people a lot like
8:19people that are just getting into
8:21programming particularly the self-taught
8:22route that projects and open source are
8:25a great way to make a splash get known
8:28for writing good code right like at the
8:31end of the day like I was a hiring
8:32manager I ran a team of go Developers
8:34for a while and at the end of the day
8:36like when I'm hiring someone my job is
8:37to cut through the noise and find the
8:40signal do you know how to write code
8:41that will solve the problems my company
8:43has and I've always felt like projects
8:46and open source are a great way to
8:47provide all of this signal up front
8:49before the Eve like the interview even
8:51happens has that been your experience
8:53has your open source stuff helped in
8:56your career getting jobs interviews or
8:58just in the interview
9:00yeah I think there's a two-fold way that
9:02you get helped by doing open source
9:04stuff the first one is I think when you
9:06actually build something you accelerate
9:08you're learning a lot so bio like
9:10actually doing you you learn a lot more
9:13than just by reading or taking a class
9:15or whatever not that those things often
9:17provide you like the Baseline that you
9:19need to be effective at building but
9:21then like eventually you need to move on
9:22to building things
9:24and then so that's like the one side is
9:27you do learn a lot of new things and
9:28then the other side is it does open up
9:30connections and like it's a way in a lot
9:33of ways it's a much easier thing to put
9:35on your resume because you can point to
9:37something that someone can go look at
9:39instead of just like saying I worked at
9:41Corporation X for three years I was
9:43managing several projects that shipped
9:45and delivered onto annual and everyone's
9:47okay but I don't know what any of those
9:50things do or look like or whether
9:52they're still running all I have is your
9:54side of the store so if instead it's
9:56like
9:57someone is out there using your stuff
9:59that you make that's a big signal to say
10:01that you're able to ship code that
10:03people find useful which ultimately like
10:06unless you're writing Haskell you that's
10:08like a goal of the company I think
10:11okay so you mentioned Haskell explain
10:14what is a camel I I brought you onto the
10:17podcast partly to talk about functional
10:19program can you explain your comment
10:21yeah so the big meme that I've been
10:23doing lately on on Twitter to people
10:26because I've started really liking oh
10:28camel and people often ask why why oh
10:30camel over something like Haskell for
10:33those who aren't aware they're both
10:34similar in a lot of both like deep and
10:38superficial ways they're very similar
10:40but the joke often times that I like to
10:42do that someone told me on Twitter was
10:44like shipping to production for ocam
10:46will mean people are using your code and
10:48shipping to production for Haskell means
10:50you publish an academic paper and
10:52there's like a good nature joke that a
10:54lot of times Haskell's very focused on
10:56being an academic language which is like
10:58very useful in people I think
11:00underestimate how many
11:02things and features and language ideas
11:06were inspired by Haskell so those are
11:08like huge wins to the programming
11:09Community as a whole not just people
11:12writing Haskell like people get inspired
11:14and they say oh that thing in Haskell is
11:16really cool I want that in my language
11:17too or I want we need to figure out how
11:19we can take this idea and do it but but
11:22so regardless there's like this feeling
11:23oftentimes that hassles a very academic
11:26language as opposed to oh camel feels
11:28very much an industrial version of
11:30Haskell so just as a very simple example
11:33is Haskell is a pure language which
11:36means you have to declare when something
11:37has a side effect pretty much like side
11:39effects being oh you print a standard
11:41out or write to a file or things like
11:42that I'm not a Haskell expert so I'm
11:44sure there's some language extension
11:46that changes that or whatever I don't
11:47know but in okay well you it's not a
11:50like a hundred percent pure language as
11:53in you can just write to standard out
11:55anytime you want so those kinds of
11:57things that are like they're trade-offs
12:00right in that you can have a skate patch
12:02is which I personally like because
12:04sometimes you just wanna
12:05get something done and move to the next
12:08phase especially if you're exploring or
12:10you're going to delete this later or you
12:12just want to like debug something
12:15you might want those sort of Escape
12:17hatches or imperative things or writing
12:19something of mutability but those are
12:21often
12:22they're not the default path when you're
12:24in Oak Animal so it still feels
12:26different than you can write pure code
12:28in C
12:29right or something like it would be what
12:30someone you know could say or whatever
12:32but C doesn't lend itself it doesn't
12:35make those things the easy and default
12:37thing where it's like for okay well it
12:39still feels like the default thing is to
12:40write pure functions and to use
12:43immutability and stuff so there's that's
12:44like kind of an example of a difference
12:46between Haskell and O camel that I I
12:48tend to prefer
12:50for a lot of projects the like oh camel
12:53side
12:54yeah that sounds super interesting to me
12:56I learned a lot about functional
12:57programming in school and over time
13:00working on the back end primarily with
13:01data like you could almost most of my
13:03career is actually mostly as a data
13:05engineer I'm taking data from some place
13:07I'm doing some sort of transformation on
13:09it and putting it somewhere else that
13:11sounds like a function yeah it sounds
13:13exactly like a function right for those
13:14who are listening and are not familiar
13:15with this kind of Purity thing that we
13:17were talking about I'm going to do my
13:18best to Define it correct me if I'm
13:20wrong so a pure function is a function
13:23that has some set number of inputs and
13:25produces some output and it does that
13:27deterministically every time and it
13:28doesn't affect like other parts of the
13:30program it doesn't pull in variables
13:32from like Global State make changes to
13:35them like all the changes that it
13:36produces are effectively returned as the
13:40functions results
13:42yeah I I don't I wouldn't say
13:44deterministically because like
13:46all like side effects are also
13:48deterministic but because the lighting
13:50is standard out is deterministic in the
13:52same way I I but so you could say that
13:55it doesn't change any state would be
13:58fine or that all given the same set of
14:00inputs it will always return the same
14:02set of outputs it's like a pretty easy
14:04way to think about purity
14:06so like determinism is a requirement but
14:09it like impure things can be
14:11deterministic too yes like print it's
14:15like pretty sure it's possible that your
14:18system runs out of memory and like in
14:20the state but like less of those kinds
14:22of things which also like technically
14:24can happen in a pure program as well
14:27right if in the middle of it you have to
14:29allocate on the Heap but you out of
14:31memory okay sure but those are not when
14:34we're talking about it we're not really
14:36talking about that kind of thing
14:38so the nice thing about pure functions
14:40is like for one they're really easy to
14:42debug right like you can write a little
14:44unit test for your pure function you
14:46don't have to like dependency inject and
14:47all this crazy stuff to get it working
14:49it's like really simple in immutability
14:51actually dependency instructions easier
14:53for Pure functions because if what you
14:56have is you want to write something to
14:57the database then you take like the
15:00store as one of the arguments and then
15:02so there's no implicit like Global
15:05database that you're connecting to you
15:07know that you're going to write to the
15:09database because the database has to get
15:10passed in as an argument so not only is
15:12it like so it's possible to write to it
15:15in a functional style but those things
15:17like get passed in so you can actually
15:19do like dependency injection a lot
15:21easier if you're into that kind of thing
15:25cool and then the other big one on my
15:27mind at least when I think about
15:28functional programming is like this idea
15:29of immutability right like we're
15:31creating constant variables we're
15:33creating constants and then we're not
15:35changing them later which again can be
15:37really nice because you don't have to
15:38worry about things like different
15:39threads updating the same variable at
15:41the same time overwriting memory but my
15:43perception from afar has always been
15:45like okay
15:46we have these like core tenants of
15:48functional programming and my perception
15:49has always been I'm going to like do as
15:51much of that stuff as I reasonably can
15:52in the language I'm working in which
15:54usually happens to be go and that tends
15:58to produce better code but yeah I've
16:00played mostly with Haskell it just gets
16:03in the it doesn't let me print easily
16:05like like Discord stuff so so if I'm
16:07understanding correctly oh camel gives
16:10you or makes it the default to do the
16:13pure stuff but the Escape patch is
16:15easier to access is that yeah and I
16:18think so like for example in ocam well
16:20you can make structs and they're by
16:22default like destruct itself and all of
16:25its fields are immutable you can't
16:28possibly change them but it you can Mark
16:31certain fields for example as mutable
16:33Fields so this is really nice for
16:35example if you have a struct like a user
16:37struct and you want to update the phone
16:40number so you probably would just create
16:42a new user but like like regardless
16:44right so like the user ID you can Mark
16:46is not mutable there's no way to
16:49possibly change that user ID right but
16:52you can Mark phone number as like a
16:54mutable field and you can update the
16:55phone number and that's perfectly like
16:58acceptable so that's like an example of
17:00Escape an escape hatch right where you
17:02can say like in general by default when
17:04I just write a struct every single field
17:06is immutable you can't say that and go
17:08right if you want the field to be
17:10accessible outside of your current
17:11package then it's public right okay and
17:15then it's not super clear sometimes when
17:18you're passing something around and go
17:19if you've passed it by reference or by
17:21value right so then all of a sudden you
17:22thought you updated something and some
17:24like receiver oh but I forgot to change
17:27the receiver to take it by reference so
17:29now I updated it in here and it didn't
17:30actually change anything and then oh
17:32like and then right now you're like
17:33trying to figure out why your updates
17:35aren't syncing between your go like
17:37structs and then you're sad right but
17:39like you know camel you can't have that
17:41problem like you just either return a
17:43new one which is good or you can Mark
17:45certain Fields as mutable and then you
17:46can change those that's a really
17:48powerful construct at the language level
17:50and like by default and the other cool
17:52thing is you can look at the type and
17:53you can just tell what things can change
17:55you don't have to go see what functions
17:57are available to you just go look at the
17:59structure and say oh well phone number's
18:01mutable but the other ones aren't cool
18:02now I know or none of them are mutable
18:04like sweet none of them are none of them
18:05can change out from under me as soon as
18:07I know one then I or as soon as I know
18:09this value it can't change which is
18:11really like very helpful the thing that
18:13I like a lot about
18:15these Concepts is it makes it much
18:16simpler to reason about as well so like
18:20when you're dealing with you if you have
18:21like
18:22a like a list or a slice that gets
18:26passed in go right you don't know if the
18:28caller is going to change your list that
18:30kind of sucks you have to go read all
18:33the code you know what I mean I just got
18:35finished writing like an exercise in our
18:37learn go course that's like okay here's
18:39this append function you need to use it
18:41in this way all the time because if you
18:43use it this other way like bad things
18:45are going to happen so just never do it
18:46but like the language doesn't enforce
18:48that right you could you can do it the
18:50dumb way and there's no way like the
18:52type level to tell yourself whether
18:54that's going to happen or not so like in
18:57Rust it's pretty nice that you can know
18:59whether something that's getting past
19:00the function can be mutated or not do
19:03you pass a mutable reference to it or do
19:05you not pass a mutual reference or do
19:06you pass it completely and by value
19:08those are all like must do type level
19:11things not convention not read the
19:15function name and hope that it's not
19:16lying to you the compiler tells you for
19:19sure
19:20whether those things are right or wrong
19:22now that adds some overhead that's more
19:24learning there's some other there's some
19:25other trade-offs that exist between that
19:28strategy and like in go I recognize that
19:30but it's so much easier to reason about
19:32when you know for sure and you look at a
19:35struct oh I can't change these fields
19:38that's really good feeling or you can't
19:40change this list that I passed in it
19:42can't be changed and compilers also like
19:44that knowledge too
19:46yeah can make it more efficient I so I
19:48feel like there's this gradient out in
19:50the programming language World okay you
19:52have like really strict languages that
19:54like don't allow you to do frankly dumb
19:56things and you have languages like
19:58JavaScript that just allow you to do any
19:59old thing yeah and so as a go developer
20:01I get to dunk on JavaScript a lot but
20:03now like I invite you on the podcast and
20:04I get to get dunked on okay and all the
20:07Haskell people are just like oh my
20:09goodness side effects don't you just
20:10want your computer to be a big black box
20:12that heats up why would it need to
20:14change anything in the world that's so
20:16we're all getting dunked on in a big
20:17circle and then the JavaScript guys are
20:19getting they're dunking on the PHP guys
20:21but then they're all laughing at us
20:23because they're driving Lambos
20:24exactly because it turns out we can make
20:27money writing terrible programming
20:29languages yes yeah it's true it turns
20:31out people don't really care they want
20:33the their problem solved
20:36yeah yeah exactly okay I think like when
20:41I was in college it was explained to me
20:43by a professor like I write C plus plus
20:45because it gives me so much power I can
20:48do anything and so when I was in school
20:50I thought oh okay the best developers
20:53use tools that just allow any old thing
20:55because they're so good that they can
20:57write safe fast performance clever code
21:01like my thinking on this has completely
21:03flipped it's no in in production I want
21:06tooling that actually restricts me as
21:09much as possible from doing really dumb
21:11stuff the example I use in go is like
21:13error handling so one of my pet peeves
21:15when I'm working on JavaScript code is I
21:18don't know if this function throws or
21:19not like how do I know from the function
21:21signature if I need to wrap this in a
21:22try catch if this is a safe function to
21:24call whereas in go even though it's not
21:26like I actually do really like the way
21:27rust handles errors at least go makes me
21:30think about every single error and it's
21:32verbose and it's annoying but like I
21:34know that I've handled all of my errors
21:36whereas in in JavaScript that's not the
21:39case how does this work in oh camel land
21:42do you get that same feeling of when my
21:44code compiles I'm reasonably sure that I
21:47know where the faulty stuff is
21:50yeah so there's in you know camel it has
21:53exceptions but most people write code
21:55that doesn't use exceptions so like in
21:57general okay mole uses actually I should
22:01say rust uses the style that ocamel has
22:04because rust was first you know okay so
22:06so there's a lot of inspiration in the
22:09rust World from oh camel like in general
22:11you would write code that returns
22:13results or options in ocamel which
22:16pretty much just means that instead of
22:18returning a value you return something
22:20that holds a value or an error and then
22:23to continue operating like on stuff you
22:26need to handle both cases so you would
22:29you could use a match statement and you
22:31can use pattern matching and all that
22:32good stuff you know camel very similar
22:34if you've seen it in rust or
22:37some other languages as well that you
22:39can do that so in general most people
22:41don't write code in ocamel that uses
22:45exceptions because it's not very like
22:48functional style but it is nice that for
22:51things that basically once again this is
22:53like an escape hatch thing it's nice for
22:55something that like is very exceptional
22:58that could happen where you could just
23:00raise an exception and basically crash
23:02out of that thing or out of that thread
23:04or whatever it's going to be and then
23:06that's okay and you don't have to manage
23:09all the additional like results and
23:11options in all the other places where
23:12it's oh I see that we're not going to
23:14have enough memory or timed out in this
23:16really weird way or something we'll
23:17raise an exception because it's actually
23:19exceptional not just like it failed
23:22right because it's pretty dumb when you
23:24know that a function can fail pretty
23:26often for example like reading a user
23:28from a database when you're given an ID
23:30yeah it could be nothing
23:34right like yeah
23:37that's not an exception you know what I
23:39mean that's just yeah there's two
23:41possibilities and it's pretty likely if
23:43you just send me a random ID that we're
23:45not going to have this ID so then in
23:46that case you would return an option
23:48right and so then there might be some
23:50user or none and then okay we'll force
23:53you to handle that case like both cases
23:55yeah yeah
23:57that makes sense
23:58when would you not is there a case where
24:01you would not use ocamel I know you're
24:03really liking it right now like what are
24:05the trade-offs in the real world where
24:06do I write oh camel code
24:09yeah I'm still like exploring that
24:10myself to figure out where I think like
24:12the best places to use okmulr it's quite
24:15interesting because there's a lot of
24:16projects in the O camel space right now
24:19that let you do really cool stuff so one
24:21that I was just playing with last week's
24:23called melanch which is like the spice
24:26from Dune but it's also mixture in
24:27French so the build tool for ocam was
24:30called Dune so if you see like random
24:32Dune references that's why I mean it's I
24:35think it's called Dune because oh camels
24:37like camels right so they're walking in
24:39like in Dunes but regardless but people
24:42are like I really like the book uh which
24:44I do too this great book or series stuff
24:46and I've already read the first one
24:47sorry I know I'm gonna get yelled at now
24:49so it's a series there's more than one
24:51you're just a filthy casual I'm aware
24:52okay everyone go DM DJ yeah exactly DM's
24:56open go complain about it I also liked
24:59the movie so there you go
25:01I'm a filthy Normie I get it but foreign
25:05but there's this project called melange
25:07which lets you write o camel code and it
25:09gets compiled to JavaScript so you can
25:10like literally just write o camel and
25:13then you could put that into a
25:15JavaScript project like it'll just it'll
25:17go there there's also other projects
25:19like I think they're called reason ML
25:21and rescript which let you like write o
25:24camel syntax and then it gets compiled
25:26to JavaScript as well
25:29um so there's like some interesting
25:30stuff going on where people are writing
25:32ocamel or okay we'll ask code for even
25:35front-end stuff that I think is like
25:38going to be really interesting to see
25:40where some of that goes in the next few
25:42years because
25:43I like the type system for okmul I don't
25:46like the type system for typescript like
25:48I think typescripts typescript or like
25:49type system is like really weird and you
25:52can lie a lot and you can cheat and
25:54people write code that relies on
25:56exceptions or relies on other things and
25:58so then you don't know I'm not a huge
26:01like fan of it I feel often I don't know
26:03if things are going to work or not
26:04whereas when I yeah no Gamel and it
26:06compiles I think oh I'm pretty sure it's
26:08gonna work my feeling about typescript
26:10is like I like it better than JavaScript
26:12but I really hope it's not the future
26:14yeah yeah it is it has inherently
26:16bundled all the garbage that I hate
26:19about JavaScript into the language like
26:20by nature of being a person yeah the
26:22trade-off was that they wanted it to be
26:24JavaScript right which is like a pretty
26:26good idea like from their perspective
26:28even if I don't enjoy writing it all the
26:31time
26:31but yeah so there's some stuff that's
26:33pretty interesting in that space like
26:34for o camel where you could write
26:36basically like full stack o camel and
26:38your front end is also okay I'm all in
26:40your sharing type system and types and
26:42all this other stuff that's a really
26:43cool camels everywhere yeah can't just
26:47camels on camels camels all the way down
26:49but that Stack's gonna be a lot slower
26:51to develop in today just because of the
26:54inertia and the tooling and a bunch of
26:57other stuff in like the JavaScript space
26:59like you can just log on to nextjs and
27:01just have a website up in five seconds
27:03and install 30 npm packages that do all
27:07these random things for you and then
27:08sure that's maybe not the your end
27:11product but maybe that gets you your
27:13first thousand customers and I'm like
27:15still over here how would I use a
27:17database most effectively no cable so I
27:18think there's some trade-offs there but
27:20in terms of things that people do use
27:23ocamel for a lot is really good for
27:25writing
27:26other languages which is funny so
27:28there's a lot of languages that at least
27:30had their first implementation in O
27:32camel it's really good at writing
27:34parsers and other tooling that like
27:36needs to handle a lot of cases but also
27:38maybe plugins yeah what so neovim
27:42plugins right yeah there is a way to
27:44write neovin plugins with it and I might
27:45explore some more of that later too but
27:47so basically there's it's a general
27:49purpose programming language so anything
27:51that you could write like a back end for
27:53you could do that and there are people
27:54who are writing whole companies like in
27:57ocamel there's also Lots some really
27:59like very popular projects like semcraft
28:01if you've ever heard of semcraft which
28:04is like basically a way that you can
28:06search for vulnerabilities in code oh um
28:09like yeah plus grip okay I think it's
28:12semantic prescript but yeah oh okay I
28:15guess that I don't remember offhand so
28:16don't quote me on that there's other
28:18tools like Combi is a really cool tool
28:21that lets you do syntactic grep so it's
28:24like a way that and like search and
28:25replace so really powerful tool for
28:28doing that that's written in okay well
28:29so there's lots of things there's like a
28:31huge range of what you could write it in
28:33I'm not 100 necessarily sold on you
28:36should put your whole company on this
28:38unless you know you're not gonna do it
28:41or be motivated to do it because you're
28:43frustrated by
28:44problems and other things so I like I'm
28:47not super interested in launching a
28:49product in like typescript JavaScript
28:51land because like I don't have any fun
28:53with it so I know I'm just gonna stop
28:55which maybe that's dumb like maybe I'm
28:57leaving money on the table for myself
28:59certainly because like I'd certainly
29:01could launch something but I'm not going
29:03to finish it because I have other things
29:05in my life that I enjoy more like yeah
29:08honestly in my experience it like it
29:10takes a long time to get any products
29:12like up and running and working and make
29:14making revenue and if you're not having
29:16fun like that is actually a pretty huge
29:18failure case people don't really like
29:21often want to Grapple I think with The
29:24Human Side of these problems in the fact
29:26that like you said if it's going to be a
29:28year and a half of you hacking by
29:30yourself at nights or on the weekend
29:31occasionally or when you've got a spare
29:33hour uh if you're not having fun you're
29:36not gonna last a year and a half it's
29:38just not really realistic so I'm not
29:41sure I'm still exploring it I like
29:43Pokemon is definitely like a general
29:45purpose language you can write people
29:47have written a huge range of things for
29:49it people even you can even write
29:50Hardware in ocamel like it has a way
29:53that you can output vhdl or verilog so
29:55like you can go all the way from writing
29:57custom stuff for your fpga to like a
29:59react front end you can do all of that
30:00and okay I'm all okay that's pretty cool
30:03all right so now we're getting to the
30:04part in this podcast where my secret
30:07motivations are revealed and I actually
30:09brought you on so I get some free
30:10Consulting in regards to ocamel okay so
30:14I'm a huge fan of the let me back up
30:16boot Dev is a place to learn back in
30:17development and our approach is you have
30:19to actually work hard and this is going
30:21to take a while as opposed to this is an
30:22eight week thing and you're gonna be
30:24making 100K next year I'm really
30:26interested in it isn't everybody I
30:27thought it was in a whole year don't you
30:29mean six months you know you guys are
30:30getting paid yeah right exactly
30:33yeah so like this is gonna take a while
30:35though since we talked about open source
30:36yes okay I'm sorry to hit you where it
30:39hurts yeah
30:41so this is gonna take a while and I'm
30:42interested in like actually producing
30:44really good developers like at the end
30:46of this learning path and so while I
30:48fully recognize that you don't need to
30:50be an expert functional programmer to
30:52get a job as a back-end developer it'll
30:54actually be a lot easier if you do
30:55understand this stuff and I think you'll
30:57stand out a lot
30:58um I want to redo my functional
31:00programming course and you just
31:02mentioned like the most interesting
31:04thing to me which is that there's this
31:06thing called melange and I can compile o
31:08camel to JavaScript so the way boot Dev
31:10works is like all these languages that
31:12you write on the platform it's an
31:13interactive coding thing I run them on
31:15the front end so I either compile them
31:16to webassembly or JavaScript depending
31:19on the language is ocamela good choice
31:21for my functional programming course I
31:23think it's pretty nice the one thing
31:24that's cool about it is like because it
31:26has a mix of like pure functional
31:29aspects as well as like you can write
31:31imperative code it can be nice to write
31:33I think like a side by side because you
31:36could like literally write it in the way
31:38where you use a for Loop and then you're
31:39like that's how you would do it in a for
31:40Loop how would we do it with a recursive
31:42function and pass yeah okay like how
31:45would we do those two things like how do
31:46we make list.map right let's write it
31:49the first one is you make a list and
31:52then you keep appending to the list as
31:54you're iterating through and you're
31:56calling F on each function and then
31:58you're return the list like that's cool
31:59okay now do it recursively where you
32:02match against the head of the list and
32:03you call F and then you and then you
32:05like talk about tail recursion and how
32:07the compiler knows how to turn these
32:09into the same thing but now you're it's
32:11like that's the functional style right
32:12you can you can play with that last time
32:15I checked I I think yeah like you can
32:17actually go on okmul.org play right now
32:20and you can run o camel code
32:25I don't know exactly how they're doing
32:27that but like they they have it you can
32:29write it you can can be done can be done
32:32is being done currently
32:34yeah so that's really cool I think so I
32:36think that lends itself well to that
32:38style of you want to learn it but and
32:40you're familiar with more like
32:42imperative traditional backend languages
32:45you want to compare them you can
32:47actually just write both versions in
32:48ocamel and then you can also start to in
32:51my mind
32:52see the Elegance of the functional style
32:54right where you like are just
32:57constructing these things with
32:58immutability and you're just passing
33:00around functions and all your inputs and
33:02outputs and you create these structs and
33:04Okemo also has some really powerful
33:06things with modules that are really like
33:08elegant I think and very cool it's one
33:10of its like primary features so yeah so
33:13I think like all that stuff is very cool
33:15and could be done like quite iterative
33:18iteratively in the browser yeah I love
33:21it okay one last question is ocamel as
33:24an ecosystem like growing does it have
33:27a bright future yeah so I think so I'm
33:31still new in it so like for me I find
33:33out new things all the time but there's
33:35some really big companies that use
33:36ocamel meta uses okamo for a ton of
33:39stuff and like for things that they're
33:41not gonna drop anytime soon would be my
33:43guess like a lot of their like python
33:45tooling not matter ideas higher that's
33:48going to be shut down next month is it
33:50no Google stadia okay yeah but the meta
33:54they've got pyre I think is theirs and
33:56that's a lot of it's written in ocamel
33:57or they've got like hacks which is their
34:00like language that compiles to a bunch
34:01of other languages or something like
34:03that that's also written in no camel so
34:05okay there's at least one huge company
34:06yeah it's been like many millions and
34:09millions of developer out like dollars
34:12on that there's also like Jane Street
34:14which is a really like large Financial
34:17firm that does all of their stuff in Oak
34:19Animal and they help push the language
34:20forward okay well just released okay
34:22well 5.0 which has this really powerful
34:25idea of effects which they're called
34:28algebraic effects I think is the right
34:30way to talk about it but it's like a
34:32generic way this is going to be super
34:34simplified like a generic way of
34:37building into the language the kind of
34:39thing that you would do to write async
34:41await or try catch or so it's like a
34:45larger more generic version
34:47of those things and now that's built
34:50into the language so you can write your
34:51own effects which is really cool and you
34:53can like resume yourself so it allows
34:55for really powerful code and it's super
34:57high performance like multi-core stuff
34:58and because the type system it's really
35:00powerful and has all this immutability
35:02and things like that you can prevent a
35:04lot of data races or not have to do as
35:06many so that like just happened not that
35:08long ago so that's a really big thing
35:10and it's been in the works for a while
35:11I've also seen some really
35:14interesting stuff that's just like in
35:16the works so like people are developing
35:17new features still for the language like
35:19these concepts of linear types or like
35:22Global and local types which is it'll
35:24look very similar to some of the things
35:26that you see in Rust where you assign
35:28ownership to something okay would let
35:31you basically so okay most garbage
35:33collected we didn't mention that but so
35:35you don't have to manage your memory but
35:37sometimes you would like to tell the
35:38garbage collector like reuse this memory
35:41for this thing right I'm going to call
35:43list.map but instead of creating a new
35:46list like just literally override the
35:48old list because I'm going to consume
35:49that previous list and it's no longer
35:52going to be there so don't allocate
35:53another list of memory just like reuse
35:55it but you could do that with the type
35:56system and it doesn't the garbage
35:58collector eventually like the allocator
36:00eventually can become sophisticated
36:02enough to handle those things that was
36:05something that I just saw recently that
36:06has me pretty excited for writing like
36:09really performant o camel for the parts
36:11that you need to that's one of the
36:12things that's difficult like about rust
36:14and sometimes it feels like man
36:16I don't really want to have to think
36:18about memory for this huge chunk of the
36:19program like this huge chunk of the
36:21program it just doesn't matter just act
36:23like a garbage collector please just
36:25like copy it it doesn't it just is fine
36:27it's not the like critical path or like
36:30I'll come back to it after we actually
36:33figure everything out like I don't even
36:35know if I have the right structure yet
36:37and I have to go add lifetimes
36:38everywhere and you're like oh my
36:39goodness I have to go do this and so
36:41then that's like annoying whereas it
36:43would be like nice and you'd be I feel
36:44like be able to move more quickly for
36:46some of these things if you could just
36:48have effectively like I think there's a
36:50huge space open for rust with garbage
36:52collection as like a language which in
36:55some ways is like what okay more has
36:57although okay more has like a lot of
36:58historical things blah blah so maybe
37:00it's not that language that's fine I
37:02like it but so all that to being said
37:04like I think there's a lot of
37:05interesting stuff going on in the O
37:06camel world with like real companies
37:09using no cable and there's like also
37:12some companies that you'll run into like
37:13ahrefs or a few other ones that I've
37:15seen um that are like Full O camel
37:18Stacks where they're shipping I was
37:19listening to a podcast from their owner
37:21talking about a camel like now that I
37:22remember yeah yeah yeah so there's a lot
37:25of people interested in the space I
37:28don't know like I said I don't know
37:29what's gonna happen with okay I don't
37:31know what I'll do with o camel in six
37:33months or a year I'm just finding a lot
37:35of the concepts like very helpful and
37:37interesting and I've learned a lot of
37:39new ways of thinking about programming
37:42by learning okay well so that makes it
37:44fun enough for me to keep on doing it
37:47amazing I'm gonna be spending the next
37:49couple months at least looking at
37:51looking at Oak Animal a lot more
37:53seriously than I was nice so that's
37:54pretty cool
37:55tell everyone where they can find you
37:57you're a streamer we haven't even talked
37:59about it you're a YouTuber you do code
38:00in front of people plug your stuff yeah
38:03I'm uh thdv so t-e-e-j underscore DV
38:07unlike all the major social media places
38:10only social media place I'm not that is
38:12on GitHub or mtj DeVries because GitHub
38:15is social media and yeah so you can find
38:18me there I live stream a lot on Twitch
38:20we do coding stuff on Twitch all the
38:23time I'm usually like building something
38:25we don't do a lot of not building stuff
38:27on Twitch which is pretty fun and yeah I
38:29also publish YouTube videos mostly about
38:32neovm maybe some stuff about okmul
38:35coming up we'll see but I just publish
38:37whatever I feel like on YouTube that's
38:39the best way to do it yeah go check out
38:41TJ's uh YouTube Twitter check out oh
38:44camel and neovim thanks so much for
38:46coming on the show man yeah my pleasure
38:48thanks for having me