Erlang: "Hey Gleam, what is best in life?" Gleam: "To crush the OOP enemies, see their architectures crumble before you, and to hear the lamentations of their developers!" Erlang: "Very good!"
Thanks for the shoutout 💖 We also love being able to build open source command line tooling full time. We're stoked to see more people giving terminals some love :)
one of the things I like most about Prime's videos is that he doesn't fall into the trap of "everything new/stuff I don't know about is all garbage." There are so many people who constantly talk about how bad everything is, whereas Prime genuinely makes me feel hyped to code.
@@ahmedifhaam7266 it seems he's started getting over it, but I've been watching him less so I wouldn't know for sure. The rust trademark thing was only subject to scrutiny because rust is such a darling open source project. The Rust Foundation is not at all some uniquely corporate entity in the programming language ecosystem. The 'scandal' was that an unfinished piece of legal jargon was a little restrictive with the use of a trade mark, not too dissimilar to how all other trademarks already work even in programming languages. People (like Prime) blew a fuss about it because they wanted to have a reason to feel or be justified in feeling skeptical or different in their view of rust in general.
Gleam is so cool: - simple (small surface area like go) - benefits of beam (scalability, soft real time, leverage elixir/erlang) - rust paradigms (result/option, pattern matching)
@@sfulibarriI say "rust" because that is the predominant target audience of this channel, I am aware that other languages have those monads and pattern matching
No, people who educate actually want education to be free, but they still want to be rewarded. It should be free in the sense that someone else pays for it. Not in the sense that educators work for free.
Maybe he was just confused, but I feel he never learned proper FP, which makes thing confusing whenever he's referring to FP concepts being used in multi-paradigm languages.
It confused me a lot, he was basically just talking about using a higher order function. What is currying actually, to be specific? I feel like I don't even know what it means
@@NostraDavid2 As ignorant as I am, I think the purpose of currying is pretty similar to closures: access values initialised somewhere else. That’s what Prime meant in the example he was making about avoiding to add obscure properties to a function. What he shows actually IS currying.
Gleam is a genuinely beautifully designed language. If they can get a "killer" app like Phoenix working, then I would likely choose it over many other languages.
Lustre with server component might be the killer app because its bassically Liveview but you can do stuff client side simmilar to react server component where you render the component with the the data it needs on the server then throw it at the client then it can be hydrated on the client
Really excited about Gleam, but what you need to understand is that Erlang is OTP: A completely unique way of writing systems. Gleam is exciting for BEAM, but it has wrappers for very little of OTP so far.
Lack of tooling is why Crystal hasn't caught on imo. I want to use it but a lot of very basic QoL stuff is missing and doesn't even seem to be on the roadmap.
no, crystal hasn't caught on bc there really isn't that many people wanting to use ruby let alone a language that's very close to ruby syntax wise but that's compiled it's just a niche language for a niche audience
@@FlanPoirot it hasn't caught on amongst people who absolutely do want that, is what I mean. I felt that went without saying, but there is always someone who needs it spelled out.
I think I might like this. So far I prefer simplicity over anything else (I have a strong grug mindset), and the guy who made the language seems to get it
@@azizsafudin nice! It looks like scalas "use" works like pythons "with" and JavaScripts "using". Where as Gleams "use" works like Kokas "with", enabling many dynamic patterns by letting the user function control when (0-*) to call the rest of the code in the current scope.
@@quachhengtony7651 Speed is not really the impressive part of BEAM, and the JIT is actually slightly slower than both CLR and JVM, but where it beats them is introspection capabilities, insane IPC (meaning you can run it on multiple nodes and have them share scheduler) and the scheduler being second to none when it comes to resilience in concurrent systems at scale.
4:18 That doesn't look like the assignment variable but the stream operator in C++. Notice how it can be reversed to stream out the response or an error.
The caveat is that you then have to use the `new` keyword to access the non-static methods. I created a WooCommerce API client that had an interface like this: interface Products extends Methods { (id: number): { Variations: Variations } Attributes: ProductAttributes } interface ProductAttributes extends Methods { (id: number): { Terms: Terms } } /* Terms & Variations look much like the above */ interface Methods { retrieve: (id: I) => Promise /* other methods */ delete: (id: I) => Promise } This would mean that I can make a DELETE request to the `/products/1` endpoint like this: `await Products.delete(1)` make a GET request to `/products/2/variations/3` with `await Products(2).Variations.retrieve(3)` and make another GET request to `/products/attributes/4/terms/5` with `await Products.Attributes(4).Terms.retrieve(5)` To use static methods, that last one would look like `await (new Products.Attributes(4)).Terms.retrieve(5)` which just feels weird. (I suppose one could argue that the pattern I created does too, but 🤷)
@@dan-bz7dz they noticed, there’s been a open GitHub issue for this as of 2015. Fixing it is extremely difficult, I’m not even sure the rust team wants to/can fix this issue
11:55 this is exactly the reason why lisp died. ultimate power is not always a good thing. its chaos. order is limiting that chaos into digestable structure.
That is really a great sales pitch. Till now I always thought "ok unfortunately almost no one is using Elixir anymore, will be even worse with Gleam". But after hearing that... ;)
What makes you think noone is using Elixir? As a full-time Elixir dev I'd say it seems to be gaining interest as awareness grows. Also really interested in Gleam, though.
@@pdgiddie well, a couple years ago I saw it mentioned in job ads here and there, articles were floating around etc. But the last years haven't seen anything anymore. Some I know who switched their stuff to Go. The little I played around with it I really liked it though. It was definitely my favorite from the bunch I tried at that time (I wrote some toy things in a handful of languages I didn't know, including Clojure, Julia, Go, F#)
11:36 I think javascript is less hard to read than c++ because there is less syntax (you know `array._isDefault = true` is assignment, now you only need to figure out how assignment to arrays works) and the many ways to solve problem use similar syntax features (I mean things like, addition, subtraction, multiplication, bitwise or, function declaration, class declaration, function literal…) but combine them differently
I love how Prime understands that bringing X new features to a language (such as Rust or TypeScript) becomes a major issue with time. I hope that they manage to keep Gleam as simple as it's today.
I'm not a fun of currying because it adds a significant amount of "distance" from the caller to the "actual logic". A syntax like retry(3, fn) is much better, and if you want multiple functions to retry the same amount of times, just use a variable: retry3 = retry(3) res = retry3(fn) vs let times = 3; res = retry(times, fn)
I frequently attach properties to react components. Objects that have graphql fragments for component props, objects containing 'data-testid's for the jsx elements in the component ...
No. I don't think so. For example, Mojo with theirs SIMD stuff. And functional languages with their monads, parenthesis and exotic patterns. And what about JavaScript?)) Yeah, it was kinda simple but it is not straightforward. Same thing I could say about CMake, VimScript
@@personal-stream-studio Yeah, you're right that they don't end up being simple and straightforward. I guess what I meant was, I don't believe anyone sets out making a new language without that being the intention. The only reason I see to make a new language is that someone thinks they can do something more simple or straightforward than one of the other 100 billion languages.
@@TminusDoomLook at go. still at 25 keywords, everything slightly complicated is in the stdlib, and some edge cases are made by the go team but not even in the stdlib (like the text or cases package) writing Go feels like i'm forced to do it the idiomatic way by how constrained it is, and that's good. it's been more than a decade and the language is about as simple as when it came out, with exception of generics maybe. compare that to Rust, which has an insane amount of features every update. I doubt their original idea was to be like Go simplicity wise. stuff like java which has about 10 ways of making an array and 5 ways of concatenating two strings together, if they had the Go philosophy like gleam also has, you wouldn't have those things. there is a method for literally anything you can think about on every type. gleam aims to be like Go, and if they do it like Go did in the last decade, I believe they can achieve their goal. for example, gleam doesn't even have a for loop, looping is strictly done with recursion.
15:45 "Do you really want attaching properties to functions" It's not "attaching" properties to "functions", it's "functions are objects" and "objects can have properties", same with arrays or anything else that's considered an object in JavaScript. And I think this is a kind of consistency that makes sense and is desirable. Because you don't need to learn a bunch of rules or bunch of rule exceptions, you learn "things are objects, and objects have properties" and you're done. Then you might counter but in JavaScript setting properties on an array-object sort of throws off the iteration, and I reply: that's because JavaScript is cursed in many ways with many (useless) exceptions due to its sloppy inception, hence proving my point about consistency and learning exceptions. Spoons can be used to eat soup, ice cream, but also to catapult things across a room. Sharpen one end, and it's a shiv, sharpen the other and it's an eye destroying torture device. Just because the last uses are possible we're not banning spoons, we're persecuting _people misusing spoons in that way_.
My biggest concerns for Gleam vs Elixir so far is a good REPL and some macro feature. Runtime debugging is a strong feature for Elixir. It also compiles straight to BEAM bytecode. Gleam has some way to go to catch up with all that excellent tooling. But I _do_ like the Gleam foundation more than Elixir, especially the lack of `nil`. (I'm a full-time Elixir dev.)
One thing I like about Go is that it embeds the runtime rather than requiring it to be installed on the host machine. I wonder why this couldn't be a goal for Gleam?
Could someone tell me what's so good about gopls? Prime is always saying it's good but not why he likes it specifically. I haven't used go much but from what I've seen, rust-analyzer seems much more capable. Also, gleam looks pretty cool!
Am i missing something obvious here, or is the language missing almost everything that makes Erlang/Elixir interesting? It looks very basic. I remember looking at it about 5 years, when it was kinda interesting, then it seemed to die. Then it's reappeared sans any mention of the core OTP features that make Erlang/Elixir useful. Is that a deliberate decision so as to not scare off newcomers? Because if so that seems like it'll mean creating actually useful libraries is goig to involve using features most people won't then be aware of (and therefore isn't going to happen). Or is it that the compile-to-{JS|WASM} bit is the more important part (in which case it's a semi-functional coffeescript/reason/etc)?
It appears that the hype is centred around the so called “rust community”, who are cheering this on, because it’s written in rust, and uses some rust syntax. Proof of this will be when the all-inclusive RESF dive in and post defensive remarks for daring to question their cult. No otp support built in .. for a beam language, that’s pretty useless indeed.
I played around with gleam a bunch, it's quite good. It's still missing a few things that stop me from moving from elixir to it. I would love to see OTP as a part of the core language given that it's a part of the core in the erlang virtual machine, I also think the import system is slightly clunky, I wish they had some kind of import that wasn't just aliasing. That being said, it has all the great features of elixir and erlang with static analysis. I am curious to see what the elixir type system will look like when they eventually release that, but gleam does fill a niche in the beam languages. I would also be curious to see how gleam handles native interface functions and interop in general.
As a Go enjoyer Gleam seems pretty interesting. At some point I'd want to learn a simple functional langusge that fills the needs Go does not really cover e.g. UI stuff.
Don’t think it’s going to help in your case. Go is great for building small and efficient binaries for multiple platforms This one is specifically for building apps that run on the BEAM. Very different kettle of fish
"strong desire to have only one way of doing things" - easy brag when you're at the v1 stage in the timeline :D. let's see how well that goes when you're at v5 :)
Seems cool but I'm not seeing any single feature that makes it worthwhile to stray from Elixir, other than maybe types, which are coming to Elixir too. The latter has a vibrant and welcoming community, all the advantages of the BEAM, more than a decade of improvements and fixes, a clean syntax, and the most loved libraries and frameworks around... IDK, I'm happy for all Gleamlins, but it's just not compelling enough for me.
I got really excited seeing this but then instantly realized that it will take years for this language to get any level of relevance to the point of doing it full time, if it even survives. Even though it's a good language, it's incredibly hard to replace existing tools, ex. even ones as bad as Python.
My favorite piece of javascript code to show java developers back in the day was this: function a () { function b () { return a;} return b;} This lets you do a()()()()()()()()()() as many parens as you want.
Gleam has such a small surface area that you have to do pattern matching to do if else logic. There is no if else syntactic construct in the language, just pattern matching. And I like it 😊
not a primary focus **at the moment**. they've made it clear that they will only work on those things after the language itself is further along, anyone that has hung around enough on the zig discourse channels knows that zls will eventually die as zig will have it's own autocompletion server in the compiler itself (they won't be using the LSP as their protocol)
@@egorsozonov7425 that's the dumbest shit I've heard interfaces are nice but they're not a complete requirement, Zig is a C replacement which is a language that doesn't have those either, you just get data do soemthing and maybe return data. it's a different style of programming. if you were to give an argument for why zig sucks I'd think it would be more valid if you spoke about comptime's complexity and how it makes making good tooling harder. also there's a lot of inconsistency in the stdlib and the conventions used in the language rn. also the language is not even 1.0, it could completely change under ur feet, so unless you're very much into it and willing to contribute I'd advise u to keep out for now
not currently. its mainly a web app language for now. that is their focus , but plan to add tooling features once they get the web experience where they want it
I read the docs. No executables. There is Gleescript which does "Bundle your Gleam-on-Erlang project into an escript, a single executable file". Gleem for me, is the most uninteresting thing I've seen all week.
Recruiters already rubbing their hands before writing "Mandatory 5 year experience with Gleam programming language"
With 7 years total industry experience :D
@@AlemMemić for junior salary :D
I’m shocked anyones wanting specific Gleam experience at this point
@@stanrock8015yes even if someone want to get gleam devs he would probably get elixir deveolopers its easier
Erlang: "Hey Gleam, what is best in life?"
Gleam: "To crush the OOP enemies, see their architectures crumble before you, and to hear the lamentations of their developers!"
Erlang: "Very good!"
Beautiful
Nice.
C# gang still here…
i also think todays languages need pkg repos and discovery by default alongside the t hings mentioned in 5:55
What's funny is OOP is *supposed* to be an implementation of actor patter with message passing...
Thanks for the shoutout 💖 We also love being able to build open source command line tooling full time. We're stoked to see more people giving terminals some love :)
charm = based
Question. As a new dev,
Why do you guys use GO over Rust.
Erlang mentioned
billons must BEAM
Err i dunno - lang
The hard r too
Lets go
one of the things I like most about Prime's videos is that he doesn't fall into the trap of "everything new/stuff I don't know about is all garbage." There are so many people who constantly talk about how bad everything is, whereas Prime genuinely makes me feel hyped to code.
He based
I just wish he didn't spread misinformation/misconceptions about the rust trademarks in like every single video/stream
@@mikkelens?
@@ahmedifhaam7266 it seems he's started getting over it, but I've been watching him less so I wouldn't know for sure.
The rust trademark thing was only subject to scrutiny because rust is such a darling open source project. The Rust Foundation is not at all some uniquely corporate entity in the programming language ecosystem. The 'scandal' was that an unfinished piece of legal jargon was a little restrictive with the use of a trade mark, not too dissimilar to how all other trademarks already work even in programming languages.
People (like Prime) blew a fuss about it because they wanted to have a reason to feel or be justified in feeling skeptical or different in their view of rust in general.
@@mikkelens ?
Woo! Thanks pal!
Louis! Let's Prime writing Gleam. PLS!
Congrats :)
big it up!
Loved your chat with Richard Feldman a while back, would *love* seeing you have one with prime too :)
@@costinel57 where is this Richard / Louis chat?!
Gleam is super nice. I have one small production program written in gleam and it was such a joy to make it.
link to it please
Gleam is so cool:
- simple (small surface area like go)
- benefits of beam (scalability, soft real time, leverage elixir/erlang)
- rust paradigms (result/option, pattern matching)
Rust has those paradigms, they are not 'rust paradigms'. Not too mention that erlang's pattern matching is more powerful than rust's by a long shot.
It really is everything I want
@@sfulibarriI say "rust" because that is the predominant target audience of this channel, I am aware that other languages have those monads and pattern matching
Why do you like result/option? It is a horrible horrible feature!
@@oleksiistri8429nice ragebait
10 - Louis Pilford is the most benevolent dictator a language could have. Would love to see him on the stream.
yes!
Btw Gleam compiler is written in Rust
yes, good choice. Building a compiler with the language you're writing is not impossible but sounds like a bad idea.
@@nyahhbinghi it's called bootstrapping
@@oxidant5 yes you can do it, I understand, but I think it's a good choice not to :)
@@nyahhbinghi why you think so?
Probably they will change in the future or simply let it be; if it works, it works.
We got a Gleam mention!
No, people who educate actually want education to be free, but they still want to be rewarded. It should be free in the sense that someone else pays for it. Not in the sense that educators work for free.
BEAM based functional language with C style syntax and statically typed. Can't ask more than that
I see a lot of ppl complaining about _another_ lang but if im being honest this actually seems like a pretty useful language
When Prime said "use Currying" he meant "use a Closure". I was so freaking confused. Prime should learn some proper FP.
Maybe he was just confused, but I feel he never learned proper FP, which makes thing confusing whenever he's referring to FP concepts being used in multi-paradigm languages.
It confused me a lot, he was basically just talking about using a higher order function. What is currying actually, to be specific? I feel like I don't even know what it means
@@NostraDavid2 As ignorant as I am, I think the purpose of currying is pretty similar to closures: access values initialised somewhere else.
That’s what Prime meant in the example he was making about avoiding to add obscure properties to a function.
What he shows actually IS currying.
@@mikkelens currying, like partials, is a way to pre-feed a value to a function.
Can’t link you here the stack overflow answer /a/51253347
currying and closures are related...you are binding data to data, etc
Gleam is a genuinely beautifully designed language. If they can get a "killer" app like Phoenix working, then I would likely choose it over many other languages.
i was about to say that all the newer languagesa just re-create Express lol.. or Laravel
@@Microphunktv-jb3kj yes but Phoenix compared to Rails is night and day better
Lustre with server component might be the killer app because its bassically Liveview but you can do stuff client side simmilar to react server component where you render the component with the the data it needs on the server then throw it at the client then it can be hydrated on the client
Really excited about Gleam, but what you need to understand is that Erlang is OTP: A completely unique way of writing systems. Gleam is exciting for BEAM, but it has wrappers for very little of OTP so far.
That's one pink language... I am in!
Lack of tooling is why Crystal hasn't caught on imo. I want to use it but a lot of very basic QoL stuff is missing and doesn't even seem to be on the roadmap.
no, crystal hasn't caught on bc there really isn't that many people wanting to use ruby let alone a language that's very close to ruby syntax wise but that's compiled
it's just a niche language for a niche audience
@@FlanPoirot it hasn't caught on amongst people who absolutely do want that, is what I mean. I felt that went without saying, but there is always someone who needs it spelled out.
Who waits to see what kind of -agen we getting at the video end? Lmao, they get me excited.
I do not envy your life.
@@herrpez I’m sorry you had to leave this reply
@@adnan37h I chose to.
Old Rust also used the functional (no clue what that arrow is called ngl) assignment operator.
ok time to reset the counter. again.
good call! we were at 11:59pm but back at 11:01pm
I think I might like this. So far I prefer simplicity over anything else (I have a strong grug mindset), and the guy who made the language seems to get it
Elixir mentioned ._.
The "use" feature is really reeeally nice. Please do more videos on Gleam
The same thing is available in scala
@@azizsafudin nice! It looks like scalas "use" works like pythons "with" and JavaScripts "using". Where as Gleams "use" works like Kokas "with", enabling many dynamic patterns by letting the user function control when (0-*) to call the rest of the code in the current scope.
Erlang's VM is so underrated.
Why? Is it fast or something compare to CLR/JVM?
@@quachhengtony7651 great for high-concurrent application, especially for server + high fault torrerent
@@quachhengtony7651 Speed is not really the impressive part of BEAM, and the JIT is actually slightly slower than both CLR and JVM, but where it beats them is introspection capabilities, insane IPC (meaning you can run it on multiple nodes and have them share scheduler) and the scheduler being second to none when it comes to resilience in concurrent systems at scale.
@@quachhengtony7651 It's got some crazy concurrency features.
@@quachhengtony7651 Heard it's really good with parallelization. Don't know the details though.
Lets go! I love gleam sm, glad to see the coverage!
For that last part, information should be free, education deserves compensation
This video made me laugh like crazy. Thanks for your content Prime :D
yes
4:18 That doesn't look like the assignment variable but the stream operator in C++. Notice how it can be reversed to stream out the response or an error.
"use x " is just pattern matching syntax, nothing related to
@@OnFireByte IOMonad just sounds like the functional version of streaming.
@@TJackson736 it's more like the functional version of async/await
Re: 16:00 - This is what the `static` keyword is sugar for. A property on the constructor function.
The caveat is that you then have to use the `new` keyword to access the non-static methods. I created a WooCommerce API client that had an interface like this:
interface Products extends Methods {
(id: number): {
Variations: Variations
}
Attributes: ProductAttributes
}
interface ProductAttributes extends Methods {
(id: number): {
Terms: Terms
}
}
/* Terms & Variations look much like the above */
interface Methods {
retrieve: (id: I) => Promise
/* other methods */
delete: (id: I) => Promise
}
This would mean that I can make a DELETE request to the `/products/1` endpoint like this:
`await Products.delete(1)`
make a GET request to `/products/2/variations/3` with
`await Products(2).Variations.retrieve(3)`
and make another GET request to `/products/attributes/4/terms/5` with
`await Products.Attributes(4).Terms.retrieve(5)`
To use static methods, that last one would look like `await (new Products.Attributes(4)).Terms.retrieve(5)` which just feels weird. (I suppose one could argue that the pattern I created does too, but 🤷)
12:18 isn't that what `static` keyword is for (properties on functions)?
4:50 its monad, is this the new greatest programming language? Kapp
please do the gleam tour, it took me like 40 minutes
link to gleam tour
The rust safe overflow “bug” has been around since 2015 btw
How come they didn't notice?
@@dan-bz7dz they noticed, there’s been a open GitHub issue for this as of 2015. Fixing it is extremely difficult, I’m not even sure the rust team wants to/can fix this issue
@@dan-bz7dz It's been recognized since 2015. However, it can't be fixed until the new trait solver is implemented (pretty sure)
11:55 this is exactly the reason why lisp died.
ultimate power is not always a good thing. its chaos.
order is limiting that chaos into digestable structure.
24:30 This was just a proposal and didnt got applied. The current rules are much more open that what you're describing
That is really a great sales pitch. Till now I always thought "ok unfortunately almost no one is using Elixir anymore, will be even worse with Gleam".
But after hearing that... ;)
What makes you think noone is using Elixir? As a full-time Elixir dev I'd say it seems to be gaining interest as awareness grows.
Also really interested in Gleam, though.
@@pdgiddie well, a couple years ago I saw it mentioned in job ads here and there, articles were floating around etc.
But the last years haven't seen anything anymore. Some I know who switched their stuff to Go.
The little I played around with it I really liked it though. It was definitely my favorite from the bunch I tried at that time (I wrote some toy things in a handful of languages I didn't know, including Clojure, Julia, Go, F#)
Gleam actually mentioned!
I've used gleam for the past 3 days and can confirm it's very easy to learn (even without knowing any preexisting functional languages)
Just like TS -> JS, I believe the incremental compiler for Gleam will be super fast
11:36 I think javascript is less hard to read than c++ because there is less syntax (you know `array._isDefault = true` is assignment, now you only need to figure out how assignment to arrays works) and the many ways to solve problem use similar syntax features (I mean things like, addition, subtraction, multiplication, bitwise or, function declaration, class declaration, function literal…) but combine them differently
I love how Prime understands that bringing X new features to a language (such as Rust or TypeScript) becomes a major issue with time. I hope that they manage to keep Gleam as simple as it's today.
I'm not a fun of currying because it adds a significant amount of "distance" from the caller to the "actual logic". A syntax like retry(3, fn) is much better, and if you want multiple functions to retry the same amount of times, just use a variable:
retry3 = retry(3)
res = retry3(fn)
vs
let times = 3;
res = retry(times, fn)
Their mascot looks like it's seen the most gruesome thing in the world.
they fixed it :) it's now a starfish that doesn't look like a butthole haha
I hope 10 years from now someone write a book tittle "JS all the way down"
I got super into Elixir a while back but then got disenchanted by the macro magic and dynamic types. Gleam might just bring me back to the beam.
yes that's right!
I frequently attach properties to react components. Objects that have graphql fragments for component props, objects containing 'data-testid's for the jsx elements in the component ...
And Gleam build tools are written in Rust
Most languages start out simple and straightforward don't they?
No. I don't think so. For example, Mojo with theirs SIMD stuff. And functional languages with their monads, parenthesis and exotic patterns.
And what about JavaScript?)) Yeah, it was kinda simple but it is not straightforward. Same thing I could say about CMake, VimScript
@@personal-stream-studio Yeah, you're right that they don't end up being simple and straightforward.
I guess what I meant was, I don't believe anyone sets out making a new language without that being the intention.
The only reason I see to make a new language is that someone thinks they can do something more simple or straightforward than one of the other 100 billion languages.
@@TminusDoomLook at go. still at 25 keywords, everything slightly complicated is in the stdlib, and some edge cases are made by the go team but not even in the stdlib (like the text or cases package) writing Go feels like i'm forced to do it the idiomatic way by how constrained it is, and that's good. it's been more than a decade and the language is about as simple as when it came out, with exception of generics maybe.
compare that to Rust, which has an insane amount of features every update. I doubt their original idea was to be like Go simplicity wise.
stuff like java which has about 10 ways of making an array and 5 ways of concatenating two strings together, if they had the Go philosophy like gleam also has, you wouldn't have those things. there is a method for literally anything you can think about on every type.
gleam aims to be like Go, and if they do it like Go did in the last decade, I believe they can achieve their goal. for example, gleam doesn't even have a for loop, looping is strictly done with recursion.
sort of.
but Louis is guaranteeing not to make breaking changes or add unncessary "features".
no other language creator made that promise.
Haven't watched the vid yet. My ick with Gleam is division by 0 returns 0, because 'no runtime exceptions' for operations, except assert.
Gleam feels like the child of go and rust
Syntax-wise, rust is definitely close. But what are the go-like components that exist in gleam? I haven't found any
@@detaaditya6237 in the sintax I don't see any, I see them in the philosophy of the language
it's the targetted runtime (BEAM) not just the language
15:45 "Do you really want attaching properties to functions" It's not "attaching" properties to "functions", it's "functions are objects" and "objects can have properties", same with arrays or anything else that's considered an object in JavaScript. And I think this is a kind of consistency that makes sense and is desirable. Because you don't need to learn a bunch of rules or bunch of rule exceptions, you learn "things are objects, and objects have properties" and you're done. Then you might counter but in JavaScript setting properties on an array-object sort of throws off the iteration, and I reply: that's because JavaScript is cursed in many ways with many (useless) exceptions due to its sloppy inception, hence proving my point about consistency and learning exceptions. Spoons can be used to eat soup, ice cream, but also to catapult things across a room. Sharpen one end, and it's a shiv, sharpen the other and it's an eye destroying torture device. Just because the last uses are possible we're not banning spoons, we're persecuting _people misusing spoons in that way_.
My biggest concerns for Gleam vs Elixir so far is a good REPL and some macro feature. Runtime debugging is a strong feature for Elixir. It also compiles straight to BEAM bytecode. Gleam has some way to go to catch up with all that excellent tooling. But I _do_ like the Gleam foundation more than Elixir, especially the lack of `nil`. (I'm a full-time Elixir dev.)
Nice, now that it's ready for production I'm going to apply to a job asking for 10 years of experience writing Gleam, thanks haha
"V might stand for 'vapoware'". LOL
Tried to build the binary but it failed due to some rustup rustc version issue. Guess gleam aint for me.
Installation issues here too. Bummer.
@@ReyLamurinmine just fixed itself, so i don't know maybe they made an update either on their end or on my OS end.
15:20 Oh hey, you can do that in Lua!
>a = { bar = 69 }
>setmetatable(a, { __call = function() return 42 end } )
>a()
42
>a.bar
69
:)
I think Gleam is written in Rust 🦀
it has been rewritten from erlang to rust, you are right yes
One thing I like about Go is that it embeds the runtime rather than requiring it to be installed on the host machine. I wonder why this couldn't be a goal for Gleam?
Could someone tell me what's so good about gopls? Prime is always saying it's good but not why he likes it specifically. I haven't used go much but from what I've seen, rust-analyzer seems much more capable.
Also, gleam looks pretty cool!
16:10 Warning: NSFW Centent ahead. Reduce ur volume rapidly.
That other guy officially mimics PRIME
Am i missing something obvious here, or is the language missing almost everything that makes Erlang/Elixir interesting? It looks very basic. I remember looking at it about 5 years, when it was kinda interesting, then it seemed to die. Then it's reappeared sans any mention of the core OTP features that make Erlang/Elixir useful. Is that a deliberate decision so as to not scare off newcomers? Because if so that seems like it'll mean creating actually useful libraries is goig to involve using features most people won't then be aware of (and therefore isn't going to happen). Or is it that the compile-to-{JS|WASM} bit is the more important part (in which case it's a semi-functional coffeescript/reason/etc)?
It appears that the hype is centred around the so called “rust community”, who are cheering this on, because it’s written in rust, and uses some rust syntax.
Proof of this will be when the all-inclusive RESF dive in and post defensive remarks for daring to question their cult.
No otp support built in .. for a beam language, that’s pretty useless indeed.
I played around with gleam a bunch, it's quite good. It's still missing a few things that stop me from moving from elixir to it. I would love to see OTP as a part of the core language given that it's a part of the core in the erlang virtual machine, I also think the import system is slightly clunky, I wish they had some kind of import that wasn't just aliasing. That being said, it has all the great features of elixir and erlang with static analysis. I am curious to see what the elixir type system will look like when they eventually release that, but gleam does fill a niche in the beam languages. I would also be curious to see how gleam handles native interface functions and interop in general.
Why should we use Gleam over Elixir?
static typing - obvious
As a Go enjoyer Gleam seems pretty interesting. At some point I'd want to learn a simple functional langusge that fills the needs Go does not really cover e.g. UI stuff.
I'd say that Gleam is the simplest functional language out there. You can grasp all concepts in a few hours.
Don’t think it’s going to help in your case. Go is great for building small and efficient binaries for multiple platforms
This one is specifically for building apps that run on the BEAM. Very different kettle of fish
of all modern PLs gleam has the perfect syntax. If it would be great if we could compile to native.
Elixir has no concurrency model, Elixir uses Erlang's concurrency model, by the fact of running on top of BEAM, the Erlang VM
true
"strong desire to have only one way of doing things" - easy brag when you're at the v1 stage in the timeline :D. let's see how well that goes when you're at v5 :)
Dear Lord forsook us in Javascript what is that and the website for it? 23:12
Honestly I feel like this video could generate a few shorts. Like the property demo was hilarious
That sales pitch feels very Elm like
Seems cool but I'm not seeing any single feature that makes it worthwhile to stray from Elixir, other than maybe types, which are coming to Elixir too. The latter has a vibrant and welcoming community, all the advantages of the BEAM, more than a decade of improvements and fixes, a clean syntax, and the most loved libraries and frameworks around... IDK, I'm happy for all Gleamlins, but it's just not compelling enough for me.
I got really excited seeing this but then instantly realized that it will take years for this language to get any level of relevance to the point of doing it full time, if it even survives. Even though it's a good language, it's incredibly hard to replace existing tools, ex. even ones as bad as Python.
Float comparisons: . >=.
Give Lucy a saxophone and everything will be ok. Lol
"...we will also avoid language bloat." Ha. Haha. Hahahahahahhahahahaaaa...
We shall see.
I'm kinda unclear to me whether or not Prime knows what "currying" means or not...
He doesn't.
The example he gave was currying... A function that takes one parameter and then returns another function is exactly what currying is.
It's a very spicy line of code, right?
@@sullivan3503 Not really, technically. Check out Wikipedia.
My favorite piece of javascript code to show java developers back in the day was this:
function a () { function b () { return a;} return b;}
This lets you do a()()()()()()()()()() as many parens as you want.
Cue recruiters asking for 10 years+ experience in gleam
Did some from Gleam come on the show?
How is V vaporwave/a scam? I'm probably missing some context on this, but the language seemed fine to me last I checked.
I imagine
rust lifetime bug was there before NLL appeared, so it's not new release faults
the lisp mascot though
What theme is prime using in vim
zig mentioned
Looks like there is Birl for Time?
Gleam has such a small surface area that you have to do pattern matching to do if else logic. There is no if else syntactic construct in the language, just pattern matching. And I like it 😊
await?.and_then() vibes... less declarative, more composable and functional
Zig is a super language, but lsp is not a primary focus for them
not a primary focus **at the moment**. they've made it clear that they will only work on those things after the language itself is further along, anyone that has hung around enough on the zig discourse channels knows that zls will eventually die as zig will have it's own autocompletion server in the compiler itself (they won't be using the LSP as their protocol)
Their main Lsp contributor died some time ago. 😢, probably because of that.
No, Zig is shit because no concept of trait/interface
@@egorsozonov7425 that's the dumbest shit I've heard
interfaces are nice but they're not a complete requirement, Zig is a C replacement which is a language that doesn't have those either, you just get data do soemthing and maybe return data. it's a different style of programming.
if you were to give an argument for why zig sucks I'd think it would be more valid if you spoke about comptime's complexity and how it makes making good tooling harder. also there's a lot of inconsistency in the stdlib and the conventions used in the language rn.
also the language is not even 1.0, it could completely change under ur feet, so unless you're very much into it and willing to contribute I'd advise u to keep out for now
Gleam looks interesting, maybe I will look into it in like 5 to 10 years, at this time it will either be somewhat popular or already dead.
15:38 javascript! I love it!
Attaching properties to JavaScript sounds like REXX stem variables
Can Gleam almost be called a Tooling first language?
Without sourcemaps? Not really, imo
not currently. its mainly a web app language for now. that is their focus , but plan to add tooling features once they get the web experience where they want it
charm mentioned. really interesting but gleam also looks cool
they use Futura as their font and Rust as the language for their compiler. it has to be good.
hey man... Why do you select things with the first and last character not included......... It bothers me. But I love your videos!
how the heck does deployment work with this ? can u build executables?
Who knows. I can't even install it LOL
I read the docs. No executables. There is Gleescript which does "Bundle your Gleam-on-Erlang project into an escript, a single executable file". Gleem for me, is the most uninteresting thing I've seen all week.
Like in standard erlang, which is basically the same as java.
@@UnidimensionalPropheticCatgirl that sucks..... its the reason i'm not using it, deployment is weird.
it runs like erlang, on the BEAM