Rickard Andersson (gonz)
Rickard Andersson (gonz)
  • 78
  • 107 841
Translating C++ into Odin - Classes
In this video I go over some of the key points of translating C++ classes into Odin code and the trade-offs that are associated with the differences.
มุมมอง: 2 388

วีดีโอ

Interview with Viktor Löfgren from Marginalia.nu
มุมมอง 1.1K10 หลายเดือนก่อน
I interviewed Viktor Löfgren, creator of the marginalia.nu search engine, to talk about why you might build your own search engine, his ideas about software development and writing about the software development experience. Links: You can find Viktor's search engine here: search.marginalia.nu/ Viktor's writings in full can be found here: www.marginalia.nu/log/ - The Astrolabe Part I: Lenscraft ...
[Vim Colorscheme Compiler] Testing a real world file and finishing up
มุมมอง 25111 หลายเดือนก่อน
In this video we test my real syntax file that I've defined for my colorscheme and make sure that everything looks good for it. We also make the actual binary that takes a file and spits out the compiled output to standard out. Part 5 of my Vim Colorscheme Compiler playlist: www.youtube.com/watch?list=PLEQTpgQ9eFCH8ojNpcQIcMAxrp_oyL_zF
[Vim Colorscheme Compiler] Parsing and outputting colorschemes
มุมมอง 10111 หลายเดือนก่อน
In this video we tie together the different parsing steps into a big `parse_file` procedure that can read a file. Part 4 of my Vim Colorscheme Compiler playlist: www.youtube.com/watch?list=PLEQTpgQ9eFCH8ojNpcQIcMAxrp_oyL_zF
[Vim Colorscheme Compiler] Parsing group names and colors
มุมมอง 9211 หลายเดือนก่อน
In this video we parse our syntax group names and color values. Part 3 of my Vim Colorscheme Compiler playlist: www.youtube.com/watch?list=PLEQTpgQ9eFCH8ojNpcQIcMAxrp_oyL_zF
[Vim Colorscheme Compiler] Parsing colorscheme attributes
มุมมอง 17911 หลายเดือนก่อน
In this video we parse our colorscheme attributes such as "clear = true" and "background = dark". Part 2 of my Vim Colorscheme Compiler playlist: www.youtube.com/watch?list=PLEQTpgQ9eFCH8ojNpcQIcMAxrp_oyL_zF
[Vim Colorscheme Compiler] Problem description & defining our types
มุมมอง 44011 หลายเดือนก่อน
In this video we go over what the actual problem we are trying to solve is as well as define some initial types for our parser. Part 1 of my Vim Colorscheme Compiler playlist: www.youtube.com/watch?list=PLEQTpgQ9eFCH8ojNpcQIcMAxrp_oyL_zF
[Vim Colorscheme Compiler] Thanks to Patrons
มุมมอง 20211 หลายเดือนก่อน
Thank you to everyone who is helping out! :) Part 0 of my Vim Colorscheme Compiler playlist: www.youtube.com/watch?list=PLEQTpgQ9eFCH8ojNpcQIcMAxrp_oyL_zF
Memory layout, performance and the #soa keyword in Odin
มุมมอง 1.6K11 หลายเดือนก่อน
In this video I go over some tips for how to experiment with memory layout in order to get more performance out of your code in the Odin programming language. Join the Discord here: discord.gg/mNwGSUQJ A big thanks to all my patrons: 0x08: Jeff Ward Matthew Crews Pavlin Nedelchev 0x04: Ed Yu Znaniye Валентин Атанасов 0x02: Dmytro Sereda Михаил Добрев
Differences between Odin and Zig
มุมมอง 18K11 หลายเดือนก่อน
Differences between Odin and Zig
Announcement: $4 and $8 tiers on Patreon
มุมมอง 10311 หลายเดือนก่อน
Announcement: $4 and $8 tiers on Patreon
Getting and keeping momentum
มุมมอง 62811 หลายเดือนก่อน
Getting and keeping momentum
Object-Oriented Programming in Odin
มุมมอง 3.3K11 หลายเดือนก่อน
Object-Oriented Programming in Odin
Patreon and Discord server
มุมมอง 14111 หลายเดือนก่อน
Patreon and Discord server
Languages I considered using before Odin
มุมมอง 12K11 หลายเดือนก่อน
Languages I considered using before Odin
Series announcement: What happens when...?
มุมมอง 265ปีที่แล้ว
Series announcement: What happens when...?
[Odin in Practice] Setting up UI hot-reloading with shared libraries
มุมมอง 1Kปีที่แล้ว
[Odin in Practice] Setting up UI hot-reloading with shared libraries
[Odin in Practice] Making a `draw_panel` abstraction for our UI
มุมมอง 267ปีที่แล้ว
[Odin in Practice] Making a `draw_panel` abstraction for our UI
[Odin in Practice] Addendum to last video - Fixing our literal & match output
มุมมอง 81ปีที่แล้ว
[Odin in Practice] Addendum to last video - Fixing our literal & match output
[Odin in Practice] Reading data blocks and showing them in the UI
มุมมอง 354ปีที่แล้ว
[Odin in Practice] Reading data blocks and showing them in the UI
[Odin in Practice] Making a file picker with ImGui for our decompression UI
มุมมอง 641ปีที่แล้ว
[Odin in Practice] Making a file picker with ImGui for our decompression UI
[Odin in Practice] LZ4 Visualization UI with ImGui - 1
มุมมอง 2.7Kปีที่แล้ว
[Odin in Practice] LZ4 Visualization UI with ImGui - 1
New Odin series announcement + What is the channel about?
มุมมอง 1.2Kปีที่แล้ว
New Odin series announcement What is the channel about?
Bitwise operations - Extracting from and setting values in bytes
มุมมอง 327ปีที่แล้ว
Bitwise operations - Extracting from and setting values in bytes
Byte order / Endianness
มุมมอง 381ปีที่แล้ว
Byte order / Endianness
Bytes, binary and hexadecimal
มุมมอง 345ปีที่แล้ว
Bytes, binary and hexadecimal
Stream, Reader and data pointers
มุมมอง 1.1Kปีที่แล้ว
Stream, Reader and data pointers
Types and data in Odin
มุมมอง 1.4Kปีที่แล้ว
Types and data in Odin
FFI example in Odin: Using Odin code in Erlang/Elixir
มุมมอง 831ปีที่แล้ว
FFI example in Odin: Using Odin code in Erlang/Elixir
Using functions from other languages (FFI) in Odin
มุมมอง 1.2Kปีที่แล้ว
Using functions from other languages (FFI) in Odin

