A Brief Introduction to Gleam

Поделиться
HTML-код
  • Опубликовано: 16 окт 2024

Комментарии • 30

  • @lpil
    @lpil Год назад +22

    Fab video! Thank you Erik!!

  • @josephlyons3393
    @josephlyons3393 8 месяцев назад +11

    Nice video! Gleam looks like fun Rust! I love how you wrote it like a beginner might and then refactored it into idiomatic Gleam code.

    • @ErikSchierboom
      @ErikSchierboom 8 месяцев назад +3

      Thanks! Yeah I figured not everyone would be familiar with using Result/Option to deal with errors/missing data, so I slowly build up the solution.

  • @DaveParr
    @DaveParr Год назад +5

    This is really interesting, I think the R solution would be quite similar, but without the strong typing and compiler checks.

  • @franciscoflamenco
    @franciscoflamenco Год назад +4

    I was more than a bit put off by the code at first, since dealing with the result type seemed extremely tedious, but after the refactoring it turned out delightful.
    I've been learning Elixir lately but I'll be sure to check out Gleam too at some point.

  • @mariobroselli3642
    @mariobroselli3642 7 месяцев назад +8

    Gleam sounds similar to Roc.

  • @kevinkkirimii
    @kevinkkirimii 7 месяцев назад +4

    this language is actually quite neat. I disliked erlang and elixir because the syntax was too far off mainstream which i get, they are functional but Gleam has gotten it right from the little I have seen here. It is easily familiarish to someone coming from another main stream non pure functional languages.

    • @exercism_org
      @exercism_org  7 месяцев назад

      Yeah, Gleam's cool!
      I think Elixir's syntax is quite straightforward coming from something like Ruby, but maybe not from other languages. Erlang is its own beast but we've been appreciating its power in our #48in24 series (e.g. See the last part of ruclips.net/video/v1iU9QwpzQA/видео.html)
      Thanks for commenting! :)

  • @razvbir
    @razvbir Год назад +6

    What's the main reason one would choose gleam over elixir?

    • @lpil
      @lpil Год назад +16

      The two languages share many strengths, but they differ quite a lot at compile time. Gleam has types at compile time, while Elixir has macros, resulting in a fairly different programming experience. You'd likely pick whichever style you find more enjoyable or productive

    • @davidchristenes9062
      @davidchristenes9062 6 месяцев назад

      The main reason for me is quite simple tbh.
      Gleam has types and I like typed languages, I think it really helps developer experience by lots, and being a newer language brings all the benefits of our time. We learned how to have types and not be extremely hard and boring to write it, look how C# handle the typing system and how F# does, both are typed languages but F# is so easier to reason and write, and C#, even though has a strong type system, still have poor error messages and tooling.
      Gleam brings all those new things about types actually helping with better messages, better lsp, better everything, which at least for me Elixir lacks for example, and that is why I never used it for a real project.

  • @johnkimber4027
    @johnkimber4027 6 месяцев назад +1

    Great introduction. Could use some info on testing and some concrete examples of the underlying data via debug etc.

    • @exercism_org
      @exercism_org  6 месяцев назад

      Thanks! Please do check out the full track where there's lots more info! We try and keep these pretty concise :)

    • @johnkimber4027
      @johnkimber4027 6 месяцев назад +1

      Sounds good. Will do@@exercism_org

  • @mariskaschierboom-xw4bj
    @mariskaschierboom-xw4bj Год назад +4

    👌👏

  • @marcusrehn6915
    @marcusrehn6915 7 месяцев назад

    Calling the to_chars function to_graphemes is the ultimate redditor "well actually" move. Im guessing that it's because it returns strings with length of one and not chars, but still.
    Or perhaps im the only noob who didn't know what a grapheme is.

    • @exercism_org
      @exercism_org  7 месяцев назад

      Watch our "how to reverse a string" video. It explains what graphemes are. Most languages have some sort of to_graphemes methods nowadays - they're a critical part of modern unicode string parsing :)

  • @hoangtran-ek8mn
    @hoangtran-ek8mn 6 месяцев назад

    Holy ****

  • @coder_one
    @coder_one Год назад

    Is Gleam deliberately trying to become a competitor to Elixir by further fragmenting the community into minor programming languages?

    • @exercism_org
      @exercism_org  Год назад +11

      Well that's a very loaded question, isn't it!
      Any new programming language "fragments" communities to some point. Rust and Go have fragmented the C++ community. C++ fragmented the C community. C fragmented the Assembly community etc. And Elixir fragmented the Ruby community. Everything new in life that becomes popular causes fragmentation. But that only happens if people prefer the language for some reason. So if people prefer to use Gleam to 𝑥, then Gleam will become popular. If everyone prefers 𝑥, then Gleam won't gain traction.
      I have no sense that Gleam is trying to "compete" with anyone. They're just building a language that they like to use. You can watch our interview with Louis if you're interested in actually understanding the thinking behind Gleam: ruclips.net/video/G7vqoR431Zo/видео.html

    • @coder_one
      @coder_one Год назад

      @exercism_org don't get me wrong - I have no complaints about Gleam as a language. What I mean more is that Elixir as a functional yet beginner-friendly language is trying to break through to the mainstream. If the community around Gleam directed its work and attention towards the development and popularization of Elixir then the chances would increase that Elixir and the functional paradigm would break through the barrier of niche languages for programming freaks....

    • @lpil
      @lpil Год назад +2

      @@coder_one Not at all! We in the Gleam team are good friends with the Elixir team and the Erlang Ecosystem Foundation, and we all work together to make the BEAM ecosystem better. Jose Valim was even one of the original sponsors of Gleam!
      Elixir's style of programming is very different to Gleam's style, and while many people with to use the BEAM not all of them find Elixir to their preferences. Having an alternative in Gleam means that folks who would have otherwise passed over the BEAM in favour of languages such as Elm or OCaml can now join the BEAM community.

    • @Strandinator243
      @Strandinator243 Год назад +5

      @@coder_one I think new programming languages with different approaches can bring more people to the elixir/erlang ecosystem.

    • @lpil
      @lpil 8 месяцев назад +6

      Hi! I made Gleam! Gleam isn't a competitor at all, rather it is bringing more people to the BEAM ecosystem who would not have joined otherwise. Most people who are interested in Gleam are not people who enjoy Elixir's style of programming and would have been using other languages such as Elm, OCaml, Scala, and so on.

  • @bobweiram6321
    @bobweiram6321 4 месяца назад

    Another useless programming language.

    • @exercism_org
      @exercism_org  4 месяца назад +1

      What programming languages do you find useful? What did you hope Gleam would do that others don't?