Learn to Program in Mojo Tutorial for Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024

ความคิดเห็น • 26

  • @lloydfaver4659
    @lloydfaver4659 6 หลายเดือนก่อน +1

    I am a retired IT programmer with 50 years of experience. Yeah, I wired pegboards back in the 60's. The speed of Mojo has sparked an interest in me once again, even at the age of 75. It appears to me that the Google Chromebook plus OS platform will be a major contender in the IT world. What are the chances of Google stepping up to the plate on Mojo. By the way I just subscribed.

  • @Little-bird-told-me
    @Little-bird-told-me 10 หลายเดือนก่อน +1

    I always loved your git videos, infact use it as a reference guide often. Great to see you in the mojo world. All the best and looking forward to seeing you more often.

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

      Thanks for the kind words!
      Yeah, my short Git videos got popular. I've always been a Java dev at heart, but I see Mojo really changing the game. More content to come!

  • @crab-cake
    @crab-cake 8 หลายเดือนก่อน +1

    thank you for this. i have never used python before so the documentation wasn't very clear to me. i am interested in mojo coming from rust because of the ownership model and other rust features such as traits and strong typing. i think this language has a lot of potential even beyond ai.

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

      Thanks for the kind words!
      Lots has changed since I uploaded this. I need to make a new one!
      The ownership model is one of the biggest changes I need to get used to as a Java dev. Maybe you could help me out with that on the next video?

    • @crab-cake
      @crab-cake 8 หลายเดือนก่อน

      ​@@cameronmcnz i can give you a little rundown of ownership/borrowing. it's how memory is managed in rust. essentially each value has a variable that's called it's owner. there can only be one owner at a time and when that variable goes out of scope, memory is freed automatically. when you assign a value to one variable and then to another, the ownership is moved to the new variable. functions work similarly in that when you pass a value to a function, memory is freed. one important aspect though is that it's only freed when you actually take ownership. if you only borrow the value, the memory isn't freed, because you don't own value. i'll touch on borrowing a bit below, but conceptually this model is kind of a combination of garbage collection and manual memory management, but with the performance benefits of manual memory management.
      now i'll get into borrowing a little bit. there is a difference between borrowing an immutable value and borrowing a mutable value. when you borrow an immutable value, you're only allowed to read from it by default. you can't modify the value until you've given it a reference using the & syntax. so basically by using a reference, you're borrowing the immutable value. when you have a mutable value, you have to reference with the &mut syntax. there can only be one mutable reference to a piece of data in a specific scope, which hypothetically prevents data races because no other references to the data can exist at the same time in the same scope.
      i recommend reading "the rust book" which is their official online book/tutorial because i've skipped over some important details that would make this comment too long. there's only so much i can put in a comment but this is more of a basic rundown of some of the core concepts.

    • @crab-cake
      @crab-cake 8 หลายเดือนก่อน

      ​@@cameronmcnz i can give you a little rundown of ownership/borrowing. it's how memory is managed in rust. essentially each value has a variable that's called it's owner. there can only be one owner at a time and when that variable goes out of scope, memory is freed automatically. when you assign a value to one variable and then to another, the ownership is moved to the new variable. functions work similarly in that when you pass a value to a function, memory is freed. one important aspect though is that it's only freed when you actually take ownership. if you only borrow the value, the memory isn't freed, because you don't own value. i'll touch on borrowing a bit below, but conceptually this model is kind of a combination of garbage collection and manual memory management, but with the performance benefits of manual memory management.
      now i'll get into borrowing a little bit. there is a difference between borrowing an immutable value and borrowing a mutable value. when you borrow an immutable value, you're only allowed to read from it by default. you can't modify the value until you've given it a reference using the & syntax. so basically by using a reference, you're borrowing the immutable value. when you have a mutable value, you have to reference with the &mut syntax. there can only be one mutable reference to a piece of data in a specific scope, which hypothetically prevents data races because no other references to the data can exist at the same time in the same scope.
      i recommend reading "the rust book" which is their official online book/tutorial. i've skipped over some important details and there's a lot more information that you should know before making a video that would be too long for a comment.

    • @crab-cake
      @crab-cake 8 หลายเดือนก่อน +1

      @@cameronmcnz do you have a discord server or something? i've tried to comment but i think it's being marked as spam because it's so long.

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

      @@crab-cake I keep intending to set one up with the team but haven't yet. I guess we probably should given the videos telling everyone about it.
      I'd love it if you were the first to join!

  • @zaidkhan7196
    @zaidkhan7196 10 หลายเดือนก่อน +1

    Awesome ❤,Damn I was waiting for the videos ...
    Flow up and All !!!
    Request You for more Content On Mojo And When Can we get official on Windows

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

      I'm working on it! So much more to cover!
      I'm looking forward to full native Windows support from Mojo myself!

  • @testpdgolegole
    @testpdgolegole 10 หลายเดือนก่อน +1

    Hello sir how to accept integer variable in mojo

  •  10 หลายเดือนก่อน +1

    Great tutorial, great pace even at 1x, slowly collected well put explanations and examples. No biases or brainwashing, really well explained! But Darcy told us __init__ was a python flaw, yet it's in Mojo... sadness...

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

      Darcy? You mean the @Scrumtuous one?

  • @zaidkhan7196
    @zaidkhan7196 10 หลายเดือนก่อน +1

    Hoping for tutorials on how We can Use Python script with Mojo

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

      The good old Mojo PythonObject! It's an interesting resource that can go back and forth between Mojo and Python worlds.
      Video to come!

  • @cbbcbb6803
    @cbbcbb6803 3 หลายเดือนก่อน +1

    I thought the Palm phone used a program called MOJO. Is that true?

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

      There are a number of projects that use the name Mojo. I like the name, but it does have a 'disambiguity' problem, as lots of things use the name. When starting a project, it's always a good idea to pick a name that won't be conflicted with anything else when someone googles it. (A name like Google is a good example)

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

    Mojo is the future of Python.

  • @itsmeonline-cw8xq
    @itsmeonline-cw8xq 3 หลายเดือนก่อน

    Awesome. Great channel "+1 subscribe" for Mojo/Max stack. Next looking for Mojo/Max playlists on your channel (7months on)

  • @10G0D
    @10G0D 10 หลายเดือนก่อน +1

    how exactly can i find your server in discord? or simply put an invitation link or server link here. Thank you

    • @cameronmcnz
      @cameronmcnz  10 หลายเดือนก่อน +2

      Imma be honest with you man.
      I'm building a team of Mojo enthusiasts and everything is happening so fast that we haven't yet set up the server. That was 'forward thinking' but I haven't set that up yet. Let me get someone on the team to do that this week.

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

      no worries. we are all enthusiasts in MOJO be cause it's too new and too young but also too promising. keep up.@@cameronmcnz