A Brief Introduction to Julia

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

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

  • @yaskygaming
    @yaskygaming Год назад +50

    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 Год назад +16

    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/

  • @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

  • @mattpiz
    @mattpiz Год назад +3

    Really nice introduction Erik!

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

    Excellent video!

  • @halneufmille
    @halneufmille Год назад +8

    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 4 месяца назад +1

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

  • @benitoe.4878
    @benitoe.4878 9 месяцев назад +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

  • @megakek4457
    @megakek4457 Год назад +10

    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!)

  • @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: ruclips.net/user/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 :)

  • @hewhointheearthlydomainsee1272
    @hewhointheearthlydomainsee1272 Год назад +1

    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.

  • @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

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

    Leuke video!

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

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

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

      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 4 месяца назад +1

      @@ErikSchierboom Thank you.

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

    Julia it is, for Analytical April

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

    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 4 месяца назад +2

      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).

  • @delightful-ish
    @delightful-ish 2 месяца назад

    Why does the philosophy of this language seem to be that everyone has 3 hours to wade through cruft to learn how to just get some code running?

  • @nickboyadjian367
    @nickboyadjian367 Год назад +3

    Great video!