Odin - First Impression [Programming Languages Episode 18]

  Рет қаралды 4,477

Mike Shah

Mike Shah

Күн бұрын

Пікірлер: 57
@guillermomoreira5601
@guillermomoreira5601 8 ай бұрын
You should definitely try some graphics related project with Odin for part 2!
@MikeShah
@MikeShah 8 ай бұрын
A nice idea!
@ska4dragons
@ska4dragons 6 ай бұрын
Just found Odin. Now I found your channel. Great video.
@MikeShah
@MikeShah 6 ай бұрын
Cheers! Welcome aboard!
@Caareystore153
@Caareystore153 8 ай бұрын
Finally!!!! ODIN!!!
@MikeShah
@MikeShah 8 ай бұрын
A long requested language :)
@GaryChike
@GaryChike 8 ай бұрын
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 8 ай бұрын
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 8 ай бұрын
@@MikeShahprobably because it started off as a Pascal clone
@LukeAGuest
@LukeAGuest 8 ай бұрын
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.
@alaindevos4027
@alaindevos4027 8 ай бұрын
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 8 ай бұрын
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
@thegameoflife9179
@thegameoflife9179 8 ай бұрын
Got to be up there with Zig, thanks for the video
@MikeShah
@MikeShah 8 ай бұрын
Cheers!
@kcvinu
@kcvinu 8 ай бұрын
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 8 ай бұрын
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 8 ай бұрын
@@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 8 ай бұрын
Very neat@@kcvinu
@GaryChike
@GaryChike 8 ай бұрын
@@kcvinuNow someone needs to invent a language called 'PO' 🤖
@xhivo97
@xhivo97 8 ай бұрын
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 8 ай бұрын
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 8 ай бұрын
@@GingerGames -- do you want to come on the channel and talk about Odin some time?
@GingerGames
@GingerGames 8 ай бұрын
@@MikeShah absolutely! It would be a pleasure.
@dolorsitametblue
@dolorsitametblue 8 ай бұрын
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 =(.
@dolorsitametblue
@dolorsitametblue 8 ай бұрын
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 8 ай бұрын
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!@@dolorsitametblue
@bersK00
@bersK00 8 ай бұрын
@@dolorsitametblue 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.
@dolorsitametblue
@dolorsitametblue 8 ай бұрын
@@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.
@luisalamo2658
@luisalamo2658 8 ай бұрын
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 8 ай бұрын
Cheers! Yes I do have a video on free pascal (with Lazarus IDE) in the playlist in the description
@luisalamo2658
@luisalamo2658 8 ай бұрын
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 8 ай бұрын
Agreed -- always great to learn from other languages and bring those findings to your favorite language :)@@luisalamo2658
@Himanshu-ro2ch
@Himanshu-ro2ch 8 ай бұрын
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 8 ай бұрын
Cheers, thank you for the kind words!
@defnlife1683
@defnlife1683 3 ай бұрын
I kinda like that it reads like Go. It sorta feels like "What if we had GO without GC, but not CGo."
@MikeShah
@MikeShah 3 ай бұрын
Indeed -- overall a very clean language 🙂
@defnlife1683
@defnlife1683 3 ай бұрын
@@MikeShah yeah, hopefully catches on. Many languages that are very nice and don't catch on. This could carve out a niche in performance software /gaming where people don't want to deal with longer dev time like in C++ / Rust.
@MikeShah
@MikeShah 3 ай бұрын
@@defnlife1683 I think at least for indie game developers (especially in the Handmade community), there seems to be folks taking a series look at Odin.
@defnlife1683
@defnlife1683 3 ай бұрын
@@MikeShah yeah the handmade community is very active. all good things
@Ptr-NG
@Ptr-NG 7 ай бұрын
When Julia will get its chance!? We've waiting, Mike!!
@MikeShah
@MikeShah 7 ай бұрын
It's been a top requested language :)
@thegameoflife9179
@thegameoflife9179 8 ай бұрын
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 8 ай бұрын
Does anyone know if Odin can discard a returned value?
@MikeShah
@MikeShah 8 ай бұрын
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 8 ай бұрын
@@MikeShah thanks Mike, yep hopefully there will be a way to do it 👍
@front923
@front923 8 ай бұрын
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
@andrewdunbar828
@andrewdunbar828 7 ай бұрын
Super duper somewhat slightly new
@jaguerra
@jaguerra 5 ай бұрын
You brought me to D, are you considering abandoning D?
@MikeShah
@MikeShah 5 ай бұрын
This series is about exploring other languages for fun. 🙂Not leaving D, and often learning from other languages how to improve my overall programming. Odin itself is a nice language!
@naranyala_dev
@naranyala_dev 4 ай бұрын
gleam, gleam, gleam
@MikeShah
@MikeShah 4 ай бұрын
Will consider it!
@_slier
@_slier 8 ай бұрын
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 8 ай бұрын
I need to figure out how to get my hands on Jai, as it is also intriguing.
@SirRichard94
@SirRichard94 Ай бұрын
I agree zig is uglier, odin is quite pretty. But complexity? I'd argue it's less complex. With zig what you see is what it is, that is it's main appeal. Odin has a lot of hidden complexities here and there. Some hidden dereferencing, a whole hidden context pointer in every function call. Was it really necessary to make maps part of the language and not the standard library? The using keyword for polymorphism, etc. These all point to odin being made exclusively for and by ginger Bill. This is not necessarily bad, but it is why zig is more popular imo. Zig is a bit more general and transparent.
@Hoowwwww
@Hoowwwww Ай бұрын
​@@SirRichard94 i agree with that, the hidden context pointer passed to every functions is weird, you never know if a function will allocate or no i prefer odin syntax, but overall i prefer zig excplicitness, i just wish it had more sugar
Friends make memories together part 2  | Trà Đặng #short #bestfriend #bff #tiktok
00:18
When mom gets home, but you're in rollerblades.
00:40
Daniel LaBelle
Рет қаралды 100 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 269 #shorts
00:26
Interview with Odin language creator gingerBill
22:08
Context Free
Рет қаралды 28 М.
Carbon Language - Final Conclusions (It's Probably Not For You)
25:27
Programming’s Greatest Mistakes by Mark Rendle
54:58
Devoxx
Рет қаралды 2,1 М.
Rust - First Impression [Programming Languages Episode 3]
1:07:00
Mike Shah
Рет қаралды 2,5 М.
Understanding arrays in Odin
29:37
Karl Zylinski
Рет қаралды 1,4 М.
11 Reasons to Program using Odin in 12 Minutes
11:13
Dylan Falconer
Рет қаралды 6 М.
Jai vs Odin systems programming languages (Non-spicy takes!)
20:10
Context Free
Рет қаралды 75 М.
Intro to the Zig Programming Language • Andrew Kelley • GOTO 2022
50:14
Odin Programming Language: An Introduction - 2020-11-26
46:02
gingerBill
Рет қаралды 35 М.
Friends make memories together part 2  | Trà Đặng #short #bestfriend #bff #tiktok
00:18