Тёмный
No video :(

How to learn Julia, a new programming language 

Jack of Some
Подписаться 30 тыс.
Просмотров 26 тыс.
50% 1

I demonstrate how to learn a new programming language by teaching myself Julia. This is a long video so I suggest chunking your view time and using the following links to navigate.
00:45 List of Topics
04:40 Installation/toolchain
10:15 Basic Syntax
20:54 Arrays/Lists
27:50 Tuples
29:20 Dictionaries/Sets
32:41 Control flow (if/else)
33:22 Loops
35:47 Functions (+ first class)
42:00 Types, Structs
52:00 Package Management (Pkg)
55:30 Notebooks, plotting, deployment
1:01:00 Macros
1:03:23 Threading
1:05:30 Spring mass damper example (more threading)
1:17:36 Concluding thoughts
Twitter: / safijari
#julia #programming #learning

Опубликовано:

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 55   
@JackofSome
@JackofSome 4 года назад
Pinned comment with useful post postum information: 1) insightful comment from Reddit about stuff I missed www.reddit.com/r/Julia/comments/ekd7nl/video_teaching_myself_julia/fdabfy6?
@LongNguyen-nd2bt
@LongNguyen-nd2bt 4 года назад
That was unexpectedly fun to watch! One thing I do want to mention: multiple dispatch and type system are Julia’s strongest assets. They can seem complicated at first glance, but they allow for really powerful abstraction. You can add new types to existing methods and new methods to existing types in a breeze. This means there’s a lot of effective code reusing within the community, different packages can extend each other and developers can collaborate much easier! Julia code often aims for genericity, so for example you can create your own custom array struct, implement a few methods from the AbstractArray’s interface like setindex and getindex, and it will not only work with a bunch of existing codes, but also be just as fast!
@monkeyrater
@monkeyrater 4 года назад
That was surprisingly enjoyable watching you learn Julia. You really pick things up fast so watching you learn and use the language will help me learn faster. I picked up on a lot of things I never knew about Julia despite having read a couple of books on it. I dont know if you answered your question about Julia having OO, but it doesnt. Since Julia is a data processing and number crunching language that it doesnt make sense to connect methods to data structures much in the same way that R or Matlab would have no need for OO. I recommend Iwo Balbeart's book on Julia as a good quick start guide to learning Julia's syntax. Also since none of the layers for Julia in Spacemacs worked then maybe you could make your own layers as a learning experience for learning/teaching layers.
@mikeg9b
@mikeg9b 4 года назад
Thanks for the video. I read through "Think Julia" recently, so I knew most of this already, but it's still interesting to watch someone with way more overall programming experience go through it and compare it with other languages.
@shacharh5470
@shacharh5470 2 года назад
So.. have you ever answered some of your unanswered questions here? Or found out anything interesting about Julia you would have mentioned here if you knew it then? Have you ever used Julia or toyed around with it (for any purpose at all) since making this video? a quick update vid/comment would be very much appreciated :)
@JackofSome
@JackofSome 2 года назад
Answered a number of the questions, some my self but most from comments. Tried getting back into Julia a few more times, didn't really click. Tried figuring out a way for using it at work, but kept running into issues. I have hope for Julia though. Will try it again in a few years
@baumwolle2548
@baumwolle2548 3 года назад
made me start julia
@L4rsTrysToMakeTut
@L4rsTrysToMakeTut 4 года назад
More pls :) I enjoyed it 👍
@renodubois
@renodubois 4 года назад
This is a great format! Really enjoyed the video.
@AnyFactor
@AnyFactor 3 года назад
More of these type of videos!! Do go next.
@rosek6585
@rosek6585 3 года назад
About editor setup: 1. It was pretty easy in Emacs. You should use the Julia Language Server, and connect to it with either eglot-jl or lsp-mode and lsp-julia. 2. It was a bit more chaotic in Vim. It works perfectly well with the setup recommended on the page, but I prefer to use coc.nvim. Here, for some reason the coc-julia plugin doesn't work, but I was able to get it to work correctly with manual setup, as documented in the wiki. I don't know how to setup editors that were created later than the 90s.
@JackofSome
@JackofSome 3 года назад
Vscode works out of the box now. Last time I tussled with Julia (a year ago?) I once again gave up on getting the language server to work correctly in emacs and just used vscode
@daniel78800
@daniel78800 4 года назад
Really enjoyed this.
@ther6989
@ther6989 4 года назад
better to use Juno IDE (Atom + Julia + uber-juno package)
@michaeljoshuas4646
@michaeljoshuas4646 3 года назад
Merci
@RedFenceAnime
@RedFenceAnime 3 года назад
If you add a "00:00" to the list of timestamps there will be chapters in the video.
@bocckoka
@bocckoka 4 года назад
concat (chars and strings also) is called *, because according to Julia developers, it is closer in properties to multiplication than addition
@JackofSome
@JackofSome 4 года назад
Oh I see. Thanks for the tip! I don't think I would get along with Julia's designers 😅
@STAR0SS
@STAR0SS 4 года назад
@@JackofSome ​ I'm sure you would, they are very nice and often have solid reasoning behind design choices. In that case, the most basic property of addition is that its commutative, but string concatenation is not ("foo" * "bar" != "bar" * "foo"), so + is really the weird choice here. And there's really no serious downsides to using * instead of +, and no "but I'm more familiar with +" isn't a good design argument. Regardless, if you really want to use + you can just define in your startup.jl file: Base.:+(x::String, y::String) = x * y And now you have +, with no performance penalty compare to the built-in *.
@JackofSome
@JackofSome 4 года назад
It was meant to be a joke :), the not getting along bit not the disagreements with design choices. There's a number of things I don't like about Julia (e.g. 1 based indexing) but can understand where they came from (likely easier on the Matlab crowd). There's also a number of things I really appreciate. Multiplication is also commutative though, and to me concatenation is more akin to an (ordered) union which feels more like an addition than a multiplication but to each their own if course.
@STAR0SS
@STAR0SS 4 года назад
@@JackofSome It's not commutative in general, for example for matrices. But I'll concede it's a bit of a technicality. For unions you can use the \cup+TAB in the REPL (or in most editors) : [1,2] ∪ [3,4]. It's true that Julia tends to follow more closely mathematical notations and concepts that some other languages. Note there's also OffsetArrays.jl when different type of indexing is useful (there's some problems that are better written with 0 being the middle of the array for example). IIRC it's a zero cost abstraction.
@rapus007
@rapus007 4 года назад
@@STAR0SS not only zero cost but there is a [post](discourse.julialang.org/t/performance-of-offsetarrays/5769/5?u=rapus95) which suggests sometimes even being slightly faster.
@shacharh5470
@shacharh5470 2 года назад
Julia arrays (and iterables) start at 1 BY DEFAULT. It's possible to declare an array/iterable that starts at 0. I don't remember how but I read about that, it's a thing..
@JackofSome
@JackofSome 2 года назад
I'm aware. I very much dislike it in a language like Julia since there's no reasonable way to make it obvious.
@nasreddinehodja5930
@nasreddinehodja5930 4 года назад
Thanks for the quality content once again. I didn't know about learnxinyminutes.com website it seems really useful for that kind of code practice/discovering. Just a suggestion (if I may) for future videos, you seem to be working in the data science field, I'd really love to see some of your insight on it. Like what your job consist of (without entering into details you can't share of course) , what is your background , how do you see the evolution of data science/machine learning etc... Also I see you work on a laptop directly without a second screen, why is it ? Do you feel like it impairs focus to have to much screen space? Thank you very much.
@JackofSome
@JackofSome 4 года назад
Thank you so much for the kind words. Yes I to computer vision and deep learning for a living. I'll definitely make videos about that too I just have to find the right topics and format. You can follow me on Twitter in the mean time for my ramblings 😅
@nasreddinehodja5930
@nasreddinehodja5930 4 года назад
@@JackofSome Thanks i'll do that ;)
@Mzkysti
@Mzkysti Год назад
Have you been using Julia now? I took like 6 months effort to learn it just to realize it was more or less unusable for my purposes...
@shacharh5470
@shacharh5470 2 года назад
when you wrote "for i in [5:50]" it didn't work because [5:50] is not a range! It is an array that has on element of type range. And the add function doesn't have a method for elements of this type, it only works with numbers..
4 года назад
Back to matlab. Matlab can generate very performant c/c++/cuda/HDL code. You can run your algorithm on anywhere. Simulink Generates android applications with c++. Matlab cost is high and cloud computing cost higher than desktop version.
@JackofSome
@JackofSome 4 года назад
Having worked at Mathworks there's a lot I love about both their tools and their philosophy. I just can't justify using it for my startup (and I still think it encourages bad programming practices).
@shacharh5470
@shacharh5470 2 года назад
I see you're using linux (or some unix). Doesn't your distro have a package for Julia? it's always best to install things through the official package manager, you know
@JackofSome
@JackofSome 2 года назад
At the time there wasn't. For fast moving projects like Julia there's almost never an up to date package in most distros :)
@shacharh5470
@shacharh5470 2 года назад
@@JackofSome see that's why I use archlinux ;)
@JackofSome
@JackofSome 2 года назад
I was on arch during the video 🙂
@IulianVasileCioarca
@IulianVasileCioarca 4 года назад
Maybe I missed the details in Numba video, but did you compare 1000 runs Numba with 10 000 runs Julia?
@JackofSome
@JackofSome 4 года назад
No. I mention this briefly in the Julia video. The number of iterations was the same.
@IulianVasileCioarca
@IulianVasileCioarca 4 года назад
@@JackofSome Thanks for the reply. I overlooked that. You don't need to create the range with [0.0:dt:T;], since this will allocate for the full array every time you run the function. You can simply use 0.0:dt:T instead, and this reduces allocations and run time. Sometimes preallocating without filling with zeros saves time: Vector{Float64}(undef, 1000). This just grabs some chunk of memory without replacing the junk inside. Here you have to make sure your function modifies every element in your array, otherwise you end up with funny values here and there. I'm not very experienced, so I asked on the official forum for further tweaks: discourse.julialang.org/t/how-to-optimize-the-following-code/33209/6 Thanks for the very informative video!
@mahdikazazlo2729
@mahdikazazlo2729 2 года назад
Can u introduce a website in which learns julia programming course compeletly
@lalitmee
@lalitmee 4 года назад
Do you have your .spacemacs file or spacemacs configuration on Github? It would be a great help if you can push it, if you don't mind.
@JackofSome
@JackofSome 4 года назад
I'm too embarrassed to upload it. Lemme clean it up a bit and then I will.
@lalitmee
@lalitmee 4 года назад
@@JackofSome No problem, I am not judging. Actually I Just switched my spacemacs to develop branch and I am starting using doom modeline. So I just want to get some idea of configuration. BTW mine is not messy, it's super messy. 😜
@bayesianmonk
@bayesianmonk 4 года назад
Use pluto instead of jupyter.
@JackofSome
@JackofSome 4 года назад
Pluto didn't exist yet 😅 It's on my list to try out though.
@juliastruts7128
@juliastruts7128 4 года назад
You just have to learn Julia by getting to know me
@JackofSome
@JackofSome 4 года назад
How well can you manage packages?
@sketch1625
@sketch1625 3 года назад
Well then
@brettknoss486
@brettknoss486 3 года назад
Is a character a symbol?
@patrickbateman7665
@patrickbateman7665 3 года назад
Julia ?? You mean Python Sister ?
@__-kd8oz
@__-kd8oz 3 года назад
>Julia indexes from 1 Yeh... not thank you. goodbye.
@shacharh5470
@shacharh5470 2 года назад
Julia is probably my favourite language but if there's one criticism I can understand is its use of 1-indexing by default. It was strange for me too, having used python, C and Java before that. But I don't think it's a deal breaker, bearing mind all the features of Julia. And I can also understand the reasoning behind this choice: Julia is primarily for mathematical and scientific computation; and 1-indexing is more like maths speak. You don't say "the zeroth entry in this matrix" or "the zeroth row in this data frame", you say "the first entry in this matrix", "the first row in this data frame" etc. languages like C use 0-indexing because the index is an offset from an address where the array begins. That is, array[i] is really a syntactic sugar way of writing *(array+i). Fine, that makes sense if you're programming at a low level language. It's not necessary with a high level abstraction you get with Julia. In fact, it's not necessary in python either (and python doesn't even have arrays builtin! the nth item in a python list isn't offset by n units from whatever, it can be stored anywhere in memory!), it's just to uphold the tradition/convention (which is ironic for possibly the only language with meaningful whitespace/indentation but nm)
@JackofSome
@JackofSome 2 года назад
It's not __actually__ a sole deal breaker for anyone. I coded for years in Matlab, which was one of the inspirations for Julia. That's the real reason it has 1 based counting. There's nothing wrong with that honestly، just like there's nothing wrong with 0 based counting. Julia has a number of other niggling issues though and its syntax is a bit all over the place. All that combined with "oh crap I also have to completely change my mental model for indexing now" probably turns away a fair bit of people.
Далее
Make Python code 1000x Faster with Numba
20:33
Просмотров 442 тыс.
I'll do it for you!
00:37
Просмотров 2,7 млн
Five Amazing Python Libraries you should be using!
17:19
Zero2Hero intensive Julia workshop
2:30:02
Просмотров 22 тыс.
zig will change programming forever
9:34
Просмотров 282 тыс.
Mojo Lang… a fast futuristic Python alternative
4:14
Automatic Differentiation in 10 minutes with Julia
11:24