Domagoj Mišković
Domagoj Mišković
  • Видео 62
  • Просмотров 15 965

Видео

Learn OCaml [4] - Sum a List, understanding recursion
Просмотров 252 часа назад
Essentially trying to sum a list of numbers and understand how recursion works, applying itself again and again.
NeoVim Tutor [Lessons 0-3]
Просмотров 324 часа назад
Music: Karl Casey @ White Bat Audio
Learn OCaml [3] - studying recursive calls
Просмотров 254 часа назад
Elementary stuff. So, here I go again through naming and functions, and then looked at how the recursive calls expand and contract.
Learn OCaml [2]
Просмотров 739 часов назад
So this is about me myself documenting how I learn OCaml from the very beginning. So, in this video, I'm kind of repeating some of the things I did in the previous one, basically going through the greatest common divisor algorithm, and then looking at let definitions and let function expressions, and basically just, you know, getting used to writing some OCaml and how the recursive evaluation w...
0 to LSP : Neovim RC From Scratch (following Primeagen) [1]
Просмотров 27812 часов назад
So, in this session, I felt the need to reflect a bit on my streaming so far, and then in this video, in this first part, I tried to, I was following the primagen, or the primagen, not sure how, I'm still not sure how you pronounce his name. I was following his tutorial on RUclips, and it was really fun, and I got stuck a bit, and so this is the first part.
OCaml from the very beginning [1]
Просмотров 19714 часов назад
Over the past few days, I've been exploring how memory allocation works in C and creating very basic examples of allocating and freeing memory. Along the way, I found myself wanting to do some functional programming along with C which led me to OCaml. I kinda like learning more than one thing at the same time. I decided to explore OCaml from the Very Beginning by John Whitington, a book designe...
Learning C - Build Your Own Lisp [4]
Просмотров 40019 часов назад
So, in this session, I kind of explored together with chatgpt the malloc and wrote a simple kind of Hello World malloc program, and then I went on to read the fifth chapter, and now we are up to installing the MPC parser combinator library. Watch live at www.twitch.tv/domagojding
Learning C - Build Your Own Lisp [3]
Просмотров 177День назад
Broadcasted live on Twitch Watch live at www.twitch.tv/domagojding
Learning C - Build Your Own Lisp [2]
Просмотров 717День назад
Note: Up to an hour or so, the sound is coming on right channel only, then I switched to mono until the end of session. Sorry about that. So, in this session, I kind of tried to wrap my head around the loops, the while loops and the for loops, and it was actually, and it's actually quite difficult. It's like, even though you can understand it, the going itself through the steps of evaluation, s...
Learning C - Build Your Own Lisp [1]
Просмотров 2 тыс.День назад
So I began now a new book, to go through the book, Build Your Own LISP, that teaches programming in C. And it's more, it's a long, it's a, it's a big, so the whole book is one big project of building an interpreter in C, in LISP, with C. Why am I doing this? Because a lot of the operating systems materials are all about C. And I kind of want to, I kind of want to go all over even now and learn ...
Rustlings #1 [ intro & variables]
Просмотров 6214 дней назад
Broadcasted live on Twitch Watch live at www.twitch.tv/domagojding
Rust Book #1 - [guessing game]
Просмотров 4614 дней назад
Broadcasted live on Twitch Watch live at www.twitch.tv/domagojding
Rust By Example #2
Просмотров 9914 дней назад
Broadcasted live on Twitch Watch live at www.twitch.tv/domagojding
Rust by Example [1]
Просмотров 12714 дней назад
Following along the Rust by Example tutorial Watch live at www.twitch.tv/domagojding
Writing an OS in Rust #3 [minimal rust kernel]
Просмотров 49514 дней назад
Writing an OS in Rust #3 [minimal rust kernel]
Writing an OS in Rust #2 [freestanding binary up to minimal rust kernel]
Просмотров 30914 дней назад
Writing an OS in Rust #2 [freestanding binary up to minimal rust kernel]
Writing an OS in Rust #1 [freestanding binary]
Просмотров 35114 дней назад
Writing an OS in Rust #1 [freestanding binary]
Writing an OS in Rust #0
Просмотров 47514 дней назад
Writing an OS in Rust #0
I renamed the channel
Просмотров 15714 дней назад
I renamed the channel
Just being very happy for making my first Nix package xD
Просмотров 2821 день назад
Just being very happy for making my first Nix package xD
NixOS - Packaging Existing Software with Nix [3]
Просмотров 11721 день назад
NixOS - Packaging Existing Software with Nix [3]
Packaging a binary for NixOS [2]
Просмотров 11028 дней назад
Packaging a binary for NixOS [2]
Packaging a .deb File on NixOS [1]: First Steps and Challenges
Просмотров 13728 дней назад
Packaging a .deb File on NixOS [1]: First Steps and Challenges
Still Syncing, Configuring, Watching Nix-Hour
Просмотров 10128 дней назад
Still Syncing, Configuring, Watching Nix-Hour
NixOS Setup: SSH, GNOME Keyring, and GitHub (Not Quite There Yet)
Просмотров 186Месяц назад
NixOS Setup: SSH, GNOME Keyring, and GitHub (Not Quite There Yet)
GNOME Caps Backspace Fix
Просмотров 75Месяц назад
GNOME Caps Backspace Fix
Option Dependencies [3]
Просмотров 1202 месяца назад
Option Dependencies [3]
Option Dependencies [2]
Просмотров 752 месяца назад
Option Dependencies [2]
A Basic Module [1]
Просмотров 1832 месяца назад
A Basic Module [1]

