Fireship · @fireship

Julia in 100 Seconds

Uploaded May 19, 2022 · Length 2:40

Julia in 100 Seconds

Summary

Julia programming language explained in 100 seconds, its features and use cases.

  • julia programming language
  • high performance computing
  • machine learning
  • data visualization
  • numerical analysis

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    Julia a dynamic general purpose

  2. 0:02

    programming language capable of high

  3. 0:04

    performance scientific Computing with

  4. 0:05

    high-level code it was created in 2012

  5. 0:08

    by a gang of computer scientists who set

  6. 0:10

    out to build a language with the speed

  7. 0:11

    of C the dynamism of Ruby the

  8. 0:13

    practicality of python that can do

  9. 0:15

    statistics like R and linear algebra

  10. 0:17

    like Matlab out of the box it's a

  11. 0:19

    general purpose language but is most

  12. 0:20

    well known for its use in numerical

  13. 0:22

    analysis data visualization and machine

  14. 0:24

    learning it's extremely fast because

  15. 0:26

    unlike most high-level languages it uses

  16. 0:28

    a just-in-time compiler to convert your

  17. 0:30

    source code into machine code before

  18. 0:32

    running it and unlike most dynamic

  19. 0:34

    languages it has a flexible parametric

  20. 0:36

    type system that means static typing is

  21. 0:38

    optional by default and types can take

  22. 0:40

    parameters allowing one type to

  23. 0:41

    represent many different possibilities

  24. 0:43

    this opens the door to the multiple

  25. 0:45

    dispatch pattern where one function can

  26. 0:47

    have multiple methods or implementations

  27. 0:49

    based on its input parameters and the

  28. 0:51

    language will determine which method to

  29. 0:52

    dispatch at runtime in fact even

  30. 0:54

    operators like Plus or functions that

  31. 0:56

    use multiple dispatch to handle a

  32. 0:58

    variety of different type common Nations

  33. 1:00

    to get started install Julia then create

  34. 1:02

    a file ending in JL declare a variable

  35. 1:05

    by providing a name then assign a value

  36. 1:07

    to it names support utf-8 encoding like

  37. 1:09

    emojis or mathematical symbols it uses

  38. 1:11

    symbols to represent built-in constants

  39. 1:13

    like Pi allowing you to write equations

  40. 1:15

    more elegantly in your code like Pearl

  41. 1:17

    it's very good at string parsing and

  42. 1:19

    supports multiple Expressions on a

  43. 1:20

    single line resulting in tourists yet

  44. 1:22

    powerful code Define a function with the

  45. 1:24

    function keyword and close it with the

  46. 1:26

    end keyword or shorten it to a single

  47. 1:28

    line with the equal sign or because

  48. 1:29

    functions are first class objects they

  49. 1:31

    can be assigned to a variable or pass to

  50. 1:33

    another function anonymously what's

  51. 1:35

    interesting though is that by default a

  52. 1:36

    function is untyped which means it

  53. 1:38

    implements one method to handle all

  54. 1:40

    inputs if the function is redefined but

  55. 1:42

    this time with a type for the arguments

  56. 1:44

    another method is added to it when this

  57. 1:46

    function is called at runtime Julia will

  58. 1:48

    look at the type of the arguments and

  59. 1:49

    dispatch the corresponding method in

  60. 1:51

    addition we can pass a type as a

  61. 1:53

    parameter then use keywords like where

  62. 1:55

    to perform Logic on the type itself in

  63. 1:57

    this case it will assert that both types

  64. 1:59

    are the same now Julia is not an