ความคิดเห็น

  • @GreggHarris-gm7ef
    @GreggHarris-gm7ef 9 วันที่ผ่านมา

    Be a cool guy and release the code to github! There's a need for a websocket library on Odin (I need one).

  • @heavymetalmixer91
    @heavymetalmixer91 10 วันที่ผ่านมา

    Will you make that video about interop with C++ libraries you mentioned at 30:43? I see this video was made in January.

  • @ExpertOfNil
    @ExpertOfNil 16 วันที่ผ่านมา

    I'm using Odin to learn CS fundamentals. I've hit pay dirt with these videos!

  • @albizutoday2754
    @albizutoday2754 18 วันที่ผ่านมา

    Have you considered getting a real job?

    • @GreggHarris-gm7ef
      @GreggHarris-gm7ef 18 วันที่ผ่านมา

      says the loser who posts troll comments on the internet ol

  • @efv
    @efv 21 วันที่ผ่านมา

    I found that when the tests are run, the test runner reports memory leaks coming from `parse_config`. It seems you need to `defer json.destroy_value(json_value)` to avoid the leak. Perhaps you explain lifetime and memory management in subsequent videos I haven't seen yet. Anyway - thanks for the content. Picking up Odin as an exercise, your series is super helpful.

  • @rodrigoetoobe2536
    @rodrigoetoobe2536 27 วันที่ผ่านมา

    minute 17:40 if you are using vim, there was a command to grab the internal part of a whole funciton, I think it was " v i { " or v i } no matter where your cursor is

  • @marcmichel8855
    @marcmichel8855 28 วันที่ผ่านมา

    Nice to see Dlang and Crystal mentionned. You still missed Janet, C3, Hare, Vlang and others ;)

  • @R00kTruth
    @R00kTruth หลายเดือนก่อน

    I'll stick with C, all of these other useless languages, don't fix anything, they don't make anything easier, it's all the same concept but more mess

    • @mccGoNZooo
      @mccGoNZooo หลายเดือนก่อน

      As someone who has written a fair amount of C I can see where you're coming from and broadly I agree with the sentiment, but I can say that Odin definitely solves more problems than it introduces. Most things are alike in Odin and C and where there are differences I would say it's fairly easy to make a case for the Odin way being a distinct upgrade: - Actual string types are nice - Slices (fat pointers) are good to have as a default - Actual array types that don't decay to pointers meaninglessly in general - Real union types that the compiler actually helps you manage - Standardized ideas about what an allocator is Honestly, the list goes on. All of the above are reasonably good wins in my book, and worth using Odin instead for. We still use plenty of C-like constructs in our programs, because that's the best way to do things, but we leverage the above stuff to get more managable programs out of the process.

    • @R00kTruth
      @R00kTruth 29 วันที่ผ่านมา

      ​@@mccGoNZooo Well You have made some good points, but I will have to see some more well explained examples before I'll make my mind up..

    • @mccGoNZooo
      @mccGoNZooo 29 วันที่ผ่านมา

      @@R00kTruth It's up to you to inform yourself, my main point is that Odin provides many upsides. No one is forcing you to switch to any language in the end and you should use whatever you're comfortable with. The statement that Odin/Zig don't provide any upsides is false, however.

    • @R00kTruth
      @R00kTruth 29 วันที่ผ่านมา

      ​@@mccGoNZooo to be honest, there might be upsides to odin, but I am one of these people who will need to see a massive improvement before switching, for now I can't see any benefit's from my own perspective, I could be wrong but hey, that's life, also with my own project that is heavily using ASM and some C, I would most likely have a brain(stack) overflow trying to learn something else on top.

    • @mccGoNZooo
      @mccGoNZooo 29 วันที่ผ่านมา

      @@R00kTruth The kind of peace of mind and velocity you gain from using simple things in simple ways is astounding, and doubly so when it's something you're intimately familiar with down to the very core, so I think it's a very reasonable thing to simply stick to C. The main reason I looked to Zig and later Odin was really that I saw an opportunity to get back to lower-level programming and still get access to certain things that I had (conceptually) grown accustomed to (real union types managed by the compiler being one example) and be rid of some of the warts that I had previously identified, so learning a new language made sense. Happily I'll say that Odin represents (to me) the epitome of "You don't need much more than C, and you certainly don't need anything more than procedural/imperative code". From a semantics standpoint we (on the project I work on and have worked on since December last year) largely think in terms of C, and we treat lots of concepts really mostly like we're writing C, and we write aggressively simple code using only simple mechanisms that can be traced right back to C, with only things like compiler-managed tags for unions being the exception, and error handling that carries more context with it, for the most part.

  • @azmanic
    @azmanic หลายเดือนก่อน

    So correct me if I am wrong but Odin doesn't allow circular package imports. So that means on a large project you basically just have to have a single directory full of hundreds of Odin files all with the same package name that can't be split into sub directories just to keep things tidy (and remain as part of the same package or a namespaced part of the package)?

    • @mccGoNZooo
      @mccGoNZooo หลายเดือนก่อน

      No, you can still have imports, they just can't be circular, i.e. you can't import something that imports the current file, transitively or directly. It's not particularly hard to avoid circular imports and it's still very useful to have packages

  • @themcchuck8400
    @themcchuck8400 หลายเดือนก่อน

    When doing introductory videos, please don't write code for other languages. Just stick to coding in the language you're teaching. I have no idea now if "undefined" works in Odin or Zig or both.

    • @mccGoNZooo
      @mccGoNZooo หลายเดือนก่อน

      No, I think I'm fine with doing it this way for the most part. It's already helped several people to contrast the way things work with what they already know, and both instances of it in this video are things worth talking about so that viewers can store it in their mind for later understanding if it's something they're not currently getting. As for `undefined`, I've rewatched the video and there really is no reasonable ambiguity to it in the video. You can't use the word "undefined" in Odin, but you can use `---`, sort of, except you shouldn't, because you won't have uninitialized memory anyway since everything is zero-initialized... So just don't set a value at all and you'll be fine; this is what I mean in the section of the video where I talk about setting only the things that "matter right now".

  • @albizutoday2754
    @albizutoday2754 หลายเดือนก่อน

    Thanks for the content!

  • @albizutoday2754
    @albizutoday2754 หลายเดือนก่อน

    Thanks for the content

  • @albizutoday2754
    @albizutoday2754 หลายเดือนก่อน

    People can talk about go without saying backend, python ai, rust …. Femboy,woke, etc

    • @mccGoNZooo
      @mccGoNZooo หลายเดือนก่อน

      I'll be honest, I have no idea what this comment is really trying to say.

    • @GreggHarris-gm7ef
      @GreggHarris-gm7ef 20 วันที่ผ่านมา

      @@mccGoNZooo no one knows what it means but its provocative

  • @Naton
    @Naton หลายเดือนก่อน

    i too had long compile in rust, but changing the linker drops my compile time from 16s to 0.2s

    • @mccGoNZooo
      @mccGoNZooo หลายเดือนก่อน

      That's probably a reasonable suggestion for people who are stuck with Rust, but I think there are better directions to pick as base defaults in the end.

  • @KikkerFish
    @KikkerFish หลายเดือนก่อน

    Thx for the video!

    • @mccGoNZooo
      @mccGoNZooo หลายเดือนก่อน

      Thank you for watching! :)

  • @ExpertOfNil
    @ExpertOfNil หลายเดือนก่อน

    How are you getting good syntax highlighting in Neovim? My syntax highlighting is very minimal using OLS (via Mason) and ols.json with symbols and tokens enabled. Great videos by the way! Thank you!

    • @ExpertOfNil
      @ExpertOfNil หลายเดือนก่อน

      Nevermind, I figured it out from another comment where you posted your Neovim config files. Turns out I needed to add Odin to treesitter!

  • @alst4817
    @alst4817 หลายเดือนก่อน

    Really great content, thanks! One question though: it struck me that Odin is a better replacement for c++ than c, although it can certainly do that too. Any thoughts on this?

    • @mccGoNZooo
      @mccGoNZooo หลายเดือนก่อน

      No, I think Odin is far too reduced in terms of language functionality to be a replacement for C++ (basically no overloading, certainly no operator overloading, etc., no classes, just structs and procedures). On top of that literally all of the behavior is exactly like C and not C++ (no RAII). Odin has very little in common with C++ and basically everything in common with C, so I would never recommend it to someone who likes C++.

    • @alst4817
      @alst4817 หลายเดือนก่อน

      ⁠@@mccGoNZooothanks for the answer! Sorry, it seems like my language wasn’t very precise: I don’t mean that Odin is like c++ but better, but rather it seems to occupy a use case that is similar to c++ but without the oop classes and complexity that I personally don’t like! i.e. it’s a good fit for game development and systems stuff that is currently occupied by c++, not c. By the way, I come from a computational modelling background so I’m using Julia and Python at the moment, but like the look of Odin for making binaries with simple memory management system.

    • @mccGoNZooo
      @mccGoNZooo หลายเดือนก่อน

      @@alst4817 In terms of use cases I think they cover about the same space, yes, but I think games are only really written in C++ because of historical baggage like C99 being famously unsupported by the visual studio compiler for a very long time and you technically basically had to write C++. Most systems programming elsewhere is done more in C, I think; at least if you weigh importance and size of project over just number of projects. What are you thinking of making with Odin, by the way?

    • @alst4817
      @alst4817 หลายเดือนก่อน

      @@mccGoNZoooyes, historical path dependency can create strange outcomes! I don’t like Python much, lisp is a much better scripting language but that’s where a lot of science is at the moment… I research complex systems, so I make traditional models and ABM. Julia is great for that, but I would like to make something really large, and pass the binary around without the mess of non-technical colleagues dealing with the JIT. Plus, it looks cool!

  • @rodrigoetoobe2536
    @rodrigoetoobe2536 หลายเดือนก่อน

    I found the "or_return" , very glitchy. I remember I got problems but I dont remember the exact conditions, its like the or_return gets confused with booleans, sometimes it treats ok:bool in one way and sometimes in another way, I defaulted to the ugly go lang handling of flow: extensionsCount,extensionNames,ok1:=vk_GetInstanceExtensions() defer delete(extensionNames) if !ok1 { return false } extensionsPropCount,extensionPropNames,ok2:=vk_GetInstanceExtensionsProperties() defer delete(extensionPropNames) if !ok2 { return false } createInfo, ok3:= vk_InstanceCreateInfo(&appInfo,&extensionNames,&extensionPropNames) if !ok2 { return false }

  • @JimBalter
    @JimBalter หลายเดือนก่อน

    played at 1.25 speed and still boring , focused on the wrong things, overly specific examples rather than general descriptions of differences

    • @mccGoNZooo
      @mccGoNZooo หลายเดือนก่อน

      Since you seem to be in the know, what are the right things to focus on when it comes to the differences between Odin and Zig?

    • @KikkerFish
      @KikkerFish หลายเดือนก่อน

      Have you tried playing it at 1.5 speed?

    • @mccGoNZooo
      @mccGoNZooo หลายเดือนก่อน

      From the lack of response we can gather: As expected, @JimBalter is a loser that doesn't actually know anything and his opinion is based on that fact. He can't make a good argument about what the differences are, hence why he clicked on the video to hear what someone who actually works with these things says.

  • @saravanannainarsp
    @saravanannainarsp 2 หลายเดือนก่อน

    Hi sir, My Samsung Galaxy j6 Could not do normal boot, invalid kernel length How to flash without data loss? Please help me..

    • @mccGoNZooo
      @mccGoNZooo 2 หลายเดือนก่อน

      This is not a technical support channel, sorry. I recommend looking for a repair shop for mobile phones.

    • @saravanannainarsp
      @saravanannainarsp 2 หลายเดือนก่อน

      @@mccGoNZooo thank you sir😊

  • @zayamoyatv
    @zayamoyatv 2 หลายเดือนก่อน

    very cool, thank you for this video and thank you Odin for this feauture

    • @mccGoNZooo
      @mccGoNZooo หลายเดือนก่อน

      It's very useful indeed! :)

  • @MrApplewine
    @MrApplewine 2 หลายเดือนก่อน

    What about V and Hare systems programming languages?

    • @mccGoNZooo
      @mccGoNZooo 2 หลายเดือนก่อน

      I've only looked Hare very briefly and it doesn't seem to have any concept of custom allocators, which makes it very awkward to use and makes me question the users' and creator's familiarity with the concerns that I usually have with systems level code. It's not a good look for any language that wants to make memory management sane and possible to make fast and efficient. Z I know nothing about. The list of languages is not exhaustive; there are plenty of languages that I simply didn't bring up because they're not worth bringing up: They're either not interesting enough to really talk about in a video like this. Hare strikes me as that kind of language; it has seemingly no benefits that aren't already in languages in this video.

    • @MrApplewine
      @MrApplewine 2 หลายเดือนก่อน

      @@mccGoNZooo I meant "V", not "Z".

    • @mccGoNZooo
      @mccGoNZooo 2 หลายเดือนก่อน

      @@MrApplewine I looked at V around 2019 and the unfortunate reality then and later was that it was sold as something it really wasn't; the compiler would produce code that had memory leaks for even the most basic of things while the claim was that it could somehow solve that issue on its own. All in all I would say V seemed to be a lot about perception rather than reality. I've also never seen anything from it that would make it actually better than Odin or Zig, so there really hasn't been any reason to "see past" these obvious lies and half-truths to see whether there was something actually useful there.

    • @MrApplewine
      @MrApplewine 2 หลายเดือนก่อน

      @@mccGoNZooo I see. What do you think about C-Odin, or "Codin" the Odin to C compiler written in C? I just watched a the video on C-Odin by Dale Weiler. The 3 main reasons for C-Odin are supposed to be 1.LLVM (not using it) 2. Speed 3. Debugging.

    • @mccGoNZooo
      @mccGoNZooo 2 หลายเดือนก่อน

      @@MrApplewine I don't have much of an opinion on it. As far as I can see it hasn't really materialized in any meaningful way and the Tilde backend for Odin will do the same thing and will be built into the Odin compiler.

  • @JannisAdmek
    @JannisAdmek 2 หลายเดือนก่อน

    11:30 I too have been following this Zig issue for a long time ^^

    • @mccGoNZooo
      @mccGoNZooo 2 หลายเดือนก่อน

      It's definitely worth following, I think it would do a lot for Zig to catch up to Odin in terms of language capability.

  • @roderickmorrison
    @roderickmorrison 2 หลายเดือนก่อน

    Concerning the lack of a package manager being a feature. I would say that it is a feature of a language that is not yet ready for development in large diverse and distributed teams. When it achieves that level of adoption the need for package management will be evident.

    • @mccGoNZooo
      @mccGoNZooo 2 หลายเดือนก่อน

      On the other hand: Large teams are not desirable either (they produce garbage, they produce it slowly and are usually unable to fix that garbage in a timely fashion, they are everything you don't want in software development) and I don't know what "diverse" is meant to mean here or why it has anything to do with package managers (or vendoring code). Distributed teams also has nothing to do with package managers. I think what you've written is fairly uninformed speculation, but it "sounds right" to a lot of people, i.e. it's the kind of thing you can get away with writing usually without getting much pushback, even though it has basically zero backing in any kind of observed reality or reason.

  • @element1111
    @element1111 3 หลายเดือนก่อน

    Thank you for the series. Very much appreciated.

    • @mccGoNZooo
      @mccGoNZooo 3 หลายเดือนก่อน

      Thank you for watching and enjoying it! :)

  • @Giga4ever
    @Giga4ever 3 หลายเดือนก่อน

    I find the complaint about Rusts compile time a bit disingenuous. Most people who complain about Rusts compile times are also the ones who compare it to (almost) zero dependency alternatives. Serde is by no means lightweight and serialization would probably be just as heavy in other system languages(unless it's in the standard lib). Also you can even use it without the derive feature flag if you really wanted. Derive (and proc macros in general) are heavy, but offer ergonomics, so it is a trade-off. You can disable the feature and just use serde manually though.. Just for a comparison: My current project uses GLFW, Serde, Kira(for audio) and OpenGL and has 2.35 seconds clean build times(and 0.2 incremental one). That said, I would definitely avoid wini+wgpu, which add like 150 transitive dependencies and blow up the build times. I agree with the other points though. If you prefer to write unsafe by default, Rust will just get in the way.

    • @mccGoNZooo
      @mccGoNZooo 3 หลายเดือนก่อน

      Disingenuous is a bit of a stretch... Rust heavily promotes package-based development and the community heavily favors `serde` for things, it's not a stretch to say that "adding JSON decoding can add seconds to your compile times". It's true that you can actually have a Rust project that doesn't take a long time to compile, but I would argue that it's rarer, harder to come by in the wild and much harder to maintain that situation in Rust than it is in Odin. Everything is a tradeoff, and unless you end up in good company both C++ and Rust users will usually tend to favor more language candy, more dependencies and clever language usage over short compile times.

  • @stuffedk
    @stuffedk 3 หลายเดือนก่อน

    You said Rust has very few of Haskells upsides, what exactly are the upsides of Haskell? I am very curious the answer of an Odin programmer, because whenever I tried to figure it out it seems people just want the math like esthetics and don't seem to care much about building real things.

    • @mccGoNZooo
      @mccGoNZooo 3 หลายเดือนก่อน

      It depends on who you ask, of course, but in my book Haskell has a very distinct edge in anything that requires multiple threads and shared memory. It has transactional variables/STM, which allows you to treat memory as you would database values, i.e. with transactions, rollbacks, etc.. None of this requires the swamp that is Rust's `async` hell. On top of that Haskell does, if you are willing to get into it, have a compile-time only constraints system that allows you to very, very tightly control exactly what effects functions can execute without bothering with ridiculous things like algebraic effects. If that's your jam, Haskell will provide that safety whereas Rust cannot in any reasonable way do the same. Haskell is a better imperative language than most, and using mutable values in it is better than in most languages, IMO. Personally I'm much better off using something like Odin nowadays, because I think it just hits the right notes and makes the right tradeoffs for getting stuff done, but Haskell is a very reasonable language for getting stuff done for the most part. The only parts that annoy me greatly are error handling (which Rust doesn't improve on, by the way) and some slice of the community that doesn't appreciate that the language is only there to facilitate getting stuff done (where Rust is even worse).

  • @Yadier-mp5zn
    @Yadier-mp5zn 4 หลายเดือนก่อน

    thank you for this tutorials bro, may God bless you.

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      Very happy to hear that you like them! :)

  • @lukevonbamberger9844
    @lukevonbamberger9844 4 หลายเดือนก่อน

    I know I'm just being a pedant here and It's not really important, but everyMilliseconds instead of everyMillisecond sounds very wrong to my ear. Anyhow, thanks for the odin lessons, greatly appreciated.

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      "EveryMilliseconds" is arguably more correct in the case of several milliseconds, i.e. "Every N milliseconds". "EveryMillisecond" would only really make sense if it was a singular millisecond.

  • @gerooq
    @gerooq 4 หลายเดือนก่อน

    I had this experience with an elixir shill on ThePrimeagen server. Dude was so toxic I couldn’t help but leave. Anyways, I think not all “official” channels are toxic. r/golang for example has some of the most chilled out folks.

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      There are official/big channels of communication that don't devolve very badly, yes, but I think there is a general tendency in these types of places to build up a cult-like feeling around the language. I've seen it in both the small and the large, growing over time. It can start out as innocent "Guys, I can't believe this language is so good!" type of stuff and with enough of that you very quickly get this tension between legitimate gripes (usually from people who have used the language more) with the language and the overenthusiastic beginner type of opinions. With that said I think Go and Odin have a very long lasting feeling of joy because they both have a very fundamental joy of simplicity to them, which takes you much further and lasts longer than just "Wow, this particular thing is so 'simple' in this language!" type stuff.

  • @DisFunctor
    @DisFunctor 4 หลายเดือนก่อน

    I'm new to both Odin and Elixir/Erlang. What is necessary for Elixir to pick up your NIF? Just compile your Odin/Zig/C library to dll (or shared object) and point your Erlang program to it? edit: your explanation for erldin was very useful. Great video, TY!

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      The gist is: - The functions need to be exported via a shared library - A declaration of which functions exist and their arities needs to exist in the exported library as well - Erlang/Elixir needs to be told to load the NIF (this is a module load directive in the module) and it will auto-direct any function calls with matching names and arities to the appropriate NIFs `erldin` is just a small collection of helper functions and types to expose Erlang's C library functionality

  • @MrBranh0913
    @MrBranh0913 4 หลายเดือนก่อน

    I don’t think the creator of Odin wanted OOP. Do you think doing it is actually fighting against the language?

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      No, I don't think using these things is fighting the language, but I think it's important to consider whether you actually need them. The truth is that a function working with a union is usually a much better way to have a function that works with multiple different things, and this is a much more common scenario. If you truly do need some kind of dynamic dispatch a function pointer on a struct is a perfectly fine way to do it.

  • @cycomkid
    @cycomkid 4 หลายเดือนก่อน

    I built a similar websocket server in odin. My server can read data from websocate but cannot send back, something like echo server. I was looking for some solution, then found these videos, but i think this also stopped at just recieving data, not sending from server to client.

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      There's nothing really special about sending data back, you just encode the data into the same format the server decodes it from and that's it.

  • @ar_xiv
    @ar_xiv 4 หลายเดือนก่อน

    I don't quite understand what's going on with: if every, is_every_milliseconds := interval.(EveryMilliseconds); is_every_milliseconds {} I had to look up the semicolon usage, that kind of makes sense now, but how is the type of is_every_milliseconds inferred as a bool there?

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      When you use this syntax: x, y := union_value.(Union_Member) x is going to be a `Union_Member` that is filled in if `union_value` was a `Union_Member`, `y` is going to tell you whether it was. So `y` is always a `bool` and is there only to tell you whether you had a match.

  • @sergey6661313
    @sergey6661313 4 หลายเดือนก่อน

    видео слишком синее! :(

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      Sorry the theme isn't to your liking. This is the first time anyone ever explicitly says it's too blue.

  • @deadmarshal
    @deadmarshal 5 หลายเดือนก่อน

    Please make a video on Odin generics and explain it in detail since there aren't many tutorials on that.

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      I'll keep that in mind for a potential return to the learning videos. There isn't *that* much to them, but it's certainly worth covering.

  • @ar_xiv
    @ar_xiv 5 หลายเดือนก่อน

    Rust compile times are a joke. Also I appreciate the D mention. D deserves better!

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      D is a gem of a language, but history has not been kind to it. I think D is one of those languages that would do extremely well with a group of certain people with very clear guidelines for how to do things. I also think those people probably should construct a solid way to use custom allocators, or maybe I'm underestimating the standard library allocators a bit. Last I checked they weren't great to use. I also think using `-betterC` as a default might be viable for the type of team I referenced above, which makes D a much, much better language than without it, IMO.

  • @doBobro
    @doBobro 5 หลายเดือนก่อน

    It's interesting how you see a bare bone low level linear type programming in ATS as a future. It's clearly a trend to "hide" raw linear types behind syntax/abstractions (Rust as an example) because it's very hard to use linear types directly for general programming.

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      I think maybe this is mostly because I've seen what Rust turned out to be and it's scarcely more interesting than C++ with RAII, i.e. it's basically not useful at all. I think it's clear at this point that that design was a dead end and that it's probably more useful and will yield better results to expose the actual proofs as values for the programmer. With that said there's also the much more obvious alternative: Leave both of those paths entirely and just use a much less complex language and set of tools to get better end results. That's where I personally am right now and probably where I'll stay mentally for the foreseeable future.

  • @JZGreenline
    @JZGreenline 5 หลายเดือนก่อน

    Really appreciate the long breakdown. I'm trying to decide on a language.

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      Did you land on one yet? My personal vote would go towards Odin, but this depends a bit on whether what you're doing is something you're going to need a ton of domain-specific libraries for. Most problems are in fact *not* that, but this also depends on how ready you personally are to implement things yourself.

  • @jonbikaku6133
    @jonbikaku6133 5 หลายเดือนก่อน

    Extremely curious to hear if you stumbled on V or tried it too? What you said about Nim's unreadablity is 100% what I feel, and V absolutely changes that. Its fast, small, all tools baked in. Would love your thoughts on it!

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      Haven't used it, it was wildly overhyped and proven to be completely broken very fast. This led to the creator making some very questionable posts on the Internet and I think this kind of soured a lot of people on the language, myself included. On top of that I don't think there is any real upside to using V over, say, Odin. At least this was the case last I checked.

  • @konstantinrebrov675
    @konstantinrebrov675 5 หลายเดือนก่อน

    I wonder, does Odin programming language have STL data structures, such as std::list, std::map, std::unordered_map, std::set, std::unordered_set? Can we use these C++ data structures in Odin code? Or do we have to code data structures by hand like in C?

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      Odin has a fair amount of structures in the standard library, but not nearly as many (or as badly implemented/incomprehensible) as the C++ STL ones. You can find the core library here: pkg.odin-lang.org/core/

  • @tmanley1985
    @tmanley1985 5 หลายเดือนก่อน

    This is amazing. I'm getting into lower level programming and this is superbly explained.

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      Happy to hear it was useful! It's very fun to work with stuff like this, and lots of things are surprisingly simple once you have some exposure to this type of thing. :)

  • @dacianherbei
    @dacianherbei 5 หลายเดือนก่อน

    This is an insane amount of work for a file picker. All respect for the patience. I would have thrown the PC off the window.

    • @mccGoNZooo
      @mccGoNZooo 5 หลายเดือนก่อน

      I can't say that I agree. The video is an hour, and the implementation of the file picker isn't even filling up the entire video. On top of that everything is slower to be implemented in a video than usual. Looking at the amount of work for a completely custom file picker this doesn't strike me as a lot at all. Did you expect us to call a platform file picker dialog window and be done with it?

  • @Pabloparsil
    @Pabloparsil 5 หลายเดือนก่อน

    Hi, maybe I'm a bit late but did you try to speak with Andrew Keller about these issues on error handling? I'd love to know if there are any plans on changing this.

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      There were plans made a long time ago (and an issue might still exist for it) to add a way to provide more context for errors, but last I checked there were no started implementations for it.

  • @ayoubelmhamdi7920
    @ayoubelmhamdi7920 5 หลายเดือนก่อน

    file(line:col): message, is not the default common way to show messages, when we use vim or emacs it's not recognized as in Quickfix list to goto to the file (gF in vim)

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      Emacs ships with functioning LSP nowadays, as does Neovim and (maybe?) Vim, I would use Odin with `ols`: github.com/DanielGavin/ols

  • @maxoumimaro
    @maxoumimaro 5 หลายเดือนก่อน

    I am a fan of zig since quiet recently. Odin seems a little annoying because I like attaching methods to structs, to me it makes a lot of sense that an datastructure can use methods for example. I wonder if Odin has actual comptime like Zig. One of the great usage of comptime in Zig is the ability to iterate other some struct and generate a function that will serialize/print it automatically. For example in zig std library, you have a json parser that can just read data into a struct, if the fields of the struct do not correspond to the json you read, you get validation error and be done with that. I find this type of thing to give a lot of power in development and avoid third party tools that I require when using C or C++.

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      The compile-time constructs in Odin only really stretch as far as being able to conditionally run code based on compile-time known booleans and other basic things like that, which is usually done with `when`. It's not trying to do even remotely what Zig is doing, which is definitely a good thing most of the time. I don't dislike `comptime` in Zig but beyond very basic usage it takes on a very similar character to macros where people need to stop and consider whether what they're doing is simply unnecessary and even understandable.

  • @HairyPixels
    @HairyPixels 6 หลายเดือนก่อน

    The zig code looks convoluted and pedantic. I don't know either language but I wouldn't be excited to learn zig just looking at the syntax. Odin looks more welcoming for sure.

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      Zig is definitely pedantic, I think it's a design goal for sure.

    • @HairyPixels
      @HairyPixels 4 หลายเดือนก่อน

      @@mccGoNZooo lol. imagine...

  • @eduardabramovich1216
    @eduardabramovich1216 6 หลายเดือนก่อน

    could you create a data structures series with Odin?

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      As you probably have understood at this point I'm on hiatus, so I probably won't be making videos on it anytime soon. On top of that I'm definitely not a data structures person and I don't usually find that I have to implement custom ones very often; at least not ones that are much more than arrays in a trench coat, if you catch my drift. We'll see what the future holds, though. :)

    • @eduardabramovich1216
      @eduardabramovich1216 4 หลายเดือนก่อน

      @@mccGoNZooo Well, thanks, have fun and hopefully one day we will see you again here.

  • @KurlyFont
    @KurlyFont 6 หลายเดือนก่อน

    cannot make use of this tutorial, too small text display..

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      That's unfortunate. I suggest watching (some of) the videos on a computer monitor; that way you can also write code yourself to get more retention and comprehension from it. Mobile phones or really most non-computer devices aren't very useful in programming, so I would in general suggest not using them for your learning experience.

  • @ScottAshmead
    @ScottAshmead 6 หลายเดือนก่อน

    Amazing content... with so many vendor libraries included with Odin, I am a bit surprised why no SQLite included in it and having hard time finding info about setting up SQLite with Odin. If you need an idea on another video this would probably be helpful for many people.... Keep up the great vids

    • @mccGoNZooo
      @mccGoNZooo 4 หลายเดือนก่อน

      This is a great topic to cover in the future for sure. I've written my own SQLite bindings, so it wouldn't be new territory in that respect either. We'll see what the future holds; it's definitely a topic worth covering if only to show more FFI stuff in general.