The Feature That No One Knew About in Elixir 1.5 - José Valim - Elixir.LDN 2017

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ย. 2024
  • José Valim, the creator of Elixir, gives a keynote at Elixir.LDN 2017. In this Keynote, José shows us a hidden feature in the new Elixir 1.5 update and then discusses how this came about. He explains Elixir's relationship with the Erlang Compiler and the BEAM. He also explains how an update in Erlang/OTP 20 was required to make this new feature possible.

ความคิดเห็น • 21

  • @FirewalkR
    @FirewalkR 7 ปีที่แล้ว +3

    This was a great talk, both because it's detailed and because José is able to explain things very clearly. It was my favourite talk of the conference.

  • @nelsonc5339
    @nelsonc5339 7 ปีที่แล้ว +12

    Easily the most insightful talk/video on Elixir 1.5 internals! Debugging is _so much_ better now! 🌈

    • @batlin
      @batlin 6 ปีที่แล้ว

      Yes! That "break!" thing is fantastic and will really help us at work where we've been doing it the old "stop-log-start" way. So much goodness in this talk.

  • @adam.millerchip
    @adam.millerchip 4 ปีที่แล้ว +1

    TL;DW: Storing the Elixir AST in the .beam file, which allows for more relevant info related to the source code when debugging.

  • @yeongsheng-tan
    @yeongsheng-tan 7 ปีที่แล้ว +1

    Bloody awesome feature from a simple AST abstraction. Thanks.

  • @AdamRecvlohe
    @AdamRecvlohe 7 ปีที่แล้ว +3

    This is amazing!

  • @adam.millerchip
    @adam.millerchip 4 ปีที่แล้ว +2

    I was a bit confused when he mentioned that adding the Elixir AST to the .beam file was a bad idea, because that makes the .beam file bigger, and then goes on to talk about adding the Elixir AST to the .beam file. But the key seems to be that the new Dbgi chunk allows the Elixir compiler to *only* add the Elixir AST (instead of the Erlang AST), and it can later dynamically generate the Erlang (or Core) AST if/when needed. Reading the proposal directly was helpful: github.com/erlang/otp/pull/1367

  • @ErlangSolutions
    @ErlangSolutions  7 ปีที่แล้ว +6

    Thanks for the really positive responses, as always we like to give back to the community.
    Our next conference will be Code Mesh (7-9) November, London - bringing together an eclectic mix of speakers and talks. From David Turner, Matt Might, David Nolan and 'The Great Quux’ Guy L. Steele to researchers and engineers from Facebook, Starbucks, CERN and even ‘The White House.’ Come along and contribute to the evolution of alternative and functional programming languages like Clojure, Haskell, Lisp, Erlang, Elixir, Akka, and many more. Scholarship and Early Bird tickets available.
    More details: www.codemesh.io

  • @kevinbaird6705
    @kevinbaird6705 7 ปีที่แล้ว +2

    I don't see the implementation / attempted function clauses in Elixir 1.5.1, Erlang/OTP 20, running on Ubuntu 17.04.

  • @haystackdmilith
    @haystackdmilith 7 ปีที่แล้ว +2

    I would LOVE to see type system in Elixir. Even if just optional.. that would be MASSIVE!

    • @grafikart
      @grafikart 7 ปีที่แล้ว

      Same thing here. Typespec is nice but it feels so weird to write.

    • @samuelmv78
      @samuelmv78 7 ปีที่แล้ว +1

      Types are for zoology :)
      Sorry, but I really love languages without strict types ... I don't see any advantage in types if you do TDD (and I think that if you are a professional programmer you must).

    • @AZombieHippie
      @AZombieHippie 6 ปีที่แล้ว

      I think the idea is more for more comprehensive documentation, similar to the advantages TypeScript brought to the JavaScript ecosystem in terms of maintainability.

    • @MartinChabot
      @MartinChabot 5 ปีที่แล้ว +2

      @@samuelmv78 I've heard this argument so many times. No matter how many test you'll make you will always have millions of possible errors that a good type system such as Haskell would have forbidden. Have you ever had Null issues in your tested app? If I make the same program in a language such as Elm you won't have these errors. With a good type system you only have to test the important business stuff.

  • @batlin
    @batlin 6 ปีที่แล้ว

    The "break!" feature is brilliant, as is the expanded debugging information with Exception.blame. However in Elixir 1.6.2, I don't see the "Attempted function clauses" bit. Why?

    • @Manish-py8ot
      @Manish-py8ot 6 ปีที่แล้ว

      Hey, if you're still wondering about this: Newer features require elixir to be compiled with the latest version of OTP. You can get elixir precompiled with different versions of OTP from hexpm: eg repo.hex.pm/builds/elixir/master-otp-20.zip. You can find more information here: github.com/hexpm/bob/blob/master/README.md#elixir-builds

    • @batlin
      @batlin 6 ปีที่แล้ว

      Thanks Manish, but I'm running OTP 20. Any idea why else I might not see this feature?

    • @Manish-py8ot
      @Manish-py8ot 6 ปีที่แล้ว +1

      What do you see when you run `$ elixir --version`?
      For example, I see the message: `Elixir 1.6.4 (compiled with OTP 20)`.

    • @batlin
      @batlin 6 ปีที่แล้ว

      Ah, I see the problem now! I've got Elixir 1.6.4 and Erlang 20, but I get this output:
      "Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]
      Elixir 1.6.4 (compiled with OTP 19)"
      So I guess it's the "compiled with OTP 19" that's the problem. Maybe it's an issue with asdf, which I used to install both Elixir and Erlang...

    • @batlin
      @batlin 6 ปีที่แล้ว

      Ok yeah, got it working now. For some reason asdf-elixir by default still uses OTP-19 by default, so to get 1.6.4 with the new OTP, you gotta use: "asdf install elixir 1.6.4-otp-20 && asdf global elixir 1.6.4-otp-20".

  • @robertsimmons2935
    @robertsimmons2935 4 ปีที่แล้ว

    The video will not play now.