Kronark
Kronark
  • Видео 9
  • Просмотров 102 322
Syscall Machine Code without an Assembler - Kronark
System Calls are an essential component of any piece of software. Regardless if you want to open files, use multiple threads, write to the console or send data through the network: you will need some system calls. Today we'll briefly cover how we can use the Kronark Compiler to generate the corresponding machine instruction for the x64 architecture. Next up is the MOV instruction to actually pass some parameters!
Learn more about x64 Instruction Encoding here:
ruclips.net/video/FL7WPsE-BuE/видео.html
Learn more about the x64 SYSCALL assembly instruction here:
www.felixcloutier.com/x86/syscall
0:00 Title
0:10 Intro
0:40 System Calls
1:41 Implementation
2:30 Outro
2:45 Endcard
Music by Symbology Cinem...
Просмотров: 2 437

Видео

Building Executables without a Programming Language - Kronark
Просмотров 4,9 тыс.Месяц назад
Today we harvest (some) of the fruits of our labour over the past two months: We are building an empty executable, ready to be injected with our very own node based code. Learn how the Kronark Compiler can be used to construct a complex file format such as the Portable Executable (PE) format for the Windows operating system. This is only the first major step of a long journey towards a textual ...
The Rarest Feature in Node Editors: Node Graph Activation - Kronark
Просмотров 4,3 тыс.Месяц назад
Node graph activation is a key mechanic in my compiler / node graph editor. It is what allows a user to combine different functionalities without having to deal with an explosion of complexity in the frontend of their nodes. It's also a feature that appears to not be available in all major node graph editors out there! So join me on this (for now) last exploration into compiler fundamentals, be...
A Type System to Rule Them All - Kronark
Просмотров 3,5 тыс.Месяц назад
In this second explanatory video we cover the underlying type system that governs the validity of node connections. The so-called "Type" node not only allows for the intuitive usage of built-in types provided by the compiler, it also allows absolute freedom for creating any custom data type you could imagine. In contrast, the so-called "Option" nodes provide an intuitive interface for enumerati...
Designing Node Inputs using Port Nodes - Kronark
Просмотров 3,7 тыс.2 месяца назад
As requested by the majority of you humans, here is a first explanatory deep-dive into the inner workings of my node graph compiler. In this video we'll discuss how so-called "Port" nodes can be used to build the input fields / sockets of custom nodes. Feel free to ask any further questions in the comments below! 0:00 Title 0:10 Warning 0:19 Intro 0:47 Direction 1:09 Channel & Value 1:37 Node S...
Introduction to Portable Executables (.exe Files) - Kronark
Просмотров 11 тыс.2 месяца назад
We're slowly fighting our way to building executable code from absolutely nothing. In this, arguably very dry topic of a video we'll tackle the basics of the portable executable format! It'll get more exciting later on, I promise... 0:00 Title 0:10 Intro 2:04 DOS Legacy 3:22 Signature & File Header 4:46 Optional Header 8:11 Sections 9:29 Conclusion 9:45 Endcard Music by Symbology Cinematics: ww...
Assembling x64 Instructions from Scratch - Kronark
Просмотров 11 тыс.2 месяца назад
In this video we'll be tackling one of the biggest hurdles in front of us: the encoding of x64 instructions. Once we get this running, we'll be one step closer to implementing some actual operations and therefore programming using the Kronark compiler! 0:00 Title 0:10 Intro 1:00 Opcodes 4:28 Rex Prefix 5:38 Legacy Prefixes 6:59 ModR/M 9:08 SIB 10:13 Displacement and Immediate 10:57 Conclusion 1...
Writing Software without a Programming Language - Kronark
Просмотров 52 тыс.2 месяца назад
Join me on a journey of reinventing absolutely every wheel I can get my hands on! Sometimes you just got to start fresh, you know? 0:00 Title 0:10 Introduction 1:03 The Plan 1:58 Node Editors 2:55 Compiler Basics 4:45 Endcard Music by Symbology Cinematics: www.youtube.com/@Symbology-Cinematics Sound Attributions: soundcloud.com/x3nus
Integer Types from Scratch - Kronark
Просмотров 9 тыс.2 месяца назад
Before we can really do anything else, we need some data to work with! So let's quickly build some simple integer types using the Kronark Compiler. Writing software without a programming language: ruclips.net/video/qM2mtAPEmd4/видео.html 0:00 Title 0:10 Introduction 0:38 The Plan 1:08 Implementation 2:08 Teaser 2:20 Endcard Music by Symbology Cinematics: www.youtube.com/@Symbology-Cinematics So...