Комментарии

  • @LindaLentz-v6y
    @LindaLentz-v6y 38 минут назад

    I really appreciate your efforts! I have a quick question: I have a SafePal wallet with USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). How should I go about transferring them to Binance?

  • @RatanBasak-f8h
    @RatanBasak-f8h День назад

    Freaking rust.

  • @RatanBasak-f8h
    @RatanBasak-f8h День назад

    Holly C

  • @k1utch
    @k1utch 3 дня назад

    27:47 yes, he is using an alias for nvim.. Really good work btw! keep it coming :)

  • @lane1313
    @lane1313 8 дней назад

    The reason why you start with the static char array buffer is because when "static" is used on a variable in this context, it has a lifetime the entire length of the program, and we want to give a maximum amount of bytes to read in. And the reason why we use "cpy" is because we only want to be working with a string that is as long as the user inputs. We don't want to be moving around a huge 2048 byte char array when the user only inputs something like "Test". And we also don't know how long the user inputs it because it's being input at runtime, so we use malloc (or calloc which initializes the entire array) which allows us to dynamically allocate memory depending on how long the user input string is. Also, we use fgets which is a function that allows us to specify how many bytes to read in, rather than "scanf" which doesn't and could potentially cause a buffer overflow if the user enters more strings than we've allocated space for. I'll try to make it to your next stream!

    • @domagojding
      @domagojding 4 дня назад

      @@lane1313 I've been learning OCaml in the past few days and been thinking of memory allocation in C. So one thing that strikes me as a beginner is this requesting of memory and then freeing it manually. So let's say I want to do a computation and I request a certain amount of memory. How do I know if that is exactly the right amount of memory I need? And why would I request a certain number that I'm not actually sure about it? It's like, what if I have thousands of such memory allocation requests? What happens when they pile up and maybe I forget to free them? But then it comes to me, why would I do all this manually? It seems like a well-defined programming task to find new ways how to allocate memory. It's like more in a fragmented way, as much as I need, I request, and such. But yeah, I guess I would need to see how garbage collectors are implemented to really know what I'm talking about.

    • @lane1313
      @lane1313 4 дня назад

      @@domagojding You ask such good questions! "How do I know if that is exactly the right amount of memory I need?" Well, what you'd do is come up with a formula for allocating as much memory as you need. Like, say if I wanted to allocate N amount of integer space. I'd take the amount of items I'd need and multiply it by the size of the type. So I'd do something like `(int *)malloc(N * sizeof(int))` Also, to check that the memory is correctly allocated, you can simply check if the pointer is a null pointer, which is what malloc and calloc return if the memory allocation fails. "And why would I request a certain number that I'm not actually sure about it?" Because this gives you the ability to work on changing values. Data can be inconsistent and volatile, and it's important to allow your memory values to change, like with user input. The user may not always enter something like "test" or "input example". It's fluid and changing, and allowing your program to allow for such changes gives the user more freedom to interact with the program. "What happens when they pile up and maybe I forget to free them?" Well, you'll encounter an issue known as a "memory leak" which is when memory is constantly consumed without being freed. As you've said, there is "garbage collection", which some languages like D implement, which free and manage memory for you. There are arguments as to the benefits and cons of both automatic and manual memory management. Garbage collection gives you the relief of not having to worry about remembering to free your allocations. Whereas manual memory management gives you the freedom to control memory and use it how you see fit. Both ideologies have pros and cons.

  • @azur1s
    @azur1s 8 дней назад

    I like how you configured your setup like Tsoding

  • @lane1313
    @lane1313 10 дней назад

    What the line "char* cpy = malloc(strlen(buffer) + 1);" is doing is dynamically allocating as much memory is needed to store the string stored in "buffer" into "cpy". "malloc" is a C function that is used to dynamically allocate memory on the heap. It has a `void *` return type meaning you can assign it to char pointers, int pointers, float pointers, etc. "strlen" is a function that find the length of a given char array (c-string) up to but not including the null terminator. The reason +1 is added to the end is because strlen does not return the size including the null pointer. So we need an extra byte for that null terminator character. I'd highly recommend you look at the documentation for these on cppreference, which is a site that gives an interpreted documentation of the C and C++ standard.

  • @lane1313
    @lane1313 11 дней назад

    You actually don't *need* to write `return 0;` in your C or C++ main function. The main function is a special function which acts as an entry point, and the OS will return with a status code its-self depending on whether it was able to finish successfully or not. There is a macro named "EXIT_SUCCESS" and "EXIT_FAILURE" which is akin to returning successfully (or unsuccessfully with the latter macro) depending on the platform that you could return from. So yeah, you don't have to write "return 0;" in your main function, but for any other function which does have a return type, you do need to return something.

    • @domagojding
      @domagojding 11 дней назад

      @@lane1313 Thank you. I'm kind of still trying to wrap my head around this way of saying the return type, because coming from Haskell, a function is an expression of sort that is reduced to a simpler one or a value, so it's kind of, for now, weird to say what is the return type, but it seems to be that the reduction itself has some kind of a return type, and because the reduction is stateful, so changing something, the return type can be something else, right? So I'm trying to understand the implications of this return expression in C.

    • @lane1313
      @lane1313 11 дней назад

      @@domagojding So return statements simply mean in layman's terms "Stop what you're doing, and send this back to where it was expected." In functions, return statements state that the function is finished being executed and that either a value, object, or address (if you're returning a pointer of something stored in the heap/dynamic memory region) is to be given back. Same with loops. You can add a return statement in a for or while loop to signify that the loop is to halt and a value is to be stored in whatever scope that it's in. Does that make sense?

    • @domagojding
      @domagojding 10 дней назад

      @lane1313 You know, the interesting thing is that it does make sense in the sense that the words make sense to me, but I still am having, you know, much difficulty in unwrapping or what would be the best word to, you know, understand this, this, do I call it mental model of evaluation? Because I'm kind of, I'm kind of giving a lot of statements to everyone else, like being a big boss, and from functional programming, which is kind of more, well, maybe that's not fair to say now, but it's, it's like the level of communication is, it's a bit different in the sense that I, I have many functions that do one thing, and if I want to change the output of a function, I transform it or I, well, I transform it in the sense that there is another function that, that externally looks like changing state, but the state is not changed. So it's, I think it's very hard for me now to explain what I mean in a few words, but maybe the, the number of words for now shows, shows still the difficulty in the way I try to understand this imperative model of computation.

    • @lane1313
      @lane1313 10 дней назад

      @@domagojding I think you should give yourself some credit. You're obviously coming from a different world of programming, and in a sense, throwing yourself into the deep end making a programming language (even if it's just following a guide) in C, which is a whole different programming paradigm. So you should show yourself some grace and continue enjoying the journey of learning C and making this wonderful project. Functions can in fact, do multiple things, however, they can only return one thing at a time when you specify a return type (such as int, float, etc). A return statement can involve an expression (such as for example 5 + a). When the OS reaches the return statement in the stack frame (the stack frame if you're unaware, is the place in memory where the function is being kept. You might learn about function pointers later) it executes the code contained within it one line at a time. If the function has a return type, it'll be expecting a return statement before exiting the scope, which is what the compiler checks for. Once it reaches that return statement, it copies the value that's being returned into memory, and moves it back into the scope where the function was called and if it's being called in an expression like an assignment, it'll be placed where the callee' expects it. This is why you can call different function from within functions and assign values to variables from within functions. Let me know if that doesn't make sense or if I should reword something.

    • @domagojding
      @domagojding 10 дней назад

      @lane1313 Hello, thank you for the comments. When you say if it makes sense or not, I think it does make sense, but more like I still don't understand, I still don't have the motions, so to say, of how the imperative model works. And I guess I go from word to word, and even if I kind of understand what it does, after I read the whole thing, for example, what you wrote, I'm not sure what I read. And then I go back and I read it, so I guess it just needs more practice, and doing the same thing. So I'll see how it goes. I tried to reflect on what you said in the video, in my newest video, the stream, Build Your Own Lisp, the third part. And yeah, but I'll reread your comment more, and I will let you know how it makes sense, or if rewording something helps. So again, thanks for the comment.

  • @hrqmonteiro
    @hrqmonteiro 11 дней назад

    Which font are you using in your terminal, please?

  • @magdalenajovanovic4485
    @magdalenajovanovic4485 15 дней назад

    All right, all right, all right. 1:08:04 kinuo si i aktivirao mikrofon

  • @phuxman55
    @phuxman55 15 дней назад

    Hi. Maybe before starting with kernel development start to train with some more basic stuff to get to know the basics. I think without these basics it will just stay copy & paste "programming" without building up knowledge. Maybe have a look at "rustlings", it is a fun way to learn.

    • @domagojding
      @domagojding 14 дней назад

      Hi. Yeah Im on Rust book now and will start rustlings too.

  • @boxerfencer
    @boxerfencer 15 дней назад

    Are you making a mircrokernel?

    • @domagojding
      @domagojding 15 дней назад

      @@boxerfencer Yeah, but I was advised to learn, to learn more Rust before I attempt to do something like that, and just today I saw that Tim Clicks in his book, Rust in Action, is also covering some of these things, some of the low-level programming, and also I was looking into FPGAs, and something like connected with Haskell, since basically that's my only background. But so far it seems like I'm going along the Rust book, yeah.

    • @boxerfencer
      @boxerfencer 14 дней назад

      @domagojding that's awesome! Are you planning to do a general purpose OS? Minix re-sparked interest in microkernels, but I feared with Tannenbaum's retirement microkernel interest stalled. With Redox and others such as yourself, not to mention Google's Fuschia , maybe we'll eventually get a microkernel OS for popular use, sooner than later.

    • @domagojding
      @domagojding 13 дней назад

      @@boxerfencer Hi. Well, I'm nowhere near capable of doing something like that for now, but it's an interesting project of sorts. I found out that I should probably do the MIT operating systems course that, as a teaching device, tries to study and extend the XV6 operating system. So I'm probably going to be doing that. Plus, I'm also rethinking, should I learn some C, because there is so much content about this written in C, and do that along with Rust. But, yeah, it's a fun ride.

  • @michaeleber4752
    @michaeleber4752 17 дней назад

    Very interesting to learn a language that you chose for writing an operating system. However, as a developer that wrote two compilers I found that the language you choose is important for the function it is used for. In this case you would have an OS that is very dependent on the behavior of the language processor of Rust. C and C++ are used because they compile down to machine language placing nothing at a higher level of control than the OS itself. While it is an interesting project and it is your learning experience, it will not be a very usable operating system. In fact, there are many reasons Linus wants to pull Rust from the Linux kernel.

    • @domagojding
      @domagojding 16 дней назад

      Interesting, I commented on this a bit in the next stream, Im curious about the type system, how low can you go with it. Or like with lifetimes which you as a C programmer hold in your head so to say or declare them in rust? Also isnt rust able to go all the way down just like C. Eventually you do assmbley? Also very curious about lisp machines that ran lisp on metal.

  • @Nylspider
    @Nylspider 17 дней назад

    This series has been very cool so far :3

  • @slaier8727
    @slaier8727 18 дней назад

    welcome aboard void linux , I've been on it for the better part of a year now and it's been great so far.

  • @Ziggurat1
    @Ziggurat1 Месяц назад

    Okay you got me with the comment in the end. I didn't watch it. But I did listen to you while I was painting a chair. Yes you did many things wrong, especially with the ssh agent stuff. But that's life 👍

  • @manaspecenek
    @manaspecenek 2 месяца назад

    a perfect tutorial

  • @duytanmai8590
    @duytanmai8590 3 месяца назад

    Nice

  • @goproslowyo
    @goproslowyo 4 месяца назад

    let f = {a, b}: a + " " + b; in f { a = "hello"; b = "world"; }

    • @goproslowyo
      @goproslowyo 4 месяца назад

      Or even.... let f = {a, b, c ? " "}: a + c + b; in f { a = "hello"; b = "world"; c=" --random.spacer-- "; }

  • @RobFisherUK
    @RobFisherUK 4 месяца назад

    29:00 I'm running NixOS on WSL on a work laptop. It's pretty nice. How well will it work if I spawn a bunch of VMs from it...I'll have to try it!

  • @RobFisherUK
    @RobFisherUK 4 месяца назад

    I'm working on a configuration of a router/firewall. This might be a good way to test the configuration before deploying it, if I can figure out how to set up the virtual networking so that it's the same as the real network (with VLANs and everything).

  • @VegascoinVegas
    @VegascoinVegas 5 месяцев назад

    I hope these videos help me because I have a program I want to install but there is no package for it yet. The community never created one. I don't want to install in a shell. I want it to be available to all users globally.

  • @eygs493
    @eygs493 5 месяцев назад

    you have to know that, apart from your video has little to zero useful info, the major reason i am stay away and NOT subscript is becuz you are using chatGPT. this is SO bad

  • @TheMotorcycleBoy-pe2eg
    @TheMotorcycleBoy-pe2eg 5 месяцев назад

    Sweet...pronounced : Dan D Lion ...not sure it matters. My cat is called 'fleur' (14:30 c=a.x or c = with a; x;)

    • @domagojding
      @domagojding 5 месяцев назад

      aw dandelion haha yeah I see, oh nice hello fleur!

  • @TheMotorcycleBoy-pe2eg
    @TheMotorcycleBoy-pe2eg 5 месяцев назад

    Great video. I am hooked. (Well I was hooked on Nixos already, but this is 'just what the Doctor ordered'.)1:22 "Do I have to write everything?" ....why not just scroll the previous input with up arrow and append?

  • @TheMotorcycleBoy-pe2eg
    @TheMotorcycleBoy-pe2eg 5 месяцев назад

    Busy right now, but looking forward to going through your Nixos videos

    • @domagojding
      @domagojding 5 месяцев назад

      Hey thanks. I think I will be making recap videos of what I have learned since this module system deep dive for example is going to take hours already.

    • @TheMotorcycleBoy-pe2eg
      @TheMotorcycleBoy-pe2eg 5 месяцев назад

      @@domagojding Ah okay. I will wait then until you post a new playlist

    • @eygs493
      @eygs493 5 месяцев назад

      garbage

  • @hacker-on-board
    @hacker-on-board 5 месяцев назад

    No khan academy, you are also goona go into that rabbit hole

    • @domagojding
      @domagojding 5 месяцев назад

      I get that xD I'll try not to too much. Thanks!

  • @saeedjalali7339
    @saeedjalali7339 6 месяцев назад

    thanks for UNIQUE and PURE content. please keep it up.

  • @TheMotorcycleBoy-pe2eg
    @TheMotorcycleBoy-pe2eg 6 месяцев назад

    Brilliant. Tutorials. Text is large & legible. Cheers!! I have just hacked my VMs so this video comes too late. "hx --tutor" btw.

    • @domagojding
      @domagojding 6 месяцев назад

      Will do. Thanks! Hey I just saw numtide just released github.com/numtide/nix-vm-test

    • @TheMotorcycleBoy-pe2eg
      @TheMotorcycleBoy-pe2eg 6 месяцев назад

      @@domagojding Thanks. Well I just wanted to set up a VM in case I ever felt the need for enhanced security, browsing or whatever. I set up Vagrant and also Qemu.But I doubt it I will use either. Distrobox (&BoxBuddy) meets a present need (a Debian package not in Nixpkgs).

  • @linbynd
    @linbynd 6 месяцев назад

    amazing explanation !!! what font is that you are using

    • @domagojding
      @domagojding 6 месяцев назад

      Oooh I will have to check in couple days, Im on a trip. I kinda change fonts sometimes. I use nerd fonts, hm this could be caskydia not sure

  • @linbynd
    @linbynd 6 месяцев назад

    amazing initiative

  • @domagojding
    @domagojding 6 месяцев назад

    Hey thats very nice!

  • @chrsbll
    @chrsbll 6 месяцев назад

    I recently started looking into haskell as well, it's nice to see someone else make their way through it at the same time. Also that 'Suggested fix' error message at 40:47 is really useful.

  • @JaysonHenkel
    @JaysonHenkel 6 месяцев назад

    It would be good to cover the reason the result is one = 1; three = 3; two = 2; from the rec example, the answer is it's alphabetical...which isn't maybe immediately clear. good series, keep up the good work!

    • @domagojding
      @domagojding 6 месяцев назад

      oh right! I will keep a note of this. Thank you! Yeah, after I do all these nix dev tutorials I will redo them again but like deep dives so I'll be sure to mention this

  • @VastCNC
    @VastCNC 6 месяцев назад

    Great stuff as always nix newb this stuff is helpful

  • @ILISTENTOMUSIC
    @ILISTENTOMUSIC 6 месяцев назад

    My main gripe with nix is how long it takes to iterate on the configs, coupled with the fact that there's no easy way for migrating to nix. I would have loved to make nixos work, but I just settled for home manager to be able to quickly restore the main programs I use and their configs (shell tmux pager fzf etc).

    • @domagojding
      @domagojding 6 месяцев назад

      Yeah, and payoff is great too. I like how all is so interconnected, programmable interface for your system, so once you start even with home manager, you kinda wish you can go deeper. I think it's a great way to really start interacting with the system, like let's say NixOS modules which are super nice deep thing on it's own, then types of derivations and nix store.. oh it's like a very fertile ground for many ideas. In the end it's all nix expressions all the way you go so anything you learn it's not like wasted, but it expands from anything you know.

  • @thiagoassisfernandes
    @thiagoassisfernandes 6 месяцев назад

    Heeeey this looks like a cool initiative