[Programming Languages] Episode 18 - First Impression - Odin

  Рет қаралды 2,597

Mike Shah

Mike Shah

3 ай бұрын

►Full First Look Series Playlist: • Programming Languages ...
►Find full courses on: courses.mshah.io/
►Join as Member to Support the channel: / @mikeshah
►Lesson Description: In this lesson we take a look at the Odin programming language -- a language for 'sane software development'. Odin is a general-purpose and systems programming language. It is clear to see it is inspired with the simplicity and readability of languages like Go and pascal. There are lots of mathematical types built-in, and the ease at which mathematical operations can be done which are common to games and graphics applications is very apparent. This remains one of the longest videos in this series, and I think there is yet more to check out! Let me know what resources/tools I missed that others should know about in the comments below!
►KZbin Channel: / mikeshah
►Please like and subscribe to help the channel!
►Join our free community: courses.mshah.io/communities/...

Пікірлер: 45
@guillermomoreira5601
@guillermomoreira5601 3 ай бұрын
You should definitely try some graphics related project with Odin for part 2!
@MikeShah
@MikeShah 3 ай бұрын
A nice idea!
@ska4dragons
@ska4dragons Ай бұрын
Just found Odin. Now I found your channel. Great video.
@MikeShah
@MikeShah Ай бұрын
Cheers! Welcome aboard!
@user-fr1no2ir3r
@user-fr1no2ir3r 3 ай бұрын
Finally!!!! ODIN!!!
@MikeShah
@MikeShah 3 ай бұрын
A long requested language :)
@GaryChike
@GaryChike 3 ай бұрын
If I had to choose between the new self-professed C replacements, I'd choose Odin. To me, Odin is syntactically easier to look at than the alternatives.
@MikeShah
@MikeShah 3 ай бұрын
The syntax in Odin is really well thought out from what I've explored. Agreed it is just nice to work and think in!
@GaryChike
@GaryChike 3 ай бұрын
@@MikeShahprobably because it started off as a Pascal clone
@LukeAGuest
@LukeAGuest 3 ай бұрын
I started making notes (ramblings) about creating a new programming language derived from Ada and Oberon-2 but including array programming. I have the mess 😀 up on gh. I should've added, I called it Orenda and it has a test ANTLR4 parser to experiment with some syntax.
@thegameoflife9179
@thegameoflife9179 3 ай бұрын
Got to be up there with Zig, thanks for the video
@MikeShah
@MikeShah 3 ай бұрын
Cheers!
@xhivo97
@xhivo97 3 ай бұрын
Great video to start the day with! That compile time was suspiciously fast could it be the repo comes with a binary? If that was a clean build I wonder what magic they pulled to make it happen. I can't think of any suggestions on what to do for a sequel but I'd love one. I guess what I remember being cool about odin was their linalg package being so complete and also shader-like swizzling syntax and of course, making SOA's simple, I've never used them but I imagine they make the code much less readable if the language doesn't support them with the same syntax as a normal struct. For example I like .x, .y, .z for accessing vector elements but in C++ I believe there's downsides to using a struct like that and you have to fight the language to get the benefits of the syntax and of the potential compiler optimizations on arrays. Another thing I wonder is how build times scale, if I can get away with always doing a full build that would be great IMO.
@GingerGames
@GingerGames 3 ай бұрын
The compile times for the compiler are that fast. We just don't do anything dumb nor have any other dependency than LLVM.
@MikeShah
@MikeShah 3 ай бұрын
@@GingerGames -- do you want to come on the channel and talk about Odin some time?
@GingerGames
@GingerGames 3 ай бұрын
@@MikeShah absolutely! It would be a pleasure.
@alaindevos4027
@alaindevos4027 2 ай бұрын
Thanks for posting these videos on lesser known programming languages. But every answer gives raise to ten more questions. For instance which kind of language should i choose for which kind of problem. Knowing each language has it's strong and weak points.
@MikeShah
@MikeShah 2 ай бұрын
Cheers! This is a great point -- no language is perfect. Sometimes we pick a language that's general purpose enough to complete most tasks. As we get more proficient, we tend to like that language more as well
@janAkaliKilo
@janAkaliKilo 3 ай бұрын
18:21 > I might need to download glibc Famous last words, LOL. That's just "distro is too old" error, and the only fix is to install from sources or update. Most software hosted on github uses default CI runners and recently Microsoft have deprecated "Ubuntu 18.04" VMs. Now you need atleast Ubuntu 20.04 / Debian 11 or you will see this GLIBC error far too often. Upd. Odin uses 'ubuntu-latest' runner, so Ubuntu 22.04 / Debian Sid is the minimum supported OS for binary =(.
@janAkaliKilo
@janAkaliKilo 3 ай бұрын
To elaborate on why this issue exists: - GLIBC is always dynamically linked. - If you link GLIBC statically, it would conflict with host GLIBC. - You can't supply another GLIBC, without a lot of hacking and ugly workarounds. - GLIBC is backward-compatible, but not forward-compatible. General Workarounds (for developers, not users, unfortunately): - compile your code on oldest distro you want to support - use static libc (e.g. musl) - for example, Nim does this for it's stable releases. - use Zig compiler to compile your C code (or C IR if your language supports it) - it has cool feature of linking with GLIBC *upto* some version. It makes compiler use features present in GLIBC version X and no further.
@MikeShah
@MikeShah 3 ай бұрын
Great information! Having just updated to 20.04, it seems I should do another round. I wrestled with glibc a few times in this series, so good to have a complete answer as to why :) -- cheers again!@@janAkaliKilo
@bersK00
@bersK00 2 ай бұрын
@@janAkaliKilo Wouldn't a compiler be a prime candidate for linking glibc statically? I would imagine that you would want complete control of the binary & its dependencies, especially when it's a compiler.
@janAkaliKilo
@janAkaliKilo 2 ай бұрын
@@bersK00 yes and no. It's certainly nice to have zero dynamic dependencies. But GLIBC is faster, stable and more widely supported. And if your concern is malware, dynamic or static linking doesn't matter, if the system is compromised - you're screwed anyway.
@kcvinu
@kcvinu 3 ай бұрын
That was a great tour! Do you know how fast is the compilation ? I mean, it's amazing!. When I did a project in D, everyone said that D's compilation speed is amazing, but I feel the real speed is in Odin's compilation. Because I did the same project in Odin too. It's 3x faster than D. Well, in this 1 hour, you missed some important points. One is @(deferred_out=) attribute. If you give a proc name here, then that proc will executed when this proc's caller's scope ended. Isn't it amazing ? And you will get the return value of this proc in that deferred_out proc also. So you can do the house keeping safely.
@MikeShah
@MikeShah 3 ай бұрын
Very cool -- thanks for sharing! I haven't bench marked the compilation times -- I imagine in D some time is spent doing CTFE or template generation. Would be interesting to have a large benchmark for multiple languages to compare.
@kcvinu
@kcvinu 3 ай бұрын
@@MikeShah Yeah. I did same project in C3 also. IMO, Odin and C3 is compiling in blazing speed. Please take a look at C3 also.
@MikeShah
@MikeShah 3 ай бұрын
Very neat@@kcvinu
@GaryChike
@GaryChike 3 ай бұрын
@@kcvinuNow someone needs to invent a language called 'PO' 🤖
@luisalamo2658
@luisalamo2658 2 ай бұрын
Do you have a video in this Series about Delphi/Pascal? Great content here, thanks for your point of view, I feel my self weird being the only one of my IT friend who likes to taste new programming languages and its stuff
@MikeShah
@MikeShah 2 ай бұрын
Cheers! Yes I do have a video on free pascal (with Lazarus IDE) in the playlist in the description
@luisalamo2658
@luisalamo2658 2 ай бұрын
At the end Java have been the programming language that allow me bring food to the table for the last 8 years, however is always fun to see what kind of things has thenew programming languages to offer in this land
@MikeShah
@MikeShah 2 ай бұрын
Agreed -- always great to learn from other languages and bring those findings to your favorite language :)@@luisalamo2658
@Himanshu-ro2ch
@Himanshu-ro2ch 3 ай бұрын
Hi Mike! I really learn a lot from your videos. Could you maybe review lua in a future video. Thank you very much.
@MikeShah
@MikeShah 3 ай бұрын
Cheers, thank you for the kind words!
@andrewdunbar828
@andrewdunbar828 Ай бұрын
Super duper somewhat slightly new
@Ptr-NG
@Ptr-NG 2 ай бұрын
When Julia will get its chance!? We've waiting, Mike!!
@MikeShah
@MikeShah 2 ай бұрын
It's been a top requested language :)
@thegameoflife9179
@thegameoflife9179 3 ай бұрын
Forgot to say... hopefully there will be more programming examples out there in Odin over time otherwise i can see peeps struggling with some of it
@thegameoflife9179
@thegameoflife9179 3 ай бұрын
Does anyone know if Odin can discard a returned value?
@MikeShah
@MikeShah 3 ай бұрын
A quick 'ctrl+f' does not find 'discard' here www.gingerbill.org/odin/docs/ -- but perhaps there is a mechanism others will know?
@thegameoflife9179
@thegameoflife9179 3 ай бұрын
@@MikeShah thanks Mike, yep hopefully there will be a way to do it 👍
@front923
@front923 3 ай бұрын
You can both discard (assign to null '_') and enforce them: @(require_results) foo :: proc() -> {int, int} { return 1, 2 } a, b := foo() _, c := foo() _, _ := foo() foo() // not valid: 'foo' requires that its results must be handled
@_slier
@_slier 2 ай бұрын
The only worthy C replacement..Odin should get a lot more attention compare to other language particularly zig.. zig has super ugly syntax and quite complex and overhype.. only Odin, C3 and jai is worthy c competitor..
@MikeShah
@MikeShah 2 ай бұрын
I need to figure out how to get my hands on Jai, as it is also intriguing.
😱СНЯЛ СУПЕР КОТА НА КАМЕРУ⁉
00:37
OMG DEN
Рет қаралды 1,8 МЛН
Which one will take more 😉
00:27
Polar
Рет қаралды 81 МЛН
Маленькая и средняя фанта
00:56
Multi DO Smile Russian
Рет қаралды 2,9 МЛН
Nim 2.0 Release! | Prime News
20:03
ThePrimeTime
Рет қаралды 58 М.
[Programming Languages] Episode 2 - First Impression - V language
1:00:11
Jai vs Odin systems programming languages (Non-spicy takes!)
20:10
Context Free
Рет қаралды 66 М.
Odin Programming Language: An Introduction - 2020-11-26
46:02
gingerBill
Рет қаралды 31 М.
5 reasons why Odinlang is great for gamedev ✨
10:10
Karl Zylinski
Рет қаралды 13 М.
[Programming Languages] Episode 22 - First Impression - lua
51:21
What Makes Rust Different?
12:38
No Boilerplate
Рет қаралды 194 М.
Interview with Odin language creator gingerBill
22:08
Context Free
Рет қаралды 27 М.
Apple ХОЧЕТ, чтобы iPhone ЛОМАЛИСЬ чаще?
0:47
ÉЖИ АКСЁНОВ
Рет қаралды 1,3 МЛН
Xiaomi Note 13 Pro по безумной цене в России
0:43
Простые Технологии
Рет қаралды 1,3 МЛН
СЛОМАЛСЯ ПК ЗА 2000$🤬
0:59
Корнеич
Рет қаралды 2,3 МЛН
Android top🔥
0:12
ARGEN
Рет қаралды 1,4 МЛН