Комментарии

  • @MultiMunding
    @MultiMunding 15 часов назад

    This looks awesome! It would be nice to see intermediate values of computations in the nodes/ports itself.

    • @Kronark
      @Kronark 15 часов назад

      Thank you! There is an inspector tool within the compiler, which I just don‘t show in the videos. More user-freindly features will be added in the release build we‘ll be making together using this prototype :)

  • @РайанКупер-э4о
    @РайанКупер-э4о 12 дней назад

    Talking about readability, about intersecting edges specificaly -- you can not totaly avoid them, you won't be able to create some programs without them. But you can be clever about them. I'm currently working on IDE for a flowchart language that was made in the 80s. The authors solved this problem in really clever way -- they had put all the intersections in one place😄. It's hard to explain here what exactly they have done, but if you'll ask me, I'll try my best.

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

      You can actually, already found a solution for that :)

    • @РайанКупер-э4о
      @РайанКупер-э4о 11 дней назад

      @@Kronark, well, than I'm waiting to see that in the next video :)

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

      Don‘t have time to work on the compiler code rn, need to get a renderer prototype for my thesis done first - just doing some assembly at the moment :) But will cover the new features eventually, maybe towards christmas?

    • @РайанКупер-э4о
      @РайанКупер-э4о 11 дней назад

      @@Kronark, I would love that!

  • @РайанКупер-э4о
    @РайанКупер-э4о 12 дней назад

    Wow. I'm actually writing a gaphical language for my thesis too. But slightly higher-level one. I wanna compile flowcharts. Each flowchart consists of icons. There are three main types of icons -- Action, Question and Choise. Each has ouly one input line -- it goes from the top, and always has at least one output line that goes to the bottom, so program flows nicely from top to bottom, and eveything branching goes to the right, no messy arrows needed. Question has two outputs, one on the bottom, one on the right, one Yes, one No, you can choose which is which. Chose is analogus to c++ cwitch-sace and Rust match -- it consists of one sub icon on top that shows what's being choisen and horisontal line of sub icons that represent what to choose from. That flowchart language wasn't developed by me, but it's hard to find any working IDE for it and it always consists of mixing it with other languages, like you write your C/C++ code in the icons, you organize your program as the flowchart. I wanna create one standalone language, that defines both flowchart and text inside icons. I also wanna add scopes to the flowchats.

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

      Sounds cool! Keep me up to date! :)

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

    Thank you so much for your content and uploading I love it !

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

      Thank you for the kind words! :)

  • @EnriqueSalceda-k4v
    @EnriqueSalceda-k4v 16 дней назад

    A calling convention, afaik, is not (only) the order but the whole process methodology.

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

      Would‘ve only over-complicated things if I had started describing that return values etc are also part of the convention

  • @AryanMahajan-zz4ro
    @AryanMahajan-zz4ro 17 дней назад

    I like thos shorter form video as it is easier to understand and also we can have more frequent updates. Love your channel!

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

      Don't know about more frequent just yet, but will be ramping up everything once the master's thesis is done. :D Glad you like it here!

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

    This is a cool project! Do you think you will implement optimizations as well; for example, Template Metaprogramming?

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

      The concept of template metaprogramming is already natively supported by this code design approach :) But yes, we'll be building some framework nodes to make such a task easier. And thanks!

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

      @@Kronark this is true, it is a concept with many underlying principles.

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

    0:57 I believe the equation is missing a few definitions

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

      It's just a quick visualisation of what I have to deal with for my master's - isn't supposed to be understood in any way :)

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

    Can you put the Dune theme in the background of one of your videos?

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

      Wanna avoid that copyright issue to be honest :P

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

      @@Kronark Would be nice though.

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

      Indeed

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

    Very complex

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

      Wouldn‘t be fun otherwise

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

      @@Kronarkto be honest, I don’t really understand the flow of the interface in the video, somewhat esoteric, maybe a human readable output/pseudocode of the node graph side-by-side would be nice!

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

      Do you mean the node graph in the second part of the video? There are some explanatory videos in the "Compiler" playlist that explain most of what's on screen there - might want to check those out. They're already human readable, just different enough to not be immediately understandable when you're coming from text-based coding. There isn't really a pseudocode analogue to this because it isn't actual code, it's a definition of bytes ^^ A rough equivalent would be "return 0x0f05;", which is so short you might as well not show it in my opinion :)

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

    Very promising stuff you have here :))

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

    @darkfllame wya

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

      Love this 😂😂

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

    Can you share the kronark compiler, we would love to play around

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

      I probably won‘t share this prototype any time soon as it simply is too buggy currently. I don‘t have time to fix bugs much at the moment due to my master‘s thesis. I‘d really like to at least get a head-start in software development before releasing the only ace up my sleeve to the public.

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

      @@Kronark I'd happily support you on some patreon thing to get this going after your master's thesis! 🤞

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

      Appreciate it! I‘ll consider setting one up next year - there have already been a couple of comments regarding that. Definitely want to get at least another couple of months of the whole youtube experience under my belt before monitising anything - I‘ve only been doing this for 2,5 months after all, feels a little early to earn money from all this 😅

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

      It would probably be better to set up a discord first.

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

      Definitely. It's already in motion, just have to find the time to set it all up and test it properly. Don't want to half-ass it. It's going to be available before Christmas - probably way sooner as I may want to work on some math stuff for computer graphics with some of you.

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

    Finally a video I can understand without constantly rewatching every paragraph ^_^

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

      Hope it was still worth the watch :P

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

    This looks so promising, i hope i can use this with linux someday or if its got to be windows that it works with wine/proton

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

      It‘ll be compatible with any OS eventually, including Linux :) The whole Windows focus right now is simply because I have a Windows machine.

  • @Bleb1k_irl
    @Bleb1k_irl 21 день назад

    I'm kinda obsessed, rewatching fifth time already 😅 Hope you'll create discrod soon 😊 Also, I have another question! Do you plan on implementing graphics from scratch, like spaerophoria does in his "Demistifying the linux graphics stack", or will you use bindings to Vulkan/Metal/WebGPU? Or maybe both????

    • @Bleb1k_irl
      @Bleb1k_irl 21 день назад

      Also it seems I'm not the most attentive rewatcher 😅 Vulcan it is then)

    • @Bleb1k_irl
      @Bleb1k_irl 21 день назад

      But it would be interesting to see natively supported GPUs directly within your language

    • @Kronark
      @Kronark 20 дней назад

      Ah I was wondering where all the watch-hours were coming from 😉 Yeah will probably set that discord up soon-ish. Might even be helpful to me for some math questions, since you all are a smart bunch… so maybe sooner than later! I generally want to go as low level as possible, so we may eventually try to build our own bindings of sorts. But yeah, for now vulkan is my go-to, since I want to get things on screen first. The more visual part of computer graphics will be a nice break from low level compiler stuff, which I desperately need to be honest 😅

  • @Bleb1k_irl
    @Bleb1k_irl 26 дней назад

    How will memory management look? Will it be manual as in C? Or will it use a borrow checker, like in rust?

    • @Kronark
      @Kronark 26 дней назад

      First stages will be manual since that simply is a lower level of abstraction. We‘ll implement a borrow checker approach later on though!

    • @Bleb1k_irl
      @Bleb1k_irl 25 дней назад

      I'm so hyped for your language! I hope you have a good time building it!

    • @Kronark
      @Kronark 25 дней назад

      Glad to hear it! Gonna be a rough couple of months coming up with my master‘s thesis taking up most of my time, but it‘s going to be fun once I‘m through with all the distractions :)

  • @jaytea6516
    @jaytea6516 27 дней назад

    i see that the node-graph design potentially accommodates any file format. i wonder if you have explored any other cpu architectures or operating system, is there an environment that is more "streamlined" for node-graph design?

    • @Kronark
      @Kronark 27 дней назад

      Not yet, but all the other cpu architectures and OSs wouldn‘t be super different - especially in regard to operating systems, the only real difference is the numbers used for some system calls. In terms of machine code instructions, different architectures would obviously require different byte sequences - but at the end of the day the overall approach is identical. This node graph design is pretty much applicable to any target format equally.

  • @SimonClarkstone
    @SimonClarkstone 28 дней назад

    I'm intrigued to see how you manage to do things like optimisation and register allocation that traditional compilers need to use loops and recursion for. That will be several videos down the line though.

    • @Kronark
      @Kronark 28 дней назад

      Looking forward to do some optimisations as well! But yeah, like you said, make it work first, then optimise :D

  • @tgsoon2002
    @tgsoon2002 29 дней назад

    Is there estimate for when this is release to public? I would love to have access to this and try out.

    • @Kronark
      @Kronark 29 дней назад

      A proper release build will be built using this prototype, which needs to be feature complete first. A conservative estimate would be another 2 years minimum. I may give access to the prototype at some point earlier via patreon or something like that.

  • @Bleb1k_irl
    @Bleb1k_irl 29 дней назад

    Can this be used to create OSes? Since they are too, just sequence of bytes;)

  • @_rogolop
    @_rogolop 29 дней назад

    What if for example the conditional parameters depend on an integer being signed vs unsigned, but that is not known at compile time?

    • @Kronark
      @Kronark 29 дней назад

      Generally that information is known due to specific signed / unsigned integer types. But yes, if something isn‘t known at compile time, then the nodes can‘t react to that. If the type isn‘t known but the data is, then a simple „less than zero“ operation can be done via the condition node (in the case of signed / unsigned numbers) :)

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

    There is a good video by Inkbox that is called "What is the Smallest Possible .EXE?". This can give a good idea of what is minimally needed to have a runable exe file. Another video by Nir Lichtman called "Making a Very Minimal Windows Executable in C" also has some good information in it.

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

      Yesss I‘m aware, thanks! As far as I know, the smallest possible file is in the double digits I think? A little over 64 bytes? I think I just read that on stack overflow somewhere though… Might consider those techniques for fun some day, right now I just want my output files to not contain the entire standard library for a start :D

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

    I just found your channel. My question is, Why PE when ELF is probably better documented and even has official source available in the Linux kernel you can check to see how it works. Where as PE you need to just go on documentation. There is no source availability to know how the file is being read by Windows its self short of looking into a system like ReactOS possibly. Your system looks very adaptable and, as you said at the start of the series, could be used to make any file format.

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

      Because I have a windows pc and no linux system available. Additionally, Windows is the dominant OS on the software market, even more so on the gaming market. So it‘s just more sensible to start developing for Windows once I get into the software and game development business. I‘ll obviously support ELF eventually, but definitely only once I can actually run it on a system without having to setup virtual environments for it. May get a Linux laptop next year for that :)

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

      Also welcome to the channel :D

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

    I like the changes you made to your videos, but I especially like the back and forth with your community through posts on RUclips. Please keep it that way! :)

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

      I definitely will, the feedback is invaluable :D

  • @dmitry-diehl
    @dmitry-diehl Месяц назад

    I think with this language/compiler CRDT and graph/AST-based CVS (because code is already parsed and always valid AST-graph) also will work good. For online collaborative work, like in Figma. Probably for most cases conflict-free merge could also be done with seamless history (automatic commits into branches - you assign commit messages only to meaningful points in history sequence)

  • @dmitry-diehl
    @dmitry-diehl Месяц назад

    I wonder how you will separate frontend and backend compiler later for cross-platform code? You will need some abstract intermediate representation. But ports basically give some idea of how it can be done

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

      Sorry, I don't quite understand? What do you mean with "separate FE and BE for cross-platform"?

    • @dmitry-diehl
      @dmitry-diehl Месяц назад

      ​@@Kronark I'm sorry for my bad english. I just didn't understand how it would be possible to write code that could be compiled for different architectures (you mentioned x86/64, arm and riscV, I think), but which would not include architecture-specific modules. But after some thinking I already catch up how to do that with features of your node-lang. So my question partly outdated and new details in future videos will complete the picture, I think

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

      @@dmitry-diehl All good mate, your English is fine. This compiler basically moves the compiler target implementation into user-code space. So if a user wants to target a different architecture, he/she just has to build some nodes that output instructions for that architecture correctly. It will all become much clearer the more applied topics I upload :)