A Brief Introduction to Julia

Поділитися
Вставка
  • Опубліковано 15 чер 2024
  • Erik gives us through a brief introduction to Julia, solving the Difference of Squares exercise on Exercism, and exploring why it's an interesting language to explore.
    Links:
    - Learn Julia on Exercism - its 100% free: exercism.org/tracks/julia
    - Difference of Squares exercise on the Julia track: exercism.org/tracks/julia/exe...
    - Official docs: docs.julialang.org/en/v1/
    - Official style guide docs.julialang.org/en/v1/manu...
    - Performance tips: docs.julialang.org/en/v1/manu...
    - Julia bloggers: www.juliabloggers.com/
    - Julia Discourse (community): discourse.julialang.org/
    - Why We Created Julia: julialang.org/blog/2012/02/wh...
    - Why we Use Julia, 10 Years Later: julialang.org/blog/2022/02/10...
    - The Unreasonable Effectiveness of Multiple Dispatch (video): • The Unreasonable Effec...
    - Julia's UA-cam channel (video): / julialanguage
    Timestamps:
    00:00 Welcome
    00:32 Introduction
    04:38 What makes Julia great?
    07:16 Standout Features
    11:05 Solving difference of squares
    21:54 Learning Resources
    25:55 Closing Remarks
  • Наука та технологія

КОМЕНТАРІ • 37

  • @yaskygaming
    @yaskygaming Рік тому +48

    First thing I thought about Julia was "Oh this would be a breeze. It's yet another Python variant!" - boy was I wrong. Julia shifts my thinking from programming as an engineering activity to programming as a science.

    • @exercism_org
      @exercism_org  Рік тому +3

      Nice! That's a lovely way of describing it 💙

    • @ErikSchierboom
      @ErikSchierboom Рік тому +5

      It is a really cool and unique language.

  • @ErikSchierboom
    @ErikSchierboom Рік тому +15

    One thing I forgot to show/stress is that functions also have a shorthand syntax, which is really nice: docs.julialang.org/en/v1/manual/functions/

  • @mattpiz
    @mattpiz Рік тому +3

    Really nice introduction Erik!

  • @DaveParr
    @DaveParr Рік тому +6

    This is really neat. Great demo of function overloading ❤

    • @DaveParr
      @DaveParr Рік тому +2

      Just got to the bit about latex 😮 I 'knew' Julia had unicode support but I hadn't clicked that it had that kind of integer/float division behaviour

  • @ItamarOliveira
    @ItamarOliveira 11 місяців тому +2

    Excellent video!

  • @halneufmille
    @halneufmille Рік тому +7

    Very nice, I know a bit of Julia, but didn't know about this sum trick x->x^2, 1:n or about this ÷ division. One thing that could have improved the code further is defining the functions by assignment:
    square_of_sum(n) = (n * (n + 1) ÷ 2)^2
    sum_of_squares(n) = (n * (n + 1) * (2n + 1)) ÷ 6

    • @ErikSchierboom
      @ErikSchierboom 2 місяці тому

      I totally should have done that, just forgot to do that!

  • @benitoe.4878
    @benitoe.4878 6 місяців тому +2

    About the functions looking like regular math. The (short) assignment form of functions makes for an even more mathy look, e.g.: sum_of_squares(n::Integer) = (n * (n + 1) * (2n + 1)) ÷ 6

  • @mailsiraj
    @mailsiraj Рік тому +5

    Thanks Erik for the wonderful intro. I am intrigued about multiple dispatch, but could NOT fully understand why it is such a killer feature in Julia - i would check out the video mentioned. It would be good to add links to the resources you described.
    Do we use Julia anywhere in Exercism - it would be good to get some real-life use cases of where these languages are used (from your own experience) - these might enrich these track introductions?

    • @ErikSchierboom
      @ErikSchierboom Рік тому +1

      Good shout about the links! I'll try add add those. For the moment, here is the link: ua-cam.com/users/livekc9HwsxE1OY?feature=share
      We use Julia in our cross-repo syncing code: github.com/exercism/org-wide-files/blob/main/scripts/apply-track-config.jl

    • @mailsiraj
      @mailsiraj Рік тому +3

      @@ErikSchierboom Thanks Erik. Nice to see how readable the Julia code is. I have now seen a video about multiple dispatches and how nice it is. I was very happy to learn that the indexing starts at 1 in Julia - you should mention it :)

  • @j.abrahamhernandez3629
    @j.abrahamhernandez3629 Рік тому +1

    i had the hope you would discuss multiple dispatch for user defined functions in the example since you (rightly so) hyped it as a core feature of the language
    dispatching of multiple types of the n input variable for example could be an idea

    • @ErikSchierboom
      @ErikSchierboom Рік тому +2

      It's always hard to try and balance the things one wants to show, versus the available time. Sorry

  • @hewhointheearthlydomainsee1272

    I wish they would add the terseness/structure of F# and efficiency at low level programming of C next. I would like be able to write code that generates code. Supposedly there millions of lines of code in an operating system like Windows and Linux, and writing too much for one person, but if there were a language that generated code using expressions and descriptions, maybe.

  • @megakek4457
    @megakek4457 Рік тому +9

    Julia is great so far. With just this video, a bit of documentation and a background in Python I'm already solving Exercism challenges.
    And I just found out it even has a pipe operator (`|>`) like Haskell and Elixir. Amazing.
    (I'm still learning Haskell on the side since Functional February but what a difference that learning process is compared to Julia!)

  • @Jan_van_Waaij
    @Jan_van_Waaij Рік тому +2

    Leuke video!

  • @DeclanMBrennan
    @DeclanMBrennan 2 місяці тому +1

    Is *multiple dispatch* an alternative phrase for *function overloading* ?

    • @ErikSchierboom
      @ErikSchierboom 2 місяці тому +3

      They're very similar, but the key difference is that function overloading happens at compile time, whereas multiple dispatch happens at run time.

    • @DeclanMBrennan
      @DeclanMBrennan 2 місяці тому +1

      @@ErikSchierboom Thank you.

  • @jeffreywhewhetu
    @jeffreywhewhetu Рік тому +6

    Julia it is, for Analytical April

  • @Mojo_DK
    @Mojo_DK 11 місяців тому

    How does mojo compare to Julia.
    The developer of Mojo claims, that Mojo is more advanced because it is newer. Is that true?
    In what way is it better? Or is Julia still the faster language?

    • @blaisepascal3905
      @blaisepascal3905 2 місяці тому +1

      Hi,
      Beginner in Julia and Mojo (for about 5 and 3 months now). I can give you my beginner point of view.
      Both Julia and Mojo are fast. But if you are looking for pure speed, Mojo should be theoretically faster since it uses a "new technology" (MLIR) and is basically a static language. But Julia is really fast and it is easier/flexible to optimize your code and go even faster even though it is "optionally typed" and interactive. I would say it depends the use case. In my opinion, Julia is fast enough for most cases and can be improved using Julia code. While Mojo, was mostly designed to speed up Python code by replacing it with Mojo syntax.
      Keep in mind that the situation is not set in stone. Both Julia and specifically Mojo are young languages that are still growing. For instance, Julia is already more established than Mojo and has started projects to leverage MLIR (Brutus.jl or MLIR.jl). While Mojo has not reached a perfect compatibility with Python yet (coming soon), I believe many Python libraries should work.
      There is room for improvement in both Mojo (was open sourced recently) and Julia (ever growing and nice community).

  • @nickboyadjian367
    @nickboyadjian367 Рік тому +3

    Great video!